aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlmin/main.cpp8
-rw-r--r--tools/qmlplugindump/main.cpp10
-rw-r--r--tools/qmlscene/main.cpp12
3 files changed, 16 insertions, 14 deletions
diff --git a/tools/qmlmin/main.cpp b/tools/qmlmin/main.cpp
index a8ebf12333..e3e81985a1 100644
--- a/tools/qmlmin/main.cpp
+++ b/tools/qmlmin/main.cpp
@@ -352,13 +352,7 @@ bool Minify::parse(int startToken)
if (isIdentChar(lastChar))
assembled += QLatin1Char(' ');
- foreach (const QChar &ch, identifier) {
- if (isIdentChar(ch))
- assembled += ch;
- else {
- escape(ch, &assembled);
- }
- }
+ assembled += identifier;
} else if (yytoken == T_STRING_LITERAL || yytoken == T_MULTILINE_STRING_LITERAL) {
assembled += QLatin1Char('"');
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index b5ee08ddd3..e05c77cbfa 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -184,11 +184,13 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine, const
QHash<QByteArray, QSet<QByteArray> > extensions;
foreach (const QQmlType *ty, QQmlMetaType::qmlTypes()) {
- qmlTypesByCppName[ty->metaObject()->className()].insert(ty);
- if (ty->isExtendedType()) {
- extensions[ty->typeName()].insert(ty->metaObject()->className());
+ if (!ty->isComposite()) {
+ qmlTypesByCppName[ty->metaObject()->className()].insert(ty);
+ if (ty->isExtendedType())
+ extensions[ty->typeName()].insert(ty->metaObject()->className());
+ collectReachableMetaObjects(ty, &metas);
}
- collectReachableMetaObjects(ty, &metas);
+ // TODO actually handle composite types
}
// Adjust exports of the base object if there are extensions.
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index a9a907f648..1e7c6e13de 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -152,6 +152,7 @@ struct Options
, slowAnimations(false)
, quitImmediately(false)
, resizeViewToRootItem(false)
+ , multisample(false)
{
}
@@ -167,6 +168,7 @@ struct Options
bool slowAnimations;
bool quitImmediately;
bool resizeViewToRootItem;
+ bool multisample;
QString translationFile;
};
@@ -349,7 +351,7 @@ static void usage()
qWarning(" --maximized ............................... Run maximized");
qWarning(" --fullscreen .............................. Run fullscreen");
qWarning(" --transparent ............................. Make the window transparent");
- qWarning(" --no-multisample .......................... Disable multisampling (anti-aliasing)");
+ qWarning(" --multisample ............................. Enable multisampling (OpenGL anti-aliasing)");
qWarning(" --no-version-detection .................... Do not try to detect the version of the .qml file");
qWarning(" --slow-animations ......................... Run all animations in slow motion");
qWarning(" --resize-to-root .......................... Resize the window to the size of the root item");
@@ -391,6 +393,8 @@ int main(int argc, char ** argv)
options.translationFile = QLatin1String(argv[++i]);
else if (lowerArgument == QLatin1String("--resize-to-root"))
options.resizeViewToRootItem = true;
+ else if (lowerArgument == QLatin1String("--multisample"))
+ options.multisample = true;
else if (lowerArgument == QLatin1String("-i") && i + 1 < argc)
imports.append(QString::fromLatin1(argv[++i]));
else if (lowerArgument == QLatin1String("-b") && i + 2 < argc) {
@@ -497,14 +501,16 @@ int main(int argc, char ** argv)
}
if (window) {
+ QSurfaceFormat surfaceFormat = window->requestedFormat();
+ if (options.multisample)
+ surfaceFormat.setSamples(16);
if (options.transparent) {
- QSurfaceFormat surfaceFormat;
surfaceFormat.setAlphaBufferSize(8);
- window->setFormat(surfaceFormat);
window->setClearBeforeRendering(true);
window->setColor(QColor(Qt::transparent));
window->setFlags(Qt::FramelessWindowHint);
}
+ window->setFormat(surfaceFormat);
if (options.fullscreen)
window->showFullScreen();