summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-04-22 09:04:29 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-04-22 09:25:54 +0200
commitaed5a7168354c6ae47687d20b4bd3f0adcc14f8e (patch)
treed2060479a7c12fdba8c1955e5d363754feffabb8 /src/corelib/io
parentd3d10cf23d61f4a011f1a7e9abdee1a92717e80f (diff)
parent628fa13ea4d6ff0e2e2ee76c9adfc78676de3c59 (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts: src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/gui/painting/qdrawhelper.cpp src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/testlib/qtestblacklist.cpp src/tools/qdoc/node.cpp src/tools/qdoc/node.h tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qabstractfileengine.cpp2
-rw-r--r--src/corelib/io/qdir.cpp6
-rw-r--r--src/corelib/io/qfile.cpp4
-rw-r--r--src/corelib/io/qfileinfo.cpp8
-rw-r--r--src/corelib/io/qfilesystemengine.cpp2
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp2
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp10
-rw-r--r--src/corelib/io/qfilesystemwatcher.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher.h12
-rw-r--r--src/corelib/io/qfsfileengine.cpp4
-rw-r--r--src/corelib/io/qiodevice.cpp6
-rw-r--r--src/corelib/io/qlockfile_unix.cpp2
-rw-r--r--src/corelib/io/qloggingcategory.cpp2
-rw-r--r--src/corelib/io/qprocess.cpp34
-rw-r--r--src/corelib/io/qprocess.h25
-rw-r--r--src/corelib/io/qprocess_p.h4
-rw-r--r--src/corelib/io/qprocess_unix.cpp4
-rw-r--r--src/corelib/io/qprocess_win.cpp19
-rw-r--r--src/corelib/io/qprocess_wince.cpp4
-rw-r--r--src/corelib/io/qsettings.cpp42
-rw-r--r--src/corelib/io/qstorageinfo_unix.cpp6
21 files changed, 87 insertions, 113 deletions
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index 45e81a6cdc..07270eb790 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -299,7 +299,7 @@ QAbstractFileEngine *QAbstractFileEngine::create(const QString &fileName)
the file system (i.e. not a file or directory).
\value FileType The file is a regular file to the file system
(i.e. not a link or directory)
- \value BundleType The file is a Mac OS X bundle implies DirectoryType
+ \value BundleType OS X and iOS: the file is a bundle; implies DirectoryType
\value DirectoryType The file is a directory in the file system
(i.e. not a link or file).
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 7fa53bd850..3a9ae2ee6d 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -219,7 +219,7 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt
if ((qt_cmp_si_sort_flags & QDir::DirsLast) && (f1->item.isDir() != f2->item.isDir()))
return !f1->item.isDir();
- int r = 0;
+ qint64 r = 0;
int sortBy = (qt_cmp_si_sort_flags & QDir::SortByMask)
| (qt_cmp_si_sort_flags & QDir::Type);
@@ -1818,8 +1818,8 @@ QFileInfoList QDir::drives()
}
/*!
- Returns the native directory separator: "/" under Unix (including
- Mac OS X) and "\\" under Windows.
+ Returns the native directory separator: "/" under Unix
+ and "\\" under Windows.
You do not need to use this function to build file paths. If you
always use "/", Qt will translate your paths to conform to the
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 5cc1e82e75..ce1684a943 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -199,9 +199,9 @@ QAbstractFileEngine *QFilePrivate::engine() const
\section1 Platform Specific Issues
- File permissions are handled differently on Linux/Mac OS X and
+ File permissions are handled differently on Unix-like systems and
Windows. In a non \l{QIODevice::isWritable()}{writable}
- directory on Linux, files cannot be created. This is not always
+ directory on Unix-like systems, files cannot be created. This is not always
the case on Windows, where, for instance, the 'My Documents'
directory usually is not writable, but it is still possible to
create files in it.
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index bf83464eab..8a86ec5858 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -234,7 +234,7 @@ QDateTime &QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request)
isSymLink(). The symLinkTarget() function provides the name of the file
the symlink points to.
- On Unix (including Mac OS X), the symlink has the same size() has
+ On Unix (including OS X and iOS), the symlink has the same size() has
the file it points to, because Unix handles symlinks
transparently; similarly, opening a symlink using QFile
effectively opens the link's target. For example:
@@ -753,7 +753,7 @@ QString QFileInfo::fileName() const
\since 4.3
Returns the name of the bundle.
- On Mac OS X this returns the proper localized name for a bundle if the
+ On OS X and iOS this returns the proper localized name for a bundle if the
path isBundle(). On all other platforms an empty QString is returned.
Example:
@@ -1029,7 +1029,7 @@ bool QFileInfo::isDir() const
/*!
\since 4.3
Returns \c true if this object points to a bundle or to a symbolic
- link to a bundle on Mac OS X; otherwise returns \c false.
+ link to a bundle on OS X and iOS; otherwise returns \c false.
\sa isDir(), isSymLink(), isFile()
*/
@@ -1050,7 +1050,7 @@ bool QFileInfo::isBundle() const
Returns \c true if this object points to a symbolic link (or to a
shortcut on Windows); otherwise returns \c false.
- On Unix (including Mac OS X), opening a symlink effectively opens
+ On Unix (including OS X and iOS), opening a symlink effectively opens
the \l{symLinkTarget()}{link's target}. On Windows, it opens the \c
.lnk file itself.
diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp
index 4817266a31..df41457a18 100644
--- a/src/corelib/io/qfilesystemengine.cpp
+++ b/src/corelib/io/qfilesystemengine.cpp
@@ -323,7 +323,7 @@ void QFileSystemMetaData::fillFromDirEnt(const QT_DIRENT &entry)
}
}
#elif defined(_DIRENT_HAVE_D_TYPE) || defined(Q_OS_BSD4)
- // BSD4 includes Mac OS X
+ // BSD4 includes OS X and iOS
// ### This will clear all entry flags and knownFlagsMask
switch (entry.d_type)
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 44a270d1fd..c4fb709ddf 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -432,7 +432,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
what |= QFileSystemMetaData::DirectoryType;
}
if (what & QFileSystemMetaData::HiddenAttribute) {
- // Mac OS >= 10.5: st_flags & UF_HIDDEN
+ // OS X >= 10.5: st_flags & UF_HIDDEN
what |= QFileSystemMetaData::PosixStatFlags;
}
#endif // defined(Q_OS_MACX)
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 221cea3bea..5cca3c323e 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -1218,7 +1218,7 @@ QString QFileSystemEngine::rootPath()
ret = QDir::fromNativeSeparators(QString::fromWCharArray(finalWinPath.GetRawBuffer(nullptr)));
#else
- QString ret = QString::fromLatin1(qgetenv("SystemDrive").constData());
+ QString ret = QString::fromLatin1(qgetenv("SystemDrive"));
if (ret.isEmpty())
ret = QLatin1String("c:");
ret.append(QLatin1Char('/'));
@@ -1253,12 +1253,12 @@ QString QFileSystemEngine::homePath()
}
#endif
if (ret.isEmpty() || !QFile::exists(ret)) {
- ret = QString::fromLocal8Bit(qgetenv("USERPROFILE").constData());
+ ret = QString::fromLocal8Bit(qgetenv("USERPROFILE"));
if (ret.isEmpty() || !QFile::exists(ret)) {
- ret = QString::fromLocal8Bit(qgetenv("HOMEDRIVE").constData())
- + QString::fromLocal8Bit(qgetenv("HOMEPATH").constData());
+ ret = QString::fromLocal8Bit(qgetenv("HOMEDRIVE"))
+ + QString::fromLocal8Bit(qgetenv("HOMEPATH"));
if (ret.isEmpty() || !QFile::exists(ret)) {
- ret = QString::fromLocal8Bit(qgetenv("HOME").constData());
+ ret = QString::fromLocal8Bit(qgetenv("HOME"));
if (ret.isEmpty() || !QFile::exists(ret)) {
#if defined(Q_OS_WINCE)
ret = QLatin1String("\\My Documents");
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
index 753f271a63..0bd46400d3 100644
--- a/src/corelib/io/qfilesystemwatcher.cpp
+++ b/src/corelib/io/qfilesystemwatcher.cpp
@@ -185,7 +185,7 @@ void QFileSystemWatcherPrivate::_q_directoryChanged(const QString &path, bool re
the file system monitor. Also note that your process may have
other file descriptors open in addition to the ones for files
being monitored, and these other open descriptors also count in
- the total. Mac OS X 10.5 and up use a different backend and do not
+ the total. OS X 10.5 and up use a different backend and do not
suffer from this issue.
diff --git a/src/corelib/io/qfilesystemwatcher.h b/src/corelib/io/qfilesystemwatcher.h
index 57dac802e8..13d1782913 100644
--- a/src/corelib/io/qfilesystemwatcher.h
+++ b/src/corelib/io/qfilesystemwatcher.h
@@ -62,16 +62,8 @@ public:
QStringList directories() const;
Q_SIGNALS:
- void fileChanged(const QString &path
-#if !defined(Q_QDOC)
- , QPrivateSignal
-#endif
- );
- void directoryChanged(const QString &path
-#if !defined(Q_QDOC)
- , QPrivateSignal
-#endif
- );
+ void fileChanged(const QString &path, QPrivateSignal);
+ void directoryChanged(const QString &path, QPrivateSignal);
private:
Q_PRIVATE_SLOT(d_func(), void _q_fileChanged(const QString &path, bool removed))
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index 13ede56d2a..ddbd24338b 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -603,7 +603,7 @@ qint64 QFSFileEnginePrivate::readFdFh(char *data, qint64 len)
result = fread(data + readBytes, 1, size_t(len - readBytes), fh);
eof = feof(fh);
if (retry && eof && result == 0) {
- // On Mac OS, this is needed, e.g., if a file was written to
+ // On OS X, this is needed, e.g., if a file was written to
// through another stream since our last read. See test
// tst_QFile::appendAndRead
QT_FSEEK(fh, QT_FTELL(fh), SEEK_SET); // re-sync stream.
@@ -875,7 +875,7 @@ bool QFSFileEngine::supportsExtension(Extension extension) const
/*! \fn QFileInfoList QFSFileEngine::drives()
For Windows, returns the list of drives in the file system as a list
- of QFileInfo objects. On unix, Mac OS X and Windows CE, only the
+ of QFileInfo objects. On Unix and Windows CE, only the
root path is returned. On Windows, this function returns all drives
(A:\, C:\, D:\, etc.).
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 7a87a78c60..47484ad596 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -666,7 +666,7 @@ bool QIODevice::seek(qint64 pos)
For some devices, atEnd() can return true even though there is more data
to read. This special case only applies to devices that generate data in
direct response to you calling read() (e.g., \c /dev or \c /proc files on
- Unix and Mac OS X, or console input / \c stdin on all platforms).
+ Unix and OS X, or console input / \c stdin on all platforms).
\sa bytesAvailable(), read(), isSequential()
*/
@@ -989,8 +989,8 @@ QByteArray QIODevice::readAll()
// Size is unknown, read incrementally.
qint64 readResult;
do {
- result.resize(result.size() + QIODEVICE_BUFFERSIZE);
- readResult = read(result.data() + readBytes, result.size() - readBytes);
+ result.resize(readBytes + QIODEVICE_BUFFERSIZE);
+ readResult = read(result.data() + readBytes, QIODEVICE_BUFFERSIZE);
if (readResult > 0 || readBytes == 0)
readBytes += readResult;
} while (readResult > 0);
diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp
index c663681aaa..b817a24c74 100644
--- a/src/corelib/io/qlockfile_unix.cpp
+++ b/src/corelib/io/qlockfile_unix.cpp
@@ -102,7 +102,7 @@ static QBasicAtomicInt fcntlOK = Q_BASIC_ATOMIC_INITIALIZER(-1);
/*!
\internal
Checks that the OS isn't using POSIX locks to emulate flock().
- Mac OS X is one of those.
+ OS X is one of those.
*/
static bool fcntlWorksAfterFlock()
{
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp
index 4631a00f5f..e6bc7caaeb 100644
--- a/src/corelib/io/qloggingcategory.cpp
+++ b/src/corelib/io/qloggingcategory.cpp
@@ -159,7 +159,7 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift)
by QStandardPaths::GenericConfigLocation, e.g.
\list
- \li on Mac OS X: \c ~/Library/Preferences
+ \li on OS X and iOS: \c ~/Library/Preferences
\li on Unix: \c ~/.config, \c /etc/xdg
\li on Windows: \c %LOCALAPPDATA%, \c %ProgramData%,
\l QCoreApplication::applicationDirPath(),
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 80eb08b01b..38bd588c37 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -36,6 +36,9 @@
#include <qdebug.h>
#include <qdir.h>
+#if defined(Q_OS_WIN)
+#include <qtimer.h>
+#endif
#if defined QPROCESS_DEBUG
#include <qstring.h>
#include <ctype.h>
@@ -819,7 +822,7 @@ QProcessPrivate::QProcessPrivate()
emittedReadyRead = false;
emittedBytesWritten = false;
#ifdef Q_OS_WIN
- notifier = 0;
+ stdinWriteTrigger = 0;
processFinishedNotifier = 0;
#endif // Q_OS_WIN
}
@@ -848,6 +851,10 @@ void QProcessPrivate::cleanup()
delete pid;
pid = 0;
}
+ if (stdinWriteTrigger) {
+ delete stdinWriteTrigger;
+ stdinWriteTrigger = 0;
+ }
if (processFinishedNotifier) {
delete processFinishedNotifier;
processFinishedNotifier = 0;
@@ -878,12 +885,6 @@ void QProcessPrivate::cleanup()
delete deathNotifier;
deathNotifier = 0;
}
-#ifdef Q_OS_WIN
- if (notifier) {
- delete notifier;
- notifier = 0;
- }
-#endif
closeChannel(&stdoutChannel);
closeChannel(&stderrChannel);
closeChannel(&stdinChannel);
@@ -1953,10 +1954,24 @@ qint64 QProcess::writeData(const char *data, qint64 len)
return 0;
}
+#if defined(Q_OS_WIN)
+ if (!d->stdinWriteTrigger) {
+ d->stdinWriteTrigger = new QTimer;
+ d->stdinWriteTrigger->setSingleShot(true);
+ QObjectPrivate::connect(d->stdinWriteTrigger, &QTimer::timeout,
+ d, &QProcessPrivate::_q_canWrite);
+ }
+#endif
+
if (len == 1) {
d->stdinChannel.buffer.putChar(*data);
+#ifdef Q_OS_WIN
+ if (!d->stdinWriteTrigger->isActive())
+ d->stdinWriteTrigger->start();
+#else
if (d->stdinChannel.notifier)
d->stdinChannel.notifier->setEnabled(true);
+#endif
#if defined QPROCESS_DEBUG
qDebug("QProcess::writeData(%p \"%s\", %lld) == 1 (written to buffer)",
data, qt_prettyDebug(data, len, 16).constData(), len);
@@ -1966,8 +1981,13 @@ qint64 QProcess::writeData(const char *data, qint64 len)
char *dest = d->stdinChannel.buffer.reserve(len);
memcpy(dest, data, len);
+#ifdef Q_OS_WIN
+ if (!d->stdinWriteTrigger->isActive())
+ d->stdinWriteTrigger->start();
+#else
if (d->stdinChannel.notifier)
d->stdinChannel.notifier->setEnabled(true);
+#endif
#if defined QPROCESS_DEBUG
qDebug("QProcess::writeData(%p \"%s\", %lld) == %lld (written to buffer)",
data, qt_prettyDebug(data, len, 16).constData(), len, len);
diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h
index 65af469c18..078217ea0b 100644
--- a/src/corelib/io/qprocess.h
+++ b/src/corelib/io/qprocess.h
@@ -223,30 +223,14 @@ public Q_SLOTS:
void kill();
Q_SIGNALS:
- void started(
-#if !defined(Q_QDOC)
- QPrivateSignal
-#endif
- );
+ void started(QPrivateSignal);
void finished(int exitCode); // ### Qt 6: merge the two signals with a default value
void finished(int exitCode, QProcess::ExitStatus exitStatus);
void error(QProcess::ProcessError error);
- void stateChanged(QProcess::ProcessState state
-#if !defined(Q_QDOC)
- , QPrivateSignal
-#endif
- );
+ void stateChanged(QProcess::ProcessState state, QPrivateSignal);
- void readyReadStandardOutput(
-#if !defined(Q_QDOC)
- QPrivateSignal
-#endif
- );
- void readyReadStandardError(
-#if !defined(Q_QDOC)
- QPrivateSignal
-#endif
- );
+ void readyReadStandardOutput(QPrivateSignal);
+ void readyReadStandardError(QPrivateSignal);
protected:
void setProcessState(ProcessState state);
@@ -266,7 +250,6 @@ private:
Q_PRIVATE_SLOT(d_func(), bool _q_canWrite())
Q_PRIVATE_SLOT(d_func(), bool _q_startupNotification())
Q_PRIVATE_SLOT(d_func(), bool _q_processDied())
- Q_PRIVATE_SLOT(d_func(), void _q_notified())
friend class QProcessManager;
};
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h
index 5654b404fe..f6bd64fb87 100644
--- a/src/corelib/io/qprocess_p.h
+++ b/src/corelib/io/qprocess_p.h
@@ -303,7 +303,6 @@ public:
bool _q_canWrite();
bool _q_startupNotification();
bool _q_processDied();
- void _q_notified();
QProcess::ProcessChannel processChannel;
QProcess::ProcessChannelMode processChannelMode;
@@ -342,8 +341,7 @@ public:
int forkfd;
#ifdef Q_OS_WIN
- // the wonderful windows notifier
- QTimer *notifier;
+ QTimer *stdinWriteTrigger;
QWinEventNotifier *processFinishedNotifier;
#endif
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index d9ed8d5d43..ed0193c256 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -1110,10 +1110,6 @@ bool QProcessPrivate::waitForDeadChild()
return true;
}
-void QProcessPrivate::_q_notified()
-{
-}
-
#if defined(QPROCESS_USE_SPAWN)
bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
{
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 563286e3e9..cef961ecbd 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -41,7 +41,6 @@
#include <qelapsedtimer.h>
#include <qfileinfo.h>
#include <qregexp.h>
-#include <qtimer.h>
#include <qwineventnotifier.h>
#include <private/qthread_p.h>
#include <qdebug.h>
@@ -58,8 +57,6 @@ QT_BEGIN_NAMESPACE
//#define QPROCESS_DEBUG
-#define NOTIFYTIMEOUT 100
-
static void qt_create_pipe(Q_PIPE *pipe, bool isInputPipe)
{
// Anomymous pipes do not support asynchronous I/O. Thus we
@@ -543,9 +540,6 @@ void QProcessPrivate::startProcess()
processFinishedNotifier = new QWinEventNotifier(pid->hProcess, q);
QObject::connect(processFinishedNotifier, SIGNAL(activated(HANDLE)), q, SLOT(_q_processDied()));
processFinishedNotifier->setEnabled(true);
- notifier = new QTimer(q);
- QObject::connect(notifier, SIGNAL(timeout()), q, SLOT(_q_notified()));
- notifier->start(NOTIFYTIMEOUT);
}
_q_startupNotification();
@@ -810,6 +804,8 @@ qint64 QProcessPrivate::writeToStdin(const char *data, qint64 maxlen)
if (!stdinChannel.writer) {
stdinChannel.writer = new QWindowsPipeWriter(stdinChannel.pipe[1], q);
+ QObjectPrivate::connect(stdinChannel.writer, &QWindowsPipeWriter::canWrite,
+ this, &QProcessPrivate::_q_canWrite);
stdinChannel.writer->start();
}
@@ -828,17 +824,6 @@ bool QProcessPrivate::waitForWrite(int msecs)
return false;
}
-void QProcessPrivate::_q_notified()
-{
- notifier->stop();
-
- if (!stdinChannel.buffer.isEmpty() && (!stdinChannel.writer || stdinChannel.writer->waitForWrite(0)))
- _q_canWrite();
-
- if (processState != QProcess::NotRunning)
- notifier->start(NOTIFYTIMEOUT);
-}
-
bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDir, qint64 *pid)
{
QString args = qt_create_commandline(program, arguments);
diff --git a/src/corelib/io/qprocess_wince.cpp b/src/corelib/io/qprocess_wince.cpp
index bf19c81f25..53767758c2 100644
--- a/src/corelib/io/qprocess_wince.cpp
+++ b/src/corelib/io/qprocess_wince.cpp
@@ -288,10 +288,6 @@ bool QProcessPrivate::waitForWrite(int msecs)
return false;
}
-void QProcessPrivate::_q_notified()
-{
-}
-
bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDir, qint64 *pid)
{
Q_UNUSED(workingDir);
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 780f57c1c7..afe68125d4 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -1915,7 +1915,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
Users normally expect an application to remember its settings
(window sizes and positions, options, etc.) across sessions. This
information is often stored in the system registry on Windows,
- and in XML preferences files on Mac OS X. On Unix systems, in the
+ and in property list files on OS X and iOS. On Unix systems, in the
absence of a standard, many applications (including the KDE
applications) use INI text files.
@@ -1960,8 +1960,8 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
\snippet settings/settings.cpp 4
(Here, we also specify the organization's Internet domain. When
- the Internet domain is set, it is used on Mac OS X instead of the
- organization name, since Mac OS X applications conventionally use
+ the Internet domain is set, it is used on OS X and iOS instead of the
+ organization name, since OS X and iOS applications conventionally use
Internet domains to identify themselves. If no domain is set, a
fake domain is derived from the organization name. See the
\l{Platform-Specific Notes} below for details.)
@@ -2019,7 +2019,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
Setting keys can contain any Unicode characters. The Windows
registry and INI files use case-insensitive keys, whereas the
- Carbon Preferences API on Mac OS X uses case-sensitive keys. To
+ CFPreferences API on OS X and iOS uses case-sensitive keys. To
avoid portability problems, follow these simple rules:
\list 1
@@ -2222,7 +2222,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
in the application's home directory.
If the file format is IniFormat, the following files are
- used on Unix and Mac OS X:
+ used on Unix, OS X, and iOS:
\list 1
\li \c{$HOME/.config/MySoft/Star Runner.ini} (Qt for Embedded Linux: \c{$HOME/Settings/MySoft/Star Runner.ini})
@@ -2250,7 +2250,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
in the application's home directory.
The paths for the \c .ini and \c .conf files can be changed using
- setPath(). On Unix and Mac OS X, the user can override them by
+ setPath(). On Unix, OS X, and iOS the user can override them by
setting the \c XDG_CONFIG_HOME environment variable; see
setPath() for details.
@@ -2267,7 +2267,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
You can then use the QSettings object to read and write settings
in the file.
- On Mac OS X, you can access XML-based \c .plist files by passing
+ On OS X and iOS, you can access property list \c .plist files by passing
QSettings::NativeFormat as second argument. For example:
\snippet code/src_corelib_io_qsettings.cpp 3
@@ -2321,13 +2321,13 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
limitations is to store the settings using the IniFormat
instead of the NativeFormat.
- \li On Mac OS X, allKeys() will return some extra keys for global
+ \li On OS X and iOS, allKeys() will return some extra keys for global
settings that apply to all applications. These keys can be
read using value() but cannot be changed, only shadowed.
Calling setFallbacksEnabled(false) will hide these global
settings.
- \li On Mac OS X, the CFPreferences API used by QSettings expects
+ \li On OS X and iOS, the CFPreferences API used by QSettings expects
Internet domain names rather than organization names. To
provide a uniform API, QSettings derives a fake domain name
from the organization name (unless the organization name
@@ -2344,7 +2344,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
\snippet code/src_corelib_io_qsettings.cpp 7
- \li On Mac OS X, permissions to access settings not belonging to the
+ \li On OS X, permissions to access settings not belonging to the
current user (i.e. SystemScope) have changed with 10.7 (Lion). Prior to
that version, users having admin rights could access these. For 10.7 and
10.8 (Mountain Lion), only root can. However, 10.9 (Mavericks) changes
@@ -2384,7 +2384,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
\value NativeFormat Store the settings using the most
appropriate storage format for the platform.
On Windows, this means the system registry;
- on Mac OS X, this means the CFPreferences
+ on OS X and iOS, this means the CFPreferences
API; on Unix, this means textual
configuration files in INI format.
\value IniFormat Store the settings in INI files.
@@ -2547,7 +2547,7 @@ QSettings::QSettings(Format format, Scope scope, const QString &organization,
If \a format is QSettings::NativeFormat, the meaning of \a
fileName depends on the platform. On Unix, \a fileName is the
- name of an INI file. On Mac OS X, \a fileName is the name of a
+ name of an INI file. On OS X and iOS, \a fileName is the name of a
\c .plist file. On Windows, \a fileName is a path in the system
registry.
@@ -2600,7 +2600,7 @@ QSettings::QSettings(const QString &fileName, Format format, QObject *parent)
called, the QSettings object will not be able to read or write
any settings, and status() will return AccessError.
- On Mac OS X, if both a name and an Internet domain are specified
+ On OS X and iOS, if both a name and an Internet domain are specified
for the organization, the domain is preferred over the name. On
other platforms, the name is preferred over the domain.
@@ -3116,7 +3116,7 @@ bool QSettings::isWritable() const
exists, the previous value is overwritten.
Note that the Windows registry and INI files use case-insensitive
- keys, whereas the Carbon Preferences API on Mac OS X uses
+ keys, whereas the CFPreferences API on OS X and iOS uses
case-sensitive keys. To avoid portability problems, see the
\l{Section and Key Syntax} rules.
@@ -3155,7 +3155,7 @@ void QSettings::setValue(const QString &key, const QVariant &value)
\snippet code/src_corelib_io_qsettings.cpp 25
Note that the Windows registry and INI files use case-insensitive
- keys, whereas the Carbon Preferences API on Mac OS X uses
+ keys, whereas the CFPreferences API on OS X and iOS uses
case-sensitive keys. To avoid portability problems, see the
\l{Section and Key Syntax} rules.
@@ -3190,7 +3190,7 @@ void QSettings::remove(const QString &key)
relative to that group.
Note that the Windows registry and INI files use case-insensitive
- keys, whereas the Carbon Preferences API on Mac OS X uses
+ keys, whereas the CFPreferences API on OS X and iOS uses
case-sensitive keys. To avoid portability problems, see the
\l{Section and Key Syntax} rules.
@@ -3252,7 +3252,7 @@ bool QSettings::event(QEvent *event)
returned.
Note that the Windows registry and INI files use case-insensitive
- keys, whereas the Carbon Preferences API on Mac OS X uses
+ keys, whereas the CFPreferences API on OS X and iOS uses
case-sensitive keys. To avoid portability problems, see the
\l{Section and Key Syntax} rules.
@@ -3355,18 +3355,18 @@ void QSettings::setUserIniPath(const QString &dir)
\row \li SystemScope \li \c /etc/xdg
\row \li{1,2} Qt for Embedded Linux \li{1,2} NativeFormat, IniFormat \li UserScope \li \c $HOME/Settings
\row \li SystemScope \li \c /etc/xdg
- \row \li{1,2} Mac OS X \li{1,2} IniFormat \li UserScope \li \c $HOME/.config
+ \row \li{1,2} OS X and iOS \li{1,2} IniFormat \li UserScope \li \c $HOME/.config
\row \li SystemScope \li \c /etc/xdg
\endtable
- The default UserScope paths on Unix and Mac OS X (\c
+ The default UserScope paths on Unix, OS X, and iOS (\c
$HOME/.config or $HOME/Settings) can be overridden by the user by setting the
\c XDG_CONFIG_HOME environment variable. The default SystemScope
- paths on Unix and Mac OS X (\c /etc/xdg) can be overridden when
+ paths on Unix, OS X, and iOS (\c /etc/xdg) can be overridden when
building the Qt library using the \c configure script's \c
-sysconfdir flag (see QLibraryInfo for details).
- Setting the NativeFormat paths on Windows and Mac OS X has no
+ Setting the NativeFormat paths on Windows, OS X, and iOS has no
effect.
\warning This function doesn't affect existing QSettings objects.
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp
index d120d7569a..7823787711 100644
--- a/src/corelib/io/qstorageinfo_unix.cpp
+++ b/src/corelib/io/qstorageinfo_unix.cpp
@@ -122,7 +122,11 @@ public:
inline QByteArray device() const;
private:
#if defined(Q_OS_BSD4)
+# if defined(Q_OS_NETBSD)
+ struct statvfs *stat_buf;
+# else
struct statfs *stat_buf;
+# endif
int entryCount;
int currentIndex;
#elif defined(Q_OS_SOLARIS)
@@ -206,7 +210,7 @@ inline bool QStorageIterator::isValid() const
inline bool QStorageIterator::next()
{
- return ::getmntent(fp, &mnt) == Q_NULLPTR;
+ return ::getmntent(fp, &mnt) == 0;
}
inline QString QStorageIterator::rootPath() const