diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-02-11 15:12:00 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-11 15:12:00 +0100 |
commit | df62c31807f7b0a8b9bc222b47ccc7016cfaee65 (patch) | |
tree | a7df6263cdb4cc96e2d31486437ec19ca0bf01e5 /src/corelib/io | |
parent | 17de86f2824c1807c0fa7fa7ae0ed3b7d2acca00 (diff) | |
parent | a1fe728fa5bd6cb9e50cf317a58efcf4eea4de2c (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qdir.cpp | 9 | ||||
-rw-r--r-- | src/corelib/io/qfileselector.cpp | 18 | ||||
-rw-r--r-- | src/corelib/io/qiodevice.cpp | 5 | ||||
-rw-r--r-- | src/corelib/io/qloggingcategory.cpp | 2 |
4 files changed, 20 insertions, 14 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 3075e0fb12..909143ecf3 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -716,11 +716,12 @@ QString QDir::absoluteFilePath(const QString &fileName) const return fileName; d->resolveAbsoluteEntry(); + const QString absoluteDirPath = d->absoluteDirEntry.filePath(); if (fileName.isEmpty()) - return d->absoluteDirEntry.filePath(); - if (!d->absoluteDirEntry.isRoot()) - return d->absoluteDirEntry.filePath() % QLatin1Char('/') % fileName; - return d->absoluteDirEntry.filePath() % fileName; + return absoluteDirPath; + if (!absoluteDirPath.endsWith(QLatin1Char('/'))) + return absoluteDirPath % QLatin1Char('/') % fileName; + return absoluteDirPath % fileName; } /*! diff --git a/src/corelib/io/qfileselector.cpp b/src/corelib/io/qfileselector.cpp index 92d3564a0f..b4021c060f 100644 --- a/src/corelib/io/qfileselector.cpp +++ b/src/corelib/io/qfileselector.cpp @@ -102,7 +102,7 @@ QFileSelectorPrivate::QFileSelectorPrivate() your code might look something like this: \code QString defaultsPath = "data/defaults.conf"; -#if defined(Q_OS_LINUX_ANDROID) +#if defined(Q_OS_ANDROID) defaultsPath = "data/android/defaults.conf"; #elif defined(Q_OS_BLACKBERRY) defaultsPath = "data/blackberry/defaults.conf"; @@ -157,7 +157,7 @@ QFileSelectorPrivate::QFileSelectorPrivate() Selectors normally available are \list \li platform, any of the following strings which match the platform the application is running - on: android, blackberry, ios, mac, linux, wince, unix, windows. + on: android, blackberry, ios, osx, darwin, mac, linux, wince, unix, windows. \li locale, same as QLocale::system().name(). \endlist @@ -368,18 +368,22 @@ QStringList QFileSelectorPrivate::platformSelectors() # endif #elif defined(Q_OS_UNIX) ret << QStringLiteral("unix"); -# if defined(Q_OS_LINUX_ANDROID) +# if defined(Q_OS_ANDROID) ret << QStringLiteral("android"); # elif defined(Q_OS_BLACKBERRY) ret << QStringLiteral("blackberry"); # elif defined(Q_OS_QNX) ret << QStringLiteral("qnx"); -# elif defined(Q_OS_IOS) - ret << QStringLiteral("ios"); # elif defined(Q_OS_LINUX) ret << QStringLiteral("linux"); -# elif defined(Q_OS_MAC) - ret << QStringLiteral("mac"); +# elif defined(Q_OS_DARWIN) + ret << QStringLiteral("darwin"); + ret << QStringLiteral("mac"); // compatibility synonym +# if defined(Q_OS_IOS) + ret << QStringLiteral("ios"); +# elif defined(Q_OS_OSX) + ret << QStringLiteral("osx"); +# endif # else struct utsname u; if (uname(&u) != -1) diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index a81b8580c4..53019e1ff4 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -259,9 +259,10 @@ QIODevicePrivate::~QIODevicePrivate() \value NotOpen The device is not open. \value ReadOnly The device is open for reading. - \value WriteOnly The device is open for writing. + \value WriteOnly The device is open for writing. Note that this mode implies + Truncate. \value ReadWrite The device is open for reading and writing. - \value Append The device is opened in append mode, so that all data is + \value Append The device is opened in append mode so that all data is written to the end of the file. \value Truncate If possible, the device is truncated before it is opened. All earlier contents of the device are lost. diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index 9ddf58b5ea..5fa346dce5 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -72,7 +72,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory, \section1 Checking category configuration QLoggingCategory provides \l isDebugEnabled(), \l isWarningEnabled(), - \l isCriticalEnabled(), \l isTraceEnabled(), as well as \l isEnabled() + \l isCriticalEnabled(), as well as \l isEnabled() to check whether messages for the given message type should be logged. \note The qCDebug(), qCWarning(), qCCritical() macros prevent arguments |