diff options
author | Pierre Rossi <pierre.rossi@nokia.com> | 2010-02-02 11:27:23 +0100 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@nokia.com> | 2010-02-02 11:35:53 +0100 |
commit | 087d79578bf3e0c8cc6e53b5babb2e935a4b9c91 (patch) | |
tree | e5e5e72f8356dc5ff089220c952f6d4c7e375e6b /src/tools | |
parent | 54de7595a54e67efb60cdc9eb4c4ff15596c3763 (diff) |
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/tools')
-rw-r--r-- | src/tools/rcc/rcc.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index e41cd5582a..1f6e58f795 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; } |