Skip to content
Snippets Groups Projects
Commit d0cbac90 authored by ck's avatar ck
Browse files

Maemo: Make sure deploying stops when build step thread finishes.

This is important for the "canceled" case and doesn't hurt otherwise.
parent 3fe09f81
No related branches found
No related tags found
No related merge requests found
...@@ -88,6 +88,7 @@ void MaemoDeployStep::run(QFutureInterface<bool> &fi) ...@@ -88,6 +88,7 @@ void MaemoDeployStep::run(QFutureInterface<bool> &fi)
QTimer::singleShot(0, this, SLOT(start())); QTimer::singleShot(0, this, SLOT(start()));
MaemoDeployEventHandler eventHandler(this, fi); MaemoDeployEventHandler eventHandler(this, fi);
connect (&eventHandler, SIGNAL(destroyed()), this, SLOT(stop()));
} }
BuildStepConfigWidget *MaemoDeployStep::createConfigWidget() BuildStepConfigWidget *MaemoDeployStep::createConfigWidget()
...@@ -176,8 +177,8 @@ void MaemoDeployStep::stop() ...@@ -176,8 +177,8 @@ void MaemoDeployStep::stop()
} else if (!m_uploadsInProgress.isEmpty() || !m_linksInProgress.isEmpty()) { } else if (!m_uploadsInProgress.isEmpty() || !m_linksInProgress.isEmpty()) {
m_uploadsInProgress.clear(); m_uploadsInProgress.clear();
m_linksInProgress.clear(); m_linksInProgress.clear();
m_uploader->closeChannel();
disconnect(m_uploader.data(), 0, this, 0); disconnect(m_uploader.data(), 0, this, 0);
m_uploader->closeChannel();
} }
if (m_connection) if (m_connection)
disconnect(m_connection.data(), 0, this, 0); disconnect(m_connection.data(), 0, this, 0);
......
...@@ -74,6 +74,7 @@ signals: ...@@ -74,6 +74,7 @@ signals:
private slots: private slots:
void start(); void start();
void stop();
void handleConnected(); void handleConnected();
void handleConnectionFailure(); void handleConnectionFailure();
void handleSftpChannelInitialized(); void handleSftpChannelInitialized();
...@@ -95,7 +96,6 @@ private: ...@@ -95,7 +96,6 @@ private:
virtual bool fromMap(const QVariantMap &map); virtual bool fromMap(const QVariantMap &map);
void ctor(); void ctor();
void stop();
void raiseError(const QString &error); void raiseError(const QString &error);
void writeOutput(const QString &text, void writeOutput(const QString &text,
const QTextCharFormat &format = QTextCharFormat()); const QTextCharFormat &format = QTextCharFormat());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment