diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-12-20 08:50:56 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-12-20 15:12:44 +0100 |
commit | 451b545b7f9b72ea3a63ee2f76b84ebdbf6ccd6b (patch) | |
tree | de42a4d3bf25116625f594a8d2b2873bcee9c7f2 /src/designer/src/lib/shared/rcc.cpp | |
parent | 33f74f44615d188bac04b6cc9811c672ac60e6e1 (diff) |
rcc.cpp: Use a QMultiHash explicitly if insertMulti() is being used
Apply the rcc part from qtbase/c7e35ffe69a73bb144618714313673f0d0c28394
to the copy of the rcc code used in Qt Designer, fixing:
shared/rcc.cpp: In member function 'bool RCCResourceLibrary::addFile(const QString&, const RCCFileInfo&)':
shared/rcc.cpp:605:47: warning: 'QHash<K, V>::iterator QHash<K, V>::insertMulti(const Key&, const T&) [with Key = QString; T = RCCFileInfo*]' is deprecated: Use QMultiHash for hashes storing multiple values with the same key. [-Wdeprecated-declarations]
Change-Id: Ib9989db852a8e0333d508c055c9f2667d65d74e9
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/designer/src/lib/shared/rcc.cpp')
-rw-r--r-- | src/designer/src/lib/shared/rcc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/designer/src/lib/shared/rcc.cpp b/src/designer/src/lib/shared/rcc.cpp index e75b68f0a..050c6f418 100644 --- a/src/designer/src/lib/shared/rcc.cpp +++ b/src/designer/src/lib/shared/rcc.cpp @@ -589,7 +589,7 @@ bool RCCResourceLibrary::addFile(const QString &alias, const RCCFileInfo &file) parent->m_children.insert(node, s); parent = s; } else { - parent = parent->m_children[node]; + parent = *parent->m_children.constFind(node); } } @@ -602,7 +602,7 @@ bool RCCResourceLibrary::addFile(const QString &alias, const RCCFileInfo &file) qPrintable(fileName), qPrintable(filename)); } } - parent->m_children.insertMulti(filename, s); + parent->m_children.insert(filename, s); return true; } |