forked from qt-creator/qt-creator
Use QHash instead of QMap when key is a pointer type
Ordering in container by pointer to memory doesn't make much sense. QHash is faster for lookups in this case. Change-Id: I0d4bdac7f5bb9afffdeaef70b99326547c080f55 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/temporarydirectory.h>
|
||||
|
||||
#include <QHash>
|
||||
#include <QMap>
|
||||
|
||||
namespace Core { class IDocument; }
|
||||
@@ -55,7 +56,7 @@ private:
|
||||
Utils::FilePath path;
|
||||
};
|
||||
|
||||
QMap<Core::IDocument *, AutoSavedPath> m_saved;
|
||||
QHash<Core::IDocument *, AutoSavedPath> m_saved;
|
||||
QMap<Utils::FilePath, Utils::FilePath> m_mapping;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user