summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2011-06-10 09:53:47 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2011-06-10 09:53:47 (GMT)
commit9ae35e8c10108c87b2ac10975dbe75651f7cd33e (patch)
tree915d489f8c2a2092d164d56e1585665a8180596a /src
parent2cb398e1d901e62384bb2b388761cfd18fc8804a (diff)
parenta9364af090fd3209b92ed5e07a1374488d22b1c4 (diff)
downloadQt-9ae35e8c10108c87b2ac10975dbe75651f7cd33e.zip
Qt-9ae35e8c10108c87b2ac10975dbe75651f7cd33e.tar.gz
Qt-9ae35e8c10108c87b2ac10975dbe75651f7cd33e.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-team into 4.8-earth
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qbuffer.cpp17
-rw-r--r--src/gui/styles/qcommonstyle.cpp2
2 files changed, 7 insertions, 12 deletions
diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp
index 38e406b..35e7b68 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/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index e5171d8..ad0e151 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -5292,7 +5292,7 @@ QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opti
pixmap = QIcon::fromTheme(QLatin1String("media-seek-backward")).pixmap(16);
break;
case SP_MediaSkipForward:
- pixmap = QIcon::fromTheme(QLatin1String("media-skip-backward")).pixmap(16);
+ pixmap = QIcon::fromTheme(QLatin1String("media-skip-forward")).pixmap(16);
break;
case SP_MediaSkipBackward:
pixmap = QIcon::fromTheme(QLatin1String("media-skip-backward")).pixmap(16);