aboutsummaryrefslogtreecommitdiffstats
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
parent37e38530905b31607d07bea1ca65618d95c8f380 (diff)
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>
-rw-r--r--doc/api/examples/webpagewizard/webpagewizard.cpp5
-rw-r--r--src/libs/utils/fileinprojectfinder.cpp1
-rw-r--r--src/libs/utils/fileutils.cpp8
-rw-r--r--src/libs/utils/pathchooser.cpp2
-rw-r--r--src/libs/utils/persistentsettings.cpp8
-rw-r--r--src/libs/utils/qtcassert.cpp42
-rw-r--r--src/libs/utils/qtcassert.h19
-rw-r--r--src/libs/utils/synchronousprocess.cpp2
-rw-r--r--src/libs/utils/tcpportsgatherer.cpp4
-rw-r--r--src/libs/utils/textfileformat.cpp4
-rw-r--r--src/libs/utils/utils-lib.pri3
-rw-r--r--src/libs/utils/utils.qbs1
-rw-r--r--src/libs/utils/winutils.cpp2
-rw-r--r--src/plugins/analyzerbase/analyzerutils.cpp2
-rw-r--r--src/plugins/bineditor/bineditor.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp2
-rw-r--r--src/plugins/coreplugin/actionmanager/commandsfile.cpp2
-rw-r--r--src/plugins/coreplugin/basefilewizard.cpp2
-rw-r--r--src/plugins/coreplugin/editormanager/openeditorswindow.cpp2
-rw-r--r--src/plugins/coreplugin/editortoolbar.cpp8
-rw-r--r--src/plugins/coreplugin/fileiconprovider.cpp2
-rw-r--r--src/plugins/coreplugin/mimedatabase.cpp4
-rw-r--r--src/plugins/coreplugin/vcsmanager.cpp2
-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
-rw-r--r--src/plugins/cvs/checkoutwizard.cpp2
-rw-r--r--src/plugins/cvs/cvsplugin.cpp42
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp28
-rw-r--r--src/plugins/debugger/cdb/cdbparsehelpers.cpp4
-rw-r--r--src/plugins/debugger/commonoptionspage.cpp2
-rw-r--r--src/plugins/debugger/debuggermainwindow.cpp6
-rw-r--r--src/plugins/debugger/debuggerrunner.cpp2
-rw-r--r--src/plugins/debugger/debuggersourcepathmappingwidget.cpp4
-rw-r--r--src/plugins/debugger/debuggertoolchaincombobox.cpp2
-rw-r--r--src/plugins/debugger/gdb/codagdbadapter.cpp6
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp26
-rw-r--r--src/plugins/debugger/gdb/gdbmi.cpp1
-rw-r--r--src/plugins/debugger/memoryagent.cpp10
-rw-r--r--src/plugins/debugger/pdb/pdbengine.cpp2
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp4
-rw-r--r--src/plugins/debugger/watchdelegatewidgets.cpp2
-rw-r--r--src/plugins/debugger/watchhandler.cpp2
-rw-r--r--src/plugins/debugger/watchwindow.cpp2
-rw-r--r--src/plugins/designer/formeditorw.cpp4
-rw-r--r--src/plugins/designer/qtcreatorintegration.cpp2
-rw-r--r--src/plugins/designer/resourcehandler.cpp2
-rw-r--r--src/plugins/designer/settingsmanager.cpp14
-rw-r--r--src/plugins/git/gitclient.cpp2
-rw-r--r--src/plugins/git/gitorious/gitoriousclonewizard.cpp2
-rw-r--r--src/plugins/git/gitplugin.cpp32
-rw-r--r--src/plugins/git/stashdialog.cpp12
-rw-r--r--src/plugins/locator/commandlocator.cpp4
-rw-r--r--src/plugins/mercurial/mercurialplugin.cpp37
-rw-r--r--src/plugins/perforce/perforceplugin.cpp36
-rw-r--r--src/plugins/perforce/perforcesettings.cpp3
-rw-r--r--src/plugins/projectexplorer/appoutputpane.cpp8
-rw-r--r--src/plugins/projectexplorer/customwizard/customwizard.cpp6
-rw-r--r--src/plugins/projectexplorer/customwizard/customwizardpage.cpp2
-rw-r--r--src/plugins/projectexplorer/customwizard/customwizardparameters.cpp4
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp20
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp4
-rw-r--r--src/plugins/projectexplorer/settingsaccessor.cpp3
-rw-r--r--src/plugins/projectexplorer/taskmodel.cpp4
-rw-r--r--src/plugins/projectexplorer/toolchainconfigwidget.cpp10
-rw-r--r--src/plugins/qmlprojectmanager/fileformat/filefilteritems.cpp2
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp2
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/classlist.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanager.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/testwizard.cpp2
-rw-r--r--src/plugins/qtsupport/debugginghelperbuildtask.cpp2
-rw-r--r--src/plugins/qtsupport/qtversionmanager.cpp5
-rw-r--r--src/plugins/subversion/checkoutwizard.cpp2
-rw-r--r--src/plugins/subversion/subversionplugin.cpp30
-rw-r--r--src/plugins/texteditor/basetextdocument.cpp2
-rw-r--r--src/plugins/texteditor/basetextdocumentlayout.cpp4
-rw-r--r--src/plugins/texteditor/fontsettings.cpp7
-rw-r--r--src/plugins/texteditor/fontsettingspage.cpp4
-rw-r--r--src/plugins/texteditor/tooltip/tipcontents.cpp2
-rw-r--r--src/plugins/texteditor/tooltip/tipfactory.cpp2
-rw-r--r--src/plugins/texteditor/tooltip/tips.cpp6
-rw-r--r--src/plugins/valgrind/callgrind/callgrindcontroller.cpp5
-rw-r--r--src/plugins/valgrind/callgrind/callgrinddatamodel.cpp2
-rw-r--r--src/plugins/valgrind/callgrind/callgrindparsedata.cpp2
-rw-r--r--src/plugins/valgrind/callgrind/callgrindparser.cpp2
-rw-r--r--src/plugins/valgrind/callgrind/callgrindproxymodel.cpp4
-rw-r--r--src/plugins/valgrind/callgrindtextmark.cpp4
-rw-r--r--src/plugins/valgrind/callgrindtool.cpp10
-rw-r--r--src/plugins/valgrind/suppressiondialog.cpp2
-rw-r--r--src/plugins/vcsbase/checkoutjobs.cpp2
-rw-r--r--src/plugins/vcsbase/checkoutprogresswizardpage.cpp2
-rw-r--r--src/plugins/vcsbase/vcsbaseeditor.cpp6
-rw-r--r--src/plugins/vcsbase/vcsbaseplugin.cpp14
95 files changed, 347 insertions, 297 deletions
diff --git a/doc/api/examples/webpagewizard/webpagewizard.cpp b/doc/api/examples/webpagewizard/webpagewizard.cpp
index 3089cc5cce..ca7ef77ef6 100644
--- a/doc/api/examples/webpagewizard/webpagewizard.cpp
+++ b/doc/api/examples/webpagewizard/webpagewizard.cpp
@@ -84,12 +84,11 @@ QWizard *WebPageWizard::createWizardDialog(QWidget *parent,
}
Core::GeneratedFiles
- WebPageWizard::generateFiles(const QWizard *w,
- QString *) const
+ WebPageWizard::generateFiles(const QWizard *w, QString *) const
{
Core::GeneratedFiles files;
const WebContentWizardDialog *dialog = qobject_cast<const WebContentWizardDialog*>(w);
- QTC_ASSERT(dialog, return files; )
+ QTC_ASSERT(dialog, return files);
const QString fileName = Core::BaseFileWizard::buildFileName(dialog->path(), dialog->fileName(), QLatin1String("html"));
diff --git a/src/libs/utils/fileinprojectfinder.cpp b/src/libs/utils/fileinprojectfinder.cpp
index bdd1c860f1..28dba4b2fc 100644
--- a/src/libs/utils/fileinprojectfinder.cpp
+++ b/src/libs/utils/fileinprojectfinder.cpp
@@ -33,6 +33,7 @@
#include "fileinprojectfinder.h"
#include <utils/qtcassert.h>
+#include <QDebug>
#include <QFileInfo>
#include <QUrl>
diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp
index cb62ca4172..e266345c9d 100644
--- a/src/libs/utils/fileutils.cpp
+++ b/src/libs/utils/fileutils.cpp
@@ -36,6 +36,7 @@
#include "qtcassert.h"
#include <QDir>
+#include <QDebug>
#include <QFileInfo>
#include <QTemporaryFile>
#include <QDateTime>
@@ -208,19 +209,18 @@ QString FileUtils::resolveSymlinks(const QString &path)
return f.filePath();
}
-
QByteArray FileReader::fetchQrc(const QString &fileName)
{
- QTC_ASSERT(fileName.startsWith(QLatin1Char(':')), return QByteArray())
+ QTC_ASSERT(fileName.startsWith(QLatin1Char(':')), return QByteArray());
QFile file(fileName);
bool ok = file.open(QIODevice::ReadOnly);
- QTC_ASSERT(ok, qWarning() << fileName << "not there!"; return QByteArray())
+ QTC_ASSERT(ok, qWarning() << fileName << "not there!"; return QByteArray());
return file.readAll();
}
bool FileReader::fetch(const QString &fileName, QIODevice::OpenMode mode)
{
- QTC_ASSERT(!(mode & ~(QIODevice::ReadOnly | QIODevice::Text)), return false)
+ QTC_ASSERT(!(mode & ~(QIODevice::ReadOnly | QIODevice::Text)), return false);
QFile file(fileName);
if (!file.open(QIODevice::ReadOnly | mode)) {
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp
index dfcb3a813d..8fae4cc45f 100644
--- a/src/libs/utils/pathchooser.cpp
+++ b/src/libs/utils/pathchooser.cpp
@@ -131,7 +131,7 @@ bool BinaryVersionToolTipEventFilter::eventFilter(QObject *o, QEvent *e)
if (e->type() != QEvent::ToolTip)
return false;
QLineEdit *le = qobject_cast<QLineEdit *>(o);
- QTC_ASSERT(le, return false; )
+ QTC_ASSERT(le, return false);
const QString binary = le->text();
if (!binary.isEmpty()) {
diff --git a/src/libs/utils/persistentsettings.cpp b/src/libs/utils/persistentsettings.cpp
index 82d470c5be..3c8da84510 100644
--- a/src/libs/utils/persistentsettings.cpp
+++ b/src/libs/utils/persistentsettings.cpp
@@ -130,7 +130,7 @@ struct ParseValueStackEntry
ParseValueStackEntry::ParseValueStackEntry(const QVariant &aSimpleValue, const QString &k) :
type(aSimpleValue.type()), key(k), simpleValue(aSimpleValue)
{
- QTC_ASSERT(simpleValue.isValid(), return ; )
+ QTC_ASSERT(simpleValue.isValid(), return);
}
QVariant ParseValueStackEntry::value() const
@@ -250,10 +250,10 @@ bool ParseContext::handleEndElement(const QStringRef &name)
{
const Element e = element(name);
if (ParseContext::isValueElement(e)) {
- QTC_ASSERT(!m_valueStack.isEmpty(), return true; )
+ QTC_ASSERT(!m_valueStack.isEmpty(), return true);
const ParseValueStackEntry top = m_valueStack.pop();
if (m_valueStack.isEmpty()) { // Last element? -> Done with that variable.
- QTC_ASSERT(!m_currentVariableName.isEmpty(), return true; )
+ QTC_ASSERT(!m_currentVariableName.isEmpty(), return true);
m_result.insert(m_currentVariableName, top.value());
m_currentVariableName.clear();
return false;
@@ -286,7 +286,7 @@ QVariant ParseContext::readSimpleValue(QXmlStreamReader &r, const QXmlStreamAttr
const QString type = attributes.value(typeAttribute).toString();
const QString text = r.readElementText();
if (type == QLatin1String("QChar")) { // Workaround: QTBUG-12345
- QTC_ASSERT(text.size() == 1, return QVariant(); )
+ QTC_ASSERT(text.size() == 1, return QVariant());
return QVariant(QChar(text.at(0)));
}
QVariant value;
diff --git a/src/libs/utils/qtcassert.cpp b/src/libs/utils/qtcassert.cpp
new file mode 100644
index 0000000000..97b4332d8f
--- /dev/null
+++ b/src/libs/utils/qtcassert.cpp
@@ -0,0 +1,42 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#include "qtcassert.h"
+
+namespace Utils {
+
+void writeAssertLocation(const char *msg)
+{
+ qDebug("SOFT ASSERT: %s", msg);
+}
+
+} // namespace Utils
diff --git a/src/libs/utils/qtcassert.h b/src/libs/utils/qtcassert.h
index 11a0df20b3..d533cac0e1 100644
--- a/src/libs/utils/qtcassert.h
+++ b/src/libs/utils/qtcassert.h
@@ -33,19 +33,20 @@
#ifndef QTC_ASSERT_H
#define QTC_ASSERT_H
-#include <QDebug>
+#include "utils_global.h"
-#define QTC_ASSERT_STRINGIFY_INTERNAL(x) #x
-#define QTC_ASSERT_STRINGIFY(x) QTC_ASSERT_STRINGIFY_INTERNAL(x)
+namespace Utils { QTCREATOR_UTILS_EXPORT void writeAssertLocation(const char *msg); }
-// we do not use the 'do {...} while (0)' idiom here to be able to use
-// 'break' and 'continue' as 'actions'.
+#define QTC_ASSERT_STRINGIFY_HELPER(x) #x
+#define QTC_ASSERT_STRINGIFY(x) QTC_ASSERT_STRINGIFY_HELPER(x)
+#define QTC_ASSERT_STRING(cond) ::Utils::writeAssertLocation(\
+ "\"" cond"\" in file " __FILE__ ", line " QTC_ASSERT_STRINGIFY(__LINE__))
-#define QTC_ASSERT(cond, action) \
- if(cond){}else{qDebug()<<"SOFT ASSERT: \""#cond"\" in file " __FILE__ ", line " QTC_ASSERT_STRINGIFY(__LINE__);action;}
+// The 'do {...} while (0)' idiom is not used for the main block here to be
+// able to use 'break' and 'continue' as 'actions'.
-#define QTC_CHECK(cond) \
- if(cond){}else{qDebug()<<"SOFT ASSERT: \""#cond"\" in file " __FILE__ ", line " QTC_ASSERT_STRINGIFY(__LINE__);}
+#define QTC_ASSERT(cond, action) if (cond) {} else { QTC_ASSERT_STRING(#cond); action; } do {} while (0)
+#define QTC_CHECK(cond) if (cond) {} else { QTC_ASSERT_STRING(#cond); } do {} while (0)
#endif // QTC_ASSERT_H
diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp
index 2a9790d9bd..7223050188 100644
--- a/src/libs/utils/synchronousprocess.cpp
+++ b/src/libs/utils/synchronousprocess.cpp
@@ -553,7 +553,7 @@ bool SynchronousProcess::readDataFromProcess(QProcess &p, int timeOutMS,
return false;
}
- QTC_ASSERT(p.readChannel() == QProcess::StandardOutput, return false)
+ QTC_ASSERT(p.readChannel() == QProcess::StandardOutput, return false);
// Keep the process running until it has no longer has data
bool finished = false;
diff --git a/src/libs/utils/tcpportsgatherer.cpp b/src/libs/utils/tcpportsgatherer.cpp
index 636150dcb9..212d8866bd 100644
--- a/src/libs/utils/tcpportsgatherer.cpp
+++ b/src/libs/utils/tcpportsgatherer.cpp
@@ -32,9 +32,11 @@
#include "tcpportsgatherer.h"
#include "qtcassert.h"
+
+#include <QDebug>
#include <QFile>
-#include <QStringList>
#include <QProcess>
+#include <QStringList>
#ifdef Q_OS_WIN
#include <QLibrary>
diff --git a/src/libs/utils/textfileformat.cpp b/src/libs/utils/textfileformat.cpp
index ec592ead18..81bee04dd7 100644
--- a/src/libs/utils/textfileformat.cpp
+++ b/src/libs/utils/textfileformat.cpp
@@ -150,7 +150,7 @@ bool decodeTextFileContent(const QByteArray &dataBA,
Target *target,
void (Target::*appendFunction)(const QString &))
{
- QTC_ASSERT(format.codec, return false; )
+ QTC_ASSERT(format.codec, return false);
QTextCodec::ConverterState state;
bool hasDecodingError = false;
@@ -283,7 +283,7 @@ TextFileFormat::ReadResult
bool TextFileFormat::writeFile(const QString &fileName, QString plainText, QString *errorString) const
{
- QTC_ASSERT(codec, return false;)
+ QTC_ASSERT(codec, return false);
// Does the user want CRLF? If that is native,
// let QFile do the work, else manually add.
diff --git a/src/libs/utils/utils-lib.pri b/src/libs/utils/utils-lib.pri
index 6327f3fbdc..6026acf49e 100644
--- a/src/libs/utils/utils-lib.pri
+++ b/src/libs/utils/utils-lib.pri
@@ -98,7 +98,8 @@ SOURCES += $$PWD/environment.cpp \
$$PWD/portlist.cpp \
$$PWD/tcpportsgatherer.cpp \
$$PWD/appmainwindow.cpp \
- $$PWD/basetreeview.cpp
+ $$PWD/basetreeview.cpp \
+ $$PWD/qtcassert.cpp
win32 {
SOURCES += \
diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs
index 2d2a937c70..064cd44426 100644
--- a/src/libs/utils/utils.qbs
+++ b/src/libs/utils/utils.qbs
@@ -107,6 +107,7 @@ QtcLibrary {
"projectnamevalidatinglineedit.h",
"proxyaction.h",
"qtcassert.h",
+ "qtcassert.cpp",
"qtcolorbutton.cpp",
"qtcolorbutton.h",
"qtcprocess.h",
diff --git a/src/libs/utils/winutils.cpp b/src/libs/utils/winutils.cpp
index 94e7491e20..c829c3feb0 100644
--- a/src/libs/utils/winutils.cpp
+++ b/src/libs/utils/winutils.cpp
@@ -195,7 +195,7 @@ QTCREATOR_UTILS_EXPORT bool winIs64BitSystem()
QTCREATOR_UTILS_EXPORT bool winIs64BitBinary(const QString &binaryIn)
{
- QTC_ASSERT(!binaryIn.isEmpty(), return false; )
+ QTC_ASSERT(!binaryIn.isEmpty(), return false);
#ifdef Q_OS_WIN32
# ifdef __GNUC__ // MinGW lacking some definitions/winbase.h
# define SCS_64BIT_BINARY 6
diff --git a/src/plugins/analyzerbase/analyzerutils.cpp b/src/plugins/analyzerbase/analyzerutils.cpp
index 870cb160df..d57eb6a2a4 100644
--- a/src/plugins/analyzerbase/analyzerutils.cpp
+++ b/src/plugins/analyzerbase/analyzerutils.cpp
@@ -99,7 +99,7 @@ CPlusPlus::Symbol *AnalyzerUtils::findSymbolUnderCursor()
const CPlusPlus::Snapshot &snapshot = CPlusPlus::CppModelManagerInterface::instance()->snapshot();
CPlusPlus::Document::Ptr doc = snapshot.document(editor->document()->fileName());
- QTC_ASSERT(doc, return 0)
+ QTC_ASSERT(doc, return 0);
// fetch the expression's code
CPlusPlus::ExpressionUnderCursor expressionUnderCursor;
diff --git a/src/plugins/bineditor/bineditor.cpp b/src/plugins/bineditor/bineditor.cpp
index 68eca4ea73..6b0a28d954 100644
--- a/src/plugins/bineditor/bineditor.cpp
+++ b/src/plugins/bineditor/bineditor.cpp
@@ -1586,7 +1586,7 @@ void BinEditor::asFloat(int offset, float &value, bool old) const
{
value = 0;
const QByteArray data = dataMid(offset, sizeof(float), old);
- QTC_ASSERT(data.size() == sizeof(float), return )
+ QTC_ASSERT(data.size() == sizeof(float), return);
const float *f = reinterpret_cast<const float *>(data.constData());
value = *f;
}
@@ -1595,7 +1595,7 @@ void BinEditor::asDouble(int offset, double &value, bool old) const
{
value = 0;
const QByteArray data = dataMid(offset, sizeof(double), old);
- QTC_ASSERT(data.size() == sizeof(double), return )
+ QTC_ASSERT(data.size() == sizeof(double), return);
const double *f = reinterpret_cast<const double *>(data.constData());
value = *f;
}
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 4c6ffd8d86..4cde866125 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -87,7 +87,7 @@ static inline bool isFormWindowEditor(const QObject *o)
static inline QString formWindowEditorContents(const QObject *editor)
{
const QVariant contentV = editor->property("contents");
- QTC_ASSERT(contentV.isValid(), return QString(); )
+ QTC_ASSERT(contentV.isValid(), return QString());
return contentV.toString();
}
diff --git a/src/plugins/coreplugin/actionmanager/commandsfile.cpp b/src/plugins/coreplugin/actionmanager/commandsfile.cpp
index 24c5fbf4ea..edb2835fb1 100644
--- a/src/plugins/coreplugin/actionmanager/commandsfile.cpp
+++ b/src/plugins/coreplugin/actionmanager/commandsfile.cpp
@@ -110,7 +110,7 @@ QMap<QString, QKeySequence> CommandsFile::importCommands() const
if (name == ctx.shortCutElement) {
currentId = r.attributes().value(ctx.idAttribute).toString();
} else if (name == ctx.keyElement) {
- QTC_ASSERT(!currentId.isEmpty(), return result; )
+ QTC_ASSERT(!currentId.isEmpty(), return result);
const QXmlStreamAttributes attributes = r.attributes();
if (attributes.hasAttribute(ctx.valueAttribute)) {
const QString keyString = attributes.value(ctx.valueAttribute).toString();
diff --git a/src/plugins/coreplugin/basefilewizard.cpp b/src/plugins/coreplugin/basefilewizard.cpp
index 7d7a156489..eec673a570 100644
--- a/src/plugins/coreplugin/basefilewizard.cpp
+++ b/src/plugins/coreplugin/basefilewizard.cpp
@@ -742,7 +742,7 @@ BaseFileWizard::OverwriteResult BaseFileWizard::promptOverwrite(GeneratedFiles *
// Set 'keep' attribute in files
foreach (const QString &keepFile, existingFilesToKeep) {
const int i = indexOfFile(*files, keepFile);
- QTC_ASSERT(i != -1, return OverwriteCanceled; )
+ QTC_ASSERT(i != -1, return OverwriteCanceled);
GeneratedFile &file = (*files)[i];
file.setAttributes(file.attributes() | GeneratedFile::KeepExistingFileAttribute);
}
diff --git a/src/plugins/coreplugin/editormanager/openeditorswindow.cpp b/src/plugins/coreplugin/editormanager/openeditorswindow.cpp
index d2941cce64..57572671a4 100644
--- a/src/plugins/coreplugin/editormanager/openeditorswindow.cpp
+++ b/src/plugins/coreplugin/editormanager/openeditorswindow.cpp
@@ -208,7 +208,7 @@ void OpenEditorsWindow::setEditors(EditorView *mainView, EditorView *view, OpenE
if (hi.document.isNull() || documentsDone.contains(hi.document))
continue;
QString title = model->displayNameForDocument(hi.document);
- QTC_ASSERT(!title.isEmpty(), continue;)
+ QTC_ASSERT(!title.isEmpty(), continue);
documentsDone.insert(hi.document.data());
QTreeWidgetItem *item = new QTreeWidgetItem();
if (hi.document->isModified())
diff --git a/src/plugins/coreplugin/editortoolbar.cpp b/src/plugins/coreplugin/editortoolbar.cpp
index 29373a57de..ea8103e5d1 100644
--- a/src/plugins/coreplugin/editortoolbar.cpp
+++ b/src/plugins/coreplugin/editortoolbar.cpp
@@ -218,7 +218,7 @@ EditorToolBar::~EditorToolBar()
void EditorToolBar::removeToolbarForEditor(IEditor *editor)
{
- QTC_ASSERT(editor, return)
+ QTC_ASSERT(editor, return);
disconnect(editor, SIGNAL(changed()), this, SLOT(checkEditorStatus()));
QWidget *toolBar = editor->toolBar();
@@ -259,7 +259,7 @@ void EditorToolBar::closeEditor()
void EditorToolBar::addEditor(IEditor *editor)
{
- QTC_ASSERT(editor, return)
+ QTC_ASSERT(editor, return);
connect(editor, SIGNAL(changed()), this, SLOT(checkEditorStatus()));
QWidget *toolBar = editor->toolBar();
@@ -271,7 +271,7 @@ void EditorToolBar::addEditor(IEditor *editor)
void EditorToolBar::addCenterToolBar(QWidget *toolBar)
{
- QTC_ASSERT(toolBar, return)
+ QTC_ASSERT(toolBar, return);
toolBar->setVisible(false); // will be made visible in setCurrentEditor
d->m_toolBarPlaceholder->layout()->addWidget(toolBar);
@@ -305,7 +305,7 @@ void EditorToolBar::setToolbarCreationFlags(ToolbarCreationFlags flags)
void EditorToolBar::setCurrentEditor(IEditor *editor)
{
- QTC_ASSERT(editor, return)
+ QTC_ASSERT(editor, return);
d->m_editorList->setCurrentIndex(d->m_editorsListModel->indexOf(editor).row());
// If we never added the toolbar from the editor, we will never change
diff --git a/src/plugins/coreplugin/fileiconprovider.cpp b/src/plugins/coreplugin/fileiconprovider.cpp
index 4cb33223ee..b58d8f8c1a 100644
--- a/src/plugins/coreplugin/fileiconprovider.cpp
+++ b/src/plugins/coreplugin/fileiconprovider.cpp
@@ -176,7 +176,7 @@ void FileIconProvider::registerIconOverlayForSuffix(const QIcon &icon,
if (debug)
qDebug() << "FileIconProvider::registerIconOverlayForSuffix" << suffix;
- QTC_ASSERT(!icon.isNull() && !suffix.isEmpty(), return)
+ QTC_ASSERT(!icon.isNull() && !suffix.isEmpty(), return);
const QPixmap fileIconPixmap = overlayIcon(QStyle::SP_FileIcon, icon, QSize(16, 16));
// replace old icon, if it exists
diff --git a/src/plugins/coreplugin/mimedatabase.cpp b/src/plugins/coreplugin/mimedatabase.cpp
index e25cc77c59..7293374cad 100644
--- a/src/plugins/coreplugin/mimedatabase.cpp
+++ b/src/plugins/coreplugin/mimedatabase.cpp
@@ -1122,7 +1122,7 @@ bool BaseMimeTypeParser::parse(QIODevice *dev, const QString &fileName, QString
}
break;
case ParseMagicMatchRule:
- QTC_ASSERT(!ruleMatcher.isNull(), return false)
+ QTC_ASSERT(!ruleMatcher.isNull(), return false);
if (!addMagicMatchRule(atts, ruleMatcher, errorMessage))
return false;
break;
@@ -1142,7 +1142,7 @@ bool BaseMimeTypeParser::parse(QIODevice *dev, const QString &fileName, QString
} else {
// Finished a match sequence
if (reader.name() == QLatin1String(magicTagC)) {
- QTC_ASSERT(!ruleMatcher.isNull(), return false)
+ QTC_ASSERT(!ruleMatcher.isNull(), return false);
data.magicMatchers.push_back(ruleMatcher);
ruleMatcher = MagicRuleMatcherPtr();
}
diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp
index a36556e41a..ee277163c6 100644
--- a/src/plugins/coreplugin/vcsmanager.cpp
+++ b/src/plugins/coreplugin/vcsmanager.cpp
@@ -306,7 +306,7 @@ QString VcsManager::repositoryUrl(const QString &directory)
bool VcsManager::promptToDelete(IVersionControl *vc, const QString &fileName)
{
- QTC_ASSERT(vc, return true)
+ QTC_ASSERT(vc, return true);
if (!vc->supportsOperation(IVersionControl::DeleteOperation))
return true;
const QString title = tr("Version Control");
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]"
diff --git a/src/plugins/cvs/checkoutwizard.cpp b/src/plugins/cvs/checkoutwizard.cpp
index d004d7cbdf..60de8e8ce6 100644
--- a/src/plugins/cvs/checkoutwizard.cpp
+++ b/src/plugins/cvs/checkoutwizard.cpp
@@ -84,7 +84,7 @@ QSharedPointer<VcsBase::AbstractCheckoutJob> CheckoutWizard::createJob(const QLi
// Collect parameters for the checkout command.
// CVS does not allow for checking out into a different directory.
const CheckoutWizardPage *cwp = qobject_cast<const CheckoutWizardPage *>(parameterPages.front());
- QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>())
+ QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>());
const CvsSettings settings = CvsPlugin::instance()->settings();
const QString binary = settings.cvsCommand;
QStringList args;
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp
index 46f3209f77..41a962c534 100644
--- a/src/plugins/cvs/cvsplugin.cpp
+++ b/src/plugins/cvs/cvsplugin.cpp
@@ -620,7 +620,7 @@ void CvsPlugin::cvsDiff(const CvsDiffParameters &p)
VcsBaseEditorWidget::tagEditor(editor, tag);
setDiffBaseDirectory(editor, p.workingDir);
CvsEditor *diffEditorWidget = qobject_cast<CvsEditor*>(editor->widget());
- QTC_ASSERT(diffEditorWidget, return ; )
+ QTC_ASSERT(diffEditorWidget, return);
// Wire up the parameter widget to trigger a re-run on
// parameter change and 'revert' from inside the diff editor.
@@ -684,14 +684,14 @@ void CvsPlugin::updateActions(VcsBasePlugin::ActionState as)
void CvsPlugin::addCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
vcsAdd(state.currentFileTopLevel(), state.relativeCurrentFile());
}
void CvsPlugin::revertAll()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
const QString title = tr("Revert repository");
if (!messageBoxQuestion(title, tr("Revert all pending changes to the repository?")))
return;
@@ -710,7 +710,7 @@ void CvsPlugin::revertAll()
void CvsPlugin::revertCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
QStringList args;
args << QLatin1String("diff") << state.relativeCurrentFile();
const CvsResponse diffResponse =
@@ -746,28 +746,28 @@ void CvsPlugin::revertCurrentFile()
void CvsPlugin::diffProject()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
cvsDiff(state.currentProjectTopLevel(), state.relativeCurrentProject());
}
void CvsPlugin::diffCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
cvsDiff(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()));
}
void CvsPlugin::startCommitCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
startCommit(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()));
}
void CvsPlugin::startCommitAll()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
startCommit(state.topLevel());
}
@@ -843,21 +843,21 @@ bool CvsPlugin::commit(const QString &messageFile,
void CvsPlugin::filelogCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
filelog(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()), true);
}
void CvsPlugin::logProject()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
filelog(state.currentProjectTopLevel(), state.relativeCurrentProject());
}
void CvsPlugin::logRepository()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
filelog(state.topLevel());
}
@@ -896,7 +896,7 @@ void CvsPlugin::filelog(const QString &workingDir,
void CvsPlugin::updateProject()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
update(state.currentProjectTopLevel(), state.relativeCurrentProject());
}
@@ -917,28 +917,28 @@ bool CvsPlugin::update(const QString &topLevel, const QStringList &files)
void CvsPlugin::editCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
edit(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()));
}
void CvsPlugin::uneditCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
unedit(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()));
}
void CvsPlugin::uneditCurrentRepository()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
unedit(state.topLevel(), QStringList());
}
void CvsPlugin::annotateCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
annotate(state.currentFileTopLevel(), state.relativeCurrentFile());
}
@@ -1050,35 +1050,35 @@ bool CvsPlugin::status(const QString &topLevel, const QStringList &files, const
void CvsPlugin::projectStatus()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
status(state.currentProjectTopLevel(), state.relativeCurrentProject(), tr("Project status"));
}
void CvsPlugin::commitProject()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
startCommit(state.currentProjectTopLevel(), state.relativeCurrentProject());
}
void CvsPlugin::diffRepository()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
cvsDiff(state.topLevel(), QStringList());
}
void CvsPlugin::statusRepository()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
status(state.topLevel(), QStringList(), tr("Repository status"));
}
void CvsPlugin::updateRepository()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
update(state.topLevel(), QStringList());
}
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index ab1f2ed2f7..5f454f5c8f 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -500,7 +500,7 @@ void CdbEngine::init()
QDir::toNativeSeparators(it.value())));
}
}
- QTC_ASSERT(m_process.state() != QProcess::Running, Utils::SynchronousProcess::stopProcess(m_process); )
+ QTC_ASSERT(m_process.state() != QProcess::Running, Utils::SynchronousProcess::stopProcess(m_process));
}
CdbEngine::~CdbEngine()
@@ -521,7 +521,7 @@ void CdbEngine::syncOperateByInstruction(bool operateByInstruction)
qDebug("syncOperateByInstruction current: %d new %d", m_operateByInstruction, operateByInstruction);
if (m_operateByInstruction == operateByInstruction)
return;
- QTC_ASSERT(m_accessible, return; )
+ QTC_ASSERT(m_accessible, return);
m_operateByInstruction = operateByInstruction;
postCommand(m_operateByInstruction ? QByteArray("l-t") : QByteArray("l+t"), 0);
postCommand(m_operateByInstruction ? QByteArray("l-s") : QByteArray("l+s"), 0);
@@ -1225,7 +1225,7 @@ void CdbEngine::executeRunToFunction(const QString &functionName)
void CdbEngine::setRegisterValue(int regnr, const QString &value)
{
const Registers registers = registerHandler()->registers();
- QTC_ASSERT(regnr < registers.size(), return)
+ QTC_ASSERT(regnr < registers.size(), return);
// Value is decimal or 0x-hex-prefixed
QByteArray cmd;
ByteArrayInputStream str(cmd);
@@ -1455,7 +1455,7 @@ void CdbEngine::activateFrame(int index)
if (index < 0)
return;
const StackFrames &frames = stackHandler()->frames();
- QTC_ASSERT(index < frames.size(), return; )
+ QTC_ASSERT(index < frames.size(), return);
const StackFrame frame = frames.at(index);
if (debug || debugLocals)
@@ -1571,7 +1571,7 @@ enum { DisassemblerRange = 512 };
void CdbEngine::fetchDisassembler(DisassemblerAgent *agent)
{
- QTC_ASSERT(m_accessible, return;)
+ QTC_ASSERT(m_accessible, return);
const QVariant cookie = qVariantFromValue<DisassemblerAgent*>(agent);
const Location location = agent->location();
if (debug)
@@ -1753,7 +1753,7 @@ void CdbEngine::handleResolveSymbol(const QList<quint64> &addresses, const QVari
// Parse: "00000000`77606060 cc int 3"
void CdbEngine::handleDisassembler(const CdbBuiltinCommandPtr &command)
{
- QTC_ASSERT(qVariantCanConvert<DisassemblerAgent*>(command->cookie), return;)
+ QTC_ASSERT(qVariantCanConvert<DisassemblerAgent*>(command->cookie), return);
DisassemblerAgent *agent = qvariant_cast<DisassemblerAgent*>(command->cookie);
agent->setContents(parseCdbDisassembler(command->reply));
}
@@ -1781,7 +1781,7 @@ void CdbEngine::postFetchMemory(const MemoryViewCookie &cookie)
void CdbEngine::changeMemory(Internal::MemoryAgent *, QObject *, quint64 addr, const QByteArray &data)
{
- QTC_ASSERT(!data.isEmpty(), return; )
+ QTC_ASSERT(!data.isEmpty(), return);
if (!m_accessible) {
const MemoryChangeCookie cookie(addr, data);
doInterruptInferiorCustomSpecialStop(qVariantFromValue(cookie));
@@ -1792,7 +1792,7 @@ void CdbEngine::changeMemory(Internal::MemoryAgent *, QObject *, quint64 addr, c
void CdbEngine::handleMemory(const CdbExtensionCommandPtr &command)
{
- QTC_ASSERT(qVariantCanConvert<MemoryViewCookie>(command->cookie), return;)
+ QTC_ASSERT(qVariantCanConvert<MemoryViewCookie>(command->cookie), return);
const MemoryViewCookie memViewCookie = qvariant_cast<MemoryViewCookie>(command->cookie);
if (command->success) {
const QByteArray data = QByteArray::fromBase64(command->reply);
@@ -1928,7 +1928,7 @@ void CdbEngine::handleLocals(const CdbExtensionCommandPtr &reply)
QList<WatchData> watchData;
GdbMi root;
root.fromString(reply->reply);
- QTC_ASSERT(root.isList(), return ; )
+ QTC_ASSERT(root.isList(), return);
if (debugLocals) {
qDebug() << root.toString(true, 4);
}
@@ -2474,17 +2474,17 @@ void CdbEngine::parseOutputLine(QByteArray line)
// integer token
const int tokenPos = m_creatorExtPrefix.size() + 2;
const int tokenEndPos = line.indexOf('|', tokenPos);
- QTC_ASSERT(tokenEndPos != -1, return)
+ QTC_ASSERT(tokenEndPos != -1, return);
const int token = line.mid(tokenPos, tokenEndPos - tokenPos).toInt();
// remainingChunks
const int remainingChunksPos = tokenEndPos + 1;
const int remainingChunksEndPos = line.indexOf('|', remainingChunksPos);
- QTC_ASSERT(remainingChunksEndPos != -1, return)
+ QTC_ASSERT(remainingChunksEndPos != -1, return);
const int remainingChunks = line.mid(remainingChunksPos, remainingChunksEndPos - remainingChunksPos).toInt();
// const char 'serviceName'
const int whatPos = remainingChunksEndPos + 1;
const int whatEndPos = line.indexOf('|', whatPos);
- QTC_ASSERT(whatEndPos != -1, return)
+ QTC_ASSERT(whatEndPos != -1, return);
const QByteArray what = line.mid(whatPos, whatEndPos - whatPos);
// Build up buffer, call handler once last chunk was encountered
m_extensionMessageBuffer += line.mid(whatEndPos + 1);
@@ -2962,7 +2962,7 @@ void CdbEngine::postCommandSequence(unsigned mask)
return;
}
if (mask & CommandListRegisters) {
- QTC_ASSERT(threadsHandler()->currentThread() >= 0, return; )
+ QTC_ASSERT(threadsHandler()->currentThread() >= 0, return);
postExtensionCommand("registers", QByteArray(), 0, &CdbEngine::handleRegisters, mask & ~CommandListRegisters);
return;
}
@@ -3062,7 +3062,7 @@ void CdbEngine::handleBreakPoints(const GdbMi &value)
qPrintable(reportedResponse.toString()));
if (reportedResponse.id.isValid() && !reportedResponse.pending) {
const BreakpointModelId mid = handler->findBreakpointByResponseId(reportedResponse.id);
- QTC_ASSERT(mid.isValid(), continue; )
+ QTC_ASSERT(mid.isValid(), continue);
const PendingBreakPointMap::iterator it = m_pendingBreakpointMap.find(mid);
if (it != m_pendingBreakpointMap.end()) {
// Complete the response and set on handler.
diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.cpp b/src/plugins/debugger/cdb/cdbparsehelpers.cpp
index 9c0fe5b986..f67b4b9a7b 100644
--- a/src/plugins/debugger/cdb/cdbparsehelpers.cpp
+++ b/src/plugins/debugger/cdb/cdbparsehelpers.cpp
@@ -166,7 +166,7 @@ QByteArray cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
case BreakpointAtMain:
case BreakpointOnQmlSignalEmit:
case BreakpointAtJavaScriptThrow:
- QTC_ASSERT(false, return QByteArray(); )
+ QTC_ASSERT(false, return QByteArray());
break;
case BreakpointByAddress:
str << hex << hexPrefixOn << bp.address << hexPrefixOff << dec;
@@ -232,7 +232,7 @@ QVariant cdbIntegerValue(const QByteArray &t)
const QVariant converted = base == 16 ?
fixed.toULongLong(&ok, base) :
fixed.toLongLong(&ok, base);
- QTC_ASSERT(ok, return QVariant(); )
+ QTC_ASSERT(ok, return QVariant());
return converted;
}
diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp
index 98806c9784..f8eb6db6b7 100644
--- a/src/plugins/debugger/commonoptionspage.cpp
+++ b/src/plugins/debugger/commonoptionspage.cpp
@@ -181,7 +181,7 @@ QIcon CommonOptionsPage::categoryIcon() const
void CommonOptionsPage::apply()
{
- QTC_ASSERT(!m_widget.isNull() && !m_group.isNull(), return; )
+ QTC_ASSERT(!m_widget.isNull() && !m_group.isNull(), return);
QSettings *settings = ICore::settings();
m_group->apply(settings);
diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp
index aeb437a98d..578ebb4ee2 100644
--- a/src/plugins/debugger/debuggermainwindow.cpp
+++ b/src/plugins/debugger/debuggermainwindow.cpp
@@ -327,7 +327,7 @@ void DebuggerMainWindowPrivate::createViewsMenuItems()
ActionManager *am = ICore::actionManager();
Context debugcontext(Constants::C_DEBUGMODE);
m_viewsMenu = am->actionContainer(Id(Core::Constants::M_WINDOW_VIEWS));
- QTC_ASSERT(m_viewsMenu, return)
+ QTC_ASSERT(m_viewsMenu, return);
QAction *openMemoryEditorAction = new QAction(this);
openMemoryEditorAction->setText(tr("Memory..."));
@@ -492,7 +492,7 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
d, SLOT(updateUiForProject(ProjectExplorer::Project*)));
d->m_viewsMenu = am->actionContainer(Core::Id(Core::Constants::M_WINDOW_VIEWS));
- QTC_ASSERT(d->m_viewsMenu, return 0)
+ QTC_ASSERT(d->m_viewsMenu, return 0);
//d->m_mainWindow = new Internal::DebuggerMainWindow(this);
setDocumentMode(true);
@@ -591,7 +591,7 @@ void DebuggerMainWindow::writeSettings() const
void DebuggerMainWindow::raiseDebuggerWindow()
{
Utils::AppMainWindow *appMainWindow = qobject_cast<Utils::AppMainWindow*>(ICore::mainWindow());
- QTC_ASSERT(appMainWindow, return)
+ QTC_ASSERT(appMainWindow, return);
appMainWindow->raiseWindow();
}
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index f4296747e4..e19dad83c6 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -453,7 +453,7 @@ void DebuggerRunControl::showMessage(const QString &msg, int channel)
bool DebuggerRunControl::promptToStop(bool *optionalPrompt) const
{
- QTC_ASSERT(isRunning(), return true;)
+ QTC_ASSERT(isRunning(), return true);
if (optionalPrompt && !*optionalPrompt)
return true;
diff --git a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
index 1de7aeea54..4a4a23024c 100644
--- a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
+++ b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp
@@ -181,14 +181,14 @@ void SourcePathMappingModel::addRawMapping(const QString &source, const QString
void SourcePathMappingModel::setSource(int row, const QString &s)
{
QStandardItem *sourceItem = item(row, SourceColumn);
- QTC_ASSERT(sourceItem, return; )
+ QTC_ASSERT(sourceItem, return);
sourceItem->setText(s.isEmpty() ? m_newSourcePlaceHolder : QDir::toNativeSeparators(s));
}
void SourcePathMappingModel::setTarget(int row, const QString &t)
{
QStandardItem *targetItem = item(row, TargetColumn);
- QTC_ASSERT(targetItem, return; )
+ QTC_ASSERT(targetItem, return);
targetItem->setText(t.isEmpty() ? m_newTargetPlaceHolder : QDir::toNativeSeparators(t));
}
diff --git a/src/plugins/debugger/debuggertoolchaincombobox.cpp b/src/plugins/debugger/debuggertoolchaincombobox.cpp
index 7270d3e80d..d5c1e1d185 100644
--- a/src/plugins/debugger/debuggertoolchaincombobox.cpp
+++ b/src/plugins/debugger/debuggertoolchaincombobox.cpp
@@ -75,7 +75,7 @@ void DebuggerToolChainComboBox::init(bool hostAbiOnly)
void DebuggerToolChainComboBox::setAbi(const ProjectExplorer::Abi &abi)
{
- QTC_ASSERT(abi.isValid(), return; )
+ QTC_ASSERT(abi.isValid(), return);
const int c = count();
for (int i = 0; i < c; i++) {
if (abiAt(i) == abi) {
diff --git a/src/plugins/debugger/gdb/codagdbadapter.cpp b/src/plugins/debugger/gdb/codagdbadapter.cpp
index 1049e4a2f5..014c3bfc7f 100644
--- a/src/plugins/debugger/gdb/codagdbadapter.cpp
+++ b/src/plugins/debugger/gdb/codagdbadapter.cpp
@@ -726,7 +726,7 @@ void CodaGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
bool ok = false;
const uint registerNumber = cmd.mid(1).toUInt(&ok, 16);
const int threadIndex = m_snapshot.indexOfThread(m_session.tid);
- QTC_ASSERT(threadIndex != -1, return)
+ QTC_ASSERT(threadIndex != -1, return);
const Symbian::Thread &thread = m_snapshot.threadInfo.at(threadIndex);
if (thread.registerValid) {
sendGdbServerMessage(thread.gdbReportSingleRegister(registerNumber),
@@ -1277,7 +1277,7 @@ void CodaGdbAdapter::handleWriteRegister(const CodaCommandResult &result)
void CodaGdbAdapter::sendRegistersGetMCommand()
{
// Send off a register command, which requires the names to be present.
- QTC_ASSERT(!m_codaDevice->registerNames().isEmpty(), return )
+ QTC_ASSERT(!m_codaDevice->registerNames().isEmpty(), return);
m_codaDevice->sendRegistersGetMRangeCommand(
CodaCallback(this, &CodaGdbAdapter::handleAndReportReadRegisters),
@@ -1359,7 +1359,7 @@ void CodaGdbAdapter::handleReadRegisters(const CodaCommandResult &result)
// TODO: When reading 8-byte floating-point registers is supported, thread
// registers won't be an array of uints.
uint *registers = m_snapshot.registers(m_session.tid);
- QTC_ASSERT(registers, return;)
+ QTC_ASSERT(registers, return);
QByteArray bigEndianRaw = QByteArray::fromBase64(result.values.front().data());
// TODO: When reading 8-byte floating-point registers is supported, will
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 57f03aad55..966e5fd042 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -956,7 +956,7 @@ void GdbEngine::flushCommand(const GdbCommand &cmd0)
return;
}
- QTC_ASSERT(gdbProc()->state() == QProcess::Running, return;)
+ QTC_ASSERT(gdbProc()->state() == QProcess::Running, return);
const int token = ++currentToken();
@@ -1425,7 +1425,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
gotoLocation(Location(fullName, lineNumber));
if (!m_commandsToRunOnTemporaryBreak.isEmpty()) {
- QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state())
+ QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state());
m_actingOnExpectedStop = true;
notifyInferiorStopOk();
flushQueuedCommands();
@@ -1433,7 +1433,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
QTC_CHECK(m_commandsDoneCallback == 0);
m_commandsDoneCallback = &GdbEngine::autoContinueInferior;
} else {
- QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << state())
+ QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << state());
}
return;
}
@@ -1915,8 +1915,8 @@ QString GdbEngine::fullName(const QString &fileName)
{
if (fileName.isEmpty())
return QString();
- //QTC_ASSERT(!m_sourcesListOutdated, /* */)
- QTC_ASSERT(!m_sourcesListUpdating, /* */)
+ //QTC_ASSERT(!m_sourcesListOutdated, /* */);
+ QTC_ASSERT(!m_sourcesListUpdating, /* */);
return m_shortToFullName.value(fileName, QString());
}
@@ -1927,7 +1927,7 @@ QString GdbEngine::cleanupFullName(const QString &fileName)
// Gdb running on windows often delivers "fullnames" which
// (a) have no drive letter and (b) are not normalized.
if (Abi::hostAbi().os() == Abi::WindowsOS) {
- QTC_ASSERT(!fileName.isEmpty(), return QString())
+ QTC_ASSERT(!fileName.isEmpty(), return QString());
QFileInfo fi(fileName);
if (fi.isReadable())
cleanFilePath = QDir::cleanPath(fi.absoluteFilePath());
@@ -2570,7 +2570,7 @@ void GdbEngine::updateResponse(BreakpointResponse &response, const GdbMi &bkpt)
QString GdbEngine::breakLocation(const QString &file) const
{
- //QTC_ASSERT(!m_breakListOutdated, /* */)
+ //QTC_CHECK(!m_breakListOutdated);
QString where = m_fullToShortName.value(file);
if (where.isEmpty())
return QFileInfo(file).fileName();
@@ -2855,7 +2855,7 @@ void GdbEngine::handleBreakList(const GdbMi &table)
void GdbEngine::handleBreakListMultiple(const GdbResponse &response)
{
- QTC_CHECK(response.resultClass == GdbResultDone)
+ QTC_CHECK(response.resultClass == GdbResultDone);
const BreakpointModelId id = response.cookie.value<BreakpointModelId>();
const QString str = QString::fromLocal8Bit(response.consoleStreamOutput);
extractDataFromInfoBreak(str, id);
@@ -2863,7 +2863,7 @@ void GdbEngine::handleBreakListMultiple(const GdbResponse &response)
void GdbEngine::handleBreakDisable(const GdbResponse &response)
{
- QTC_CHECK(response.resultClass == GdbResultDone)
+ QTC_CHECK(response.resultClass == GdbResultDone);
const BreakpointModelId id = response.cookie.value<BreakpointModelId>();
BreakHandler *handler = breakHandler();
// This should only be the requested state.
@@ -2876,7 +2876,7 @@ void GdbEngine::handleBreakDisable(const GdbResponse &response)
void GdbEngine::handleBreakEnable(const GdbResponse &response)
{
- QTC_CHECK(response.resultClass == GdbResultDone)
+ QTC_CHECK(response.resultClass == GdbResultDone);
const BreakpointModelId id = response.cookie.value<BreakpointModelId>();
BreakHandler *handler = breakHandler();
// This should only be the requested state.
@@ -2889,7 +2889,7 @@ void GdbEngine::handleBreakEnable(const GdbResponse &response)
void GdbEngine::handleBreakThreadSpec(const GdbResponse &response)
{
- QTC_CHECK(response.resultClass == GdbResultDone)
+ QTC_CHECK(response.resultClass == GdbResultDone);
const BreakpointModelId id = response.cookie.value<BreakpointModelId>();
BreakHandler *handler = breakHandler();
BreakpointResponse br = handler->response(id);
@@ -2901,7 +2901,7 @@ void GdbEngine::handleBreakThreadSpec(const GdbResponse &response)
void GdbEngine::handleBreakLineNumber(const GdbResponse &response)
{
- QTC_CHECK(response.resultClass == GdbResultDone)
+ QTC_CHECK(response.resultClass == GdbResultDone);
const BreakpointModelId id = response.cookie.value<BreakpointModelId>();
BreakHandler *handler = breakHandler();
BreakpointResponse br = handler->response(id);
@@ -2923,7 +2923,7 @@ void GdbEngine::handleBreakIgnore(const GdbResponse &response)
// 29^done
//
// gdb 6.3 does not produce any console output
- QTC_CHECK(response.resultClass == GdbResultDone)
+ QTC_CHECK(response.resultClass == GdbResultDone);
//QString msg = _(response.consoleStreamOutput);
BreakpointModelId id = response.cookie.value<BreakpointModelId>();
BreakHandler *handler = breakHandler();
diff --git a/src/plugins/debugger/gdb/gdbmi.cpp b/src/plugins/debugger/gdb/gdbmi.cpp
index df721160e2..fd55b51cb2 100644
--- a/src/plugins/debugger/gdb/gdbmi.cpp
+++ b/src/plugins/debugger/gdb/gdbmi.cpp
@@ -35,6 +35,7 @@
#include <utils/qtcassert.h>
#include <QByteArray>
+#include <QDebug>
#include <QRegExp>
#include <QTextStream>
diff --git a/src/plugins/debugger/memoryagent.cpp b/src/plugins/debugger/memoryagent.cpp
index 4f836b2cfc..f9fa8a97c4 100644
--- a/src/plugins/debugger/memoryagent.cpp
+++ b/src/plugins/debugger/memoryagent.cpp
@@ -191,7 +191,7 @@ bool MemoryAgent::doCreateBinEditor(quint64 addr, unsigned flags,
return true;
}
// Editor: Register tracking not supported.
- QTC_ASSERT(!(flags & DebuggerEngine::MemoryTrackRegister), return false; )
+ QTC_ASSERT(!(flags & DebuggerEngine::MemoryTrackRegister), return false);
EditorManager *editorManager = EditorManager::instance();
if (!title.endsWith(QLatin1Char('$')))
title.append(QLatin1String(" $"));
@@ -237,14 +237,14 @@ void MemoryAgent::addLazyData(QObject *editorToken, quint64 addr,
const QByteArray &ba)
{
QWidget *w = qobject_cast<QWidget *>(editorToken);
- QTC_ASSERT(w, return ;)
+ QTC_ASSERT(w, return);
MemoryView::binEditorAddData(w, addr, ba);
}
void MemoryAgent::provideNewRange(IEditor *, quint64 address)
{
QWidget *w = qobject_cast<QWidget *>(sender());
- QTC_ASSERT(w, return ;)
+ QTC_ASSERT(w, return);
MemoryView::setBinEditorRange(w, address, DataRange, BinBlockSize);
}
@@ -254,14 +254,14 @@ void MemoryAgent::provideNewRange(IEditor *, quint64 address)
void MemoryAgent::handleStartOfFileRequested(IEditor *)
{
QWidget *w = qobject_cast<QWidget *>(sender());
- QTC_ASSERT(w, return ;)
+ QTC_ASSERT(w, return);
MemoryView::binEditorSetCursorPosition(w, 0);
}
void MemoryAgent::handleEndOfFileRequested(IEditor *)
{
QWidget *w = qobject_cast<QWidget *>(sender());
- QTC_ASSERT(w, return ;)
+ QTC_ASSERT(w, return);
MemoryView::binEditorSetCursorPosition(w, DataRange - 1);
}
diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp
index 846d82035b..4c02711097 100644
--- a/src/plugins/debugger/pdb/pdbengine.cpp
+++ b/src/plugins/debugger/pdb/pdbengine.cpp
@@ -653,7 +653,7 @@ void PdbEngine::handleOutput2(const QByteArray &data)
PdbResponse response;
response.data = data;
showMessage(_(data));
- QTC_ASSERT(!m_commands.isEmpty(), qDebug() << "RESPONSE: " << data; return)
+ QTC_ASSERT(!m_commands.isEmpty(), qDebug() << "RESPONSE: " << data; return);
PdbCommand cmd = m_commands.dequeue();
response.cookie = cmd.cookie;
qDebug() << "DEQUE: " << cmd.command << cmd.callbackName;
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index c6d96d8c28..ae7ec26cdf 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -443,7 +443,7 @@ void QmlEngine::beginConnection(quint16 port)
if (state() != EngineRunRequested && d->m_retryOnConnectFail)
return;
- QTC_ASSERT(state() == EngineRunRequested, return)
+ QTC_ASSERT(state() == EngineRunRequested, return);
if (port > 0) {
QTC_CHECK(startParameters().communicationChannel
@@ -451,7 +451,7 @@ void QmlEngine::beginConnection(quint16 port)
QTC_ASSERT(startParameters().connParams.port == 0
|| startParameters().connParams.port == port,
qWarning() << "Port " << port << "from application output does not match"
- << startParameters().connParams.port << "from start parameters.")
+ << startParameters().connParams.port << "from start parameters.");
d->m_adapter.beginConnectionTcp(startParameters().qmlServerAddress, port);
return;
}
diff --git a/src/plugins/debugger/watchdelegatewidgets.cpp b/src/plugins/debugger/watchdelegatewidgets.cpp
index a87875457e..b196196b05 100644
--- a/src/plugins/debugger/watchdelegatewidgets.cpp
+++ b/src/plugins/debugger/watchdelegatewidgets.cpp
@@ -164,7 +164,7 @@ int IntegerWatchLineEdit::base() const
void IntegerWatchLineEdit::setBase(int b)
{
- QTC_ASSERT(b, return; )
+ QTC_ASSERT(b, return);
m_validator->setBase(b);
}
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 139d30f790..57de785ac9 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -454,7 +454,7 @@ static QString translate(const QString &str)
const int len = str.indexOf(QLatin1Char(' ')) - numberPos;
const int size = str.mid(numberPos, len).toInt(&ok);
QTC_ASSERT(ok, qWarning("WatchHandler: Invalid item count '%s'",
- qPrintable(str)))
+ qPrintable(str)));
return moreThan ?
WatchHandler::tr("<more than %n items>", 0, size) :
WatchHandler::tr("<%n items>", 0, size);
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index 7379c02915..89a0296efa 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -419,7 +419,7 @@ static void addStackLayoutMemoryView(DebuggerEngine *engine, bool separateView,
const QAbstractItemModel *m, const QPoint &p, QWidget *parent)
{
typedef QPair<quint64, QString> RegisterValueNamePair;
- QTC_ASSERT(engine && m, return ;)
+ QTC_ASSERT(engine && m, return);
// Determine suitable address range from locals.
quint64 start = Q_UINT64_C(0xFFFFFFFFFFFFFFFF);
diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp
index 439d92fdde..ad591dba6f 100644
--- a/src/plugins/designer/formeditorw.cpp
+++ b/src/plugins/designer/formeditorw.cpp
@@ -251,7 +251,7 @@ void FormEditorW::setupViewActions()
// Populate "View" menu of form editor menu
Core::ActionManager *am = Core::ICore::actionManager();
Core::ActionContainer *viewMenu = am->actionContainer(Core::Id(Core::Constants::M_WINDOW_VIEWS));
- QTC_ASSERT(viewMenu, return)
+ QTC_ASSERT(viewMenu, return);
addDockViewAction(am, viewMenu, WidgetBoxSubWindow, m_contexts,
tr("Widget box"), Core::Id("FormEditor.WidgetBox"));
@@ -787,7 +787,7 @@ void FormEditorW::currentEditorChanged(Core::IEditor *editor)
QTC_ASSERT(xmlEditor, return);
ensureInitStage(FullyInitialized);
SharedTools::WidgetHost *fw = m_editorWidget->formWindowEditorForXmlEditor(xmlEditor);
- QTC_ASSERT(fw, return)
+ QTC_ASSERT(fw, return);
m_editorWidget->setVisibleEditor(xmlEditor);
m_fwm->setActiveFormWindow(fw->formWindow());
}
diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp
index e0b5724823..b76677f548 100644
--- a/src/plugins/designer/qtcreatorintegration.cpp
+++ b/src/plugins/designer/qtcreatorintegration.cpp
@@ -533,7 +533,7 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
typedef QMap<int, Document::Ptr> DocumentMap;
const EditorData ed = m_few->activeEditor();
- QTC_ASSERT(ed, return false)
+ QTC_ASSERT(ed, return false);
const QString currentUiFile = ed.formWindowEditor->document()->fileName();
#if 0
return Designer::Internal::navigateToSlot(currentUiFile, objectName, signalSignature, parameterNames, errorMessage);
diff --git a/src/plugins/designer/resourcehandler.cpp b/src/plugins/designer/resourcehandler.cpp
index b898e00542..f28f0c7b78 100644
--- a/src/plugins/designer/resourcehandler.cpp
+++ b/src/plugins/designer/resourcehandler.cpp
@@ -135,7 +135,7 @@ void ResourceHandler::updateResources()
ensureInitialized();
const QString fileName = m_form->fileName();
- QTC_ASSERT(!fileName.isEmpty(), return)
+ QTC_ASSERT(!fileName.isEmpty(), return);
if (Designer::Constants::Internal::debug)
qDebug() << "ResourceHandler::updateResources()" << fileName;
diff --git a/src/plugins/designer/settingsmanager.cpp b/src/plugins/designer/settingsmanager.cpp
index 48bb48f642..5036a5bd98 100644
--- a/src/plugins/designer/settingsmanager.cpp
+++ b/src/plugins/designer/settingsmanager.cpp
@@ -51,49 +51,49 @@ static inline QSettings *coreSettings()
void SettingsManager::beginGroup(const QString &prefix)
{
QSettings *settings = coreSettings();
- QTC_ASSERT(settings, return; )
+ QTC_ASSERT(settings, return);
settings->beginGroup(addPrefix(prefix));
}
void SettingsManager::endGroup()
{
QSettings *settings = coreSettings();
- QTC_ASSERT(settings, return; )
+ QTC_ASSERT(settings, return);
settings->endGroup();
}
bool SettingsManager::contains(const QString &key) const
{
const QSettings *settings = coreSettings();
- QTC_ASSERT(settings, return false; )
+ QTC_ASSERT(settings, return false);
return settings->contains(addPrefix(key));
}
void SettingsManager::setValue(const QString &key, const QVariant &value)
{
QSettings *settings = coreSettings();
- QTC_ASSERT(settings, return; )
+ QTC_ASSERT(settings, return);
settings->setValue(addPrefix(key), value);
}
QVariant SettingsManager::value(const QString &key, const QVariant &defaultValue) const
{
const QSettings *settings = coreSettings();
- QTC_ASSERT(settings, return QVariant(); )
+ QTC_ASSERT(settings, return QVariant());
return settings->value(addPrefix(key), defaultValue);
}
void SettingsManager::remove(const QString &key)
{
QSettings *settings = coreSettings();
- QTC_ASSERT(settings, return; )
+ QTC_ASSERT(settings, return);
settings->remove(addPrefix(key));
}
QString SettingsManager::addPrefix(const QString &name) const
{
const QSettings *settings = coreSettings();
- QTC_ASSERT(settings, return name; )
+ QTC_ASSERT(settings, return name);
QString result = name;
if (settings->group().isEmpty())
result.prepend(QLatin1String("Designer"));
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index dab54a13e6..66816af77f 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -1757,7 +1757,7 @@ bool GitClient::getCommitData(const QString &workingDirectory,
return false;
}
const int separatorPos = sp.stdOut.indexOf(QLatin1Char('@'));
- QTC_ASSERT(separatorPos != -1, return false)
+ QTC_ASSERT(separatorPos != -1, return false);
commitData->amendSHA1= sp.stdOut.left(separatorPos);
*commitTemplate = sp.stdOut.mid(separatorPos + 1);
} else {
diff --git a/src/plugins/git/gitorious/gitoriousclonewizard.cpp b/src/plugins/git/gitorious/gitoriousclonewizard.cpp
index 9718493d1c..49a586b7e4 100644
--- a/src/plugins/git/gitorious/gitoriousclonewizard.cpp
+++ b/src/plugins/git/gitorious/gitoriousclonewizard.cpp
@@ -116,7 +116,7 @@ QSharedPointer<VcsBase::AbstractCheckoutJob> GitoriousCloneWizard::createJob(con
QString *checkoutPath)
{
const Git::CloneWizardPage *cwp = qobject_cast<const Git::CloneWizardPage *>(parameterPages.back());
- QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>())
+ QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>());
return cwp->createCheckoutJob(checkoutPath);
}
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 3eec1999d8..8a37466117 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -582,35 +582,35 @@ void GitPlugin::submitEditorDiff(const QStringList &unstaged, const QStringList
void GitPlugin::diffCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
m_gitClient->diff(state.currentFileTopLevel(), QStringList(), state.relativeCurrentFile());
}
void GitPlugin::diffCurrentProject()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
m_gitClient->diff(state.currentProjectTopLevel(), QStringList(), state.relativeCurrentProject());
}
void GitPlugin::diffRepository()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
m_gitClient->diff(state.topLevel(), QStringList(), QStringList());
}
void GitPlugin::logFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
m_gitClient->log(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()), true);
}
void GitPlugin::blameFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
const int lineNumber = VcsBase::VcsBaseEditorWidget::lineNumberOfCurrentEditor(state.currentFile());
m_gitClient->blame(state.currentFileTopLevel(), QStringList(), state.relativeCurrentFile(), QString(), lineNumber);
}
@@ -618,14 +618,14 @@ void GitPlugin::blameFile()
void GitPlugin::logProject()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
m_gitClient->log(state.currentProjectTopLevel(), state.relativeCurrentProject());
}
void GitPlugin::undoFileChanges(bool revertStaging)
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
Core::FileChangeBlocker fcb(state.currentFile());
m_gitClient->revert(QStringList(state.currentFile()), revertStaging);
}
@@ -638,7 +638,7 @@ void GitPlugin::undoUnstagedFileChanges()
void GitPlugin::undoRepositoryChanges()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
const QString msg = tr("Undo all pending changes to the repository\n%1?").arg(QDir::toNativeSeparators(state.topLevel()));
const QMessageBox::StandardButton answer
= QMessageBox::question(Core::ICore::mainWindow(),
@@ -653,14 +653,14 @@ void GitPlugin::undoRepositoryChanges()
void GitPlugin::stageFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
m_gitClient->addFile(state.currentFileTopLevel(), state.relativeCurrentFile());
}
void GitPlugin::unstageFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
m_gitClient->synchronousReset(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()));
}
@@ -684,7 +684,7 @@ void GitPlugin::startCommit(bool amend)
}
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
QString errorMessage, commitTemplate;
CommitData data;
@@ -818,7 +818,7 @@ void GitPlugin::pull()
void GitPlugin::push()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
m_gitClient->synchronousPush(state.topLevel());
}
@@ -838,7 +838,7 @@ static inline GitClientMemberFunc memberFunctionFromAction(const QObject *o)
void GitPlugin::gitClientMemberFuncRepositoryAction()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
// Retrieve member function and invoke on repository
GitClientMemberFunc func = memberFunctionFromAction(sender());
QTC_ASSERT(func, return);
@@ -848,7 +848,7 @@ void GitPlugin::gitClientMemberFuncRepositoryAction()
void GitPlugin::cleanProject()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
cleanRepository(state.currentProjectPath());
}
@@ -963,7 +963,7 @@ void GitPlugin::stash()
{
// Simple stash without prompt, reset repo.
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
const QString id = m_gitClient->synchronousStash(state.topLevel(), QString(), 0);
if (!id.isEmpty() && m_stashDialog)
m_stashDialog->refresh(state.topLevel(), true);
@@ -973,7 +973,7 @@ void GitPlugin::stashSnapshot()
{
// Prompt for description, restore immediately and keep on working.
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
const QString id = m_gitClient->synchronousStash(state.topLevel(), QString(), GitClient::StashImmediateRestore|GitClient::StashPromptDescription);
if (!id.isEmpty() && m_stashDialog)
m_stashDialog->refresh(state.topLevel(), true);
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)
diff --git a/src/plugins/locator/commandlocator.cpp b/src/plugins/locator/commandlocator.cpp
index 0731ca1bb9..a9090c05a6 100644
--- a/src/plugins/locator/commandlocator.cpp
+++ b/src/plugins/locator/commandlocator.cpp
@@ -115,9 +115,9 @@ void CommandLocator::accept(Locator::FilterEntry entry) const
{
// Retrieve action via index.
const int index = entry.internalData.toInt();
- QTC_ASSERT(index >= 0 && index < d->commands.size(), return)
+ QTC_ASSERT(index >= 0 && index < d->commands.size(), return);
QAction *action = d->commands.at(index)->action();
- QTC_ASSERT(action->isEnabled(), return)
+ QTC_ASSERT(action->isEnabled(), return);
action->trigger();
}
diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp
index e91fad15ed..20187dd958 100644
--- a/src/plugins/mercurial/mercurialplugin.cpp
+++ b/src/plugins/mercurial/mercurialplugin.cpp
@@ -281,28 +281,28 @@ void MercurialPlugin::createFileActions(const Core::Context &context)
void MercurialPlugin::addCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
m_client->synchronousAdd(state.currentFileTopLevel(), state.relativeCurrentFile());
}
void MercurialPlugin::annotateCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
m_client->annotate(state.currentFileTopLevel(), state.relativeCurrentFile());
}
void MercurialPlugin::diffCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
m_client->diff(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()));
}
void MercurialPlugin::logCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
m_client->log(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()),
QStringList(), true);
}
@@ -310,7 +310,7 @@ void MercurialPlugin::logCurrentFile()
void MercurialPlugin::revertCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
RevertDialog reverter;
if (reverter.exec() != QDialog::Accepted)
@@ -321,7 +321,7 @@ void MercurialPlugin::revertCurrentFile()
void MercurialPlugin::statusCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
m_client->status(state.currentFileTopLevel(), state.relativeCurrentFile());
}
@@ -359,25 +359,24 @@ void MercurialPlugin::createDirectoryActions(const Core::Context &context)
m_commandLocator->appendCommand(command);
}
-
void MercurialPlugin::diffRepository()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
m_client->diff(state.topLevel());
}
void MercurialPlugin::logRepository()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
m_client->log(state.topLevel());
}
void MercurialPlugin::revertMulti()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
RevertDialog reverter;
if (reverter.exec() != QDialog::Accepted)
@@ -388,7 +387,7 @@ void MercurialPlugin::revertMulti()
void MercurialPlugin::statusMulti()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
m_client->status(state.topLevel());
}
@@ -454,7 +453,7 @@ void MercurialPlugin::createRepositoryActions(const Core::Context &context)
void MercurialPlugin::pull()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
SrcDestDialog dialog;
dialog.setWindowTitle(tr("Pull Source"));
@@ -466,7 +465,7 @@ void MercurialPlugin::pull()
void MercurialPlugin::push()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
SrcDestDialog dialog;
dialog.setWindowTitle(tr("Push Destination"));
@@ -478,7 +477,7 @@ void MercurialPlugin::push()
void MercurialPlugin::update()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
RevertDialog updateDialog;
updateDialog.setWindowTitle(tr("Update"));
@@ -490,7 +489,7 @@ void MercurialPlugin::update()
void MercurialPlugin::import()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
QFileDialog importDialog;
importDialog.setFileMode(QFileDialog::ExistingFiles);
@@ -506,7 +505,7 @@ void MercurialPlugin::import()
void MercurialPlugin::incoming()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
SrcDestDialog dialog;
dialog.setWindowTitle(tr("Incoming Source"));
@@ -518,7 +517,7 @@ void MercurialPlugin::incoming()
void MercurialPlugin::outgoing()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
m_client->outgoing(state.topLevel());
}
@@ -548,7 +547,7 @@ void MercurialPlugin::commit()
return;
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
m_submitRepository = state.topLevel();
@@ -591,7 +590,7 @@ void MercurialPlugin::showCommitWidget(const QList<VcsBaseClient::StatusItem> &s
return;
}
- QTC_ASSERT(qobject_cast<CommitEditor *>(editor), return)
+ QTC_ASSERT(qobject_cast<CommitEditor *>(editor), return);
CommitEditor *commitEditor = static_cast<CommitEditor *>(editor);
commitEditor->registerActions(editorUndo, editorRedo, editorCommit, editorDiff);
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp
index 2a2183d346..a368bea40f 100644
--- a/src/plugins/perforce/perforceplugin.cpp
+++ b/src/plugins/perforce/perforceplugin.cpp
@@ -120,7 +120,7 @@ static inline QStringList perforceRelativeFileArguments(const QStringList &args)
{
if (args.isEmpty())
return QStringList(QLatin1String("..."));
- QTC_ASSERT(args.size() == 1, return QStringList())
+ QTC_ASSERT(args.size() == 1, return QStringList());
QStringList p4Args = args;
p4Args.front() += QLatin1String("/...");
return p4Args;
@@ -463,21 +463,21 @@ void PerforcePlugin::extensionsInitialized()
void PerforcePlugin::openCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
vcsOpen(state.currentFileTopLevel(), state.relativeCurrentFile());
}
void PerforcePlugin::addCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
vcsAdd(state.currentFileTopLevel(), state.relativeCurrentFile());
}
void PerforcePlugin::revertCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
QTextCodec *codec = VcsBase::VcsBaseEditorWidget::getCodec(state.currentFile());
QStringList args;
@@ -512,14 +512,14 @@ void PerforcePlugin::revertCurrentFile()
void PerforcePlugin::diffCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
p4Diff(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()));
}
void PerforcePlugin::diffCurrentProject()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
p4Diff(state.currentProjectTopLevel(), perforceRelativeProjectDirectory(state));
}
@@ -531,7 +531,7 @@ void PerforcePlugin::diffAllOpened()
void PerforcePlugin::updateCurrentProject()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
updateCheckout(state.currentProjectTopLevel(), perforceRelativeProjectDirectory(state));
}
@@ -543,7 +543,7 @@ void PerforcePlugin::updateAll()
void PerforcePlugin::revertCurrentProject()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
const QString msg = tr("Do you want to revert all changes to the project \"%1\"?").arg(state.currentProjectName());
if (QMessageBox::warning(0, tr("p4 revert"), msg, QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
@@ -555,7 +555,7 @@ void PerforcePlugin::revertUnchangedCurrentProject()
{
// revert -a.
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
revertProject(state.currentProjectTopLevel(), perforceRelativeProjectDirectory(state), true);
}
@@ -625,7 +625,7 @@ void PerforcePlugin::startSubmitProject()
}
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
// Revert all unchanged files.
if (!revertProject(state.currentProjectTopLevel(), perforceRelativeProjectDirectory(state), true))
@@ -713,7 +713,7 @@ void PerforcePlugin::describeChange()
void PerforcePlugin::annotateCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
annotate(state.currentFileTopLevel(), state.relativeCurrentFile());
}
@@ -765,7 +765,7 @@ void PerforcePlugin::annotate(const QString &workingDir,
void PerforcePlugin::filelogCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
filelog(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()), true);
}
@@ -781,14 +781,14 @@ void PerforcePlugin::filelog()
void PerforcePlugin::logProject()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
filelog(state.currentProjectTopLevel(), perforceRelativeFileArguments(state.relativeCurrentProject()));
}
void PerforcePlugin::logRepository()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
filelog(state.topLevel(), perforceRelativeFileArguments(QStringList()));
}
@@ -1006,7 +1006,7 @@ PerforceResponse PerforcePlugin::synchronousProcess(const QString &workingDir,
const QByteArray &stdInput,
QTextCodec *outputCodec) const
{
- QTC_ASSERT(stdInput.isEmpty(), return PerforceResponse()) // Not supported here
+ QTC_ASSERT(stdInput.isEmpty(), return PerforceResponse()); // Not supported here
VcsBase::VcsBaseOutputWindow *outputWindow = VcsBase::VcsBaseOutputWindow::instance();
// Run, connect stderr to the output window
@@ -1404,7 +1404,7 @@ bool PerforcePlugin::submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *subm
QString PerforcePlugin::clientFilePath(const QString &serverFilePath)
{
- QTC_ASSERT(m_settings.isValid(), return QString())
+ QTC_ASSERT(m_settings.isValid(), return QString());
QStringList args;
args << QLatin1String("fstat") << serverFilePath;
@@ -1423,7 +1423,7 @@ QString PerforcePlugin::clientFilePath(const QString &serverFilePath)
QString PerforcePlugin::pendingChangesData()
{
- QTC_ASSERT(m_settings.isValid(), return QString())
+ QTC_ASSERT(m_settings.isValid(), return QString());
QStringList args = QStringList(QLatin1String("info"));
const PerforceResponse userResponse = runP4Cmd(m_settings.topLevelSymLinkTarget(), args,
@@ -1432,7 +1432,7 @@ QString PerforcePlugin::pendingChangesData()
return QString();
QRegExp r(QLatin1String("User\\sname:\\s(\\S+)\\s*\n"));
- QTC_ASSERT(r.isValid(), return QString())
+ QTC_ASSERT(r.isValid(), return QString());
r.setMinimal(true);
const QString user = r.indexIn(userResponse.stdOut) != -1 ? r.cap(1).trimmed() : QString();
if (user.isEmpty())
diff --git a/src/plugins/perforce/perforcesettings.cpp b/src/plugins/perforce/perforcesettings.cpp
index e543f2b9cf..adf179ba54 100644
--- a/src/plugins/perforce/perforcesettings.cpp
+++ b/src/plugins/perforce/perforcesettings.cpp
@@ -37,6 +37,7 @@
#include <utils/qtcassert.h>
#include <utils/environment.h>
+#include <QDebug>
#include <QSettings>
#include <QStringList>
#include <QCoreApplication>
@@ -238,7 +239,7 @@ void PerforceSettings::clearTopLevel()
QString PerforceSettings::relativeToTopLevel(const QString &dir) const
{
- QTC_ASSERT(!m_topLevelDir.isNull(), return QLatin1String("../") + dir)
+ QTC_ASSERT(!m_topLevelDir.isNull(), return QLatin1String("../") + dir);
return m_topLevelDir->relativeFilePath(dir);
}
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp
index 7e48af826c..77243d5c53 100644
--- a/src/plugins/projectexplorer/appoutputpane.cpp
+++ b/src/plugins/projectexplorer/appoutputpane.cpp
@@ -378,7 +378,7 @@ void AppOutputPane::showTabFor(RunControl *rc)
void AppOutputPane::reRunRunControl()
{
const int index = currentIndex();
- QTC_ASSERT(index != -1 && !m_runControlTabs.at(index).runControl->isRunning(), return;)
+ QTC_ASSERT(index != -1 && !m_runControlTabs.at(index).runControl->isRunning(), return);
RunControlTab &tab = m_runControlTabs[index];
@@ -399,7 +399,7 @@ void AppOutputPane::attachToRunControl()
void AppOutputPane::stopRunControl()
{
const int index = currentIndex();
- QTC_ASSERT(index != -1 && m_runControlTabs.at(index).runControl->isRunning(), return;)
+ QTC_ASSERT(index != -1 && m_runControlTabs.at(index).runControl->isRunning(), return);
RunControl *rc = m_runControlTabs.at(index).runControl;
if (rc->isRunning() && optionallyPromptToStop(rc))
@@ -428,7 +428,7 @@ bool AppOutputPane::closeTab(int index)
bool AppOutputPane::closeTab(int tabIndex, CloseTabMode closeTabMode)
{
int index = indexOf(m_tabWidget->widget(tabIndex));
- QTC_ASSERT(index != -1, return true;)
+ QTC_ASSERT(index != -1, return true);
RunControlTab &tab = m_runControlTabs[index];
@@ -566,7 +566,7 @@ void AppOutputPane::slotRunControlFinished2(RunControl *sender)
{
const int senderIndex = indexOf(sender);
- QTC_ASSERT(senderIndex != -1, return; )
+ QTC_ASSERT(senderIndex != -1, return);
// Enable buttons for current
RunControl *current = currentRunControl();
diff --git a/src/plugins/projectexplorer/customwizard/customwizard.cpp b/src/plugins/projectexplorer/customwizard/customwizard.cpp
index 67353799fd..7be458a060 100644
--- a/src/plugins/projectexplorer/customwizard/customwizard.cpp
+++ b/src/plugins/projectexplorer/customwizard/customwizard.cpp
@@ -234,7 +234,7 @@ Core::GeneratedFiles CustomWizard::generateFiles(const QWizard *dialog, QString
{
// Look for the Custom field page to find the path
const Internal::CustomWizardPage *cwp = findWizardPage<Internal::CustomWizardPage>(dialog);
- QTC_ASSERT(cwp, return Core::GeneratedFiles())
+ QTC_ASSERT(cwp, return Core::GeneratedFiles());
CustomWizardContextPtr ctx = context();
ctx->path = ctx->targetPath = cwp->path();
@@ -300,7 +300,7 @@ Core::GeneratedFiles CustomWizard::generateWizardFiles(QString *errorMessage) co
Core::GeneratedFiles rc;
const CustomWizardContextPtr ctx = context();
- QTC_ASSERT(!ctx->targetPath.isEmpty(), return rc)
+ QTC_ASSERT(!ctx->targetPath.isEmpty(), return rc);
if (CustomWizardPrivate::verbose)
qDebug() << "CustomWizard::generateWizardFiles: in "
@@ -565,7 +565,7 @@ void CustomProjectWizard::initProjectWizardDialog(BaseProjectWizardDialog *w,
Core::GeneratedFiles CustomProjectWizard::generateFiles(const QWizard *w, QString *errorMessage) const
{
const BaseProjectWizardDialog *dialog = qobject_cast<const BaseProjectWizardDialog *>(w);
- QTC_ASSERT(dialog, return Core::GeneratedFiles())
+ QTC_ASSERT(dialog, return Core::GeneratedFiles());
// Add project name as macro. Path is here under project directory
CustomWizardContextPtr ctx = context();
ctx->path = dialog->path();
diff --git a/src/plugins/projectexplorer/customwizard/customwizardpage.cpp b/src/plugins/projectexplorer/customwizard/customwizardpage.cpp
index de4911e3f1..4486a03134 100644
--- a/src/plugins/projectexplorer/customwizard/customwizardpage.cpp
+++ b/src/plugins/projectexplorer/customwizard/customwizardpage.cpp
@@ -96,7 +96,7 @@ void TextFieldComboBox::slotCurrentIndexChanged(int i)
void TextFieldComboBox::setItems(const QStringList &displayTexts,
const QStringList &values)
{
- QTC_ASSERT(displayTexts.size() == values.size(), return)
+ QTC_ASSERT(displayTexts.size() == values.size(), return);
clear();
addItems(displayTexts);
const int count = values.count();
diff --git a/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp b/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
index b265b8e561..bfc114da15 100644
--- a/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
+++ b/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
@@ -695,7 +695,7 @@ CustomWizardParameters::ParseResult
}
break;
case ParseWithinValidationRuleMessage:
- QTC_ASSERT(!rules.isEmpty(), return ParseFailed; )
+ QTC_ASSERT(!rules.isEmpty(), return ParseFailed);
// This reads away the end tag, set state here.
assignLanguageElementText(reader, language, &(rules.back().message));
state = ParseWithinValidationRule;
@@ -955,7 +955,7 @@ TemporaryFileTransform::TemporaryFileTransform(TemporaryFilePtrList *f) :
QString TemporaryFileTransform::operator()(const QString &value) const
{
TemporaryFilePtr temporaryFile(new QTemporaryFile(m_pattern));
- QTC_ASSERT(temporaryFile->open(), return QString(); )
+ QTC_ASSERT(temporaryFile->open(), return QString());
temporaryFile->write(value.toLocal8Bit());
const QString name = temporaryFile->fileName();
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 1a2e3d53d1..84d3d67cef 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -2582,7 +2582,7 @@ QString ProjectExplorerPlugin::directoryFor(Node *node)
void ProjectExplorerPlugin::addNewFile()
{
- QTC_ASSERT(d->m_currentNode, return)
+ QTC_ASSERT(d->m_currentNode, return);
QString location = directoryFor(d->m_currentNode);
QVariantMap map;
@@ -2595,7 +2595,7 @@ void ProjectExplorerPlugin::addNewFile()
void ProjectExplorerPlugin::addNewSubproject()
{
- QTC_ASSERT(d->m_currentNode, return)
+ QTC_ASSERT(d->m_currentNode, return);
QString location = directoryFor(d->m_currentNode);
if (d->m_currentNode->nodeType() == ProjectNodeType
@@ -2611,7 +2611,7 @@ void ProjectExplorerPlugin::addNewSubproject()
void ProjectExplorerPlugin::addExistingFiles()
{
- QTC_ASSERT(d->m_currentNode, return)
+ QTC_ASSERT(d->m_currentNode, return);
QStringList fileNames = QFileDialog::getOpenFileNames(Core::ICore::mainWindow(),
tr("Add Existing Files"), directoryFor(d->m_currentNode));
@@ -2687,33 +2687,33 @@ void ProjectExplorerPlugin::removeProject()
void ProjectExplorerPlugin::openFile()
{
- QTC_ASSERT(d->m_currentNode, return)
+ QTC_ASSERT(d->m_currentNode, return);
Core::EditorManager *em = Core::EditorManager::instance();
em->openEditor(d->m_currentNode->path(), Core::Id(), Core::EditorManager::ModeSwitch);
}
void ProjectExplorerPlugin::searchOnFileSystem()
{
- QTC_ASSERT(d->m_currentNode, return)
+ QTC_ASSERT(d->m_currentNode, return);
FolderNavigationWidget::findOnFileSystem(pathFor(d->m_currentNode));
}
void ProjectExplorerPlugin::showInGraphicalShell()
{
- QTC_ASSERT(d->m_currentNode, return)
+ QTC_ASSERT(d->m_currentNode, return);
Core::FileUtils::showInGraphicalShell(Core::ICore::mainWindow(),
pathFor(d->m_currentNode));
}
void ProjectExplorerPlugin::openTerminalHere()
{
- QTC_ASSERT(d->m_currentNode, return)
+ QTC_ASSERT(d->m_currentNode, return);
Core::FileUtils::openTerminal(directoryFor(d->m_currentNode));
}
void ProjectExplorerPlugin::removeFile()
{
- QTC_ASSERT(d->m_currentNode && d->m_currentNode->nodeType() == FileNodeType, return)
+ QTC_ASSERT(d->m_currentNode && d->m_currentNode->nodeType() == FileNodeType, return);
FileNode *fileNode = qobject_cast<FileNode*>(d->m_currentNode);
@@ -2752,7 +2752,7 @@ void ProjectExplorerPlugin::removeFile()
void ProjectExplorerPlugin::deleteFile()
{
- QTC_ASSERT(d->m_currentNode && d->m_currentNode->nodeType() == FileNodeType, return)
+ QTC_ASSERT(d->m_currentNode && d->m_currentNode->nodeType() == FileNodeType, return);
FileNode *fileNode = qobject_cast<FileNode*>(d->m_currentNode);
@@ -2766,7 +2766,7 @@ void ProjectExplorerPlugin::deleteFile()
return;
ProjectNode *projectNode = fileNode->projectNode();
- Q_ASSERT(projectNode);
+ QTC_ASSERT(projectNode, return);
projectNode->deleteFiles(fileNode->fileType(), QStringList(filePath));
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index dad8503c5a..a7649cf5b0 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -647,7 +647,7 @@ void RunControl::setApplicationProcessHandle(const ProcessHandle &handle)
bool RunControl::promptToStop(bool *optionalPrompt) const
{
- QTC_ASSERT(isRunning(), return true;)
+ QTC_ASSERT(isRunning(), return true);
if (optionalPrompt && !*optionalPrompt)
return true;
@@ -669,7 +669,7 @@ bool RunControl::showPromptToStopDialog(const QString &title,
const QString &cancelButtonText,
bool *prompt) const
{
- QTC_ASSERT(isRunning(), return true;)
+ QTC_ASSERT(isRunning(), return true);
// Show a question message box where user can uncheck this
// question for this class.
Utils::CheckableMessageBox messageBox(Core::ICore::mainWindow());
diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp
index dd17b9fdef..970a7c8c33 100644
--- a/src/plugins/projectexplorer/settingsaccessor.cpp
+++ b/src/plugins/projectexplorer/settingsaccessor.cpp
@@ -45,8 +45,9 @@
#include <utils/qtcprocess.h>
#include <utils/persistentsettings.h>
-#include <QFile>
#include <QApplication>
+#include <QDebug>
+#include <QFile>
#include <QMainWindow>
#include <QMessageBox>
diff --git a/src/plugins/projectexplorer/taskmodel.cpp b/src/plugins/projectexplorer/taskmodel.cpp
index 94f2307f9f..a1933100c8 100644
--- a/src/plugins/projectexplorer/taskmodel.cpp
+++ b/src/plugins/projectexplorer/taskmodel.cpp
@@ -159,7 +159,7 @@ int TaskModel::rowForId(unsigned int id)
void TaskModel::updateTaskFileName(unsigned int id, const QString &fileName)
{
int i = rowForId(id);
- QTC_ASSERT(i != -1, return)
+ QTC_ASSERT(i != -1, return);
if (m_tasks.at(i).taskId == id) {
m_tasks[i].file = Utils::FileName::fromString(fileName);
emit dataChanged(index(i, 0), index(i, 0));
@@ -169,7 +169,7 @@ void TaskModel::updateTaskFileName(unsigned int id, const QString &fileName)
void TaskModel::updateTaskLineNumber(unsigned int id, int line)
{
int i = rowForId(id);
- QTC_ASSERT(i != -1, return)
+ QTC_ASSERT(i != -1, return);
if (m_tasks.at(i).taskId == id) {
m_tasks[i].movedLine = line;
emit dataChanged(index(i, 0), index(i, 0));
diff --git a/src/plugins/projectexplorer/toolchainconfigwidget.cpp b/src/plugins/projectexplorer/toolchainconfigwidget.cpp
index bb730b31f4..3ad7e4da4c 100644
--- a/src/plugins/projectexplorer/toolchainconfigwidget.cpp
+++ b/src/plugins/projectexplorer/toolchainconfigwidget.cpp
@@ -190,19 +190,19 @@ void ToolChainConfigWidget::ensureDebuggerPathChooser(const QStringList &version
void ToolChainConfigWidget::addDebuggerAutoDetection(QObject *receiver, const char *autoDetectSlot)
{
- QTC_ASSERT(d->m_debuggerPathChooser, return; )
+ QTC_ASSERT(d->m_debuggerPathChooser, return);
d->m_debuggerPathChooser->addButton(tr("Autodetect"), receiver, autoDetectSlot);
}
Utils::FileName ToolChainConfigWidget::debuggerCommand() const
{
- QTC_ASSERT(d->m_debuggerPathChooser, return Utils::FileName(); )
+ QTC_ASSERT(d->m_debuggerPathChooser, return Utils::FileName());
return d->m_debuggerPathChooser->fileName();
}
void ToolChainConfigWidget::setDebuggerCommand(const Utils::FileName &debugger)
{
- QTC_ASSERT(d->m_debuggerPathChooser, return; )
+ QTC_ASSERT(d->m_debuggerPathChooser, return);
d->m_debuggerPathChooser->setFileName(debugger);
}
@@ -281,7 +281,7 @@ void ToolChainConfigWidget::addErrorLabel(QGridLayout *lt, int row, int column,
void ToolChainConfigWidget::setErrorMessage(const QString &m)
{
- QTC_ASSERT(d->m_errorLabel, return; )
+ QTC_ASSERT(d->m_errorLabel, return);
if (m.isEmpty()) {
clearErrorMessage();
} else {
@@ -293,7 +293,7 @@ void ToolChainConfigWidget::setErrorMessage(const QString &m)
void ToolChainConfigWidget::clearErrorMessage()
{
- QTC_ASSERT(d->m_errorLabel, return; )
+ QTC_ASSERT(d->m_errorLabel, return);
d->m_errorLabel->clear();
d->m_errorLabel->setStyleSheet(QString());
d->m_errorLabel->setVisible(false);
diff --git a/src/plugins/qmlprojectmanager/fileformat/filefilteritems.cpp b/src/plugins/qmlprojectmanager/fileformat/filefilteritems.cpp
index 3dfc088d0f..99b4169b8a 100644
--- a/src/plugins/qmlprojectmanager/fileformat/filefilteritems.cpp
+++ b/src/plugins/qmlprojectmanager/fileformat/filefilteritems.cpp
@@ -257,7 +257,7 @@ void FileFilterBaseItem::updateFileListNow()
const QSet<QString> watchDirs = dirsToBeWatched - oldDirs;
if (!unwatchDirs.isEmpty()) {
- QTC_ASSERT(m_dirWatcher, return ; )
+ QTC_ASSERT(m_dirWatcher, return);
m_dirWatcher->removeDirectories(unwatchDirs.toList());
}
if (!watchDirs.isEmpty())
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp
index 0813e0868b..8b07a5fe74 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp
@@ -219,7 +219,7 @@ void QmlProjectRunConfigurationWidget::setMainScript(int index)
void QmlProjectRunConfigurationWidget::onQtVersionSelectionChanged()
{
QVariant data = m_qtVersionComboBox->itemData(m_qtVersionComboBox->currentIndex());
- QTC_ASSERT(data.isValid() && data.canConvert(QVariant::Int), return)
+ QTC_ASSERT(data.isValid() && data.canConvert(QVariant::Int), return);
m_runConfiguration->setQtVersionId(data.toInt());
m_runConfiguration->updateEnabled();
m_environmentWidget->setBaseEnvironment(m_runConfiguration->baseEnvironment());
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/classlist.cpp b/src/plugins/qt4projectmanager/customwidgetwizard/classlist.cpp
index 0de80b70c6..6f5c304bbc 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/classlist.cpp
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/classlist.cpp
@@ -71,7 +71,7 @@ ClassModel::ClassModel(QObject *parent) :
m_validator(QLatin1String("^[a-zA-Z][a-zA-Z0-9_]*$")),
m_newClassPlaceHolder(ClassList::tr("<New class>"))
{
- QTC_ASSERT(m_validator.isValid(), return)
+ QTC_ASSERT(m_validator.isValid(), return);
appendPlaceHolder();
}
@@ -123,7 +123,7 @@ QString ClassList::className(int row) const
void ClassList::classEdited()
{
const QModelIndex index = currentIndex();
- QTC_ASSERT(index.isValid(), return)
+ QTC_ASSERT(index.isValid(), return);
const QString name = className(index.row());
if (index == m_model->placeHolderIndex()) {
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp b/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp
index 30b6230b03..bdb4a94358 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp
@@ -155,7 +155,7 @@ bool S60RunControlBase::promptToStop(bool *optionalPrompt) const
{
Q_UNUSED(optionalPrompt)
// We override the settings prompt
- QTC_ASSERT(isRunning(), return true;)
+ QTC_ASSERT(isRunning(), return true);
const QString question = tr("<html><head/><body><center><i>%1</i> is still running on the device.</center>"
"<center>Terminating it can leave the target in an inconsistent state.</center>"
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.cpp b/src/plugins/qt4projectmanager/qt4projectmanager.cpp
index 5a0c459f34..c81e57ddb4 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectmanager.cpp
@@ -100,7 +100,7 @@ static inline bool isFormWindowEditor(const QObject *o)
static inline QString formWindowEditorContents(const QObject *editor)
{
const QVariant contentV = editor->property("contents");
- QTC_ASSERT(contentV.isValid(), return QString(); )
+ QTC_ASSERT(contentV.isValid(), return QString());
return contentV.toString();
}
diff --git a/src/plugins/qt4projectmanager/wizards/testwizard.cpp b/src/plugins/qt4projectmanager/wizards/testwizard.cpp
index decd84fd45..ec182a261b 100644
--- a/src/plugins/qt4projectmanager/wizards/testwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/testwizard.cpp
@@ -154,7 +154,7 @@ Core::GeneratedFiles TestWizard::generateFiles(const QWizard *w, QString *errorM
Q_UNUSED(errorMessage)
const TestWizardDialog *wizardDialog = qobject_cast<const TestWizardDialog *>(w);
- QTC_ASSERT(wizardDialog, return Core::GeneratedFiles())
+ QTC_ASSERT(wizardDialog, return Core::GeneratedFiles());
const QtProjectParameters projectParams = wizardDialog->projectParameters();
const TestWizardParameters testParams = wizardDialog->testParameters();
diff --git a/src/plugins/qtsupport/debugginghelperbuildtask.cpp b/src/plugins/qtsupport/debugginghelperbuildtask.cpp
index 0884933b52..eccf0d37d0 100644
--- a/src/plugins/qtsupport/debugginghelperbuildtask.cpp
+++ b/src/plugins/qtsupport/debugginghelperbuildtask.cpp
@@ -129,7 +129,7 @@ DebuggingHelperBuildTask::DebuggingHelperBuildTask(const BaseQtVersion *version,
DebuggingHelperBuildTask::Tools DebuggingHelperBuildTask::availableTools(const BaseQtVersion *version)
{
- QTC_ASSERT(version, return 0; )
+ QTC_ASSERT(version, return 0);
// Check the build requirements of the tools
DebuggingHelperBuildTask::Tools tools = 0;
// Gdb helpers are needed on Mac/gdb only.
diff --git a/src/plugins/qtsupport/qtversionmanager.cpp b/src/plugins/qtsupport/qtversionmanager.cpp
index b1472aad82..d5c086350b 100644
--- a/src/plugins/qtsupport/qtversionmanager.cpp
+++ b/src/plugins/qtsupport/qtversionmanager.cpp
@@ -56,12 +56,13 @@
# include <utils/winutils.h>
#endif
+#include <QDebug>
+#include <QDir>
#include <QFile>
+#include <QMainWindow>
#include <QSettings>
#include <QTextStream>
-#include <QDir>
#include <QTimer>
-#include <QMainWindow>
#include <algorithm>
diff --git a/src/plugins/subversion/checkoutwizard.cpp b/src/plugins/subversion/checkoutwizard.cpp
index ef708ab4b8..a1f84338a7 100644
--- a/src/plugins/subversion/checkoutwizard.cpp
+++ b/src/plugins/subversion/checkoutwizard.cpp
@@ -83,7 +83,7 @@ QSharedPointer<VcsBase::AbstractCheckoutJob> CheckoutWizard::createJob(const QLi
{
// Collect parameters for the checkout command.
const CheckoutWizardPage *cwp = qobject_cast<const CheckoutWizardPage *>(parameterPages.front());
- QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>())
+ QTC_ASSERT(cwp, return QSharedPointer<VcsBase::AbstractCheckoutJob>());
const SubversionSettings settings = SubversionPlugin::instance()->settings();
const QString binary = settings.svnCommand;
const QString directory = cwp->directory();
diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp
index 2e63152bca..9369fdc514 100644
--- a/src/plugins/subversion/subversionplugin.cpp
+++ b/src/plugins/subversion/subversionplugin.cpp
@@ -620,7 +620,7 @@ void SubversionPlugin::svnDiff(const Subversion::Internal::SubversionDiffParamet
setDiffBaseDirectory(editor, p.workingDir);
VcsBase::VcsBaseEditorWidget::tagEditor(editor, tag);
SubversionEditor *diffEditorWidget = qobject_cast<SubversionEditor *>(editor->widget());
- QTC_ASSERT(diffEditorWidget, return ; )
+ QTC_ASSERT(diffEditorWidget, return);
// Wire up the parameter widget to trigger a re-run on
// parameter change and 'revert' from inside the diff editor.
@@ -685,14 +685,14 @@ void SubversionPlugin::updateActions(VcsBase::VcsBasePlugin::ActionState as)
void SubversionPlugin::addCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
vcsAdd(state.currentFileTopLevel(), state.relativeCurrentFile());
}
void SubversionPlugin::revertAll()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
const QString title = tr("Revert repository");
if (QMessageBox::warning(0, title, tr("Revert all pending changes to the repository?"),
QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
@@ -713,7 +713,7 @@ void SubversionPlugin::revertAll()
void SubversionPlugin::revertCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
QStringList args(QLatin1String("diff"));
args.push_back(state.relativeCurrentFile());
@@ -748,21 +748,21 @@ void SubversionPlugin::revertCurrentFile()
void SubversionPlugin::diffProject()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
svnDiff(state.currentProjectTopLevel(), state.relativeCurrentProject(), state.currentProjectName());
}
void SubversionPlugin::diffCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
svnDiff(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()));
}
void SubversionPlugin::startCommitCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
startCommit(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()));
}
@@ -844,49 +844,49 @@ bool SubversionPlugin::commit(const QString &messageFile,
void SubversionPlugin::filelogCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
- filelog(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()), true);
+ QTC_ASSERT(state.hasFile(), return);
+ filelog(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()), true);
}
void SubversionPlugin::logProject()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasProject(), return)
+ QTC_ASSERT(state.hasProject(), return);
filelog(state.currentProjectTopLevel(), state.relativeCurrentProject());
}
void SubversionPlugin::logRepository()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
filelog(state.topLevel());
}
void SubversionPlugin::diffRepository()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
svnDiff(state.topLevel(), QStringList());
}
void SubversionPlugin::statusRepository()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
svnStatus(state.topLevel());
}
void SubversionPlugin::updateRepository()
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
svnUpdate(state.topLevel());
}
void SubversionPlugin::svnStatus(const QString &workingDir, const QStringList &relativePaths)
{
const VcsBase::VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasTopLevel(), return)
+ QTC_ASSERT(state.hasTopLevel(), return);
QStringList args(QLatin1String("status"));
if (!relativePaths.isEmpty())
args.append(relativePaths);
diff --git a/src/plugins/texteditor/basetextdocument.cpp b/src/plugins/texteditor/basetextdocument.cpp
index 22cb9fcd56..6b3477322d 100644
--- a/src/plugins/texteditor/basetextdocument.cpp
+++ b/src/plugins/texteditor/basetextdocument.cpp
@@ -196,7 +196,7 @@ ITextMarkable *BaseTextDocument::documentMarker() const
{
BaseTextDocumentLayout *documentLayout =
qobject_cast<BaseTextDocumentLayout *>(d->m_document->documentLayout());
- QTC_ASSERT(documentLayout, return 0)
+ QTC_ASSERT(documentLayout, return 0);
return documentLayout->markableInterface();
}
diff --git a/src/plugins/texteditor/basetextdocumentlayout.cpp b/src/plugins/texteditor/basetextdocumentlayout.cpp
index 5378421834..c29a7a4620 100644
--- a/src/plugins/texteditor/basetextdocumentlayout.cpp
+++ b/src/plugins/texteditor/basetextdocumentlayout.cpp
@@ -124,7 +124,7 @@ void DocumentMarker::removeMarkFromMarksCache(TextEditor::ITextMark *mark)
{
BaseTextDocumentLayout *documentLayout =
qobject_cast<BaseTextDocumentLayout*>(document->documentLayout());
- QTC_ASSERT(documentLayout, return)
+ QTC_ASSERT(documentLayout, return);
bool needUpdate = m_marksCache.removeOne(mark);
if (m_marksCache.isEmpty()) {
documentLayout->hasMarks = false;
@@ -141,7 +141,7 @@ void DocumentMarker::removeMark(TextEditor::ITextMark *mark)
{
BaseTextDocumentLayout *documentLayout =
qobject_cast<BaseTextDocumentLayout*>(document->documentLayout());
- QTC_ASSERT(documentLayout, return)
+ QTC_ASSERT(documentLayout, return);
QTextBlock block = document->begin();
while (block.isValid()) {
diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp
index c94f6ba168..fefffc9fa2 100644
--- a/src/plugins/texteditor/fontsettings.cpp
+++ b/src/plugins/texteditor/fontsettings.cpp
@@ -36,13 +36,14 @@
#include <utils/qtcassert.h>
#include <coreplugin/icore.h>
+#include <QCoreApplication>
+#include <QDebug>
#include <QFile>
#include <QFileInfo>
-#include <QSettings>
-#include <QCoreApplication>
-#include <QTextCharFormat>
#include <QFont>
#include <QMainWindow>
+#include <QSettings>
+#include <QTextCharFormat>
static const char fontFamilyKey[] = "FontFamily";
static const char fontSizeKey[] = "FontSize";
diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp
index ab018599f2..635c43067a 100644
--- a/src/plugins/texteditor/fontsettingspage.cpp
+++ b/src/plugins/texteditor/fontsettingspage.cpp
@@ -531,10 +531,10 @@ void FontSettingsPage::confirmDeleteColorScheme()
void FontSettingsPage::deleteColorScheme()
{
const int index = d_ptr->m_ui->schemeComboBox->currentIndex();
- QTC_ASSERT(index != -1, return)
+ QTC_ASSERT(index != -1, return);
const ColorSchemeEntry &entry = d_ptr->m_schemeListModel->colorSchemeAt(index);
- QTC_ASSERT(!entry.readOnly, return)
+ QTC_ASSERT(!entry.readOnly, return);
if (QFile::remove(entry.fileName))
d_ptr->m_schemeListModel->removeColorScheme(index);
diff --git a/src/plugins/texteditor/tooltip/tipcontents.cpp b/src/plugins/texteditor/tooltip/tipcontents.cpp
index 0b047a9b65..bbfe954789 100644
--- a/src/plugins/texteditor/tooltip/tipcontents.cpp
+++ b/src/plugins/texteditor/tooltip/tipcontents.cpp
@@ -182,7 +182,7 @@ bool WidgetContent::equals(const TipContent &tipContent) const
bool WidgetContent::pinToolTip(QWidget *w)
{
- QTC_ASSERT(w, return false; )
+ QTC_ASSERT(w, return false);
// Find the parent WidgetTip, tell it to pin/release the
// widget and close.
for (QWidget *p = w->parentWidget(); p ; p = p->parentWidget()) {
diff --git a/src/plugins/texteditor/tooltip/tipfactory.cpp b/src/plugins/texteditor/tooltip/tipfactory.cpp
index 78f178a124..a5877f8aaa 100644
--- a/src/plugins/texteditor/tooltip/tipfactory.cpp
+++ b/src/plugins/texteditor/tooltip/tipfactory.cpp
@@ -55,6 +55,6 @@ Internal::QTipLabel *TipFactory::createTip(const TipContent &content, QWidget *w
if (content.typeId() == WidgetContent::WIDGET_CONTENT_ID)
return new WidgetTip(w);
- QTC_ASSERT(false, return 0; )
+ QTC_CHECK(false);
return 0;
}
diff --git a/src/plugins/texteditor/tooltip/tips.cpp b/src/plugins/texteditor/tooltip/tips.cpp
index b719ca4674..dc040e5b9e 100644
--- a/src/plugins/texteditor/tooltip/tips.cpp
+++ b/src/plugins/texteditor/tooltip/tips.cpp
@@ -236,7 +236,7 @@ void WidgetTip::configure(const QPoint &pos, QWidget *)
const WidgetContent &anyContent = static_cast<const WidgetContent &>(content());
QWidget *widget = anyContent.widget();
- QTC_ASSERT(widget && m_layout->count() == 0, return; )
+ QTC_ASSERT(widget && m_layout->count() == 0, return);
move(pos);
m_layout->addWidget(widget);
@@ -246,13 +246,13 @@ void WidgetTip::configure(const QPoint &pos, QWidget *)
void WidgetTip::pinToolTipWidget()
{
- QTC_ASSERT(m_layout->count(), return; )
+ QTC_ASSERT(m_layout->count(), return);
// Pin the content widget: Rip the widget out of the layout
// and re-show as a tooltip, with delete on close.
const QPoint screenPos = mapToGlobal(QPoint(0, 0));
QWidget *widget = takeWidget(Qt::ToolTip);
- QTC_ASSERT(widget, return; )
+ QTC_ASSERT(widget, return);
widget->move(screenPos);
widget->show();
diff --git a/src/plugins/valgrind/callgrind/callgrindcontroller.cpp b/src/plugins/valgrind/callgrind/callgrindcontroller.cpp
index f3281fed4b..ea765081bf 100644
--- a/src/plugins/valgrind/callgrind/callgrindcontroller.cpp
+++ b/src/plugins/valgrind/callgrind/callgrindcontroller.cpp
@@ -94,14 +94,13 @@ QString toOptionString(CallgrindController::Option option)
}
}
-
void CallgrindController::run(Option option)
{
if (m_process) {
emit statusMessage(tr("Previous command has not yet finished."));
return;
}
- QTC_ASSERT(m_valgrindProc, return)
+ QTC_ASSERT(m_valgrindProc, return);
if (RemoteValgrindProcess *remote = qobject_cast<RemoteValgrindProcess *>(m_valgrindProc))
m_process = new RemoteValgrindProcess(remote->connection(), this);
@@ -150,7 +149,7 @@ void CallgrindController::run(Option option)
void CallgrindController::processError(QProcess::ProcessError)
{
- QTC_ASSERT(m_process, return)
+ QTC_ASSERT(m_process, return);
const QString error = m_process->errorString();
emit statusMessage(QString("An error occurred while trying to run %1: %2").arg(CALLGRIND_CONTROL_BINARY).arg(error));
diff --git a/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp b/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp
index bde533c272..88f3fcfbb4 100644
--- a/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp
+++ b/src/plugins/valgrind/callgrind/callgrinddatamodel.cpp
@@ -146,7 +146,7 @@ void DataModel::setCostEvent(int event)
if (!d->m_data)
return;
- QTC_ASSERT(event >= 0 && d->m_data->events().size() > event, return)
+ QTC_ASSERT(event >= 0 && d->m_data->events().size() > event, return);
beginResetModel();
d->m_event = event;
d->updateFunctions();
diff --git a/src/plugins/valgrind/callgrind/callgrindparsedata.cpp b/src/plugins/valgrind/callgrind/callgrindparsedata.cpp
index 4964b9a5b9..57121fa239 100644
--- a/src/plugins/valgrind/callgrind/callgrindparsedata.cpp
+++ b/src/plugins/valgrind/callgrind/callgrindparsedata.cpp
@@ -177,7 +177,7 @@ QString ParseData::prettyStringForEvent(const QString &event)
Indirect branches executed (Bi) and indirect branches mispredicted (Bim)
*/
- QTC_ASSERT(event.size() >= 2, return event) // should not happen
+ QTC_ASSERT(event.size() >= 2, return event); // should not happen
const bool isMiss = event.contains(QLatin1Char('m')); // else hit
const bool isRead = event.contains(QLatin1Char('r')); // else write
diff --git a/src/plugins/valgrind/callgrind/callgrindparser.cpp b/src/plugins/valgrind/callgrind/callgrindparser.cpp
index b2025a6141..db0ba7ea43 100644
--- a/src/plugins/valgrind/callgrind/callgrindparser.cpp
+++ b/src/plugins/valgrind/callgrind/callgrindparser.cpp
@@ -268,7 +268,7 @@ void Parser::Private::parse(QIODevice *device)
}
}
#endif
- QTC_ASSERT(calledFunction, continue)
+ QTC_ASSERT(calledFunction, continue);
callData.call->setCallee(calledFunction);
calledFunction->addIncomingCall(callData.call);
diff --git a/src/plugins/valgrind/callgrind/callgrindproxymodel.cpp b/src/plugins/valgrind/callgrind/callgrindproxymodel.cpp
index 88e6a7c14f..87ecd87adb 100644
--- a/src/plugins/valgrind/callgrind/callgrindproxymodel.cpp
+++ b/src/plugins/valgrind/callgrind/callgrindproxymodel.cpp
@@ -151,9 +151,9 @@ bool DataProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_
// check minimum inclusive costs
DataModel *model = dataModel();
- QTC_ASSERT(model, return false) // as always: this should never happen
+ QTC_ASSERT(model, return false); // as always: this should never happen
const ParseData *data = model->parseData();
- QTC_ASSERT(data, return false)
+ QTC_ASSERT(data, return false);
if (m_minimumInclusiveCostRatio != 0.0) {
const quint64 totalCost = data->totalCost(0);
const quint64 inclusiveCost = func->inclusiveCost(0);
diff --git a/src/plugins/valgrind/callgrindtextmark.cpp b/src/plugins/valgrind/callgrindtextmark.cpp
index b6b3d6fd67..f1400ea032 100644
--- a/src/plugins/valgrind/callgrindtextmark.cpp
+++ b/src/plugins/valgrind/callgrindtextmark.cpp
@@ -59,8 +59,8 @@ void CallgrindTextMark::paint(QPainter *painter, const QRect &paintRect) const
bool ok;
qreal costs = m_modelIndex.data(RelativeTotalCostRole).toReal(&ok);
- QTC_ASSERT(ok, return)
- QTC_ASSERT(costs >= 0.0 && costs <= 100.0, return)
+ QTC_ASSERT(ok, return);
+ QTC_ASSERT(costs >= 0.0 && costs <= 100.0, return);
painter->save();
diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp
index 7d0f18dbac..19474156f7 100644
--- a/src/plugins/valgrind/callgrindtool.cpp
+++ b/src/plugins/valgrind/callgrindtool.cpp
@@ -399,7 +399,7 @@ void CallgrindToolPrivate::updateCostFormat()
void CallgrindToolPrivate::handleFilterProjectCosts()
{
ProjectExplorer::Project *pro = ProjectExplorer::ProjectExplorerPlugin::currentProject();
- QTC_ASSERT(pro, return)
+ QTC_ASSERT(pro, return);
if (m_filterProjectCosts->isChecked()) {
const QString projectDir = pro->projectDirectory();
@@ -472,7 +472,7 @@ void CallgrindToolPrivate::setParseData(ParseData *data)
void CallgrindToolPrivate::updateEventCombo()
{
- QTC_ASSERT(m_eventCombo, return)
+ QTC_ASSERT(m_eventCombo, return);
m_eventCombo->clear();
@@ -920,10 +920,10 @@ void CallgrindToolPrivate::requestContextMenu(TextEditor::ITextEditor *editor, i
void CallgrindToolPrivate::handleShowCostsAction()
{
const QAction *action = qobject_cast<QAction *>(sender());
- QTC_ASSERT(action, return)
+ QTC_ASSERT(action, return);
const Function *func = action->data().value<const Function *>();
- QTC_ASSERT(func, return)
+ QTC_ASSERT(func, return);
selectFunction(func);
}
@@ -972,7 +972,7 @@ void CallgrindToolPrivate::takeParserData(CallgrindEngine *engine)
void CallgrindToolPrivate::createTextMarks()
{
DataModel *model = m_dataModel;
- QTC_ASSERT(model, return)
+ QTC_ASSERT(model, return);
QList<QString> locations;
for (int row = 0; row < model->rowCount(); ++row) {
diff --git a/src/plugins/valgrind/suppressiondialog.cpp b/src/plugins/valgrind/suppressiondialog.cpp
index c61c14104b..d52dd5001a 100644
--- a/src/plugins/valgrind/suppressiondialog.cpp
+++ b/src/plugins/valgrind/suppressiondialog.cpp
@@ -72,7 +72,7 @@ static QString suppressionText(const Error &error)
// workaround: https://bugs.kde.org/show_bug.cgi?id=255822
if (sup.frames().size() >= 24)
sup.setFrames(sup.frames().mid(0, 23));
- QTC_ASSERT(sup.frames().size() < 24, /**/)
+ QTC_ASSERT(sup.frames().size() < 24, /**/);
// try to set some useful name automatically, instead of "insert_name_here"
// we take the last stack frame and append the suppression kind, e.g.:
diff --git a/src/plugins/vcsbase/checkoutjobs.cpp b/src/plugins/vcsbase/checkoutjobs.cpp
index 297ab2997e..b89002eab5 100644
--- a/src/plugins/vcsbase/checkoutjobs.cpp
+++ b/src/plugins/vcsbase/checkoutjobs.cpp
@@ -179,7 +179,7 @@ void ProcessCheckoutJob::slotFinished (int exitCode, QProcess::ExitStatus exitSt
void ProcessCheckoutJob::start()
{
- QTC_ASSERT(!d->stepQueue.empty(), return)
+ QTC_ASSERT(!d->stepQueue.empty(), return);
slotNext();
}
diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp
index f7d0dd466f..209e1ce06c 100644
--- a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp
+++ b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp
@@ -74,7 +74,7 @@ void CheckoutProgressWizardPage::start(const QSharedPointer<AbstractCheckoutJob>
return;
}
- QTC_ASSERT(m_state != Running, return)
+ QTC_ASSERT(m_state != Running, return);
m_job = job;
connect(job.data(), SIGNAL(output(QString)), ui->logPlainTextEdit, SLOT(appendPlainText(QString)));
connect(job.data(), SIGNAL(failed(QString)), this, SLOT(slotFailed(QString)));
diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp
index d9244961f9..855c298344 100644
--- a/src/plugins/vcsbase/vcsbaseeditor.cpp
+++ b/src/plugins/vcsbase/vcsbaseeditor.cpp
@@ -871,7 +871,7 @@ void VcsBaseEditorWidget::slotDiffCursorPositionChanged()
{
// Adapt diff file browse combo to new position
// if the cursor goes across a file line.
- QTC_ASSERT(d->m_parameters->type == DiffOutput, return)
+ QTC_ASSERT(d->m_parameters->type == DiffOutput, return);
const int newCursorLine = textCursor().blockNumber();
if (newCursorLine == d->m_cursorLine)
return;
@@ -1104,8 +1104,8 @@ void VcsBaseEditorWidget::jumpToChangeFromDiff(QTextCursor cursor)
// cut out chunk and determine file name.
DiffChunk VcsBaseEditorWidget::diffChunk(QTextCursor cursor) const
{
- QTC_ASSERT(d->m_parameters->type == DiffOutput, return DiffChunk(); )
DiffChunk rc;
+ QTC_ASSERT(d->m_parameters->type == DiffOutput, return rc);
// Search back for start of chunk.
QTextBlock block = cursor.block();
if (block.isValid() && TextEditor::BaseTextDocumentLayout::foldingIndent(block) <= 1)
@@ -1441,7 +1441,7 @@ bool VcsBaseEditorWidget::applyDiffChunk(const DiffChunk &dc, bool revert) const
void VcsBaseEditorWidget::slotApplyDiffChunk()
{
const QAction *a = qobject_cast<QAction *>(sender());
- QTC_ASSERT(a, return ; )
+ QTC_ASSERT(a, return);
const Internal::DiffChunkAction chunkAction = qvariant_cast<Internal::DiffChunkAction>(a->data());
const QString title = chunkAction.revert ? tr("Revert Chunk") : tr("Apply Chunk");
const QString question = chunkAction.revert ?
diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp
index e0298938d5..3ed052efe8 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.cpp
+++ b/src/plugins/vcsbase/vcsbaseplugin.cpp
@@ -366,7 +366,7 @@ QString VcsBasePluginState::currentFileDirectory() const
QString VcsBasePluginState::relativeCurrentFile() const
{
- QTC_ASSERT(hasFile(), return QString())
+ QTC_ASSERT(hasFile(), return QString());
return QDir(data->m_state.currentFileTopLevel).relativeFilePath(data->m_state.currentFile);
}
@@ -398,7 +398,7 @@ QString VcsBasePluginState::currentProjectTopLevel() const
QStringList VcsBasePluginState::relativeCurrentProject() const
{
QStringList rc;
- QTC_ASSERT(hasProject(), return rc)
+ QTC_ASSERT(hasProject(), return rc);
if (data->m_state.currentProjectTopLevel != data->m_state.currentProjectPath)
rc.append(QDir(data->m_state.currentProjectTopLevel).relativeFilePath(data->m_state.currentProjectPath));
return rc;
@@ -621,7 +621,7 @@ bool VcsBasePlugin::enableMenuAction(ActionState as, QAction *menuAction) const
void VcsBasePlugin::promptToDeleteCurrentFile()
{
const VcsBasePluginState state = currentState();
- QTC_ASSERT(state.hasFile(), return)
+ QTC_ASSERT(state.hasFile(), return);
const bool rc = Core::ICore::vcsManager()->promptToDelete(versionControl(), state.currentFile());
if (!rc)
QMessageBox::warning(0, tr("Version Control"),
@@ -694,7 +694,7 @@ QList<QAction*> VcsBasePlugin::createSnapShotTestActions()
void VcsBasePlugin::slotTestSnapshot()
{
- QTC_ASSERT(currentState().hasTopLevel(), return)
+ QTC_ASSERT(currentState().hasTopLevel(), return);
d->m_testLastSnapshot = versionControl()->vcsCreateSnapshot(currentState().topLevel());
qDebug() << "Snapshot " << d->m_testLastSnapshot;
VcsBaseOutputWindow::instance()->append(QLatin1String("Snapshot: ") + d->m_testLastSnapshot);
@@ -704,7 +704,7 @@ void VcsBasePlugin::slotTestSnapshot()
void VcsBasePlugin::slotTestListSnapshots()
{
- QTC_ASSERT(currentState().hasTopLevel(), return)
+ QTC_ASSERT(currentState().hasTopLevel(), return);
const QStringList snapshots = versionControl()->vcsSnapshots(currentState().topLevel());
qDebug() << "Snapshots " << snapshots;
VcsBaseOutputWindow::instance()->append(QLatin1String("Snapshots: ") + snapshots.join(QLatin1String(", ")));
@@ -712,7 +712,7 @@ void VcsBasePlugin::slotTestListSnapshots()
void VcsBasePlugin::slotTestRestoreSnapshot()
{
- QTC_ASSERT(currentState().hasTopLevel() && !d->m_testLastSnapshot.isEmpty(), return)
+ QTC_ASSERT(currentState().hasTopLevel() && !d->m_testLastSnapshot.isEmpty(), return);
const bool ok = versionControl()->vcsRestoreSnapshot(currentState().topLevel(), d->m_testLastSnapshot);
const QString msg = d->m_testLastSnapshot+ (ok ? QLatin1String(" restored") : QLatin1String(" failed"));
qDebug() << msg;
@@ -721,7 +721,7 @@ void VcsBasePlugin::slotTestRestoreSnapshot()
void VcsBasePlugin::slotTestRemoveSnapshot()
{
- QTC_ASSERT(currentState().hasTopLevel() && !d->m_testLastSnapshot.isEmpty(), return)
+ QTC_ASSERT(currentState().hasTopLevel() && !d->m_testLastSnapshot.isEmpty(), return);
const bool ok = versionControl()->vcsRemoveSnapshot(currentState().topLevel(), d->m_testLastSnapshot);
const QString msg = d->m_testLastSnapshot+ (ok ? QLatin1String(" removed") : QLatin1String(" failed"));
qDebug() << msg;