summaryrefslogtreecommitdiff
path: root/src/plugins/git/stashdialog.cpp
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2012-04-17 08:01:25 +0200
committerhjk <qthjk@ovi.com>2012-04-17 09:53:44 +0200
commit5b0bf616401624e28ba1c0e94e474c2da2e6350a (patch)
tree661e3e7490e2f8b718c77f03f37bccb806ed7b18 /src/plugins/git/stashdialog.cpp
parent37e38530905b31607d07bea1ca65618d95c8f380 (diff)
downloadqt-creator-5b0bf616401624e28ba1c0e94e474c2da2e6350a.tar.gz
qtcassert: move actual printing to separate function and enforce style
This also allows simple setting of breakpoints on failed asserts. Change-Id: I6dd84cbfaf659d57e39f3447386cebc0221b2b84 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins/git/stashdialog.cpp')
-rw-r--r--src/plugins/git/stashdialog.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/git/stashdialog.cpp b/src/plugins/git/stashdialog.cpp
index 60401364ee..aa384daf63 100644
--- a/src/plugins/git/stashdialog.cpp
+++ b/src/plugins/git/stashdialog.cpp
@@ -211,7 +211,7 @@ void StashDialog::deleteAll()
void StashDialog::deleteSelection()
{
const QList<int> rows = selectedRows();
- QTC_ASSERT(!rows.isEmpty(), return)
+ QTC_ASSERT(!rows.isEmpty(), return);
const QString title = tr("Delete Stashes");
if (!ask(title, tr("Do you want to delete %n stash(es)?", 0, rows.size())))
return;
@@ -229,7 +229,7 @@ void StashDialog::deleteSelection()
void StashDialog::showCurrent()
{
const int index = currentRow();
- QTC_ASSERT(index >= 0, return)
+ QTC_ASSERT(index >= 0, return);
gitClient()->show(m_repository, m_model->at(index).name);
}
@@ -302,7 +302,7 @@ bool StashDialog::promptForRestore(QString *stash,
if (gitClient()->synchronousStash(m_repository, QString(), GitClient::StashPromptDescription).isEmpty())
return false;
*stash = nextStash(*stash); // Our stash id to be restored changed
- QTC_ASSERT(!stash->isEmpty(), return false)
+ QTC_ASSERT(!stash->isEmpty(), return false);
break;
case ModifiedRepositoryDiscard:
if (!gitClient()->synchronousReset(m_repository))
@@ -336,7 +336,7 @@ static inline QString msgRestoreFailedTitle(const QString &stash)
void StashDialog::restoreCurrent()
{
const int index = currentRow();
- QTC_ASSERT(index >= 0, return)
+ QTC_ASSERT(index >= 0, return);
QString errorMessage;
QString name = m_model->at(index).name;
// Make sure repository is not modified, restore. The command will
@@ -354,8 +354,8 @@ void StashDialog::restoreCurrent()
void StashDialog::restoreCurrentInBranch()
{
const int index = currentRow();
- QTC_ASSERT(index >= 0, return)
- QString errorMessage;
+ QTC_ASSERT(index >= 0, return);
+ QString errorMessage;
QString branch;
QString name = m_model->at(index).name;
const bool success = promptForRestore(&name, &branch, &errorMessage)