diff options
author | Brad King <brad.king@kitware.com> | 2016-09-12 13:31:45 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-09-12 13:31:45 (GMT) |
commit | 03bae46865f2abb3a74728986f523a30d79eb095 (patch) | |
tree | 7c588020ffe993fd9e64104db15746a0a01bbadc /Source/QtDialog/QCMakeCacheView.cxx | |
parent | b3b238c3cc8cfd1f320faf0233ae860dcfcbfda0 (diff) | |
parent | 73128b823c2fe8f63fcdc4c8c92c3672b6f05f3c (diff) | |
download | CMake-03bae46865f2abb3a74728986f523a30d79eb095.zip CMake-03bae46865f2abb3a74728986f523a30d79eb095.tar.gz CMake-03bae46865f2abb3a74728986f523a30d79eb095.tar.bz2 |
Merge topic 'clang-tidy'
73128b82 cmDependsFortran: simplify boolean expression
8f324c7c cmSystemTools: simplify boolean expressions
5d3b5bef QCMakeCacheView: simplify boolean expression
ad42eb33 QCMakeCacheView: no else after return
Diffstat (limited to 'Source/QtDialog/QCMakeCacheView.cxx')
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 88ea049..ed11f7b 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -95,10 +95,7 @@ protected: // if there are no children if (!m->hasChildren(idx)) { bool adv = m->data(idx, QCMakeCacheModel::AdvancedRole).toBool(); - if (!adv || (adv && this->ShowAdvanced)) { - return true; - } - return false; + return !adv || this->ShowAdvanced; } // check children @@ -554,14 +551,16 @@ QWidget* QCMakeCacheModelDelegate::createEditor( QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, SLOT(setFileDialogFlag(bool))); return editor; - } else if (type == QCMakeProperty::FILEPATH) { + } + if (type == QCMakeProperty::FILEPATH) { QCMakeFilePathEditor* editor = new QCMakeFilePathEditor(p, var.data(Qt::DisplayRole).toString()); QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, SLOT(setFileDialogFlag(bool))); return editor; - } else if (type == QCMakeProperty::STRING && - var.data(QCMakeCacheModel::StringsRole).isValid()) { + } + if (type == QCMakeProperty::STRING && + var.data(QCMakeCacheModel::StringsRole).isValid()) { QCMakeComboBox* editor = new QCMakeComboBox( p, var.data(QCMakeCacheModel::StringsRole).toStringList()); editor->setFrame(false); |