summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/CMakeSetupDialog.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-02-20 22:23:11 (GMT)
committerBrad King <brad.king@kitware.com>2023-02-20 22:55:49 (GMT)
commit5cda8a399398020bba462bbf70609d3a37bb8c18 (patch)
tree88f28b0c01519394279300fbbed0bea298792058 /Source/QtDialog/CMakeSetupDialog.cxx
parentd18806e67336d96a9a22b860246de3f1c518ce40 (diff)
downloadCMake-5cda8a399398020bba462bbf70609d3a37bb8c18.zip
CMake-5cda8a399398020bba462bbf70609d3a37bb8c18.tar.gz
CMake-5cda8a399398020bba462bbf70609d3a37bb8c18.tar.bz2
cmake-gui: Fix conversion warnings about Qt indexing types
Qt 5 uses `int` for indexing, and Qt 6 uses `qsizetype`. Add helper types and casts to the appropriate type to avoid conversion warnings.
Diffstat (limited to 'Source/QtDialog/CMakeSetupDialog.cxx')
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 8641407..1effdd3 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -32,6 +32,7 @@
#include "QCMake.h"
#include "QCMakeCacheView.h"
+#include "QCMakeSizeType.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
@@ -1120,12 +1121,12 @@ void CMakeSetupDialog::saveBuildPaths(const QStringList& paths)
QSettings settings;
settings.beginGroup("Settings/StartPath");
- int num = paths.count();
+ cm_qsizetype num = paths.count();
if (num > 10) {
num = 10;
}
- for (int i = 0; i < num; i++) {
+ for (cm_qsizetype i = 0; i < num; i++) {
settings.setValue(QString("WhereBuild%1").arg(i), paths[i]);
}
}