From 01dc7e2ea476e0e6dcdce2e72979bbc858f4057d Mon Sep 17 00:00:00 2001 From: Matthew Vogt Date: Tue, 31 Jan 2012 16:52:36 +1000 Subject: Remove QtQuick1 elements from qtdeclarative QtQuick1 is now contained in a separate repository. Task-number: QTBUG-23737 Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1 Reviewed-by: Martin Jones --- tools/qmlplugindump/main.cpp | 27 +- tools/qmlplugindump/qmlplugindump.pro | 1 - tools/qmlscene/main.cpp | 97 +- tools/qmlviewer/Info_mac.plist | 49 - tools/qmlviewer/browser/Browser.qml | 318 ------ tools/qmlviewer/browser/browser.qrc | 9 - tools/qmlviewer/browser/images/folder.png | Bin 1841 -> 0 bytes tools/qmlviewer/browser/images/titlebar.png | Bin 1436 -> 0 bytes tools/qmlviewer/browser/images/titlebar.sci | 5 - tools/qmlviewer/browser/images/up.png | Bin 662 -> 0 bytes tools/qmlviewer/deviceorientation.cpp | 80 -- tools/qmlviewer/deviceorientation.h | 84 -- tools/qmlviewer/deviceorientation_harmattan.cpp | 161 --- tools/qmlviewer/loggerwidget.cpp | 201 ---- tools/qmlviewer/loggerwidget.h | 101 -- tools/qmlviewer/main.cpp | 566 ---------- tools/qmlviewer/proxysettings.cpp | 109 -- tools/qmlviewer/proxysettings.h | 71 -- tools/qmlviewer/proxysettings.ui | 115 -- tools/qmlviewer/qdeclarativetester.cpp | 450 -------- tools/qmlviewer/qdeclarativetester.h | 290 ----- tools/qmlviewer/qml.icns | Bin 196156 -> 0 bytes tools/qmlviewer/qml.pri | 32 - tools/qmlviewer/qmlruntime.cpp | 1351 ----------------------- tools/qmlviewer/qmlruntime.h | 205 ---- tools/qmlviewer/qmlviewer.pro | 26 - tools/qmlviewer/recopts.ui | 513 --------- tools/qmlviewer/startup/Logo.qml | 179 --- tools/qmlviewer/startup/qt-back.png | Bin 3549 -> 0 bytes tools/qmlviewer/startup/qt-blue.jpg | Bin 20900 -> 0 bytes tools/qmlviewer/startup/qt-front.png | Bin 3318 -> 0 bytes tools/qmlviewer/startup/qt-sketch.jpg | Bin 17048 -> 0 bytes tools/qmlviewer/startup/qt-text.png | Bin 14565 -> 0 bytes tools/qmlviewer/startup/quick-blur.png | Bin 2826 -> 0 bytes tools/qmlviewer/startup/quick-regular.png | Bin 1399 -> 0 bytes tools/qmlviewer/startup/shadow.png | Bin 1592 -> 0 bytes tools/qmlviewer/startup/startup.qml | 173 --- tools/qmlviewer/startup/startup.qrc | 16 - tools/qmlviewer/startup/white-star.png | Bin 2651 -> 0 bytes tools/tools.pro | 2 +- 40 files changed, 51 insertions(+), 5180 deletions(-) delete mode 100644 tools/qmlviewer/Info_mac.plist delete mode 100644 tools/qmlviewer/browser/Browser.qml delete mode 100644 tools/qmlviewer/browser/browser.qrc delete mode 100644 tools/qmlviewer/browser/images/folder.png delete mode 100644 tools/qmlviewer/browser/images/titlebar.png delete mode 100644 tools/qmlviewer/browser/images/titlebar.sci delete mode 100644 tools/qmlviewer/browser/images/up.png delete mode 100644 tools/qmlviewer/deviceorientation.cpp delete mode 100644 tools/qmlviewer/deviceorientation.h delete mode 100644 tools/qmlviewer/deviceorientation_harmattan.cpp delete mode 100644 tools/qmlviewer/loggerwidget.cpp delete mode 100644 tools/qmlviewer/loggerwidget.h delete mode 100644 tools/qmlviewer/main.cpp delete mode 100644 tools/qmlviewer/proxysettings.cpp delete mode 100644 tools/qmlviewer/proxysettings.h delete mode 100644 tools/qmlviewer/proxysettings.ui delete mode 100644 tools/qmlviewer/qdeclarativetester.cpp delete mode 100644 tools/qmlviewer/qdeclarativetester.h delete mode 100644 tools/qmlviewer/qml.icns delete mode 100644 tools/qmlviewer/qml.pri delete mode 100644 tools/qmlviewer/qmlruntime.cpp delete mode 100644 tools/qmlviewer/qmlruntime.h delete mode 100644 tools/qmlviewer/qmlviewer.pro delete mode 100644 tools/qmlviewer/recopts.ui delete mode 100644 tools/qmlviewer/startup/Logo.qml delete mode 100644 tools/qmlviewer/startup/qt-back.png delete mode 100644 tools/qmlviewer/startup/qt-blue.jpg delete mode 100644 tools/qmlviewer/startup/qt-front.png delete mode 100644 tools/qmlviewer/startup/qt-sketch.jpg delete mode 100644 tools/qmlviewer/startup/qt-text.png delete mode 100644 tools/qmlviewer/startup/quick-blur.png delete mode 100644 tools/qmlviewer/startup/quick-regular.png delete mode 100644 tools/qmlviewer/startup/shadow.png delete mode 100644 tools/qmlviewer/startup/startup.qml delete mode 100644 tools/qmlviewer/startup/startup.qrc delete mode 100644 tools/qmlviewer/startup/white-star.png (limited to 'tools') diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index afbc4a16e2..ad8a3a6d64 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -45,10 +45,6 @@ #include #include -#ifdef QT_WIDGETS_LIB -#include -#endif - #include #include #include @@ -84,8 +80,8 @@ void collectReachableMetaObjects(const QMetaObject *meta, QSetcontains(meta)) return; - // dynamic meta objects can break things badly (like QDeclarative1VisualDataModelParts) - // but extended types are usually fine (like QDeclarative1GraphicsWidget) + // dynamic meta objects can break things badly + // but extended types are usually fine const QMetaObjectPrivate *mop = reinterpret_cast(meta->d.data); if (extended || !(mop->flags & DynamicMetaObject)) metas->insert(meta); @@ -611,11 +607,7 @@ int main(int argc, char *argv[]) QtSimulatorPrivate::SimulatorConnection::createStubInstance(); #endif -#ifdef QT_WIDGETS_LIB - QApplication app(argc, argv); -#else QGuiApplication app(argc, argv); -#endif const QStringList args = app.arguments(); const QString appName = QFileInfo(app.applicationFilePath()).baseName(); if (args.size() < 2) { @@ -687,21 +679,6 @@ int main(int argc, char *argv[]) engine.addImportPath(pluginImportPath); } -#ifdef QT_WIDGETS_LIB - // load the QtQuick 1 plugin - { - QByteArray code("import QtQuick 1.0\nQtObject {}"); - QDeclarativeComponent c(&engine); - c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/loadqtquick1.qml")); - c.create(); - if (!c.errors().isEmpty()) { - foreach (const QDeclarativeError &error, c.errors()) - qWarning() << error.toString(); - return EXIT_IMPORTERROR; - } - } -#endif - // load the QtQuick 2 plugin { QByteArray code("import QtQuick 2.0\nQtObject {}"); diff --git a/tools/qmlplugindump/qmlplugindump.pro b/tools/qmlplugindump/qmlplugindump.pro index 25c0037129..e1c8485e27 100644 --- a/tools/qmlplugindump/qmlplugindump.pro +++ b/tools/qmlplugindump/qmlplugindump.pro @@ -3,7 +3,6 @@ CONFIG += qt uic console DESTDIR = $$QT.declarative.bins QT += declarative declarative-private quick-private core-private -!isEmpty(QT.widgets.name):!isEmpty(QT.qtquick1.name): QT += widgets qtquick1 TARGET = qmlplugindump diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index 6138e38134..115dace0b6 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -241,54 +241,53 @@ static int displayOptionsDialog(Options *options) } #endif -static void checkAndAdaptVersion(const QUrl &url) +static bool checkVersion(const QUrl &url) { if (!qgetenv("QMLSCENE_IMPORT_NAME").isEmpty()) { - return; + qWarning("QMLSCENE_IMPORT_NAME is no longer supported."); } QString fileName = url.toLocalFile(); - if (fileName.isEmpty()) - return; + if (fileName.isEmpty()) { + qWarning("qmlscene: filename required."); + return false; + } QFile f(fileName); if (!f.open(QFile::ReadOnly | QFile::Text)) { qWarning("qmlscene: failed to check version of file '%s', could not open...", qPrintable(fileName)); - return; + return false; } - QRegExp quick1("^\\s*import +QtQuick +1\\."); - QRegExp quick2("^\\s*import +QtQuick +2\\."); + QRegExp quick1("^\\s*import +QtQuick +1\\.\\w*"); QRegExp qt47("^\\s*import +Qt +4\\.7"); - QString envToWrite; - QString compat; - QTextStream stream(&f); bool codeFound= false; while (!codeFound) { QString line = stream.readLine(); - if (line.contains("{")) + if (line.contains("{")) { codeFound = true; - if (envToWrite.isEmpty() && quick1.indexIn(line) >= 0) { - envToWrite = QLatin1String("quick1"); - compat = QLatin1String("QtQuick 1.0"); - } else if (envToWrite.isEmpty() && qt47.indexIn(line) >= 0) { - envToWrite = QLatin1String("qt"); - compat = QLatin1String("Qt 4.7"); - } else if (quick2.indexIn(line) >= 0) { - envToWrite.clear(); - compat.clear(); - break; + } else { + QString import; + if (quick1.indexIn(line) >= 0) { + import = quick1.cap(0).trimmed(); + } else if (qt47.indexIn(line) >= 0) { + import = qt47.cap(0).trimmed(); + } + + if (!import.isNull()) { + qWarning("qmlscene: '%s' is no longer supported.\n" + "Use qmlviewer to load file '%s'.", + qPrintable(import), + qPrintable(fileName)); + return false; + } } } - if (!envToWrite.isEmpty()) { - qWarning("qmlscene: Autodetecting compatibility import \"%s\"...", qPrintable(compat)); - if (qgetenv("QMLSCENE_IMPORT_NAME").isEmpty()) - qputenv("QMLSCENE_IMPORT_NAME", envToWrite.toLatin1().constData()); - } + return true; } static void displayFileDialog(Options *options) @@ -398,36 +397,36 @@ int main(int argc, char ** argv) int exitCode = 0; if (!options.file.isEmpty()) { - if (options.versionDetection) - checkAndAdaptVersion(options.file); - QQuickView *qxView = new MyQQuickView(); - engine = qxView->engine(); - for (int i = 0; i < imports.size(); ++i) - engine->addImportPath(imports.at(i)); - window = qxView; - if (options.file.isLocalFile()) { - QFileInfo fi(options.file.toLocalFile()); - loadDummyDataFiles(*engine, fi.path()); - } - qxView->setSource(options.file); + if (!options.versionDetection || checkVersion(options.file)) { + QQuickView *qxView = new MyQQuickView(); + engine = qxView->engine(); + for (int i = 0; i < imports.size(); ++i) + engine->addImportPath(imports.at(i)); + window = qxView; + if (options.file.isLocalFile()) { + QFileInfo fi(options.file.toLocalFile()); + loadDummyDataFiles(*engine, fi.path()); + } + qxView->setSource(options.file); - QObject::connect(engine, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit())); + QObject::connect(engine, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit())); - window->setWindowFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint); - if (options.fullscreen) - window->showFullScreen(); - else if (options.maximized) - window->showMaximized(); - else - window->show(); + window->setWindowFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint); + if (options.fullscreen) + window->showFullScreen(); + else if (options.maximized) + window->showMaximized(); + else + window->show(); - exitCode = app.exec(); + exitCode = app.exec(); - delete window; + delete window; #ifdef QML_RUNTIME_TESTING - RenderStatistics::printTotalStats(); + RenderStatistics::printTotalStats(); #endif + } } return exitCode; diff --git a/tools/qmlviewer/Info_mac.plist b/tools/qmlviewer/Info_mac.plist deleted file mode 100644 index 08775479ba..0000000000 --- a/tools/qmlviewer/Info_mac.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleIconFile - @ICON@ - CFBundleIdentifier - com.nokia.qt.qml - CFBundlePackageType - APPL - CFBundleGetInfoString - Created by Qt/QMake - CFBundleSignature - @TYPEINFO@ - CFBundleExecutable - @EXECUTABLE@ - UTExportedTypeDeclarations - - - UTTypeIdentifier - com.nokia.qt.qml - UTTypeDescription - Qt Markup Language - UTTypeConformsTo - - public.plain-text - - UTTypeTagSpecification - - public.filename-extension - - qml - - - - - CFBundleDocumentTypes - - - LSItemContentTypes - - com.nokia.qt.qml - - CFBundleTypeRole - Viewer - - - - diff --git a/tools/qmlviewer/browser/Browser.qml b/tools/qmlviewer/browser/Browser.qml deleted file mode 100644 index f2cc4a858a..0000000000 --- a/tools/qmlviewer/browser/Browser.qml +++ /dev/null @@ -1,318 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 -import Qt.labs.folderlistmodel 1.0 - -Rectangle { - id: root - property bool showFocusHighlight: false - property variant folders: folders1 - property variant view: view1 - width: 320 - height: 480 - color: palette.window - - FolderListModel { - id: folders1 - nameFilters: [ "*.qml" ] - folder: qmlViewerFolder - } - FolderListModel { - id: folders2 - nameFilters: [ "*.qml" ] - folder: qmlViewerFolder - } - - SystemPalette { id: palette } - - function down(path) { - if (folders == folders1) { - view = view2 - folders = folders2; - view1.state = "exitLeft"; - } else { - view = view1 - folders = folders1; - view2.state = "exitLeft"; - } - view.x = root.width; - view.state = "current"; - view.focus = true; - folders.folder = path; - } - function up() { - var path = folders.parentFolder; - if (folders == folders1) { - view = view2 - folders = folders2; - view1.state = "exitRight"; - } else { - view = view1 - folders = folders1; - view2.state = "exitRight"; - } - view.x = -root.width; - view.state = "current"; - view.focus = true; - folders.folder = path; - } - function keyPressed(key) { - switch (key) { - case Qt.Key_Up: - case Qt.Key_Down: - case Qt.Key_Left: - case Qt.Key_Right: - root.showFocusHighlight = true; - break; - default: - // do nothing - break; - } - } - - Component { - id: folderDelegate - Rectangle { - id: wrapper - function launch() { - if (folders.isFolder(index)) { - down(filePath); - } else { - qmlViewer.launch(filePath); - } - } - width: root.width - height: 52 - color: "transparent" - Rectangle { - id: highlight; visible: false - anchors.fill: parent - color: palette.highlight - gradient: Gradient { - GradientStop { id: t1; position: 0.0; color: palette.highlight } - GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } - } - } - Item { - width: 48; height: 48 - Image { source: "images/folder.png"; anchors.centerIn: parent; visible: folders.isFolder(index)} - } - Text { - id: nameText - anchors.fill: parent; verticalAlignment: Text.AlignVCenter - text: fileName - anchors.leftMargin: 54 - font.pixelSize: 32 - color: (wrapper.ListView.isCurrentItem && root.showFocusHighlight) ? palette.highlightedText : palette.windowText - elide: Text.ElideRight - } - MouseArea { - id: mouseRegion - anchors.fill: parent - onPressed: { - root.showFocusHighlight = false; - wrapper.ListView.view.currentIndex = index; - } - onClicked: { if (folders == wrapper.ListView.view.model) launch() } - } - states: [ - State { - name: "pressed" - when: mouseRegion.pressed - PropertyChanges { target: highlight; visible: true } - PropertyChanges { target: nameText; color: palette.highlightedText } - } - ] - } - } - - ListView { - id: view1 - anchors.top: titleBar.bottom - anchors.bottom: parent.bottom - x: 0 - width: parent.width - model: folders1 - delegate: folderDelegate - highlight: Rectangle { - color: palette.highlight - visible: root.showFocusHighlight && view1.count != 0 - gradient: Gradient { - GradientStop { id: t1; position: 0.0; color: palette.highlight } - GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } - } - width: view1.currentItem == null ? 0 : view1.currentItem.width - } - highlightMoveSpeed: 1000 - pressDelay: 100 - focus: true - state: "current" - states: [ - State { - name: "current" - PropertyChanges { target: view1; x: 0 } - }, - State { - name: "exitLeft" - PropertyChanges { target: view1; x: -root.width } - }, - State { - name: "exitRight" - PropertyChanges { target: view1; x: root.width } - } - ] - transitions: [ - Transition { - to: "current" - SequentialAnimation { - NumberAnimation { properties: "x"; duration: 250 } - } - }, - Transition { - NumberAnimation { properties: "x"; duration: 250 } - NumberAnimation { properties: "x"; duration: 250 } - } - ] - Keys.onPressed: root.keyPressed(event.key) - } - - ListView { - id: view2 - anchors.top: titleBar.bottom - anchors.bottom: parent.bottom - x: parent.width - width: parent.width - model: folders2 - delegate: folderDelegate - highlight: Rectangle { - color: palette.highlight - visible: root.showFocusHighlight && view2.count != 0 - gradient: Gradient { - GradientStop { id: t1; position: 0.0; color: palette.highlight } - GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } - } - width: view1.currentItem == null ? 0 : view1.currentItem.width - } - highlightMoveSpeed: 1000 - pressDelay: 100 - states: [ - State { - name: "current" - PropertyChanges { target: view2; x: 0 } - }, - State { - name: "exitLeft" - PropertyChanges { target: view2; x: -root.width } - }, - State { - name: "exitRight" - PropertyChanges { target: view2; x: root.width } - } - ] - transitions: [ - Transition { - to: "current" - SequentialAnimation { - NumberAnimation { properties: "x"; duration: 250 } - } - }, - Transition { - NumberAnimation { properties: "x"; duration: 250 } - } - ] - Keys.onPressed: root.keyPressed(event.key) - } - - Keys.onPressed: { - root.keyPressed(event.key); - if (event.key == Qt.Key_Return || event.key == Qt.Key_Select || event.key == Qt.Key_Right) { - view.currentItem.launch(); - event.accepted = true; - } else if (event.key == Qt.Key_Left) { - up(); - } - } - - BorderImage { - source: "images/titlebar.sci"; - width: parent.width; - height: 52 - y: -7 - id: titleBar - - Rectangle { - id: upButton - width: 48 - height: titleBar.height - 7 - color: "transparent" - - Image { anchors.centerIn: parent; source: "images/up.png" } - MouseArea { id: upRegion; anchors.centerIn: parent - width: 56 - height: 56 - onClicked: if (folders.parentFolder != "") up() - } - states: [ - State { - name: "pressed" - when: upRegion.pressed - PropertyChanges { target: upButton; color: palette.highlight } - } - ] - } - Rectangle { - color: "gray" - x: 48 - width: 1 - height: 44 - } - - Text { - anchors.left: upButton.right; anchors.right: parent.right; height: parent.height - anchors.leftMargin: 4; anchors.rightMargin: 4 - text: folders.folder - color: "white" - elide: Text.ElideLeft; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignVCenter - font.pixelSize: 32 - } - } -} diff --git a/tools/qmlviewer/browser/browser.qrc b/tools/qmlviewer/browser/browser.qrc deleted file mode 100644 index 9c688e7521..0000000000 --- a/tools/qmlviewer/browser/browser.qrc +++ /dev/null @@ -1,9 +0,0 @@ - - - Browser.qml - images/up.png - images/folder.png - images/titlebar.sci - images/titlebar.png - - diff --git a/tools/qmlviewer/browser/images/folder.png b/tools/qmlviewer/browser/images/folder.png deleted file mode 100644 index e53e2ad464..0000000000 Binary files a/tools/qmlviewer/browser/images/folder.png and /dev/null differ diff --git a/tools/qmlviewer/browser/images/titlebar.png b/tools/qmlviewer/browser/images/titlebar.png deleted file mode 100644 index 51c90082d0..0000000000 Binary files a/tools/qmlviewer/browser/images/titlebar.png and /dev/null differ diff --git a/tools/qmlviewer/browser/images/titlebar.sci b/tools/qmlviewer/browser/images/titlebar.sci deleted file mode 100644 index 0418d94cd6..0000000000 --- a/tools/qmlviewer/browser/images/titlebar.sci +++ /dev/null @@ -1,5 +0,0 @@ -border.left: 10 -border.top: 12 -border.bottom: 12 -border.right: 10 -source: titlebar.png diff --git a/tools/qmlviewer/browser/images/up.png b/tools/qmlviewer/browser/images/up.png deleted file mode 100644 index b05f8025d0..0000000000 Binary files a/tools/qmlviewer/browser/images/up.png and /dev/null differ diff --git a/tools/qmlviewer/deviceorientation.cpp b/tools/qmlviewer/deviceorientation.cpp deleted file mode 100644 index edb9dbb45a..0000000000 --- a/tools/qmlviewer/deviceorientation.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "deviceorientation.h" - -QT_USE_NAMESPACE - -class DefaultDeviceOrientation : public DeviceOrientation -{ - Q_OBJECT -public: - DefaultDeviceOrientation() : DeviceOrientation(), m_orientation(DeviceOrientation::Portrait) {} - - Orientation orientation() const { - return m_orientation; - } - - void pauseListening() { - } - void resumeListening() { - } - - void setOrientation(Orientation o) { - if (o != m_orientation) { - m_orientation = o; - emit orientationChanged(); - } - } - - Orientation m_orientation; -}; - -DeviceOrientation* DeviceOrientation::instance() -{ - static DefaultDeviceOrientation *o = 0; - if (!o) - o = new DefaultDeviceOrientation; - return o; -} - -#include "deviceorientation.moc" - diff --git a/tools/qmlviewer/deviceorientation.h b/tools/qmlviewer/deviceorientation.h deleted file mode 100644 index f74be746c6..0000000000 --- a/tools/qmlviewer/deviceorientation.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef ORIENTATION_H -#define ORIENTATION_H - -#include - -QT_BEGIN_NAMESPACE - -class DeviceOrientationPrivate; -class DeviceOrientation : public QObject -{ - Q_OBJECT - Q_ENUMS(Orientation) -public: - enum Orientation { - UnknownOrientation, - Portrait, - Landscape, - PortraitInverted, - LandscapeInverted - }; - - virtual Orientation orientation() const = 0; - virtual void setOrientation(Orientation) = 0; - - virtual void pauseListening() = 0; - virtual void resumeListening() = 0; - - static DeviceOrientation *instance(); - -signals: - void orientationChanged(); - -protected: - DeviceOrientation() {} - -private: - DeviceOrientationPrivate *d_ptr; - friend class DeviceOrientationPrivate; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qmlviewer/deviceorientation_harmattan.cpp b/tools/qmlviewer/deviceorientation_harmattan.cpp deleted file mode 100644 index e82c139054..0000000000 --- a/tools/qmlviewer/deviceorientation_harmattan.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "deviceorientation.h" -#include -#include - -#define ORIENTATION_SERVICE QStringLiteral("com.nokia.SensorService") -#define ORIENTATION_PATH QStringLiteral("/org/maemo/contextkit/Screen/TopEdge") -#define CONTEXT_INTERFACE QStringLiteral("org.maemo.contextkit.Property") -#define CONTEXT_CHANGED QStringLiteral("ValueChanged") -#define CONTEXT_SUBSCRIBE QStringLiteral("Subscribe") -#define CONTEXT_UNSUBSCRIBE QStringLiteral("Unsubscribe") -#define CONTEXT_GET QStringLiteral("Get") - - -class HarmattanOrientation : public DeviceOrientation -{ - Q_OBJECT -public: - HarmattanOrientation() - : o(UnknownOrientation), sensorEnabled(false) - { - resumeListening(); - // connect to the orientation change signal - bool ok = QDBusConnection::systemBus().connect(ORIENTATION_SERVICE, ORIENTATION_PATH, - CONTEXT_INTERFACE, - CONTEXT_CHANGED, - this, - SLOT(deviceOrientationChanged(QList,quint64))); -// qDebug() << "connection OK" << ok; - QDBusMessage reply = QDBusConnection::systemBus().call( - QDBusMessage::createMethodCall(ORIENTATION_SERVICE, ORIENTATION_PATH, - CONTEXT_INTERFACE, CONTEXT_GET)); - if (reply.type() != QDBusMessage::ErrorMessage) { - QList args; - qvariant_cast(reply.arguments().at(0)) >> args; - deviceOrientationChanged(args, 0); - } - } - - ~HarmattanOrientation() - { - // unsubscribe from the orientation sensor - if (sensorEnabled) - QDBusConnection::systemBus().call( - QDBusMessage::createMethodCall(ORIENTATION_SERVICE, ORIENTATION_PATH, - CONTEXT_INTERFACE, CONTEXT_UNSUBSCRIBE)); - } - - inline Orientation orientation() const - { - return o; - } - - void setOrientation(Orientation) - { - } - - void pauseListening() { - if (sensorEnabled) { - // unsubscribe from the orientation sensor - QDBusConnection::systemBus().call( - QDBusMessage::createMethodCall(ORIENTATION_SERVICE, ORIENTATION_PATH, - CONTEXT_INTERFACE, CONTEXT_UNSUBSCRIBE)); - sensorEnabled = false; - } - } - - void resumeListening() { - if (!sensorEnabled) { - // subscribe to the orientation sensor - QDBusMessage reply = QDBusConnection::systemBus().call( - QDBusMessage::createMethodCall(ORIENTATION_SERVICE, ORIENTATION_PATH, - CONTEXT_INTERFACE, CONTEXT_SUBSCRIBE)); - - if (reply.type() == QDBusMessage::ErrorMessage) { - qWarning("Unable to retrieve device orientation: %s", qPrintable(reply.errorMessage())); - } else { - sensorEnabled = true; - } - } - } - -private Q_SLOTS: - void deviceOrientationChanged(QList args,quint64) - { - if (args.count() == 0) - return; - Orientation newOrientation = toOrientation(args.at(0).toString()); - if (newOrientation != o) { - o = newOrientation; - emit orientationChanged(); - } -// qDebug() << "orientation" << args.at(0).toString(); - } - -private: - static Orientation toOrientation(const QString &nativeOrientation) - { - if (nativeOrientation == QLatin1String("top")) - return Landscape; - else if (nativeOrientation == QLatin1String("left")) - return Portrait; - else if (nativeOrientation == QLatin1String("bottom")) - return LandscapeInverted; - else if (nativeOrientation == QLatin1String("right")) - return PortraitInverted; - return UnknownOrientation; - } - -private: - Orientation o; - bool sensorEnabled; -}; - -DeviceOrientation* DeviceOrientation::instance() -{ - static HarmattanOrientation *o = new HarmattanOrientation; - return o; -} - -#include "deviceorientation_harmattan.moc" diff --git a/tools/qmlviewer/loggerwidget.cpp b/tools/qmlviewer/loggerwidget.cpp deleted file mode 100644 index 02ee8c6d6b..0000000000 --- a/tools/qmlviewer/loggerwidget.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "loggerwidget.h" - -QT_BEGIN_NAMESPACE - -LoggerWidget::LoggerWidget(QWidget *parent) : - QMainWindow(parent), - m_visibilityOrigin(SettingsOrigin) -{ - setAttribute(Qt::WA_QuitOnClose, false); - setWindowTitle(tr("Warnings")); - - m_plainTextEdit = new QPlainTextEdit(); - setCentralWidget(m_plainTextEdit); - m_noWarningsLabel = new QLabel(m_plainTextEdit); - m_noWarningsLabel->setText(tr("(No warnings)")); - m_noWarningsLabel->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter); - QVBoxLayout *layout = new QVBoxLayout; - layout->addWidget(m_noWarningsLabel); - m_plainTextEdit->setLayout(layout); - connect(m_plainTextEdit, SIGNAL(textChanged()), this, SLOT(updateNoWarningsLabel())); - - readSettings(); - setupPreferencesMenu(); -} - -void LoggerWidget::append(const QString &msg) -{ - m_plainTextEdit->appendPlainText(msg); - - if (!isVisible() && (defaultVisibility() == AutoShowWarnings)) - setVisible(true); -} - -LoggerWidget::Visibility LoggerWidget::defaultVisibility() const -{ - return m_visibility; -} - -void LoggerWidget::setDefaultVisibility(LoggerWidget::Visibility visibility) -{ - if (m_visibility == visibility) - return; - - m_visibility = visibility; - m_visibilityOrigin = CommandLineOrigin; - - m_preferencesMenu->setEnabled(m_visibilityOrigin == SettingsOrigin); -} - -QMenu *LoggerWidget::preferencesMenu() -{ - return m_preferencesMenu; -} - -QAction *LoggerWidget::showAction() -{ - return m_showWidgetAction; -} - -void LoggerWidget::readSettings() -{ - QSettings settings; - QString warningsPreferences = settings.value(QLatin1String("warnings"), QLatin1String("hide")).toString(); - if (warningsPreferences == QLatin1String("show")) { - m_visibility = ShowWarnings; - } else if (warningsPreferences == QLatin1String("hide")) { - m_visibility = HideWarnings; - } else { - m_visibility = AutoShowWarnings; - } -} - -void LoggerWidget::saveSettings() -{ - if (m_visibilityOrigin != SettingsOrigin) - return; - - QString value = QLatin1String("autoShow"); - if (defaultVisibility() == ShowWarnings) { - value = QLatin1String("show"); - } else if (defaultVisibility() == HideWarnings) { - value = QLatin1String("hide"); - } - - QSettings settings; - settings.setValue(QLatin1String("warnings"), value); -} - -void LoggerWidget::warningsPreferenceChanged(QAction *action) -{ - Visibility newSetting = static_cast(action->data().toInt()); - m_visibility = newSetting; - saveSettings(); -} - -void LoggerWidget::showEvent(QShowEvent *event) -{ - QWidget::showEvent(event); - emit opened(); -} - -void LoggerWidget::closeEvent(QCloseEvent *event) -{ - QWidget::closeEvent(event); - emit closed(); -} - -void LoggerWidget::setupPreferencesMenu() -{ - m_preferencesMenu = new QMenu(tr("Warnings")); - QActionGroup *warnings = new QActionGroup(m_preferencesMenu); - warnings->setExclusive(true); - - connect(warnings, SIGNAL(triggered(QAction*)), this, SLOT(warningsPreferenceChanged(QAction*))); - - QAction *showWarningsPreference = new QAction(tr("Show by default"), m_preferencesMenu); - showWarningsPreference->setCheckable(true); - showWarningsPreference->setData(LoggerWidget::ShowWarnings); - warnings->addAction(showWarningsPreference); - m_preferencesMenu->addAction(showWarningsPreference); - - QAction *hideWarningsPreference = new QAction(tr("Hide by default"), m_preferencesMenu); - hideWarningsPreference->setCheckable(true); - hideWarningsPreference->setData(LoggerWidget::HideWarnings); - warnings->addAction(hideWarningsPreference); - m_preferencesMenu->addAction(hideWarningsPreference); - - QAction *autoWarningsPreference = new QAction(tr("Show for first warning"), m_preferencesMenu); - autoWarningsPreference->setCheckable(true); - autoWarningsPreference->setData(LoggerWidget::AutoShowWarnings); - warnings->addAction(autoWarningsPreference); - m_preferencesMenu->addAction(autoWarningsPreference); - - switch (defaultVisibility()) { - case LoggerWidget::ShowWarnings: - showWarningsPreference->setChecked(true); - break; - case LoggerWidget::HideWarnings: - hideWarningsPreference->setChecked(true); - break; - default: - autoWarningsPreference->setChecked(true); - } -} - -void LoggerWidget::updateNoWarningsLabel() -{ - m_noWarningsLabel->setVisible(m_plainTextEdit->toPlainText().length() == 0); -} - -QT_END_NAMESPACE diff --git a/tools/qmlviewer/loggerwidget.h b/tools/qmlviewer/loggerwidget.h deleted file mode 100644 index 8ec25f0241..0000000000 --- a/tools/qmlviewer/loggerwidget.h +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef LOGGERWIDGET_H -#define LOGGERWIDGET_H - -#include -#include - -QT_BEGIN_NAMESPACE - -class QPlainTextEdit; -class QLabel; -class QMenu; -class QAction; - -class LoggerWidget : public QMainWindow { - Q_OBJECT -public: - LoggerWidget(QWidget *parent=0); - - enum Visibility { ShowWarnings, HideWarnings, AutoShowWarnings }; - - Visibility defaultVisibility() const; - void setDefaultVisibility(Visibility visibility); - - QMenu *preferencesMenu(); - QAction *showAction(); - -public slots: - void append(const QString &msg); - void updateNoWarningsLabel(); - -private slots: - void warningsPreferenceChanged(QAction *action); - void readSettings(); - void saveSettings(); - -protected: - void showEvent(QShowEvent *event); - void closeEvent(QCloseEvent *event); - -signals: - void opened(); - void closed(); - -private: - void setupPreferencesMenu(); - - QMenu *m_preferencesMenu; - QAction *m_showWidgetAction; - QPlainTextEdit *m_plainTextEdit; - QLabel *m_noWarningsLabel; - enum ConfigOrigin { CommandLineOrigin, SettingsOrigin }; - ConfigOrigin m_visibilityOrigin; - Visibility m_visibility; -}; - -QT_END_NAMESPACE - -Q_DECLARE_METATYPE(LoggerWidget::Visibility) - -#endif // LOGGERWIDGET_H diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp deleted file mode 100644 index 58ea4db595..0000000000 --- a/tools/qmlviewer/main.cpp +++ /dev/null @@ -1,566 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qdeclarative.h" -#include "qmlruntime.h" -#include "qdeclarativeengine.h" -#include "loggerwidget.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "qdeclarativetester.h" - -QT_USE_NAMESPACE - -QtMsgHandler systemMsgOutput = 0; - -static QDeclarativeViewer *openFile(const QString &fileName); -static void showViewer(QDeclarativeViewer *viewer); - -QString warnings; -void exitApp(int i) -{ -#ifdef Q_OS_WIN - // Debugging output is not visible by default on Windows - - // therefore show modal dialog with errors instead. - if (!warnings.isEmpty()) { - QMessageBox::warning(0, QApplication::translate("QDeclarativeViewer", "Qt QML Viewer"), warnings); - } -#endif - exit(i); -} - -QWeakPointer logger; -static QAtomicInt recursiveLock(0); - -void myMessageOutput(QtMsgType type, const char *msg) -{ - QString strMsg = QString::fromLatin1(msg); - - if (!QCoreApplication::closingDown()) { - if (!logger.isNull()) { - if (recursiveLock.testAndSetOrdered(0, 1)) { - QMetaObject::invokeMethod(logger.data(), "append", Q_ARG(QString, strMsg)); - recursiveLock.store(0); - } - } else { - warnings += strMsg; - warnings += QLatin1Char('\n'); - } - } - - if (systemMsgOutput) { - systemMsgOutput(type, msg); - } else { // Unix - fprintf(stderr, "%s\n", msg); - fflush(stderr); - } -} - -static QDeclarativeViewer* globalViewer = 0; - -// The qml file that is shown if the user didn't specify a QML file -QString initialFile = QLatin1String("qrc:/startup/startup.qml"); - -void usage() -{ - qWarning("Usage: qmlviewer [options] "); - qWarning(" "); - qWarning(" options:"); - qWarning(" -v, -version ............................. display version"); - qWarning(" -frameless ............................... run with no window frame"); - qWarning(" -maximized................................ run maximized"); - qWarning(" -fullscreen............................... run fullscreen"); - qWarning(" -stayontop................................ keep viewer window on top"); - qWarning(" -sizeviewtorootobject .................... the view resizes to the changes in the content"); - qWarning(" -sizerootobjecttoview .................... the content resizes to the changes in the view (default)"); - qWarning(" -qmlbrowser .............................. use a QML-based file browser"); - qWarning(" -warnings [show|hide]..................... show warnings in a separate log window"); - qWarning(" -recordfile ..................... set video recording file"); - qWarning(" - ImageMagick 'convert' for GIF)"); - qWarning(" - png file for raw frames"); - qWarning(" - 'ffmpeg' for other formats"); - qWarning(" -recorddither ordered|threshold|floyd .... set GIF dither recording mode"); - qWarning(" -recordrate ........................ set recording frame rate"); - qWarning(" -record arg .............................. add a recording process argument"); - qWarning(" -autorecord [from-] ...... set recording to start and stop"); - qWarning(" -devicekeys .............................. use numeric keys (see F1)"); - qWarning(" -dragthreshold .................... set mouse drag threshold size"); - qWarning(" -netcache ......................... set disk cache to size bytes"); - qWarning(" -translation ........... set the language to run in"); - qWarning(" -I ........................... prepend to the module import search path,"); - qWarning(" display path if is empty"); - qWarning(" -P ........................... prepend to the plugin search path"); -#if defined(Q_OS_MAC) - qWarning(" -no-opengl ............................... don't use a QGLWidget for the viewport"); - qWarning(" -opengl .................................. use a QGLWidget for the viewport (default)"); -#else - qWarning(" -no-opengl ............................... don't use a QGLWidget for the viewport (default)"); - qWarning(" -opengl .................................. use a QGLWidget for the viewport"); -#endif - qWarning(" -script ........................... set the script to use"); - qWarning(" -scriptopts |help ............... set the script options to use"); - - qWarning(" "); - qWarning(" Press F1 for interactive help"); - - exitApp(1); -} - -void scriptOptsUsage() -{ - qWarning("Usage: qmlviewer -scriptopts