aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-07-23 10:58:00 +0200
committerhjk <hjk@qt.io>2019-07-23 11:55:59 +0000
commit251287f0d35dd82e68dabed8214ef8af893aff91 (patch)
treea3ba843c1c23f4aea06bc01bf7ab0dd69d6fc741 /src/plugins/texteditor
parent2b26eca80f9ebcdc2f1dc0d890a39a4fbc2d129c (diff)
Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/texteditor')
-rw-r--r--src/plugins/texteditor/autocompleter.cpp34
-rw-r--r--src/plugins/texteditor/codeassist/assistproposalitem.cpp2
-rw-r--r--src/plugins/texteditor/codeassist/codeassistant.cpp2
-rw-r--r--src/plugins/texteditor/codeassist/genericproposalmodel.cpp2
-rw-r--r--src/plugins/texteditor/codeassist/iassistproposal.cpp4
-rw-r--r--src/plugins/texteditor/codeassist/keywordscompletionassist.cpp2
-rw-r--r--src/plugins/texteditor/normalindenter.cpp4
-rw-r--r--src/plugins/texteditor/texteditor.cpp4
-rw-r--r--src/plugins/texteditor/texteditoroverlay.cpp4
-rw-r--r--src/plugins/texteditor/textindenter.cpp2
-rw-r--r--src/plugins/texteditor/textmark.cpp2
11 files changed, 31 insertions, 31 deletions
diff --git a/src/plugins/texteditor/autocompleter.cpp b/src/plugins/texteditor/autocompleter.cpp
index ea50725639..799efdef67 100644
--- a/src/plugins/texteditor/autocompleter.cpp
+++ b/src/plugins/texteditor/autocompleter.cpp
@@ -342,15 +342,15 @@ int AutoCompleter::paragraphSeparatorAboutToBeInserted(QTextCursor &cursor)
bool AutoCompleter::contextAllowsAutoBrackets(const QTextCursor &cursor,
const QString &textToInsert) const
{
- Q_UNUSED(cursor);
- Q_UNUSED(textToInsert);
+ Q_UNUSED(cursor)
+ Q_UNUSED(textToInsert)
return false;
}
bool AutoCompleter::contextAllowsAutoQuotes(const QTextCursor &cursor, const QString &textToInsert) const
{
- Q_UNUSED(cursor);
- Q_UNUSED(textToInsert);
+ Q_UNUSED(cursor)
+ Q_UNUSED(textToInsert)
return false;
}
@@ -361,13 +361,13 @@ bool AutoCompleter::contextAllowsElectricCharacters(const QTextCursor &cursor) c
bool AutoCompleter::isInComment(const QTextCursor &cursor) const
{
- Q_UNUSED(cursor);
+ Q_UNUSED(cursor)
return false;
}
bool AutoCompleter::isInString(const QTextCursor &cursor) const
{
- Q_UNUSED(cursor);
+ Q_UNUSED(cursor)
return false;
}
@@ -377,11 +377,11 @@ QString AutoCompleter::insertMatchingBrace(const QTextCursor &cursor,
bool skipChars,
int *skippedChars) const
{
- Q_UNUSED(cursor);
- Q_UNUSED(text);
- Q_UNUSED(lookAhead);
- Q_UNUSED(skipChars);
- Q_UNUSED(skippedChars);
+ Q_UNUSED(cursor)
+ Q_UNUSED(text)
+ Q_UNUSED(lookAhead)
+ Q_UNUSED(skipChars)
+ Q_UNUSED(skippedChars)
return QString();
}
@@ -391,16 +391,16 @@ QString AutoCompleter::insertMatchingQuote(const QTextCursor &cursor,
bool skipChars,
int *skippedChars) const
{
- Q_UNUSED(cursor);
- Q_UNUSED(text);
- Q_UNUSED(lookAhead);
- Q_UNUSED(skipChars);
- Q_UNUSED(skippedChars);
+ Q_UNUSED(cursor)
+ Q_UNUSED(text)
+ Q_UNUSED(lookAhead)
+ Q_UNUSED(skipChars)
+ Q_UNUSED(skippedChars)
return QString();
}
QString AutoCompleter::insertParagraphSeparator(const QTextCursor &cursor) const
{
- Q_UNUSED(cursor);
+ Q_UNUSED(cursor)
return QString();
}
diff --git a/src/plugins/texteditor/codeassist/assistproposalitem.cpp b/src/plugins/texteditor/codeassist/assistproposalitem.cpp
index 05222ed107..cf9cbe6e38 100644
--- a/src/plugins/texteditor/codeassist/assistproposalitem.cpp
+++ b/src/plugins/texteditor/codeassist/assistproposalitem.cpp
@@ -122,7 +122,7 @@ bool AssistProposalItem::implicitlyApplies() const
bool AssistProposalItem::prematurelyApplies(const QChar &c) const
{
- Q_UNUSED(c);
+ Q_UNUSED(c)
return false;
}
diff --git a/src/plugins/texteditor/codeassist/codeassistant.cpp b/src/plugins/texteditor/codeassist/codeassistant.cpp
index 4f9605d1e3..a29019a245 100644
--- a/src/plugins/texteditor/codeassist/codeassistant.cpp
+++ b/src/plugins/texteditor/codeassist/codeassistant.cpp
@@ -554,7 +554,7 @@ bool CodeAssistantPrivate::isDestroyEvent(int key, const QString &keyText)
bool CodeAssistantPrivate::eventFilter(QObject *o, QEvent *e)
{
- Q_UNUSED(o);
+ Q_UNUSED(o)
if (isWaitingForProposal()) {
QEvent::Type type = e->type();
diff --git a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp
index 19e1a0962b..30d5a43201 100644
--- a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp
+++ b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp
@@ -337,7 +337,7 @@ FuzzyMatcher::CaseSensitivity
bool GenericProposalModel::isSortable(const QString &prefix) const
{
- Q_UNUSED(prefix);
+ Q_UNUSED(prefix)
if (m_currentItems.size() < kMaxSort)
return true;
diff --git a/src/plugins/texteditor/codeassist/iassistproposal.cpp b/src/plugins/texteditor/codeassist/iassistproposal.cpp
index 84beac910f..a5576ae620 100644
--- a/src/plugins/texteditor/codeassist/iassistproposal.cpp
+++ b/src/plugins/texteditor/codeassist/iassistproposal.cpp
@@ -104,7 +104,7 @@ bool IAssistProposal::supportsPrefix() const
bool IAssistProposal::isCorrective(TextEditorWidget *editorWidget) const
{
- Q_UNUSED(editorWidget);
+ Q_UNUSED(editorWidget)
return false;
}
@@ -116,7 +116,7 @@ bool IAssistProposal::isCorrective(TextEditorWidget *editorWidget) const
void IAssistProposal::makeCorrection(TextEditorWidget *editorWidget)
{
- Q_UNUSED(editorWidget);
+ Q_UNUSED(editorWidget)
}
void IAssistProposal::setFragile(bool fragile)
diff --git a/src/plugins/texteditor/codeassist/keywordscompletionassist.cpp b/src/plugins/texteditor/codeassist/keywordscompletionassist.cpp
index b5458e0aa3..b08fdc558f 100644
--- a/src/plugins/texteditor/codeassist/keywordscompletionassist.cpp
+++ b/src/plugins/texteditor/codeassist/keywordscompletionassist.cpp
@@ -158,7 +158,7 @@ QString KeywordsFunctionHintModel::text(int index) const
int KeywordsFunctionHintModel::activeArgument(const QString &prefix) const
{
- Q_UNUSED(prefix);
+ Q_UNUSED(prefix)
return 1;
}
diff --git a/src/plugins/texteditor/normalindenter.cpp b/src/plugins/texteditor/normalindenter.cpp
index c6cb0febd1..e4a8ef4d10 100644
--- a/src/plugins/texteditor/normalindenter.cpp
+++ b/src/plugins/texteditor/normalindenter.cpp
@@ -58,8 +58,8 @@ int NormalIndenter::indentFor(const QTextBlock &block,
const TabSettings &tabSettings,
int cursorPositionInEditor)
{
- Q_UNUSED(tabSettings);
- Q_UNUSED(cursorPositionInEditor);
+ Q_UNUSED(tabSettings)
+ Q_UNUSED(cursorPositionInEditor)
QTextBlock previous = block.previous();
if (!previous.isValid())
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index 2250b6fb5b..98ff2359e1 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -7900,7 +7900,7 @@ int TextEditorWidget::lineNumberDigits() const
bool TextEditorWidget::selectionVisible(int blockNumber) const
{
- Q_UNUSED(blockNumber);
+ Q_UNUSED(blockNumber)
return true;
}
@@ -8506,7 +8506,7 @@ void TextEditorWidget::invokeAssist(AssistKind kind, IAssistProvider *provider)
AssistInterface *TextEditorWidget::createAssistInterface(AssistKind kind,
AssistReason reason) const
{
- Q_UNUSED(kind);
+ Q_UNUSED(kind)
return new AssistInterface(document(), position(), d->m_document->filePath().toString(), reason);
}
diff --git a/src/plugins/texteditor/texteditoroverlay.cpp b/src/plugins/texteditor/texteditoroverlay.cpp
index a33ca13810..735869082f 100644
--- a/src/plugins/texteditor/texteditoroverlay.cpp
+++ b/src/plugins/texteditor/texteditoroverlay.cpp
@@ -393,7 +393,7 @@ void TextEditorOverlay::fillSelection(QPainter *painter,
void TextEditorOverlay::paint(QPainter *painter, const QRect &clip)
{
- Q_UNUSED(clip);
+ Q_UNUSED(clip)
for (int i = m_selections.size()-1; i >= 0; --i) {
const OverlaySelection &selection = m_selections.at(i);
if (selection.m_dropShadow)
@@ -420,7 +420,7 @@ void TextEditorOverlay::paint(QPainter *painter, const QRect &clip)
void TextEditorOverlay::fill(QPainter *painter, const QColor &color, const QRect &clip)
{
- Q_UNUSED(clip);
+ Q_UNUSED(clip)
for (int i = m_selections.size()-1; i >= 0; --i) {
const OverlaySelection &selection = m_selections.at(i);
if (selection.m_dropShadow)
diff --git a/src/plugins/texteditor/textindenter.cpp b/src/plugins/texteditor/textindenter.cpp
index 3dab3e2c48..c2d328d3fe 100644
--- a/src/plugins/texteditor/textindenter.cpp
+++ b/src/plugins/texteditor/textindenter.cpp
@@ -51,7 +51,7 @@ void TextIndenter::indentBlock(const QTextBlock &block,
const TabSettings &tabSettings,
int /*cursorPositionInEditor*/)
{
- Q_UNUSED(typedChar);
+ Q_UNUSED(typedChar)
const int indent = indentFor(block, tabSettings);
if (indent < 0)
return;
diff --git a/src/plugins/texteditor/textmark.cpp b/src/plugins/texteditor/textmark.cpp
index 3493570487..63d6c17844 100644
--- a/src/plugins/texteditor/textmark.cpp
+++ b/src/plugins/texteditor/textmark.cpp
@@ -267,7 +267,7 @@ bool TextMark::isDraggable() const
void TextMark::dragToLine(int lineNumber)
{
- Q_UNUSED(lineNumber);
+ Q_UNUSED(lineNumber)
}
void TextMark::addToToolTipLayout(QGridLayout *target) const