From e441c5c4d5545a621ff72c43102e1ecc5625b09c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 25 Mar 2015 22:06:22 -0700 Subject: Fix -Wcast-qual warnings found by GCC ...by switching to static_cast Change-Id: Iee8cbc07c4434ce9b560ffff13cef3f916f521a3 Reviewed-by: Friedemann Kleint --- src/shared/qtgradienteditor/qtgradienteditor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/qtgradienteditor/qtgradienteditor.cpp b/src/shared/qtgradienteditor/qtgradienteditor.cpp index fd6551c2..8f91e813 100644 --- a/src/shared/qtgradienteditor/qtgradienteditor.cpp +++ b/src/shared/qtgradienteditor/qtgradienteditor.cpp @@ -854,13 +854,13 @@ void QtGradientEditor::setGradient(const QGradient &grad) d_ptr->m_spreadGroup->button(idx)->setChecked(true); if (type == QGradient::LinearGradient) { - QLinearGradient *gr = (QLinearGradient *)(&grad); + const QLinearGradient *gr = static_cast(&grad); d_ptr->setStartLinear(gr->start()); d_ptr->setEndLinear(gr->finalStop()); d_ptr->m_ui.gradientWidget->setStartLinear(gr->start()); d_ptr->m_ui.gradientWidget->setEndLinear(gr->finalStop()); } else if (type == QGradient::RadialGradient) { - QRadialGradient *gr = (QRadialGradient *)(&grad); + const QRadialGradient *gr = static_cast(&grad); d_ptr->setCentralRadial(gr->center()); d_ptr->setFocalRadial(gr->focalPoint()); d_ptr->setRadiusRadial(gr->radius()); @@ -868,7 +868,7 @@ void QtGradientEditor::setGradient(const QGradient &grad) d_ptr->m_ui.gradientWidget->setFocalRadial(gr->focalPoint()); d_ptr->m_ui.gradientWidget->setRadiusRadial(gr->radius()); } else if (type == QGradient::ConicalGradient) { - QConicalGradient *gr = (QConicalGradient *)(&grad); + const QConicalGradient *gr = static_cast(&grad); d_ptr->setCentralConical(gr->center()); d_ptr->setAngleConical(gr->angle()); d_ptr->m_ui.gradientWidget->setCentralConical(gr->center()); -- cgit v1.2.3 From f8630e85cd012f48b4dbf362e9ad633603bb80e0 Mon Sep 17 00:00:00 2001 From: Tobias Koenig Date: Thu, 9 Jul 2015 11:45:11 +0200 Subject: windeployqt: Fix deployment of Q53DInput.dll Fix the typo in the name of the DLL. Change-Id: I81df26d837c3294852eba688db701503f95aad66 Reviewed-by: Friedemann Kleint --- src/windeployqt/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index 8414a9af..b287a44a 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -155,7 +155,7 @@ QtModuleEntry qtModuleEntries[] = { { Qt3DRendererModule, "3drenderer", "Qt53DRenderer", 0 }, { Qt3DQuickModule, "3dquick", "Qt53DQuick", 0 }, { Qt3DQuickRendererModule, "3dquickrenderer", "Qt53DQuickRenderer", 0 }, - { Qt3DInputModule, "3dinput", "Qt35DInput", 0 }, + { Qt3DInputModule, "3dinput", "Qt53DInput", 0 }, { QtLocationModule, "geoservices", "Qt5Location", 0 } }; -- cgit v1.2.3 From b8f87004d3c71f6faff0737d60a894f1a22b23e7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 13 Jul 2015 14:58:14 +0200 Subject: windeployqt: Deploy plugins in platforminputcontexts for QtGui. Change-Id: I7fe4d21b078bf2e0812acb0f688fb64cb4fdfddb Reviewed-by: Oliver Wolff --- src/windeployqt/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index b287a44a..ae2eb5b8 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -721,7 +721,8 @@ private: static inline quint64 qtModuleForPlugin(const QString &subDirName) { if (subDirName == QLatin1String("accessible") || subDirName == QLatin1String("iconengines") - || subDirName == QLatin1String("imageformats") || subDirName == QLatin1String("platforms")) { + || subDirName == QLatin1String("imageformats") || subDirName == QLatin1String("platforms") + || subDirName == QLatin1String("platforminputcontexts")) { return QtGuiModule; } if (subDirName == QLatin1String("bearer")) -- cgit v1.2.3 From 5b9d262e5f411459ecd57bc75f923006856d9a0f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 14 Jul 2015 13:48:29 +0200 Subject: windeployqt: Deploy new webengine resources See change 7345ef65af262eb0b958905d7175cc836821cf25 in qtwebengine. Task-number: QTBUG-47018 Change-Id: I325885dbdce1fa3c6130ad6c6271366bdb430d27 Reviewed-by: Friedemann Kleint --- src/windeployqt/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index ae2eb5b8..023f0dc4 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -1328,7 +1328,10 @@ static bool deployWebProcess(const QMap &qmakeVariables, static bool deployWebEngine(const QMap &qmakeVariables, const Options &options, QString *errorMessage) { - static const char *installDataFiles[] = {"icudtl.dat", "qtwebengine_resources.pak"}; + static const char *installDataFiles[] = {"icudtl.dat", + "qtwebengine_resources.pak", + "qtwebengine_resources_100p.pak", + "qtwebengine_resources_200p.pak"}; std::wcout << "Deploying: " << webEngineProcessC << "...\n"; if (!deployWebProcess(qmakeVariables, webEngineProcessC, options, errorMessage)) { -- cgit v1.2.3 From a15cef268dbfe64e90fe665bc453e46c18f08f59 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 21 Jul 2015 14:12:03 +0200 Subject: windeployqt: Adapt to MSVC 2015. The name of the runtime libraries changed to VCRUNTIME140[D].DLL. Task-number: QTBUG-47334 Change-Id: Ibe9234e91801730afb2c0015abe94458fe22ba0f Reviewed-by: Oliver Wolff Reviewed-by: Joerg Bornemann --- src/windeployqt/utils.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/windeployqt/utils.cpp b/src/windeployqt/utils.cpp index e7a75550..20a1829e 100644 --- a/src/windeployqt/utils.cpp +++ b/src/windeployqt/utils.cpp @@ -725,22 +725,25 @@ inline QStringList readImportSections(const ImageNtHeader *ntHeaders, const void return result; } -// Check for MSCV runtime (MSVCP90D.dll/MSVCP90.dll, MSVCP120D.dll/MSVCP120.dll -// or msvcp120d_app.dll/msvcp120_app.dll). +// Check for MSCV runtime (MSVCP90D.dll/MSVCP90.dll, MSVCP120D.dll/MSVCP120.dll, +// VCRUNTIME140D.DLL/VCRUNTIME140.DLL (VS2015) or msvcp120d_app.dll/msvcp120_app.dll). enum MsvcDebugRuntimeResult { MsvcDebugRuntime, MsvcReleaseRuntime, NoMsvcRuntime }; static inline MsvcDebugRuntimeResult checkMsvcDebugRuntime(const QStringList &dependentLibraries) { foreach (const QString &lib, dependentLibraries) { + int pos = 0; if (lib.startsWith(QLatin1String("MSVCR"), Qt::CaseInsensitive) || lib.startsWith(QLatin1String("MSVCP"), Qt::CaseInsensitive)) { - int pos = 5; - if (lib.at(pos).isDigit()) { - for (++pos; lib.at(pos).isDigit(); ++pos) - ; - return lib.at(pos).toLower() == QLatin1Char('d') - ? MsvcDebugRuntime : MsvcReleaseRuntime; - } + pos = 5; + } else if (lib.startsWith(QLatin1String("VCRUNTIME"), Qt::CaseInsensitive)) { + pos = 9; + } + if (pos && lib.at(pos).isDigit()) { + for (++pos; lib.at(pos).isDigit(); ++pos) + ; + return lib.at(pos).toLower() == QLatin1Char('d') + ? MsvcDebugRuntime : MsvcReleaseRuntime; } } return NoMsvcRuntime; -- cgit v1.2.3 From 2890f2d0c7dd01c975f78120ac327c8895db4671 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 22 Jul 2015 16:12:00 +0200 Subject: macdeployqt: Fix typo in help output Change-Id: I4993a21c6544edf289e5ee6aa084647c4ad6e4b5 Reviewed-by: Friedemann Kleint --- src/macdeployqt/macdeployqt/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp index 3802a14a..40fc438a 100644 --- a/src/macdeployqt/macdeployqt/main.cpp +++ b/src/macdeployqt/macdeployqt/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char **argv) qDebug() << "the application uses."; qDebug() << ""; qDebug() << "Plugins related to a framework are copied in with the"; - qDebug() << "framework. The accessibilty, image formats, and text codec"; + qDebug() << "framework. The accessibility, image formats, and text codec"; qDebug() << "plugins are always copied, unless \"-no-plugins\" is specified."; qDebug() << ""; qDebug() << "See the \"Deploying an Application on Qt/Mac\" topic in the"; -- cgit v1.2.3 From 1993bf253f663e12572fc12b6d0d9100241d352a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 24 Jul 2015 11:17:59 +0200 Subject: windeployqt: Deploy MSVC debug runtime dlls instead of redist package. The redistributable package only contains the release mode DLLs, so it does not make sense for debug builds. Deploy DLLs instead for debug builds. [ChangeLog][windeployqt] windeployqt now deploys the MSVC debug mode runtime dlls instead of the redistributable package for debug builds. Change-Id: I84e0ec784c3dde72f206ce69dcaf1169d0fe0fef Reviewed-by: Joerg Bornemann --- src/windeployqt/main.cpp | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index 023f0dc4..f111df93 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -927,7 +927,7 @@ static QString libraryPath(const QString &libraryLocation, const char *name, return result; } -static QStringList compilerRunTimeLibs(Platform platform, unsigned wordSize) +static QStringList compilerRunTimeLibs(Platform platform, bool isDebug, unsigned wordSize) { QStringList result; switch (platform) { @@ -966,21 +966,33 @@ static QStringList compilerRunTimeLibs(Platform platform, unsigned wordSize) << QDir::toNativeSeparators(vcRedistDirName).toStdWString() << ".\n"; break; } - const QStringList countryCodes = vcRedistDir.entryList(QStringList(QStringLiteral("[0-9]*")), QDir::Dirs); - QString redist; - if (!countryCodes.isEmpty()) { - const QFileInfo fi(vcRedistDirName + slash + countryCodes.first() + slash - + QStringLiteral("vcredist_x") + QLatin1String(wordSize > 32 ? "64" : "86") - + QStringLiteral(".exe")); - if (fi.isFile()) - redist = fi.absoluteFilePath(); + QStringList redistFiles; + const QString wordSizeString(QLatin1String(wordSize > 32 ? "x64" : "x86")); + if (isDebug) { + // Append DLLs from Debug_NonRedist\x??\Microsoft.VC.DebugCRT. + if (vcRedistDir.cd(QLatin1String("Debug_NonRedist")) && vcRedistDir.cd(wordSizeString)) { + const QStringList names = vcRedistDir.entryList(QStringList(QStringLiteral("Microsoft.VC*.DebugCRT")), QDir::Dirs); + if (!names.isEmpty() && vcRedistDir.cd(names.first())) { + foreach (const QFileInfo &dll, vcRedistDir.entryInfoList(QStringList(QLatin1String("*.dll")))) + redistFiles.append(dll.absoluteFilePath()); + } + } + } else { // release: Bundle vcredist<>.exe + const QStringList countryCodes = vcRedistDir.entryList(QStringList(QStringLiteral("[0-9]*")), QDir::Dirs); + if (!countryCodes.isEmpty()) { + const QFileInfo fi(vcRedistDirName + slash + countryCodes.first() + slash + + QStringLiteral("vcredist_") + wordSizeString + + QStringLiteral(".exe")); + if (fi.isFile()) + redistFiles.append(fi.absoluteFilePath()); + } } - if (redist.isEmpty()) { - std::wcerr << "Warning: Cannot find Visual Studio redistributable in " - << QDir::toNativeSeparators(vcRedistDirName).toStdWString() << ".\n"; + if (redistFiles.isEmpty()) { + std::wcerr << "Warning: Cannot find Visual Studio " << (isDebug ? "debug" : "release") + << " redistributable files in " << QDir::toNativeSeparators(vcRedistDirName).toStdWString() << ".\n"; break; } - result.append(redist); + result.append(redistFiles); } default: break; @@ -1229,7 +1241,7 @@ static DeployResult deploy(const Options &options, options.directory : options.libraryDirectory; QStringList libraries = deployedQtLibraries; if (options.compilerRunTime) - libraries.append(compilerRunTimeLibs(options.platform, wordSize)); + libraries.append(compilerRunTimeLibs(options.platform, isDebug, wordSize)); foreach (const QString &qtLib, libraries) { if (!updateFile(qtLib, targetPath, options.updateFileFlags, options.json, errorMessage)) return result; -- cgit v1.2.3 From 6a5c7396a59f8e8e01335d389a15144d02a4c756 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 27 Jul 2015 15:52:30 +0200 Subject: windeployqt: Add QtWebChannel as a module that can be specified Change-Id: I76d7b871facf27af15036cfa48e4e7881a42aec2 Reviewed-by: Friedemann Kleint --- src/windeployqt/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index f111df93..753c5489 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -100,7 +100,8 @@ enum QtModule Qt3DQuickModule = 0x080000000000, Qt3DQuickRendererModule = 0x100000000000, Qt3DInputModule = 0x200000000000, - QtLocationModule = 0x400000000000 + QtLocationModule = 0x400000000000, + QtWebChannelModule = 0x800000000000 }; struct QtModuleEntry { @@ -156,7 +157,8 @@ QtModuleEntry qtModuleEntries[] = { { Qt3DQuickModule, "3dquick", "Qt53DQuick", 0 }, { Qt3DQuickRendererModule, "3dquickrenderer", "Qt53DQuickRenderer", 0 }, { Qt3DInputModule, "3dinput", "Qt53DInput", 0 }, - { QtLocationModule, "geoservices", "Qt5Location", 0 } + { QtLocationModule, "geoservices", "Qt5Location", 0 }, + { QtWebChannelModule, "webchannel", "Qt5WebChannel", 0 } }; static const char webKitProcessC[] = "QtWebProcess"; -- cgit v1.2.3 From 6e3375a9eb63383615536a3faae15102f93b451e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 27 Jul 2015 12:20:44 +0200 Subject: Prospective fix to make lupdate tests pass. Suppress the qmake message about creating a .stash file. This should fix failures like: FAIL! : tst_lupdate::good(heuristics) Output for /Users/qt/work/qt/qttools/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt does not meet expectations: <<<<<<< got Info: creating stash file /Users/qt/work/qt/qttools/tests/auto/linguist/lupdate/testdata/good/heuristics/.qmake.stash ========= >>>>>>> expected Change-Id: I1f7737e7f8463fcd92a4faf7f87a484de72d0921 Reviewed-by: Joerg Bornemann --- tests/auto/linguist/lupdate/tst_lupdate.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index 4138c641..04355761 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -60,7 +60,7 @@ private: QString m_cmdLupdate; QString m_basePath; - void doCompare(const QStringList &actual, const QString &expectedFn, bool err); + void doCompare(QStringList actual, const QString &expectedFn, bool err); void doCompare(const QString &actualFn, const QString &expectedFn, bool err); }; @@ -114,12 +114,17 @@ static bool prepareMatch(const QString &expect, QString *tmpl, int *require, int return true; } -void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn, bool err) +void tst_lupdate::doCompare(QStringList actual, const QString &expectedFn, bool err) { QFile file(expectedFn); QVERIFY2(file.open(QIODevice::ReadOnly | QIODevice::Text), qPrintable(expectedFn)); QStringList expected = QString(file.readAll()).split('\n'); + for (int i = actual.size() - 1; i >= 0; --i) { + if (actual.at(i).startsWith(QLatin1String("Info: creating stash file "))) + actual.removeAt(i); + } + int ei = 0, ai = 0, em = expected.size(), am = actual.size(); int oei = 0, oai = 0, oem = em, oam = am; int require = 0, accept = 0; -- cgit v1.2.3