[Cmake-commits] CMake branch, next, updated. v3.6.1-1786-gcb33be0
Daniel Pfeifer
daniel at pfeifer-mail.de
Mon Sep 5 16:12:58 EDT 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via cb33be0a1655e5b9bd8abd609ac3c463182ac586 (commit)
via 00b16a866aa3994263d7536a862225150c8dce1e (commit)
from 83d0c9351f516f3793551e8b6ef8fcea054dc9f5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb33be0a1655e5b9bd8abd609ac3c463182ac586
commit cb33be0a1655e5b9bd8abd609ac3c463182ac586
Merge: 83d0c93 00b16a8
Author: Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Mon Sep 5 16:12:57 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 5 16:12:57 2016 -0400
Merge topic 'qtdialog-tidy' into next
00b16a86 QtDialog: fix clang-tidy warnings
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00b16a866aa3994263d7536a862225150c8dce1e
commit 00b16a866aa3994263d7536a862225150c8dce1e
Author: Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Mon Sep 5 22:12:36 2016 +0200
Commit: Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Mon Sep 5 22:12:36 2016 +0200
QtDialog: fix clang-tidy warnings
diff --git a/Source/QtDialog/AddCacheEntry.cxx b/Source/QtDialog/AddCacheEntry.cxx
index dc7a4b0..a94c54b 100644
--- a/Source/QtDialog/AddCacheEntry.cxx
+++ b/Source/QtDialog/AddCacheEntry.cxx
@@ -64,7 +64,8 @@ QVariant AddCacheEntry::value() const
QWidget* w = this->StackedWidget->currentWidget();
if (qobject_cast<QLineEdit*>(w)) {
return static_cast<QLineEdit*>(w)->text();
- } else if (qobject_cast<QCheckBox*>(w)) {
+ }
+ if (qobject_cast<QCheckBox*>(w)) {
return static_cast<QCheckBox*>(w)->isChecked();
}
return QVariant();
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index 5a8a5be..4de4bef 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -29,18 +29,19 @@
#include "cmSystemTools.h" // IWYU pragma: keep
-static const char* cmDocumentationName[][2] = { { 0,
+static const char* cmDocumentationName[][2] = { { CM_NULLPTR,
" cmake-gui - CMake GUI." },
- { 0, 0 } };
+ { CM_NULLPTR, CM_NULLPTR } };
static const char* cmDocumentationUsage[][2] = {
- { 0, " cmake-gui [options]\n"
- " cmake-gui [options] <path-to-source>\n"
- " cmake-gui [options] <path-to-existing-build>" },
- { 0, 0 }
+ { CM_NULLPTR, " cmake-gui [options]\n"
+ " cmake-gui [options] <path-to-source>\n"
+ " cmake-gui [options] <path-to-existing-build>" },
+ { CM_NULLPTR, CM_NULLPTR }
};
-static const char* cmDocumentationOptions[][2] = { { 0, 0 } };
+static const char* cmDocumentationOptions[]
+ [2] = { { CM_NULLPTR, CM_NULLPTR } };
#if defined(Q_OS_MAC)
static int cmOSXInstall(std::string dir);
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index fda3e58..5b84597 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -41,7 +41,7 @@
QCMakeThread::QCMakeThread(QObject* p)
: QThread(p)
- , CMakeInstance(NULL)
+ , CMakeInstance(CM_NULLPTR)
{
}
@@ -57,7 +57,7 @@ void QCMakeThread::run()
emit this->cmakeInitialized();
this->exec();
delete this->CMakeInstance;
- this->CMakeInstance = NULL;
+ this->CMakeInstance = CM_NULLPTR;
}
CMakeSetupDialog::CMakeSetupDialog()
diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx
index ca5e3b5..c34751a 100644
--- a/Source/QtDialog/FirstConfigure.cxx
+++ b/Source/QtDialog/FirstConfigure.cxx
@@ -129,8 +129,9 @@ bool StartCompilerSetup::crossCompilerSetup() const
void StartCompilerSetup::onSelectionChanged(bool on)
{
- if (on)
+ if (on) {
selectionChanged();
+ }
}
void StartCompilerSetup::onGeneratorChanged(QString const& name)
@@ -144,12 +145,15 @@ void StartCompilerSetup::onGeneratorChanged(QString const& name)
int StartCompilerSetup::nextId() const
{
- if (compilerSetup())
+ if (compilerSetup()) {
return NativeSetup;
- if (crossCompilerSetup())
+ }
+ if (crossCompilerSetup()) {
return CrossSetup;
- if (crossCompilerToolChainFile())
+ }
+ if (crossCompilerToolChainFile()) {
return ToolchainSetup;
+ }
return -1;
}
@@ -515,7 +519,8 @@ QString FirstConfigure::getCCompiler() const
{
if (this->compilerSetup()) {
return this->mNativeCompilerSetupPage->getCCompiler();
- } else if (this->crossCompilerSetup()) {
+ }
+ if (this->crossCompilerSetup()) {
return this->mCrossCompilerSetupPage->getCCompiler();
}
return QString();
@@ -525,7 +530,8 @@ QString FirstConfigure::getCXXCompiler() const
{
if (this->compilerSetup()) {
return this->mNativeCompilerSetupPage->getCXXCompiler();
- } else if (this->crossCompilerSetup()) {
+ }
+ if (this->crossCompilerSetup()) {
return this->mCrossCompilerSetupPage->getCXXCompiler();
}
return QString();
@@ -535,7 +541,8 @@ QString FirstConfigure::getFortranCompiler() const
{
if (this->compilerSetup()) {
return this->mNativeCompilerSetupPage->getFortranCompiler();
- } else if (this->crossCompilerSetup()) {
+ }
+ if (this->crossCompilerSetup()) {
return this->mCrossCompilerSetupPage->getFortranCompiler();
}
return QString();
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index cc1f4aa..88ea049 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -33,7 +33,7 @@ public:
}
protected:
- bool filterAcceptsRow(int row, const QModelIndex& p) const
+ bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE
{
QStringList strs;
const QAbstractItemModel* m = this->sourceModel();
@@ -87,7 +87,7 @@ public:
protected:
bool ShowAdvanced;
- bool filterAcceptsRow(int row, const QModelIndex& p) const
+ bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE
{
const QAbstractItemModel* m = this->sourceModel();
QModelIndex idx = m->index(row, 0, p);
@@ -160,7 +160,8 @@ QModelIndex QCMakeCacheView::moveCursor(CursorAction act,
// want home/end to go to begin/end of rows, not columns
if (act == MoveHome) {
return this->model()->index(0, 1);
- } else if (act == MoveEnd) {
+ }
+ if (act == MoveEnd) {
return this->model()->index(this->model()->rowCount() - 1, 1);
}
return QTreeView::moveCursor(act, mod);
@@ -538,15 +539,16 @@ void QCMakeCacheModelDelegate::setFileDialogFlag(bool f)
this->FileDialogFlag = f;
}
-QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p,
- const QStyleOptionViewItem&,
- const QModelIndex& idx) const
+QWidget* QCMakeCacheModelDelegate::createEditor(
+ QWidget* p, const QStyleOptionViewItem& /*option*/,
+ const QModelIndex& idx) const
{
QModelIndex var = idx.sibling(idx.row(), 0);
int type = var.data(QCMakeCacheModel::TypeRole).toInt();
if (type == QCMakeProperty::BOOL) {
- return NULL;
- } else if (type == QCMakeProperty::PATH) {
+ return CM_NULLPTR;
+ }
+ if (type == QCMakeProperty::PATH) {
QCMakePathEditor* editor =
new QCMakePathEditor(p, var.data(Qt::DisplayRole).toString());
QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this,
@@ -645,7 +647,7 @@ QSize QCMakeCacheModelDelegate::sizeHint(const QStyleOptionViewItem& option,
QStyleOptionButton opt;
opt.QStyleOption::operator=(option);
sz = sz.expandedTo(
- style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, NULL)
+ style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, CM_NULLPTR)
.size());
return sz;
diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx
index 4b3eb34..fc481b8 100644
--- a/Source/QtDialog/QCMakeWidgets.cxx
+++ b/Source/QtDialog/QCMakeWidgets.cxx
@@ -67,7 +67,7 @@ void QCMakeFilePathEditor::chooseFile()
this->fileDialogExists(true);
path =
QFileDialog::getOpenFileName(this, title, info.absolutePath(), QString(),
- NULL, QFileDialog::DontResolveSymlinks);
+ CM_NULLPTR, QFileDialog::DontResolveSymlinks);
this->fileDialogExists(false);
if (!path.isEmpty()) {
@@ -99,7 +99,7 @@ void QCMakePathEditor::chooseFile()
// use same QDirModel for all completers
static QDirModel* fileDirModel()
{
- static QDirModel* m = NULL;
+ static QDirModel* m = CM_NULLPTR;
if (!m) {
m = new QDirModel();
}
@@ -107,7 +107,7 @@ static QDirModel* fileDirModel()
}
static QDirModel* pathDirModel()
{
- static QDirModel* m = NULL;
+ static QDirModel* m = CM_NULLPTR;
if (!m) {
m = new QDirModel();
m->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot);
-----------------------------------------------------------------------
Summary of changes:
Source/QtDialog/AddCacheEntry.cxx | 3 ++-
Source/QtDialog/CMakeSetup.cxx | 15 ++++++++-------
Source/QtDialog/CMakeSetupDialog.cxx | 4 ++--
Source/QtDialog/FirstConfigure.cxx | 21 ++++++++++++++-------
Source/QtDialog/QCMakeCacheView.cxx | 20 +++++++++++---------
Source/QtDialog/QCMakeWidgets.cxx | 6 +++---
6 files changed, 40 insertions(+), 29 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list