diff options
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/CMakeSetup.cxx | 19 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 6 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.h | 2 | ||||
-rw-r--r-- | Source/QtDialog/Compilers.h | 4 | ||||
-rw-r--r-- | Source/QtDialog/FirstConfigure.cxx | 2 | ||||
-rw-r--r-- | Source/QtDialog/QCMake.h | 4 | ||||
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.cxx | 8 | ||||
-rw-r--r-- | Source/QtDialog/QCMakeWidgets.cxx | 6 | ||||
-rw-r--r-- | Source/QtDialog/QCMakeWidgets.h | 7 |
9 files changed, 30 insertions, 28 deletions
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 7fa2ac6..ca0b015 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -22,19 +22,18 @@ #include "cmSystemTools.h" // IWYU pragma: keep -static const char* cmDocumentationName[][2] = { { CM_NULLPTR, +static const char* cmDocumentationName[][2] = { { nullptr, " cmake-gui - CMake GUI." }, - { CM_NULLPTR, CM_NULLPTR } }; + { nullptr, nullptr } }; static const char* cmDocumentationUsage[][2] = { - { CM_NULLPTR, " cmake-gui [options]\n" - " cmake-gui [options] <path-to-source>\n" - " cmake-gui [options] <path-to-existing-build>" }, - { CM_NULLPTR, CM_NULLPTR } + { nullptr, " cmake-gui [options]\n" + " cmake-gui [options] <path-to-source>\n" + " cmake-gui [options] <path-to-existing-build>" }, + { nullptr, nullptr } }; -static const char* cmDocumentationOptions[] - [2] = { { CM_NULLPTR, CM_NULLPTR } }; +static const char* cmDocumentationOptions[][2] = { { nullptr, nullptr } }; #if defined(Q_OS_MAC) static int cmOSXInstall(std::string dir); @@ -93,6 +92,10 @@ int main(int argc, char** argv) cmAddPluginPath(); #endif +#if QT_VERSION >= 0x050600 + QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif + QApplication app(argc, argv); setlocale(LC_NUMERIC, "C"); diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 57f8e10..bbb2395 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -32,7 +32,7 @@ QCMakeThread::QCMakeThread(QObject* p) : QThread(p) - , CMakeInstance(CM_NULLPTR) + , CMakeInstance(nullptr) { } @@ -48,7 +48,7 @@ void QCMakeThread::run() emit this->cmakeInitialized(); this->exec(); delete this->CMakeInstance; - this->CMakeInstance = CM_NULLPTR; + this->CMakeInstance = nullptr; } CMakeSetupDialog::CMakeSetupDialog() @@ -1195,7 +1195,7 @@ void CMakeSetupDialog::setSearchFilter(const QString& str) this->CacheValues->setSearchFilter(str); } -void CMakeSetupDialog::doOutputContextMenu(const QPoint& pt) +void CMakeSetupDialog::doOutputContextMenu(QPoint pt) { QMenu* menu = this->Output->createStandardContextMenu(); diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index 1abdb46..0da28d8 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -70,7 +70,7 @@ protected slots: bool doConfigureInternal(); bool doGenerateInternal(); void exitLoop(int); - void doOutputContextMenu(const QPoint&); + void doOutputContextMenu(QPoint pt); void doOutputFindDialog(); void doOutputFindNext(bool directionForward = true); void doOutputFindPrev(); diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h index 6c8c8f5..746266c 100644 --- a/Source/QtDialog/Compilers.h +++ b/Source/QtDialog/Compilers.h @@ -3,7 +3,7 @@ #ifndef COMPILERS_HPP #define COMPILERS_HPP -#include "cmConfigure.h" +#include "cmConfigure.h" // IWYU pragma: keep #include <QWidget> @@ -13,7 +13,7 @@ class Compilers : public QWidget, public Ui::Compilers { Q_OBJECT public: - Compilers(QWidget* p = CM_NULLPTR) + Compilers(QWidget* p = nullptr) : QWidget(p) { this->setupUi(this); diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx index b193a27..88ce7cb 100644 --- a/Source/QtDialog/FirstConfigure.cxx +++ b/Source/QtDialog/FirstConfigure.cxx @@ -301,7 +301,7 @@ QString CrossCompilerSetup::getFindRoot() const void CrossCompilerSetup::setFindRoot(const QString& t) { - return this->crossFindRoot->setText(t); + this->crossFindRoot->setText(t); } int CrossCompilerSetup::getProgramMode() const diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index e14cdf2..3b8cea7 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -3,7 +3,7 @@ #ifndef QCMake_h #define QCMake_h -#include "cmConfigure.h" +#include "cmConfigure.h" // IWYU pragma: keep #include "cmake.h" @@ -63,7 +63,7 @@ class QCMake : public QObject { Q_OBJECT public: - QCMake(QObject* p = CM_NULLPTR); + QCMake(QObject* p = nullptr); ~QCMake(); public slots: /// load the cache file in a directory diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 08c2d58..1b3fb15 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -23,7 +23,7 @@ public: } protected: - bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE + bool filterAcceptsRow(int row, const QModelIndex& p) const override { QStringList strs; const QAbstractItemModel* m = this->sourceModel(); @@ -77,7 +77,7 @@ public: protected: bool ShowAdvanced; - bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE + bool filterAcceptsRow(int row, const QModelIndex& p) const override { const QAbstractItemModel* m = this->sourceModel(); QModelIndex idx = m->index(row, 0, p); @@ -539,7 +539,7 @@ QWidget* QCMakeCacheModelDelegate::createEditor( QModelIndex var = idx.sibling(idx.row(), 0); int type = var.data(QCMakeCacheModel::TypeRole).toInt(); if (type == QCMakeProperty::BOOL) { - return CM_NULLPTR; + return nullptr; } if (type == QCMakeProperty::PATH) { QCMakePathEditor* editor = @@ -642,7 +642,7 @@ QSize QCMakeCacheModelDelegate::sizeHint(const QStyleOptionViewItem& option, QStyleOptionButton opt; opt.QStyleOption::operator=(option); sz = sz.expandedTo( - style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, CM_NULLPTR) + style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, nullptr) .size()); return sz; diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx index 7f0cafa..b544b86 100644 --- a/Source/QtDialog/QCMakeWidgets.cxx +++ b/Source/QtDialog/QCMakeWidgets.cxx @@ -57,7 +57,7 @@ void QCMakeFilePathEditor::chooseFile() emit this->fileDialogExists(true); path = QFileDialog::getOpenFileName(this, title, info.absolutePath(), QString(), - CM_NULLPTR, QFileDialog::DontResolveSymlinks); + nullptr, QFileDialog::DontResolveSymlinks); emit this->fileDialogExists(false); if (!path.isEmpty()) { @@ -89,7 +89,7 @@ void QCMakePathEditor::chooseFile() // use same QDirModel for all completers static QDirModel* fileDirModel() { - static QDirModel* m = CM_NULLPTR; + static QDirModel* m = nullptr; if (!m) { m = new QDirModel(); } @@ -97,7 +97,7 @@ static QDirModel* fileDirModel() } static QDirModel* pathDirModel() { - static QDirModel* m = CM_NULLPTR; + static QDirModel* m = nullptr; if (!m) { m = new QDirModel(); m->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot); diff --git a/Source/QtDialog/QCMakeWidgets.h b/Source/QtDialog/QCMakeWidgets.h index 1ec666f..e63c197 100644 --- a/Source/QtDialog/QCMakeWidgets.h +++ b/Source/QtDialog/QCMakeWidgets.h @@ -3,7 +3,7 @@ #ifndef QCMakeWidgets_h #define QCMakeWidgets_h -#include "cmConfigure.h" +#include "cmConfigure.h" // IWYU pragma: keep #include <QComboBox> #include <QCompleter> @@ -35,7 +35,7 @@ class QCMakePathEditor : public QCMakeFileEditor { Q_OBJECT public: - QCMakePathEditor(QWidget* p = CM_NULLPTR, const QString& var = QString()); + QCMakePathEditor(QWidget* p = nullptr, const QString& var = QString()); void chooseFile(); }; @@ -44,8 +44,7 @@ class QCMakeFilePathEditor : public QCMakeFileEditor { Q_OBJECT public: - QCMakeFilePathEditor(QWidget* p = CM_NULLPTR, - const QString& var = QString()); + QCMakeFilePathEditor(QWidget* p = nullptr, const QString& var = QString()); void chooseFile(); }; |