From 5c3010cf467d437ccfc8a263bed167e979614504 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 6 Jan 2011 14:01:53 +0100 Subject: qkeymapper_x11.cpp: fix compilation with LSB and without XKB Task-number: QTBUG-16312 Reviewed-by: Marius Storm-Olsen --- src/gui/kernel/qkeymapper_x11.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp index 825edbc..e085d11 100644 --- a/src/gui/kernel/qkeymapper_x11.cpp +++ b/src/gui/kernel/qkeymapper_x11.cpp @@ -61,13 +61,6 @@ #include -QT_BEGIN_NAMESPACE - -#ifndef QT_NO_XKB - -// bring in the auto-generated xkbLayoutData -#include "qkeymapper_x11_p.cpp" - #ifdef QT_LINUXBASE // LSB's IsKeypadKey define is wrong - see // http://bugs.linuxbase.org/show_bug.cgi?id=2521 @@ -80,6 +73,13 @@ QT_BEGIN_NAMESPACE (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF)) #endif +QT_BEGIN_NAMESPACE + +#ifndef QT_NO_XKB + +// bring in the auto-generated xkbLayoutData +#include "qkeymapper_x11_p.cpp" + QLocale q_getKeyboardLocale(const QByteArray &layoutName, const QByteArray &variantName) { int i = 0; @@ -92,7 +92,6 @@ QLocale q_getKeyboardLocale(const QByteArray &layoutName, const QByteArray &vari } #endif // QT_NO_XKB - // from qapplication_x11.cpp extern uchar qt_alt_mask; extern uchar qt_meta_mask; -- cgit v0.12 From 91596c9c08208690894ec11a3a99eac57ad17f2b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 6 Jan 2011 14:51:04 +0100 Subject: QUrl::setUrl should call detach Task-number: QTBUG-16425 Reviewed-by: Gabriel Reviewed-by: Markus Goetz --- src/corelib/io/qurl.cpp | 1 + tests/auto/qurl/tst_qurl.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 6a3037d..45f908d 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -4262,6 +4262,7 @@ void QUrl::setUrl(const QString &url) */ void QUrl::setUrl(const QString &url, ParsingMode parsingMode) { + detach(); // escape all reserved characters and delimiters // reserved = gen-delims / sub-delims if (parsingMode != TolerantMode) { diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index 63f9721..4354ffb 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -675,6 +675,14 @@ void tst_QUrl::setUrl() QCOMPARE(url.encodedPath().constData(), "text/javascript,d5%20%3D%20'five%5Cu0027s'%3B"); } + { //check it calls detach + QUrl u1("http://aaa.com"); + QUrl u2 = u1; + u2.setUrl("http://bbb.com"); + QCOMPARE(u1.host(), QString::fromLatin1("aaa.com")); + QCOMPARE(u2.host(), QString::fromLatin1("bbb.com")); + } + /* The tests below are copied from kdelibs/kdecore/tests/kurltest.cpp (an old version of) -- cgit v0.12 From 6d331b6ee7711cde2bf9adc1a584a45875c07983 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 6 Jan 2011 15:34:48 +0100 Subject: Designer: Block QEvent::WinIdChange. As it causes an obscure deletion crash related to the formeditor rubberband on Mac. Reviewed-by: con --- tools/designer/src/components/formeditor/formwindowmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/designer/src/components/formeditor/formwindowmanager.cpp b/tools/designer/src/components/formeditor/formwindowmanager.cpp index ce809ff..ed854cf 100644 --- a/tools/designer/src/components/formeditor/formwindowmanager.cpp +++ b/tools/designer/src/components/formeditor/formwindowmanager.cpp @@ -192,6 +192,7 @@ bool FormWindowManager::eventFilter(QObject *o, QEvent *e) case QEvent::ToolTip: case QEvent::WhatsThis: case QEvent::WhatsThisClicked: + case QEvent::WinIdChange: case QEvent::DynamicPropertyChange: case QEvent::HoverEnter: case QEvent::HoverLeave: -- cgit v0.12 From 66cfe2a776b7542fe1d8bae9c0d7bb5be79406fd Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 6 Jan 2011 15:16:03 +0000 Subject: Fix KERN-EXEC 0 panic on exit when bearer is searching for WLANs The access point scanner cancels itself in the destructor. This requires the handle to be valid, but it was closed in the symbian engine destructor immediately before deleting the AP scanner. Because of the way symbian active objects work, the crashing function is only called if there was an asynchronous request in progress. So it could be missed in cases where the scan completes faster than the test case. Task-number: QTBUG-16484 Reviewed-by: Markus Goetz --- src/plugins/bearer/symbian/symbianengine.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp index f025d86..a370d78 100644 --- a/src/plugins/bearer/symbian/symbianengine.cpp +++ b/src/plugins/bearer/symbian/symbianengine.cpp @@ -144,6 +144,10 @@ SymbianEngine::~SymbianEngine() { Cancel(); + //The scanner may be using the connection monitor so it needs to be + //deleted first while the handle is still valid. + delete ipAccessPointsAvailabilityScanner; + iConnectionMonitor.CancelNotifications(); iConnectionMonitor.Close(); @@ -151,8 +155,6 @@ SymbianEngine::~SymbianEngine() iCmManager.Close(); #endif - delete ipAccessPointsAvailabilityScanner; - // CCommsDatabase destructor uses cleanup stack. Since QNetworkConfigurationManager // is a global static, but the time we are here, E32Main() has been exited already and // the thread's default cleanup stack has been deleted. Without this line, a -- cgit v0.12 From e185e5f008f6852bd7a79d74262717c8e377b918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 5 Jan 2011 08:25:56 +0100 Subject: Restored old flushing behavior in -graphicssystem opengl on desktop. Change 284211ccbd2cbd recently introduced a fix for EGL, to prevent flushing when nothing has been rendered into the back buffer. However, the skip should only be done when there's no partial update support in the window surface. If there is partial update support we can still flush as usual. Reviewed-by: Gunnar Sletta --- src/opengl/qwindowsurface_gl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index b8716ce..7243f02 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -520,9 +520,10 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & // did_paint is set to true in ::beginPaint. ::beginPaint means that we // at least cleared the background (= painted something). In EGL API it's a - // mistakte to call swapBuffers if nothing was painted. This check protects - // the flush func from being executed if it's for nothing. - if (!d_ptr->did_paint) + // mistake to call swapBuffers if nothing was painted unless + // EGL_BUFFER_PRESERVED is set. This check protects the flush func from + // being executed if it's for nothing. + if (!hasPartialUpdateSupport() && !d_ptr->did_paint) return; QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget(); -- cgit v0.12 From 84658ec4e650b12dcea6f886b530e66a195465cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 6 Jan 2011 13:09:14 +0100 Subject: Fixed bug and performance problem in windowsstyle. QImage::fill(Qt::transparent) pre-4.8 is a bug, also using Format_ARGB32 is very unoptimal compared to Format_ARGB32_Premultiplied. Task-number: QTBUG-16439 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/styles/qwindowsstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 32a6d8d..4144b80 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -1395,8 +1395,8 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, if (!QPixmapCache::find(pixmapName, pixmap)) { int border = size/5; int sqsize = 2*(size/2); - QImage image(sqsize, sqsize, QImage::Format_ARGB32); - image.fill(Qt::transparent); + QImage image(sqsize, sqsize, QImage::Format_ARGB32_Premultiplied); + image.fill(0); QPainter imagePainter(&image); QPolygon a; -- cgit v0.12 From 5780ff75c1e63322f3edd6158c08f1d944919cce Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 7 Jan 2011 08:47:51 +0100 Subject: QmlViewer: Remove unused class variables --- tools/qml/qmlruntime.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h index b43aa54..a70ffc9 100644 --- a/tools/qml/qmlruntime.h +++ b/tools/qml/qmlruntime.h @@ -188,8 +188,6 @@ private: ScriptOptions m_scriptOptions; QDeclarativeTester *tester; - QNetworkReply *wgtreply; - QString wgtdir; NetworkAccessManagerFactory *namFactory; bool useQmlFileBrowser; -- cgit v0.12