summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@nokia.com>2010-02-02 10:27:23 (GMT)
committerPierre Rossi <pierre.rossi@nokia.com>2010-02-02 10:35:53 (GMT)
commit087d79578bf3e0c8cc6e53b5babb2e935a4b9c91 (patch)
treee5e5e72f8356dc5ff089220c952f6d4c7e375e6b /src
parent54de7595a54e67efb60cdc9eb4c4ff15596c3763 (diff)
downloadQt-087d79578bf3e0c8cc6e53b5babb2e935a4b9c91.zip
Qt-087d79578bf3e0c8cc6e53b5babb2e935a4b9c91.tar.gz
Qt-087d79578bf3e0c8cc6e53b5babb2e935a4b9c91.tar.bz2
Add a warning when there are duplicate aliases in a resource file.
It can be confusing later on when the wrong resource is accessed, and can easily be avoided by an early notice. Task-number: QTBUG-7812 Reviewed-by: hjk
Diffstat (limited to 'src')
-rw-r--r--src/tools/rcc/rcc.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index e41cd55..1f6e58f 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -544,6 +544,8 @@ bool RCCResourceLibrary::addFile(const QString &alias, const RCCFileInfo &file)
const QString filename = nodes.at(nodes.size()-1);
RCCFileInfo *s = new RCCFileInfo(file);
s->m_parent = parent;
+ if (parent->m_children.contains(filename))
+ qWarning("potential duplicate alias detected: '%s'", qPrintable(filename));
parent->m_children.insertMulti(filename, s);
return true;
}