summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qdir.cpp9
-rw-r--r--src/corelib/io/qfileselector.cpp18
-rw-r--r--src/corelib/io/qiodevice.cpp5
-rw-r--r--src/corelib/io/qloggingcategory.cpp2
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 8c3ca5fd65..de77dd9a6e 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