From 86870912cfb1444f2ad0cd6b99c163af43f06bde Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 26 Oct 2010 12:03:32 +0300 Subject: Fix empty mifconv TARGETFILE in some edge cases. Only add ICON for Qt gui application projects that do not explicitly want to suppress it in symbianpkgrules.pri. This logic should match the logic used for setting RSS_RULES.icon_file and thus avoid empty TARGETFILE in bld.inf mifconv extension. Task-number: QT-4193 Reviewed-by: Janne Koskinen --- demos/symbianpkgrules.pri | 4 +++- examples/symbianpkgrules.pri | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/demos/symbianpkgrules.pri b/demos/symbianpkgrules.pri index d42f188..c9cc492 100644 --- a/demos/symbianpkgrules.pri +++ b/demos/symbianpkgrules.pri @@ -13,4 +13,6 @@ vendorinfo = \ demos_deployment.pkg_prerules += vendorinfo DEPLOYMENT += demos_deployment -contains(TEMPLATE,app):isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg +isEmpty(ICON):contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG, qt):!contains(CONFIG, "no_icon") { + ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg +} diff --git a/examples/symbianpkgrules.pri b/examples/symbianpkgrules.pri index b22ca85..0f615c7 100644 --- a/examples/symbianpkgrules.pri +++ b/examples/symbianpkgrules.pri @@ -13,4 +13,7 @@ vendorinfo = \ examples_deployment.pkg_prerules += vendorinfo DEPLOYMENT += examples_deployment -contains(TEMPLATE,app):isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg +isEmpty(ICON):contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG, qt):!contains(CONFIG, "no_icon") { + ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg +} + -- cgit v0.12 From f603ce9a960ee387ab10be1916da8ffd09305045 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 26 Oct 2010 13:50:28 +0300 Subject: Fix patch_capabilities.pl script for explicit set of capabilities Elftran command never got executed when explicit set of capabilities was defined. No warning or error was printed either, making it rather confusing for user. Task-number: QTBUG-14730 Reviewed-by: Janne Koskinen --- bin/patch_capabilities.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index 06ab116..5230480 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -269,6 +269,9 @@ if (@ARGV) if (@capabilitiesSpecified) { $commandToExecute = sprintf($baseCommandToExecute, join(" ", @capabilitiesSpecified)); + $executeNeeded = 1; + my $capString = join(" ", @capabilitiesSpecified); + print ("Patching: Patching the the Vendor ID to 0 and the capabilities used to: \"$capString\" in \"$binaryBaseName\".\n"); } else { # Test which capabilities are present and then restrict them to the allowed set. # This avoid raising the capabilities of apps that already have none. -- cgit v0.12 From f30bcbd8409efdb48790ec09f603887d5763ea7c Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Tue, 26 Oct 2010 13:46:40 +0200 Subject: Set the location of the closing brace. Reviewed-by: Christian Kamm --- src/declarative/qml/parser/qdeclarativejs.g | 4 ++-- src/declarative/qml/parser/qdeclarativejsparser.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g index 1b66ba0..c84f0b3 100644 --- a/src/declarative/qml/parser/qdeclarativejs.g +++ b/src/declarative/qml/parser/qdeclarativejs.g @@ -1254,7 +1254,7 @@ case $rule_number: { else node = makeAstNode (driver->nodePool()); node->lbraceToken = loc(1); - node->lbraceToken = loc(3); + node->rbraceToken = loc(3); sym(1).Node = node; } break; ./ @@ -1265,7 +1265,7 @@ case $rule_number: { AST::ObjectLiteral *node = makeAstNode (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); - node->lbraceToken = loc(4); + node->rbraceToken = loc(4); sym(1).Node = node; } break; ./ diff --git a/src/declarative/qml/parser/qdeclarativejsparser.cpp b/src/declarative/qml/parser/qdeclarativejsparser.cpp index 8afb93d..28ef17d 100644 --- a/src/declarative/qml/parser/qdeclarativejsparser.cpp +++ b/src/declarative/qml/parser/qdeclarativejsparser.cpp @@ -679,7 +679,7 @@ case 85: { else node = makeAstNode (driver->nodePool()); node->lbraceToken = loc(1); - node->lbraceToken = loc(3); + node->rbraceToken = loc(3); sym(1).Node = node; } break; @@ -687,7 +687,7 @@ case 86: { AST::ObjectLiteral *node = makeAstNode (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); - node->lbraceToken = loc(4); + node->rbraceToken = loc(4); sym(1).Node = node; } break; -- cgit v0.12 From 586fc2a9ead06a8478bdc380b775f18000741745 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Tue, 19 Oct 2010 09:40:25 +0100 Subject: Suppress call to controlVisibilityChanged for null control pointer At this point, old_winid may be null. Passing a null pointer to controlVisibilityChanged is actually a no-op, due to the 'QWidgetPrivate::mapper->contains(control)' check, but suppressing the function call altogether clarifies the intent of the code slightly. Reviewed-by: Jason Barron --- src/gui/kernel/qwidget_s60.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 031892d..cf4bdf1 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -709,7 +709,8 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) // old_winid may not have received a 'not visible' visibility // changed event before being destroyed; make sure that it is // removed from the backing store's list of visible windows. - S60->controlVisibilityChanged(old_winid, false); + if (old_winid) + S60->controlVisibilityChanged(old_winid, false); setWinId(0); -- cgit v0.12 From f417a6e7729a506e5a59e7fd38e03166515198b1 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Tue, 19 Oct 2010 16:46:18 +0100 Subject: Remove widget subtree from backing store tracker when reparented When a native widget is reparented such that the value of maybeBackingStore() changes, it and all of its native descendents must be removed from the old QWidgetBackingStoreTracker. If this is not done, the backing store may not be deleted when the top-level widget is hidden, thereby consuming memory unnecessarily. Task-number: MOBILITY-1315 Reviewed-by: Jason Barron Reviewed-by: bnilsen --- src/gui/kernel/qwidget.cpp | 20 ++++++++++++++++++++ src/gui/kernel/qwidget_p.h | 1 + tests/auto/qwidget/tst_qwidget.cpp | 24 +++++++++++++++++++++--- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 9b44f15..6c64ffc 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -236,6 +236,17 @@ void QWidgetBackingStoreTracker::unregisterWidget(QWidget *w) } } +/*! + \internal + Recursively remove widget and all of its descendents. + */ +void QWidgetBackingStoreTracker::unregisterWidgetSubtree(QWidget *widget) +{ + unregisterWidget(widget); + foreach (QObject *child, widget->children()) + if (QWidget *childWidget = qobject_cast(child)) + unregisterWidgetSubtree(childWidget); +} QWidgetPrivate::QWidgetPrivate(int version) : QObjectPrivate(version) @@ -10031,7 +10042,16 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f) if (newParent && isAncestorOf(focusWidget())) focusWidget()->clearFocus(); + QTLWExtra *oldTopExtra = window()->d_func()->maybeTopData(); + QWidgetBackingStoreTracker *oldBsTracker = oldTopExtra ? &oldTopExtra->backingStore : 0; + d->setParent_sys(parent, f); + + QTLWExtra *topExtra = window()->d_func()->maybeTopData(); + QWidgetBackingStoreTracker *bsTracker = topExtra ? &topExtra->backingStore : 0; + if (oldBsTracker && oldBsTracker != bsTracker) + oldBsTracker->unregisterWidgetSubtree(this); + if (desktopWidget) parent = 0; diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index 6c89659..ca1e3fc 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -122,6 +122,7 @@ public: void registerWidget(QWidget *w); void unregisterWidget(QWidget *w); + void unregisterWidgetSubtree(QWidget *w); inline QWidgetBackingStore* data() { diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 2f221d2..09af941 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -9718,14 +9718,25 @@ void tst_QWidget::destroyBackingStoreWhenHidden() child.setAutoFillBackground(true); child.setPalette(Qt::blue); + QWidget grandChild(&child); + grandChild.setAutoFillBackground(true); + grandChild.setPalette(Qt::yellow); + QVBoxLayout layout(&parent); layout.setContentsMargins(10, 10, 10, 10); layout.addWidget(&child); parent.setLayout(&layout); - child.winId(); + QVBoxLayout childLayout(&child); + childLayout.setContentsMargins(10, 10, 10, 10); + childLayout.addWidget(&grandChild); + child.setLayout(&childLayout); + + // Ensure that this widget and all its ancestors are native + grandChild.winId(); parent.show(); + QTest::qWaitForWindowShown(&parent); // Check that child window does not obscure parent window @@ -9734,18 +9745,24 @@ void tst_QWidget::destroyBackingStoreWhenHidden() // Native child widget should share parent's backing store QVERIFY(0 != backingStore(parent)); QVERIFY(0 == backingStore(child)); + QVERIFY(0 == backingStore(grandChild)); // Make child widget full screen child.setWindowFlags((child.windowFlags() | Qt::Window) ^ Qt::SubWindow); child.setWindowState(child.windowState() | Qt::WindowFullScreen); child.show(); + + // Paint into the child to ensure that it gets a backing store + QPainter painter(&child); + painter.fillRect(QRect(0, 0, 90, 90), Qt::white); + QTest::qWaitForWindowShown(&child); // Ensure that 'window hidden' event is received by parent qApp->processEvents(); // Check that child window obscures parent window - QVERIFY(parent.visibleRegion().subtracted(child.visibleRegion()).isEmpty()); + QVERIFY(parent.visibleRegion().subtracted(child.visibleRegion() + grandChild.visibleRegion()).isEmpty()); // Now that extent of child widget goes beyond parent's extent, // a new backing store should be created for the child widget. @@ -9761,11 +9778,12 @@ void tst_QWidget::destroyBackingStoreWhenHidden() QTest::qWaitForWindowShown(&child); // Check that parent is now visible again - QVERIFY(!parent.visibleRegion().subtracted(child.visibleRegion()).isEmpty()); + QVERIFY(!parent.visibleRegion().subtracted(child.visibleRegion() + grandChild.visibleRegion()).isEmpty()); // Native child widget should once again share parent's backing store QVERIFY(0 != backingStore(parent)); QVERIFY(0 == backingStore(child)); + QVERIFY(0 == backingStore(grandChild)); } // 6. Partial reveal followed by full reveal -- cgit v0.12 From 5d411794d18f33ed8438744216b8ec5095682e20 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Tue, 26 Oct 2010 09:18:39 +0100 Subject: Create dummy window surface if if _q_DummyWindowSurface property is set Task-number: MOBILITY-1315 Reviewed-by: Jason Barron Reviewed-by: bnilsen --- src/gui/kernel/qwidget.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 6c64ffc..e22ec55 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -337,15 +337,27 @@ QWidgetPrivate::~QWidgetPrivate() #endif //QT_NO_GRAPHICSEFFECT } +class QDummyWindowSurface : public QWindowSurface +{ +public: + QDummyWindowSurface(QWidget *window) : QWindowSurface(window) {} + QPaintDevice *paintDevice() { return window(); } + void flush(QWidget *, const QRegion &, const QPoint &) {} +}; + QWindowSurface *QWidgetPrivate::createDefaultWindowSurface() { Q_Q(QWidget); QWindowSurface *surface; - if (QApplicationPrivate::graphicsSystem()) - surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q); - else - surface = createDefaultWindowSurface_sys(); + if (q->property("_q_DummyWindowSurface").toBool()) { + surface = new QDummyWindowSurface(q); + } else { + if (QApplicationPrivate::graphicsSystem()) + surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q); + else + surface = createDefaultWindowSurface_sys(); + } return surface; } -- cgit v0.12 From 00ab5c0d690f5cbb1f588adf0d469e5e9c54051c Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Mon, 25 Oct 2010 15:40:19 +0100 Subject: Phonon MMF backend: set _q_DummyWindowSurface property on VideoWidget This prevents a window surface being created if Phonon::VideoWidget::setFullScreen(true) is called. Since Qt does not ever render any content to the native window in which video is displayed, creation of a surface for that window would consume memory unnecessarily. Task-number: MOBILITY-1315 Reviewed-by: Jason Barron --- src/3rdparty/phonon/mmf/videowidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/3rdparty/phonon/mmf/videowidget.cpp b/src/3rdparty/phonon/mmf/videowidget.cpp index 122094e..d59e82a 100644 --- a/src/3rdparty/phonon/mmf/videowidget.cpp +++ b/src/3rdparty/phonon/mmf/videowidget.cpp @@ -65,6 +65,8 @@ MMF::VideoWidget::VideoWidget(QWidget *parent) TRACE_CONTEXT(VideoWidget::VideoWidget, EVideoApi); TRACE_ENTRY_0(); + parent->setProperty("_q_DummyWindowSurface", true); + TRACE_EXIT_0(); } -- cgit v0.12 From 9e45ded299899ab21f3c3c8644e39051aaaa78aa Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 27 Oct 2010 10:53:25 +1000 Subject: Doc clarification for Loader. --- src/declarative/graphicsitems/qdeclarativeloader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index 5647b14..7777567 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -216,7 +216,8 @@ QDeclarativeLoader::~QDeclarativeLoader() cannot load non-visual components. To unload the currently loaded item, set this property to an empty string, - or set \l sourceComponent to \c undefined. + or set \l sourceComponent to \c undefined. Setting \c source to a + new URL will also cause the item created by the previous URL to be unloaded. \sa sourceComponent, status, progress */ -- cgit v0.12 From 85d8ead39ea03f55e140ce737839dbb203940b56 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 27 Oct 2010 13:02:19 +1000 Subject: Fix bug in QML debug client installation Allow QML debug clients to be installed between the connection being established and the hello message being received. --- src/declarative/debugger/qdeclarativedebugclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp index 977e58e..f5c5751 100644 --- a/src/declarative/debugger/qdeclarativedebugclient.cpp +++ b/src/declarative/debugger/qdeclarativedebugclient.cpp @@ -93,7 +93,7 @@ QDeclarativeDebugConnectionPrivate::QDeclarativeDebugConnectionPrivate(QDeclarat void QDeclarativeDebugConnectionPrivate::advertisePlugins() { - if (!q->isConnected() || !gotHello) + if (!q->isConnected()) return; QPacket pack; -- cgit v0.12 From b09dd9976572faa5f298363c21789681fe65dfe6 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 27 Oct 2010 11:52:54 +0200 Subject: Make sure the correct attribute arrays are enabled in GL's glyph cache The scene graph does not update the context's attribute array settings, so depending on the order of events, the calls to enable the vertex array etc. might be ignored. Reviewed-by: Kim --- src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index b8576cb..66c9ba8 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -238,10 +238,10 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height) glVertexAttribPointer(QT_TEXTURE_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, m_textureCoordinateArray); m_blitProgram->bind(); - QGLContextPrivate* ctx_d = const_cast(ctx->d_func()); - ctx_d->setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, true); - ctx_d->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, true); - ctx_d->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false); + m_blitProgram->enableAttributeArray(int(QT_VERTEX_COORDS_ATTR)); + m_blitProgram->enableAttributeArray(int(QT_TEXTURE_COORDS_ATTR)); + m_blitProgram->disableAttributeArray(int(QT_OPACITY_ATTR)); + blitProgram = m_blitProgram; } else { -- cgit v0.12 From 23643a0755b3ce787b33efaf55009ff134756835 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 27 Oct 2010 14:12:16 +0200 Subject: Fix some build issues for building Qt for Symbian on Mac OS X. Need to add edllstub.lib and change a bit because some refactored work for mkspecs in 86636e0c4ab91bfb60be1e18d6daff34d41a5927. RevBy: axis --- mkspecs/features/symbian/symbian_building.prf | 1 + mkspecs/symbian-gcce/qmake.conf | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index a2791a1..c681ebb 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -155,6 +155,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { } } else :symbian-gcce { LIBS += \ + -l:edllstub.lib \ -l:edll.lib \ -l:usrt2_2.lib \ -l:dfpaeabi.dso \ diff --git a/mkspecs/symbian-gcce/qmake.conf b/mkspecs/symbian-gcce/qmake.conf index f012217..9aff4e5 100644 --- a/mkspecs/symbian-gcce/qmake.conf +++ b/mkspecs/symbian-gcce/qmake.conf @@ -4,6 +4,7 @@ include(../common/symbian/symbian-makefile.conf) +include(../common/gcc-base.conf) include(../common/g++.conf) QMAKE_CC = arm-none-symbianelf-gcc @@ -54,7 +55,7 @@ DEFINES += __GCCE__ \ _STLP_NO_EXCEPTION_HEADER QMAKE_LFLAGS_APP += --entry=_E32Startup -u _E32Startup -QMAKE_LFLAGS_SHLIB += --default-symver --entry _E32Dll +QMAKE_LFLAGS_SHLIB += -shared --default-symver --entry _E32Dll QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB gcceExtraFlags = --include=${EPOCROOT}/epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script -- cgit v0.12 From 21847180e22848dc0ea60c4b9a3236e83fa2e895 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 27 Oct 2010 15:28:29 +0200 Subject: fix build with sse2 and without ssse3 Merge-request: 892 Reviewed-by: Olivier Goffart --- tests/benchmarks/corelib/tools/qstring/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index 9616052..eafcc24 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -1007,6 +1007,7 @@ static inline __attribute__((optimize("no-unroll-loops"))) int ucstrncmp_sse2_al return ucstrncmp_short_tail(a + counter, b + counter, len); } +#ifdef __SSSE3__ static inline __attribute__((optimize("no-unroll-loops"))) int ucstrncmp_ssse3_alignr_aligned(const ushort *a, const ushort *b, int len) { quintptr counter = 0; @@ -1276,6 +1277,7 @@ static int ucstrncmp_ssse3_aligning2(const ushort *a, const ushort *b, int len) } #endif +#endif typedef int (* UcstrncmpFunction)(const ushort *, const ushort *, int); Q_DECLARE_METATYPE(UcstrncmpFunction) -- cgit v0.12 From 5bd8dcc607539a6b44855d9aeb4d55c239b6ae56 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 27 Oct 2010 15:31:16 +0200 Subject: fix warnings Merge-request: 891 Reviewed-by: Olivier Goffart --- src/network/access/qnetworkreplyimpl.cpp | 2 +- src/network/socket/qnativesocketengine_win.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 4c4815c..010e904 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -64,10 +64,10 @@ inline QNetworkReplyImplPrivate::QNetworkReplyImplPrivate() bytesDownloaded(0), lastBytesDownloaded(-1), bytesUploaded(-1), preMigrationDownloaded(-1), httpStatusCode(0), state(Idle) - , downloadBuffer(0) , downloadBufferReadPosition(0) , downloadBufferCurrentSize(0) , downloadBufferMaximumSize(0) + , downloadBuffer(0) { } diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index f952cee..91b8b2e 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -714,6 +714,8 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port) address = QHostAddress(QHostAddress::Any); } break; + default: + break; } struct sockaddr_in sockAddrIPv4; -- cgit v0.12 From e9397addd1de905e75863099021637213a458814 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 27 Oct 2010 15:31:16 +0200 Subject: don't build qelfparser on non-elf platforms Merge-request: 891 Reviewed-by: Olivier Goffart --- src/corelib/plugin/qelfparser_p.cpp | 6 +++++- src/corelib/plugin/qelfparser_p.h | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index 4ae7f85..c60b3d5 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -39,8 +39,11 @@ ** ****************************************************************************/ -#include "qlibrary_p.h" #include "qelfparser_p.h" + +#if defined (Q_OF_ELF) && defined(Q_CC_GNU) + +#include "qlibrary_p.h" #include QT_BEGIN_NAMESPACE @@ -232,3 +235,4 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library QT_END_NAMESPACE +#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU) diff --git a/src/corelib/plugin/qelfparser_p.h b/src/corelib/plugin/qelfparser_p.h index 380d5a1..8087da5 100644 --- a/src/corelib/plugin/qelfparser_p.h +++ b/src/corelib/plugin/qelfparser_p.h @@ -56,6 +56,8 @@ #include #include +#if defined (Q_OF_ELF) && defined(Q_CC_GNU) + QT_BEGIN_NAMESPACE class QString; @@ -99,5 +101,6 @@ public: QT_END_NAMESPACE -#endif // QELFPARSER_P_H +#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU) +#endif // QELFPARSER_P_H -- cgit v0.12 From 40554dd9dbee365789dfaf27d2f7126a9ab04903 Mon Sep 17 00:00:00 2001 From: axis Date: Wed, 27 Oct 2010 14:48:25 +0200 Subject: Fixed a bug in the elf2e32_qtwrapper script. It did not handle missing symbols in all cases, most notably when elf2e32 decides to omit it from the produced def file. This required us to start reading the original def file as well, to find out what the original symbols was. Task: QTBUG-11839 RevBy: Thomas Zander --- bin/elf2e32_qtwrapper.pl | 104 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 14 deletions(-) mode change 100644 => 100755 bin/elf2e32_qtwrapper.pl diff --git a/bin/elf2e32_qtwrapper.pl b/bin/elf2e32_qtwrapper.pl old mode 100644 new mode 100755 index 694d54a..c51c409 --- a/bin/elf2e32_qtwrapper.pl +++ b/bin/elf2e32_qtwrapper.pl @@ -75,26 +75,102 @@ while (1) { last; } - if ($buildingLibrary) { + if ($buildingLibrary && $runCount == 1) { my $tmpDefFile; - my $defFile; - open($defFile, "< $defoutput[1]") or die("Could not open $defoutput[1]"); + my $newDefFile; + my $origDefFile; + my $savedNewDefFileLine = ""; + open($origDefFile, "< $definput[1]") or die("Could not open $definput[1]"); + open($newDefFile, "< $defoutput[1]") or die("Could not open $defoutput[1]"); open($tmpDefFile, "> $defoutput[1].tmp") or die("Could not open $defoutput[1].tmp"); + print($tmpDefFile "EXPORTS\n"); $fixupFile = "$defoutput[1].tmp"; - while (<$defFile>) { - s/\r//; - s/\n//; - next if (/; NEW:/); - if (/([a-z0-9_]+) @/i) { - if (exists($fixupSymbols{$1})) { - s/ ABSENT//; - } elsif (s/; MISSING://) { - s/$/ ABSENT/; + while (1) { + my $origDefLine; + my $origSym; + my $origOrdinal; + my $origExtraData; + my $newDefLine; + my $newSym; + my $newOrdinal; + my $newExtraData; + my $defLine; + my $sym; + my $ordinal; + my $extraData; + # Read from original def file, and skip non-symbol lines + while (1) { + $origDefLine = <$origDefFile>; + if (defined($origDefLine)) { + $origDefLine =~ s/[\n\r]//; + if ($origDefLine =~ /([a-z0-9_]+) +\@ ([0-9]+) (.*)/i) { + $origSym = $1; + $origOrdinal = $2; + $origExtraData = $3; + last; + } + } else { + last; } } - print($tmpDefFile "$_\n"); + + if ($savedNewDefFileLine) { + # This happens if the new def file was missing an entry. + $newDefLine = $savedNewDefFileLine; + $newDefLine =~ /([a-z0-9_]+) +\@ ([0-9]+) (.*)/i or die("$0: Shouldn't happen"); + $newSym = $1; + $newOrdinal = $2; + $newExtraData = $3; + } else { + # Read from new def file, and skip non-symbol lines + while (1) { + $newDefLine = <$newDefFile>; + if (defined($newDefLine)) { + $newDefLine =~ s/[\n\r]//; + if ($newDefLine =~ /([a-z0-9_]+) +\@ ([0-9]+) (.*)/i) { + $newSym = $1; + $newOrdinal = $2; + $newExtraData = $3; + last; + } + } else { + last; + } + } + } + $savedNewDefFileLine = ""; + last if (!defined($origDefLine) && !defined($newDefLine)); + + if (defined($origOrdinal) && (!defined($newOrdinal) || $origOrdinal != $newOrdinal)) { + # If the symbol is missing from the new def file, use the original symbol. + $savedNewDefFileLine = $newDefLine; + $defLine = $origDefLine; + $sym = $origSym; + $ordinal = $origOrdinal; + $extraData = $origExtraData; + } else { + $defLine = $newDefLine; + $sym = $newSym; + $ordinal = $newOrdinal; + if ($newExtraData =~ /ABSENT/) { + # Special case to keep "DATA [0-9]+" data in absent entries. + $extraData = $origExtraData; + } else { + $extraData = $newExtraData; + } + } + if (exists($fixupSymbols{$sym})) { + # Fix symbols that have returned after first being marked ABSENT. + $extraData =~ s/ ABSENT//; + } elsif ($defLine =~ s/; MISSING://) { + # Auto-absent symbols. + $extraData .= " ABSENT"; + } + print($tmpDefFile "\t$sym \@ $ordinal $extraData\n"); } - close($defFile); + print($tmpDefFile "\n"); + close($origDefFile); + close($newDefFile); close($tmpDefFile); $definput[1] = "$defoutput[1].tmp"; -- cgit v0.12 From d9cc9d959a4f177656d5c13725529e9877da3b30 Mon Sep 17 00:00:00 2001 From: Pavel Lebedev Date: Wed, 27 Oct 2010 15:52:28 +0200 Subject: Fix QAbstractProxyModel::mimeData to use list of mapped indexes instead of original in call to source model. Merge-request: 876 Reviewed-by: Olivier Goffart --- src/gui/itemviews/qabstractproxymodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/itemviews/qabstractproxymodel.cpp b/src/gui/itemviews/qabstractproxymodel.cpp index 12c4c7b..b9574f1 100644 --- a/src/gui/itemviews/qabstractproxymodel.cpp +++ b/src/gui/itemviews/qabstractproxymodel.cpp @@ -362,7 +362,7 @@ QMimeData* QAbstractProxyModel::mimeData(const QModelIndexList &indexes) const QModelIndexList list; foreach(const QModelIndex &index, indexes) list << mapToSource(index); - return d->model->mimeData(indexes); + return d->model->mimeData(list); } /*! -- cgit v0.12 From 723cd931cc15a3ce075c575f1d08e4586177521f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 27 Oct 2010 16:26:08 +0200 Subject: fix QEventLoop::X11ExcludeTimers with Glib event loop When GSource prepare or check functions return TRUE, Glib does not necessary call the dispatch function immediatelly (probably depends on the ordering of processing events). This means that timerSourceDispatch() may get called from different call of QEventDispatcherGlib::processEvents() than its accompanying timerSourcePrepareHelper() or timerSourceCheckHelper(). This is a problem if a timer becomes pending during a normal processEvents() call but will only be executed during a call to processEvents() with QEventLoop::X11ExcludeTimers. The attached patch fixes this problem by rescheduling the timer for another pass. As for a testcase, this happens when making LibreOffice's KDE integration use Qt event loop, requires setting the useEventLoop property on the QClipboard object, so I'm afraid I don't have anything simple. But fact that Glib can keep an event pending for a little moment is rather obvious from its sources or can be triggered from any Qt application, and I hope the rest is an obvious consequence. Merge-request: 2492 Reviewed-by: Olivier Goffart --- src/corelib/kernel/qeventdispatcher_glib.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp index 8390275..e5136f9 100644 --- a/src/corelib/kernel/qeventdispatcher_glib.cpp +++ b/src/corelib/kernel/qeventdispatcher_glib.cpp @@ -180,6 +180,8 @@ static gboolean timerSourceCheck(GSource *source) static gboolean timerSourceDispatch(GSource *source, GSourceFunc, gpointer) { GTimerSource *timerSource = reinterpret_cast(source); + if (timerSource->processEventsFlags & QEventLoop::X11ExcludeTimers) + return true; timerSource->runWithIdlePriority = true; (void) timerSource->timerList.activateTimers(); return true; // ??? don't remove, right again? -- cgit v0.12