Commit 26b51c7a authored by Marco Bubke's avatar Marco Bubke Committed by Thomas Hartmann

Revert "QmlDesigner.NodeInstanceView: introducing delay in setPathToQt()"

This reverts commit 94011a12. It was a
hot fix which is not needed anymore.

Change-Id: I64ad1d6be54982ddd9b0ef790508a15bd0f73f72
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 54ed620f
......@@ -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
......
......@@ -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();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment