diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-06-02 16:15:43 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-06-03 17:52:55 +0200 |
commit | 5807d7ef2badd9a97a02cc77d56bb908835086f4 (patch) | |
tree | 4e19b2ffb1d62a9b3cc244e22c018ec620a1852d /src | |
parent | 33a7f5ee4d8d4dc197100e3cda141063b89f74e6 (diff) |
QDirModel is deprecated, don't use it in documentation snippets
Change-Id: I1e91f530ac0814329f67f0f6af1ef5b422e47dec
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qmlmodels/doc/snippets/delegatemodel/delegatemodel_rootindex/main.cpp | 6 | ||||
-rw-r--r-- | src/qmlmodels/doc/snippets/delegatemodel/delegatemodel_rootindex/view.qml | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/qmlmodels/doc/snippets/delegatemodel/delegatemodel_rootindex/main.cpp b/src/qmlmodels/doc/snippets/delegatemodel/delegatemodel_rootindex/main.cpp index a56eb69616..6ec93ce113 100644 --- a/src/qmlmodels/doc/snippets/delegatemodel/delegatemodel_rootindex/main.cpp +++ b/src/qmlmodels/doc/snippets/delegatemodel/delegatemodel_rootindex/main.cpp @@ -51,7 +51,7 @@ #include <QQmlContext> #include <QApplication> -#include <QDirModel> +#include <QFileSystemModel> //![0] int main(int argc, char ** argv) @@ -60,8 +60,8 @@ int main(int argc, char ** argv) QQuickView view; - QDirModel model; - view.rootContext()->setContextProperty("dirModel", &model); + QFileSystemModel model; + view.rootContext()->setContextProperty("fileSystemModel", &model); view.setSource(QUrl::fromLocalFile("view.qml")); view.show(); diff --git a/src/qmlmodels/doc/snippets/delegatemodel/delegatemodel_rootindex/view.qml b/src/qmlmodels/doc/snippets/delegatemodel/delegatemodel_rootindex/view.qml index 2e17eed8f0..4468567371 100644 --- a/src/qmlmodels/doc/snippets/delegatemodel/delegatemodel_rootindex/view.qml +++ b/src/qmlmodels/doc/snippets/delegatemodel/delegatemodel_rootindex/view.qml @@ -57,7 +57,7 @@ ListView { height: 400 model: DelegateModel { - model: dirModel + model: fileSystemModel delegate: Rectangle { width: 200; height: 25 |