summaryrefslogtreecommitdiff
path: root/src/plugins/cpaster
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/cpaster
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/cpaster')
-rw-r--r--src/plugins/cpaster/codepasterprotocol.cpp6
-rw-r--r--src/plugins/cpaster/cpasterplugin.cpp8
-rw-r--r--src/plugins/cpaster/kdepasteprotocol.cpp4
-rw-r--r--src/plugins/cpaster/pastebindotcaprotocol.cpp2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/cpaster/codepasterprotocol.cpp b/src/plugins/cpaster/codepasterprotocol.cpp
index 2d720e872f..bf677fe092 100644
--- a/src/plugins/cpaster/codepasterprotocol.cpp
+++ b/src/plugins/cpaster/codepasterprotocol.cpp
@@ -99,7 +99,7 @@ bool CodePasterProtocol::checkConfiguration(QString *errorMessage)
void CodePasterProtocol::fetch(const QString &id)
{
- QTC_ASSERT(!m_fetchReply, return; )
+ QTC_ASSERT(!m_fetchReply, return);
QString hostName = m_page->hostName();
const QString httpPrefix = QLatin1String("http://");
@@ -124,7 +124,7 @@ void CodePasterProtocol::fetch(const QString &id)
void CodePasterProtocol::list()
{
- QTC_ASSERT(!m_listReply, return; )
+ QTC_ASSERT(!m_listReply, return);
QString hostName = m_page->hostName();
QString link = QLatin1String("http://");
@@ -140,7 +140,7 @@ void CodePasterProtocol::paste(const QString &text,
const QString &comment,
const QString &description)
{
- QTC_ASSERT(!m_pasteReply, return; )
+ QTC_ASSERT(!m_pasteReply, return);
const QString hostName = m_page->hostName();
QByteArray data = "command=processcreate&submit=submit&highlight_type=0&description=";
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp
index 9d6da9f2ff..20e5b85d26 100644
--- a/src/plugins/cpaster/cpasterplugin.cpp
+++ b/src/plugins/cpaster/cpasterplugin.cpp
@@ -88,19 +88,19 @@ CodePasterService::CodePasterService(QObject *parent) :
void CodePasterService::postText(const QString &text, const QString &mimeType)
{
- QTC_ASSERT(CodepasterPlugin::instance(), return; )
+ QTC_ASSERT(CodepasterPlugin::instance(), return);
CodepasterPlugin::instance()->post(text, mimeType);
}
void CodePasterService::postCurrentEditor()
{
- QTC_ASSERT(CodepasterPlugin::instance(), return; )
+ QTC_ASSERT(CodepasterPlugin::instance(), return);
CodepasterPlugin::instance()->postEditor();
}
void CodePasterService::postClipboard()
{
- QTC_ASSERT(CodepasterPlugin::instance(), return; )
+ QTC_ASSERT(CodepasterPlugin::instance(), return);
CodepasterPlugin::instance()->postClipboard();
}
@@ -366,7 +366,7 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
m_fetchedSnippets.push_back(fileName);
// Open editor with title.
Core::IEditor* editor = EditorManager::instance()->openEditor(fileName, Core::Id(), EditorManager::ModeSwitch);
- QTC_ASSERT(editor, return)
+ QTC_ASSERT(editor, return);
editor->setDisplayName(titleDescription);
}
diff --git a/src/plugins/cpaster/kdepasteprotocol.cpp b/src/plugins/cpaster/kdepasteprotocol.cpp
index 101cbd79fa..c73c6de41c 100644
--- a/src/plugins/cpaster/kdepasteprotocol.cpp
+++ b/src/plugins/cpaster/kdepasteprotocol.cpp
@@ -108,7 +108,7 @@ void KdePasteProtocol::paste(const QString &text,
{
Q_UNUSED(comment);
Q_UNUSED(description);
- QTC_ASSERT(!m_pasteReply, return;)
+ QTC_ASSERT(!m_pasteReply, return);
// Format body
QByteArray pasteData = "api_submit=true&mode=xml";
@@ -162,7 +162,7 @@ void KdePasteProtocol::pasteFinished()
void KdePasteProtocol::fetch(const QString &id)
{
- QTC_ASSERT(!m_fetchReply, return;)
+ QTC_ASSERT(!m_fetchReply, return);
// Did we get a complete URL or just an id?
m_fetchId = id;
diff --git a/src/plugins/cpaster/pastebindotcaprotocol.cpp b/src/plugins/cpaster/pastebindotcaprotocol.cpp
index 8448b426dd..d393efb354 100644
--- a/src/plugins/cpaster/pastebindotcaprotocol.cpp
+++ b/src/plugins/cpaster/pastebindotcaprotocol.cpp
@@ -58,7 +58,7 @@ unsigned PasteBinDotCaProtocol::capabilities() const
void PasteBinDotCaProtocol::fetch(const QString &id)
{
- QTC_ASSERT(!m_fetchReply, return)
+ QTC_ASSERT(!m_fetchReply, return);
const QString url = QLatin1String(urlC);
const QString rawPostFix = QLatin1String("raw/");
// Create link as ""http://pastebin.ca/raw/[id]"