diff options
-rw-r--r-- | tests/auto/declarative/anchors/data/anchors.qml | 2 | ||||
-rw-r--r-- | tools/qmlviewer/qmlviewer.cpp | 15 | ||||
-rw-r--r-- | tools/qmlviewer/qmlviewer.h | 1 |
3 files changed, 17 insertions, 1 deletions
diff --git a/tests/auto/declarative/anchors/data/anchors.qml b/tests/auto/declarative/anchors/data/anchors.qml index b3fba30..b880762 100644 --- a/tests/auto/declarative/anchors/data/anchors.qml +++ b/tests/auto/declarative/anchors/data/anchors.qml @@ -97,7 +97,7 @@ Rectangle { id: rect18; objectName: "rect18" x: 180; width: 10 anchors.top: masterRect.bottom - anchors.bottom: Rect12.top + anchors.bottom: rect12.top } Rectangle { id: rect19; objectName: "rect19" diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index b6a3627..ea0936b 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -413,6 +413,16 @@ void QmlViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) if (flatmenu) flatmenu->addSeparator(); + QMenu *debugMenu = flatmenu ? flatmenu->addMenu(tr("&Debugging")) : menu->addMenu(tr("&Debugging")); + + QAction *slowAction = new QAction(tr("&Slow Down Animations"), parent); + slowAction->setShortcut(QKeySequence("Ctrl+.")); + slowAction->setCheckable(true); + connect(slowAction, SIGNAL(triggered(bool)), this, SLOT(setSlowMode(bool))); + debugMenu->addAction(slowAction); + + if (flatmenu) flatmenu->addSeparator(); + QMenu *skinMenu = flatmenu ? flatmenu->addMenu(tr("&Skin")) : menu->addMenu(tr("&Skin")); QActionGroup *skinActions; @@ -627,6 +637,11 @@ void QmlViewer::toggleRecording() setRecording(recording); } +void QmlViewer::setSlowMode(bool enable) +{ + QUnifiedTimer::instance()->setSlowModeEnabled(enable); +} + void QmlViewer::addLibraryPath(const QString& lib) { canvas->engine()->addImportPath(lib); diff --git a/tools/qmlviewer/qmlviewer.h b/tools/qmlviewer/qmlviewer.h index b366401..78512a9 100644 --- a/tools/qmlviewer/qmlviewer.h +++ b/tools/qmlviewer/qmlviewer.h @@ -104,6 +104,7 @@ public slots: void proxySettingsChanged (); void setScaleView(); void executeErrors(); + void setSlowMode(bool); protected: virtual void keyPressEvent(QKeyEvent *); |