Commit d3f97579 authored by Alessandro Portale's avatar Alessandro Portale

Removing some unused semicolons after Q_UNUSED

There were both variants, with and without extra semicolon.
parent f9ed6f18
......@@ -422,7 +422,7 @@ PatchedLibraryPrivate::~PatchedLibraryPrivate()
if (map) {
PatchedLibraryPrivate *that = map->take(fileName);
Q_ASSERT(this == that);
Q_UNUSED(that);
Q_UNUSED(that)
}
}
......@@ -720,7 +720,7 @@ bool PatchedLibraryPrivate::isPlugin(QSettings *settings)
return pluginState == IsAPlugin;
#else
Q_UNUSED(settings);
Q_UNUSED(settings)
return pluginState == MightBeAPlugin;
#endif
}
......@@ -813,7 +813,7 @@ void PatchedPluginLoader::setFileName(const QString &fileName)
qWarning("Cannot load %s into a statically linked Qt library.",
(const char*)QFile::encodeName(fileName));
}
Q_UNUSED(fileName);
Q_UNUSED(fileName)
#endif
}
......
......@@ -43,7 +43,7 @@ MyPlugin2::MyPlugin2()
bool MyPlugin2::initialize(const QStringList & /*arguments*/, QString *errorString)
{
Q_UNUSED(errorString);
Q_UNUSED(errorString)
initializeCalled = true;
QObject *obj = new QObject(this);
obj->setObjectName("MyPlugin2");
......
......@@ -126,20 +126,20 @@ protected:
void setProgressRange(int min, int max)
{
Q_UNUSED(min);
Q_UNUSED(max);
Q_UNUSED(min)
Q_UNUSED(max)
updateProgress();
}
void setProgressValue(int value)
{
Q_UNUSED(value);
Q_UNUSED(value)
updateProgress();
}
void setProgressText(QString value)
{
Q_UNUSED(value);
Q_UNUSED(value)
updateProgressText();
}
private:
......
......@@ -415,8 +415,8 @@ void BinEditorPlugin::initializeEditor(BinEditor *editor)
bool BinEditorPlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
Q_UNUSED(arguments);
Q_UNUSED(errorMessage);
Q_UNUSED(arguments)
Q_UNUSED(errorMessage)
Core::ICore *core = Core::ICore::instance();
if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":/bineditor/BinEditor.mimetypes.xml"), errorMessage))
......
......@@ -306,7 +306,7 @@ bool CMakeProject::parseCMakeLists()
QString CMakeProject::buildParser(const QString &buildConfiguration) const
{
Q_UNUSED(buildConfiguration);
Q_UNUSED(buildConfiguration)
// TODO this is actually slightly wrong, but do i care?
// this should call toolchain(buildConfiguration)
if (!m_toolChain)
......@@ -547,7 +547,7 @@ ProjectExplorer::ProjectNode *CMakeProject::rootProjectNode() const
QStringList CMakeProject::files(FilesMode fileMode) const
{
Q_UNUSED(fileMode);
Q_UNUSED(fileMode)
return m_files;
}
......@@ -664,7 +664,7 @@ bool CMakeFile::save(const QString &fileName)
{
// Once we have an texteditor open for this file, we probably do
// need to implement this, don't we.
Q_UNUSED(fileName);
Q_UNUSED(fileName)
return false;
}
......@@ -706,7 +706,7 @@ bool CMakeFile::isSaveAsAllowed() const
void CMakeFile::modified(ReloadBehavior *behavior)
{
Q_UNUSED(behavior);
Q_UNUSED(behavior)
}
CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeProject *project)
......
......@@ -50,37 +50,37 @@ QList<ProjectExplorer::ProjectNode::ProjectAction> CMakeProjectNode::supportedAc
bool CMakeProjectNode::addSubProjects(const QStringList &proFilePaths)
{
Q_UNUSED(proFilePaths);
Q_UNUSED(proFilePaths)
return false;
}
bool CMakeProjectNode::removeSubProjects(const QStringList &proFilePaths)
{
Q_UNUSED(proFilePaths);
Q_UNUSED(proFilePaths)
return false;
}
bool CMakeProjectNode::addFiles(const ProjectExplorer::FileType fileType, const QStringList &filePaths, QStringList *notAdded)
{
Q_UNUSED(fileType);
Q_UNUSED(filePaths);
Q_UNUSED(notAdded);
Q_UNUSED(fileType)
Q_UNUSED(filePaths)
Q_UNUSED(notAdded)
return false;
}
// TODO: Maybe remove fileType, can be detected by project
bool CMakeProjectNode::removeFiles(const ProjectExplorer::FileType fileType, const QStringList &filePaths, QStringList *notRemoved)
{
Q_UNUSED(fileType);
Q_UNUSED(filePaths);
Q_UNUSED(notRemoved);
Q_UNUSED(fileType)
Q_UNUSED(filePaths)
Q_UNUSED(notRemoved)
return false;
}
bool CMakeProjectNode::renameFile(const ProjectExplorer::FileType fileType, const QString &filePath, const QString &newFilePath)
{
Q_UNUSED(fileType);
Q_UNUSED(filePath);
Q_UNUSED(newFilePath);
Q_UNUSED(fileType)
Q_UNUSED(filePath)
Q_UNUSED(newFilePath)
return false;
}
......@@ -65,7 +65,7 @@ CorePlugin::~CorePlugin()
bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
Q_UNUSED(arguments);
Q_UNUSED(arguments)
const bool success = m_mainWindow->init(errorMessage);
if (success) {
m_welcomeMode = new WelcomeMode;
......
......@@ -136,7 +136,7 @@ void ShortcutSettings::finish()
bool ShortcutSettings::eventFilter(QObject *o, QEvent *e)
{
Q_UNUSED(o);
Q_UNUSED(o)
if ( e->type() == QEvent::KeyPress ) {
QKeyEvent *k = static_cast<QKeyEvent*>(e);
......
......@@ -50,7 +50,7 @@ QByteArray OpenEditorsModel::Entry::kind() const
int OpenEditorsModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
Q_UNUSED(parent)
return 2;
}
......@@ -239,7 +239,7 @@ void OpenEditorsModel::emitDataChanged(IEditor *editor)
QModelIndex OpenEditorsModel::index(int row, int column, const QModelIndex &parent) const
{
Q_UNUSED(parent);
Q_UNUSED(parent)
if (column < 0 || column > 1 || row < 0 || row >= m_editors.count())
return QModelIndex();
return createIndex(row, column);
......
......@@ -142,7 +142,7 @@ void FancyTabBar::updateHover()
// Resets hover animation on mouse enter
void FancyTabBar::enterEvent(QEvent *e)
{
Q_UNUSED(e);
Q_UNUSED(e)
m_hoverRect = QRect();
m_hoverIndex = -1;
}
......@@ -150,7 +150,7 @@ void FancyTabBar::enterEvent(QEvent *e)
// Resets hover animation on mouse enter
void FancyTabBar::leaveEvent(QEvent *e)
{
Q_UNUSED(e);
Q_UNUSED(e)
if (m_hoverIndex >= 0) {
m_hoverIndex = -1;
update(m_hoverRect);
......
......@@ -92,7 +92,7 @@
#include <signal.h>
extern "C" void handleSigInt(int sig)
{
Q_UNUSED(sig);
Q_UNUSED(sig)
Core::ICore::instance()->exit();
qDebug() << "SIGINT caught. Shutting down.";
}
......@@ -284,7 +284,7 @@ MainWindow::~MainWindow()
bool MainWindow::init(QString *errorMessage)
{
Q_UNUSED(errorMessage);
Q_UNUSED(errorMessage)
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
pm->addObject(m_coreImpl);
......
......@@ -44,8 +44,8 @@ Animation * StyleAnimator::widgetAnimation(const QWidget *widget) const
void Animation::paint(QPainter *painter, const QStyleOption *option)
{
Q_UNUSED(option);
Q_UNUSED(painter);
Q_UNUSED(option)
Q_UNUSED(painter)
}
void Animation::drawBlendedImage(QPainter *painter, QRect rect, float alpha)
......
......@@ -74,8 +74,8 @@ CodepasterPlugin::~CodepasterPlugin()
bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_message)
{
Q_UNUSED(arguments);
Q_UNUSED(error_message);
Q_UNUSED(arguments)
Q_UNUSED(error_message)
// Create the globalcontext list to register actions accordingly
QList<int> globalcontext;
......
......@@ -108,7 +108,7 @@ void CppCurrentDocumentFilter::accept(QuickOpen::FilterEntry selection) const
void CppCurrentDocumentFilter::refresh(QFutureInterface<void> &future)
{
Q_UNUSED(future);
Q_UNUSED(future)
}
void CppCurrentDocumentFilter::onDocumentUpdated(Document::Ptr doc)
......
......@@ -68,7 +68,7 @@ void CppQuickOpenFilter::onAboutToRemoveFiles(const QStringList &files)
void CppQuickOpenFilter::refresh(QFutureInterface<void> &future)
{
Q_UNUSED(future);
Q_UNUSED(future)
}
static bool compareLexigraphically(const QuickOpen::FilterEntry &a,
......
......@@ -198,8 +198,8 @@ CppToolsPlugin::~CppToolsPlugin()
bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
{
Q_UNUSED(arguments);
Q_UNUSED(error);
Q_UNUSED(arguments)
Q_UNUSED(error)
Core::ICore *core = Core::ICore::instance();
Core::ActionManager *am = core->actionManager();
......
......@@ -350,7 +350,7 @@ void DebuggerOutputWindow::showOutput(int channel, const QString &output)
void DebuggerOutputWindow::showInput(int channel, const QString &input)
{
Q_UNUSED(channel);
Q_UNUSED(channel)
m_inputText->appendPlainText(input);
QTextCursor cursor = m_inputText->textCursor();
cursor.movePosition(QTextCursor::End);
......
......@@ -97,7 +97,7 @@ RunControl *DebuggerRunner::run(RunConfigurationPtr runConfiguration,
QWidget *DebuggerRunner::configurationWidget(RunConfigurationPtr runConfiguration)
{
// NBS TODO: Add GDB-specific configuration widget
Q_UNUSED(runConfiguration);
Q_UNUSED(runConfiguration)
return 0;
}
......
......@@ -90,7 +90,7 @@ ToolTipWidget::ToolTipWidget(QWidget *parent)
bool ToolTipWidget::eventFilter(QObject *ob, QEvent *ev)
{
Q_UNUSED(ob);
Q_UNUSED(ob)
switch (ev->type()) {
case QEvent::ShortcutOverride:
if (static_cast<QKeyEvent *>(ev)->key() == Qt::Key_Escape)
......
......@@ -91,13 +91,13 @@ DisassemblerModel::DisassemblerModel(QObject *parent)
int DisassemblerModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
Q_UNUSED(parent)
return m_lines.size();
}
int DisassemblerModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
Q_UNUSED(parent)
return 3;
}
......
......@@ -352,7 +352,7 @@ void GdbEngine::readUploadStandardError()
static void dump(const char *first, const char *middle, const QString & to)
{
QByteArray ba(first, middle - first);
Q_UNUSED(to);
Q_UNUSED(to)
// note that qDebug cuts off output after a certain size... (bug?)
qDebug("\n>>>>> %s\n%s\n====\n%s\n<<<<<\n",
qPrintable(currentTime()),
......@@ -1641,7 +1641,7 @@ void GdbEngine::continueInferior()
void GdbEngine::handleStart(const GdbResultRecord &response, const QVariant &)
{
#if defined(Q_OS_MAC)
Q_UNUSED(response);
Q_UNUSED(response)
#else
if (response.resultClass == GdbResultDone) {
// [some leading stdout here]
......@@ -2689,7 +2689,7 @@ static QString tooltipINameForExpression(const QString &exp)
{
// FIXME: 'exp' can contain illegal characters
//return QLatin1String("tooltip.") + exp;
Q_UNUSED(exp);
Q_UNUSED(exp)
return QLatin1String("tooltip.x");
}
......@@ -2865,7 +2865,7 @@ void GdbEngine::setUseDebuggingHelpers(const QVariant &on)
//qDebug() << "SWITCHING ON/OFF DUMPER DEBUGGING:" << on;
// FIXME: a bit too harsh, but otherwise the treeview sometimes look funny
//m_expandedINames.clear();
Q_UNUSED(on);
Q_UNUSED(on)
setTokenBarrier();
updateLocals();
}
......@@ -2899,7 +2899,7 @@ static inline QString msgRetrievingWatchData(int pending)
void GdbEngine::runDirectDebuggingHelper(const WatchData &data, bool dumpChildren)
{
Q_UNUSED(dumpChildren);
Q_UNUSED(dumpChildren)
QString type = data.type;
QString cmd;
......
......@@ -124,57 +124,57 @@ void ScriptAgent::contextPush()
void ScriptAgent::exceptionCatch(qint64 scriptId, const QScriptValue & exception)
{
Q_UNUSED(scriptId);
Q_UNUSED(exception);
Q_UNUSED(scriptId)
Q_UNUSED(exception)
SDEBUG("ScriptAgent::exceptionCatch: " << scriptId << &exception);
}
void ScriptAgent::exceptionThrow(qint64 scriptId, const QScriptValue &exception,
bool hasHandler)
{
Q_UNUSED(scriptId);
Q_UNUSED(exception);
Q_UNUSED(hasHandler);
Q_UNUSED(scriptId)
Q_UNUSED(exception)
Q_UNUSED(hasHandler)
SDEBUG("ScriptAgent::exceptionThrow: " << scriptId << &exception
<< hasHandler);
}
void ScriptAgent::functionEntry(qint64 scriptId)
{
Q_UNUSED(scriptId);
Q_UNUSED(scriptId)
q->maybeBreakNow(true);
}
void ScriptAgent::functionExit(qint64 scriptId, const QScriptValue &returnValue)
{
Q_UNUSED(scriptId);
Q_UNUSED(returnValue);
Q_UNUSED(scriptId)
Q_UNUSED(returnValue)
SDEBUG("ScriptAgent::functionExit: " << scriptId << &returnValue);
}
void ScriptAgent::positionChange(qint64 scriptId, int lineNumber, int columnNumber)
{
SDEBUG("ScriptAgent::position: " << lineNumber);
Q_UNUSED(scriptId);
Q_UNUSED(lineNumber);
Q_UNUSED(columnNumber);
Q_UNUSED(scriptId)
Q_UNUSED(lineNumber)
Q_UNUSED(columnNumber)
q->maybeBreakNow(false);
}
void ScriptAgent::scriptLoad(qint64 scriptId, const QString &program,
const QString &fileName, int baseLineNumber)
{
Q_UNUSED(scriptId);
Q_UNUSED(program);
Q_UNUSED(fileName);
Q_UNUSED(baseLineNumber);
Q_UNUSED(scriptId)
Q_UNUSED(program)
Q_UNUSED(fileName)
Q_UNUSED(baseLineNumber)
SDEBUG("ScriptAgent::scriptLoad: " << program << fileName
<< baseLineNumber);
}
void ScriptAgent::scriptUnload(qint64 scriptId)
{
Q_UNUSED(scriptId);
Q_UNUSED(scriptId)
SDEBUG("ScriptAgent::scriptUnload: " << scriptId);
}
......@@ -201,7 +201,7 @@ ScriptEngine::~ScriptEngine()
void ScriptEngine::executeDebuggerCommand(const QString &command)
{
Q_UNUSED(command);
Q_UNUSED(command)
XSDEBUG("FIXME: ScriptEngine::executeDebuggerCommand()");
}
......@@ -344,32 +344,32 @@ void ScriptEngine::nextIExec()
void ScriptEngine::runToLineExec(const QString &fileName, int lineNumber)
{
Q_UNUSED(fileName);
Q_UNUSED(lineNumber);
Q_UNUSED(fileName)
Q_UNUSED(lineNumber)
SDEBUG("FIXME: ScriptEngine::runToLineExec()");
}
void ScriptEngine::runToFunctionExec(const QString &functionName)
{
Q_UNUSED(functionName);
Q_UNUSED(functionName)
XSDEBUG("FIXME: ScriptEngine::runToFunctionExec()");
}
void ScriptEngine::jumpToLineExec(const QString &fileName, int lineNumber)
{
Q_UNUSED(fileName);
Q_UNUSED(lineNumber);
Q_UNUSED(fileName)
Q_UNUSED(lineNumber)
XSDEBUG("FIXME: ScriptEngine::jumpToLineExec()");
}
void ScriptEngine::activateFrame(int index)
{
Q_UNUSED(index);
Q_UNUSED(index)
}
void ScriptEngine::selectThread(int index)
{
Q_UNUSED(index);
Q_UNUSED(index)
}
void ScriptEngine::attemptBreakpointSynchronization()
......@@ -402,7 +402,7 @@ void ScriptEngine::reloadDisassembler()
void ScriptEngine::loadSymbols(const QString &moduleName)
{
Q_UNUSED(moduleName);
Q_UNUSED(moduleName)
}
void ScriptEngine::loadAllSymbols()
......@@ -431,9 +431,9 @@ static QHash<QString, WatchData> m_toolTipCache;
void ScriptEngine::setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos)
{
Q_UNUSED(mousePos);
Q_UNUSED(editor);
Q_UNUSED(cursorPos);
Q_UNUSED(mousePos)
Q_UNUSED(editor)
Q_UNUSED(cursorPos)
if (q->status() != DebuggerInferiorStopped) {
//SDEBUG("SUPPRESSING DEBUGGER TOOLTIP, INFERIOR NOT STOPPED");
......
......@@ -273,32 +273,32 @@ void TcfEngine::nextIExec()
void TcfEngine::runToLineExec(const QString &fileName, int lineNumber)
{
Q_UNUSED(fileName);
Q_UNUSED(lineNumber);
Q_UNUSED(fileName)
Q_UNUSED(lineNumber)
SDEBUG("FIXME: TcfEngine::runToLineExec()");
}
void TcfEngine::runToFunctionExec(const QString &functionName)
{
Q_UNUSED(functionName);
Q_UNUSED(functionName)
XSDEBUG("FIXME: TcfEngine::runToFunctionExec()");
}
void TcfEngine::jumpToLineExec(const QString &fileName, int lineNumber)
{
Q_UNUSED(fileName);
Q_UNUSED(lineNumber);
Q_UNUSED(fileName)
Q_UNUSED(lineNumber)
XSDEBUG("FIXME: TcfEngine::jumpToLineExec()");
}
void TcfEngine::activateFrame(int index)
{
Q_UNUSED(index);
Q_UNUSED(index)
}
void TcfEngine::selectThread(int index)
{
Q_UNUSED(index);
Q_UNUSED(index)
}
void TcfEngine::attemptBreakpointSynchronization()
......@@ -311,7 +311,7 @@ void TcfEngine::reloadDisassembler()
void TcfEngine::loadSymbols(const QString &moduleName)
{
Q_UNUSED(moduleName);
Q_UNUSED(moduleName)
}
void TcfEngine::loadAllSymbols()
......@@ -498,7 +498,7 @@ void TcfEngine::sendCommandNow(const TcfCommand &cmd)
{
++m_inAir;
int result = m_socket->write(cmd.command);
Q_UNUSED(result);
Q_UNUSED(result)
m_socket->flush();
emit tcfInputAvailable(LogInput, QString::number(cmd.token) + " " + cmd.toString());
SDEBUG("SEND " << cmd.toString()); //<< " " << QString::number(result));
......@@ -572,7 +572,7 @@ void TcfEngine::updateWatchData(const WatchData &)
void TcfEngine::updateSubItem(const WatchData &data0)
{
Q_UNUSED(data0);
Q_UNUSED(data0)
QTC_ASSERT(false, return);
}
......
......@@ -572,7 +572,7 @@ int WatchModel::rowCount(const QModelIndex &idx) const
int WatchModel::columnCount(const QModelIndex &idx) const
{
Q_UNUSED(idx);
Q_UNUSED(idx)
return 3;
}
......@@ -997,8 +997,8 @@ void WatchHandler::watchExpression(const QString &exp)
void WatchHandler::setDisplayedIName(const QString &iname, bool on)
{
Q_UNUSED(iname);
Q_UNUSED(on);
Q_UNUSED(iname)
Q_UNUSED(on)
/*
WatchData *d = findData(iname);
if (!on || !d) {
......
......@@ -318,7 +318,7 @@ bool WatchWindow::event(QEvent *ev)