diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-05-15 20:03:18 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2015-05-27 08:07:09 +0000 |
commit | 35175b8fa5f8be93b147f57a247b8e52f28ee8cb (patch) | |
tree | 8f2d6409c195eeb37bef527ddaf4800d233c2bff /src/corelib/io/qdir.cpp | |
parent | 16b95b65a6fea501dade6e3f5f1ad48f7dfaa173 (diff) |
Introduce QDir::listSeparator()
Qt should help abstract such platform differences.
This ifdef is proliferating in user code (seen a few times
in KDE) and even in Qt code (qstandardpaths.cpp).
[ChangeLog][QtCore][QDir] Added listSeparator().
Change-Id: Icad082a51c8efd5d63f7af9bbaedbe4bc15b8937
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r-- | src/corelib/io/qdir.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 9b1ec3917a..8b3dd5d82f 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1826,6 +1826,8 @@ QFileInfoList QDir::drives() underlying operating system. If you want to display paths to the user using their operating system's separator use toNativeSeparators(). + + \sa listSeparator() */ QChar QDir::separator() { @@ -1837,6 +1839,16 @@ QChar QDir::separator() } /*! + \fn QDir::listSeparator() + \since 5.6 + + Returns the native path list separator: ':' under Unix + and ';' under Windows. + + \sa separator() +*/ + +/*! Sets the application's current working directory to \a path. Returns \c true if the directory was successfully changed; otherwise returns \c false. |