summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-17 15:59:49 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-17 15:59:49 (GMT)
commit803c7c3ff783ca74bc75fe574a98db51e2de9f22 (patch)
tree4d637736ab7adb9df04057cdc930479092d745b3
parent509ef11ab4ba6165c16d9d311c4a1bf7cdfd2528 (diff)
parent8aff2b3e6f09b446f124b7023485e947ab1bf24b (diff)
downloadQt-803c7c3ff783ca74bc75fe574a98db51e2de9f22.zip
Qt-803c7c3ff783ca74bc75fe574a98db51e2de9f22.tar.gz
Qt-803c7c3ff783ca74bc75fe574a98db51e2de9f22.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Doc: fix typo QCompleter: fix misuse of QMap that can lead to crashes qmake: added possibility to specify the type of an install target
-rw-r--r--doc/doc.pri4
-rw-r--r--qmake/generators/makefile.cpp19
-rw-r--r--src/gui/util/qcompleter.cpp19
3 files changed, 30 insertions, 12 deletions
diff --git a/doc/doc.pri b/doc/doc.pri
index 463c447..c6073f0 100644
--- a/doc/doc.pri
+++ b/doc/doc.pri
@@ -45,11 +45,11 @@ docs.depends = adp_docs qch_docs
# Install rules
htmldocs.files = $$QT_BUILD_TREE/doc/html
htmldocs.path = $$[QT_INSTALL_DOCS]
-htmldocs.CONFIG += no_check_exist
+htmldocs.CONFIG += no_check_exist directory
qchdocs.files= $$QT_BUILD_TREE/doc/qch
qchdocs.path = $$[QT_INSTALL_DOCS]
-qchdocs.CONFIG += no_check_exist
+qchdocs.CONFIG += no_check_exist directory
docimages.files = $$QT_BUILD_TREE/doc/src/images
docimages.path = $$[QT_INSTALL_DOCS]/src
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index d949b63..5ec47ec 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1277,13 +1277,26 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
}
QString local_dirstr = Option::fixPathToLocalOS(dirstr, true);
QStringList files = QDir(local_dirstr).entryList(QStringList(filestr));
- if(project->values((*it) + ".CONFIG").indexOf("no_check_exist") != -1 && files.isEmpty()) {
+ const QStringList &installConfigValues = project->values((*it) + ".CONFIG");
+ if (installConfigValues.contains("no_check_exist") && files.isEmpty()) {
if(!target.isEmpty())
target += "\t";
QString dst_file = filePrefixRoot(root, dst);
QFileInfo fi(fileInfo(wild));
- QString cmd = QString(fi.isExecutable() ? "-$(INSTALL_PROGRAM)" : "-$(INSTALL_FILE)") + " " +
- wild + " " + dst_file + "\n";
+ QString cmd;
+ if (installConfigValues.contains("directory")) {
+ cmd = QLatin1String("-$(INSTALL_DIR)");
+ if (!dst_file.endsWith(Option::dir_sep))
+ dst_file += Option::dir_sep;
+ dst_file += fi.fileName();
+ } else if (installConfigValues.contains("executable")) {
+ cmd = QLatin1String("-$(INSTALL_PROGRAM)");
+ } else if (installConfigValues.contains("data")) {
+ cmd = QLatin1String("-$(INSTALL_FILE)");
+ } else {
+ cmd = QString(fi.isExecutable() ? "-$(INSTALL_PROGRAM)" : "-$(INSTALL_FILE)");
+ }
+ cmd += " " + wild + " " + dst_file + "\n";
target += cmd;
if(!uninst.isEmpty())
uninst.append("\n\t");
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index cefdb27..9a99abe 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -527,17 +527,22 @@ void QCompletionEngine::saveInCache(QString part, const QModelIndex& parent, con
QMatchData old = cache[parent].take(part);
cost = cost + m.indices.cost() - old.indices.cost();
if (cost * sizeof(int) > 1024 * 1024) {
- QMap<QModelIndex, CacheItem>::iterator it1 ;
- for (it1 = cache.begin(); it1 != cache.end(); ++it1) {
+ QMap<QModelIndex, CacheItem>::iterator it1 = cache.begin();
+ while (it1 != cache.end()) {
CacheItem& ci = it1.value();
int sz = ci.count()/2;
QMap<QString, QMatchData>::iterator it2 = ci.begin();
- for (int i = 0; it2 != ci.end() && i < sz; i++, ++it2) {
+ int i = 0;
+ while (it2 != ci.end() && i < sz) {
cost -= it2.value().indices.cost();
- ci.erase(it2);
+ it2 = ci.erase(it2);
+ i++;
+ }
+ if (ci.count() == 0) {
+ it1 = cache.erase(it1);
+ } else {
+ ++it1;
}
- if (ci.count() == 0)
- cache.erase(it1);
}
}
@@ -1748,7 +1753,7 @@ QStringList QCompleter::splitPath(const QString& path) const
This signal is sent when an item in the popup() is highlighted by
the user. It is also sent if complete() is called with the completionMode()
- set to QCOmpleter::InlineCompletion. The item's \a text is given.
+ set to QCompleter::InlineCompletion. The item's \a text is given.
*/
QT_END_NAMESPACE