diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-06-15 11:13:23 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-06-15 11:13:23 (GMT) |
commit | 0fc181883127f77401ac4b6686c7016ee7752876 (patch) | |
tree | edba791d9c88c0a3a5dd5495b702b7e6c49c077e /Source | |
parent | 736fb342945051fb7459b5a28d37f4085b8ba876 (diff) | |
download | CMake-0fc181883127f77401ac4b6686c7016ee7752876.zip CMake-0fc181883127f77401ac4b6686c7016ee7752876.tar.gz CMake-0fc181883127f77401ac4b6686c7016ee7752876.tar.bz2 |
QCMakeWidgets: replace QDirModel
Diffstat (limited to 'Source')
-rw-r--r-- | Source/QtDialog/QCMakeWidgets.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx index 332a770..d16ea58 100644 --- a/Source/QtDialog/QCMakeWidgets.cxx +++ b/Source/QtDialog/QCMakeWidgets.cxx @@ -4,9 +4,9 @@ #include <utility> -#include <QDirModel> #include <QFileDialog> #include <QFileInfo> +#include <QFileSystemModel> #include <QResizeEvent> #include <QToolButton> @@ -88,20 +88,20 @@ void QCMakePathEditor::chooseFile() } } -// use same QDirModel for all completers -static QDirModel* fileDirModel() +// use same QFileSystemModel for all completers +static QFileSystemModel* fileDirModel() { - static QDirModel* m = nullptr; + static QFileSystemModel* m = nullptr; if (!m) { - m = new QDirModel(); + m = new QFileSystemModel(); } return m; } -static QDirModel* pathDirModel() +static QFileSystemModel* pathDirModel() { - static QDirModel* m = nullptr; + static QFileSystemModel* m = nullptr; if (!m) { - m = new QDirModel(); + m = new QFileSystemModel(); m->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot); } return m; @@ -110,7 +110,7 @@ static QDirModel* pathDirModel() QCMakeFileCompleter::QCMakeFileCompleter(QObject* o, bool dirs) : QCompleter(o) { - QDirModel* m = dirs ? pathDirModel() : fileDirModel(); + QFileSystemModel* m = dirs ? pathDirModel() : fileDirModel(); this->setModel(m); } |