Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r291cadb8a1441e856eda05bb347849ae45a2d7d5 -r7c35fb5c04f1ff789d09cb968a4c4a046b64a7c2 --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 291cadb8a1441e856eda05bb347849ae45a2d7d5) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 7c35fb5c04f1ff789d09cb968a4c4a046b64a7c2) @@ -206,53 +206,7 @@ _viewer->engine()->addImportPath("qrc:/plugins"); //DEBUG: qDebug() << _viewer->engine()->importPathList(); _viewer->setSource(QStringLiteral("qrc:/main.qml")); - - // if reload QML build arguement is set then set reloadable main.qml source - if ( gReloadQML) { - const QUrl mainQML(QUrl::fromLocalFile(QStringLiteral("%1/qml/main.qml").arg(QML_PATH))); - _viewer->setReloadSource(mainQML); - } - LOG_DEBUG("MainView started"); return true; } - - /*! - * \brief setReloadSource - * \param vUrl - local top level qml file to set as reloadble source - * \details Source code url used to reload the qml during developing without requiring an application restart - */ - void MainView::setReloadSource(QUrl vUrl) - { - _reloadSource = vUrl; - } - - /*! - * \brief reload - * \details Used to reload the qml during developing without requiring an application restart - */ - void MainView::reload() - { - engine()->clearComponentCache(); - setSource(_reloadSource.isEmpty() ? source() : _reloadSource); - qDebug() << "QML reloaded."; - } - - /*! - * \brief keyPressEvent - * \param vEvent - QKeyEvent user key input - * \details event handler for input key events - */ - void MainView::keyPressEvent(QKeyEvent *vEvent) - { - // Enable reloading of the QML files for quicker development - if ( gReloadQML ) { - if (vEvent->key() == Qt::Key_F5) - { - QMetaObject::invokeMethod(this, &MainView::reload, Qt::QueuedConnection); - } - } - - QQuickView::keyPressEvent(vEvent); - } }