summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-04-29 14:51:25 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-04-29 14:51:25 (GMT)
commit9b707c0a12e01f8b0c4432b6a5d391b8699cfd3a (patch)
tree24c920bbba7bc5d2d7dedd7c5a8756376f3c7b4b
parenta63298440dcddc844554e012434c3331ca239db4 (diff)
parentd51939831552ef73e8f33365c1ef77322594512c (diff)
downloadQt-9b707c0a12e01f8b0c4432b6a5d391b8699cfd3a.zip
Qt-9b707c0a12e01f8b0c4432b6a5d391b8699cfd3a.tar.gz
Qt-9b707c0a12e01f8b0c4432b6a5d391b8699cfd3a.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
-rw-r--r--doc/src/activeqt.qdoc2
-rw-r--r--src/gui/painting/qbackingstore.cpp3
-rw-r--r--src/gui/text/qfont.cpp10
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp3
-rw-r--r--src/opengl/qgl.cpp12
5 files changed, 24 insertions, 6 deletions
diff --git a/doc/src/activeqt.qdoc b/doc/src/activeqt.qdoc
index 3919823..473f815 100644
--- a/doc/src/activeqt.qdoc
+++ b/doc/src/activeqt.qdoc
@@ -82,7 +82,7 @@
Designer}.
The ActiveQt modules are part of the \l{Qt Full Framework Edition} and
- the \l{Open Source Versions}.
+ the \l{Open Source Versions of Qt}.
\sa {QAxContainer Module}, {QAxServer Module}
*/
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 36a2fbd..341331b 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -1510,6 +1510,9 @@ void QWidgetPrivate::invalidateBuffer(const QRect &rect)
void QWidgetPrivate::repaint_sys(const QRegion &rgn)
{
+ if (data.in_destructor)
+ return;
+
Q_Q(QWidget);
if (q->testAttribute(Qt::WA_StaticContents)) {
if (!extra)
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 43f5b1e..24ff10b 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -890,7 +890,10 @@ int QFont::pointSize() const
*/
void QFont::setPointSize(int pointSize)
{
- Q_ASSERT_X (pointSize > 0, "QFont::setPointSize", "point size must be greater than 0");
+ if (pointSize <= 0) {
+ qWarning("QFont::setPointSize: Point size <= 0 (%d), must be greater than 0", pointSize);
+ return;
+ }
detach();
@@ -909,7 +912,10 @@ void QFont::setPointSize(int pointSize)
*/
void QFont::setPointSizeF(qreal pointSize)
{
- Q_ASSERT_X(pointSize > 0.0, "QFont::setPointSizeF", "point size must be greater than 0");
+ if (pointSize <= 0) {
+ qWarning("QFont::setPointSizeF: Point size <= 0 (%d), must be greater than 0", pointSize);
+ return;
+ }
detach();
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 11e1e46..bcbeef1 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -477,7 +477,8 @@ void QNetworkAccessManager::setCache(QAbstractNetworkCache *cache)
if (d->networkCache != cache) {
delete d->networkCache;
d->networkCache = cache;
- d->networkCache->setParent(this);
+ if (d->networkCache)
+ d->networkCache->setParent(this);
}
}
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 18d9125..2d58084 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1328,13 +1328,21 @@ QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include
// This is an old legacy fix for PowerPC based Macs, which
// we shouldn't remove
while (p < end) {
- *p = 0xFF000000 | (*p>>8);
+ *p = 0xff000000 | (*p>>8);
++p;
}
}
} else {
// OpenGL gives ABGR (i.e. RGBA backwards); Qt wants ARGB
- img = img.rgbSwapped();
+ for (int y = 0; y < h; y++) {
+ uint *q = (uint*)img.scanLine(y);
+ for (int x=0; x < w; ++x) {
+ const uint pixel = *q;
+ *q = ((pixel << 16) & 0xff0000) | ((pixel >> 16) & 0xff) | (pixel & 0xff00ff00);
+ q++;
+ }
+ }
+
}
return img.mirrored();
}