summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--src/androiddeployqt/main.cpp35
-rw-r--r--src/assistant/assistant/mainwindow.cpp13
-rw-r--r--src/designer/src/designer/qdesigner.cpp7
-rw-r--r--src/designer/src/lib/uilib/widgets.table2
-rw-r--r--src/linguist/lupdate/lupdate.exe.manifest13
-rw-r--r--src/linguist/lupdate/lupdate.pro4
-rw-r--r--src/linguist/lupdate/lupdate.rc4
-rw-r--r--src/linguist/shared/qmakeevaluator.cpp54
-rw-r--r--src/windeployqt/main.cpp2
10 files changed, 58 insertions, 78 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 457f68b56..104f7dbab 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,4 +1,4 @@
load(qt_build_config)
CONFIG += qt_example_installs
-MODULE_VERSION = 5.2.1
+MODULE_VERSION = 5.2.2
diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp
index 9191b3e0c..3198a10b5 100644
--- a/src/androiddeployqt/main.cpp
+++ b/src/androiddeployqt/main.cpp
@@ -388,13 +388,18 @@ bool alwaysOverwritableFile(const QString &fileName)
|| fileName.endsWith(QLatin1String("/src/org/qtproject/qt5/android/bindings/QtActivity.java")));
}
-bool copyFileIfNewer(const QString &sourceFileName, const QString &destinationFileName, bool verbose)
+bool copyFileIfNewer(const QString &sourceFileName,
+ const QString &destinationFileName,
+ bool verbose,
+ bool forceOverwrite = false)
{
if (QFile::exists(destinationFileName)) {
QFileInfo destinationFileInfo(destinationFileName);
QFileInfo sourceFileInfo(sourceFileName);
- if (sourceFileInfo.lastModified() <= destinationFileInfo.lastModified() && !alwaysOverwritableFile(destinationFileName)) {
+ if (!forceOverwrite
+ && sourceFileInfo.lastModified() <= destinationFileInfo.lastModified()
+ && !alwaysOverwritableFile(destinationFileName)) {
if (verbose)
fprintf(stdout, " -- Skipping file %s. Same or newer file already in place.\n", qPrintable(sourceFileName));
return true;
@@ -636,7 +641,7 @@ bool readInputFile(Options *options)
return true;
}
-bool copyFiles(const QDir &sourceDirectory, const QDir &destinationDirectory, bool verbose)
+bool copyFiles(const QDir &sourceDirectory, const QDir &destinationDirectory, bool verbose, bool forceOverwrite = false)
{
QFileInfoList entries = sourceDirectory.entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs);
foreach (QFileInfo entry, entries) {
@@ -647,11 +652,11 @@ bool copyFiles(const QDir &sourceDirectory, const QDir &destinationDirectory, bo
return false;
}
- if (!copyFiles(dir, QDir(destinationDirectory.path() + QLatin1String("/") + dir.dirName()), verbose))
+ if (!copyFiles(dir, QDir(destinationDirectory.path() + QLatin1String("/") + dir.dirName()), verbose, forceOverwrite))
return false;
} else {
QString destination = destinationDirectory.absoluteFilePath(entry.fileName());
- if (!copyFileIfNewer(entry.absoluteFilePath(), destination, verbose))
+ if (!copyFileIfNewer(entry.absoluteFilePath(), destination, verbose, forceOverwrite))
return false;
}
}
@@ -692,7 +697,7 @@ bool copyAndroidSources(const Options &options)
return false;
}
- return copyFiles(sourceDirectory, QDir(options.outputDirectory), options.verbose);
+ return copyFiles(sourceDirectory, QDir(options.outputDirectory), options.verbose, true);
}
bool copyAndroidExtraLibs(const Options &options)
@@ -1836,29 +1841,29 @@ bool signPackage(const Options &options)
return false;
}
- jarSignerTool = QString::fromLatin1("\"%1\" -sigalg %2 -digestalg %3 -keystore %4")
+ jarSignerTool = QString::fromLatin1("\"%1\" -sigalg \"%2\" -digestalg \"%3\" -keystore \"%4\"")
.arg(jarSignerTool).arg(options.sigAlg).arg(options.digestAlg).arg(options.keyStore);
if (!options.keyStorePassword.isEmpty())
- jarSignerTool += QString::fromLatin1(" -storepass %1").arg(options.keyStorePassword);
+ jarSignerTool += QString::fromLatin1(" -storepass \"%1\"").arg(options.keyStorePassword);
if (!options.storeType.isEmpty())
- jarSignerTool += QString::fromLatin1(" -storetype %1").arg(options.storeType);
+ jarSignerTool += QString::fromLatin1(" -storetype \"%1\"").arg(options.storeType);
if (!options.keyPass.isEmpty())
- jarSignerTool += QString::fromLatin1(" -keypass %1").arg(options.keyPass);
+ jarSignerTool += QString::fromLatin1(" -keypass \"%1\"").arg(options.keyPass);
if (!options.sigFile.isEmpty())
- jarSignerTool += QString::fromLatin1(" -sigfile %1").arg(options.sigFile);
+ jarSignerTool += QString::fromLatin1(" -sigfile \"%1\"").arg(options.sigFile);
if (!options.signedJar.isEmpty())
- jarSignerTool += QString::fromLatin1(" -signedjar %1").arg(options.signedJar);
+ jarSignerTool += QString::fromLatin1(" -signedjar \"%1\"").arg(options.signedJar);
if (!options.tsaUrl.isEmpty())
- jarSignerTool += QString::fromLatin1(" -tsa %1").arg(options.tsaUrl);
+ jarSignerTool += QString::fromLatin1(" -tsa \"%1\"").arg(options.tsaUrl);
if (!options.tsaCert.isEmpty())
- jarSignerTool += QString::fromLatin1(" -tsacert %1").arg(options.tsaCert);
+ jarSignerTool += QString::fromLatin1(" -tsacert \"%1\"").arg(options.tsaCert);
if (options.internalSf)
jarSignerTool += QLatin1String(" -internalsf");
@@ -1869,7 +1874,7 @@ bool signPackage(const Options &options)
if (options.protectedAuthenticationPath)
jarSignerTool += QLatin1String(" -protected");
- jarSignerTool += QString::fromLatin1(" %1 %2")
+ jarSignerTool += QString::fromLatin1(" %1 \"%2\"")
.arg(options.outputDirectory
+ QLatin1String("/bin/")
+ apkName(options)
diff --git a/src/assistant/assistant/mainwindow.cpp b/src/assistant/assistant/mainwindow.cpp
index facbcd819..5186de341 100644
--- a/src/assistant/assistant/mainwindow.cpp
+++ b/src/assistant/assistant/mainwindow.cpp
@@ -66,12 +66,14 @@
#include <QtCore/QStandardPaths>
#include <QtCore/QTextStream>
#include <QtCore/QTimer>
+#include <QtCore/QBuffer>
#include <QtWidgets/QAction>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDesktopWidget>
#include <QtWidgets/QDockWidget>
#include <QtGui/QFontDatabase>
+#include <QtGui/QImageReader>
#include <QtWidgets/QFileDialog>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLayout>
@@ -189,9 +191,14 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
setWindowTitle(windowTitle.isEmpty() ? defWindowTitle : windowTitle);
QByteArray iconArray = helpEngineWrapper.applicationIcon();
if (iconArray.size() > 0) {
- QPixmap pix;
- pix.loadFromData(iconArray);
- QIcon appIcon(pix);
+ QBuffer buffer(&iconArray);
+ QImageReader reader(&buffer);
+ QIcon appIcon;
+ do {
+ QPixmap pix;
+ pix.convertFromImage(reader.read());
+ appIcon.addPixmap(pix);
+ } while (reader.jumpToNextImage());
qApp->setWindowIcon(appIcon);
} else {
QIcon appIcon(QLatin1String(":/qt-project.org/assistant/images/assistant-128.png"));
diff --git a/src/designer/src/designer/qdesigner.cpp b/src/designer/src/designer/qdesigner.cpp
index 8c10f5a2b..9484bc2fd 100644
--- a/src/designer/src/designer/qdesigner.cpp
+++ b/src/designer/src/designer/qdesigner.cpp
@@ -231,13 +231,6 @@ void QDesigner::initialize()
installTranslator(translator);
installTranslator(qtTranslator);
- if (QLibraryInfo::licensedProducts() == QStringLiteral("Console")) {
- QMessageBox::information(0, tr("Qt Designer"),
- tr("This application cannot be used for the Console edition of Qt"));
- QMetaObject::invokeMethod(this, "quit", Qt::QueuedConnection);
- return;
- }
-
m_workbench = new QDesignerWorkbench();
emit initialized();
diff --git a/src/designer/src/lib/uilib/widgets.table b/src/designer/src/lib/uilib/widgets.table
index b13569d3a..0c89b00d8 100644
--- a/src/designer/src/lib/uilib/widgets.table
+++ b/src/designer/src/lib/uilib/widgets.table
@@ -134,7 +134,7 @@ DECLARE_WIDGET(QWizard, "")
DECLARE_WIDGET(QWizardPage, "")
#endif
-#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW
+#if !defined(QT_NO_GRAPHICSVIEW)
DECLARE_WIDGET_1(QGraphicsView, "")
#endif
diff --git a/src/linguist/lupdate/lupdate.exe.manifest b/src/linguist/lupdate/lupdate.exe.manifest
new file mode 100644
index 000000000..945d28997
--- /dev/null
+++ b/src/linguist/lupdate/lupdate.exe.manifest
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <!-- Make sure Windows UAC does not believe lupdate is an installer. -->
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel
+ level="asInvoker"
+ uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
diff --git a/src/linguist/lupdate/lupdate.pro b/src/linguist/lupdate/lupdate.pro
index bd67e49a0..710fd9b1d 100644
--- a/src/linguist/lupdate/lupdate.pro
+++ b/src/linguist/lupdate/lupdate.pro
@@ -29,6 +29,10 @@ HEADERS += \
lupdate.h \
../shared/simtexth.h
+mingw {
+ RC_FILE = lupdate.rc
+}
+
qmake.name = QMAKE
qmake.value = $$shell_path($$QMAKE_QMAKE)
QT_TOOL_ENV += qmake
diff --git a/src/linguist/lupdate/lupdate.rc b/src/linguist/lupdate/lupdate.rc
new file mode 100644
index 000000000..45c493576
--- /dev/null
+++ b/src/linguist/lupdate/lupdate.rc
@@ -0,0 +1,4 @@
+#define RT_MANIFEST 24
+#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
+
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "lupdate.exe.manifest"
diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp
index 270755315..c6d7da66d 100644
--- a/src/linguist/shared/qmakeevaluator.cpp
+++ b/src/linguist/shared/qmakeevaluator.cpp
@@ -894,30 +894,9 @@ void QMakeEvaluator::visitProVariable(
default: // whatever - cannot happen
case TokAssign: // =
zipEmpty(&varVal);
- if (!m_cumulative) {
- // FIXME: add check+warning about accidental value removal.
- // This may be a bit too noisy, though.
- m_valuemapStack.top()[varName] = varVal;
- } else {
- if (!varVal.isEmpty()) {
- // We are greedy for values. But avoid exponential growth.
- ProStringList &v = valuesRef(varName);
- if (v.isEmpty()) {
- v = varVal;
- } else {
- ProStringList old = v;
- v = varVal;
- QSet<ProString> has;
- has.reserve(v.size());
- foreach (const ProString &s, v)
- has.insert(s);
- v.reserve(v.size() + old.size());
- foreach (const ProString &s, old)
- if (!has.contains(s))
- v << s;
- }
- }
- }
+ // FIXME: add check+warning about accidental value removal.
+ // This may be a bit too noisy, though.
+ m_valuemapStack.top()[varName] = varVal;
debugMsg(2, "assigning");
break;
case TokAppendUnique: // *=
@@ -933,7 +912,7 @@ void QMakeEvaluator::visitProVariable(
if (!m_cumulative) {
removeEach(&valuesRef(varName), varVal);
} else {
- // We are stingy with our values, too.
+ // We are stingy with our values.
}
debugMsg(2, "removing");
break;
@@ -1123,28 +1102,7 @@ bool QMakeEvaluator::prepareProject(const QString &inDir)
}
no_cache:
- // Look for mkspecs/ in source and build. First to win determines the root.
- QString sdir = inDir;
QString dir = m_outputDir;
- while (dir != m_buildRoot) {
- if ((dir != sdir && QFileInfo(sdir, QLatin1String("mkspecs")).isDir())
- || QFileInfo(dir, QLatin1String("mkspecs")).isDir()) {
- if (dir != sdir)
- m_sourceRoot = sdir;
- m_buildRoot = dir;
- break;
- }
- if (dir == superdir)
- break;
- QFileInfo qsdfi(sdir);
- QFileInfo qdfi(dir);
- if (qsdfi.isRoot() || qdfi.isRoot())
- break;
- sdir = qsdfi.path();
- dir = qdfi.path();
- }
-
- dir = m_outputDir;
forever {
QString stashfile = dir + QLatin1String("/.qmake.stash");
if (dir == (!superdir.isEmpty() ? superdir : m_buildRoot) || m_vfs->exists(stashfile)) {
@@ -1876,14 +1834,12 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFile(
VisitReturn ok = visitProFile(pro, type, flags);
m_current = m_locationStack.pop();
pro->deref();
-#ifdef PROEVALUATOR_FULL
if (ok == ReturnTrue && !(flags & LoadHidden)) {
ProStringList &iif = m_valuemapStack.first()[ProKey("QMAKE_INTERNAL_INCLUDED_FILES")];
ProString ifn(fileName);
if (!iif.contains(ifn))
iif << ifn;
}
-#endif
return ok;
} else {
return ReturnFalse;
@@ -1996,13 +1952,11 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFileInto(
if (ret != ReturnTrue)
return ret;
*values = visitor.m_valuemapStack.top();
-#ifdef PROEVALUATOR_FULL
ProKey qiif("QMAKE_INTERNAL_INCLUDED_FILES");
ProStringList &iif = m_valuemapStack.first()[qiif];
foreach (const ProString &ifn, values->value(qiif))
if (!iif.contains(ifn))
iif << ifn;
-#endif
return ReturnTrue;
}
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp
index a5e5a9283..dc2119e5d 100644
--- a/src/windeployqt/main.cpp
+++ b/src/windeployqt/main.cpp
@@ -419,7 +419,7 @@ static inline QString helpText(const QCommandLineParser &p)
QString result = p.helpText();
// Replace the default-generated text which is too long by a short summary
// explaining how to enable single libraries.
- const int moduleStart = result.indexOf(QLatin1String("\n --core"));
+ const int moduleStart = result.indexOf(QLatin1String("\n --bluetooth"));
const int argumentsStart = result.lastIndexOf(QLatin1String("\nArguments:"));
if (moduleStart >= argumentsStart)
return result;