summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2014-12-22 13:29:53 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-01-13 11:47:35 +0100
commit13ed47690da658c3e9b9f445458156acc6dee986 (patch)
treedd9bffd59d25e3c2852a94c13ceabd477693ba5f
parent2a02a0170988144ec89c2da9f97d326413ebe12a (diff)
use QSet<T> instead of QHash<T, void*>
Change-Id: Ifdc4d7c8e5fcb86834b2ee2c9db73decfffb4ff6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 9544ce8381..37e247c5cb 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -36,8 +36,8 @@
#include "cesdkhandler.h"
#include <qregexp.h>
-#include <qhash.h>
#include <qdir.h>
+#include <qset.h>
#include <windows/registry_p.h>
@@ -439,15 +439,15 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
project->variables().remove("QMAKE_RUN_CXX");
project->variables().remove("QMAKE_RUN_CC");
- QHash<QString, void*> source_directories;
- source_directories.insert(".", (void*)1);
+ QSet<QString> source_directories;
+ source_directories.insert(".");
static const char * const directories[] = { "UI_SOURCES_DIR", "UI_DIR", 0 };
for (int y = 0; directories[y]; y++) {
QString dirTemp = project->first(directories[y]).toQString();
if (dirTemp.endsWith("\\"))
dirTemp.truncate(dirTemp.length()-1);
if(!dirTemp.isEmpty())
- source_directories.insert(dirTemp, (void*)1);
+ source_directories.insert(dirTemp);
}
static const char * const srcs[] = { "SOURCES", "GENERATED_SOURCES", 0 };
for (int x = 0; srcs[x]; x++) {
@@ -457,22 +457,22 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
if((*sit).indexOf(sep) == -1)
sep = "/";
QString dir = (*sit).toQString().section(sep, 0, -2);
- if(!dir.isEmpty() && !source_directories[dir])
- source_directories.insert(dir, (void*)1);
+ if (!dir.isEmpty())
+ source_directories.insert(dir);
}
}
- for(QHash<QString, void*>::Iterator it(source_directories.begin()); it != source_directories.end(); ++it) {
- if(it.key().isEmpty())
+ foreach (const QString &sourceDir, source_directories) {
+ if (sourceDir.isEmpty())
continue;
QString objDir = var("OBJECTS_DIR");
if (objDir == ".\\")
objDir = "";
for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
- t << "{" << it.key() << "}" << (*cppit) << "{" << objDir << "}" << Option::obj_ext << "::\n\t"
+ t << "{" << sourceDir << "}" << (*cppit) << "{" << objDir << "}" << Option::obj_ext << "::\n\t"
<< var("QMAKE_RUN_CXX_IMP_BATCH").replace(QRegExp("\\$@"), var("OBJECTS_DIR")) << endl << "\t$<\n<<\n\n";
for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit)
- t << "{" << it.key() << "}" << (*cit) << "{" << objDir << "}" << Option::obj_ext << "::\n\t"
+ t << "{" << sourceDir << "}" << (*cit) << "{" << objDir << "}" << Option::obj_ext << "::\n\t"
<< var("QMAKE_RUN_CC_IMP_BATCH").replace(QRegExp("\\$@"), var("OBJECTS_DIR")) << endl << "\t$<\n<<\n\n";
}
} else {