summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-10-09 13:44:55 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-10-09 16:57:41 (GMT)
commitdb77c5b9c74dc022fc2b37fae73ddbbe89e89c07 (patch)
treef6002a5038ab5554ca6a76329ed3db40fcb5aad6 /doc/src/snippets
parent0f848030a2477a737a626a5b608cad1653a8ba1a (diff)
downloadQt-db77c5b9c74dc022fc2b37fae73ddbbe89e89c07.zip
Qt-db77c5b9c74dc022fc2b37fae73ddbbe89e89c07.tar.gz
Qt-db77c5b9c74dc022fc2b37fae73ddbbe89e89c07.tar.bz2
Doc: Replace QDirModel with QFileSystemModel in examples and overviews.
Task-number: QTBUG-4152 Reviewed-by: Trust Me
Diffstat (limited to 'doc/src/snippets')
-rw-r--r--doc/src/snippets/shareddirmodel/main.cpp5
-rw-r--r--doc/src/snippets/simplemodel-use/main.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/src/snippets/shareddirmodel/main.cpp b/doc/src/snippets/shareddirmodel/main.cpp
index 82034b5..3cb63c9 100644
--- a/doc/src/snippets/shareddirmodel/main.cpp
+++ b/doc/src/snippets/shareddirmodel/main.cpp
@@ -55,7 +55,8 @@ int main(int argc, char *argv[])
QSplitter *splitter = new QSplitter;
//! [2] //! [3]
- QDirModel *model = new QDirModel;
+ QFileSystemModel *model = new QFileSystemModel;
+ model->setRootPath(QDir::currentPath());
//! [0] //! [2] //! [4] //! [5]
QTreeView *tree = new QTreeView(splitter);
//! [3] //! [6]
@@ -74,7 +75,7 @@ int main(int argc, char *argv[])
list->setSelectionModel(selection);
//! [8]
- splitter->setWindowTitle("Two views onto the same directory model");
+ splitter->setWindowTitle("Two views onto the same file system model");
splitter->show();
return app.exec();
}
diff --git a/doc/src/snippets/simplemodel-use/main.cpp b/doc/src/snippets/simplemodel-use/main.cpp
index a3bb0e7..d7fc755 100644
--- a/doc/src/snippets/simplemodel-use/main.cpp
+++ b/doc/src/snippets/simplemodel-use/main.cpp
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
layout->addWidget(title);
//! [0]
- QDirModel *model = new QDirModel;
+ QFileSystemModel *model = new QFileSystemModel;
QModelIndex parentIndex = model->index(QDir::currentPath());
int numRows = model->rowCount(parentIndex);
//! [0]