summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-05 13:52:44 +0200
committerLiang Qi <liang.qi@qt.io>2016-09-05 13:52:44 +0200
commit781efbabf32e4438ae9c698ce498cc32cc900c57 (patch)
treefec14c84f9a61dc6579a78537f5e3daafdeab2e1
parent3c5fa29f78816d8cc7fd9fa6e9462e2a9f283f64 (diff)
parenta9e5e09f156b09c7f65e0b57fe191d71f9c1aa3e (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/qdoc/doc/qdoc-manual-markupcmds.qdoc Change-Id: I43e2d334a848397a2e619ad19aab66daff53d9b7
-rw-r--r--examples/assistant/doc/src/simpletextviewer.qdoc2
-rw-r--r--src/designer/src/designer/doc/src/designer-manual.qdoc2
-rw-r--r--src/designer/src/lib/shared/textpropertyeditor.cpp2
-rw-r--r--src/designer/src/lib/shared/widgetfactory.cpp34
-rw-r--r--src/qdoc/doc/images/qt-logo.pngbin1495 -> 1214 bytes
-rw-r--r--src/qdoc/doc/qdoc-manual-markupcmds.qdoc12
-rw-r--r--src/qdoc/doc/qdoc-manual-topiccmds.qdoc2
-rw-r--r--src/qdoc/main.cpp236
-rw-r--r--src/winrtrunner/appxengine.cpp17
9 files changed, 176 insertions, 131 deletions
diff --git a/examples/assistant/doc/src/simpletextviewer.qdoc b/examples/assistant/doc/src/simpletextviewer.qdoc
index d713365b9..7afef1a78 100644
--- a/examples/assistant/doc/src/simpletextviewer.qdoc
+++ b/examples/assistant/doc/src/simpletextviewer.qdoc
@@ -330,7 +330,7 @@
To start the process we need the executable name of \QA as well as the
command line arguments for running \QA in a customized mode. The
executable name is a little bit tricky since it depends on the
- platform, but fortunately it is only different on OS X.
+ platform, but fortunately it is only different on \macos.
The displayed documentation can be altered using the \c -collectionFile
command line argument when launching \QA. When started without any options,
diff --git a/src/designer/src/designer/doc/src/designer-manual.qdoc b/src/designer/src/designer/doc/src/designer-manual.qdoc
index 1d6b07d96..39d0d5451 100644
--- a/src/designer/src/designer/doc/src/designer-manual.qdoc
+++ b/src/designer/src/designer/doc/src/designer-manual.qdoc
@@ -800,7 +800,7 @@
\table
\header
\li Windows XP
- \li OS X
+ \li \macos
\li Cleanlooks
\row
\li \inlineimage designer-form-layout-windowsXP.png
diff --git a/src/designer/src/lib/shared/textpropertyeditor.cpp b/src/designer/src/lib/shared/textpropertyeditor.cpp
index 7d3c1d8e9..a1667d6e0 100644
--- a/src/designer/src/lib/shared/textpropertyeditor.cpp
+++ b/src/designer/src/lib/shared/textpropertyeditor.cpp
@@ -265,7 +265,7 @@ namespace qdesigner_internal {
urlCompletions.push_back(QStringLiteral("about:blank"));
urlCompletions.push_back(QStringLiteral("http://"));
urlCompletions.push_back(QStringLiteral("http://www."));
- urlCompletions.push_back(QStringLiteral("http://qt-project.org/"));
+ urlCompletions.push_back(QStringLiteral("http://qt.io"));
urlCompletions.push_back(QStringLiteral("file://"));
urlCompletions.push_back(QStringLiteral("ftp://"));
urlCompletions.push_back(QStringLiteral("data:"));
diff --git a/src/designer/src/lib/shared/widgetfactory.cpp b/src/designer/src/lib/shared/widgetfactory.cpp
index 295665d00..be7ca4bc9 100644
--- a/src/designer/src/lib/shared/widgetfactory.cpp
+++ b/src/designer/src/lib/shared/widgetfactory.cpp
@@ -237,6 +237,25 @@ QObject* WidgetFactory::createObject(const QString &className, QObject* parent)
return 0;
}
+// Check for mismatched class names in plugins, which is hard to track.
+static bool classNameMatches(const QObject *created, const QString &className)
+{
+#ifdef Q_OS_WIN
+ // Perform literal comparison first for QAxWidget, for which a meta object hack is in effect.
+ if (isAxWidget(created))
+ return true;
+#endif
+ const char *createdClassNameC = created->metaObject()->className();
+ const QByteArray classNameB = className.toUtf8();
+ const char *classNameC = classNameB.constData();
+ if (qstrcmp(createdClassNameC, classNameC) == 0 || created->inherits(classNameC))
+ return true;
+ // QTBUG-53984: QWebEngineView property dummy
+ if (classNameB == "QWebEngineView" && qstrcmp(createdClassNameC, "fake::QWebEngineView") == 0)
+ return true;
+ return false;
+}
+
QWidget* WidgetFactory::createCustomWidget(const QString &className, QWidget *parentWidget, bool *creationError) const
{
*creationError = false;
@@ -282,19 +301,12 @@ QWidget* WidgetFactory::createCustomWidget(const QString &className, QWidget *p
if (lang)
return rc;
-#ifdef Q_OS_WIN
- if (isAxWidget(rc))
- return rc;
-#endif
// Check for mismatched class names which is hard to track.
- // Perform literal comparison first for QAxWidget, for which a meta object hack is in effect.
- const char *createdClassNameC = rc->metaObject()->className();
- const QByteArray classNameB = className.toUtf8();
- const char *classNameC = classNameB.constData();
-
- if (qstrcmp(createdClassNameC, classNameC) && !rc->inherits(classNameC))
+ if (!classNameMatches(rc, className)) {
designerWarning(tr("A class name mismatch occurred when creating a widget using the custom widget factory registered for widgets of class %1."
- " It returned a widget of class %2.").arg(className).arg(QString::fromUtf8(createdClassNameC)));
+ " It returned a widget of class %2.")
+ .arg(className, QString::fromUtf8(rc->metaObject()->className())));
+ }
return rc;
}
diff --git a/src/qdoc/doc/images/qt-logo.png b/src/qdoc/doc/images/qt-logo.png
index 6b72d5fb7..b63f1384b 100644
--- a/src/qdoc/doc/images/qt-logo.png
+++ b/src/qdoc/doc/images/qt-logo.png
Binary files differ
diff --git a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
index 2b78aef4e..8a3bf75a1 100644
--- a/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-markupcmds.qdoc
@@ -2187,7 +2187,7 @@
\image happyguy.jpg "Happy guy"
Qt provides single-source portability across Microsoft
- Windows, OS X, Linux, and all major commercial Unix
+ Windows, macOS, Linux, and all major commercial Unix
variants. It is also available for embedded devices.
* /
\endcode
@@ -2200,7 +2200,7 @@
\image happyguy.jpg image "Happy guy"
Qt provides single-source portability across Microsoft
- Windows, OS X, Linux, and all major commercial Unix
+ Windows, macOS, Linux, and all major commercial Unix
variants. It is also available for embedded devices.
\endquotation
@@ -3291,7 +3291,7 @@
/ *!
Qt::HANDLE is a platform-specific handle type
for system objects. This is equivalent to
- \c{void *} on Windows and OS X, and to
+ \c{void *} on Windows and macOS, and to
\c{unsigned long} on X11.
\warning Using this type is not portable.
@@ -3303,7 +3303,7 @@
\quotation
Qt::HANDLE is a platform-specific handle type
for system objects. This is equivalent to
- \c{void *} on Windows and OS X, and to
+ \c{void *} on Windows and macOS, and to
\c{unsigned long} on X11.
\warning Using this type is not portable.
@@ -3871,7 +3871,7 @@
\ingroup basicwidgets
\meta {technology} {User Interface}
- \meta {platform} {OS X 10.6}
+ \meta {platform} {macOS 10.6}
\meta {platform} {MeeGo}
\meta {audience} {user}
\meta {audience} {programmer}
@@ -3911,7 +3911,7 @@
<component>QtGui</component>
</prodinfo>
<othermeta name="platform" content="MeeGo"/>
- <othermeta name="platform" content="OS X 10.6"/>
+ <othermeta name="platform" content="macOS 10.6"/>
<othermeta name="technology" content="User Interface"/>
</metadata>
</prolog>
diff --git a/src/qdoc/doc/qdoc-manual-topiccmds.qdoc b/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
index fa468d83a..9fd97457d 100644
--- a/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
+++ b/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
@@ -950,7 +950,7 @@
Qt is a C++ toolkit for cross-platform GUI
application development. Qt provides single-source
- portability across Microsoft Windows, OS X, Linux,
+ portability across Microsoft Windows, macOS, Linux,
and all major commercial Unix variants.
Qt provides application developers with all the
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp
index dfdd9a84d..f78c59822 100644
--- a/src/qdoc/main.cpp
+++ b/src/qdoc/main.cpp
@@ -522,168 +522,157 @@ static void processQdocconfFile(const QString &fileName)
Generator::debug("qdoc classes terminated");
}
-extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed;
-QT_END_NAMESPACE
-
-int main(int argc, char **argv)
+class QDocCommandLineParser : public QCommandLineParser
{
- QT_USE_NAMESPACE
-
-#ifndef QT_BOOTSTRAPPED
- qt_qhash_seed.testAndSetRelaxed(-1, 0); // set the hash seed to 0 if it wasn't set yet
-#endif
- QCoreApplication app(argc, argv);
- app.setApplicationVersion(QStringLiteral(QT_VERSION_STR));
-
- /*
- Create code parsers for the languages to be parsed,
- and create a tree for C++.
- */
- CppCodeParser cppParser;
- QmlCodeParser qmlParser;
- PureDocParser docParser;
-
- /*
- Create code markers for plain text, C++,
- javascript, and QML.
- */
- PlainCodeMarker plainMarker;
- CppCodeMarker cppMarker;
- JsCodeMarker jsMarker;
- QmlCodeMarker qmlMarker;
-
- HtmlGenerator htmlGenerator;
-
- QCommandLineParser parser;
- parser.setApplicationDescription(QCoreApplication::translate("qdoc", "Qt documentation generator"));
- parser.addHelpOption();
- parser.addVersionOption();
+public:
+ QDocCommandLineParser();
+ void process(const QCoreApplication &app);
+
+private:
+ QCommandLineOption defineOption, dependsOption, highlightingOption;
+ QCommandLineOption showInternalOption, redirectDocumentationToDevNullOption;
+ QCommandLineOption noExamplesOption, indexDirOption, installDirOption;
+ QCommandLineOption obsoleteLinksOption, outputDirOption, outputFormatOption;
+ QCommandLineOption noLinkErrorsOption, autoLinkErrorsOption, debugOption;
+ QCommandLineOption prepareOption, generateOption, logProgressOption;
+ QCommandLineOption singleExecOption, writeQaPagesOption;
+};
+
+QDocCommandLineParser::QDocCommandLineParser()
+ : QCommandLineParser(),
+ defineOption(QStringList() << QStringLiteral("D")),
+ dependsOption(QStringList() << QStringLiteral("depends")),
+ highlightingOption(QStringList() << QStringLiteral("highlighting")),
+ showInternalOption(QStringList() << QStringLiteral("showinternal")),
+ redirectDocumentationToDevNullOption(QStringList() << QStringLiteral("redirect-documentation-to-dev-null")),
+ noExamplesOption(QStringList() << QStringLiteral("no-examples")),
+ indexDirOption(QStringList() << QStringLiteral("indexdir")),
+ installDirOption(QStringList() << QStringLiteral("installdir")),
+ obsoleteLinksOption(QStringList() << QStringLiteral("obsoletelinks")),
+ outputDirOption(QStringList() << QStringLiteral("outputdir")),
+ outputFormatOption(QStringList() << QStringLiteral("outputformat")),
+ noLinkErrorsOption(QStringList() << QStringLiteral("no-link-errors")),
+ autoLinkErrorsOption(QStringList() << QStringLiteral("autolink-errors")),
+ debugOption(QStringList() << QStringLiteral("debug")),
+ prepareOption(QStringList() << QStringLiteral("prepare")),
+ generateOption(QStringList() << QStringLiteral("generate")),
+ logProgressOption(QStringList() << QStringLiteral("log-progress")),
+ singleExecOption(QStringList() << QStringLiteral("single-exec")),
+ writeQaPagesOption(QStringList() << QStringLiteral("write-qa-pages"))
+{
+ setApplicationDescription(QCoreApplication::translate("qdoc", "Qt documentation generator"));
+ addHelpOption();
+ addVersionOption();
- parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
+ setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
- parser.addPositionalArgument("file1.qdocconf ...", QCoreApplication::translate("qdoc", "Input files"));
+ addPositionalArgument("file1.qdocconf ...", QCoreApplication::translate("qdoc", "Input files"));
- QCommandLineOption defineOption(QStringList() << QStringLiteral("D"));
defineOption.setDescription(QCoreApplication::translate("qdoc", "Define the argument as a macro while parsing sources"));
defineOption.setValueName(QStringLiteral("macro[=def]"));
- parser.addOption(defineOption);
+ addOption(defineOption);
- QCommandLineOption dependsOption(QStringList() << QStringLiteral("depends"));
dependsOption.setDescription(QCoreApplication::translate("qdoc", "Specify dependent modules"));
dependsOption.setValueName(QStringLiteral("module"));
- parser.addOption(dependsOption);
+ addOption(dependsOption);
- QCommandLineOption highlightingOption(QStringList() << QStringLiteral("highlighting"));
highlightingOption.setDescription(QCoreApplication::translate("qdoc", "Turn on syntax highlighting (makes qdoc run slower)"));
- parser.addOption(highlightingOption);
+ addOption(highlightingOption);
- QCommandLineOption showInternalOption(QStringList() << QStringLiteral("showinternal"));
showInternalOption.setDescription(QCoreApplication::translate("qdoc", "Include content marked internal"));
- parser.addOption(showInternalOption);
+ addOption(showInternalOption);
- QCommandLineOption redirectDocumentationToDevNullOption(QStringList() << QStringLiteral("redirect-documentation-to-dev-null"));
redirectDocumentationToDevNullOption.setDescription(QCoreApplication::translate("qdoc", "Save all documentation content to /dev/null. Useful if someone is interested in qdoc errors only."));
- parser.addOption(redirectDocumentationToDevNullOption);
+ addOption(redirectDocumentationToDevNullOption);
- QCommandLineOption noExamplesOption(QStringList() << QStringLiteral("no-examples"));
noExamplesOption.setDescription(QCoreApplication::translate("qdoc", "Do not generate documentation for examples"));
- parser.addOption(noExamplesOption);
+ addOption(noExamplesOption);
- QCommandLineOption indexDirOption(QStringList() << QStringLiteral("indexdir"));
indexDirOption.setDescription(QCoreApplication::translate("qdoc", "Specify a directory where QDoc should search for index files to load"));
indexDirOption.setValueName(QStringLiteral("dir"));
- parser.addOption(indexDirOption);
+ addOption(indexDirOption);
- QCommandLineOption installDirOption(QStringList() << QStringLiteral("installdir"));
installDirOption.setDescription(QCoreApplication::translate("qdoc", "Specify the directory where the output will be after running \"make install\""));
installDirOption.setValueName(QStringLiteral("dir"));
- parser.addOption(installDirOption);
+ addOption(installDirOption);
- QCommandLineOption obsoleteLinksOption(QStringList() << QStringLiteral("obsoletelinks"));
obsoleteLinksOption.setDescription(QCoreApplication::translate("qdoc", "Report links from obsolete items to non-obsolete items"));
- parser.addOption(obsoleteLinksOption);
+ addOption(obsoleteLinksOption);
- QCommandLineOption outputDirOption(QStringList() << QStringLiteral("outputdir"));
outputDirOption.setDescription(QCoreApplication::translate("qdoc", "Specify output directory, overrides setting in qdocconf file"));
outputDirOption.setValueName(QStringLiteral("dir"));
- parser.addOption(outputDirOption);
+ addOption(outputDirOption);
- QCommandLineOption outputFormatOption(QStringList() << QStringLiteral("outputformat"));
outputFormatOption.setDescription(QCoreApplication::translate("qdoc", "Specify output format, overrides setting in qdocconf file"));
outputFormatOption.setValueName(QStringLiteral("format"));
- parser.addOption(outputFormatOption);
+ addOption(outputFormatOption);
- QCommandLineOption noLinkErrorsOption(QStringList() << QStringLiteral("no-link-errors"));
noLinkErrorsOption.setDescription(QCoreApplication::translate("qdoc", "Do not print link errors (i.e. missing targets)"));
- parser.addOption(noLinkErrorsOption);
+ addOption(noLinkErrorsOption);
- QCommandLineOption autoLinkErrorsOption(QStringList() << QStringLiteral("autolink-errors"));
autoLinkErrorsOption.setDescription(QCoreApplication::translate("qdoc", "Show errors when automatic linking fails"));
- parser.addOption(autoLinkErrorsOption);
+ addOption(autoLinkErrorsOption);
- QCommandLineOption debugOption(QStringList() << QStringLiteral("debug"));
debugOption.setDescription(QCoreApplication::translate("qdoc", "Enable debug output"));
- parser.addOption(debugOption);
+ addOption(debugOption);
- QCommandLineOption prepareOption(QStringList() << QStringLiteral("prepare"));
prepareOption.setDescription(QCoreApplication::translate("qdoc", "Run qdoc only to generate an index file, not the docs"));
- parser.addOption(prepareOption);
+ addOption(prepareOption);
- QCommandLineOption generateOption(QStringList() << QStringLiteral("generate"));
generateOption.setDescription(QCoreApplication::translate("qdoc", "Run qdoc to read the index files and generate the docs"));
- parser.addOption(generateOption);
+ addOption(generateOption);
- QCommandLineOption logProgressOption(QStringList() << QStringLiteral("log-progress"));
logProgressOption.setDescription(QCoreApplication::translate("qdoc", "Log progress on stderr."));
- parser.addOption(logProgressOption);
+ addOption(logProgressOption);
- QCommandLineOption singleExecOption(QStringList() << QStringLiteral("single-exec"));
singleExecOption.setDescription(QCoreApplication::translate("qdoc", "Run qdoc once over all the qdoc conf files."));
- parser.addOption(singleExecOption);
+ addOption(singleExecOption);
- QCommandLineOption writeQaPagesOption(QStringList() << QStringLiteral("write-qa-pages"));
writeQaPagesOption.setDescription(QCoreApplication::translate("qdoc", "Write QA pages."));
- parser.addOption(writeQaPagesOption);
-
- parser.process(app);
+ addOption(writeQaPagesOption);
+}
- defines += parser.values(defineOption);
- dependModules += parser.values(dependsOption);
- highlighting = parser.isSet(highlightingOption);
- showInternal = parser.isSet(showInternalOption);
- singleExec = parser.isSet(singleExecOption);
- writeQaPages = parser.isSet(writeQaPagesOption);
- redirectDocumentationToDevNull = parser.isSet(redirectDocumentationToDevNullOption);
- Config::generateExamples = !parser.isSet(noExamplesOption);
- foreach (const QString &indexDir, parser.values(indexDirOption)) {
+void QDocCommandLineParser::process(const QCoreApplication &app)
+{
+ QCommandLineParser::process(app);
+
+ defines += values(defineOption);
+ dependModules += values(dependsOption);
+ highlighting = isSet(highlightingOption);
+ showInternal = isSet(showInternalOption);
+ singleExec = isSet(singleExecOption);
+ writeQaPages = isSet(writeQaPagesOption);
+ redirectDocumentationToDevNull = isSet(redirectDocumentationToDevNullOption);
+ Config::generateExamples = !isSet(noExamplesOption);
+ foreach (const QString &indexDir, values(indexDirOption)) {
if (QFile::exists(indexDir))
indexDirs += indexDir;
else
qDebug() << "Cannot find index directory" << indexDir;
}
- if (parser.isSet(installDirOption))
- Config::installDir = parser.value(installDirOption);
- obsoleteLinks = parser.isSet(obsoleteLinksOption);
- if (parser.isSet(outputDirOption))
- Config::overrideOutputDir = parser.value(outputDirOption);
- foreach (const QString &format, parser.values(outputFormatOption))
+ if (isSet(installDirOption))
+ Config::installDir = value(installDirOption);
+ obsoleteLinks = isSet(obsoleteLinksOption);
+ if (isSet(outputDirOption))
+ Config::overrideOutputDir = value(outputDirOption);
+ foreach (const QString &format, values(outputFormatOption))
Config::overrideOutputFormats.insert(format);
- noLinkErrors = parser.isSet(noLinkErrorsOption);
- autolinkErrors = parser.isSet(autoLinkErrorsOption);
- if (parser.isSet(debugOption))
+ noLinkErrors = isSet(noLinkErrorsOption);
+ autolinkErrors = isSet(autoLinkErrorsOption);
+ if (isSet(debugOption))
Generator::startDebugging(QString("command line"));
- if (parser.isSet(prepareOption))
+ if (isSet(prepareOption))
Generator::setQDocPass(Generator::Prepare);
- if (parser.isSet(generateOption))
+ if (isSet(generateOption))
Generator::setQDocPass(Generator::Generate);
- if (parser.isSet(singleExecOption)) {
+ if (isSet(singleExecOption)) {
Generator::setSingleExec();
- if (parser.isSet(indexDirOption))
+ if (isSet(indexDirOption))
qDebug() << "WARNING: -indexdir option ignored: Index files are not used in -single-exec mode.";
}
- if (parser.isSet(writeQaPagesOption))
+ if (isSet(writeQaPagesOption))
Generator::setWriteQaPages();
- if (parser.isSet(logProgressOption))
+ if (isSet(logProgressOption))
Location::startLoggingProgress();
/*
@@ -703,7 +692,47 @@ int main(int argc, char **argv)
defaults.insert(CONFIG_OUTPUTFORMATS, QLatin1String("HTML"));
defaults.insert(CONFIG_TABSIZE, QLatin1String("8"));
}
+}
+extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed;
+QT_END_NAMESPACE
+
+int main(int argc, char **argv)
+{
+ QT_USE_NAMESPACE
+
+ // Initialize Qt:
+#ifndef QT_BOOTSTRAPPED
+ qt_qhash_seed.testAndSetRelaxed(-1, 0); // set the hash seed to 0 if it wasn't set yet
+#endif
+ QCoreApplication app(argc, argv);
+ app.setApplicationVersion(QLatin1String(QT_VERSION_STR));
+
+ // Instantiate various singletons (used via static methods):
+ /*
+ Create code parsers for the languages to be parsed,
+ and create a tree for C++.
+ */
+ CppCodeParser cppParser;
+ QmlCodeParser qmlParser;
+ PureDocParser docParser;
+
+ /*
+ Create code markers for plain text, C++,
+ javascript, and QML.
+ */
+ PlainCodeMarker plainMarker;
+ CppCodeMarker cppMarker;
+ JsCodeMarker jsMarker;
+ QmlCodeMarker qmlMarker;
+
+ HtmlGenerator htmlGenerator;
+
+ // Set the globals declared at the top of this file:
+ QDocCommandLineParser parser;
+ parser.process(app);
+
+ // Get the list of files to act on:
QStringList qdocFiles = parser.positionalArguments();
if (qdocFiles.isEmpty())
parser.showHelp();
@@ -711,9 +740,7 @@ int main(int argc, char **argv)
if (singleExec)
qdocFiles = Config::loadMaster(qdocFiles.at(0));
- /*
- Main loop is now modified to handle single exec mode.
- */
+ // Main loop (adapted, when needed, to handle single exec mode):
if (Generator::singleExec())
Generator::setQDocPass(Generator::Prepare);
foreach (const QString &qf, qdocFiles) {
@@ -730,6 +757,7 @@ int main(int argc, char **argv)
}
}
+ // Tidy everything away:
#ifndef QT_NO_TRANSLATION
if (!translators.isEmpty()) {
for (int i=0; i<translators.size(); ++i) {
diff --git a/src/winrtrunner/appxengine.cpp b/src/winrtrunner/appxengine.cpp
index dfdd7d0db..d8322d1ca 100644
--- a/src/winrtrunner/appxengine.cpp
+++ b/src/winrtrunner/appxengine.cpp
@@ -668,14 +668,19 @@ bool AppxEngine::createPackage(const QString &packageFileName)
qCWarning(lcWinRtRunner) << "No mapping file exists. Only recognized files will be packaged.";
// Add executable
files.insert(QDir::toNativeSeparators(d->executable), QFileInfo(d->executable).fileName());
- // Add potential Qt files
- const QStringList fileTypes = QStringList()
- << QStringLiteral("*.dll") << QStringLiteral("*.png") << QStringLiteral("*.qm")
- << QStringLiteral("*.qml") << QStringLiteral("*.qmldir");
- QDirIterator dirIterator(base.absolutePath(), fileTypes, QDir::Files, QDirIterator::Subdirectories);
+ // Add all files but filtered artifacts
+ const QStringList excludeFileTypes = QStringList()
+ << QStringLiteral("ilk") << QStringLiteral("pdb") << QStringLiteral("obj")
+ << QStringLiteral("appx");
+
+ QDirIterator dirIterator(base.absolutePath(), QDir::Files, QDirIterator::Subdirectories);
while (dirIterator.hasNext()) {
const QString filePath = dirIterator.next();
- files.insert(QDir::toNativeSeparators(filePath), QDir::toNativeSeparators(base.relativeFilePath(filePath)));
+ if (filePath.endsWith(QLatin1String("AppxManifest.xml"), Qt::CaseInsensitive))
+ continue;
+ const QFileInfo fileInfo(filePath);
+ if (!excludeFileTypes.contains(fileInfo.suffix()))
+ files.insert(QDir::toNativeSeparators(filePath), QDir::toNativeSeparators(base.relativeFilePath(filePath)));
}
}