summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-06-27 12:27:54 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2011-06-27 12:27:54 +0200
commit18a3f6169bb8a763366003d92b8013950578c79f (patch)
treee39fa00a9511410fea9be35a6130007e43719ad8 /src/corelib
parent371d398f70e10408e0eaba7b5f05e638a0048599 (diff)
parenta06c8405d053b16327d65415f3335eceb37abd3b (diff)
Merge remote-tracking branch 'base/master' into refactor
Conflicts: demos/demos.pro demos/embedded/digiflip/digiflip.pro examples/examples.pro examples/graphicsview/embeddeddialogs/embeddeddialogs.pro src/gui/kernel/qplatformglcontext_qpa.cpp src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp src/plugins/platforms/wayland/gl_integration/xcomposite_glx/qwaylandxcompositeglxcontext.cpp src/plugins/platforms/wayland/qwaylanddisplay.cpp src/plugins/platforms/wayland/qwaylandwindow.cpp Change-Id: I2a4ec9e2ca9c9aa9d57b55f98985e810b77bb745
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qbuffer.cpp17
-rw-r--r--src/corelib/io/qprocess.cpp11
-rw-r--r--src/corelib/tools/qpoint.h6
3 files changed, 10 insertions, 24 deletions
diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp
index 38e406b1a4..35e7b6809c 100644
--- a/src/corelib/io/qbuffer.cpp
+++ b/src/corelib/io/qbuffer.cpp
@@ -333,23 +333,18 @@ bool QBuffer::open(OpenMode flags)
{
Q_D(QBuffer);
- if ((flags & Append) == Append)
+ if ((flags & (Append | Truncate)) != 0)
flags |= WriteOnly;
- setOpenMode(flags);
- if (!(isReadable() || isWritable())) {
- qWarning("QFile::open: File access not specified");
+ if ((flags & (ReadOnly | WriteOnly)) == 0) {
+ qWarning("QBuffer::open: Buffer access not specified");
return false;
}
- if ((flags & QIODevice::Truncate) == QIODevice::Truncate) {
+ if ((flags & Truncate) == Truncate)
d->buf->resize(0);
- }
- if ((flags & QIODevice::Append) == QIODevice::Append) // append to end of buffer
- seek(d->buf->size());
- else
- seek(0);
+ d->ioIndex = (flags & Append) == Append ? d->buf->size() : 0;
- return true;
+ return QIODevice::open(flags);
}
/*!
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index a14c4fdc7d..ddbbbd5286 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1673,13 +1673,10 @@ QProcessEnvironment QProcess::processEnvironment() const
bool QProcess::waitForStarted(int msecs)
{
Q_D(QProcess);
- if (d->processState == QProcess::Starting) {
- if (!d->waitForStarted(msecs))
- return false;
- setProcessState(QProcess::Running);
- emit started();
- }
- return d->processState == QProcess::Running;
+ if (d->processState == QProcess::Running)
+ return true;
+
+ return d->waitForStarted(msecs);
}
/*! \reimp
diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h
index c0cf2192c1..b394ece1a6 100644
--- a/src/corelib/tools/qpoint.h
+++ b/src/corelib/tools/qpoint.h
@@ -92,14 +92,8 @@ public:
private:
friend class QTransform;
- // ### Qt 5; remove the ifdef and just have the same order on all platforms.
-#if defined(Q_OS_MAC)
- int yp;
- int xp;
-#else
int xp;
int yp;
-#endif
};
Q_DECLARE_TYPEINFO(QPoint, Q_MOVABLE_TYPE);