diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-08-20 19:47:32 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-08-24 18:23:17 +0000 |
commit | b928fc55c2670007e62da9995e6607be2472f7c1 (patch) | |
tree | e5a718e752d63bea9fd9c838dc40a743cea133f3 /src/lib/corelib/language/moduleloader.h | |
parent | 7f424ec15884e23ef56c7781f0a8de02ed016ae1 (diff) |
Use std::optional in the m_existingModulePathCache function
... instead of the bool/QString pair
Change-Id: Ied2911e438ffbfb6e5544b8cb99d8ee4077641aa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/language/moduleloader.h')
-rw-r--r-- | src/lib/corelib/language/moduleloader.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/corelib/language/moduleloader.h b/src/lib/corelib/language/moduleloader.h index 942f93c83..2f6abb834 100644 --- a/src/lib/corelib/language/moduleloader.h +++ b/src/lib/corelib/language/moduleloader.h @@ -58,6 +58,7 @@ #include <map> #include <memory> +#include <optional> #include <unordered_map> #include <utility> #include <vector> @@ -414,7 +415,7 @@ private: ItemReader *m_reader; Evaluator *m_evaluator; QMap<QString, QStringList> m_moduleDirListCache; - QHash<std::pair<QString, QualifiedId>, std::pair<bool, QString>> m_existingModulePathCache; + QHash<std::pair<QString, QualifiedId>, std::optional<QString>> m_existingModulePathCache; // The keys are file paths, the values are module prototype items accompanied by a profile. std::unordered_map<QString, std::vector<std::pair<Item *, QString>>> m_modulePrototypes; |