diff --git a/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h b/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h index c20f257e0b8b392ecf3134f2d62df2e246f96eb5..2b7ef3180caa11452d96101d9959b616cce25a8e 100644 --- a/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h +++ b/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h @@ -43,7 +43,6 @@ #include <QWeakPointer> #include <QRectF> #include <QTime> -#include <QTimer> QT_BEGIN_NAMESPACE class QDeclarativeEngine; @@ -197,11 +196,9 @@ private: // functions void resetVerticalAnchors(const ModelNode &node); void restartProcess(); - void restartProcessDelayed(); private slots: void handleChrash(); - void restartProcessDelayedTimeOut(); private: //variables NodeInstance m_rootNodeInstance; @@ -216,8 +213,6 @@ private: //variables QTime m_lastCrashTime; NodeInstanceServerInterface::RunModus m_runModus; QString m_pathToQt; - bool m_puppetRestarted; - QTimer m_singleShotTimerRestartProcessDelayed; }; } // namespace ProxyNodeInstanceView diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index cfed9dd14cada9c5767b845f8dc689bf53321b22..6e76c66cff320ebfff19d2d6d3047b0646f8f103 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -103,13 +103,9 @@ d too. NodeInstanceView::NodeInstanceView(QObject *parent, NodeInstanceServerInterface::RunModus runModus) : AbstractView(parent), m_baseStatePreviewImage(QSize(100, 100), QImage::Format_ARGB32), - m_runModus(runModus), - m_puppetRestarted(false) + m_runModus(runModus) { m_baseStatePreviewImage.fill(0xFFFFFF); - m_singleShotTimerRestartProcessDelayed.setSingleShot(true); - m_singleShotTimerRestartProcessDelayed.setInterval(400); - connect(&m_singleShotTimerRestartProcessDelayed, SIGNAL(timeout()), this, SLOT(restartProcessDelayedTimeOut())); } @@ -194,15 +190,10 @@ void NodeInstanceView::handleChrash() emit qmlPuppetCrashed(); } -void NodeInstanceView::restartProcessDelayedTimeOut() -{ - if (!m_puppetRestarted) - restartProcess(); -} + void NodeInstanceView::restartProcess() { - m_puppetRestarted = true; if (model()) { delete nodeInstanceServer(); @@ -220,12 +211,6 @@ void NodeInstanceView::restartProcess() } } -void NodeInstanceView::restartProcessDelayed() -{ - m_puppetRestarted = false; - m_singleShotTimerRestartProcessDelayed.start(); -} - void NodeInstanceView::nodeCreated(const ModelNode &createdNode) { NodeInstance instance = loadNode(createdNode); @@ -1136,16 +1121,7 @@ void NodeInstanceView::setPathToQt(const QString &pathToQt) { if (m_pathToQt != pathToQt) { m_pathToQt = pathToQt; - - /* The restart is done delayed, because when creating a new project we switch to that project - * before we open the new file. This means the user can get an error about a missing puppet, - * because the new project is based on another Qt version. - * - * See QTCREATORBUG-8756 for more details. - * - */ - - restartProcessDelayed(); + restartProcess(); } }