aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-09-08 11:04:30 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-09-08 11:04:30 +0200
commitbde8c3cd9583ed9f3bdfc36a8699f56db20a6928 (patch)
tree33246b027739aafd72f9f289876f69627537f2b3 /tools
parentb63bc868875d7571bc332804f984824cff7c5b78 (diff)
parent685ad676a84bf48602a5da8f7171792686b94a73 (diff)
Merge remote-tracking branch 'origin/dev' into wip/new-backend
Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir.cpp src/qml/jsruntime/qv4mathobject.cpp Change-Id: I426f1f4f0a5302b5bcff021de11766a03fec7637
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlimportscanner/main.cpp4
-rw-r--r--tools/qmlplugindump/main.cpp2
-rw-r--r--tools/qmlscene/main.cpp20
3 files changed, 23 insertions, 3 deletions
diff --git a/tools/qmlimportscanner/main.cpp b/tools/qmlimportscanner/main.cpp
index 26a83395c8..9ab058d37b 100644
--- a/tools/qmlimportscanner/main.cpp
+++ b/tools/qmlimportscanner/main.cpp
@@ -404,7 +404,7 @@ QVariantList findQmlImportsInDirectory(const QString &qmlDir)
if (qmlDir.isEmpty())
return ret;
- QDirIterator iterator(qmlDir, QDir::AllDirs | QDir::NoDotDot, QDirIterator::Subdirectories);
+ QDirIterator iterator(qmlDir, QDir::AllDirs | QDir::NoDot | QDir::NoDotDot, QDirIterator::Subdirectories);
QStringList blacklist;
while (iterator.hasNext()) {
@@ -425,7 +425,7 @@ QVariantList findQmlImportsInDirectory(const QString &qmlDir)
if (path.contains(QLatin1String("Debug-iphoneos")) || path.contains(QLatin1String("Release-iphoneos")) ||
path.contains(QLatin1String("Debug-iphonesimulator")) || path.contains(QLatin1String("Release-iphonesimulator"))
#ifdef Q_OS_WIN
- || path.contains(QLatin1String("/release/")) || path.contains(QLatin1String("/debug/"))
+ || path.endsWith(QLatin1String("/release")) || path.endsWith(QLatin1String("/debug"))
#endif
){
continue;
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 2b919909ac..79f9b2c49b 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -999,7 +999,7 @@ int main(int argc, char *argv[])
// Check which kind of application should be instantiated.
bool useQApplication = false;
for (int i = 0; i < argc; ++i) {
- QString arg = QLatin1String(argv[1]);
+ QString arg = QLatin1String(argv[i]);
if (arg == QLatin1String("--qapp") || arg == QLatin1String("-qapp"))
useQApplication = true;
}
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index f411c6becc..fc8b9c5292 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -159,6 +159,7 @@ struct Options
, coreProfile(false)
, verbose(false)
, applicationType(DefaultQmlApplicationType)
+ , textRenderType(QQuickWindow::textRenderType())
{
// QtWebEngine needs a shared context in order for the GPU thread to
// upload textures.
@@ -182,6 +183,7 @@ struct Options
QVector<Qt::ApplicationAttribute> applicationAttributes;
QString translationFile;
QmlApplicationType applicationType;
+ QQuickWindow::TextRenderType textRenderType;
};
#if defined(QMLSCENE_BUNDLE)
@@ -377,6 +379,7 @@ static void usage()
#ifdef QT_WIDGETS_LIB
puts(" --apptype [gui|widgets] ...........Select which application class to use. Default is widgets.");
#endif
+ puts(" --textrendertype [qt|native].......Select the default render type for text-like elements.");
puts(" -I <path> ........................ Add <path> to the list of import paths");
puts(" -P <path> ........................ Add <path> to the list of plugin paths");
puts(" -translation <translationfile> ... Set the language to run in");
@@ -456,6 +459,19 @@ static QUrl parseUrlArgument(const QString &arg)
return url;
}
+static QQuickWindow::TextRenderType parseTextRenderType(const QString &renderType)
+{
+ if (renderType == QLatin1String("qt"))
+ return QQuickWindow::QtTextRendering;
+ else if (renderType == QLatin1String("native"))
+ return QQuickWindow::NativeTextRendering;
+
+ usage();
+
+ Q_UNREACHABLE();
+ return QQuickWindow::QtTextRendering;
+}
+
int main(int argc, char ** argv)
{
Options options;
@@ -536,6 +552,8 @@ int main(int argc, char ** argv)
pluginPaths.append(arguments.at(++i));
else if (lowerArgument == QLatin1String("--apptype"))
++i; // Consume previously parsed argument
+ else if (lowerArgument == QLatin1String("--textrendertype") && i + 1 < size)
+ options.textRenderType = parseTextRenderType(arguments.at(++i));
else if (lowerArgument == QLatin1String("--help")
|| lowerArgument == QLatin1String("-help")
|| lowerArgument == QLatin1String("--h")
@@ -564,6 +582,8 @@ int main(int argc, char ** argv)
}
#endif
+ QQuickWindow::setTextRenderType(options.textRenderType);
+
QUnifiedTimer::instance()->setSlowModeEnabled(options.slowAnimations);
if (options.url.isEmpty())