summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-28 10:06:48 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-28 10:07:06 +0200
commitaba60cea1dea291dd24fafa2538aa7922686dd39 (patch)
treec45ad26057608b2ab000f94b0d511f85a0c1eb32
parentf23befda718870f3dbb8f6e005e12a251fdfd059 (diff)
parent6e3375a9eb63383615536a3faae15102f93b451e (diff)
downloadqttools-aba60cea1dea291dd24fafa2538aa7922686dd39.tar.gz
qttools-aba60cea1dea291dd24fafa2538aa7922686dd39.tar.bz2
qttools-aba60cea1dea291dd24fafa2538aa7922686dd39.zip
Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: Ib9420b128e30984aebf1f8eba8c0496e3913e69f
-rw-r--r--src/macdeployqt/macdeployqt/main.cpp2
-rw-r--r--src/shared/qtgradienteditor/qtgradienteditor.cpp6
-rw-r--r--src/windeployqt/main.cpp56
-rw-r--r--src/windeployqt/utils.cpp21
-rw-r--r--tests/auto/linguist/lupdate/tst_lupdate.cpp9
5 files changed, 60 insertions, 34 deletions
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";
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<const QLinearGradient *>(&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<const QRadialGradient *>(&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<const QConicalGradient *>(&grad);
d_ptr->setCentralConical(gr->center());
d_ptr->setAngleConical(gr->angle());
d_ptr->m_ui.gradientWidget->setCentralConical(gr->center());
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp
index 8414a9af..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 {
@@ -155,8 +156,9 @@ QtModuleEntry qtModuleEntries[] = {
{ Qt3DRendererModule, "3drenderer", "Qt53DRenderer", 0 },
{ Qt3DQuickModule, "3dquick", "Qt53DQuick", 0 },
{ Qt3DQuickRendererModule, "3dquickrenderer", "Qt53DQuickRenderer", 0 },
- { Qt3DInputModule, "3dinput", "Qt35DInput", 0 },
- { QtLocationModule, "geoservices", "Qt5Location", 0 }
+ { Qt3DInputModule, "3dinput", "Qt53DInput", 0 },
+ { QtLocationModule, "geoservices", "Qt5Location", 0 },
+ { QtWebChannelModule, "webchannel", "Qt5WebChannel", 0 }
};
static const char webKitProcessC[] = "QtWebProcess";
@@ -721,7 +723,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"))
@@ -926,7 +929,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) {
@@ -965,21 +968,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<version>.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;
@@ -1228,7 +1243,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;
@@ -1327,7 +1342,10 @@ static bool deployWebProcess(const QMap<QString, QString> &qmakeVariables,
static bool deployWebEngine(const QMap<QString, QString> &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)) {
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;
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;