FakeVim: Fix compilation with Qt 6

By using recursive QHash instead of recursive QMap, which has issues
compiling under some circumstances with MSVC.

Change-Id: I545a5eb9002f247a5015e7ea5e59cf74895b1e21
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2021-03-12 10:10:13 +01:00
parent 35d7bc49f0
commit 05701491a1
2 changed files with 6 additions and 2 deletions

View File

@@ -1,5 +1,4 @@
add_qtc_plugin(FakeVim
CONDITION Qt5_VERSION VERSION_LESS 6.0.0
PLUGIN_DEPENDS Core TextEditor
PLUGIN_TEST_DEPENDS CppEditor CppTools
SOURCES ${TEST_SOURCES}

View File

@@ -1300,6 +1300,11 @@ public:
<< quoteUnprintable(m_text);
}
friend uint qHash(const Input &i)
{
return ::qHash(i.m_key);
}
private:
int m_key = 0;
int m_xkey = 0;
@@ -1645,7 +1650,7 @@ private:
};
// Mappings for a specific mode (trie structure)
class ModeMapping : public QMap<Input, ModeMapping>
class ModeMapping : public QHash<Input, ModeMapping>
{
public:
const Inputs &value() const { return m_value; }