aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/jsonwizard
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/projectexplorer/jsonwizard
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/projectexplorer/jsonwizard')
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp20
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonfieldpage.h6
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardfilegenerator.cpp2
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp38
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp18
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardscannergenerator.cpp2
6 files changed, 43 insertions, 43 deletions
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
index 835f3a0429..749c660e01 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
@@ -383,8 +383,8 @@ bool LabelField::parseData(const QVariant &data, QString *errorMessage)
QWidget *LabelField::createWidget(const QString &displayName, JsonFieldPage *page)
{
- Q_UNUSED(displayName);
- Q_UNUSED(page);
+ Q_UNUSED(displayName)
+ Q_UNUSED(page)
auto w = new QLabel;
w->setWordWrap(m_wordWrap);
w->setText(m_text);
@@ -426,8 +426,8 @@ bool SpacerField::parseData(const QVariant &data, QString *errorMessage)
QWidget *SpacerField::createWidget(const QString &displayName, JsonFieldPage *page)
{
- Q_UNUSED(displayName);
- Q_UNUSED(page);
+ Q_UNUSED(displayName)
+ Q_UNUSED(page)
int size = QApplication::style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing) * m_factor;
auto w = new QWidget();
@@ -481,7 +481,7 @@ bool LineEditField::parseData(const QVariant &data, QString *errorMessage)
QWidget *LineEditField::createWidget(const QString &displayName, JsonFieldPage *page)
{
- Q_UNUSED(displayName);
+ Q_UNUSED(displayName)
auto w = new FancyLineEdit;
if (m_validatorRegExp.isValid()) {
@@ -581,8 +581,8 @@ bool TextEditField::parseData(const QVariant &data, QString *errorMessage)
QWidget *TextEditField::createWidget(const QString &displayName, JsonFieldPage *page)
{
// TODO: Set up modification monitoring...
- Q_UNUSED(displayName);
- Q_UNUSED(page);
+ Q_UNUSED(displayName)
+ Q_UNUSED(page)
auto w = new QTextEdit;
w->setAcceptRichText(m_acceptRichText);
return w;
@@ -673,8 +673,8 @@ bool PathChooserField::parseData(const QVariant &data, QString *errorMessage)
QWidget *PathChooserField::createWidget(const QString &displayName, JsonFieldPage *page)
{
- Q_UNUSED(displayName);
- Q_UNUSED(page);
+ Q_UNUSED(displayName)
+ Q_UNUSED(page)
auto w = new PathChooser;
if (!m_historyId.isEmpty())
w->setHistoryCompleter(m_historyId);
@@ -754,7 +754,7 @@ bool CheckBoxField::parseData(const QVariant &data, QString *errorMessage)
QWidget *CheckBoxField::createWidget(const QString &displayName, JsonFieldPage *page)
{
- Q_UNUSED(page);
+ Q_UNUSED(page)
return new QCheckBox(displayName);
}
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.h b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.h
index 487dbd1a64..16da75c4ad 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.h
+++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.h
@@ -74,7 +74,7 @@ public:
virtual bool validate(Utils::MacroExpander *expander, QString *message);
void initialize(Utils::MacroExpander *expander);
- virtual void cleanup(Utils::MacroExpander *expander) { Q_UNUSED(expander); }
+ virtual void cleanup(Utils::MacroExpander *expander) { Q_UNUSED(expander) }
virtual bool suppressName() const { return false; }
@@ -89,10 +89,10 @@ public:
protected:
QWidget *widget() const;
virtual bool parseData(const QVariant &data, QString *errorMessage) = 0;
- virtual void initializeData(Utils::MacroExpander *expander) { Q_UNUSED(expander); }
+ virtual void initializeData(Utils::MacroExpander *expander) { Q_UNUSED(expander) }
virtual QWidget *createWidget(const QString &displayName, JsonFieldPage *page) = 0;
virtual void setup(JsonFieldPage *page, const QString &name)
- { Q_UNUSED(page); Q_UNUSED(name); }
+ { Q_UNUSED(page); Q_UNUSED(name) }
QString type();
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfilegenerator.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardfilegenerator.cpp
index c8ae9aa013..d510e187fa 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfilegenerator.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfilegenerator.cpp
@@ -227,7 +227,7 @@ Core::GeneratedFiles JsonWizardFileGenerator::fileList(Utils::MacroExpander *exp
bool JsonWizardFileGenerator::writeFile(const JsonWizard *wizard, Core::GeneratedFile *file, QString *errorMessage)
{
- Q_UNUSED(wizard);
+ Q_UNUSED(wizard)
if (!(file->attributes() & Core::GeneratedFile::KeepExistingFileAttribute)) {
if (!file->write(errorMessage))
return false;
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp
index ae3e6aaa52..4f4f8882f7 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp
@@ -80,7 +80,7 @@ static ICodeStylePreferences *codeStylePreferences(Project *project, Id language
bool JsonWizardGenerator::formatFile(const JsonWizard *wizard, GeneratedFile *file, QString *errorMessage)
{
- Q_UNUSED(errorMessage);
+ Q_UNUSED(errorMessage)
if (file->isBinary() || file->contents().isEmpty())
return true; // nothing to do
@@ -124,33 +124,33 @@ bool JsonWizardGenerator::formatFile(const JsonWizard *wizard, GeneratedFile *fi
bool JsonWizardGenerator::writeFile(const JsonWizard *wizard, GeneratedFile *file, QString *errorMessage)
{
- Q_UNUSED(wizard);
- Q_UNUSED(file);
- Q_UNUSED(errorMessage);
+ Q_UNUSED(wizard)
+ Q_UNUSED(file)
+ Q_UNUSED(errorMessage)
return true;
}
bool JsonWizardGenerator::postWrite(const JsonWizard *wizard, GeneratedFile *file, QString *errorMessage)
{
- Q_UNUSED(wizard);
- Q_UNUSED(file);
- Q_UNUSED(errorMessage);
+ Q_UNUSED(wizard)
+ Q_UNUSED(file)
+ Q_UNUSED(errorMessage)
return true;
}
bool JsonWizardGenerator::polish(const JsonWizard *wizard, GeneratedFile *file, QString *errorMessage)
{
- Q_UNUSED(wizard);
- Q_UNUSED(file);
- Q_UNUSED(errorMessage);
+ Q_UNUSED(wizard)
+ Q_UNUSED(file)
+ Q_UNUSED(errorMessage)
return true;
}
bool JsonWizardGenerator::allDone(const JsonWizard *wizard, GeneratedFile *file, QString *errorMessage)
{
- Q_UNUSED(wizard);
- Q_UNUSED(file);
- Q_UNUSED(errorMessage);
+ Q_UNUSED(wizard)
+ Q_UNUSED(file)
+ Q_UNUSED(errorMessage)
return true;
}
@@ -309,9 +309,9 @@ JsonWizardGenerator *FileGeneratorFactory::create(Id typeId, const QVariant &dat
const QString &path, Id platform,
const QVariantMap &variables)
{
- Q_UNUSED(path);
- Q_UNUSED(platform);
- Q_UNUSED(variables);
+ Q_UNUSED(path)
+ Q_UNUSED(platform)
+ Q_UNUSED(variables)
QTC_ASSERT(canCreate(typeId), return nullptr);
@@ -349,9 +349,9 @@ JsonWizardGenerator *ScannerGeneratorFactory::create(Id typeId, const QVariant &
const QString &path, Id platform,
const QVariantMap &variables)
{
- Q_UNUSED(path);
- Q_UNUSED(platform);
- Q_UNUSED(variables);
+ Q_UNUSED(path)
+ Q_UNUSED(platform)
+ Q_UNUSED(variables)
QTC_ASSERT(canCreate(typeId), return nullptr);
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp
index 2e7c93b514..774b63376e 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp
@@ -62,7 +62,7 @@ FieldPageFactory::FieldPageFactory()
Utils::WizardPage *FieldPageFactory::create(JsonWizard *wizard, Core::Id typeId, const QVariant &data)
{
- Q_UNUSED(wizard);
+ Q_UNUSED(wizard)
QTC_ASSERT(canCreate(typeId), return nullptr);
@@ -109,8 +109,8 @@ FilePageFactory::FilePageFactory()
Utils::WizardPage *FilePageFactory::create(JsonWizard *wizard, Core::Id typeId, const QVariant &data)
{
- Q_UNUSED(wizard);
- Q_UNUSED(data);
+ Q_UNUSED(wizard)
+ Q_UNUSED(data)
QTC_ASSERT(canCreate(typeId), return nullptr);
return new JsonFilePage;
@@ -143,7 +143,7 @@ KitsPageFactory::KitsPageFactory()
Utils::WizardPage *KitsPageFactory::create(JsonWizard *wizard, Core::Id typeId, const QVariant &data)
{
- Q_UNUSED(wizard);
+ Q_UNUSED(wizard)
QTC_ASSERT(canCreate(typeId), return nullptr);
auto page = new JsonKitsPage;
@@ -203,8 +203,8 @@ ProjectPageFactory::ProjectPageFactory()
Utils::WizardPage *ProjectPageFactory::create(JsonWizard *wizard, Core::Id typeId, const QVariant &data)
{
- Q_UNUSED(wizard);
- Q_UNUSED(data);
+ Q_UNUSED(wizard)
+ Q_UNUSED(data)
QTC_ASSERT(canCreate(typeId), return nullptr);
auto page = new JsonProjectPage;
@@ -226,7 +226,7 @@ Utils::WizardPage *ProjectPageFactory::create(JsonWizard *wizard, Core::Id typeI
bool ProjectPageFactory::validateData(Core::Id typeId, const QVariant &data, QString *errorMessage)
{
- Q_UNUSED(errorMessage);
+ Q_UNUSED(errorMessage)
QTC_ASSERT(canCreate(typeId), return false);
if (!data.isNull() && data.type() != QVariant::Map) {
@@ -263,8 +263,8 @@ SummaryPageFactory::SummaryPageFactory()
Utils::WizardPage *SummaryPageFactory::create(JsonWizard *wizard, Core::Id typeId, const QVariant &data)
{
- Q_UNUSED(wizard);
- Q_UNUSED(data);
+ Q_UNUSED(wizard)
+ Q_UNUSED(data)
QTC_ASSERT(canCreate(typeId), return nullptr);
auto page = new JsonSummaryPage;
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardscannergenerator.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardscannergenerator.cpp
index 9f24f00718..ff0fcde7d4 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardscannergenerator.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardscannergenerator.cpp
@@ -80,7 +80,7 @@ Core::GeneratedFiles JsonWizardScannerGenerator::fileList(Utils::MacroExpander *
const QString &projectDir,
QString *errorMessage)
{
- Q_UNUSED(wizardDir);
+ Q_UNUSED(wizardDir)
errorMessage->clear();
QDir project(projectDir);