summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2010-02-16 20:09:09 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-02-16 20:09:09 (GMT)
commit757779ae3d27c260214f88411de81e1c32a688b5 (patch)
treeab4954cf68ec794342b2f22730de87f858ed3ce2
parent1e7b737596db7be0a221aa44d1a329d3fdb5d6e3 (diff)
parent95d3bd3fc993d7c8c1fe92960c617a3392d87f66 (diff)
downloadQt-757779ae3d27c260214f88411de81e1c32a688b5.zip
Qt-757779ae3d27c260214f88411de81e1c32a688b5.tar.gz
Qt-757779ae3d27c260214f88411de81e1c32a688b5.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
-rw-r--r--src/corelib/corelib.pro16
-rw-r--r--src/dbus/qdbusintegrator.cpp27
-rw-r--r--src/gui/gui.pro27
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp10
-rw-r--r--src/gui/styles/qs60style.cpp41
-rw-r--r--src/gui/styles/qs60style_p.h2
-rw-r--r--src/gui/styles/qs60style_s60.cpp2
-rw-r--r--tests/auto/qdbusconnection/tst_qdbusconnection.cpp29
-rw-r--r--tools/configure/configureapp.cpp27
9 files changed, 135 insertions, 46 deletions
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 9a15bf1..efee610 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -35,4 +35,20 @@ symbian: {
# Workaroud for problems with paging this dll
MMP_RULES -= PAGED
MMP_RULES *= UNPAGED
+
+ # Partial upgrade SIS file
+ vendorinfo = \
+ "&EN" \
+ "; Localised Vendor name" \
+ "%{\"Nokia, Qt\"}" \
+ " " \
+ "; Unique Vendor name" \
+ ":\"Nokia, Qt\"" \
+ " "
+ pu_header = "; Partial upgrade package for testing QtCore changes without reinstalling everything" \
+ "$${LITERAL_HASH}{\"Qt corelib\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU"
+ partial_upgrade.pkg_prerules = pu_header vendorinfo
+ partial_upgrade.sources = qtcore.dll
+ partial_upgrade.path = c:/sys/bin
+ DEPLOYMENT = partial_upgrade $$DEPLOYMENT
}
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 44abf7b..6cb4924 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1937,7 +1937,7 @@ int QDBusConnectionPrivate::sendWithReplyAsync(const QDBusMessage &message, QObj
QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, timeout);
Q_ASSERT(pcall);
- // has it already finished (dispatched locally)?
+ // has it already finished with success (dispatched locally)?
if (pcall->replyMessage.type() == QDBusMessage::ReplyMessage) {
pcall->setReplyCallback(receiver, returnMethod);
processFinishedCall(pcall);
@@ -1945,33 +1945,24 @@ int QDBusConnectionPrivate::sendWithReplyAsync(const QDBusMessage &message, QObj
return 1;
}
+ // either it hasn't finished or it has finished with error
+ if (errorMethod) {
+ pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
+ connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), receiver, errorMethod,
+ Qt::QueuedConnection);
+ pcall->watcherHelper->moveToThread(thread());
+ }
+
// has it already finished and is an error reply message?
if (pcall->replyMessage.type() == QDBusMessage::ErrorMessage) {
- if (errorMethod) {
- pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
- connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), receiver, errorMethod);
- pcall->watcherHelper->moveToThread(thread());
- }
processFinishedCall(pcall);
delete pcall;
return 1;
}
- // has it already finished with error?
- if (pcall->replyMessage.type() != QDBusMessage::InvalidMessage) {
- delete pcall;
- return 0;
- }
-
pcall->autoDelete = true;
pcall->ref.ref();
-
pcall->setReplyCallback(receiver, returnMethod);
- if (errorMethod) {
- pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
- connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), receiver, errorMethod);
- pcall->watcherHelper->moveToThread(thread());
- }
return 1;
}
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 8ad3bac..d46f3b4 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -51,8 +51,27 @@ contains(DEFINES,QT_EVAL):include($$QT_SOURCE_TREE/src/corelib/eval.pri)
QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist
DEFINES += Q_INTERNAL_QAPP_SRC
-symbian:TARGET.UID3=0x2001B2DD
+symbian: {
+ TARGET.UID3=0x2001B2DD
+
+ # ro-section in gui can exceed default allocated space, so move rw-section a little further
+ QMAKE_LFLAGS.ARMCC += --rw-base 0x800000
+ QMAKE_LFLAGS.GCCE += -Tdata 0xC00000
+
+ # Partial upgrade SIS file
+ vendorinfo = \
+ "&EN" \
+ "; Localised Vendor name" \
+ "%{\"Nokia, Qt\"}" \
+ " " \
+ "; Unique Vendor name" \
+ ":\"Nokia, Qt\"" \
+ " "
+ pu_header = "; Partial upgrade package for testing QtGui changes without reinstalling everything" \
+ "$${LITERAL_HASH}{\"Qt gui\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU"
+ partial_upgrade.pkg_prerules = pu_header vendorinfo
+ partial_upgrade.sources = qtgui.dll
+ partial_upgrade.path = c:/sys/bin
+ DEPLOYMENT = partial_upgrade $$DEPLOYMENT
+}
-# ro-section in gui can exceed default allocated space, so more rw-section little further
-symbian-sbsv2: QMAKE_LFLAGS.ARMCC += --rw-base 0x800000
-symbian: QMAKE_LFLAGS.GCCE += -Tdata 0xC00000
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index 6cbf3d9..028ec48 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -149,11 +149,19 @@ void QS60WindowSurface::flush(QWidget *widget, const QRegion &region, const QPoi
Q_ASSERT(window);
QTLWExtra *topExtra = window->d_func()->maybeTopData();
Q_ASSERT(topExtra);
+ QRect qr = region.boundingRect();
if (!topExtra->inExpose) {
topExtra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again
- TRect tr = qt_QRect2TRect(region.boundingRect());
+ TRect tr = qt_QRect2TRect(qr);
widget->winId()->DrawNow(tr);
topExtra->inExpose = false;
+ } else {
+ // This handles the case when syncBackingStore updates content outside of the
+ // original drawing rectangle. This might happen if there are pending update()
+ // events at the same time as we get a Draw() from Symbian.
+ QRect drawRect = qt_TRect2QRect(widget->winId()->DrawableWindow()->GetDrawRect());
+ if (!drawRect.contains(qr))
+ widget->winId()->DrawDeferred();
}
}
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 14e9b95..ea7399f 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -289,6 +289,9 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter,
case SE_Editor:
drawFrame(SF_FrameLineEdit, painter, rect, flags | SF_PointNorth);
break;
+ case SE_DropArea:
+ drawPart(QS60StyleEnums::SP_QgnGrafOrgBgGrid, painter, rect, flags | SF_PointNorth);
+ break;
default:
break;
}
@@ -844,15 +847,18 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag
result.setWidth(pixelMetric(PM_Custom_FrameCornerWidth));
break;
- case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed:
case QS60StyleEnums::SP_QsnCpScrollHandleTopPressed:
- case QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed:
case QS60StyleEnums::SP_QsnCpScrollBgBottom:
- case QS60StyleEnums::SP_QsnCpScrollBgMiddle:
case QS60StyleEnums::SP_QsnCpScrollBgTop:
case QS60StyleEnums::SP_QsnCpScrollHandleBottom:
- case QS60StyleEnums::SP_QsnCpScrollHandleMiddle:
case QS60StyleEnums::SP_QsnCpScrollHandleTop:
+ case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed:
+ result.setHeight(pixelMetric(QStyle::PM_ScrollBarExtent));
+ result.setWidth(pixelMetric(QStyle::PM_ScrollBarExtent));
+ break;
+ case QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed:
+ case QS60StyleEnums::SP_QsnCpScrollBgMiddle:
+ case QS60StyleEnums::SP_QsnCpScrollHandleMiddle:
result.setHeight(pixelMetric(QStyle::PM_ScrollBarExtent));
result.setWidth(pixelMetric(QStyle::PM_ScrollBarSliderMin));
break;
@@ -2271,14 +2277,16 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
QS60StyleEnums::SkinParts skinPart =
(option->state & State_Open) ? QS60StyleEnums::SP_QgnIndiHlColSuper : QS60StyleEnums::SP_QgnIndiHlExpSuper;
int minDimension = qMin(option->rect.width(), option->rect.height());
- const int resizeValue = minDimension >> 1;
- minDimension += resizeValue; // Adjust the icon bigger because of empty space in svg icon.
QRect iconRect(option->rect.topLeft(), QSize(minDimension, minDimension));
- int verticalMagic(0);
- // magic values for positioning svg icon.
- if (option->rect.width() <= option->rect.height())
- verticalMagic = 3;
- iconRect.translate(3, verticalMagic - resizeValue);
+ const int magicTweak = 3;
+ int resizeValue = minDimension >> 1;
+ if (!QS60StylePrivate::isTouchSupported()) {
+ minDimension += resizeValue; // Adjust the icon bigger because of empty space in svg icon.
+ iconRect.setSize(QSize(minDimension, minDimension));
+ const int verticalMagic = (option->rect.width() <= option->rect.height()) ? magicTweak : 0;
+ resizeValue = verticalMagic - resizeValue;
+ }
+ iconRect.translate(magicTweak, resizeValue);
QS60StylePrivate::drawSkinPart(skinPart, painter, iconRect, flags);
}
}
@@ -2302,7 +2310,12 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
break;
case PE_PanelScrollAreaCorner:
break;
-
+ case PE_IndicatorItemViewItemDrop:
+ if (QS60StylePrivate::isTouchSupported())
+ QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_DropArea, painter, option->rect, flags);
+ else
+ commonStyleDraws = true;
+ break;
// todo: items are below with #ifdefs "just in case". in final version, remove all non-required cases
case PE_FrameLineEdit:
case PE_IndicatorDockWidgetResizeHandle:
@@ -2323,7 +2336,6 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
#endif //QT_NO_TOOLBAR
#ifndef QT_NO_COLUMNVIEW
case PE_IndicatorColumnViewArrow:
- case PE_IndicatorItemViewItemDrop:
#endif //QT_NO_COLUMNVIEW
case PE_FrameTabBarBase: // since tabs are in S60 always in navipane, let's use common style for tab base in Qt.
default:
@@ -2481,6 +2493,9 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
case SH_FormLayoutWrapPolicy:
retValue = QFormLayout::WrapLongRows;
break;
+ case SH_ScrollBar_ContextMenu:
+ retValue = false;
+ break;
default:
retValue = QCommonStyle::styleHint(sh, opt, widget, hret);
break;
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index eae2291..ea30b81 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -131,6 +131,7 @@ public:
SP_QgnGrafBarFrameSideL,
SP_QgnGrafBarFrameSideR,
SP_QgnGrafBarProgress,
+ SP_QgnGrafOrgBgGrid,
SP_QgnGrafScrollArrowDown,
SP_QgnGrafScrollArrowLeft,
SP_QgnGrafScrollArrowRight,
@@ -428,6 +429,7 @@ public:
SE_ScrollBarHandlePressedVertical,
SE_ButtonInactive,
SE_Editor,
+ SE_DropArea
};
enum SkinFrameElements {
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 872bc2b..d57b187 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -178,6 +178,8 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QgnGrafBarFrameSideL */ {KAknsIIDQgnGrafBarFrameSideL, EDrawIcon, ES60_All, -1,-1},
/* SP_QgnGrafBarFrameSideR */ {KAknsIIDQgnGrafBarFrameSideR, EDrawIcon, ES60_All, -1,-1},
/* SP_QgnGrafBarProgress */ {KAknsIIDQgnGrafBarProgress, EDrawIcon, ES60_All, -1,-1},
+ // No drop area for 3.x non-touch devices
+ /* SP_QgnGrafOrgBgGrid */ {KAknsIIDNone, EDrawIcon, ES60_3_X, EAknsMajorGeneric ,0x1eba}, //KAknsIIDQgnGrafOrgBgGrid
/* SP_QgnGrafScrollArrowDown */ {KAknsIIDQgnGrafScrollArrowDown, EDrawGulIcon, ES60_All, -1,-1},
/* SP_QgnGrafScrollArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawGulIcon, ES60_All, -1,-1},
/* SP_QgnGrafScrollArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawGulIcon, ES60_All, -1,-1},
diff --git a/tests/auto/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/qdbusconnection/tst_qdbusconnection.cpp
index 5e2f3a9..96209b1 100644
--- a/tests/auto/qdbusconnection/tst_qdbusconnection.cpp
+++ b/tests/auto/qdbusconnection/tst_qdbusconnection.cpp
@@ -80,6 +80,8 @@ class tst_QDBusConnection: public QObject
int signalsReceived;
public slots:
void oneSlot() { ++signalsReceived; }
+ void exitLoop() { ++signalsReceived; QTestEventLoop::instance().exitLoop(); }
+ void secondCallWithCallback();
private slots:
void noConnection();
@@ -102,6 +104,7 @@ private slots:
void multipleInterfacesInQObject();
void slotsWithLessParameters();
+ void nestedCallWithCallback();
public:
QString serviceName() const { return "com.trolltech.Qt.Autotests.QDBusConnection"; }
@@ -618,6 +621,32 @@ void tst_QDBusConnection::slotsWithLessParameters()
QCOMPARE(signalsReceived, 1);
}
+void tst_QDBusConnection::secondCallWithCallback()
+{
+ qDebug("Hello");
+ QDBusConnection con = QDBusConnection::sessionBus();
+ QDBusMessage msg = QDBusMessage::createMethodCall(con.baseService(), "/test", QString(),
+ "test0");
+ con.callWithCallback(msg, this, SLOT(exitLoop()), SLOT(secondCallWithCallback()));
+}
+
+void tst_QDBusConnection::nestedCallWithCallback()
+{
+ TestObject testObject;
+ QDBusConnection connection = QDBusConnection::sessionBus();
+ QVERIFY(connection.registerObject("/test", &testObject,
+ QDBusConnection::ExportAllContents));
+
+ QDBusMessage msg = QDBusMessage::createMethodCall(connection.baseService(), "/test", QString(),
+ "ThisFunctionDoesntExist");
+ signalsReceived = 0;
+
+ connection.callWithCallback(msg, this, SLOT(exitLoop()), SLOT(secondCallWithCallback()), 10);
+ QTestEventLoop::instance().enterLoop(15);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QCOMPARE(signalsReceived, 1);
+}
+
QString MyObject::path;
QTEST_MAIN(tst_QDBusConnection)
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 83b4d9c..9e0cb70 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2265,24 +2265,31 @@ void Configure::generateBuildKey()
QString build32Key = buildKey + "Windows " + compiler + " %1 " + build_options.join(" ") + " " + build_defines.join(" ");
QString build64Key = buildKey + "Windows x64 " + compiler + " %1 " + build_options.join(" ") + " " + build_defines.join(" ");
+ QString buildSymbianKey = buildKey + "Symbian " + build_options.join(" ") + " " + build_defines.join(" ");
build32Key = build32Key.simplified();
build64Key = build64Key.simplified();
- build32Key.prepend("# define ");
- build64Key.prepend("# define ");
+ buildSymbianKey = buildSymbianKey.simplified();
+ build32Key.prepend("# define ");
+ build64Key.prepend("# define ");
+ buildSymbianKey.prepend("# define ");
- QString buildkey = // Debug builds
- "#if (defined(_DEBUG) || defined(DEBUG))\n"
- "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
+ QString buildkey = "#if defined(__SYMBIAN32__)\n"
+ + buildSymbianKey + "\"\n"
+ "#else\n"
+ // Debug builds
+ "# if (defined(_DEBUG) || defined(DEBUG))\n"
+ "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
+ build64Key.arg("debug") + "\"\n"
- "# else\n"
+ "# else\n"
+ build32Key.arg("debug") + "\"\n"
- "# endif\n"
- "#else\n"
+ "# endif\n"
+ "# else\n"
// Release builds
- "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
+ "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
+ build64Key.arg("release") + "\"\n"
- "# else\n"
+ "# else\n"
+ build32Key.arg("release") + "\"\n"
+ "# endif\n"
"# endif\n"
"#endif\n";