diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qml/main.cpp | 7 | ||||
-rw-r--r-- | tools/qml/qml.icns | bin | 196156 -> 0 bytes | |||
-rw-r--r-- | tools/qml/qml.pro | 10 | ||||
-rw-r--r-- | tools/qml/qml.qrc | 1 | ||||
-rw-r--r-- | tools/qml/resources/Info.plist (renamed from tools/qml/Info.plist) | 0 | ||||
-rw-r--r-- | tools/qml/resources/qml-64.png | bin | 0 -> 2304 bytes | |||
-rw-r--r-- | tools/qml/resources/qml.icns | bin | 0 -> 194026 bytes | |||
-rw-r--r-- | tools/qml/resources/qml.ico | bin | 0 -> 124455 bytes | |||
-rw-r--r-- | tools/qmlscene/main.cpp | 7 |
9 files changed, 21 insertions, 4 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 7dfae2b53d..8918de57d4 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -77,6 +77,7 @@ static QQmlApplicationEngine *qae = nullptr; static int exitTimerId = -1; #endif bool verboseMode = false; +static const QString iconResourcePath(QStringLiteral(":/qt-project.org/QmlRuntime/resources/qml-64.png")); static void loadConf(const QString &override, bool quiet) // Terminates app on failure { @@ -134,7 +135,10 @@ void noFilesGiven(); class LoaderApplication : public QGuiApplication { public: - LoaderApplication(int& argc, char **argv) : QGuiApplication(argc, argv) {} + LoaderApplication(int& argc, char **argv) : QGuiApplication(argc, argv) + { + setWindowIcon(QIcon(iconResourcePath)); + } bool event(QEvent *ev) override { @@ -450,6 +454,7 @@ int main(int argc, char *argv[]) #ifdef QT_WIDGETS_LIB case QmlApplicationTypeWidget: app = new QApplication(argc, argv); + static_cast<QApplication *>(app)->setWindowIcon(QIcon(iconResourcePath)); break; #endif // QT_WIDGETS_LIB #endif // QT_GUI_LIB diff --git a/tools/qml/qml.icns b/tools/qml/qml.icns Binary files differdeleted file mode 100644 index c76051626a..0000000000 --- a/tools/qml/qml.icns +++ /dev/null diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index 3f41707275..f086b7bff9 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -8,10 +8,14 @@ RESOURCES += qml.qrc QMAKE_TARGET_DESCRIPTION = QML Runtime +ICON = resources/qml64.png +win32 { + RC_ICONS = resources/qml.ico +} mac { - OTHER_FILES += Info.plist - QMAKE_INFO_PLIST = Info.plist - ICON = qml.icns + OTHER_FILES += resources/Info.plist + QMAKE_INFO_PLIST = resources/Info.plist + ICON = resources/qml.icns } qtConfig(qml-debug): DEFINES += QT_QML_DEBUG_NO_WARNING diff --git a/tools/qml/qml.qrc b/tools/qml/qml.qrc index 1f0ffdace2..e4be1793d4 100644 --- a/tools/qml/qml.qrc +++ b/tools/qml/qml.qrc @@ -2,5 +2,6 @@ <qresource prefix="qt-project.org/QmlRuntime"> <file>conf/configuration.qml</file> <file>conf/qtquick.qml</file> + <file>resources/qml-64.png</file> </qresource> </RCC> diff --git a/tools/qml/Info.plist b/tools/qml/resources/Info.plist index 567c5bf8fd..567c5bf8fd 100644 --- a/tools/qml/Info.plist +++ b/tools/qml/resources/Info.plist diff --git a/tools/qml/resources/qml-64.png b/tools/qml/resources/qml-64.png Binary files differnew file mode 100644 index 0000000000..83dbeab9af --- /dev/null +++ b/tools/qml/resources/qml-64.png diff --git a/tools/qml/resources/qml.icns b/tools/qml/resources/qml.icns Binary files differnew file mode 100644 index 0000000000..b092ffd943 --- /dev/null +++ b/tools/qml/resources/qml.icns diff --git a/tools/qml/resources/qml.ico b/tools/qml/resources/qml.ico Binary files differnew file mode 100644 index 0000000000..09ec5ccece --- /dev/null +++ b/tools/qml/resources/qml.ico diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index 58a45781a2..5c282d1d1d 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -42,6 +42,7 @@ #include <QtQml/qqmlengine.h> #include <QtQml/qqmlcomponent.h> #include <QtQml/qqmlcontext.h> +#include <QtQml/qqmlfileselector.h> #include <QtQuick/qquickitem.h> #include <QtQuick/qquickview.h> @@ -361,6 +362,7 @@ static void usage() #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(" -S <selector> .....................Add <selector> to the list of QQmlFileSelector selectors"); puts(" -P <path> ........................ Add <path> to the list of plugin paths"); puts(" -translation <translationfile> ... Set the language to run in"); @@ -457,6 +459,7 @@ int main(int argc, char ** argv) Options options; QStringList imports; + QStringList customSelectors; QStringList pluginPaths; // Parse arguments for application attributes to be applied before Q[Gui]Application creation. @@ -531,6 +534,8 @@ int main(int argc, char ** argv) options.verbose = true; else if (lowerArgument == QLatin1String("-i") && i + 1 < size) imports.append(arguments.at(++i)); + else if (lowerArgument == QLatin1String("-s") && i + 1 < size) + customSelectors.append(arguments.at(++i)); else if (lowerArgument == QLatin1String("-p") && i + 1 < size) pluginPaths.append(arguments.at(++i)); else if (lowerArgument == QLatin1String("--apptype")) @@ -586,6 +591,8 @@ int main(int argc, char ** argv) // TODO: as soon as the engine construction completes, the debug service is // listening for connections. But actually we aren't ready to debug anything. QQmlEngine engine; + QQmlFileSelector* selector = new QQmlFileSelector(&engine, &engine); + selector->setExtraSelectors(customSelectors); QPointer<QQmlComponent> component = new QQmlComponent(&engine); for (int i = 0; i < imports.size(); ++i) engine.addImportPath(imports.at(i)); |