From d4fa065b90173ccf718beeec2a6fd269cc3135ea Mon Sep 17 00:00:00 2001 From: Iain Date: Wed, 2 Dec 2009 14:52:59 +0100 Subject: Update QtCore DEF file to remove isSignalConnected() (which is now inline) Reviewed-by: Jason Barron --- src/s60installs/eabi/QtCoreu.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index 6a4cdbd..89fa76f 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -2556,7 +2556,7 @@ EXPORTS _ZNK14QObjectPrivate10senderListEv @ 2555 NONAME _ZNK14QObjectPrivate11signalIndexEPKc @ 2556 NONAME _ZNK14QObjectPrivate12receiverListEPKc @ 2557 NONAME - _ZNK14QObjectPrivate17isSignalConnectedEi @ 2558 NONAME + _ZNK14QObjectPrivate17isSignalConnectedEi @ 2558 NONAME ABSENT _ZNK14QObjectPrivate8isSenderEPK7QObjectPKc @ 2559 NONAME _ZNK14QStringMatcher7indexInEPK5QCharii @ 2560 NONAME _ZNK14QStringMatcher7indexInERK7QStringi @ 2561 NONAME -- cgit v0.12 From 747ee16fe763725451d05126d9a9a49a87627210 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 2 Dec 2009 15:50:22 +0100 Subject: Fixes a couple of minor doc points Added the perl requirement for building from source on Windows and clarified that the support for OpenGL ES Common Lite 1.0 is being dropped and not for OpenGL ES Common Lite as a whole. Reviewed-by: Martin Smith --- doc/src/getting-started/installation.qdoc | 4 ++++ doc/src/platforms/supported-platforms.qdoc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index 58059d1..beb4419 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -711,6 +711,10 @@ If you are using pre-built binaries, follow the instructions given in the \l{http://www.microsoft.com/downloads/details.aspx?FamilyId=BB4A75AB-E2D4-4C96-B39D-37BAF6B5B1DC&displaylang=en}{here} to avoid runtime conflicts. + If you are using a source code package of Qt, you must first install Perl so + that the syncqt script invoked by configure can be executed. You can download + this \l{http://www.activestate/downloads/}{here}. + To build Qt with Phonon on Windows, you require: \list diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index be098bc..d0334f5 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -170,6 +170,6 @@ \o Drop support for Visual Studio 2003 \o Drop support for HP-UX on PA-RISC \o Drop support for Windows Mobile 5 - \o Drop support for OpenGL ES Common Lite + \o Drop support for OpenGL ES Common Lite 1.0 \endlist */ -- cgit v0.12 From de789420c1918f30c276113ebfc056c620f341cc Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 11 Nov 2009 15:58:58 +0100 Subject: Improved compatibility with MDI area custom themes on XP With certain custom Windows themes the window mask will be incorrectly set so that the subwindows become unusable. Instead of passing the window rect to the mask region function, we now only pass only the title bar rect and add the remainder at the bottom. This should improve compatibility with certain custom themes such as the Vista Inspirat Pack. Task-id: QTBUG-6271 Reviewed-by: prasanth --- src/gui/styles/qwindowsxpstyle.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index fe7f5d7..54f2964 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -3780,12 +3780,19 @@ int QWindowsXPStyle::styleHint(StyleHint hint, const QStyleOption *option, const QStyleHintReturnMask *mask = qstyleoption_cast(returnData); const QStyleOptionTitleBar *titlebar = qstyleoption_cast(option); if (mask && titlebar) { + // Note certain themes will not return the whole window frame but only the titlebar part when + // queried This function needs to return the entire window mask, hence we will only fetch the mask for the + // titlebar itself and add the remaining part of the window rect at the bottom. + int tbHeight = proxy()->pixelMetric(PM_TitleBarHeight, option, widget); + QRect titleBarRect = option->rect; + titleBarRect.setHeight(tbHeight); XPThemeData themeData; if (titlebar->titleBarState & Qt::WindowMinimized) { - themeData = XPThemeData(widget, 0, QLatin1String("WINDOW"), WP_MINCAPTION, CS_ACTIVE, option->rect); + themeData = XPThemeData(widget, 0, QLatin1String("WINDOW"), WP_MINCAPTION, CS_ACTIVE, titleBarRect); } else - themeData = XPThemeData(widget, 0, QLatin1String("WINDOW"), WP_CAPTION, CS_ACTIVE, option->rect); - mask->region = d->region(themeData); + themeData = XPThemeData(widget, 0, QLatin1String("WINDOW"), WP_CAPTION, CS_ACTIVE, titleBarRect); + mask->region = d->region(themeData) + + QRect(0, tbHeight, option->rect.width(), option->rect.height() - tbHeight); } } break; -- cgit v0.12 From 2d8dd892f5f58610ac98404f4bcc9f4bcdc2c65a Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Sat, 14 Nov 2009 15:30:37 +1000 Subject: Update known issues. Refer to new bug tracker and remove known issue for VS Integration (as it has been replaced by the VS Add-in). Reviewed-by: Trust Me --- doc/src/known-issues.qdoc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/doc/src/known-issues.qdoc b/doc/src/known-issues.qdoc index 313fa40..c56ae80 100644 --- a/doc/src/known-issues.qdoc +++ b/doc/src/known-issues.qdoc @@ -46,8 +46,7 @@ \brief A summary of known issues in Qt %VERSION% at the time of release. An up-to-date list of known issues with Qt %VERSION% can be found via the - \l{Task Tracker} on the Qt website which provides additional information - about known issues and tasks related to Qt. + \l{http://bugreports.qt.nokia.com/}{Qt Bug Tracker}. \section1 General Issues @@ -116,13 +115,6 @@ } \endcode - \o Under certain circumstances Visual Studio Integration v1.4.0 will not - be able to install the integration for Visual Studio 2005 on Windows - Vista. An error message states that .NET Framework v2.0 Service Pack 1 - is not installed. This is due to a problem with the built-in - installation of this on Windows Vista. This issue can be fixed by - installing .NET Framework version 3.5. - \o With NVIDIA GeForce 7950 GT (driver version 6.14.11.7824), a fullscreen QGLWidget flickers when child widgets are shown/hidden. The workaround for this is to use \l{QWidget::}{setGeometry()} with a width/height 1 -- cgit v0.12 From a8daa8fc4e8a7508634a48c749ad574ab2f85772 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 16 Nov 2009 14:33:35 +0100 Subject: fix baseline for "backslashes" this is a windows-only test, so it never failed for the "usual suspects" ... --- .../auto/linguist/lupdate/testdata/good/backslashes/project.ts.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/linguist/lupdate/testdata/good/backslashes/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/backslashes/project.ts.result index be6b93c..d3a5fdf 100644 --- a/tests/auto/linguist/lupdate/testdata/good/backslashes/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/backslashes/project.ts.result @@ -1,10 +1,10 @@ - + QApplication - + QT_LAYOUT_DIRECTION Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. -- cgit v0.12 From 182efb3d2c5182a89d7416f474811309d7939786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 20 Nov 2009 13:28:34 +0100 Subject: Doc: Document QSystemTrayIcon::showMessage() Mac behavior. Document that that QSystemTrayIcon::showMessage requires Growl. --- src/gui/util/qsystemtrayicon.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/util/qsystemtrayicon.cpp b/src/gui/util/qsystemtrayicon.cpp index c6ea00f..6f2b501 100644 --- a/src/gui/util/qsystemtrayicon.cpp +++ b/src/gui/util/qsystemtrayicon.cpp @@ -380,6 +380,9 @@ bool QSystemTrayIcon::supportsMessages() On Windows, the \a millisecondsTimeoutHint is usually ignored by the system when the application has focus. + On Mac OS X, the Growl notification system must be installed for this function to + display messages. + \sa show() supportsMessages() */ void QSystemTrayIcon::showMessage(const QString& title, const QString& msg, -- cgit v0.12 From cfe40854c0c6731317ec73a55d222d73b6bd613e Mon Sep 17 00:00:00 2001 From: ninerider Date: Mon, 23 Nov 2009 15:03:42 +0100 Subject: Compilation fix for Windows Mobile The default style (plastique) used was not available if not included in the build. Using now the windows style instead. Reviewed-by: Maurice --- tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp index d3087dc..ab110e6 100644 --- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp +++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp @@ -146,7 +146,7 @@ void tst_QGraphicsLinearLayout::initTestCase() { // since the style will influence the results, we have to ensure // that the tests are run using the same style on all platforms -#ifdef Q_WS_S60 +#if defined( Q_WS_S60 )|| defined (Q_WS_WINCE) QApplication::setStyle(new QWindowsStyle); #else QApplication::setStyle(new QPlastiqueStyle); -- cgit v0.12 From ee0690cdf553b6cf22432488ea113209203fe1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 26 Nov 2009 15:47:49 +0100 Subject: Fixed a crash in the GL engine when trying to draw invalid pixmaps. Task-number: QTBUG-6226 Reviewed-by: Eskil --- src/gui/painting/qpainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 97f3dd4..d048d51 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5182,7 +5182,7 @@ void QPainter::drawPixmap(const QPointF &p, const QPixmap &pm) Q_D(QPainter); - if (!d->engine) + if (!d->engine || pm.isNull()) return; #ifndef QT_NO_DEBUG -- cgit v0.12 From a539ce478800c3dacf8456d206e8fd6dc700ac5c Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 5 Jun 2009 17:38:39 +0200 Subject: make signal handlers understand QVariant again Also, issue a warning if a type is not known to the meta-type system. Backport of 508c9cd681244a5ad566c12733aa70f5bd522b57 Task-number: QTBUG-5060 --- src/script/qscriptextqobject.cpp | 21 +++++++++++++--- .../qscriptextqobject/tst_qscriptextqobject.cpp | 29 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/src/script/qscriptextqobject.cpp b/src/script/qscriptextqobject.cpp index b3b9a548..4be6b72 100644 --- a/src/script/qscriptextqobject.cpp +++ b/src/script/qscriptextqobject.cpp @@ -1657,12 +1657,27 @@ void QScript::QObjectConnectionManager::execute(int slotIndex, void **argv) activation_data->m_members[i].object(nameId, i, QScriptValue::Undeletable | QScriptValue::SkipInEnumeration); + QScriptValueImpl actual; if (i < argc) { - int argType = QMetaType::type(parameterTypes.at(i)); - activation_data->m_values[i] = eng->create(argType, argv[i + 1]); + void *arg = argv[i + 1]; + QByteArray typeName = parameterTypes.at(i); + int argType = QMetaType::type(typeName); + if (!argType) { + if (typeName == "QVariant") { + actual = eng->valueFromVariant(*reinterpret_cast(arg)); + } else { + qWarning("QScriptEngine: Unable to handle unregistered datatype '%s' " + "when invoking handler of signal %s::%s", + typeName.constData(), meta->className(), method.signature()); + actual = eng->undefinedValue(); + } + } else { + actual = eng->create(argType, arg); + } } else { - activation_data->m_values[i] = eng->undefinedValue(); + actual = eng->undefinedValue(); } + activation_data->m_values[i] = actual; } QScriptValueImpl senderObject; diff --git a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp index 8768d0e..5816b94 100644 --- a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp +++ b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp @@ -326,6 +326,10 @@ public: { emit mySignalWithDefaultArg(arg); } void emitMySignalWithDefaultArg() { emit mySignalWithDefaultArg(); } + void emitMySignalWithVariantArg(const QVariant &arg) + { emit mySignalWithVariantArg(arg); } + void emitMySignalWithScriptEngineArg(QScriptEngine *arg) + { emit mySignalWithScriptEngineArg(arg); } public Q_SLOTS: void mySlot() @@ -388,6 +392,8 @@ Q_SIGNALS: void myOtherOverloadedSignal(const QString &arg); void myOtherOverloadedSignal(int arg); void mySignalWithDefaultArg(int arg = 123); + void mySignalWithVariantArg(const QVariant &arg); + void mySignalWithScriptEngineArg(QScriptEngine *arg); protected: void connectNotify(const char *signal) { @@ -1501,6 +1507,29 @@ void tst_QScriptExtQObject::connectAndDisconnect() m_myObject->emitMyOtherOverloadedSignal(123); QVERIFY(!m_engine->evaluate("gotSignal").toBoolean()); + // signal with QVariant arg: argument conversion should work + m_myObject->clearConnectedSignal(); + QVERIFY(m_engine->evaluate("myObject.mySignalWithVariantArg.connect(myHandler)").isUndefined()); + QCOMPARE(m_myObject->connectedSignal().constData(), SIGNAL(mySignalWithVariantArg(QVariant))); + m_engine->evaluate("gotSignal = false"); + m_myObject->emitMySignalWithVariantArg(123); + QCOMPARE(m_engine->evaluate("gotSignal").toBoolean(), true); + QCOMPARE(m_engine->evaluate("signalArgs.length").toNumber(), 1.0); + QCOMPARE(m_engine->evaluate("signalArgs[0]").toNumber(), 123.0); + QVERIFY(m_engine->evaluate("myObject.mySignalWithVariantArg.disconnect(myHandler)").isUndefined()); + + // signal with argument type that's unknown to the meta-type system + m_myObject->clearConnectedSignal(); + QVERIFY(m_engine->evaluate("myObject.mySignalWithScriptEngineArg.connect(myHandler)").isUndefined()); + QCOMPARE(m_myObject->connectedSignal().constData(), SIGNAL(mySignalWithScriptEngineArg(QScriptEngine*))); + m_engine->evaluate("gotSignal = false"); + QTest::ignoreMessage(QtWarningMsg, "QScriptEngine: Unable to handle unregistered datatype 'QScriptEngine*' when invoking handler of signal MyQObject::mySignalWithScriptEngineArg(QScriptEngine*)"); + m_myObject->emitMySignalWithScriptEngineArg(m_engine); + QCOMPARE(m_engine->evaluate("gotSignal").toBoolean(), true); + QCOMPARE(m_engine->evaluate("signalArgs.length").toNumber(), 1.0); + QVERIFY(m_engine->evaluate("signalArgs[0]").isUndefined()); + QVERIFY(m_engine->evaluate("myObject.mySignalWithScriptEngineArg.disconnect(myHandler)").isUndefined()); + // connect(object, function) m_engine->evaluate("otherObject = { name:'foo' }"); QVERIFY(m_engine->evaluate("myObject.mySignal.connect(otherObject, myHandler)").isUndefined()); -- cgit v0.12 From ce4522cb341340e98427d678664ea84761e3ca07 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 1 Dec 2009 15:32:43 +0100 Subject: Fixed a potential crash in QDockWidget This happened when inserting the gap over a place holder item. Task-number: QTBUG-6107 Reviewed-by: Gabi --- src/gui/widgets/qdockarealayout.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp index 4970300..9422bdc 100644 --- a/src/gui/widgets/qdockarealayout.cpp +++ b/src/gui/widgets/qdockarealayout.cpp @@ -1167,7 +1167,8 @@ bool QDockAreaLayoutInfo::insertGap(QList path, QLayoutItem *dockWidgetItem QDockAreaLayoutInfo *subinfo = item.subinfo; QLayoutItem *widgetItem = item.widgetItem; - QRect r = subinfo == 0 ? dockedGeometry(widgetItem->widget()) : subinfo->rect; + QPlaceHolderItem *placeHolderItem = item.placeHolderItem; + QRect r = subinfo == 0 ? widgetItem ? dockedGeometry(widgetItem->widget()) : placeHolderItem->topLevelRect : subinfo->rect; Qt::Orientation opposite = o == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal; #ifdef QT_NO_TABBAR @@ -1176,13 +1177,15 @@ bool QDockAreaLayoutInfo::insertGap(QList path, QLayoutItem *dockWidgetItem QDockAreaLayoutInfo *new_info = new QDockAreaLayoutInfo(sep, dockPos, opposite, tabBarShape, mainWindow); + //item become a new top-level item.subinfo = new_info; item.widgetItem = 0; + item.placeHolderItem = 0; QDockAreaLayoutItem new_item = widgetItem == 0 ? QDockAreaLayoutItem(subinfo) - : QDockAreaLayoutItem(widgetItem); + : widgetItem ? QDockAreaLayoutItem(widgetItem) : QDockAreaLayoutItem(placeHolderItem); new_item.size = pick(opposite, r.size()); new_item.pos = pick(opposite, r.topLeft()); new_info->item_list.append(new_item); -- cgit v0.12 From 517e50706b154254bb2b51f19b8678c6a8df2590 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 2 Dec 2009 14:35:09 +0100 Subject: Fix crash in QVector::reserve when reserving smaller size on a shared vector This backport part of the commit 480b395bd652a4ac6e3f2 Task-number: QTBUG-6416 --- src/corelib/tools/qvector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 6c78abb..2e88d6b 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -315,7 +315,7 @@ void QVector::detach_helper() { realloc(d->size, d->alloc); } template void QVector::reserve(int asize) -{ if (asize > d->alloc || d->ref != 1) realloc(d->size, asize); d->capacity = 1; } +{ if (asize > d->alloc) realloc(d->size, asize); if (d->ref == 1) d->capacity = 1; } template void QVector::resize(int asize) { realloc(asize, (asize > d->alloc || (!d->capacity && asize < d->size && asize < (d->alloc >> 1))) ? -- cgit v0.12 From 67f99a1901231b987ee1da699a7f52302ecca5fe Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 25 Nov 2009 15:32:59 +0100 Subject: Benchmark: Duplicate the tests on QDirIterator as well. Reviewed-by: Trust Me --- tests/benchmarks/qdir/tst_qdir.cpp | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/tests/benchmarks/qdir/tst_qdir.cpp b/tests/benchmarks/qdir/tst_qdir.cpp index fd558d3..64c6ba1 100644 --- a/tests/benchmarks/qdir/tst_qdir.cpp +++ b/tests/benchmarks/qdir/tst_qdir.cpp @@ -78,6 +78,8 @@ public slots: temp.rmdir(QLatin1String("test_speed")); } private slots: + void baseline() {} + void sizeSpeed() { QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); QBENCHMARK { @@ -88,6 +90,18 @@ private slots: } } } + void sizeSpeedIterator() { + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + QBENCHMARK { + QDirIterator dit(testdir.path(), QDir::Files); + while (dit.hasNext()) { + dit.fileInfo().isDir(); + dit.fileInfo().size(); + dit.next(); + } + } + } + void sizeSpeedWithoutFilter() { QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); QBENCHMARK { @@ -97,6 +111,18 @@ private slots: } } } + void sizeSpeedWithoutFilterIterator() { + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + QBENCHMARK { + QDirIterator dit(testdir.path()); + while (dit.hasNext()) { + dit.fileInfo().isDir(); + dit.fileInfo().size(); + dit.next(); + } + } + } + void sizeSpeedWithoutFileInfoList() { QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); testdir.setSorting(QDir::Unsorted); @@ -108,6 +134,7 @@ private slots: } } } + void iDontWantAnyStat() { QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); testdir.setSorting(QDir::Unsorted); @@ -119,8 +146,16 @@ private slots: } } } + void iDontWantAnyStatIterator() { + QBENCHMARK { + QDirIterator dit(QDir::tempPath() + QLatin1String("/test_speed")); + while (dit.hasNext()) { + dit.next(); + } + } + } - void testLowLevel() { + void sizeSpeedWithoutFilterLowLevel() { #ifdef Q_OS_WIN const wchar_t *dirpath = (wchar_t*)testdir.absolutePath().utf16(); wchar_t appendedPath[MAX_PATH]; -- cgit v0.12 From ba805d5e1a03824c75c4d17131063be1b0fd68a1 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 2 Dec 2009 16:30:03 +0100 Subject: Don't look at the patch-level number when loading plugins. Qt claims that it maintains forwards and backwards binary compatibility within the same Qt minor series. So it should be safe to load a plugin built with Qt 4.6.2 on Qt 4.6.1. Reviewed-by: Bradley T. Hughes --- src/corelib/plugin/qlibrary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 6496876..ea0254b 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -744,7 +744,7 @@ bool QLibraryPrivate::isPlugin(QSettings *settings) pluginState = IsNotAPlugin; // be pessimistic - if ((qt_version > QT_VERSION) || ((QT_VERSION & 0xff0000) > (qt_version & 0xff0000))) { + if ((qt_version & 0x00ff00) > (QT_VERSION & 0x00ff00) || (qt_version & 0xff0000) != (QT_VERSION & 0xff0000)) { if (qt_debug_component()) { qWarning("In %s:\n" " Plugin uses incompatible Qt library (%d.%d.%d) [%s]", -- cgit v0.12 From 0b2eab87ad3bd73a0744469a45c29ca098649c9b Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 26 Nov 2009 17:32:51 +0100 Subject: Improved implicit mouse grabbing on Cocoa. This improves 106121a74bca32a6411b9ca968ee415f8bdfbff1 which was incomplete and didn't work properly for comboboxes (or in general - when a popup window opens due to a mouse press). Reviewed-by: Prasanth --- src/gui/kernel/qcocoapanel_mac.mm | 25 +++++++++++-------- src/gui/kernel/qcocoaview_mac.mm | 15 +++++++----- src/gui/kernel/qcocoawindow_mac.mm | 26 ++++++++++++-------- src/gui/kernel/qt_cocoa_helpers_mac.mm | 45 ++++++++++++++++++++++------------ 4 files changed, 69 insertions(+), 42 deletions(-) diff --git a/src/gui/kernel/qcocoapanel_mac.mm b/src/gui/kernel/qcocoapanel_mac.mm index a26d775..d201653 100644 --- a/src/gui/kernel/qcocoapanel_mac.mm +++ b/src/gui/kernel/qcocoapanel_mac.mm @@ -52,6 +52,7 @@ QT_FORWARD_DECLARE_CLASS(QWidget); QT_BEGIN_NAMESPACE extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm +extern QPointer qt_button_down; //qapplication_mac.cpp QT_END_NAMESPACE QT_USE_NAMESPACE @@ -132,38 +133,41 @@ QT_USE_NAMESPACE QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast(qt_mac_nativeview_for(widget)); Qt::MouseButton mouseButton = cocoaButton2QtButton([event buttonNumber]); + bool handled = false; // sometimes need to redirect mouse events to the popup. QWidget *popup = qAppInstance()->activePopupWidget(); - if (popup && popup != widget) { + if (popup) { switch([event type]) { case NSLeftMouseDown: - qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); + if (!qt_button_down) + qt_button_down = widget; + handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); // Don't call super here. This prevents us from getting the mouseUp event, // which we need to send even if the mouseDown event was not accepted. // (this is standard Qt behavior.) break; case NSRightMouseDown: case NSOtherMouseDown: - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton)) - [super sendEvent:event]; + if (!qt_button_down) + qt_button_down = widget; + handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); break; case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp: - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonRelease, mouseButton)) - [super sendEvent:event]; + handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonRelease, mouseButton); + qt_button_down = 0; break; case NSMouseMoved: - qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, Qt::NoButton); + handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, Qt::NoButton); break; case NSLeftMouseDragged: case NSRightMouseDragged: case NSOtherMouseDragged: [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->view = view; [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->theEvent = event; - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, mouseButton)) - [super sendEvent:event]; + handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, mouseButton); break; default: [super sendEvent:event]; @@ -172,8 +176,9 @@ QT_USE_NAMESPACE } else { [super sendEvent:event]; } - qt_mac_dispatchNCMouseMessage(self, event, [self QT_MANGLE_NAMESPACE(qt_qwidget)], leftButtonIsRightButton); + if (!handled) + qt_mac_dispatchNCMouseMessage(self, event, [self QT_MANGLE_NAMESPACE(qt_qwidget)], leftButtonIsRightButton); [self release]; } diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 3da783f..a4da25f 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -708,9 +708,9 @@ extern "C" { - (void)mouseUp:(NSEvent *)theEvent { - qt_button_down = 0; - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::LeftButton); + + qt_button_down = 0; } - (void)rightMouseDown:(NSEvent *)theEvent @@ -723,9 +723,9 @@ extern "C" { - (void)rightMouseUp:(NSEvent *)theEvent { - qt_button_down = 0; - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::RightButton); + + qt_button_down = 0; } - (void)otherMouseDown:(NSEvent *)theEvent @@ -739,10 +739,10 @@ extern "C" { - (void)otherMouseUp:(NSEvent *)theEvent { - qt_button_down = 0; - Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, mouseButton); + + qt_button_down = 0; } - (void)mouseDragged:(NSEvent *)theEvent @@ -1442,6 +1442,9 @@ Qt::DropAction QDragManager::drag(QDrag *o) pasteboard:pboard source:dndParams.view slideBack:YES]; + // reset the implicit grab widget when drag ends because we will not + // receive the mouse release event when DND is active. + qt_button_down = 0; [dndParams.view release]; [image release]; dragPrivate()->executed_action = Qt::IgnoreAction; diff --git a/src/gui/kernel/qcocoawindow_mac.mm b/src/gui/kernel/qcocoawindow_mac.mm index 263f0ac..ee5952b 100644 --- a/src/gui/kernel/qcocoawindow_mac.mm +++ b/src/gui/kernel/qcocoawindow_mac.mm @@ -52,6 +52,7 @@ QT_FORWARD_DECLARE_CLASS(QWidget); QT_BEGIN_NAMESPACE extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm +extern QPointer qt_button_down; //qapplication_mac.cpp QT_END_NAMESPACE QT_USE_NAMESPACE @@ -146,40 +147,44 @@ QT_USE_NAMESPACE } [self retain]; + + bool handled = false; QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast(qt_mac_nativeview_for(widget)); Qt::MouseButton mouseButton = cocoaButton2QtButton([event buttonNumber]); // sometimes need to redirect mouse events to the popup. QWidget *popup = qAppInstance()->activePopupWidget(); - if (popup && popup != widget) { + if (popup) { switch([event type]) { case NSLeftMouseDown: - qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); + if (!qt_button_down) + qt_button_down = widget; + handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); // Don't call super here. This prevents us from getting the mouseUp event, // which we need to send even if the mouseDown event was not accepted. // (this is standard Qt behavior.) break; case NSRightMouseDown: case NSOtherMouseDown: - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton)) - [super sendEvent:event]; + if (!qt_button_down) + qt_button_down = widget; + handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); break; case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp: - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonRelease, mouseButton)) - [super sendEvent:event]; + handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonRelease, mouseButton); + qt_button_down = 0; break; case NSMouseMoved: - qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, Qt::NoButton); + handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, Qt::NoButton); break; case NSLeftMouseDragged: case NSRightMouseDragged: case NSOtherMouseDragged: [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->view = view; [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->theEvent = event; - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, mouseButton)) - [super sendEvent:event]; + handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, mouseButton); break; default: [super sendEvent:event]; @@ -188,8 +193,9 @@ QT_USE_NAMESPACE } else { [super sendEvent:event]; } - qt_mac_dispatchNCMouseMessage(self, event, [self QT_MANGLE_NAMESPACE(qt_qwidget)], leftButtonIsRightButton); + if (!handled) + qt_mac_dispatchNCMouseMessage(self, event, [self QT_MANGLE_NAMESPACE(qt_qwidget)], leftButtonIsRightButton); [self release]; } diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 2bf1465..ef680a4 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -139,6 +139,7 @@ void QMacWindowFader::performFade() extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); // qapplication.cpp; extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm extern QWidget * mac_mouse_grabber; +extern QPointer qt_button_down; //qapplication_mac.cpp void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds) { @@ -748,7 +749,11 @@ void qt_mac_dispatchNCMouseMessage(void * /* NSWindow* */eventWindow, void * /* NSRect frameRect = [window frame]; if (fakeNCEvents || NSMouseInRect(globalPoint, frameRect, NO)) { NSRect contentRect = [window contentRectForFrameRect:frameRect]; - if (fakeNCEvents || !NSMouseInRect(globalPoint, contentRect, NO)) { + qglobalPoint = QPoint(flipPoint(globalPoint).toPoint()); + QWidget *w = widgetToGetEvent->childAt(widgetToGetEvent->mapFromGlobal(qglobalPoint)); + // check that the mouse pointer is on the non-client area and + // there are not widgets in it. + if (fakeNCEvents || (!NSMouseInRect(globalPoint, contentRect, NO) && !w)) { qglobalPoint = QPoint(flipPoint(globalPoint).toPoint()); qlocalPoint = widgetToGetEvent->mapFromGlobal(qglobalPoint); processThisEvent = true; @@ -759,8 +764,11 @@ void qt_mac_dispatchNCMouseMessage(void * /* NSWindow* */eventWindow, void * /* // This is not an NC area mouse message. if (!processThisEvent) return; + // If the window is frame less, generate fake mouse events instead. (floating QToolBar) - if (fakeNCEvents && (widgetToGetEvent->window()->windowFlags() & Qt::FramelessWindowHint)) + // or if someone already got an explicit or implicit grab + if (mac_mouse_grabber || qt_button_down || + (fakeNCEvents && (widgetToGetEvent->window()->windowFlags() & Qt::FramelessWindowHint))) fakeMouseEvents = true; Qt::MouseButton button; @@ -838,8 +846,15 @@ void qt_mac_dispatchNCMouseMessage(void * /* NSWindow* */eventWindow, void * /* leftButtonIsRightButton = false; } } + QMouseEvent qme(eventType, qlocalPoint, qglobalPoint, button, button, keyMods); qt_sendSpontaneousEvent(widgetToGetEvent, &qme); + + // We don't need to set the implicit grab widget here because we won't + // reach this point if then event type is Press over a Qt widget. + // However we might need to unset it if the event is Release. + if (eventType == QEvent::MouseButtonRelease) + qt_button_down = 0; #endif } @@ -873,15 +888,12 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev // Find the widget that *should* get the event (e.g., maybe it was a pop-up, // they always get the mouse event). QWidget *qwidget = [theView qt_qwidget]; - QWidget *widgetToGetMouse = qwidget; + QWidget *widgetToGetMouse = 0; + NSView *tmpView = 0; QWidget *popup = qAppInstance()->activePopupWidget(); - NSView *tmpView = theView; - if (mac_mouse_grabber && mac_mouse_grabber != widgetToGetMouse) { - widgetToGetMouse = mac_mouse_grabber; - tmpView = qt_mac_nativeview_for(widgetToGetMouse); - } + QPoint qglobalPoint(flipPoint(globalPoint).toPoint()); - if (popup && popup != qwidget->window()) { + if (popup) { widgetToGetMouse = popup; tmpView = qt_mac_nativeview_for(popup); windowPoint = [[tmpView window] convertScreenToBase:globalPoint]; @@ -901,13 +913,15 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev } } else { extern QPointer qt_button_down; //qapplication_mac.cpp - if (!mac_mouse_grabber && qt_button_down) { - // if there is no explicit grabber, and the mouse was grabbed - // implicitely (i.e. a mousebutton was pressed) - widgetToGetMouse = qt_button_down; + QPoint pos; + widgetToGetMouse = QApplicationPrivate::pickMouseReceiver(qwidget, qglobalPoint, + pos, eventType, + button, qt_button_down, 0); + if (widgetToGetMouse) tmpView = qt_mac_nativeview_for(widgetToGetMouse); - } } + if (!widgetToGetMouse) + return false; NSPoint localPoint = [tmpView convertPoint:windowPoint fromView:nil]; QPoint qlocalPoint(localPoint.x, localPoint.y); @@ -953,14 +967,13 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev break; } [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->localPoint = localPoint; - QPoint qglobalPoint(flipPoint(globalPoint).toPoint()); QMouseEvent qme(eventType, qlocalPoint, qglobalPoint, button, buttons, keyMods); qt_sendSpontaneousEvent(widgetToGetMouse, &qme); if (eventType == QEvent::MouseButtonPress && button == Qt::RightButton) { QContextMenuEvent qcme(QContextMenuEvent::Mouse, qlocalPoint, qglobalPoint, keyMods); qt_sendSpontaneousEvent(widgetToGetMouse, &qcme); } - return qme.isAccepted(); + return true; #endif } -- cgit v0.12 From 592390c1a8d8d5664fc34893da586412b6a1bcf3 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 1 Dec 2009 20:05:23 +0100 Subject: Do not enabled Pan gesture by default on Mac. Enabled Pan gesture makes your widget receive mouse release events while doing system gestures like two-finger scroll. Reviewed-by: Richard --- src/gui/widgets/qabstractscrollarea.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 35639b7..3cf4e94 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -294,7 +294,9 @@ void QAbstractScrollAreaPrivate::init() q->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); layoutChildren(); +#ifndef Q_WS_MAC viewport->grabGesture(Qt::PanGesture); +#endif } #ifdef Q_WS_WIN @@ -543,7 +545,9 @@ void QAbstractScrollArea::setViewport(QWidget *widget) d->viewport->setParent(this); d->viewport->setFocusProxy(this); d->viewport->installEventFilter(d->viewportFilter.data()); +#ifndef Q_WS_MAC d->viewport->grabGesture(Qt::PanGesture); +#endif d->layoutChildren(); if (isVisible()) d->viewport->show(); -- cgit v0.12 From 3efae3272151f0abf55af742c2618be2a35455a5 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 2 Dec 2009 11:39:46 +0100 Subject: Do not emulate mouse event out of touch pad events If the touch event comes from a touchpad it doesn't seem necessary to send fake mouse events. At least on the platform that actually supports touchpad events (i.e. Mac) native apps don't do that and the current implementation breaks popup handling - since touch events are only sent by default if two or more fingers touch the touchpad, we send fake MouseButtonPress when second finger is pressed and MouseButtonRelease when the second finger is released - i.e. at the same time when the system send scrollWheel events. This causes the active popup to close when using two-finger scroll gesture. Reviewed-by: Brad --- src/gui/kernel/qwidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index b389054..da3ef92 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -8374,9 +8374,10 @@ bool QWidget::event(QEvent *event) case QEvent::TouchUpdate: case QEvent::TouchEnd: { +#ifndef Q_WS_MAC QTouchEvent *touchEvent = static_cast(event); const QTouchEvent::TouchPoint &touchPoint = touchEvent->touchPoints().first(); - if (touchPoint.isPrimary()) + if (touchPoint.isPrimary() || touchEvent->deviceType() == QTouchEvent::TouchPad) break; // fake a mouse event! @@ -8405,6 +8406,7 @@ bool QWidget::event(QEvent *event) Qt::LeftButton, touchEvent->modifiers()); (void) QApplication::sendEvent(this, &mouseEvent); +#endif // Q_WS_MAC break; } case QEvent::Gesture: -- cgit v0.12 From a778ee7c030b207c0c4e8d46c2bc05da47d8f68d Mon Sep 17 00:00:00 2001 From: Jouni Hiltunen Date: Wed, 2 Dec 2009 20:54:28 +0100 Subject: Add config checks to auto.pro tests\auto\auto.pro does not check for qt3support or opengl. On symbian this generates errors as the build file generation for the tests is skipped but the tests are still added into bld.inf for the autotests. X:\QT\tests\auto\BLD.INF:250: qgl\bld.inf: No such file or directory Added check for qt3support before adding Q3SUBDIRS and opengl check before adding qgl. External-Reviewed-by: samuelnevala Merge-request: 2104 Reviewed-by: Thiago Macieira --- tests/auto/auto.pro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index d5d72a7..92d29ae 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -148,7 +148,6 @@ SUBDIRS += \ qfontmetrics \ qftp \ qgetputenv \ - qgl \ qglobal \ qgraphicseffect \ qgraphicseffectsource \ @@ -458,7 +457,9 @@ SUBDIRS += \ rcc \ windowsmobile -!wince*:SUBDIRS += $$Q3SUBDIRS +contains(QT_CONFIG,opengl):SUBDIRS += qgl + +contains(QT_CONFIG,qt3support):!wince*:SUBDIRS += $$Q3SUBDIRS contains(QT_CONFIG, OdfWriter):SUBDIRS += qzip qtextodfwriter mac: { -- cgit v0.12 From 7f1d1d94160e9ef4da85eb2780ab17af1a482848 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 2 Dec 2009 20:56:46 +0100 Subject: Fixed qmake to run extra compilers in the build dir. Merge-request: 1881 Reviewed-by: Thiago Macieira --- qmake/generators/metamakefile.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 819cdaf..5bd51a6 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -203,7 +203,11 @@ BuildsMetaMakefileGenerator::write(const QString &oldpwd) } else if(build == glue) { ret = build->makefile->writeProjectMakefile(); } else { + // ensure that extra compilers are run in the build dir + QString bakpwd = qmake_getpwd(); + qmake_setpwd(oldpwd); ret = build->makefile->write(); + qmake_setpwd(bakpwd); if (glue && glue->makefile->supportsMergedBuilds()) ret = glue->makefile->mergeBuildProject(build->makefile); } -- cgit v0.12 From c7f9a6890b3f5220d83af64fe26eb328c9626295 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 3 Dec 2009 09:35:21 +0100 Subject: Revert "Fixed qmake to run extra compilers in the build dir." This reverts commit 7f1d1d94160e9ef4da85eb2780ab17af1a482848. --- qmake/generators/metamakefile.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 5bd51a6..819cdaf 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -203,11 +203,7 @@ BuildsMetaMakefileGenerator::write(const QString &oldpwd) } else if(build == glue) { ret = build->makefile->writeProjectMakefile(); } else { - // ensure that extra compilers are run in the build dir - QString bakpwd = qmake_getpwd(); - qmake_setpwd(oldpwd); ret = build->makefile->write(); - qmake_setpwd(bakpwd); if (glue && glue->makefile->supportsMergedBuilds()) ret = glue->makefile->mergeBuildProject(build->makefile); } -- cgit v0.12 From 4feb6d99ff12968e30e1992d2049ff3271467929 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 Dec 2009 09:46:26 +0100 Subject: Fix typo in configure. Reviewed-by: Trust Me --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 0b11bf3..6dc3898 100755 --- a/configure +++ b/configure @@ -3663,7 +3663,7 @@ Qt/X11 only: -no-opengl ......... Do not support OpenGL. + -opengl ...... Enable OpenGL support. With no parameter, this will auto-detect the "best" - OpenGL API to use. If desktop OpenGL is avaliable, it + OpenGL API to use. If desktop OpenGL is available, it will be used. Use desktop, es1, es1cl or es2 for to force the use of the Desktop (OpenGL 1.x or 2.x), OpenGL ES 1.x Common profile, 1.x Common Lite profile -- cgit v0.12 From 70e69384c0dd34064e6e0d636bfc510ac2b967b7 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 3 Dec 2009 09:34:04 +0100 Subject: Cocoa: refactor common code into a shared file QCocoaWindow and QCocoaPanel has many methods that are implemented _exactly_ the same way. Those methods are just copied/pasted between the classes because of inheritance problems. This is error-prone as bugs tends to be fixed inside one of the classes, but easily forgotten in the other class. This patch refactors out this code into a new file that is simply #included from the two classes. We do this fix for a patch release to ease a couple of fixes that is about to be integrated. Reviewed-by: Prasanth Reviewed-by: Denis --- src/gui/kernel/kernel.pri | 3 +- src/gui/kernel/qcocoapanel_mac.mm | 140 +---------------- src/gui/kernel/qcocoapanel_mac_p.h | 2 - src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 182 +++++++++++++++++++++++ src/gui/kernel/qcocoawindow_mac.mm | 137 +---------------- src/gui/kernel/qcocoawindow_mac_p.h | 8 +- 6 files changed, 195 insertions(+), 277 deletions(-) create mode 100644 src/gui/kernel/qcocoasharedwindowmethods_mac_p.h diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index 7d0e5c7..f2bd288 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -206,7 +206,8 @@ embedded { qcocoaapplication_mac_p.h \ qcocoaapplicationdelegate_mac_p.h \ qmacgesturerecognizer_mac_p.h \ - qmultitouch_mac_p.h + qmultitouch_mac_p.h \ + qcocoasharedwindowmethods_mac_p.h OBJECTIVE_SOURCES += \ kernel/qcursor_mac.mm \ diff --git a/src/gui/kernel/qcocoapanel_mac.mm b/src/gui/kernel/qcocoapanel_mac.mm index a26d775..9154284 100644 --- a/src/gui/kernel/qcocoapanel_mac.mm +++ b/src/gui/kernel/qcocoapanel_mac.mm @@ -50,152 +50,16 @@ #include QT_FORWARD_DECLARE_CLASS(QWidget); -QT_BEGIN_NAMESPACE -extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm -QT_END_NAMESPACE QT_USE_NAMESPACE - -@interface NSWindow (QtCoverForHackWithCategory) -+ (Class)frameViewClassForStyleMask:(NSUInteger)styleMask; -@end - - @implementation QT_MANGLE_NAMESPACE(QCocoaPanel) -- (BOOL)canBecomeKeyWindow -{ - QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)]; - - bool isToolTip = (widget->windowType() == Qt::ToolTip); - bool isPopup = (widget->windowType() == Qt::Popup); - return !(isPopup || isToolTip); -} - /*********************************************************************** - BEGIN Copy and Paste between QCocoaWindow and QCocoaPanel + Copy and Paste between QCocoaWindow and QCocoaPanel This is a bit unfortunate, but thanks to the dynamic dispatch we have to duplicate this code or resort to really silly forwarding methods **************************************************************************/ - -/* - The methods keyDown, keyUp, and flagsChanged... These really shouldn't ever - get hit. We automatically say we can be first responder if we are a window. - So, the handling should get handled by the view. This is here more as a - last resort (i.e., this is code that can potentially be removed). - */ - -- (void)toggleToolbarShown:(id)sender -{ - macSendToolbarChangeEvent([self QT_MANGLE_NAMESPACE(qt_qwidget)]); - [super toggleToolbarShown:sender]; -} - -- (void)keyDown:(NSEvent *)theEvent -{ - bool keyOK = qt_dispatchKeyEvent(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]); - if (!keyOK) - [super keyDown:theEvent]; -} - -- (void)keyUp:(NSEvent *)theEvent -{ - bool keyOK = qt_dispatchKeyEvent(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]); - if (!keyOK) - [super keyUp:theEvent]; -} - -- (void)flagsChanged:(NSEvent *)theEvent -{ - qt_dispatchModifiersChanged(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]); - [super flagsChanged:theEvent]; -} - - -- (void)tabletProximity:(NSEvent *)tabletEvent -{ - qt_dispatchTabletProximityEvent(tabletEvent); -} - -- (void)sendEvent:(NSEvent *)event -{ - QWidget *widget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; - - // Cocoa can hold onto the window after we've disavowed its knowledge. So, - // if we get sent an event afterwards just have it go through the super's - // version and don't do any stuff with Qt. - if (!widget) { - [super sendEvent:event]; - return; - } - [self retain]; - QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast(qt_mac_nativeview_for(widget)); - Qt::MouseButton mouseButton = cocoaButton2QtButton([event buttonNumber]); - - // sometimes need to redirect mouse events to the popup. - QWidget *popup = qAppInstance()->activePopupWidget(); - if (popup && popup != widget) { - switch([event type]) - { - case NSLeftMouseDown: - qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); - // Don't call super here. This prevents us from getting the mouseUp event, - // which we need to send even if the mouseDown event was not accepted. - // (this is standard Qt behavior.) - break; - case NSRightMouseDown: - case NSOtherMouseDown: - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton)) - [super sendEvent:event]; - break; - case NSLeftMouseUp: - case NSRightMouseUp: - case NSOtherMouseUp: - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonRelease, mouseButton)) - [super sendEvent:event]; - break; - case NSMouseMoved: - qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, Qt::NoButton); - break; - case NSLeftMouseDragged: - case NSRightMouseDragged: - case NSOtherMouseDragged: - [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->view = view; - [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->theEvent = event; - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, mouseButton)) - [super sendEvent:event]; - break; - default: - [super sendEvent:event]; - break; - } - } else { - [super sendEvent:event]; - } - qt_mac_dispatchNCMouseMessage(self, event, [self QT_MANGLE_NAMESPACE(qt_qwidget)], leftButtonIsRightButton); - - - [self release]; -} - -- (BOOL)makeFirstResponder:(NSResponder *)responder -{ - // For some reason Cocoa wants to flip the first responder - // when Qt doesn't want to, sorry, but "No" :-) - if (responder == nil && qApp->focusWidget()) - return NO; - return [super makeFirstResponder:responder]; -} - -/*********************************************************************** - END Copy and Paste between QCocoaWindow and QCocoaPanel -***********************************************************************/ -+ (Class)frameViewClassForStyleMask:(NSUInteger)styleMask -{ - if (styleMask & QtMacCustomizeWindow) - return [QT_MANGLE_NAMESPACE(QCocoaWindowCustomThemeFrame) class]; - return [super frameViewClassForStyleMask:styleMask]; -} +#include "qcocoasharedwindowmethods_mac_p.h" @end #endif diff --git a/src/gui/kernel/qcocoapanel_mac_p.h b/src/gui/kernel/qcocoapanel_mac_p.h index d95cd93..69dca1e 100644 --- a/src/gui/kernel/qcocoapanel_mac_p.h +++ b/src/gui/kernel/qcocoapanel_mac_p.h @@ -54,12 +54,10 @@ #ifdef QT_MAC_USE_COCOA #import - @interface QT_MANGLE_NAMESPACE(QCocoaPanel) : NSPanel { bool leftButtonIsRightButton; } + (Class)frameViewClassForStyleMask:(NSUInteger)styleMask; - @end #endif diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h new file mode 100644 index 0000000..2d61cae --- /dev/null +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -0,0 +1,182 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/**************************************************************************** + NB: This is not a header file, dispite the file name suffix. This file is + included directly into the source code of qcocoawindow_mac.mm and + qcocoapanel_mac.mm to avoid manually doing copy and paste of the exact + same code needed at both places. This solution makes it more difficult + to e.g fix a bug in qcocoawindow_mac.mm, but forget to do the same in + qcocoapanel_mac.mm. + The reason we need to do copy and paste in the first place, rather than + resolve to method overriding, is that QCocoaPanel needs to inherit from + NSPanel, while QCocoaWindow needs to inherit NSWindow rather than NSPanel). +****************************************************************************/ + +QT_BEGIN_NAMESPACE +extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm +QT_END_NAMESPACE + +- (BOOL)canBecomeKeyWindow +{ + QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)]; + + bool isToolTip = (widget->windowType() == Qt::ToolTip); + bool isPopup = (widget->windowType() == Qt::Popup); + return !(isPopup || isToolTip); +} + +- (void)toggleToolbarShown:(id)sender +{ + macSendToolbarChangeEvent([self QT_MANGLE_NAMESPACE(qt_qwidget)]); + [super toggleToolbarShown:sender]; +} + +/* + The methods keyDown, keyUp, and flagsChanged... These really shouldn't ever + get hit. We automatically say we can be first responder if we are a window. + So, the handling should get handled by the view. This is here more as a + last resort (i.e., this is code that can potentially be removed). + */ +- (void)keyDown:(NSEvent *)theEvent +{ + bool keyOK = qt_dispatchKeyEvent(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]); + if (!keyOK) + [super keyDown:theEvent]; +} + +- (void)keyUp:(NSEvent *)theEvent +{ + bool keyOK = qt_dispatchKeyEvent(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]); + if (!keyOK) + [super keyUp:theEvent]; +} + +- (void)flagsChanged:(NSEvent *)theEvent +{ + qt_dispatchModifiersChanged(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]); + [super flagsChanged:theEvent]; +} + + +- (void)tabletProximity:(NSEvent *)tabletEvent +{ + qt_dispatchTabletProximityEvent(tabletEvent); +} + +- (void)sendEvent:(NSEvent *)event +{ + QWidget *widget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; + + // Cocoa can hold onto the window after we've disavowed its knowledge. So, + // if we get sent an event afterwards just have it go through the super's + // version and don't do any stuff with Qt. + if (!widget) { + [super sendEvent:event]; + return; + } + + [self retain]; + QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast(qt_mac_nativeview_for(widget)); + Qt::MouseButton mouseButton = cocoaButton2QtButton([event buttonNumber]); + + // sometimes need to redirect mouse events to the popup. + QWidget *popup = qAppInstance()->activePopupWidget(); + if (popup && popup != widget) { + switch([event type]) + { + case NSLeftMouseDown: + qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); + // Don't call super here. This prevents us from getting the mouseUp event, + // which we need to send even if the mouseDown event was not accepted. + // (this is standard Qt behavior.) + break; + case NSRightMouseDown: + case NSOtherMouseDown: + if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton)) + [super sendEvent:event]; + break; + case NSLeftMouseUp: + case NSRightMouseUp: + case NSOtherMouseUp: + if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonRelease, mouseButton)) + [super sendEvent:event]; + break; + case NSMouseMoved: + qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, Qt::NoButton); + break; + case NSLeftMouseDragged: + case NSRightMouseDragged: + case NSOtherMouseDragged: + [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->view = view; + [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->theEvent = event; + if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, mouseButton)) + [super sendEvent:event]; + break; + default: + [super sendEvent:event]; + break; + } + } else { + [super sendEvent:event]; + } + qt_mac_dispatchNCMouseMessage(self, event, [self QT_MANGLE_NAMESPACE(qt_qwidget)], leftButtonIsRightButton); + + + [self release]; +} + +- (BOOL)makeFirstResponder:(NSResponder *)responder +{ + // For some reason Cocoa wants to flip the first responder + // when Qt doesn't want to, sorry, but "No" :-) + if (responder == nil && qApp->focusWidget()) + return NO; + return [super makeFirstResponder:responder]; +} + ++ (Class)frameViewClassForStyleMask:(NSUInteger)styleMask +{ + if (styleMask & QtMacCustomizeWindow) + return [QT_MANGLE_NAMESPACE(QCocoaWindowCustomThemeFrame) class]; + return [super frameViewClassForStyleMask:styleMask]; +} + diff --git a/src/gui/kernel/qcocoawindow_mac.mm b/src/gui/kernel/qcocoawindow_mac.mm index 263f0ac..a9aa373 100644 --- a/src/gui/kernel/qcocoawindow_mac.mm +++ b/src/gui/kernel/qcocoawindow_mac.mm @@ -50,15 +50,8 @@ #include QT_FORWARD_DECLARE_CLASS(QWidget); -QT_BEGIN_NAMESPACE -extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm -QT_END_NAMESPACE QT_USE_NAMESPACE -@interface NSWindow (QtCoverForHackWithCategory) -+ (Class)frameViewClassForStyleMask:(NSUInteger)styleMask; -@end - @implementation NSWindow (QT_MANGLE_NAMESPACE(QWidgetIntegration)) - (id)QT_MANGLE_NAMESPACE(qt_initWithQWidget):(QWidget*)widget contentRect:(NSRect)rect styleMask:(NSUInteger)mask; @@ -83,138 +76,12 @@ QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(QCocoaWindow) -- (BOOL)canBecomeKeyWindow -{ - return YES; -} - /*********************************************************************** - BEGIN Copy and Paste between QCocoaWindow and QCocoaPanel + Copy and Paste between QCocoaWindow and QCocoaPanel This is a bit unfortunate, but thanks to the dynamic dispatch we have to duplicate this code or resort to really silly forwarding methods **************************************************************************/ - -/* - The methods keyDown, keyUp, and flagsChanged... These really shouldn't ever - get hit. We automatically say we can be first responder if we are a window. - So, the handling should get handled by the view. This is here more as a - last resort (i.e., this is code that can potentially be removed). - */ - -- (void)toggleToolbarShown:(id)sender -{ - macSendToolbarChangeEvent([self QT_MANGLE_NAMESPACE(qt_qwidget)]); - [super toggleToolbarShown:sender]; -} - -- (void)keyDown:(NSEvent *)theEvent -{ - bool keyOK = qt_dispatchKeyEvent(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]); - if (!keyOK) - [super keyDown:theEvent]; -} - -- (void)keyUp:(NSEvent *)theEvent -{ - bool keyOK = qt_dispatchKeyEvent(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]); - if (!keyOK) - [super keyUp:theEvent]; -} - -- (void)flagsChanged:(NSEvent *)theEvent -{ - qt_dispatchModifiersChanged(theEvent, [self QT_MANGLE_NAMESPACE(qt_qwidget)]); - [super flagsChanged:theEvent]; -} - - -- (void)tabletProximity:(NSEvent *)tabletEvent -{ - qt_dispatchTabletProximityEvent(tabletEvent); -} - -- (void)sendEvent:(NSEvent *)event -{ - QWidget *widget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; - - // Cocoa can hold onto the window after we've disavowed its knowledge. So, - // if we get sent an event afterwards just have it go through the super's - // version and don't do any stuff with Qt. - if (!widget) { - [super sendEvent:event]; - return; - } - - [self retain]; - QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast(qt_mac_nativeview_for(widget)); - Qt::MouseButton mouseButton = cocoaButton2QtButton([event buttonNumber]); - // sometimes need to redirect mouse events to the popup. - QWidget *popup = qAppInstance()->activePopupWidget(); - if (popup && popup != widget) { - switch([event type]) - { - case NSLeftMouseDown: - qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); - // Don't call super here. This prevents us from getting the mouseUp event, - // which we need to send even if the mouseDown event was not accepted. - // (this is standard Qt behavior.) - break; - case NSRightMouseDown: - case NSOtherMouseDown: - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton)) - [super sendEvent:event]; - break; - case NSLeftMouseUp: - case NSRightMouseUp: - case NSOtherMouseUp: - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonRelease, mouseButton)) - [super sendEvent:event]; - break; - case NSMouseMoved: - qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, Qt::NoButton); - break; - case NSLeftMouseDragged: - case NSRightMouseDragged: - case NSOtherMouseDragged: - [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->view = view; - [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->theEvent = event; - if (!qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, mouseButton)) - [super sendEvent:event]; - break; - default: - [super sendEvent:event]; - break; - } - } else { - [super sendEvent:event]; - } - qt_mac_dispatchNCMouseMessage(self, event, [self QT_MANGLE_NAMESPACE(qt_qwidget)], leftButtonIsRightButton); - - - [self release]; -} - - -- (BOOL)makeFirstResponder:(NSResponder *)responder -{ - // For some reason Cocoa wants to flip the first responder - // when Qt doesn't want to, sorry, but "No" :-) - if (responder == nil && qApp->focusWidget()) - return NO; - return [super makeFirstResponder:responder]; -} - -/*********************************************************************** - END Copy and Paste between QCocoaWindow and QCocoaPanel -***********************************************************************/ - -+ (Class)frameViewClassForStyleMask:(NSUInteger)styleMask -{ - if (styleMask & QtMacCustomizeWindow) - return [QT_MANGLE_NAMESPACE(QCocoaWindowCustomThemeFrame) class]; - return [super frameViewClassForStyleMask:styleMask]; -} +#include "qcocoasharedwindowmethods_mac_p.h" @end - #endif diff --git a/src/gui/kernel/qcocoawindow_mac_p.h b/src/gui/kernel/qcocoawindow_mac_p.h index a688d96..91c5d4e 100644 --- a/src/gui/kernel/qcocoawindow_mac_p.h +++ b/src/gui/kernel/qcocoawindow_mac_p.h @@ -50,13 +50,18 @@ // We mean it. // -#include "qmacdefines_mac.h" #ifdef QT_MAC_USE_COCOA +#include "qmacdefines_mac.h" #import enum { QtMacCustomizeWindow = 1 << 21 }; // This will one day be run over by QT_FORWARD_DECLARE_CLASS(QWidget); +QT_FORWARD_DECLARE_CLASS(QStringList); + +@interface NSWindow (QtCoverForHackWithCategory) ++ (Class)frameViewClassForStyleMask:(NSUInteger)styleMask; +@end @interface NSWindow (QT_MANGLE_NAMESPACE(QWidgetIntegration)) - (id)QT_MANGLE_NAMESPACE(qt_initWithQWidget):(QWidget *)widget contentRect:(NSRect)rect styleMask:(NSUInteger)mask; @@ -70,3 +75,4 @@ QT_FORWARD_DECLARE_CLASS(QWidget); + (Class)frameViewClassForStyleMask:(NSUInteger)styleMask; @end #endif + -- cgit v0.12 From 32d8988b54b6adcd4ea4fc44b35dde6d37232f9d Mon Sep 17 00:00:00 2001 From: Iain Date: Wed, 2 Dec 2009 23:27:33 +0100 Subject: Update QtOpenVG DEF file for EABI, add for WINSCW, on Symbian OS Reviewed-by: TrustMe --- src/s60installs/bwins/QtOpenVGu.def | 142 ++++++++++++++++++++++++++++++++++++ src/s60installs/eabi/QtOpenVGu.def | 4 +- 2 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 src/s60installs/bwins/QtOpenVGu.def diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def new file mode 100644 index 0000000..88e724f --- /dev/null +++ b/src/s60installs/bwins/QtOpenVGu.def @@ -0,0 +1,142 @@ +EXPORTS + ?size@QVGPixmapData@@QBE?AVQSize@@XZ @ 1 NONAME ; class QSize QVGPixmapData::size(void) const + ?toVGImage@QVGPixmapData@@UAEKM@Z @ 2 NONAME ; unsigned long QVGPixmapData::toVGImage(float) + ?drawEllipse@QVGPaintEngine@@UAEXABVQRect@@@Z @ 3 NONAME ; void QVGPaintEngine::drawEllipse(class QRect const &) + ?setState@QVGPaintEngine@@UAEXPAVQPainterState@@@Z @ 4 NONAME ; void QVGPaintEngine::setState(class QPainterState *) + ?penChanged@QVGPaintEngine@@UAEXXZ @ 5 NONAME ; void QVGPaintEngine::penChanged(void) + ?defaultClipRegion@QVGPaintEngine@@AAE?AVQRegion@@XZ @ 6 NONAME ; class QRegion QVGPaintEngine::defaultClipRegion(void) + ??0QVGEGLWindowSurfaceVGImage@@QAE@PAVQWindowSurface@@@Z @ 7 NONAME ; QVGEGLWindowSurfaceVGImage::QVGEGLWindowSurfaceVGImage(class QWindowSurface *) + ?paintEngine@QVGPixmapData@@UBEPAVQPaintEngine@@XZ @ 8 NONAME ; class QPaintEngine * QVGPixmapData::paintEngine(void) const + ?drawRoundedRect@QVGPaintEngine@@UAEXABVQRectF@@MMW4SizeMode@Qt@@@Z @ 9 NONAME ; void QVGPaintEngine::drawRoundedRect(class QRectF const &, float, float, enum Qt::SizeMode) + ?qt_vg_image_to_vg_format@@YA?AW4VGImageFormat@@W4Format@QImage@@@Z @ 10 NONAME ; enum VGImageFormat qt_vg_image_to_vg_format(enum QImage::Format) + ?surfaceImage@QVGEGLWindowSurfacePrivate@@UBEKXZ @ 11 NONAME ; unsigned long QVGEGLWindowSurfacePrivate::surfaceImage(void) const + ?state@QVGPaintEngine@@QBEPBVQVGPainterState@@XZ @ 12 NONAME ; class QVGPainterState const * QVGPaintEngine::state(void) const + ??_EQVGEGLWindowSurfaceDirect@@UAE@I@Z @ 13 NONAME ; QVGEGLWindowSurfaceDirect::~QVGEGLWindowSurfaceDirect(unsigned int) + ?updateScissor@QVGPaintEngine@@AAEXXZ @ 14 NONAME ; void QVGPaintEngine::updateScissor(void) + ??_EQVGCompositionHelper@@UAE@I@Z @ 15 NONAME ; QVGCompositionHelper::~QVGCompositionHelper(unsigned int) + ?fill@QVGPixmapData@@UAEXABVQColor@@@Z @ 16 NONAME ; void QVGPixmapData::fill(class QColor const &) + ?toImage@QVGPixmapData@@UBE?AVQImage@@XZ @ 17 NONAME ; class QImage QVGPixmapData::toImage(void) const + ?renderHintsChanged@QVGPaintEngine@@UAEXXZ @ 18 NONAME ; void QVGPaintEngine::renderHintsChanged(void) + ?clearRect@QVGPaintEngine@@AAE_NABVQRectF@@ABVQColor@@@Z @ 19 NONAME ; bool QVGPaintEngine::clearRect(class QRectF const &, class QColor const &) + ??1QVGEGLWindowSurfaceVGImage@@UAE@XZ @ 20 NONAME ; QVGEGLWindowSurfaceVGImage::~QVGEGLWindowSurfaceVGImage(void) + ?state@QVGPaintEngine@@QAEPAVQVGPainterState@@XZ @ 21 NONAME ; class QVGPainterState * QVGPaintEngine::state(void) + ??0QVGPaintEngine@@IAE@AAVQVGPaintEnginePrivate@@@Z @ 22 NONAME ; QVGPaintEngine::QVGPaintEngine(class QVGPaintEnginePrivate &) + ?blitWindow@QVGCompositionHelper@@QAEXKABVQSize@@ABVQRect@@ABVQPoint@@H@Z @ 23 NONAME ; void QVGCompositionHelper::blitWindow(unsigned long, class QSize const &, class QRect const &, class QPoint const &, int) + ?ensureContext@QVGEGLWindowSurfaceVGImage@@UAEPAVQEglContext@@PAVQWidget@@@Z @ 24 NONAME ; class QEglContext * QVGEGLWindowSurfaceVGImage::ensureContext(class QWidget *) + ??0QVGCompositionHelper@@QAE@XZ @ 25 NONAME ; QVGCompositionHelper::QVGCompositionHelper(void) + ?sourceFormat@QVGPixmapData@@IBE?AW4Format@QImage@@XZ @ 26 NONAME ; enum QImage::Format QVGPixmapData::sourceFormat(void) const + ?beginNativePainting@QVGPaintEngine@@UAEXXZ @ 27 NONAME ; void QVGPaintEngine::beginNativePainting(void) + ?clipEnabledChanged@QVGPaintEngine@@UAEXXZ @ 28 NONAME ; void QVGPaintEngine::clipEnabledChanged(void) + ?metric@QVGPixmapData@@MBEHW4PaintDeviceMetric@QPaintDevice@@@Z @ 29 NONAME ; int QVGPixmapData::metric(enum QPaintDevice::PaintDeviceMetric) const + ?draw@QVGPaintEngine@@UAEXABVQVectorPath@@@Z @ 30 NONAME ; void QVGPaintEngine::draw(class QVectorPath const &) + ?drawRects@QVGPaintEngine@@UAEXPBVQRect@@H@Z @ 31 NONAME ; void QVGPaintEngine::drawRects(class QRect const *, int) + ??0QVGPixmapData@@QAE@W4PixelType@QPixmapData@@@Z @ 32 NONAME ; QVGPixmapData::QVGPixmapData(enum QPixmapData::PixelType) + ??0QVGWindowSurface@@QAE@PAVQWidget@@PAVQVGEGLWindowSurfacePrivate@@@Z @ 33 NONAME ; QVGWindowSurface::QVGWindowSurface(class QWidget *, class QVGEGLWindowSurfacePrivate *) + ?fillBackground@QVGCompositionHelper@@QAEXABVQRegion@@ABVQBrush@@@Z @ 34 NONAME ; void QVGCompositionHelper::fillBackground(class QRegion const &, class QBrush const &) + ?drawLines@QVGPaintEngine@@UAEXPBVQLine@@H@Z @ 35 NONAME ; void QVGPaintEngine::drawLines(class QLine const *, int) + ?ensureContext@QVGEGLWindowSurfaceDirect@@UAEPAVQEglContext@@PAVQWidget@@@Z @ 36 NONAME ; class QEglContext * QVGEGLWindowSurfaceDirect::ensureContext(class QWidget *) + ??0QVGPaintEngine@@QAE@XZ @ 37 NONAME ; QVGPaintEngine::QVGPaintEngine(void) + ?cleanup@QVGPixmapData@@IAEXXZ @ 38 NONAME ; void QVGPixmapData::cleanup(void) + ?drawPixmap@QVGPaintEngine@@UAEXABVQPointF@@ABVQPixmap@@@Z @ 39 NONAME ; void QVGPaintEngine::drawPixmap(class QPointF const &, class QPixmap const &) + ?drawImage@QVGPaintEngine@@UAEXABVQRectF@@ABVQImage@@0V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 40 NONAME ; void QVGPaintEngine::drawImage(class QRectF const &, class QImage const &, class QRectF const &, class QFlags) + ?drawTiledPixmap@QVGPaintEngine@@UAEXABVQRectF@@ABVQPixmap@@ABVQPointF@@@Z @ 41 NONAME ; void QVGPaintEngine::drawTiledPixmap(class QRectF const &, class QPixmap const &, class QPointF const &) + ?drawEllipse@QVGPaintEngine@@UAEXABVQRectF@@@Z @ 42 NONAME ; void QVGPaintEngine::drawEllipse(class QRectF const &) + ?endCompositing@QVGCompositionHelper@@QAEXXZ @ 43 NONAME ; void QVGCompositionHelper::endCompositing(void) + ??_EQVGEGLWindowSurfaceVGImage@@UAE@I@Z @ 44 NONAME ; QVGEGLWindowSurfaceVGImage::~QVGEGLWindowSurfaceVGImage(unsigned int) + ?begin@QVGPaintEngine@@UAE_NPAVQPaintDevice@@@Z @ 45 NONAME ; bool QVGPaintEngine::begin(class QPaintDevice *) + ?fillRect@QVGPaintEngine@@UAEXABVQRectF@@ABVQBrush@@@Z @ 46 NONAME ; void QVGPaintEngine::fillRect(class QRectF const &, class QBrush const &) + ?paintEngine@QVGWindowSurface@@UBEPAVQPaintEngine@@XZ @ 47 NONAME ; class QPaintEngine * QVGWindowSurface::paintEngine(void) const + ??0QVGPainterState@@QAE@XZ @ 48 NONAME ; QVGPainterState::QVGPainterState(void) + ?d_func@QVGPaintEngine@@ABEPBVQVGPaintEnginePrivate@@XZ @ 49 NONAME ; class QVGPaintEnginePrivate const * QVGPaintEngine::d_func(void) const + ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@@Z @ 50 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *) + ?clip@QVGPaintEngine@@UAEXABVQRegion@@W4ClipOperation@Qt@@@Z @ 51 NONAME ; void QVGPaintEngine::clip(class QRegion const &, enum Qt::ClipOperation) + ?endNativePainting@QVGPaintEngine@@UAEXXZ @ 52 NONAME ; void QVGPaintEngine::endNativePainting(void) + ?brushChanged@QVGPaintEngine@@UAEXXZ @ 53 NONAME ; void QVGPaintEngine::brushChanged(void) + ?setGeometry@QVGWindowSurface@@UAEXABVQRect@@@Z @ 54 NONAME ; void QVGWindowSurface::setGeometry(class QRect const &) + ?createCompatiblePixmapData@QVGPixmapData@@UBEPAVQPixmapData@@XZ @ 55 NONAME ; class QPixmapData * QVGPixmapData::createCompatiblePixmapData(void) const + ?endPaint@QVGWindowSurface@@UAEXABVQRegion@@@Z @ 56 NONAME ; void QVGWindowSurface::endPaint(class QRegion const &) + ?resize@QVGPixmapData@@UAEXHH@Z @ 57 NONAME ; void QVGPixmapData::resize(int, int) + ?mainSurface@QVGEGLWindowSurfaceVGImage@@IBEHXZ @ 58 NONAME ; int QVGEGLWindowSurfaceVGImage::mainSurface(void) const + ??0QVGEGLWindowSurfaceDirect@@QAE@PAVQWindowSurface@@@Z @ 59 NONAME ; QVGEGLWindowSurfaceDirect::QVGEGLWindowSurfaceDirect(class QWindowSurface *) + ?clip@QVGPaintEngine@@UAEXABVQRect@@W4ClipOperation@Qt@@@Z @ 60 NONAME ; void QVGPaintEngine::clip(class QRect const &, enum Qt::ClipOperation) + ?fillRegion@QVGPaintEngine@@QAEXABVQRegion@@ABVQColor@@ABVQSize@@@Z @ 61 NONAME ; void QVGPaintEngine::fillRegion(class QRegion const &, class QColor const &, class QSize const &) + ?surfaceSize@QVGEGLWindowSurfaceDirect@@UBE?AVQSize@@XZ @ 62 NONAME ; class QSize QVGEGLWindowSurfaceDirect::surfaceSize(void) const + ?drawPoints@QVGPaintEngine@@UAEXPBVQPointF@@H@Z @ 63 NONAME ; void QVGPaintEngine::drawPoints(class QPointF const *, int) + ?paintEngine@QVGEGLWindowSurfacePrivate@@QAEPAVQVGPaintEngine@@XZ @ 64 NONAME ; class QVGPaintEngine * QVGEGLWindowSurfacePrivate::paintEngine(void) + ?stroke@QVGPaintEngine@@UAEXABVQVectorPath@@ABVQPen@@@Z @ 65 NONAME ; void QVGPaintEngine::stroke(class QVectorPath const &, class QPen const &) + ??0QVGPainterState@@QAE@AAV0@@Z @ 66 NONAME ; QVGPainterState::QVGPainterState(class QVGPainterState &) + ?startCompositing@QVGCompositionHelper@@QAEXABVQSize@@@Z @ 67 NONAME ; void QVGCompositionHelper::startCompositing(class QSize const &) + ??1QVGEGLWindowSurfacePrivate@@UAE@XZ @ 68 NONAME ; QVGEGLWindowSurfacePrivate::~QVGEGLWindowSurfacePrivate(void) + ?qt_vg_destroy_paint_engine@@YAXPAVQVGPaintEngine@@@Z @ 69 NONAME ; void qt_vg_destroy_paint_engine(class QVGPaintEngine *) + ?compositionModeChanged@QVGPaintEngine@@UAEXXZ @ 70 NONAME ; void QVGPaintEngine::compositionModeChanged(void) + ?type@QVGPaintEngine@@UBE?AW4Type@QPaintEngine@@XZ @ 71 NONAME ; enum QPaintEngine::Type QVGPaintEngine::type(void) const + ?fillRect@QVGPaintEngine@@UAEXABVQRectF@@ABVQColor@@@Z @ 72 NONAME ; void QVGPaintEngine::fillRect(class QRectF const &, class QColor const &) + ??0QVGEGLWindowSurfacePrivate@@QAE@PAVQWindowSurface@@@Z @ 73 NONAME ; QVGEGLWindowSurfacePrivate::QVGEGLWindowSurfacePrivate(class QWindowSurface *) + ?drawImage@QVGPaintEngine@@UAEXABVQPointF@@ABVQImage@@@Z @ 74 NONAME ; void QVGPaintEngine::drawImage(class QPointF const &, class QImage const &) + ?flush@QVGWindowSurface@@UAEXPAVQWidget@@ABVQRegion@@ABVQPoint@@@Z @ 75 NONAME ; void QVGWindowSurface::flush(class QWidget *, class QRegion const &, class QPoint const &) + ?isValid@QVGPixmapData@@QBE_NXZ @ 76 NONAME ; bool QVGPixmapData::isValid(void) const + ?beginPaint@QVGEGLWindowSurfaceVGImage@@UAEXPAVQWidget@@@Z @ 77 NONAME ; void QVGEGLWindowSurfaceVGImage::beginPaint(class QWidget *) + ?createState@QVGPaintEngine@@UBEPAVQPainterState@@PAV2@@Z @ 78 NONAME ; class QPainterState * QVGPaintEngine::createState(class QPainterState *) const + ?buffer@QVGPixmapData@@UAEPAVQImage@@XZ @ 79 NONAME ; class QImage * QVGPixmapData::buffer(void) + ?qt_vg_destroy_context@@YAXPAVQEglContext@@@Z @ 80 NONAME ; void qt_vg_destroy_context(class QEglContext *) + ?clip@QVGPaintEngine@@UAEXABVQVectorPath@@W4ClipOperation@Qt@@@Z @ 81 NONAME ; void QVGPaintEngine::clip(class QVectorPath const &, enum Qt::ClipOperation) + ?drawPolygon@QVGPaintEngine@@UAEXPBVQPoint@@HW4PolygonDrawMode@QPaintEngine@@@Z @ 82 NONAME ; void QVGPaintEngine::drawPolygon(class QPoint const *, int, enum QPaintEngine::PolygonDrawMode) + ?fromImage@QVGPixmapData@@UAEXABVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 83 NONAME ; void QVGPixmapData::fromImage(class QImage const &, class QFlags) + ??1QVGPainterState@@UAE@XZ @ 84 NONAME ; QVGPainterState::~QVGPainterState(void) + ??1QVGPaintEngine@@UAE@XZ @ 85 NONAME ; QVGPaintEngine::~QVGPaintEngine(void) + ?hasAlphaChannel@QVGPixmapData@@UBE_NXZ @ 86 NONAME ; bool QVGPixmapData::hasAlphaChannel(void) const + ?endPaint@QVGEGLWindowSurfaceVGImage@@UAEXPAVQWidget@@ABVQRegion@@PAVQImage@@@Z @ 87 NONAME ; void QVGEGLWindowSurfaceVGImage::endPaint(class QWidget *, class QRegion const &, class QImage *) + ?beginPaint@QVGEGLWindowSurfaceDirect@@UAEXPAVQWidget@@@Z @ 88 NONAME ; void QVGEGLWindowSurfaceDirect::beginPaint(class QWidget *) + ?qt_vg_config_to_image_format@@YA?AW4Format@QImage@@PAVQEglContext@@@Z @ 89 NONAME ; enum QImage::Format qt_vg_config_to_image_format(class QEglContext *) + ?qt_vg_config_to_vg_format@@YA?AW4VGImageFormat@@PAVQEglContext@@@Z @ 90 NONAME ; enum VGImageFormat qt_vg_config_to_vg_format(class QEglContext *) + ?setScissor@QVGCompositionHelper@@QAEXABVQRegion@@@Z @ 91 NONAME ; void QVGCompositionHelper::setScissor(class QRegion const &) + ?drawPath@QVGPaintEngine@@UAEXABVQPainterPath@@@Z @ 92 NONAME ; void QVGPaintEngine::drawPath(class QPainterPath const &) + ?drawLines@QVGPaintEngine@@UAEXPBVQLineF@@H@Z @ 93 NONAME ; void QVGPaintEngine::drawLines(class QLineF const *, int) + ?toNativeType@QVGPixmapData@@UAEPAXW4NativeType@QPixmapData@@@Z @ 94 NONAME ; void * QVGPixmapData::toNativeType(enum QPixmapData::NativeType) + ??1QVGWindowSurface@@UAE@XZ @ 95 NONAME ; QVGWindowSurface::~QVGWindowSurface(void) + ?metric@QVGWindowSurface@@MBEHW4PaintDeviceMetric@QPaintDevice@@@Z @ 96 NONAME ; int QVGWindowSurface::metric(enum QPaintDevice::PaintDeviceMetric) const + ??1QVGPixmapData@@UAE@XZ @ 97 NONAME ; QVGPixmapData::~QVGPixmapData(void) + ??1QVGEGLWindowSurfaceDirect@@UAE@XZ @ 98 NONAME ; QVGEGLWindowSurfaceDirect::~QVGEGLWindowSurfaceDirect(void) + ??_EQVGPixmapData@@UAE@I@Z @ 99 NONAME ; QVGPixmapData::~QVGPixmapData(unsigned int) + ?restoreState@QVGPaintEngine@@AAEXV?$QFlags@W4DirtyFlag@QPaintEngine@@@@@Z @ 100 NONAME ; void QVGPaintEngine::restoreState(class QFlags) + ??1QVGCompositionHelper@@UAE@XZ @ 101 NONAME ; QVGCompositionHelper::~QVGCompositionHelper(void) + ??0QVGWindowSurface@@QAE@PAVQWidget@@@Z @ 102 NONAME ; QVGWindowSurface::QVGWindowSurface(class QWidget *) + ?isDefaultClipRegion@QVGPaintEngine@@AAE_NABVQRegion@@@Z @ 103 NONAME ; bool QVGPaintEngine::isDefaultClipRegion(class QRegion const &) + ?transformChanged@QVGPaintEngine@@UAEXXZ @ 104 NONAME ; void QVGPaintEngine::transformChanged(void) + ?fromNativeType@QVGPixmapData@@UAEXPAXW4NativeType@QPixmapData@@@Z @ 105 NONAME ; void QVGPixmapData::fromNativeType(void *, enum QPixmapData::NativeType) + ?setAlphaChannel@QVGPixmapData@@UAEXABVQPixmap@@@Z @ 106 NONAME ; void QVGPixmapData::setAlphaChannel(class QPixmap const &) + ??_EQVGWindowSurface@@UAE@I@Z @ 107 NONAME ; QVGWindowSurface::~QVGWindowSurface(unsigned int) + ?qPixmapToVGImage@@YAKABVQPixmap@@@Z @ 108 NONAME ; unsigned long qPixmapToVGImage(class QPixmap const &) + ?opacityChanged@QVGPaintEngine@@UAEXXZ @ 109 NONAME ; void QVGPaintEngine::opacityChanged(void) + ?surfaceSize@QVGEGLWindowSurfaceVGImage@@UBE?AVQSize@@XZ @ 110 NONAME ; class QSize QVGEGLWindowSurfaceVGImage::surfaceSize(void) const + ?paintDevice@QVGWindowSurface@@UAEPAVQPaintDevice@@XZ @ 111 NONAME ; class QPaintDevice * QVGWindowSurface::paintDevice(void) + ?qt_vg_create_paint_engine@@YAPAVQVGPaintEngine@@XZ @ 112 NONAME ; class QVGPaintEngine * qt_vg_create_paint_engine(void) + ?drawPixmap@QVGPaintEngine@@UAEXABVQRectF@@ABVQPixmap@@0@Z @ 113 NONAME ; void QVGPaintEngine::drawPixmap(class QRectF const &, class QPixmap const &, class QRectF const &) + ?beginPaint@QVGWindowSurface@@UAEXABVQRegion@@@Z @ 114 NONAME ; void QVGWindowSurface::beginPaint(class QRegion const &) + ??_EQVGEGLWindowSurfacePrivate@@UAE@I@Z @ 115 NONAME ; QVGEGLWindowSurfacePrivate::~QVGEGLWindowSurfacePrivate(unsigned int) + ?endPaint@QVGEGLWindowSurfaceDirect@@UAEXPAVQWidget@@ABVQRegion@@PAVQImage@@@Z @ 116 NONAME ; void QVGEGLWindowSurfaceDirect::endPaint(class QWidget *, class QRegion const &, class QImage *) + ?scroll@QVGWindowSurface@@UAE_NABVQRegion@@HH@Z @ 117 NONAME ; bool QVGWindowSurface::scroll(class QRegion const &, int, int) + ?surfaceImage@QVGEGLWindowSurfaceVGImage@@UBEKXZ @ 118 NONAME ; unsigned long QVGEGLWindowSurfaceVGImage::surfaceImage(void) const + ?isDefaultClipRect@QVGPaintEngine@@AAE_NABVQRect@@@Z @ 119 NONAME ; bool QVGPaintEngine::isDefaultClipRect(class QRect const &) + ?windowSurfaceSize@QVGEGLWindowSurfacePrivate@@IBE?AVQSize@@PAVQWidget@@@Z @ 120 NONAME ; class QSize QVGEGLWindowSurfacePrivate::windowSurfaceSize(class QWidget *) const + ?pixmapFilter@QVGPaintEngine@@UAEPAVQPixmapFilter@@HPBV2@@Z @ 121 NONAME ; class QPixmapFilter * QVGPaintEngine::pixmapFilter(int, class QPixmapFilter const *) + ?destroyPaintEngine@QVGEGLWindowSurfacePrivate@@IAEXXZ @ 122 NONAME ; void QVGEGLWindowSurfacePrivate::destroyPaintEngine(void) + ?qt_vg_shared_surface@@YAHXZ @ 123 NONAME ; int qt_vg_shared_surface(void) + ?drawCursorPixmap@QVGCompositionHelper@@QAEXABVQPixmap@@ABVQPoint@@@Z @ 124 NONAME ; void QVGCompositionHelper::drawCursorPixmap(class QPixmap const &, class QPoint const &) + ?drawPixmaps@QVGPaintEngine@@UAEXPBUData@QDrawPixmaps@@HABVQPixmap@@V?$QFlags@W4DrawingHint@QDrawPixmaps@@@@@Z @ 125 NONAME ; void QVGPaintEngine::drawPixmaps(struct QDrawPixmaps::Data const *, int, class QPixmap const &, class QFlags) + ?drawPolygon@QVGPaintEngine@@UAEXPBVQPointF@@HW4PolygonDrawMode@QPaintEngine@@@Z @ 126 NONAME ; void QVGPaintEngine::drawPolygon(class QPointF const *, int, enum QPaintEngine::PolygonDrawMode) + ?toVGImage@QVGPixmapData@@UAEKXZ @ 127 NONAME ; unsigned long QVGPixmapData::toVGImage(void) + ?end@QVGPaintEngine@@UAE_NXZ @ 128 NONAME ; bool QVGPaintEngine::end(void) + ??_EQVGPainterState@@UAE@I@Z @ 129 NONAME ; QVGPainterState::~QVGPainterState(unsigned int) + ?drawRects@QVGPaintEngine@@UAEXPBVQRectF@@H@Z @ 130 NONAME ; void QVGPaintEngine::drawRects(class QRectF const *, int) + ?d_func@QVGPaintEngine@@AAEPAVQVGPaintEnginePrivate@@XZ @ 131 NONAME ; class QVGPaintEnginePrivate * QVGPaintEngine::d_func(void) + ?brushOriginChanged@QVGPaintEngine@@UAEXXZ @ 132 NONAME ; void QVGPaintEngine::brushOriginChanged(void) + ?drawTextItem@QVGPaintEngine@@UAEXABVQPointF@@ABVQTextItem@@@Z @ 133 NONAME ; void QVGPaintEngine::drawTextItem(class QPointF const &, class QTextItem const &) + ?clearScissor@QVGCompositionHelper@@QAEXXZ @ 134 NONAME ; void QVGCompositionHelper::clearScissor(void) + ?fill@QVGPaintEngine@@UAEXABVQVectorPath@@ABVQBrush@@@Z @ 135 NONAME ; void QVGPaintEngine::fill(class QVectorPath const &, class QBrush const &) + ?forceToImage@QVGPixmapData@@IAEXXZ @ 136 NONAME ; void QVGPixmapData::forceToImage(void) + ?drawPoints@QVGPaintEngine@@UAEXPBVQPoint@@H@Z @ 137 NONAME ; void QVGPaintEngine::drawPoints(class QPoint const *, int) + ??_EQVGPaintEngine@@UAE@I@Z @ 138 NONAME ; QVGPaintEngine::~QVGPaintEngine(unsigned int) + ?clip@QVGPaintEngine@@UAEXABVQPainterPath@@W4ClipOperation@Qt@@@Z @ 139 NONAME ; void QVGPaintEngine::clip(class QPainterPath const &, enum Qt::ClipOperation) + ?vgPrivate@QVGPaintEngine@@QAEPAVQVGPaintEnginePrivate@@XZ @ 140 NONAME ; class QVGPaintEnginePrivate * QVGPaintEngine::vgPrivate(void) + diff --git a/src/s60installs/eabi/QtOpenVGu.def b/src/s60installs/eabi/QtOpenVGu.def index 776fc4b..8458983 100644 --- a/src/s60installs/eabi/QtOpenVGu.def +++ b/src/s60installs/eabi/QtOpenVGu.def @@ -99,7 +99,7 @@ EXPORTS _ZN16QVGWindowSurfaceD0Ev @ 98 NONAME _ZN16QVGWindowSurfaceD1Ev @ 99 NONAME _ZN16QVGWindowSurfaceD2Ev @ 100 NONAME - _ZN20QVGCompositionHelper10blitWindowEP26QVGEGLWindowSurfacePrivateRK5QRectRK6QPointi @ 101 NONAME + _ZN20QVGCompositionHelper10blitWindowEP26QVGEGLWindowSurfacePrivateRK5QRectRK6QPointi @ 101 NONAME ABSENT _ZN20QVGCompositionHelper10setScissorERK7QRegion @ 102 NONAME _ZN20QVGCompositionHelper12clearScissorEv @ 103 NONAME _ZN20QVGCompositionHelper14endCompositingEv @ 104 NONAME @@ -167,4 +167,6 @@ EXPORTS _ZThn8_N16QVGWindowSurfaceD1Ev @ 166 NONAME _ZThn8_NK16QVGWindowSurface11paintEngineEv @ 167 NONAME _ZThn8_NK16QVGWindowSurface6metricEN12QPaintDevice17PaintDeviceMetricE @ 168 NONAME + _ZN14QVGPaintEngine10fillRegionERK7QRegionRK6QColorRK5QSize @ 169 NONAME + _ZN20QVGCompositionHelper10blitWindowEmRK5QSizeRK5QRectRK6QPointi @ 170 NONAME -- cgit v0.12 From 689ae0161a1d6a8ae7d815cd6c5b51afbf420550 Mon Sep 17 00:00:00 2001 From: Iain Date: Wed, 2 Dec 2009 23:28:54 +0100 Subject: Assign Symbian UID to QtOpenVg module Reviewed-by: TrustMe --- src/openvg/openvg.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro index bf224b4..8927c4c 100644 --- a/src/openvg/openvg.pro +++ b/src/openvg/openvg.pro @@ -34,6 +34,7 @@ contains(QT_CONFIG, egl) { include(../qbase.pri) unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui +symbian:TARGET.UID3 = 0x2001E62F !isEmpty(QMAKE_INCDIR_OPENVG): INCLUDEPATH += $$QMAKE_INCDIR_OPENVG !isEmpty(QMAKE_LIBDIR_OPENVG): LIBS_PRIVATE += -L$$QMAKE_LIBDIR_OPENVG -- cgit v0.12 From 7b082ee8f08e08784343510bc9a6c14fcc84876e Mon Sep 17 00:00:00 2001 From: Iain Date: Wed, 2 Dec 2009 23:30:26 +0100 Subject: Update include path for Symbian^3 In Symbian^3, public and platform headers have been split. Since we're using a platform header, we need to include the new header file on Symbian versions where the new header structure is in use Reviewed-by: TrustMe --- src/gui/text/qfontdatabase_s60.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 808dca6..bf8af92 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -51,6 +51,9 @@ #include #if defined(QT_NO_FREETYPE) #include +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include // COpenFontRasterizer has moved to a new header file +#endif // SYMBIAN_ENABLE_SPLIT_HEADERS #endif QT_BEGIN_NAMESPACE -- cgit v0.12 From 831e286f811c0e0238f3dd061ae41782f8637a16 Mon Sep 17 00:00:00 2001 From: Iain Date: Thu, 3 Dec 2009 09:42:21 +0100 Subject: Updates to QtGui DEF files for WINSCW and EABI Changes to private/internal symbols only Reviewed-by: TrustMe --- src/s60installs/bwins/QtGuiu.def | 25 +++++++++++++++---------- src/s60installs/eabi/QtGuiu.def | 18 +++++++++++------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 166b6fe..60df1f5 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -271,7 +271,7 @@ EXPORTS ??0QImageIOHandler@@IAE@AAVQImageIOHandlerPrivate@@@Z @ 270 NONAME ; QImageIOHandler::QImageIOHandler(class QImageIOHandlerPrivate &) ??0QImageIOHandler@@QAE@XZ @ 271 NONAME ; QImageIOHandler::QImageIOHandler(void) ??0QImageIOPlugin@@QAE@PAVQObject@@@Z @ 272 NONAME ; QImageIOPlugin::QImageIOPlugin(class QObject *) - ??0QImagePixmapCleanupHooks@@QAE@XZ @ 273 NONAME ; QImagePixmapCleanupHooks::QImagePixmapCleanupHooks(void) + ??0QImagePixmapCleanupHooks@@QAE@XZ @ 273 NONAME ABSENT ; QImagePixmapCleanupHooks::QImagePixmapCleanupHooks(void) ??0QImageReader@@QAE@ABVQString@@ABVQByteArray@@@Z @ 274 NONAME ; QImageReader::QImageReader(class QString const &, class QByteArray const &) ??0QImageReader@@QAE@PAVQIODevice@@ABVQByteArray@@@Z @ 275 NONAME ; QImageReader::QImageReader(class QIODevice *, class QByteArray const &) ??0QImageReader@@QAE@XZ @ 276 NONAME ; QImageReader::QImageReader(void) @@ -2021,7 +2021,7 @@ EXPORTS ?addButton@QMessageBox@@QAEPAVQPushButton@@ABVQString@@W4ButtonRole@1@@Z @ 2020 NONAME ; class QPushButton * QMessageBox::addButton(class QString const &, enum QMessageBox::ButtonRole) ?addButton@QMessageBox@@QAEPAVQPushButton@@W4StandardButton@1@@Z @ 2021 NONAME ; class QPushButton * QMessageBox::addButton(enum QMessageBox::StandardButton) ?addButton@QMessageBox@@QAEXPAVQAbstractButton@@W4ButtonRole@1@@Z @ 2022 NONAME ; void QMessageBox::addButton(class QAbstractButton *, enum QMessageBox::ButtonRole) - ?addCacheData@QVectorPath@@QAEPAUCacheEntry@1@PAVQPaintEngineEx@@PAXP6AX1@Z@Z @ 2023 NONAME ; struct QVectorPath::CacheEntry * QVectorPath::addCacheData(class QPaintEngineEx *, void *, void (*)(void *)) + ?addCacheData@QVectorPath@@QAEPAUCacheEntry@1@PAVQPaintEngineEx@@PAXP6AX1@Z@Z @ 2023 NONAME ABSENT ; struct QVectorPath::CacheEntry * QVectorPath::addCacheData(class QPaintEngineEx *, void *, void (*)(void *)) ?addChild@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@@Z @ 2024 NONAME ; void QGraphicsItemPrivate::addChild(class QGraphicsItem *) ?addChild@QTreeWidgetItem@@QAEXPAV1@@Z @ 2025 NONAME ; void QTreeWidgetItem::addChild(class QTreeWidgetItem *) ?addChildLayout@QLayout@@IAEXPAV1@@Z @ 2026 NONAME ; void QLayout::addChildLayout(class QLayout *) @@ -3724,7 +3724,7 @@ EXPORTS ?directory@QFileDialog@@QBE?AVQDir@@XZ @ 3723 NONAME ; class QDir QFileDialog::directory(void) const ?directoryEntered@QFileDialog@@IAEXABVQString@@@Z @ 3724 NONAME ; void QFileDialog::directoryEntered(class QString const &) ?dirtyRegionOffset@QAbstractItemView@@IBE?AVQPoint@@XZ @ 3725 NONAME ; class QPoint QAbstractItemView::dirtyRegionOffset(void) const - ?discardUpdateRequest@QGraphicsItemPrivate@@QBE_N_N000@Z @ 3726 NONAME ; bool QGraphicsItemPrivate::discardUpdateRequest(bool, bool, bool, bool) const + ?discardUpdateRequest@QGraphicsItemPrivate@@QBE_N_N000@Z @ 3726 NONAME ABSENT ; bool QGraphicsItemPrivate::discardUpdateRequest(bool, bool, bool, bool) const ?disconnectFromModel@QProxyModel@@IBEXPBVQAbstractItemModel@@@Z @ 3727 NONAME ; void QProxyModel::disconnectFromModel(class QAbstractItemModel const *) const ?dispatchEnterLeave@QApplicationPrivate@@SAXPAVQWidget@@0@Z @ 3728 NONAME ; void QApplicationPrivate::dispatchEnterLeave(class QWidget *, class QWidget *) ?display@QLCDNumber@@QAEXABVQString@@@Z @ 3729 NONAME ; void QLCDNumber::display(class QString const &) @@ -5522,8 +5522,8 @@ EXPORTS ?invalidateBuffer@QWidgetPrivate@@QAEXABVQRect@@@Z @ 5521 NONAME ; void QWidgetPrivate::invalidateBuffer(class QRect const &) ?invalidateBuffer@QWidgetPrivate@@QAEXABVQRegion@@@Z @ 5522 NONAME ; void QWidgetPrivate::invalidateBuffer(class QRegion const &) ?invalidateBuffer_resizeHelper@QWidgetPrivate@@QAEXABVQPoint@@ABVQSize@@@Z @ 5523 NONAME ; void QWidgetPrivate::invalidateBuffer_resizeHelper(class QPoint const &, class QSize const &) - ?invalidateCachedClipPath@QGraphicsItemPrivate@@QAEXXZ @ 5524 NONAME ; void QGraphicsItemPrivate::invalidateCachedClipPath(void) - ?invalidateCachedClipPathRecursively@QGraphicsItemPrivate@@QAEX_NABVQRectF@@@Z @ 5525 NONAME ; void QGraphicsItemPrivate::invalidateCachedClipPathRecursively(bool, class QRectF const &) + ?invalidateCachedClipPath@QGraphicsItemPrivate@@QAEXXZ @ 5524 NONAME ABSENT ; void QGraphicsItemPrivate::invalidateCachedClipPath(void) + ?invalidateCachedClipPathRecursively@QGraphicsItemPrivate@@QAEX_NABVQRectF@@@Z @ 5525 NONAME ABSENT ; void QGraphicsItemPrivate::invalidateCachedClipPathRecursively(bool, class QRectF const &) ?invalidateChildrenSceneTransform@QGraphicsItemPrivate@@QAEXXZ @ 5526 NONAME ; void QGraphicsItemPrivate::invalidateChildrenSceneTransform(void) ?invalidateDepthRecursively@QGraphicsItemPrivate@@QAEXXZ @ 5527 NONAME ; void QGraphicsItemPrivate::invalidateDepthRecursively(void) ?invalidateFilter@QSortFilterProxyModel@@IAEXXZ @ 5528 NONAME ; void QSortFilterProxyModel::invalidateFilter(void) @@ -5589,7 +5589,7 @@ EXPORTS ?isClickable@QHeaderView@@QBE_NXZ @ 5588 NONAME ; bool QHeaderView::isClickable(void) const ?isClipEnabled@QPaintEngineState@@QBE_NXZ @ 5589 NONAME ; bool QPaintEngineState::isClipEnabled(void) const ?isClipped@QGraphicsItem@@QBE_NXZ @ 5590 NONAME ; bool QGraphicsItem::isClipped(void) const - ?isClippedAway@QGraphicsItemPrivate@@QBE_NXZ @ 5591 NONAME ; bool QGraphicsItemPrivate::isClippedAway(void) const + ?isClippedAway@QGraphicsItemPrivate@@QBE_NXZ @ 5591 NONAME ABSENT ; bool QGraphicsItemPrivate::isClippedAway(void) const ?isClosed@QPolygonF@@QBE_NXZ @ 5592 NONAME ; bool QPolygonF::isClosed(void) const ?isCollapsible@QSplitter@@QBE_NH@Z @ 5593 NONAME ; bool QSplitter::isCollapsible(int) const ?isColumnHidden@QTableView@@QBE_NH@Z @ 5594 NONAME ; bool QTableView::isColumnHidden(int) const @@ -8586,7 +8586,7 @@ EXPORTS ?setCacheMode@QGraphicsItem@@QAEXW4CacheMode@1@ABVQSize@@@Z @ 8585 NONAME ; void QGraphicsItem::setCacheMode(enum QGraphicsItem::CacheMode, class QSize const &) ?setCacheMode@QGraphicsView@@QAEXV?$QFlags@W4CacheModeFlag@QGraphicsView@@@@@Z @ 8586 NONAME ; void QGraphicsView::setCacheMode(class QFlags) ?setCacheMode@QMovie@@QAEXW4CacheMode@1@@Z @ 8587 NONAME ; void QMovie::setCacheMode(enum QMovie::CacheMode) - ?setCachedClipPath@QGraphicsItemPrivate@@QAEXABVQPainterPath@@@Z @ 8588 NONAME ; void QGraphicsItemPrivate::setCachedClipPath(class QPainterPath const &) + ?setCachedClipPath@QGraphicsItemPrivate@@QAEXABVQPainterPath@@@Z @ 8588 NONAME ABSENT ; void QGraphicsItemPrivate::setCachedClipPath(class QPainterPath const &) ?setCalendarPopup@QDateTimeEdit@@QAEX_N@Z @ 8589 NONAME ; void QDateTimeEdit::setCalendarPopup(bool) ?setCalendarWidget@QDateTimeEdit@@QAEXPAVQCalendarWidget@@@Z @ 8590 NONAME ; void QDateTimeEdit::setCalendarWidget(class QCalendarWidget *) ?setCancelButton@QProgressDialog@@QAEXPAVQPushButton@@@Z @ 8591 NONAME ; void QProgressDialog::setCancelButton(class QPushButton *) @@ -8901,8 +8901,8 @@ EXPORTS ?setElementPositionAt@QPainterPath@@QAEXHMM@Z @ 8900 NONAME ; void QPainterPath::setElementPositionAt(int, float, float) ?setElideMode@QTabBar@@QAEXW4TextElideMode@Qt@@@Z @ 8901 NONAME ; void QTabBar::setElideMode(enum Qt::TextElideMode) ?setElideMode@QTabWidget@@QAEXW4TextElideMode@Qt@@@Z @ 8902 NONAME ; void QTabWidget::setElideMode(enum Qt::TextElideMode) - ?setEmptyCachedClipPath@QGraphicsItemPrivate@@QAEXXZ @ 8903 NONAME ; void QGraphicsItemPrivate::setEmptyCachedClipPath(void) - ?setEmptyCachedClipPathRecursively@QGraphicsItemPrivate@@QAEXABVQRectF@@@Z @ 8904 NONAME ; void QGraphicsItemPrivate::setEmptyCachedClipPathRecursively(class QRectF const &) + ?setEmptyCachedClipPath@QGraphicsItemPrivate@@QAEXXZ @ 8903 NONAME ABSENT ; void QGraphicsItemPrivate::setEmptyCachedClipPath(void) + ?setEmptyCachedClipPathRecursively@QGraphicsItemPrivate@@QAEXABVQRectF@@@Z @ 8904 NONAME ABSENT ; void QGraphicsItemPrivate::setEmptyCachedClipPathRecursively(class QRectF const &) ?setEmptyLabel@QUndoView@@QAEXABVQString@@@Z @ 8905 NONAME ; void QUndoView::setEmptyLabel(class QString const &) ?setEnabled@QAction@@QAEX_N@Z @ 8906 NONAME ; void QAction::setEnabled(bool) ?setEnabled@QActionGroup@@QAEX_N@Z @ 8907 NONAME ; void QActionGroup::setEnabled(bool) @@ -11919,7 +11919,7 @@ EXPORTS ?updateBlock@QAbstractTextDocumentLayout@@IAEXABVQTextBlock@@@Z @ 11918 NONAME ; void QAbstractTextDocumentLayout::updateBlock(class QTextBlock const &) ?updateBoundingRect@QGraphicsEffect@@IAEXXZ @ 11919 NONAME ; void QGraphicsEffect::updateBoundingRect(void) ?updateCacheIfNecessary@QWidgetItemV2@@ABEXXZ @ 11920 NONAME ; void QWidgetItemV2::updateCacheIfNecessary(void) const - ?updateCachedClipPathFromSetPosHelper@QGraphicsItemPrivate@@QAEXABVQPointF@@@Z @ 11921 NONAME ; void QGraphicsItemPrivate::updateCachedClipPathFromSetPosHelper(class QPointF const &) + ?updateCachedClipPathFromSetPosHelper@QGraphicsItemPrivate@@QAEXABVQPointF@@@Z @ 11921 NONAME ABSENT ; void QGraphicsItemPrivate::updateCachedClipPathFromSetPosHelper(class QPointF const &) ?updateCell@QCalendarWidget@@IAEXABVQDate@@@Z @ 11922 NONAME ; void QCalendarWidget::updateCell(class QDate const &) ?updateCells@QCalendarWidget@@IAEXXZ @ 11923 NONAME ; void QCalendarWidget::updateCells(void) ?updateDisplayText@QLineControl@@AAEXXZ @ 11924 NONAME ; void QLineControl::updateDisplayText(void) @@ -12517,4 +12517,9 @@ EXPORTS ?effectiveFocusWidget@QWidgetPrivate@@QAEPAVQWidget@@XZ @ 12516 NONAME ; class QWidget * QWidgetPrivate::effectiveFocusWidget(void) ?ignoreUnusedNavigationEvents@QTextControl@@QBE_NXZ @ 12517 NONAME ; bool QTextControl::ignoreUnusedNavigationEvents(void) const ?setIgnoreUnusedNavigationEvents@QTextControl@@QAEX_N@Z @ 12518 NONAME ; void QTextControl::setIgnoreUnusedNavigationEvents(bool) + ?discardUpdateRequest@QGraphicsItemPrivate@@QBE_N_N00@Z @ 12519 NONAME ; bool QGraphicsItemPrivate::discardUpdateRequest(bool, bool, bool) const + ??1QImagePixmapCleanupHooks@@QAE@XZ @ 12520 NONAME ; QImagePixmapCleanupHooks::~QImagePixmapCleanupHooks(void) + ?addCacheData@QVectorPath@@QBEPAUCacheEntry@1@PAVQPaintEngineEx@@PAXP6AX01@Z@Z @ 12521 NONAME ; struct QVectorPath::CacheEntry * QVectorPath::addCacheData(class QPaintEngineEx *, void *, void (*)(class QPaintEngineEx *, void *)) const + ?makeCacheable@QVectorPath@@QBEXXZ @ 12522 NONAME ; void QVectorPath::makeCacheable(void) const + ??1QVectorPath@@QAE@XZ @ 12523 NONAME ; QVectorPath::~QVectorPath(void) diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 6c45a6e..429ca79 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -4680,9 +4680,9 @@ EXPORTS _ZN20QGraphicsItemPrivate28ensureSequentialSiblingIndexEv @ 4679 NONAME _ZN20QGraphicsItemPrivate29ensureSceneTransformRecursiveEPP13QGraphicsItem @ 4680 NONAME _ZN20QGraphicsItemPrivate30updateSceneTransformFromParentEv @ 4681 NONAME - _ZN20QGraphicsItemPrivate33setEmptyCachedClipPathRecursivelyERK6QRectF @ 4682 NONAME - _ZN20QGraphicsItemPrivate35invalidateCachedClipPathRecursivelyEbRK6QRectF @ 4683 NONAME - _ZN20QGraphicsItemPrivate36updateCachedClipPathFromSetPosHelperERK7QPointF @ 4684 NONAME + _ZN20QGraphicsItemPrivate33setEmptyCachedClipPathRecursivelyERK6QRectF @ 4682 NONAME ABSENT + _ZN20QGraphicsItemPrivate35invalidateCachedClipPathRecursivelyEbRK6QRectF @ 4683 NONAME ABSENT + _ZN20QGraphicsItemPrivate36updateCachedClipPathFromSetPosHelperERK7QPointF @ 4684 NONAME ABSENT _ZN20QGraphicsItemPrivate8addChildEP13QGraphicsItem @ 4685 NONAME _ZN20QGraphicsPolygonItem10setPolygonERK9QPolygonF @ 4686 NONAME _ZN20QGraphicsPolygonItem11setFillRuleEN2Qt8FillRuleE @ 4687 NONAME @@ -5221,8 +5221,8 @@ EXPORTS _ZN24QImagePixmapCleanupHooks17executeImageHooksEx @ 5220 NONAME _ZN24QImagePixmapCleanupHooks18executePixmapHooksEP7QPixmap @ 5221 NONAME ABSENT _ZN24QImagePixmapCleanupHooks8instanceEv @ 5222 NONAME - _ZN24QImagePixmapCleanupHooksC1Ev @ 5223 NONAME - _ZN24QImagePixmapCleanupHooksC2Ev @ 5224 NONAME + _ZN24QImagePixmapCleanupHooksC1Ev @ 5223 NONAME ABSENT + _ZN24QImagePixmapCleanupHooksC2Ev @ 5224 NONAME ABSENT _ZN24QPixmapConvolutionFilter11qt_metacallEN11QMetaObject4CallEiPPv @ 5225 NONAME _ZN24QPixmapConvolutionFilter11qt_metacastEPKc @ 5226 NONAME _ZN24QPixmapConvolutionFilter16staticMetaObjectE @ 5227 NONAME DATA 16 @@ -9388,7 +9388,7 @@ EXPORTS _ZNK20QGraphicsItemPrivate15initStyleOptionEP24QStyleOptionGraphicsItemRK10QTransformRK7QRegionb @ 9387 NONAME _ZNK20QGraphicsItemPrivate19genericMapFromSceneERK7QPointFPK7QWidget @ 9388 NONAME _ZNK20QGraphicsItemPrivate19maybeExtraItemCacheEv @ 9389 NONAME - _ZNK20QGraphicsItemPrivate20discardUpdateRequestEbbbb @ 9390 NONAME + _ZNK20QGraphicsItemPrivate20discardUpdateRequestEbbbb @ 9390 NONAME ABSENT _ZNK20QGraphicsItemPrivate21effectiveBoundingRectEv @ 9391 NONAME _ZNK20QGraphicsItemPrivate22inputMethodQueryHelperEN2Qt16InputMethodQueryE @ 9392 NONAME _ZNK20QGraphicsItemPrivate24combineTransformToParentEP10QTransformPKS0_ @ 9393 NONAME @@ -11571,7 +11571,7 @@ EXPORTS _ZN11QTapGesture19getStaticMetaObjectEv @ 11570 NONAME _ZN11QTapGestureC1EP7QObject @ 11571 NONAME _ZN11QTapGestureC2EP7QObject @ 11572 NONAME - _ZN11QVectorPath12addCacheDataEP14QPaintEngineExPvPFvS2_E @ 11573 NONAME + _ZN11QVectorPath12addCacheDataEP14QPaintEngineExPvPFvS2_E @ 11573 NONAME ABSENT _ZN12QApplication18symbianEventFilterEPK13QSymbianEvent @ 11574 NONAME _ZN12QApplication19symbianProcessEventEPK13QSymbianEvent @ 11575 NONAME _ZN13QGestureEvent11setAcceptedEN2Qt11GestureTypeEb @ 11576 NONAME @@ -11737,4 +11737,8 @@ EXPORTS _Zls6QDebugRKN12QStyleOption10OptionTypeE @ 11736 NONAME _ZN12QTextControl31setIgnoreUnusedNavigationEventsEb @ 11737 NONAME _ZNK12QTextControl28ignoreUnusedNavigationEventsEv @ 11738 NONAME + _ZN11QVectorPathD1Ev @ 11739 NONAME + _ZN11QVectorPathD2Ev @ 11740 NONAME + _ZNK11QVectorPath12addCacheDataEP14QPaintEngineExPvPFvS1_S2_E @ 11741 NONAME + _ZNK20QGraphicsItemPrivate20discardUpdateRequestEbbb @ 11742 NONAME -- cgit v0.12 From 4a58e7f64e5922e7815a98244c4b8dda1689ff26 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 2 Dec 2009 17:04:08 +0100 Subject: Improved mouse wheel event delivery on Mac. When a popup is open we should not deliver wheel events to widget outside of the popup - native Cocoa applications don't do that. Reviewed-by: Richard --- src/gui/kernel/qcocoaview_mac.mm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index a4da25f..000f223 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -777,12 +777,19 @@ extern "C" { NSPoint windowPoint = [theEvent locationInWindow]; NSPoint globalPoint = [[theEvent window] convertBaseToScreen:windowPoint]; NSPoint localPoint = [self convertPoint:windowPoint fromView:nil]; - QPoint qlocal = QPoint(localPoint.x, localPoint.y); - QPoint qglobal = QPoint(globalPoint.x, globalPoint.y); + QPoint qlocal = QPoint(localPoint.x, flipYCoordinate(localPoint.y)); + QPoint qglobal = QPoint(globalPoint.x, flipYCoordinate(globalPoint.y)); Qt::MouseButton buttons = cocoaButton2QtButton([theEvent buttonNumber]); bool wheelOK = false; Qt::KeyboardModifiers keyMods = qt_cocoaModifiers2QtModifiers([theEvent modifierFlags]); QWidget *widgetToGetMouse = qwidget; + // if popup is open it should get wheel events if the cursor is over the popup, + // otherwise the event should be ignored. + if (QWidget *popup = qAppInstance()->activePopupWidget()) { + if (!popup->geometry().contains(qglobal)) + return; + } + int deltaX = 0; int deltaY = 0; int deltaZ = 0; -- cgit v0.12 From 6bd1139cb4c877db3d71bc6d864e2c5911c0424e Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 3 Dec 2009 11:28:55 +0100 Subject: Compile fix for mac after the merge. Reviewed-by: trustme --- src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index 8e0bb74..f347240 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -119,6 +119,7 @@ QT_END_NAMESPACE QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast(qt_mac_nativeview_for(widget)); Qt::MouseButton mouseButton = cocoaButton2QtButton([event buttonNumber]); + bool handled = false; // sometimes need to redirect mouse events to the popup. QWidget *popup = qAppInstance()->activePopupWidget(); if (popup) { -- cgit v0.12 From d648f23094e61705ceea10b2af526872406d022a Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 3 Dec 2009 11:44:49 +0100 Subject: Fixes: Support gtk-enable-mnemonics on QGtkStyle Task: QTBUG-6484 RevBy: thorbjorn Details: We currently ignore this property. It now maps to SH_UnderlineShortcut. --- src/gui/styles/qgtkstyle.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index b32c55b..9b4d9f8 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -644,6 +644,14 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg static bool buttonsHaveIcons = d->getGConfBool(QLS("/desktop/gnome/interface/buttons_have_icons")); return buttonsHaveIcons; } + case SH_UnderlineShortcut: { + gboolean underlineShortcut = true; + if (!d->gtk_check_version(2, 12, 0)) { + GtkSettings *settings = d->gtk_settings_get_default(); + g_object_get(settings, "gtk-enable-mnemonics", &underlineShortcut, + } + return underlineShortcut; + } default: return QCleanlooksStyle::styleHint(hint, option, widget, returnData); -- cgit v0.12 From 4159207860b68276a6f2f72efec1de0aac620a92 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 3 Dec 2009 11:28:55 +0100 Subject: Compile fix for mac after the merge. Reviewed-by: trustme --- src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index 8e0bb74..f347240 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -119,6 +119,7 @@ QT_END_NAMESPACE QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast(qt_mac_nativeview_for(widget)); Qt::MouseButton mouseButton = cocoaButton2QtButton([event buttonNumber]); + bool handled = false; // sometimes need to redirect mouse events to the popup. QWidget *popup = qAppInstance()->activePopupWidget(); if (popup) { -- cgit v0.12 From ae87d2ac8f4ee62de5c9ec59ee575cf3678fa367 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 3 Dec 2009 12:53:41 +0100 Subject: Ensure the button state is correct when creating a QWheelEvent on Mac. On Mac when we receive a scrollWheel event on Carbon or Cocoa then we need to use QApplication::mouseButtons() in order to ensure the QWheelEvent has the right button states set. This is because the buttons state information is not passed in the native event at all. Reviewed-by: MortenS --- src/gui/kernel/qapplication_mac.mm | 5 ++++- src/gui/kernel/qcocoaview_mac.mm | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index 22a0959..688e51f 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -1687,7 +1687,10 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event UInt32 mac_buttons = 0; GetEventParameter(event, kEventParamMouseChord, typeUInt32, 0, sizeof(mac_buttons), 0, &mac_buttons); - buttons = qt_mac_get_buttons(mac_buttons); + if (ekind != kEventMouseWheelMoved) + buttons = qt_mac_get_buttons(mac_buttons); + else + buttons = QApplication::mouseButtons(); } int wheel_deltaX = 0; diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 000f223..ddd8ca6 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -779,7 +779,7 @@ extern "C" { NSPoint localPoint = [self convertPoint:windowPoint fromView:nil]; QPoint qlocal = QPoint(localPoint.x, flipYCoordinate(localPoint.y)); QPoint qglobal = QPoint(globalPoint.x, flipYCoordinate(globalPoint.y)); - Qt::MouseButton buttons = cocoaButton2QtButton([theEvent buttonNumber]); + Qt::MouseButtons buttons = QApplication::mouseButtons(); bool wheelOK = false; Qt::KeyboardModifiers keyMods = qt_cocoaModifiers2QtModifiers([theEvent modifierFlags]); QWidget *widgetToGetMouse = qwidget; -- cgit v0.12 From e2e0b8d13ba045c693a03c818157f952488c72bd Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 3 Dec 2009 17:38:14 +0100 Subject: Fixes: Compile fix Task: Turns out d648f23094e61705ceea10b2af526872406d022a was not properly applied. --- src/gui/styles/qgtkstyle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 9b4d9f8..afa3325 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -644,11 +644,12 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg static bool buttonsHaveIcons = d->getGConfBool(QLS("/desktop/gnome/interface/buttons_have_icons")); return buttonsHaveIcons; } + case SH_UnderlineShortcut: { gboolean underlineShortcut = true; if (!d->gtk_check_version(2, 12, 0)) { GtkSettings *settings = d->gtk_settings_get_default(); - g_object_get(settings, "gtk-enable-mnemonics", &underlineShortcut, + g_object_get(settings, "gtk-enable-mnemonics", &underlineShortcut, NULL); } return underlineShortcut; } -- cgit v0.12 From d7b34583926e3bd751120a4b827cd5ba6667dea3 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 Dec 2009 10:32:06 +0100 Subject: Fix Run-Time Check Failure with MSVC when downcasting. When you cast from a 64-bit type to a 32-bit one, MSVC produces an RTCF, despite the explicit cast. The solution is to add & 0xFFFFFFFF. Task-number: QTBUG-4255 Reviewed-by: Marius Storm-Olsen --- src/corelib/tools/qhash.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 1918229..2de03dc 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -69,18 +69,18 @@ inline uint qHash(int key) { return uint(key); } inline uint qHash(ulong key) { if (sizeof(ulong) > sizeof(uint)) { - return uint((key >> (8 * sizeof(uint) - 1)) ^ key); + return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U)); } else { - return uint(key); + return uint(key & (~0U)); } } inline uint qHash(long key) { return qHash(ulong(key)); } inline uint qHash(quint64 key) { if (sizeof(quint64) > sizeof(uint)) { - return uint((key >> (8 * sizeof(uint) - 1)) ^ key); + return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U)); } else { - return uint(key); + return uint(key & (~0U)); } } inline uint qHash(qint64 key) { return qHash(quint64(key)); } -- cgit v0.12 From 1d6be599f5c12e9ce23bbdf081a103aa62618e15 Mon Sep 17 00:00:00 2001 From: Bill King Date: Fri, 4 Dec 2009 10:48:37 +1000 Subject: Fixes: QOCI setForwardOnly(true) accumulating values. readPiecewise() is assuming an empty valueCache when reading a new row. setForwardOnly(true) means that only one row is used/re-used. The value cache wasn't being cleared out when moving to a new row, so the above assumption was invalid. Task-number: QTBUG-6421 Reviewed-by: Justin McPherson --- src/sql/kernel/qsqlcachedresult.cpp | 5 +++++ tests/auto/qsqlquery/tst_qsqlquery.cpp | 28 +++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/sql/kernel/qsqlcachedresult.cpp b/src/sql/kernel/qsqlcachedresult.cpp index b4a9241..2e4d19e 100644 --- a/src/sql/kernel/qsqlcachedresult.cpp +++ b/src/sql/kernel/qsqlcachedresult.cpp @@ -278,6 +278,11 @@ bool QSqlCachedResult::cacheNext() if (d->atEnd) return false; + if(isForwardOnly()) { + d->cache.clear(); + d->cache.resize(d->colCount); + } + if (!gotoNext(d->cache, d->nextIndex())) { d->revertLast(); d->atEnd = true; diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp index 4264a70..a8908fd 100644 --- a/tests/auto/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp @@ -199,6 +199,8 @@ private slots: void QTBUG_5251_data() { generic_data("QPSQL"); } void QTBUG_5251(); + void QTBUG_6421_data() { generic_data("QOCI"); } + void QTBUG_6421(); private: // returns all database connections @@ -302,7 +304,8 @@ void tst_QSqlQuery::dropTestTables( QSqlDatabase db ) << qTableName( "more_results" ) << qTableName( "blobstest" ) << qTableName( "oraRowId" ) - << qTableName( "qtest_batch" ); + << qTableName( "qtest_batch" ) + << qTableName(QLatin1String("bug6421")).toUpper(); if ( db.driverName().startsWith("QPSQL") ) tablenames << qTableName("task_233829"); @@ -2935,5 +2938,28 @@ void tst_QSqlQuery::QTBUG_5251() } +void tst_QSqlQuery::QTBUG_6421() +{ + QFETCH( QString, dbName ); + QSqlDatabase db = QSqlDatabase::database( dbName ); + CHECK_DATABASE( db ); + + QSqlQuery q(db); + QString tableName=qTableName(QLatin1String("bug6421")).toUpper(); + + QVERIFY_SQL(q, exec("create table "+tableName+"(COL1 char(10), COL2 char(10), COL3 char(10))")); + QVERIFY_SQL(q, exec("create index INDEX1 on "+tableName+" (COL1 desc)")); + QVERIFY_SQL(q, exec("create index INDEX2 on "+tableName+" (COL2 desc)")); + QVERIFY_SQL(q, exec("create index INDEX3 on "+tableName+" (COL3 desc)")); + q.setForwardOnly(true); + QVERIFY_SQL(q, exec("select COLUMN_EXPRESSION from ALL_IND_EXPRESSIONS where TABLE_NAME='"+tableName+"'")); + QVERIFY_SQL(q, next()); + QCOMPARE(q.value(0).toString(), QLatin1String("\"COL1\"")); + QVERIFY_SQL(q, next()); + QCOMPARE(q.value(0).toString(), QLatin1String("\"COL2\"")); + QVERIFY_SQL(q, next()); + QCOMPARE(q.value(0).toString(), QLatin1String("\"COL3\"")); +} + QTEST_MAIN( tst_QSqlQuery ) #include "tst_qsqlquery.moc" -- cgit v0.12 From e61d3ebf2c48c8cba32d72f0bacb8ad7650f0f72 Mon Sep 17 00:00:00 2001 From: Bill King Date: Fri, 4 Dec 2009 14:43:07 +1000 Subject: Revert previous commit as it breaks an sqlite assumption. During the exe(), sqlite does it's first stepping, and stores that into the cache. It assumes that that value is still in the cache when fetchNext() is called, and uses the "cached" value to return. --- src/sql/kernel/qsqlcachedresult.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/sql/kernel/qsqlcachedresult.cpp b/src/sql/kernel/qsqlcachedresult.cpp index 2e4d19e..b4a9241 100644 --- a/src/sql/kernel/qsqlcachedresult.cpp +++ b/src/sql/kernel/qsqlcachedresult.cpp @@ -278,11 +278,6 @@ bool QSqlCachedResult::cacheNext() if (d->atEnd) return false; - if(isForwardOnly()) { - d->cache.clear(); - d->cache.resize(d->colCount); - } - if (!gotoNext(d->cache, d->nextIndex())) { d->revertLast(); d->atEnd = true; -- cgit v0.12 From 500996b13b96d2868a7da78d782108c2996684ec Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 4 Dec 2009 11:14:37 +0100 Subject: Stylesheets example: Fix warning about multiple &-mnemonics. Reviewed-by: Olivier Goffart --- examples/widgets/stylesheet/mainwindow.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/widgets/stylesheet/mainwindow.ui b/examples/widgets/stylesheet/mainwindow.ui index 740d37b..2b232df 100644 --- a/examples/widgets/stylesheet/mainwindow.ui +++ b/examples/widgets/stylesheet/mainwindow.ui @@ -41,7 +41,7 @@ Please read the LICENSE file before checking - I &accept the terms and &conditions + I accept the terms and &conditions -- cgit v0.12 From 9c8a41a157cf9ffbb6d839d05c4502fef59e21c6 Mon Sep 17 00:00:00 2001 From: mae Date: Fri, 4 Dec 2009 13:57:44 +0100 Subject: Added auto test for the cursor position when doing block undo and redo Block changes in different selections happens quite frequently with Qt Creator, e.g. when renaming local variables. This test tests the desired cursor position behaviour: after an undo, the cursor should be where it was when the block operation started. After a redo, the cursor should be where it was after the block operation ended. --- tests/auto/qtextcursor/tst_qtextcursor.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tests/auto/qtextcursor/tst_qtextcursor.cpp b/tests/auto/qtextcursor/tst_qtextcursor.cpp index d910c8d..d0c2afd 100644 --- a/tests/auto/qtextcursor/tst_qtextcursor.cpp +++ b/tests/auto/qtextcursor/tst_qtextcursor.cpp @@ -149,6 +149,8 @@ private slots: void adjustCursorsOnInsert(); + void cursorPositionWithBlockUndoAndRedo(); + private: int blockCount(); @@ -1747,9 +1749,33 @@ void tst_QTextCursor::adjustCursorsOnInsert() QCOMPARE(selection.anchor(), posAfter); doc->undo(); +} +void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo() +{ + cursor.insertText("AAAABBBBCCCCDDDD"); + cursor.beginEditBlock(); + cursor.setPosition(12); + int cursorPositionBefore = cursor.position(); + cursor.insertText("*"); + cursor.setPosition(8); + cursor.insertText("*"); + cursor.setPosition(4); + cursor.insertText("*"); + cursor.setPosition(0); + cursor.insertText("*"); + int cursorPositionAfter = cursor.position(); + cursor.endEditBlock(); + QVERIFY(doc->toPlainText() == "*AAAA*BBBB*CCCC*DDDD"); + QCOMPARE(12, cursorPositionBefore); + QCOMPARE(1, cursorPositionAfter); - + doc->undo(&cursor); + QVERIFY(doc->toPlainText() == "AAAABBBBCCCCDDDD"); + QCOMPARE(cursor.position(), cursorPositionBefore); + doc->redo(&cursor); + QVERIFY(doc->toPlainText() == "*AAAA*BBBB*CCCC*DDDD"); + QCOMPARE(cursor.position(), cursorPositionAfter); } QTEST_MAIN(tst_QTextCursor) -- cgit v0.12 From 3046bffe2feda63ed7719f8f0db9b576013720db Mon Sep 17 00:00:00 2001 From: mae Date: Fri, 4 Dec 2009 14:04:41 +0100 Subject: Fix cursor positiong after block undo and redo Block changes in different selections happens quite frequently with Qt Creator, e.g. when renaming local variables. The desired behaviour which the tst_QTextCursor::cursorPositionWIthBLockUndoAndRedo() tests, is like this: after an undo, the cursor should be where it was when the block operation started. After a redo, the cursor should be where it was after the block operation ended. Reviewed-by: Simon Hausmann --- src/gui/text/qtextdocument_p.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index 18e1ffc..b015198 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -870,6 +870,7 @@ int QTextDocumentPrivate::undoRedo(bool undo) undoEnabled = false; beginEditBlock(); + int editPos = -1; while (1) { if (undo) --undoState; @@ -881,11 +882,13 @@ int QTextDocumentPrivate::undoRedo(bool undo) remove(c.pos, c.length, (QTextUndoCommand::Operation)c.operation); PMDEBUG(" erase: from %d, length %d", c.pos, c.length); c.command = QTextUndoCommand::Removed; + editPos = c.pos; break; case QTextUndoCommand::Removed: PMDEBUG(" insert: format %d (from %d, length %d, strpos=%d)", c.format, c.pos, c.length, c.strPos); insert_string(c.pos, c.strPos, c.length, c.format, (QTextUndoCommand::Operation)c.operation); c.command = QTextUndoCommand::Inserted; + editPos = c.pos + c.length; break; case QTextUndoCommand::BlockInserted: case QTextUndoCommand::BlockAdded: @@ -895,6 +898,7 @@ int QTextDocumentPrivate::undoRedo(bool undo) c.command = QTextUndoCommand::BlockRemoved; else c.command = QTextUndoCommand::BlockDeleted; + editPos = c.pos; break; case QTextUndoCommand::BlockRemoved: case QTextUndoCommand::BlockDeleted: @@ -905,6 +909,7 @@ int QTextDocumentPrivate::undoRedo(bool undo) c.command = QTextUndoCommand::BlockInserted; else c.command = QTextUndoCommand::BlockAdded; + editPos = c.pos + 1; break; case QTextUndoCommand::CharFormatChanged: { resetBlockRevision = -1; // ## TODO @@ -915,6 +920,7 @@ int QTextDocumentPrivate::undoRedo(bool undo) int oldFormat = it.value()->format; setCharFormat(c.pos, c.length, formats.charFormat(c.format)); c.format = oldFormat; + editPos = c.pos + c.length; break; } case QTextUndoCommand::BlockFormatChanged: { @@ -937,6 +943,7 @@ int QTextDocumentPrivate::undoRedo(bool undo) group->blockFormatChanged(it); } documentChange(it.position(), it.length()); + editPos = -1; break; } case QTextUndoCommand::GroupFormatChange: { @@ -946,6 +953,7 @@ int QTextDocumentPrivate::undoRedo(bool undo) int oldFormat = formats.objectFormatIndex(c.objectIndex); changeObjectFormat(object, c.format); c.format = oldFormat; + editPos = -1; break; } case QTextUndoCommand::Custom: @@ -954,6 +962,7 @@ int QTextDocumentPrivate::undoRedo(bool undo) c.custom->undo(); else c.custom->redo(); + editPos = -1; break; default: Q_ASSERT(false); @@ -979,8 +988,7 @@ int QTextDocumentPrivate::undoRedo(bool undo) break; } undoEnabled = true; - int editPos = -1; - if (docChangeFrom >= 0) { + if (editPos < 0 && docChangeFrom >= 0) { editPos = qMin(docChangeFrom + docChangeLength, length() - 1); } endEditBlock(); -- cgit v0.12 From c9d0b0bb9d2e3745f6e2a562ac02526f78ca8ff6 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Fri, 4 Dec 2009 00:10:04 +0100 Subject: Apparently fixes some build issues on some old unixes... Reviewed-by: Marius Storm-Olsen --- qmake/generators/unix/unixmake.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index faa6415..44a461e 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -88,7 +88,7 @@ UnixMakefileGenerator::init() if(project->isEmpty("QMAKE_LIBTOOL")) project->values("QMAKE_LIBTOOL").append("libtool --silent"); if(project->isEmpty("QMAKE_SYMBOLIC_LINK")) - project->values("QMAKE_SYMBOLIC_LINK").append("ln -sf"); + project->values("QMAKE_SYMBOLIC_LINK").append("ln -f -s"); /* this should probably not be here, but I'm using it to wrap the .t files */ if(project->first("TEMPLATE") == "app") -- cgit v0.12 From b6cf9e28c2fef9112789e98ac9d1eda45a407889 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 4 Dec 2009 14:36:48 +0100 Subject: Fix compilation with Sun CC 5.9: it was crashing with this code. Definitely a compiler bug. Reviewed-by: Kent Hansen --- src/gui/image/qimagepixmapcleanuphooks.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp index 650075b..e411cd1 100644 --- a/src/gui/image/qimagepixmapcleanuphooks.cpp +++ b/src/gui/image/qimagepixmapcleanuphooks.cpp @@ -93,11 +93,11 @@ void QImagePixmapCleanupHooks::removeImageHook(_qt_image_cleanup_hook_64 hook) imageHooks.removeAll(hook); } - void QImagePixmapCleanupHooks::executePixmapModificationHooks(QPixmap* pm) { - for (int i = 0; i < qt_image_and_pixmap_cleanup_hooks()->pixmapModificationHooks.count(); ++i) - qt_image_and_pixmap_cleanup_hooks()->pixmapModificationHooks[i](pm); + QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks(); + for (int i = 0; i < h->pixmapModificationHooks.count(); ++i) + h->pixmapModificationHooks[i](pm); if (qt_pixmap_cleanup_hook_64) qt_pixmap_cleanup_hook_64(pm->cacheKey()); @@ -105,7 +105,8 @@ void QImagePixmapCleanupHooks::executePixmapModificationHooks(QPixmap* pm) void QImagePixmapCleanupHooks::executePixmapDestructionHooks(QPixmap* pm) { - for (int i = 0; i < qt_image_and_pixmap_cleanup_hooks()->pixmapDestructionHooks.count(); ++i) + QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks(); + for (int i = 0; i < h->pixmapModificationHooks.count(); ++i) qt_image_and_pixmap_cleanup_hooks()->pixmapDestructionHooks[i](pm); if (qt_pixmap_cleanup_hook_64) -- cgit v0.12 From 72edf630344a8625a6dd848a8655e685c536e009 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 4 Dec 2009 14:12:00 +0100 Subject: remove dead file --- tools/qdoc3/documentation.pri | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 tools/qdoc3/documentation.pri diff --git a/tools/qdoc3/documentation.pri b/tools/qdoc3/documentation.pri deleted file mode 100644 index d952183..0000000 --- a/tools/qdoc3/documentation.pri +++ /dev/null @@ -1,5 +0,0 @@ -# NOTE: THIS FILE IS SHARED BY qdoc3.pro AND projects.pro -# -# So while changing this file, please make sure to that your changes -# work in root qt soure dir with (n)make docs and for building with qdoc -# -- cgit v0.12 From 77f274672480e5980d9f42e4fd94c9770279543b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 4 Dec 2009 15:01:49 +0100 Subject: doc: Example page now lists images used by the example It just links to an empty page at the moment, i.e., it doesn't load the images. But I will add that. Task-number: QTBUG-4484 --- tools/qdoc3/config.cpp | 12 +++++ tools/qdoc3/config.h | 1 + tools/qdoc3/cppcodeparser.cpp | 67 ++++++++++++++++++++++- tools/qdoc3/cppcodeparser.h | 1 + tools/qdoc3/generator.cpp | 94 +++++++++++++++++++++++++-------- tools/qdoc3/generator.h | 4 ++ tools/qdoc3/node.cpp | 12 ++++- tools/qdoc3/node.h | 1 + tools/qdoc3/test/qt-build-docs.qdocconf | 1 + tools/qdoc3/test/qt.qdocconf | 1 + 10 files changed, 168 insertions(+), 26 deletions(-) diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp index 0fc3606..1a4e46e 100644 --- a/tools/qdoc3/config.cpp +++ b/tools/qdoc3/config.cpp @@ -399,6 +399,13 @@ QStringList Config::getAllFiles(const QString &filesVar, } /*! + \a fileName is the path of the file to find. + + \a files and \a dirs are the lists where we must find the + components of \a fileName. + + \a location is used for obtaining the file and line numbers + for report qdoc errors. */ QString Config::findFile(const Location& location, const QStringList& files, @@ -527,6 +534,11 @@ QString Config::findFile(const Location& location, } /*! + Copies the \a sourceFilePath to the file name constructed by + concatenating \a targetDirPath and \a userFriendlySourceFilePath. + \a location is for identifying the file and line number where + a qdoc error occurred. The constructed output file name is + returned. */ QString Config::copyFile(const Location& location, const QString& sourceFilePath, diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index 725129a..33e5739 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -161,6 +161,7 @@ class Config #define CONFIG_VERSIONSYM "versionsym" #define CONFIG_FILEEXTENSIONS "fileextensions" +#define CONFIG_IMAGEEXTENSIONS "imageextensions" #ifdef QDOC_QML #define CONFIG_QMLONLY "qmlonly" diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index ce71e51..41a2456 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -197,8 +197,14 @@ CppCodeParser::CppCodeParser() */ CppCodeParser::~CppCodeParser() { + // nothing. } +/*! + The constructor initializes a map of special node types + for identifying important nodes. And it initializes + some filters for identifying certain kinds of files. + */ void CppCodeParser::initializeParser(const Config &config) { CodeParser::initializeParser(config); @@ -220,24 +226,46 @@ void CppCodeParser::initializeParser(const Config &config) exampleNameFilter = exampleFilePatterns.join(" "); else exampleNameFilter = "*.cpp *.h *.js *.xq *.svg *.xml *.ui"; + + QStringList exampleImagePatterns = config.getStringList( + CONFIG_EXAMPLES + Config::dot + CONFIG_IMAGEEXTENSIONS); + + if (!exampleImagePatterns.isEmpty()) + exampleImageFilter = exampleImagePatterns.join(" "); + else + exampleImageFilter = "*.png"; } +/*! + Clear the map of common node types and call + the same function in the base class. + */ void CppCodeParser::terminateParser() { nodeTypeMap.clear(); CodeParser::terminateParser(); } +/*! + Returns "Cpp". + */ QString CppCodeParser::language() { return "Cpp"; } +/*! + Returns a list of extensions for header files. + */ QString CppCodeParser::headerFileNameFilter() { return "*.ch *.h *.h++ *.hh *.hpp *.hxx"; } +/*! + Returns a list of extensions for source files, i.e. not + header files. + */ QString CppCodeParser::sourceFileNameFilter() { return "*.c++ *.cc *.cpp *.cxx"; @@ -299,6 +327,12 @@ void CppCodeParser::parseSourceFile(const Location& location, fclose(in); } +/*! + This is called after all the header files have been parsed. + I think the most important thing it does is resolve class + inheritance links in the tree. But it also initializes a + bunch of stuff. + */ void CppCodeParser::doneParsingHeaderFiles(Tree *tree) { tree->resolveInheritance(); @@ -345,6 +379,12 @@ void CppCodeParser::doneParsingHeaderFiles(Tree *tree) mutableAssociativeIteratorClasses.clear(); } +/*! + This is called after all the source files (i.e., not the + header files) have been parsed. It traverses the tree to + resolve property links, normalize overload signatures, and + do other housekeeping of the tree. + */ void CppCodeParser::doneParsingSourceFiles(Tree *tree) { tree->root()->makeUndocumentedChildrenInternal(); @@ -353,6 +393,13 @@ void CppCodeParser::doneParsingSourceFiles(Tree *tree) tree->resolveProperties(); } +/*! + This function searches the \a tree to find a FunctionNode + for a function with the signature \a synopsis. If the + \a relative node is provided, the search begins there. If + \a fuzzy is true, base classes are searched. The function + node is returned, if found. + */ const FunctionNode *CppCodeParser::findFunctionNode(const QString& synopsis, Tree *tree, Node *relative, @@ -2212,6 +2259,7 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) exampleDirs, proFileName, userFriendlyFilePath); + if (fullPath.isEmpty()) { QString tmp = proFileName; proFileName = examplePath + "/" + "qbuild.pro"; @@ -2231,8 +2279,18 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) int sizeOfBoringPartOfName = fullPath.size() - proFileName.size(); fullPath.truncate(fullPath.lastIndexOf('/')); - QStringList exampleFiles = Config::getFilesHere(fullPath, - exampleNameFilter); + QStringList exampleFiles = Config::getFilesHere(fullPath,exampleNameFilter); + QString imagesPath = fullPath + "/images"; + QStringList imageFiles = Config::getFilesHere(imagesPath,exampleImageFilter); + +#if 0 + qDebug() << "examplePath:" << examplePath; + qDebug() << " exampleFiles" << exampleFiles; + qDebug() << "imagesPath:" << imagesPath; + qDebug() << "fullPath:" << fullPath; + qDebug() << " imageFiles" << imageFiles; +#endif + if (!exampleFiles.isEmpty()) { // move main.cpp and to the end, if it exists QString mainCpp; @@ -2259,6 +2317,11 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) (void) new FakeNode(fake, exampleFile.mid(sizeOfBoringPartOfName), Node::File); + foreach (const QString &imageFile, imageFiles) { + FakeNode* newFake = new FakeNode(fake, + imageFile.mid(sizeOfBoringPartOfName), + Node::Image); + } } QT_END_NAMESPACE diff --git a/tools/qdoc3/cppcodeparser.h b/tools/qdoc3/cppcodeparser.h index e2e9d55..fff5bd9 100644 --- a/tools/qdoc3/cppcodeparser.h +++ b/tools/qdoc3/cppcodeparser.h @@ -185,6 +185,7 @@ class CppCodeParser : public CodeParser static QStringList exampleFiles; static QStringList exampleDirs; QString exampleNameFilter; + QString exampleImageFilter; }; QT_END_NAMESPACE diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index f7569ce..9389268 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -138,14 +138,15 @@ void Generator::initialize(const Config &config) while (g != generators.end()) { if (outputFormats.contains((*g)->format())) { (*g)->initializeGenerator(config); - QStringList extraImages = config.getStringList(CONFIG_EXTRAIMAGES + - Config::dot + - (*g)->format()); + QStringList extraImages = + config.getStringList(CONFIG_EXTRAIMAGES+Config::dot+(*g)->format()); QStringList::ConstIterator e = extraImages.begin(); while (e != extraImages.end()) { QString userFriendlyFilePath; QString filePath = Config::findFile(config.lastLocation(), - imageFiles, imageDirs, *e, + imageFiles, + imageDirs, + *e, imgFileExts[(*g)->format()], userFriendlyFilePath); if (!filePath.isEmpty()) @@ -529,33 +530,80 @@ void Generator::generateInheritedBy(const ClassNode *classe, } } -void Generator::generateExampleFiles(const FakeNode *fake, CodeMarker *marker) +void Generator::generateFileList(const FakeNode* fake, + CodeMarker* marker, + Node::SubType subtype, + const QString& tag) { - if (fake->childNodes().isEmpty()) - return; - + int count = 0; + Text text; OpenedList openedList(OpenedList::Bullet); - Text text; - text << Atom::ParaLeft << "Files:" << Atom::ParaRight + text << Atom::ParaLeft << tag << Atom::ParaRight << Atom(Atom::ListLeft, openedList.styleString()); - foreach (const Node *child, fake->childNodes()) { - QString exampleFile = child->name(); - openedList.next(); - text << Atom(Atom::ListItemNumber, openedList.numberString()) - << Atom(Atom::ListItemLeft, openedList.styleString()) - << Atom::ParaLeft - << Atom(Atom::Link, exampleFile) - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) - << exampleFile - << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) - << Atom::ParaRight - << Atom(Atom::ListItemRight, openedList.styleString()); + + foreach (const Node* child, fake->childNodes()) { + if (child->subType() == subtype) { + ++count; + QString file = child->name(); + + if (file == "network/qftp/images/dir.png") + qDebug() << "FILE:" << file; + + openedList.next(); + text << Atom(Atom::ListItemNumber, openedList.numberString()) + << Atom(Atom::ListItemLeft, openedList.styleString()) + << Atom::ParaLeft + << Atom(Atom::Link, file) + << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) + << file + << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) + << Atom::ParaRight + << Atom(Atom::ListItemRight, openedList.styleString()); + } } text << Atom(Atom::ListRight, openedList.styleString()); - generateText(text, fake, marker); + if (count > 0) + generateText(text, fake, marker); } +void Generator::generateExampleFiles(const FakeNode *fake, CodeMarker *marker) +{ + if (fake->childNodes().isEmpty()) + return; + generateFileList(fake, marker, Node::File, QString("Files:")); + generateFileList(fake, marker, Node::Image, QString("Images:")); +} + +#if 0 + QList::ConstIterator g = generators.begin(); + while (g != generators.end()) { + if (outputFormats.contains((*g)->format())) { + (*g)->initializeGenerator(config); + QStringList extraImages = + config.getStringList(CONFIG_EXTRAIMAGES+Config::dot+(*g)->format()); + QStringList::ConstIterator e = extraImages.begin(); + while (e != extraImages.end()) { + QString userFriendlyFilePath; + QString filePath = Config::findFile(config.lastLocation(), + imageFiles, + imageDirs, + *e, + imgFileExts[(*g)->format()], + userFriendlyFilePath); + if (!filePath.isEmpty()) + Config::copyFile(config.lastLocation(), + filePath, + userFriendlyFilePath, + (*g)->outputDir() + + "/images"); + ++e; + } + } + ++g; + } +#endif + void Generator::generateModuleWarning(const ClassNode *classe, CodeMarker *marker) { diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index 0258534..7667789 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -119,6 +119,10 @@ class Generator CodeMarker *marker, bool generate, int& numGeneratedAtoms); + void generateFileList(const FakeNode* fake, + CodeMarker* marker, + Node::SubType subtype, + const QString& tag); void generateExampleFiles(const FakeNode *fake, CodeMarker *marker); void generateModuleWarning(const ClassNode *classe, CodeMarker *marker); diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 373002c..b855823 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -767,6 +767,9 @@ FakeNode::FakeNode(InnerNode *parent, const QString& name, SubType subtype) } /*! + Returns the fake node's full title, which is usually + just title(), but for some SubType values is different + from title() */ QString FakeNode::fullTitle() const { @@ -776,6 +779,12 @@ QString FakeNode::fullTitle() const else return title(); } + else if (sub == Image) { + if (title().isEmpty()) + return name().mid(name().lastIndexOf('/') + 1) + " Image File"; + else + return title(); + } else if (sub == HeaderFile) { if (title().isEmpty()) return name(); @@ -788,13 +797,14 @@ QString FakeNode::fullTitle() const } /*! + Returns the subtitle. */ QString FakeNode::subTitle() const { if (!stle.isEmpty()) return stle; - if (sub == File) { + if ((sub == File) || (sub == Image)) { if (title().isEmpty() && name().contains("/")) return name(); } diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index dbdc174..223f528 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -89,6 +89,7 @@ class Node Example, HeaderFile, File, + Image, Group, Module, Page, diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index d1733e5..09a4e4c 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -97,6 +97,7 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \ sources.fileextensions = "*.cpp *.qdoc *.mm" examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp" +examples.imageextensions = "*.png" exampledirs = $QT_SOURCE_TREE/doc/src \ $QT_SOURCE_TREE/examples \ diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index d70ef58..58bb2a3 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -100,6 +100,7 @@ excludedirs = $QTDIR/src/3rdparty/clucene \ sources.fileextensions = "*.cpp *.qdoc *.mm" examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp" +examples.imageextensions = "*.png" exampledirs = $QTDIR/doc/src \ $QTDIR/examples \ -- cgit v0.12 From 599ffaef76eb92af2bbce6e5baff539958bfdd14 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 4 Dec 2009 14:54:34 +0100 Subject: make qdoc3 a proper tools subtarget and install it needed for building qtmobility and qtcreator docs without magic. Reviewed-by: Daniel Molkentin --- doc/doc.pri | 5 +---- tools/qdoc3/qdoc3.pro | 2 ++ tools/tools.pro | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/doc.pri b/doc/doc.pri index d4fdcd8..463c447 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -34,12 +34,9 @@ win32-g++:isEmpty(QMAKE_SH) { QT_DOCUMENTATION = $$replace(QT_DOCUMENTATION, "/", "\\\\") } - -!wince*:!cross_compile:SUBDIRS += tools/qdoc3 - # Build rules: adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE) -adp_docs.depends += sub-tools-qdoc3 +adp_docs.depends += sub-tools # qdoc3 qch_docs.commands = $$QT_DOCUMENTATION qch_docs.depends += sub-tools diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index bacef3f..441bf39 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -105,3 +105,5 @@ SOURCES += apigenerator.cpp \ webxmlgenerator.cpp \ yyindent.cpp +target.path = $$[QT_INSTALL_BINS] +INSTALLS += target diff --git a/tools/tools.pro b/tools/tools.pro index 87ba3c9..4cff507 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -31,5 +31,7 @@ contains(QT_CONFIG, dbus):SUBDIRS += qdbus !wince*:contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns xmlpatternsvalidator embedded: SUBDIRS += makeqpf +!wince*:!cross_compile:SUBDIRS += qdoc3 + CONFIG+=ordered QTDIR_build:REQUIRES = "contains(QT_CONFIG, full-config)" -- cgit v0.12 From f34cfa14ff6b0928f98143f72e1f512eceabe27c Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 7 Dec 2009 09:38:24 +1000 Subject: Replace glColor4ub() calls with glColor4f() Intel Q45/Q43 Express Chipset has problems with glColor4ub() not updating GL_CURRENT_COLOR correctly. Replace all references with calls to glColor4f() instead as it is more likely to be implemented correctly on all chipsets. Task-number: QTBUG-6217 Reviewed-by: Sarah Smith --- src/opengl/qgl.cpp | 2 +- src/opengl/qpaintengine_opengl.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 18c70f3..b011637 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -3530,7 +3530,7 @@ void QGLWidget::qglColor(const QColor& c) const const QGLContext *ctx = QGLContext::currentContext(); if (ctx) { if (ctx->format().rgba()) - glColor4ub(c.red(), c.green(), c.blue(), c.alpha()); + glColor4f(c.redF(), c.greenF(), c.blueF(), c.alphaF()); else if (!d->cmap.isEmpty()) { // QGLColormap in use? int i = d->cmap.find(c.rgb()); if (i < 0) diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index e7251e8..4823408 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -113,11 +113,7 @@ static bool DEBUG_TEMP_FLAG; static inline void qt_glColor4ubv(unsigned char *col) { -#ifdef QT_OPENGL_ES - glColor4f(col[0]/255.0, col[1]/255.0, col[2]/255.0, col[3]/255.0); -#else - glColor4ubv(col); -#endif + glColor4f(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, col[3]/255.0f); } struct QT_PointF { -- cgit v0.12 From bd83b34da7049f7743c69b5efe019745801d6c34 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Mon, 7 Dec 2009 15:07:01 +0100 Subject: Cannot drag scrollbars in a QPlainTextEdit on Cocoa. The QPlainTextEdit can change the scroll ranges while dragging the scrollbar. This will eventualy call QWidget::raise(), on Cocoa it was done by removing the NSView and adding it back. This causes problems like resetting internal state while a mouseDragged was active on the view. The fix we will now sort the views based on their Qt-z-order. lower() & stackUnder() also fixed like this. Reviewed-by: Denis --- src/gui/kernel/qwidget_mac.mm | 112 +++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 66 deletions(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 1907cca..7dc4d85 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3654,6 +3654,16 @@ void QWidgetPrivate::setFocus_sys() } } +NSComparisonResult compareViews2Raise(id view1, id view2, void *context) +{ + id topView = reinterpret_cast(context); + if (view1 == topView) + return NSOrderedDescending; + if (view2 == topView) + return NSOrderedAscending; + return NSOrderedSame; +} + void QWidgetPrivate::raise_sys() { Q_Q(QWidget); @@ -3661,7 +3671,6 @@ void QWidgetPrivate::raise_sys() return; #if QT_MAC_USE_COCOA - QMacCocoaAutoReleasePool pool; if (isRealWindow()) { // Calling orderFront shows the window on Cocoa too. if (!q->testAttribute(Qt::WA_DontShowOnScreen) && q->isVisible()) { @@ -3673,16 +3682,9 @@ void QWidgetPrivate::raise_sys() SetFrontProcessWithOptions(&psn, kSetFrontProcessFrontWindowOnly); } } else { - // Cocoa doesn't really have an idea of Z-ordering, but you can - // fake it by changing the order of it. But beware, removing an - // NSView will also remove it as the first responder. So we re-set - // the first responder just in case: NSView *view = qt_mac_nativeview_for(q); NSView *parentView = [view superview]; - NSResponder *firstResponder = [[view window] firstResponder]; - [view removeFromSuperview]; - [parentView addSubview:view]; - [[view window] makeFirstResponder:firstResponder]; + [parentView sortSubviewsUsingFunction:compareViews2Raise context:reinterpret_cast(view)]; } #else if(q->isWindow()) { @@ -3700,47 +3702,29 @@ void QWidgetPrivate::raise_sys() #endif } +NSComparisonResult compareViews2Lower(id view1, id view2, void *context) +{ + id topView = reinterpret_cast(context); + if (view1 == topView) + return NSOrderedAscending; + if (view2 == topView) + return NSOrderedDescending; + return NSOrderedSame; +} + void QWidgetPrivate::lower_sys() { Q_Q(QWidget); if((q->windowType() == Qt::Desktop)) return; #ifdef QT_MAC_USE_COCOA - QMacCocoaAutoReleasePool pool; if (isRealWindow()) { OSWindowRef window = qt_mac_window_for(q); [window orderBack:window]; } else { - // Cocoa doesn't really have an idea of Z-ordering, but you can - // fake it by changing the order of it. In this case - // we put the item at the beginning of the list, but that means - // we must re-insert everything since we cannot modify the list directly. - NSView *myview = qt_mac_nativeview_for(q); - NSView *parentView = [myview superview]; - NSArray *tmpViews = [parentView subviews]; - NSMutableArray *subviews = [[NSMutableArray alloc] initWithCapacity:[tmpViews count]]; - [subviews addObjectsFromArray:tmpViews]; - NSResponder *firstResponder = [[myview window] firstResponder]; - // Implicit assumption that myViewIndex is included in subviews, that's why I'm not checking - // myViewIndex. - NSUInteger index = 0; - NSUInteger myViewIndex = 0; - bool foundMyView = false; - for (NSView *subview in subviews) { - [subview removeFromSuperview]; - if (subview == myview) { - foundMyView = true; - myViewIndex = index; - } - ++index; - } - [parentView addSubview:myview]; - if (foundMyView) - [subviews removeObjectAtIndex:myViewIndex]; - for (NSView *subview in subviews) - [parentView addSubview:subview]; - [subviews release]; - [[myview window] makeFirstResponder:firstResponder]; + NSView *view = qt_mac_nativeview_for(q); + NSView *parentView = [view superview]; + [parentView sortSubviewsUsingFunction:compareViews2Lower context:reinterpret_cast(view)]; } #else if(q->isWindow()) { @@ -3753,6 +3737,16 @@ void QWidgetPrivate::lower_sys() #endif } +NSComparisonResult compareViews2StackUnder(id view1, id view2, void *context) +{ + const QHash &viewOrder = *reinterpret_cast *>(context); + if (viewOrder[view1] < viewOrder[view2]) + return NSOrderedAscending; + if (viewOrder[view1] > viewOrder[view2]) + return NSOrderedDescending; + return NSOrderedSame; +} + void QWidgetPrivate::stackUnder_sys(QWidget *w) { // stackUnder @@ -3761,37 +3755,23 @@ void QWidgetPrivate::stackUnder_sys(QWidget *w) return; #ifdef QT_MAC_USE_COCOA // Do the same trick as lower_sys() and put this widget before the widget passed in. - QMacCocoaAutoReleasePool pool; - NSView *myview = qt_mac_nativeview_for(q); + NSView *myView = qt_mac_nativeview_for(q); NSView *wView = qt_mac_nativeview_for(w); - NSView *parentView = [myview superview]; - NSArray *tmpViews = [parentView subviews]; - NSMutableArray *subviews = [[NSMutableArray alloc] initWithCapacity:[tmpViews count]]; - [subviews addObjectsFromArray:tmpViews]; - // Implicit assumption that myViewIndex and wViewIndex is included in subviews, - // that's why I'm not checking myViewIndex. - NSUInteger index = 0; - NSUInteger myViewIndex = 0; - NSUInteger wViewIndex = 0; - for (NSView *subview in subviews) { - [subview removeFromSuperview]; - if (subview == myview) - myViewIndex = index; - else if (subview == wView) - wViewIndex = index; - ++index; - } - index = 0; + QHash viewOrder; + NSView *parentView = [myView superview]; + NSArray *subviews = [parentView subviews]; + NSUInteger index = 1; + // make a hash of view->zorderindex and make sure z-value is always odd, + // so that when we modify the order we create a new (even) z-value which + // will not interfere with others. for (NSView *subview in subviews) { - if (index == myViewIndex) - continue; - if (index == wViewIndex) - [parentView addSubview:myview]; - [parentView addSubview:subview]; + viewOrder.insert(subview, index * 2); ++index; } - [subviews release]; + viewOrder[myView] = viewOrder[wView] - 1; + + [parentView sortSubviewsUsingFunction:compareViews2StackUnder context:reinterpret_cast(&viewOrder)]; #else QWidget *p = q->parentWidget(); if(!p || p != w->parentWidget()) -- cgit v0.12 From 49a56b22b572b1167098e5f96a84e30cdc64f38c Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 4 Dec 2009 15:49:34 +0100 Subject: Fixed calculating CRC32 on 64bit platforms When compiling on a 64bit machine we should make sure that we won't overflow the 32bit CRC value because of casting signed int to unsigned long. Reviewed-by: Thiago --- config.tests/mac/crc/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.tests/mac/crc/main.cpp b/config.tests/mac/crc/main.cpp index 894f88b..700a4cd 100644 --- a/config.tests/mac/crc/main.cpp +++ b/config.tests/mac/crc/main.cpp @@ -71,7 +71,7 @@ private: for(int iCodes = 0; iCodes <= 0xFF; iCodes++) { ulTable[iCodes] = Reflect(iCodes, 8) << 24; for(int iPos = 0; iPos < 8; iPos++) { - ulTable[iCodes] = (ulTable[iCodes] << 1) + ulTable[iCodes] = ((ulTable[iCodes] << 1) & 0xffffffff) ^ ((ulTable[iCodes] & (1 << 31)) ? ulPolynomial : 0); } @@ -84,7 +84,7 @@ private: // Swap bit 0 for bit 7, bit 1 For bit 6, etc.... for(int iPos = 1; iPos < (cChar + 1); iPos++) { if(ulReflect & 1) { - ulValue |= (1 << (cChar - iPos)); + ulValue |= (1ul << (cChar - iPos)); } ulReflect >>= 1; } -- cgit v0.12 From 2e6e0e2e2f06391095f05d5bbe21aecc839cc99b Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 7 Dec 2009 14:50:48 +0100 Subject: Added a manual test for testing a z-order of overlapping widgets. The test uses QWidget::raise, lower and stackUnder functions. Reviewed-by: trustme --- tests/manual/qwidget_zorder/main.cpp | 77 ++++++++++++++++++++++++++ tests/manual/qwidget_zorder/qwidget_zorder.pro | 6 ++ 2 files changed, 83 insertions(+) create mode 100644 tests/manual/qwidget_zorder/main.cpp create mode 100644 tests/manual/qwidget_zorder/qwidget_zorder.pro diff --git a/tests/manual/qwidget_zorder/main.cpp b/tests/manual/qwidget_zorder/main.cpp new file mode 100644 index 0000000..395d430 --- /dev/null +++ b/tests/manual/qwidget_zorder/main.cpp @@ -0,0 +1,77 @@ +#include + +class Widget : public QWidget +{ + Q_OBJECT +public: + Widget() + { + QWidget *stackWidget = new QWidget; + stackWidget->setFixedSize(400, 300); + button = new QPushButton("pushbutton", stackWidget); + plainTextEdit = new QPlainTextEdit(stackWidget); + plainTextEdit->setWordWrapMode(QTextOption::NoWrap); + QString s = "foo bar bar foo foo bar bar foo"; + for (int i = 0; i < 10; ++i) { + plainTextEdit->appendPlainText(s); + s.remove(1, 2); + } + calendar = new QCalendarWidget(stackWidget); + button->move(10, 10); + button->resize(100, 100); + plainTextEdit->move(30, 70); + plainTextEdit->resize(100, 100); + calendar->move(80, 40); + + QWidget *buttonOps = new QWidget; + QVBoxLayout *l = new QVBoxLayout(buttonOps); + QPushButton *lower = new QPushButton("button: lower"); + connect(lower, SIGNAL(clicked()), button, SLOT(lower())); + l->addWidget(lower); + QPushButton *raise = new QPushButton("button: raise"); + connect(raise, SIGNAL(clicked()), button, SLOT(raise())); + l->addWidget(raise); + + lower = new QPushButton("calendar: lower"); + connect(lower, SIGNAL(clicked()), calendar, SLOT(lower())); + l->addWidget(lower); + raise = new QPushButton("calendar: raise"); + connect(raise, SIGNAL(clicked()), calendar, SLOT(raise())); + l->addWidget(raise); + QPushButton *stackUnder = new QPushButton("calendar: stack under textedit"); + connect(stackUnder, SIGNAL(clicked()), this, SLOT(stackCalendarUnderTextEdit())); + l->addWidget(stackUnder); + + lower = new QPushButton("lower textedit"); + connect(lower, SIGNAL(clicked()), plainTextEdit, SLOT(lower())); + l->addWidget(lower); + raise = new QPushButton("raise textedit"); + connect(raise, SIGNAL(clicked()), plainTextEdit, SLOT(raise())); + l->addWidget(raise); + + QHBoxLayout *mainLayout = new QHBoxLayout(this); + mainLayout->addWidget(buttonOps); + mainLayout->addWidget(stackWidget); + } + +private Q_SLOTS: + void stackCalendarUnderTextEdit() + { + calendar->stackUnder(plainTextEdit); + } + +private: + QPushButton *button; + QPlainTextEdit *plainTextEdit; + QCalendarWidget *calendar; +}; + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + Widget w; + w.show(); + return app.exec(); +} + +#include "main.moc" diff --git a/tests/manual/qwidget_zorder/qwidget_zorder.pro b/tests/manual/qwidget_zorder/qwidget_zorder.pro new file mode 100644 index 0000000..5526f91 --- /dev/null +++ b/tests/manual/qwidget_zorder/qwidget_zorder.pro @@ -0,0 +1,6 @@ +TEMPLATE = app +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += main.cpp -- cgit v0.12 From 16e324adfad0775e37c9fe2800d5fa8b89a80a64 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 7 Dec 2009 16:15:16 +0100 Subject: fix -nomake tools configure option for Windows CE / Symbian lrelease must not be added to the subdirs project projects.pro when building Qt for Windows CE or Symbian. Reviewed-by: ossi --- projects.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects.pro b/projects.pro index 497acd0..d405a5b 100644 --- a/projects.pro +++ b/projects.pro @@ -48,7 +48,7 @@ for(PROJECT, $$list($$lower($$unique(QT_BUILD_PARTS)))) { contains(QT_BUILD_PARTS, tools) { include(translations/translations.pri) # ts targets } else { - SUBDIRS += tools/linguist/lrelease + !wince*:!symbian:SUBDIRS += tools/linguist/lrelease } SUBDIRS += translations # qm build step } else:isEqual(PROJECT, qmake) { -- cgit v0.12 From b413c6a59b7ab8df0029075403fef11779846372 Mon Sep 17 00:00:00 2001 From: Jono Cole Date: Mon, 7 Dec 2009 16:54:21 +0100 Subject: Add support for the Selected QIcon::Mode when rendering the systray icon (Mac) Merge-request: 1599 Reviewed-by: Denis Dzyubenko --- src/gui/util/qsystemtrayicon_mac.mm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm index b74ca85..93295a7 100644 --- a/src/gui/util/qsystemtrayicon_mac.mm +++ b/src/gui/util/qsystemtrayicon_mac.mm @@ -314,8 +314,22 @@ QT_END_NAMESPACE { Q_UNUSED(notification); down = NO; + + if( ![self icon]->icon().isNull() ) { +#ifndef QT_MAC_USE_COCOA + const short scale = GetMBarHeight()-4; +#else + CGFloat hgt = [[[NSApplication sharedApplication] mainMenu] menuBarHeight]; + const short scale = hgt - 4; +#endif + NSImage *nsimage = static_cast(qt_mac_create_nsimage([self icon]->icon().pixmap(QSize(scale, scale)))); + [self setImage: nsimage]; + [nsimage release]; + } + if([self icon]->contextMenu()) [self icon]->contextMenu()->hide(); + [self setNeedsDisplay:YES]; } @@ -327,6 +341,20 @@ QT_END_NAMESPACE [self icon]->contextMenu()->hide(); [self setNeedsDisplay:YES]; +#ifndef QT_MAC_USE_COCOA + const short scale = GetMBarHeight()-4; +#else + CGFloat hgt = [[[NSApplication sharedApplication] mainMenu] menuBarHeight]; + const short scale = hgt - 4; +#endif + + if( down && ![self icon]->icon().isNull() ) { + NSImage *nsaltimage = static_cast(qt_mac_create_nsimage([self icon]->icon().pixmap(QSize(scale, scale), QIcon::Selected))); + [self setImage: nsaltimage]; + [nsaltimage release]; + } + + if (down) [parent triggerSelector:self]; else if ((clickCount%2)) -- cgit v0.12 From 3aa9857322e4b016c3a0e0757eb4ba709db99b4f Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 7 Dec 2009 19:01:01 +0100 Subject: Add copyright header so the autotest will pass. --- tests/manual/qwidget_zorder/main.cpp | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/manual/qwidget_zorder/main.cpp b/tests/manual/qwidget_zorder/main.cpp index 395d430..fe8e0a2 100644 --- a/tests/manual/qwidget_zorder/main.cpp +++ b/tests/manual/qwidget_zorder/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include class Widget : public QWidget -- cgit v0.12 From 12b032ca7c79955f03f744bdb8f7b0d60e222e40 Mon Sep 17 00:00:00 2001 From: Bill King Date: Tue, 8 Dec 2009 09:04:03 +1000 Subject: Proper fix for QTBUG-6421 fixes setForwardOnly() for both OCI and SQLite Task-number: QTBUG-6421 Reviewed-by: Justin McPherson --- src/sql/drivers/sqlite/qsql_sqlite.cpp | 17 ++++++++++++----- src/sql/kernel/qsqlcachedresult.cpp | 5 +++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index 8355de2..c62f15c 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -122,14 +122,14 @@ public: sqlite3_stmt *stmt; - uint skippedStatus: 1; // the status of the fetchNext() that's skipped - uint skipRow: 1; // skip the next fetchNext()? - uint utf8: 1; + bool skippedStatus; // the status of the fetchNext() that's skipped + bool skipRow; // skip the next fetchNext()? QSqlRecord rInf; + QVector firstRow; }; QSQLiteResultPrivate::QSQLiteResultPrivate(QSQLiteResult* res) : q(res), access(0), - stmt(0), skippedStatus(false), skipRow(false), utf8(false) + stmt(0), skippedStatus(false), skipRow(false) { } @@ -189,10 +189,17 @@ bool QSQLiteResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int i // already fetched Q_ASSERT(!initialFetch); skipRow = false; + for(int i=0;isetLastError(QSqlError(QCoreApplication::translate("QSQLiteResult", "Unable to fetch row"), QCoreApplication::translate("QSQLiteResult", "No query"), QSqlError::ConnectionError)); @@ -399,7 +406,7 @@ bool QSQLiteResult::exec() "Parameter count mismatch"), QString(), QSqlError::StatementError)); return false; } - d->skippedStatus = d->fetchNext(cache(), 0, true); + d->skippedStatus = d->fetchNext(d->firstRow, 0, true); if (lastError().isValid()) { setSelect(false); setActive(false); diff --git a/src/sql/kernel/qsqlcachedresult.cpp b/src/sql/kernel/qsqlcachedresult.cpp index b4a9241..2e4d19e 100644 --- a/src/sql/kernel/qsqlcachedresult.cpp +++ b/src/sql/kernel/qsqlcachedresult.cpp @@ -278,6 +278,11 @@ bool QSqlCachedResult::cacheNext() if (d->atEnd) return false; + if(isForwardOnly()) { + d->cache.clear(); + d->cache.resize(d->colCount); + } + if (!gotoNext(d->cache, d->nextIndex())) { d->revertLast(); d->atEnd = true; -- cgit v0.12 From 127d52df97b68fcf54a50e471a0b899d92fda10a Mon Sep 17 00:00:00 2001 From: Bill King Date: Tue, 8 Dec 2009 12:13:20 +1000 Subject: Remove this unnecessary and verbose line. --- tests/auto/qsqldatabase/tst_qsqldatabase.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index f840ca6..cb4e103 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -2493,7 +2493,6 @@ void tst_QSqlDatabase::oci_tables() QString systemTableName("system."+qTableName("mypassword")); QVERIFY_SQL(q, exec("CREATE TABLE "+systemTableName+"(name VARCHAR(20))")); QVERIFY(!db.tables().contains(systemTableName.toUpper())); - qDebug() << db.tables(QSql::SystemTables); QVERIFY(db.tables(QSql::SystemTables).contains(systemTableName.toUpper())); } -- cgit v0.12 From 81e59890200349faa6aad4ba988257c6e2d63319 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 8 Dec 2009 14:03:43 +1000 Subject: Update source package names in documentation. Task-number: QTBUG-6574 Reviewed-by: Trust Me --- doc/src/getting-started/installation.qdoc | 8 ++++---- doc/src/snippets/code/doc_src_installation.qdoc | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index beb4419..b052c3c 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -66,12 +66,12 @@ in the \l{Qt for X11 Requirements} document. For the open source version you do not need a license file. \o Unpack the archive if you have not done so already. For example, - if you have the \c{qt-x11-opensource-desktop-%VERSION%.tar.gz} + if you have the \c{qt-everywhere-opensource-src-%VERSION%.tar.gz} package, type the following commands at a command line prompt: \snippet doc/src/snippets/code/doc_src_installation.qdoc 0 - This creates the directory \c{/tmp/qt-x11-opensource-desktop-%VERSION%} + This creates the directory \c{/tmp/qt-everywhere-opensource-src-%VERSION%} containing the files from the archive. We only support the GNU version of the tar archiving utility. Note that on some systems it is called gtar. @@ -299,12 +299,12 @@ The following instructions describe how to install Qt from the source package. For the open source version you do not need a license file. \o Unpack the archive if you have not done so already. For example, - if you have the \c{qt-mac-opensource-desktop-%VERSION%.tar.gz} + if you have the \c{qt-everywhere-opensource-src-%VERSION%.tar.gz} package, type the following commands at a command line prompt: \snippet doc/src/snippets/code/doc_src_installation.qdoc 11 - This creates the directory \c{/tmp/qt-mac-opensource-desktop-%VERSION%} + This creates the directory \c{/tmp/qt-everywhere-opensource-src-%VERSION%} containing the files from the archive. \o Building diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc index bef6e84..c810706 100644 --- a/doc/src/snippets/code/doc_src_installation.qdoc +++ b/doc/src/snippets/code/doc_src_installation.qdoc @@ -41,13 +41,13 @@ //! [0] cd /tmp -gunzip qt-x11-opensource-desktop-%VERSION%.tar.gz # uncompress the archive -tar xvf qt-x11-opensource-desktop-%VERSION%.tar # unpack it +gunzip qt-everywhere-opensource-src-%VERSION%.tar.gz # uncompress the archive +tar xvf qt-everywhere-opensource-src-%VERSION%.tar # unpack it //! [0] //! [1] -cd /tmp/qt-x11-opensource-desktop-%VERSION% +cd /tmp/qt-everywhere-opensource-src-%VERSION% ./configure //! [1] @@ -102,13 +102,13 @@ nmake //! [11] cd /tmp -gunzip qt-mac-opensource-desktop-%VERSION%.tar.gz # uncompress the archive -tar xvf qt-mac-opensource-desktop-%VERSION%.tar # unpack it +gunzip qt-everywhere-opensource-src-%VERSION%.tar.gz # uncompress the archive +tar xvf qt-everywhere-opensource-src-%VERSION%.tar # unpack it //! [11] //! [12] -cd /tmp/qt-mac-opensource-desktop-%VERSION% +cd /tmp/qt-everywhere-opensource-src-%VERSION% ./configure //! [12] -- cgit v0.12 From af9304af3c462e120373f864d637e9c1db0787e2 Mon Sep 17 00:00:00 2001 From: Sarah Smith Date: Tue, 8 Dec 2009 15:36:41 +1000 Subject: Fix cleanup hooks error. Trying to fix QTBUG-6563, getting crash from cut-n-paste slippage, now fixed. Task-number: QTBUG-6563 Reviewed-by: Rhys Weatherley --- src/gui/image/qimagepixmapcleanuphooks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp index e411cd1..2aa61b8 100644 --- a/src/gui/image/qimagepixmapcleanuphooks.cpp +++ b/src/gui/image/qimagepixmapcleanuphooks.cpp @@ -106,8 +106,8 @@ void QImagePixmapCleanupHooks::executePixmapModificationHooks(QPixmap* pm) void QImagePixmapCleanupHooks::executePixmapDestructionHooks(QPixmap* pm) { QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks(); - for (int i = 0; i < h->pixmapModificationHooks.count(); ++i) - qt_image_and_pixmap_cleanup_hooks()->pixmapDestructionHooks[i](pm); + for (int i = 0; i < h->pixmapDestructionHooks.count(); ++i) + h->pixmapDestructionHooks[i](pm); if (qt_pixmap_cleanup_hook_64) qt_pixmap_cleanup_hook_64(pm->cacheKey()); -- cgit v0.12 From 91c47ba2c156e4dcaf9b2e03f7abf796c4828906 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Tue, 8 Dec 2009 08:50:14 +0100 Subject: Compile on Windows CE. Windows CE does not support Windows hook at all, so we need to call our hook function "manually" from process events. Task-number: QTBUG-6083 Reviewed-by: joerg --- src/corelib/kernel/qeventdispatcher_win.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index c6eef5e..c305341 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -509,7 +509,11 @@ LRESULT CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp) } } } +#ifdef Q_OS_WINCE + return 0; +#else return CallNextHookEx(0, code, wp, lp); +#endif } static HWND qt_create_internal_window(const QEventDispatcherWin32 *eventDispatcher) @@ -636,11 +640,13 @@ void QEventDispatcherWin32::createInternalHwnd() return; d->internalHwnd = qt_create_internal_window(this); +#ifndef Q_OS_WINCE // setup GetMessage hook needed to drive our posted events d->getMessageHook = SetWindowsHookEx(WH_GETMESSAGE, (HOOKPROC) qt_GetMessageHook, NULL, GetCurrentThreadId()); if (!d->getMessageHook) { qFatal("Qt: INTERNALL ERROR: failed to install GetMessage hook"); } +#endif // register all socket notifiers QList sockets = (d->sn_read.keys().toSet() @@ -731,6 +737,11 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags) } } if (haveMessage) { +#ifdef Q_OS_WINCE + // WinCE doesn't support hooks at all, so we have to call this by hand :( + (void) qt_GetMessageHook(0, PM_REMOVE, (LPARAM) &msg); +#endif + if (d->internalHwnd == msg.hwnd && msg.message == WM_QT_SENDPOSTEDEVENTS) { if (seenWM_QT_SENDPOSTEDEVENTS) { needWM_QT_SENDPOSTEDEVENTS = true; @@ -1065,9 +1076,11 @@ void QEventDispatcherWin32::closingDown() d->timerVec.clear(); d->timerDict.clear(); +#ifndef Q_OS_WINCE if (d->getMessageHook) UnhookWindowsHookEx(d->getMessageHook); d->getMessageHook = 0; +#endif } bool QEventDispatcherWin32::event(QEvent *e) -- cgit v0.12 From dfbdb86fd4614be9be17cbfb602ed5a3b5a38671 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 8 Dec 2009 09:10:40 +0100 Subject: Autotest: ensure that QSharedPointer does proper autocasting through function calls. Seen on qt-interest. Reviewed-by: Trust Me --- tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index ed9206c..0cb08f9 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -73,6 +73,7 @@ private slots: void forwardDeclaration2(); void memoryManagement(); void downCast(); + void functionCallDownCast(); void upCast(); void qobjectWeakManagement(); void noSharedPointerFromWeakQObject(); @@ -503,6 +504,15 @@ void tst_QSharedPointer::downCast() QCOMPARE(DerivedData::derivedDestructorCounter, destructorCount + 1); } +void functionDataByValue(QSharedPointer p) { Q_UNUSED(p); }; +void functionDataByRef(const QSharedPointer &p) { Q_UNUSED(p); }; +void tst_QSharedPointer::functionCallDownCast() +{ + QSharedPointer p(new DerivedData()); + functionDataByValue(p); + functionDataByRef(p); +} + void tst_QSharedPointer::upCast() { QSharedPointer baseptr = QSharedPointer(new DerivedData); -- cgit v0.12 From 76f82b74780cb252782c31e6e690f8529b43b38f Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 12 Nov 2009 13:45:41 +0100 Subject: Fixed searching and copy/paste from PDF documents. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously copy and paste from PDFs made by Qt would paste garbage into the target document, and searching was not possible. The bug happened because the internal buffer would open its data stream in truncate mode rather than append mode, thereby losing content, and producing a slightly corrupted PDF. Task: QTBUG-4912 Task: QTBUG-3661 RevBy: Trond Kjernåsen (cherry picked from commit f7ee0c9efcb6cb36a95f49bc998524e25480f8ba) --- src/gui/painting/qpdf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 65e4a1e..b5cf54c 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -141,7 +141,7 @@ namespace QPdf { fileBackingActive(false), handleDirty(false) { - dev->open(QIODevice::ReadWrite); + dev->open(QIODevice::ReadWrite | QIODevice::Append); } ByteStream::ByteStream(bool fileBacking) -- cgit v0.12 From 971acc6d34559a2c5035888a5891ea29ad8628af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 8 Dec 2009 14:30:38 +0100 Subject: Compile with -no-exceptions on Mac. qfontdialog_mac.mm needs to handle exceptions thrown by Cocoa, even if Qt is configured with if -no-exceptions. This ads a bit of qmake logic for the benefit of a single file, but I would like to keep -no-exceptions working. The savings are significant (around 10-15%). Revby: Richard Moe Gustavsen --- configure | 2 +- src/gui/dialogs/dialogs.pri | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 6dc3898..486dc0c 100755 --- a/configure +++ b/configure @@ -131,7 +131,7 @@ compilerSupportsFlag() cat >conftest.cpp < Date: Tue, 8 Dec 2009 16:28:43 +0000 Subject: Fixed uninitialized background artifacts in QWidget::render. backport of 64d38ba23b4acc46fdb9145f1953315573e3f8dc Reviewed-by: Anders Bakken --- src/gui/kernel/qwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 85c1955..91e43ce 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -4955,7 +4955,7 @@ void QWidgetPrivate::render_helper(QPainter *painter, const QPoint &targetOffset return; QPixmap pixmap(size); - if (!(renderFlags & QWidget::DrawWindowBackground)) + if (!(renderFlags & QWidget::DrawWindowBackground) || !isOpaque) pixmap.fill(Qt::transparent); q->render(&pixmap, QPoint(), toBePainted, renderFlags); -- cgit v0.12 From f3c37838ab149a8a570b7f1df987705815ae45c0 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Tue, 8 Dec 2009 17:10:57 +0100 Subject: QGtkStyle: support for the inner-border property in GtkButtons This additional padding was not taken into account up to now. It didn't matter for desktop themes, but Maemo5 uses a large (8pix) padding that can not be ignored. Reviewed-by: jbache --- src/gui/styles/qgtkstyle.cpp | 16 ++++++++++++++++ src/gui/styles/qgtkstyle_p.cpp | 2 ++ src/gui/styles/qgtkstyle_p.h | 2 ++ 3 files changed, 20 insertions(+) diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index afa3325..097a2b5 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -3375,12 +3375,28 @@ QIcon QGtkStyle::standardIconImplementation(StandardPixmap standardIcon, /*! \reimp */ QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const { + Q_D(const QGtkStyle); + QRect r = QCleanlooksStyle::subElementRect(element, option, widget); switch (element) { case SE_ProgressBarLabel: case SE_ProgressBarContents: case SE_ProgressBarGroove: return option->rect; + case SE_PushButtonContents: + if (!d->gtk_check_version(2, 10, 0)) { + GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton")); + GtkBorder *border = 0; + d->gtk_widget_style_get(gtkButton, "inner-border", &border, NULL); + if (border) { + r = option->rect.adjusted(border->left, border->top, -border->right, -border->top); + d->gtk_border_free(border); + } else { + r = option->rect.adjusted(1, 1, -1, -1); + } + r = visualRect(option->direction, option->rect, r); + } + break; default: break; } diff --git a/src/gui/styles/qgtkstyle_p.cpp b/src/gui/styles/qgtkstyle_p.cpp index 22dfc62..a644a5b 100644 --- a/src/gui/styles/qgtkstyle_p.cpp +++ b/src/gui/styles/qgtkstyle_p.cpp @@ -158,6 +158,7 @@ Ptr_gtk_window_get_type QGtkStylePrivate::gtk_window_get_type = 0; Ptr_gtk_widget_get_type QGtkStylePrivate::gtk_widget_get_type = 0; Ptr_gtk_rc_get_style_by_paths QGtkStylePrivate::gtk_rc_get_style_by_paths = 0; Ptr_gtk_check_version QGtkStylePrivate::gtk_check_version = 0; +Ptr_gtk_border_free QGtkStylePrivate::gtk_border_free = 0; Ptr_pango_font_description_get_size QGtkStylePrivate::pango_font_description_get_size = 0; Ptr_pango_font_description_get_weight QGtkStylePrivate::pango_font_description_get_weight = 0; @@ -416,6 +417,7 @@ void QGtkStylePrivate::resolveGtk() const gtk_widget_get_type =(Ptr_gtk_widget_get_type)libgtk.resolve("gtk_widget_get_type"); gtk_rc_get_style_by_paths =(Ptr_gtk_rc_get_style_by_paths)libgtk.resolve("gtk_rc_get_style_by_paths"); gtk_check_version =(Ptr_gtk_check_version)libgtk.resolve("gtk_check_version"); + gtk_border_free =(Ptr_gtk_border_free)libgtk.resolve("gtk_border_free"); pango_font_description_get_size = (Ptr_pango_font_description_get_size)libgtk.resolve("pango_font_description_get_size"); pango_font_description_get_weight = (Ptr_pango_font_description_get_weight)libgtk.resolve("pango_font_description_get_weight"); pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family"); diff --git a/src/gui/styles/qgtkstyle_p.h b/src/gui/styles/qgtkstyle_p.h index f6ab8a3..c27308f 100644 --- a/src/gui/styles/qgtkstyle_p.h +++ b/src/gui/styles/qgtkstyle_p.h @@ -176,6 +176,7 @@ typedef GtkWidget* (*Ptr_gtk_file_chooser_dialog_new)(const gchar *title, typedef void (*Ptr_gtk_file_chooser_set_current_name) (GtkFileChooser *, const gchar *); typedef gboolean (*Ptr_gtk_file_chooser_set_filename) (GtkFileChooser *chooser, const gchar *name); typedef gint (*Ptr_gtk_dialog_run) (GtkDialog*); +typedef void (*Ptr_gtk_border_free)(GtkBorder *); typedef guchar* (*Ptr_gdk_pixbuf_get_pixels) (const GdkPixbuf *pixbuf); typedef int (*Ptr_gdk_pixbuf_get_width) (const GdkPixbuf *pixbuf); @@ -371,6 +372,7 @@ public: static Ptr_gtk_widget_get_type gtk_widget_get_type; static Ptr_gtk_rc_get_style_by_paths gtk_rc_get_style_by_paths; static Ptr_gtk_check_version gtk_check_version; + static Ptr_gtk_border_free gtk_border_free; static Ptr_pango_font_description_get_size pango_font_description_get_size; static Ptr_pango_font_description_get_weight pango_font_description_get_weight; -- cgit v0.12 From c44f142cedf847bfb676eb70cb52f61a6c6ba232 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 9 Dec 2009 15:46:41 +1000 Subject: Fixed (unstable) tst_QTimeLine::currentTime test failure Use qFuzzyCompare instead of an exact floating point comparison when checking if valueChanged should be emitted. Task-number: QTBUG-6189 Reviewed-by: Dmytro Poplavskiy --- src/corelib/tools/qtimeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp index cd3483d..ce49e3f 100644 --- a/src/corelib/tools/qtimeline.cpp +++ b/src/corelib/tools/qtimeline.cpp @@ -125,7 +125,7 @@ void QTimeLinePrivate::setCurrentTime(int msecs) #ifdef QTIMELINE_DEBUG qDebug() << "QTimeLinePrivate::setCurrentTime: frameForTime" << currentTime << currentFrame; #endif - if (lastValue != q->currentValue()) + if (!qFuzzyCompare(lastValue, q->currentValue())) emit q->valueChanged(q->currentValue()); if (lastFrame != currentFrame) { const int transitionframe = (direction == QTimeLine::Forward ? endFrame : startFrame); -- cgit v0.12 From bc4077223affd542f5fb24e27a065b7999229654 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Wed, 9 Dec 2009 11:27:58 +0100 Subject: Mixed up top/bottom Reviewed-by: trustme --- src/gui/styles/qgtkstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 097a2b5..e10bb41 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -3389,7 +3389,7 @@ QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option, GtkBorder *border = 0; d->gtk_widget_style_get(gtkButton, "inner-border", &border, NULL); if (border) { - r = option->rect.adjusted(border->left, border->top, -border->right, -border->top); + r = option->rect.adjusted(border->left, border->top, -border->right, -border->bottom); d->gtk_border_free(border); } else { r = option->rect.adjusted(1, 1, -1, -1); -- cgit v0.12 From dd0ecf2c9abab285e14a398b3f901fbc69d48db1 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Thu, 10 Dec 2009 10:16:41 +1000 Subject: Put symbian-specific test inside symbian qmake scope. --- tests/auto/auto.pro | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 92d29ae..361ae8f 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -442,7 +442,6 @@ SUBDIRS += \ qsharedmemory \ qsidebar \ qsizegrip \ - qsoftkeymanager \ qsqldriver \ qsystemsemaphore \ qtconcurrentfilter \ @@ -477,6 +476,10 @@ embedded:!wince* { SUBDIRS += qtextpiecetable } +symbian { + SUBDIRS += qsoftkeymanager +} + # Enable the tests specific to QtXmlPatterns. If you add a test, remember to # update runQtXmlPatternsTests.sh too. Remember that this file, auto.pro, is # not respected by some test system, they just have a script which loop over -- cgit v0.12 From 94d45cc06dabb8b1f8fc98e9f9b3dfaf49d0c4d7 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 10 Dec 2009 14:21:25 +1000 Subject: Fix translation context for qsTr. Use the base of the file name as the translation context. (This was the original behavior before the switch to JSC.) Reviewed-by: Kent Hansen --- src/script/api/qscriptengine.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index b6aa872..1879367 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -33,6 +33,7 @@ #include "qscriptvalue_p.h" #include "qscriptvalueiterator.h" #include "qscriptclass.h" +#include "qscriptcontextinfo.h" #include "qscriptprogram.h" #include "qscriptprogram_p.h" #include "qdebug.h" @@ -698,9 +699,9 @@ JSC::JSValue JSC_HOST_CALL functionQsTr(JSC::ExecState *exec, JSC::JSObject*, JS return JSC::throwError(exec, JSC::GeneralError, "qsTranslate(): third argument (n) must be a number"); #ifndef QT_NO_QOBJECT QString context; -// ### implement context resolution -// if (ctx->parentContext()) -// context = QFileInfo(ctx->parentContext()->fileName()).baseName(); + QScriptContext *ctx = QScriptEnginePrivate::contextForFrame(exec); + if (ctx && ctx->parentContext()) + context = QFileInfo(QScriptContextInfo(ctx->parentContext()).fileName()).baseName(); #endif QString text(args.at(0).toString(exec)); #ifndef QT_NO_QOBJECT -- cgit v0.12 From b62c6de3eae005da146a9009f86851a1431b1892 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 11 Dec 2009 16:04:24 +1000 Subject: Add benchmark for QtScript translation functions. --- .../benchmarks/qscriptengine/tst_qscriptengine.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp index 8d5f6e6..1c787e9 100644 --- a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp +++ b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp @@ -72,6 +72,8 @@ private slots: void toStringHandle(); void castValueToQreal(); void nativeCall(); + void translation_data(); + void translation(); }; tst_QScriptEngine::tst_QScriptEngine() @@ -259,5 +261,24 @@ void tst_QScriptEngine::nativeCall() } } +void tst_QScriptEngine::translation_data() +{ + QTest::addColumn("text"); + QTest::newRow("no translation") << "\"hello world\""; + QTest::newRow("qsTr") << "qsTr(\"hello world\")"; + QTest::newRow("qsTranslate") << "qsTranslate(\"\", \"hello world\")"; +} + +void tst_QScriptEngine::translation() +{ + QFETCH(QString, text); + QScriptEngine engine; + engine.installTranslatorFunctions(); + + QBENCHMARK { + (void)engine.evaluate(text); + } +} + QTEST_MAIN(tst_QScriptEngine) #include "tst_qscriptengine.moc" -- cgit v0.12