diff options
-rw-r--r-- | doc/doc.pri | 4 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 19 | ||||
-rw-r--r-- | src/gui/util/qcompleter.cpp | 19 | ||||
-rw-r--r-- | src/network/access/qnetworkaccesshttpbackend_p.h | 2 | ||||
-rw-r--r-- | tests/auto/compilerwarnings/tst_compilerwarnings.cpp | 30 |
5 files changed, 57 insertions, 17 deletions
diff --git a/doc/doc.pri b/doc/doc.pri index 3d04049..3180a61 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -55,11 +55,11 @@ docs_zh_CN.commands = $$QT_ZH_CN_DOCUMENTATION # 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 0d00266..4c4f5bc 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 05fe744..1abc2d9 100644 --- a/src/gui/util/qcompleter.cpp +++ b/src/gui/util/qcompleter.cpp @@ -532,17 +532,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); } } @@ -1808,7 +1813,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 diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h index 254907f..c4c88ae 100644 --- a/src/network/access/qnetworkaccesshttpbackend_p.h +++ b/src/network/access/qnetworkaccesshttpbackend_p.h @@ -94,8 +94,6 @@ public: #endif QNetworkCacheMetaData fetchCacheMetaData(const QNetworkCacheMetaData &metaData) const; - qint64 deviceReadData(char *buffer, qint64 maxlen); - // we return true since HTTP needs to send PUT/POST data again after having authenticated bool needsResetableUploadData() { return true; } diff --git a/tests/auto/compilerwarnings/tst_compilerwarnings.cpp b/tests/auto/compilerwarnings/tst_compilerwarnings.cpp index f910a18..82c327a 100644 --- a/tests/auto/compilerwarnings/tst_compilerwarnings.cpp +++ b/tests/auto/compilerwarnings/tst_compilerwarnings.cpp @@ -62,6 +62,9 @@ class tst_CompilerWarnings: public QObject private slots: void warnings_data(); void warnings(); + +private: + bool shouldIgnoreWarning(QString const&); }; #if 0 @@ -242,16 +245,37 @@ void tst_CompilerWarnings::warnings() if (!errs.isEmpty()) { errList = errs.split("\n"); qDebug() << "Arguments:" << args; - foreach (QString err, errList) { - qDebug() << err; + QStringList validErrors; + foreach (QString const& err, errList) { + bool ignore = shouldIgnoreWarning(err); + qDebug() << err << (ignore ? " [ignored]" : ""); + if (!ignore) { + validErrors << err; + } } + errList = validErrors; } QCOMPARE(errList.count(), 0); // verbose info how many lines of errors in output - QVERIFY(errs.isEmpty()); tmpQSourceFile.remove(); } +bool tst_CompilerWarnings::shouldIgnoreWarning(QString const& warning) +{ + if (warning.isEmpty()) { + return true; + } + + // icecc outputs warnings if some icecc node breaks + if (warning.startsWith("ICECC[")) { + return true; + } + + // Add more bogus warnings here + + return false; +} + QTEST_APPLESS_MAIN(tst_CompilerWarnings) #include "tst_compilerwarnings.moc" |