summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-29 20:45:43 (GMT)
committerBrad King <brad.king@kitware.com>2020-06-29 21:23:27 (GMT)
commitdf6b077625f86e4ec0d534f6cd88f8610c5b8f8a (patch)
treec2aa4271583dcad49c08570f90f8caf2b97c8451 /Source/QtDialog
parentf2b84d24cfccf49b6332cf3f2ca164fd71ae023e (diff)
downloadCMake-df6b077625f86e4ec0d534f6cd88f8610c5b8f8a.zip
CMake-df6b077625f86e4ec0d534f6cd88f8610c5b8f8a.tar.gz
CMake-df6b077625f86e4ec0d534f6cd88f8610c5b8f8a.tar.bz2
cmake: Remove broken '--warn-unused-vars' option
This option has been broken since commit b9f9915516 (cmMakefile: Remove VarUsageStack., 2015-05-17, v3.3.0-rc1~52^2). That commit removed the check that an initialized variable has actually been used and caused the option to warn on every variable ever set. This was not caught by the test suite because the test for the feature only checked that warnings appear when needed and not that they do not appear when not needed. The option was never very practical to use. Remove it to avoid the runtime cost of usage tracking and checks for every variable (which we were doing even when the option was not used).
Diffstat (limited to 'Source/QtDialog')
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx6
-rw-r--r--Source/QtDialog/CMakeSetupDialog.h1
-rw-r--r--Source/QtDialog/QCMake.cxx7
-rw-r--r--Source/QtDialog/QCMake.h4
4 files changed, 0 insertions, 18 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 6dbfe11..fcc8408 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -152,9 +152,6 @@ CMakeSetupDialog::CMakeSetupDialog()
this->WarnUninitializedAction =
OptionsMenu->addAction(tr("&Warn Uninitialized (--warn-uninitialized)"));
this->WarnUninitializedAction->setCheckable(true);
- this->WarnUnusedAction =
- OptionsMenu->addAction(tr("&Warn Unused (--warn-unused-vars)"));
- this->WarnUnusedAction->setCheckable(true);
QAction* debugAction = OptionsMenu->addAction(tr("&Debug Output"));
debugAction->setCheckable(true);
@@ -290,9 +287,6 @@ void CMakeSetupDialog::initialize()
QObject::connect(this->WarnUninitializedAction, SIGNAL(triggered(bool)),
this->CMakeThread->cmakeInstance(),
SLOT(setWarnUninitializedMode(bool)));
- QObject::connect(this->WarnUnusedAction, SIGNAL(triggered(bool)),
- this->CMakeThread->cmakeInstance(),
- SLOT(setWarnUnusedMode(bool)));
if (!this->SourceDirectory->text().isEmpty() ||
!this->BinaryDirectory->lineEdit()->text().isEmpty()) {
diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h
index d1e2035..914be12 100644
--- a/Source/QtDialog/CMakeSetupDialog.h
+++ b/Source/QtDialog/CMakeSetupDialog.h
@@ -111,7 +111,6 @@ protected:
QAction* ConfigureAction;
QAction* GenerateAction;
QAction* WarnUninitializedAction;
- QAction* WarnUnusedAction;
QAction* InstallForCommandLineAction;
State CurrentState;
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index f0b967b..6090256 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -21,7 +21,6 @@ QCMake::QCMake(QObject* p)
: QObject(p)
{
this->WarnUninitializedMode = false;
- this->WarnUnusedMode = false;
qRegisterMetaType<QCMakeProperty>();
qRegisterMetaType<QCMakePropertyList>();
@@ -170,7 +169,6 @@ void QCMake::configure()
this->CMakeInstance->SetGeneratorToolset(this->Toolset.toLocal8Bit().data());
this->CMakeInstance->LoadCache();
this->CMakeInstance->SetWarnUninitialized(this->WarnUninitializedMode);
- this->CMakeInstance->SetWarnUnused(this->WarnUnusedMode);
this->CMakeInstance->PreLoadCMakeFiles();
InterruptFlag = 0;
@@ -478,11 +476,6 @@ void QCMake::setWarnUninitializedMode(bool value)
this->WarnUninitializedMode = value;
}
-void QCMake::setWarnUnusedMode(bool value)
-{
- this->WarnUnusedMode = value;
-}
-
void QCMake::checkOpenPossible()
{
std::string data = this->BinaryDirectory.toLocal8Bit().data();
diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h
index 110a971..39555d6 100644
--- a/Source/QtDialog/QCMake.h
+++ b/Source/QtDialog/QCMake.h
@@ -114,8 +114,6 @@ public slots:
void setDeprecatedWarningsAsErrors(bool value);
/// set whether to run cmake with warnings about uninitialized variables
void setWarnUninitializedMode(bool value);
- /// set whether to run cmake with warnings about unused variables
- void setWarnUnusedMode(bool value);
/// check if project IDE open is possible and emit openPossible signal
void checkOpenPossible();
@@ -175,8 +173,6 @@ protected:
void stderrCallback(std::string const& msg);
bool WarnUninitializedMode;
- bool WarnUnusedMode;
- bool WarnUnusedAllMode;
QString SourceDirectory;
QString BinaryDirectory;
QString Generator;