summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/examples/completer.qdoc30
-rw-r--r--examples/tools/completer/completer.pro4
-rw-r--r--examples/tools/completer/fsmodel.cpp (renamed from examples/tools/completer/dirmodel.cpp)2
-rw-r--r--examples/tools/completer/fsmodel.h (renamed from examples/tools/completer/dirmodel.h)0
4 files changed, 18 insertions, 18 deletions
diff --git a/doc/src/examples/completer.qdoc b/doc/src/examples/completer.qdoc
index d092027..8a743a7 100644
--- a/doc/src/examples/completer.qdoc
+++ b/doc/src/examples/completer.qdoc
@@ -48,7 +48,7 @@
\image completer-example.png
- This example uses a custom item model, \c DirModel, and a QCompleter object.
+ This example uses a custom item model, \c FileSystemModel, and a QCompleter object.
QCompleter is a class that provides completions based on an item model. The
type of model, the completion mode, and the case sensitivity can be
selected using combo boxes.
@@ -61,32 +61,32 @@
\quotefile examples/tools/completer/completer.qrc
- \section1 DirModel Class Definition
+ \section1 FileSystemModel Class Definition
- The \c DirModel class is a subclass of QDirModel, which provides a data
+ The \c FileSystemModel class is a subclass of QFileSystemModel, which provides a data
model for the local filesystem.
- \snippet examples/tools/completer/dirmodel.h 0
+ \snippet examples/tools/completer/fsmodel.h 0
This class only has a constructor and a \c data() function as it is only
created to enable \c data() to return the entire file path for the
- display role, unlike \l{QDirModel}'s \c data() function that only returns
+ display role, unlike \l{QFileSystemModel}'s \c data() function that only returns
the folder and not the drive label. This is further explained in
- \c DirModel's implementation.
+ \c FileSystemModel's implementation.
- \section1 DirModel Class Implementation
+ \section1 FileSystemModel Class Implementation
- The constructor for the \c DirModel class is used to pass \a parent to
- QDirModel.
+ The constructor for the \c FileSystemModel class is used to pass \a parent to
+ QFileSystemModel.
- \snippet examples/tools/completer/dirmodel.cpp 0
+ \snippet examples/tools/completer/fsmodel.cpp 0
As mentioned earlier, the \c data() function is reimplemented in order to
get it to return the entire file parth for the display role. For example,
- with a QDirModel, you will see "Program Files" in the view. However, with
- \c DirModel, you will see "C:\\Program Files".
+ with a QFileSystemModel, you will see "Program Files" in the view. However, with
+ \c FileSystemModel, you will see "C:\\Program Files".
- \snippet examples/tools/completer/dirmodel.cpp 1
+ \snippet examples/tools/completer/fsmodel.cpp 1
The screenshots below illustrate this difference:
@@ -120,7 +120,7 @@
is then invoked.
We set up three QComboBox objects, \c modelComb, \c modeCombo and
- \c caseCombo. By default, the \c modelCombo is set to QDirModel,
+ \c caseCombo. By default, the \c modelCombo is set to QFileSystemModel,
the \c modeCombo is set to "Filtered Popup" and the \c caseCombo is set
to "Case Insensitive".
@@ -202,7 +202,7 @@
model selected by the user.
A \c switch statement is used to change the item model based on the index
- of \c modelCombo. If \c case is 0, we use an unsorted QDirModel, providing
+ of \c modelCombo. If \c case is 0, we use an unsorted QFileSystemModel, providing
us with a file path excluding the drive label.
\snippet examples/tools/completer/mainwindow.cpp 11
diff --git a/examples/tools/completer/completer.pro b/examples/tools/completer/completer.pro
index 96d3734..14521b2 100644
--- a/examples/tools/completer/completer.pro
+++ b/examples/tools/completer/completer.pro
@@ -1,6 +1,6 @@
-HEADERS = dirmodel.h \
+HEADERS = fsmodel.h \
mainwindow.h
-SOURCES = dirmodel.cpp \
+SOURCES = fsmodel.cpp \
main.cpp \
mainwindow.cpp
RESOURCES = completer.qrc
diff --git a/examples/tools/completer/dirmodel.cpp b/examples/tools/completer/fsmodel.cpp
index 1173d88..8a50f2d 100644
--- a/examples/tools/completer/dirmodel.cpp
+++ b/examples/tools/completer/fsmodel.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "dirmodel.h"
+#include "fsmodel.h"
//! [0]
FileSystemModel::FileSystemModel(QObject *parent)
diff --git a/examples/tools/completer/dirmodel.h b/examples/tools/completer/fsmodel.h
index 5f4d2a7..5f4d2a7 100644
--- a/examples/tools/completer/dirmodel.h
+++ b/examples/tools/completer/fsmodel.h