From 087d79578bf3e0c8cc6e53b5babb2e935a4b9c91 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Tue, 2 Feb 2010 11:27:23 +0100 Subject: 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 --- src/tools/rcc/rcc.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/tools') 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; } -- cgit v1.2.3