Permalink
Browse files

svn connection are queued.

  • Loading branch information...
1 parent 76be9d2 commit 4b04844f01f9577091410eb71abfc313bd80507b @bakulf committed Feb 14, 2011
@@ -70,11 +70,13 @@ void BBActionAdd::runAdd()
BBSvn *svn = new BBSvn(this);
connect(svn,
SIGNAL(done(bool)),
- SLOT(onSvnDone(bool)));
+ SLOT(onSvnDone(bool)),
+ Qt::QueuedConnection);
connect(svn,
SIGNAL(done(bool)),
svn,
- SLOT(deleteLater()));
+ SLOT(deleteLater()),
+ Qt::QueuedConnection);
svn->addFile(list);
}
@@ -42,11 +42,13 @@ void BBActionCleanup::run()
BBSvn *svn = new BBSvn(this);
connect(svn,
SIGNAL(done(bool)),
- SLOT(onSvnDone(bool)));
+ SLOT(onSvnDone(bool)),
+ Qt::QueuedConnection);
connect(svn,
SIGNAL(done(bool)),
svn,
- SLOT(deleteLater()));
+ SLOT(deleteLater()),
+ Qt::QueuedConnection);
svn->cleanup();
}
@@ -46,11 +46,13 @@ void BBActionCommit::run()
BBSvn *svn = new BBSvn(this);
connect(svn,
SIGNAL(done(bool)),
- SLOT(onSvnDone(bool)));
+ SLOT(onSvnDone(bool)),
+ Qt::QueuedConnection);
connect(svn,
SIGNAL(done(bool)),
svn,
- SLOT(deleteLater()));
+ SLOT(deleteLater()),
+ Qt::QueuedConnection);
svn->commit();
}
@@ -108,11 +110,13 @@ void BBActionCommit::onLocalChangesDone(bool status)
BBSvn *svn = new BBSvn(this);
connect(svn,
SIGNAL(done(bool)),
- SLOT(onSvnDone(bool)));
+ SLOT(onSvnDone(bool)),
+ Qt::QueuedConnection);
connect(svn,
SIGNAL(done(bool)),
svn,
- SLOT(deleteLater()));
+ SLOT(deleteLater()),
+ Qt::QueuedConnection);
svn->commit();
}
@@ -51,11 +51,13 @@ void BBActionDelete::run()
BBSvn *svn = new BBSvn(this);
connect(svn,
SIGNAL(done(bool)),
- SLOT(onSvnDone(bool)));
+ SLOT(onSvnDone(bool)),
+ Qt::QueuedConnection);
connect(svn,
SIGNAL(done(bool)),
svn,
- SLOT(deleteLater()));
+ SLOT(deleteLater()),
+ Qt::QueuedConnection);
svn->deleteFile(m_filename);
}
@@ -38,7 +38,8 @@ void BBActionLocalChanges::run()
m_svn = new BBSvn(this);
connect(m_svn,
SIGNAL(done(bool)),
- SLOT(onSvnDone(bool)));
+ SLOT(onSvnDone(bool)),
+ Qt::QueuedConnection);
m_svn->status();
}
@@ -78,11 +78,13 @@ void BBActionObstructed::run()
BBSvn *svn = new BBSvn(this);
connect(svn,
SIGNAL(done(bool)),
- SLOT(onSvnDone(bool)));
+ SLOT(onSvnDone(bool)),
+ Qt::QueuedConnection);
connect(svn,
SIGNAL(done(bool)),
svn,
- SLOT(deleteLater()));
+ SLOT(deleteLater()),
+ Qt::QueuedConnection);
svn->deleteFile(m_dirname);
}
@@ -34,7 +34,8 @@ void BBActionRemoteChanges::run()
m_svn = new BBSvn(this);
connect(m_svn,
SIGNAL(done(bool)),
- SLOT(onLocalSvnDone(bool)));
+ SLOT(onLocalSvnDone(bool)),
+ Qt::QueuedConnection);
m_svn->localInfo();
}
@@ -55,7 +56,8 @@ void BBActionRemoteChanges::onLocalSvnDone(bool status)
m_svn = new BBSvn(this);
connect(m_svn,
SIGNAL(done(bool)),
- SLOT(onRemoteSvnDone(bool)));
+ SLOT(onRemoteSvnDone(bool)),
+ Qt::QueuedConnection);
m_svn->remoteInfo(info->URL());
}
@@ -44,7 +44,8 @@ void BBActionUpdate::run()
m_svn = new BBSvn(this);
connect(m_svn,
SIGNAL(done(bool)),
- SLOT(onSvnDone(bool)));
+ SLOT(onSvnDone(bool)),
+ Qt::QueuedConnection);
m_svn->update();
}
View
@@ -181,10 +181,11 @@ void BBConflict::apply()
{
BBDEBUG;
- m_svn = new BBSvn();
+ m_svn = new BBSvn(this);
connect(m_svn,
SIGNAL(done(bool)),
- SLOT(applyMerge(bool)));
+ SLOT(applyMerge(bool)),
+ Qt::QueuedConnection);
BBApplication::instance()->observer()->operationOnFileSystemRef();
View
@@ -64,7 +64,8 @@ BBLogs::BBLogs(QObject *parent) :
m_svn = new BBSvn(this);
connect(m_svn,
SIGNAL(done(bool)),
- SLOT(onLocalInfoDone(bool)));
+ SLOT(onLocalInfoDone(bool)),
+ Qt::QueuedConnection);
m_svn->localInfo();
}
@@ -91,7 +92,8 @@ void BBLogs::onLocalInfoDone(bool status)
m_svn->disconnect(this);
connect(m_svn,
SIGNAL(done(bool)),
- SLOT(onRemoteLogsDone(bool)));
+ SLOT(onRemoteLogsDone(bool)),
+ Qt::QueuedConnection);
m_url = info->URL();
m_svn->remoteLog(m_url);
@@ -225,7 +227,8 @@ void BBLogs::onOpen()
m_svn->disconnect(this);
connect(m_svn,
SIGNAL(done(bool)),
- SLOT(onOpenDone(bool)));
+ SLOT(onOpenDone(bool)),
+ Qt::QueuedConnection);
m_svn->restoreFile(QString("%1%2").arg(m_url).arg(item->file()), item->revision(), m_tempFile);
}
@@ -95,7 +95,8 @@ void BBPreferencesLastPage::initializePage()
m_svn = new BBSvn(this);
connect(m_svn,
SIGNAL(done(bool)),
- SLOT(onSvnDone(bool)));
+ SLOT(onSvnDone(bool)),
+ Qt::QueuedConnection);
connect(m_svn,
SIGNAL(readyReadStandardOutput()),
SLOT(onSvnRead()));
View
@@ -58,10 +58,16 @@ void BBSendReceive::checkCommitStatus()
m_commitStatus = (BBCommitStatus) ((int)m_commitStatus + 1);
- if (m_commitStatus == BBCommitOk) {
- onCommitTimeout();
- } else {
- QTimer::singleShot(BB_COMMIT_TIMEOUT, this, SLOT(onCommitTimeout()));
+ switch (m_commitStatus) {
+ case BBCommitUnknown:
+ case BBCommitOk:
+ case BBCommitFailed1:
+ onCommitTimeout();
+ break;
+
+ default:
+ QTimer::singleShot(BB_COMMIT_TIMEOUT, this, SLOT(onCommitTimeout()));
+ break;
}
}

0 comments on commit 4b04844

Please sign in to comment.