Commit f2efee2f authored by blammit's avatar blammit

Merge pull request #17 from nemomobile/delayed-exit-safely

[transfer-engine] Delay transfer engine exit
parents 00c749c3 9f9c5b47
......@@ -178,6 +178,16 @@ void TransferEnginePrivate::exitSafely()
{
if (!m_activityMonitor->activeTransfers()) {
qDebug() << Q_FUNC_INFO;
QTimer::singleShot(2000, this, SLOT(delayedExitSafely()));
}
}
void TransferEnginePrivate::delayedExitSafely()
{
if (m_activityMonitor->activeTransfers()) {
qDebug() << "Keeping transfer engine alive, transfers still ongoing";
} else {
qDebug() << "Stopping transfer engine";
qApp->exit();
}
}
......
......@@ -118,6 +118,7 @@ public:
public Q_SLOTS:
void exitSafely();
void delayedExitSafely();
void enabledPluginsCheck();
void cleanupExpiredTransfers(const QList<int> &expiredIds);
void pluginDirChanged();
......
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