forked from qt-creator/qt-creator
Various plugins: Replace QMap with QHash
The key is a pointer, so use QHash. Change-Id: Iad633b9e599d653606d386371b71b002baac6371 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1155,8 +1155,7 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name,
|
|||||||
return newSpecialization;
|
return newSpecialization;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QMap<const TemplateNameId *, ClassOrNamespace *>::const_iterator citInstantiation
|
const auto citInstantiation = reference->_instantiations.constFind(templId);
|
||||||
= reference->_instantiations.constFind(templId);
|
|
||||||
if (citInstantiation != reference->_instantiations.constEnd())
|
if (citInstantiation != reference->_instantiations.constEnd())
|
||||||
return citInstantiation.value();
|
return citInstantiation.value();
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ private:
|
|||||||
QList<Symbol *> _todo;
|
QList<Symbol *> _todo;
|
||||||
QSharedPointer<Control> _control;
|
QSharedPointer<Control> _control;
|
||||||
TemplateNameIdTable _specializations;
|
TemplateNameIdTable _specializations;
|
||||||
QMap<const TemplateNameId *, ClassOrNamespace *> _instantiations;
|
QHash<const TemplateNameId *, ClassOrNamespace *> _instantiations;
|
||||||
Anonymouses _anonymouses;
|
Anonymouses _anonymouses;
|
||||||
QSet<const AnonymousNameId *> _declaredOrTypedefedAnonymouses;
|
QSet<const AnonymousNameId *> _declaredOrTypedefedAnonymouses;
|
||||||
|
|
||||||
|
|||||||
@@ -1090,7 +1090,7 @@ void PluginManagerPrivate::addTestCreator(IPlugin *plugin, const TestCreator &te
|
|||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
|
|
||||||
using TestPlan = QMap<QObject *, QStringList>; // Object -> selected test functions
|
using TestPlan = QHash<QObject *, QStringList>; // Object -> selected test functions
|
||||||
|
|
||||||
static bool isTestFunction(const QMetaMethod &metaMethod)
|
static bool isTestFunction(const QMetaMethod &metaMethod)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public:
|
|||||||
ClangTidyTool clangTidyTool;
|
ClangTidyTool clangTidyTool;
|
||||||
ClazyTool clazyTool;
|
ClazyTool clazyTool;
|
||||||
ClangToolsOptionsPage optionsPage;
|
ClangToolsOptionsPage optionsPage;
|
||||||
QMap<Core::IDocument *, DocumentClangToolRunner *> documentRunners;
|
QHash<Core::IDocument *, DocumentClangToolRunner *> documentRunners;
|
||||||
DocumentQuickFixFactory quickFixFactory;
|
DocumentQuickFixFactory quickFixFactory;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
|
|
||||||
#include "documentmanager.h"
|
#include "documentmanager.h"
|
||||||
|
|
||||||
#include "actionmanager/actioncontainer.h"
|
|
||||||
#include "actionmanager/actionmanager.h"
|
#include "actionmanager/actionmanager.h"
|
||||||
#include "actionmanager/command.h"
|
|
||||||
#include "coreconstants.h"
|
#include "coreconstants.h"
|
||||||
#include "coreplugintr.h"
|
#include "coreplugintr.h"
|
||||||
#include "diffservice.h"
|
#include "diffservice.h"
|
||||||
@@ -14,8 +12,6 @@
|
|||||||
#include "dialogs/saveitemsdialog.h"
|
#include "dialogs/saveitemsdialog.h"
|
||||||
#include "editormanager/editormanager.h"
|
#include "editormanager/editormanager.h"
|
||||||
#include "editormanager/editormanager_p.h"
|
#include "editormanager/editormanager_p.h"
|
||||||
#include "editormanager/editorview.h"
|
|
||||||
#include "editormanager/ieditor.h"
|
|
||||||
#include "editormanager/ieditorfactory.h"
|
#include "editormanager/ieditorfactory.h"
|
||||||
#include "icore.h"
|
#include "icore.h"
|
||||||
#include "idocument.h"
|
#include "idocument.h"
|
||||||
@@ -135,7 +131,7 @@ struct FileStateItem
|
|||||||
struct FileState
|
struct FileState
|
||||||
{
|
{
|
||||||
FilePath watchedFilePath;
|
FilePath watchedFilePath;
|
||||||
QMap<IDocument *, FileStateItem> lastUpdatedState;
|
QHash<IDocument *, FileStateItem> lastUpdatedState;
|
||||||
FileStateItem expected;
|
FileStateItem expected;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ private:
|
|||||||
QLabel *m_statusWidgetLabel;
|
QLabel *m_statusWidgetLabel;
|
||||||
QToolButton *m_statusWidgetButton;
|
QToolButton *m_statusWidgetButton;
|
||||||
QList<IEditor *> m_editors;
|
QList<IEditor *> m_editors;
|
||||||
QMap<QWidget *, IEditor *> m_widgetEditorMap;
|
QHash<QWidget *, IEditor *> m_widgetEditorMap;
|
||||||
QLabel *m_emptyViewLabel;
|
QLabel *m_emptyViewLabel;
|
||||||
|
|
||||||
QList<EditLocation> m_navigationHistory;
|
QList<EditLocation> m_navigationHistory;
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ struct ModeManagerPrivate
|
|||||||
|
|
||||||
Internal::FancyTabWidget *m_modeStack;
|
Internal::FancyTabWidget *m_modeStack;
|
||||||
Internal::FancyActionBar *m_actionBar;
|
Internal::FancyActionBar *m_actionBar;
|
||||||
QMap<QAction*, int> m_actions;
|
QHash<QAction *, int> m_actions;
|
||||||
QVector<IMode*> m_modes;
|
QVector<IMode *> m_modes;
|
||||||
QVector<Command*> m_modeCommands;
|
QVector<Command *> m_modeCommands;
|
||||||
Context m_addedContexts;
|
Context m_addedContexts;
|
||||||
int m_oldCurrent;
|
int m_oldCurrent;
|
||||||
ModeManager::Style m_modeStyle = ModeManager::Style::IconsAndText;
|
ModeManager::Style m_modeStyle = ModeManager::Style::IconsAndText;
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ private:
|
|||||||
void startSearch(Core::SearchResult *search);
|
void startSearch(Core::SearchResult *search);
|
||||||
|
|
||||||
bool m_enabled;
|
bool m_enabled;
|
||||||
QMap<QFutureWatcher<Utils::SearchResultItem> *, QPointer<Core::SearchResult> > m_watchers;
|
QHash<QFutureWatcher<Utils::SearchResultItem> *, QPointer<Core::SearchResult>> m_watchers;
|
||||||
QPointer<Core::SearchResult> m_currentSearch;
|
QPointer<Core::SearchResult> m_currentSearch;
|
||||||
SearchSymbols::SymbolTypes m_symbolsToSearch;
|
SearchSymbols::SymbolTypes m_symbolsToSearch;
|
||||||
SearchScope m_scope;
|
SearchScope m_scope;
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ public:
|
|||||||
QWidget *m_modeWidget = nullptr;
|
QWidget *m_modeWidget = nullptr;
|
||||||
EditorWidget *m_editorWidget = nullptr;
|
EditorWidget *m_editorWidget = nullptr;
|
||||||
|
|
||||||
QMap<Command *, QAction *> m_commandToDesignerAction;
|
QHash<Command *, QAction *> m_commandToDesignerAction;
|
||||||
FormWindowEditorFactory *m_xmlEditorFactory = nullptr;
|
FormWindowEditorFactory *m_xmlEditorFactory = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ public:
|
|||||||
Internal::TaskFilterModel *m_filter;
|
Internal::TaskFilterModel *m_filter;
|
||||||
TaskView m_treeView;
|
TaskView m_treeView;
|
||||||
Core::IContext *m_taskWindowContext;
|
Core::IContext *m_taskWindowContext;
|
||||||
QMap<const QAction *, ITaskHandler *> m_actionToHandlerMap;
|
QHash<const QAction *, ITaskHandler *> m_actionToHandlerMap;
|
||||||
ITaskHandler *m_defaultHandler = nullptr;
|
ITaskHandler *m_defaultHandler = nullptr;
|
||||||
QToolButton *m_filterWarningsButton;
|
QToolButton *m_filterWarningsButton;
|
||||||
QToolButton *m_categoriesButton;
|
QToolButton *m_categoriesButton;
|
||||||
|
|||||||
Reference in New Issue
Block a user