diff options
author | Eike Ziller <eike.ziller@qt.io> | 2021-03-12 10:10:13 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2021-03-16 08:50:40 +0000 |
commit | 05701491a1caefcfcc2a1f00ee7c07b76cff2cd9 (patch) | |
tree | bd606a773ee385f68f4f37d74509dfd5d1ecf953 | |
parent | 35d7bc49f0b8766c541274489a37334d3acb6a92 (diff) |
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>
-rw-r--r-- | src/plugins/fakevim/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/plugins/fakevim/fakevimhandler.cpp | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/fakevim/CMakeLists.txt b/src/plugins/fakevim/CMakeLists.txt index b9bd8362ebe..ddb6f3c1f1e 100644 --- a/src/plugins/fakevim/CMakeLists.txt +++ b/src/plugins/fakevim/CMakeLists.txt @@ -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} diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 9526fb78377..a00d43a6fe8 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -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; } |