From 97b5a40c5228aff51f7ce63c243bedcf1fc82452 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Fri, 12 Jun 2009 12:52:58 +0300 Subject: Fixed layout when orientation changed via AknAppUi::SetOrientationL. Task: 252798 --- src/gui/kernel/qapplication_s60.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index b33fe19..1347c06 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1088,6 +1088,9 @@ void QApplication::symbianResourceChange(int type) switch (type) { case KEikDynamicLayoutVariantSwitch: { + if (S60) + S60->updateScreenSize(); + #ifndef QT_NO_STYLE_S60 QS60Style *s60Style = 0; -- cgit v0.12 From 2a7d22330226c0a1ef6bb5c35f07241a05429913 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Fri, 12 Jun 2009 14:09:37 +0200 Subject: bug fix for doubleclick event for symbian --- src/gui/kernel/qapplication_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 1347c06..4c008fb 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -392,7 +392,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) alienWidget = S60->mousePressTarget; if (alienWidget != S60->lastPointerEventTarget) - if (type == QEvent::MouseButtonPress || QEvent::MouseButtonDblClick || type == QEvent::MouseMove) + if (type == QEvent::MouseButtonPress || type == QEvent::MouseButtonDblClick || type == QEvent::MouseMove) { //moved to another widget, create enter and leave events if (S60->lastPointerEventTarget) -- cgit v0.12 From 32bd7c09327f0234ac5415d029d76aa3bab1feaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Fri, 12 Jun 2009 17:38:20 +0300 Subject: S60Style: Itemview active icons are rendered as disabled and vice versa. --- src/gui/styles/qs60style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 83f1698..c6118d6 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1387,7 +1387,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags); // draw the icon - const QIcon::Mode mode = !(voptAdj.state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled; + const QIcon::Mode mode = (voptAdj.state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled; const QIcon::State state = voptAdj.state & QStyle::State_Open ? QIcon::On : QIcon::Off; voptAdj.icon.paint(painter, iconRect, voptAdj.decorationAlignment, mode, state); -- cgit v0.12 From ff0e9d7f950d757ccbe1bb5267cd514348dadf35 Mon Sep 17 00:00:00 2001 From: mread Date: Fri, 12 Jun 2009 16:17:21 +0100 Subject: extra autotests for exceptions --- .../qmainexceptions/tst_qmainexceptions.cpp | 205 +++++++++++++++++++++ 1 file changed, 205 insertions(+) diff --git a/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp b/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp index 103dd62..db80496 100644 --- a/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp +++ b/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp @@ -40,21 +40,38 @@ ****************************************************************************/ #include +#include #ifdef Q_OS_SYMBIAN +typedef void TLeavingFunc(); + class tst_qmainexceptions : public QObject { Q_OBJECT public: tst_qmainexceptions(){}; ~tst_qmainexceptions(){}; + + void TestSchedulerCatchesError(TLeavingFunc* f, int error); + void TestSymbianRoundTrip(int leave, int trap); + + bool event(QEvent *event); + public slots: void initTestCase(); private slots: void trap(); void cleanupstack(); void leave(); + void testTranslateBadAlloc(); + void testTranslateBigAlloc(); + void testRoundTrip(); + void testTrap(); + void testPropagation(); + void testDtor1(); + void testDtor2(); + void testNestedExceptions(); }; class CDummy : public CBase @@ -100,6 +117,194 @@ void tst_qmainexceptions::leave() __UHEAP_MARKEND; } +class CTestActive : public CActive + { +public: + CTestActive(TLeavingFunc* aFunc) : CActive(EPriorityStandard), iFunc(aFunc) + { + CActiveScheduler::Add(this); + } + ~CTestActive() + { + Cancel(); + } + void DoCancel() + {} + void Test() + { + // complete this AO in a nested scheduler, to make it synchronous + TRequestStatus* s = &iStatus; + SetActive(); + User::RequestComplete(s, KErrNone); + CActiveScheduler::Start(); + } + void RunL() + { + (*iFunc)(); + CActiveScheduler::Stop(); // will only get here if iFunc does not leave + } + TInt RunError(TInt aError) + { + error = aError; + CActiveScheduler::Stop(); // will only get here if iFunc leaves + return KErrNone; + } +public: + TLeavingFunc* iFunc; + int error; + }; + +void tst_qmainexceptions::TestSchedulerCatchesError(TLeavingFunc* f, int error) + { + CTestActive *act = new(ELeave) CTestActive(f); + act->Test(); + QCOMPARE(act->error, error); + delete act; + } + +void ThrowBadAlloc() +{ + throw std::bad_alloc(); +} + +void TranslateThrowBadAllocL() +{ + QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE(ThrowBadAlloc()); +} + +void tst_qmainexceptions::testTranslateBadAlloc() +{ + // bad_alloc should give KErrNoMemory in an AO + TestSchedulerCatchesError(&TranslateThrowBadAllocL, KErrNoMemory); +} + +void BigAlloc() +{ + int *x = new int[100000000]; + delete [] x; +} + +void TranslateBigAllocL() +{ + QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE(BigAlloc()); +} + +void tst_qmainexceptions::testTranslateBigAlloc() +{ + // this test will fail if new does not throw on failure, otherwise should give KErrNoMemory in AO + TestSchedulerCatchesError(&TranslateBigAllocL, KErrNoMemory); +} + +void tst_qmainexceptions::TestSymbianRoundTrip(int leave, int trap) +{ + // check that leave converted to exception, converted to error gives expected error code + int trapped; + QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR( + trapped, + QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION( + User::LeaveIfError(leave))); + QCOMPARE(trap, trapped); +} + +void tst_qmainexceptions::testRoundTrip() +{ + for (int e=-50; e<0; e++) + TestSymbianRoundTrip(e, e); + TestSymbianRoundTrip(KErrNone, KErrNone); + // positive error codes are not errors + TestSymbianRoundTrip(1, KErrNone); + TestSymbianRoundTrip(1000000000, KErrNone); +} + +void tst_qmainexceptions::testTrap() +{ + // testing qt_translateExceptionToSymbianErrorL + TRAPD(err, qt_translateExceptionToSymbianErrorL(std::bad_alloc())); + QCOMPARE(err, KErrNoMemory); +} + +bool tst_qmainexceptions::event(QEvent *aEvent) + { + if (aEvent->type() == QEvent::User+1) + throw std::bad_alloc(); + else if (aEvent->type() == QEvent::User+2) + { + QEvent event(QEvent::Type(QEvent::User+1)); + QApplication::sendEvent(this, &event); + } + return QObject::event(aEvent); + } + +void tst_qmainexceptions::testPropagation() +{ + // test exception thrown from event is propagated back to sender + QEvent event(QEvent::Type(QEvent::User+1)); + bool caught = false; + try { QApplication::sendEvent(this, &event); } + catch (const std::bad_alloc&) { caught = true; } + QCOMPARE(caught, true); + + // testing nested events propagate back to top level sender + caught = false; + QEvent event2(QEvent::Type(QEvent::User+2)); + try { QApplication::sendEvent(this, &event2); } + catch (const std::bad_alloc&) { caught = true; } + QCOMPARE(caught, true); +} + +void tst_qmainexceptions::testDtor1() +{ + // destructors work on exception + int i = 0; + struct SAutoInc { + SAutoInc(int& aI) : i(aI) { ++i; } + ~SAutoInc() { --i; } + int &i; + } ai(i); + QCOMPARE(i, 1); + try { + SAutoInc ai2(i); + QCOMPARE(i, 2); + throw std::bad_alloc(); + QFAIL("should not get here"); + } catch (const std::bad_alloc&) { + QCOMPARE(i, 1); + } + QCOMPARE(i, 1); +} + +void tst_qmainexceptions::testDtor2() +{ + // memory is cleaned up correctly on exception + // this crashes with winscw compiler build < 481 + __UHEAP_MARK; + try { + QString str("abc"); + str += "def"; + throw std::bad_alloc(); + QFAIL("should not get here"); + } catch (const std::bad_alloc&) { } + __UHEAP_MARKEND; +} + +void tst_qmainexceptions::testNestedExceptions() +{ + // throwing exceptions while handling exceptions + struct Oops { + Oops* next; + Oops(int level) : next(level > 0 ? new Oops(level-1) : 0) {} + ~Oops() { + try { throw std::bad_alloc(); } + catch (const std::exception&) {delete next;} + } + }; + try { + Oops oops(5); + throw std::bad_alloc(); + } + catch (const std::exception&) {} +} + QTEST_MAIN(tst_qmainexceptions) #include "tst_qmainexceptions.moc" -- cgit v0.12 From 1a97bc5091f8b302940b7cc8eb1dbb55c3411d64 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 12 Jun 2009 21:05:17 +0200 Subject: Crash fix for task #255989 Hold a QPointer to the widget with the context menu. After the menu pops up, the focussed widget looses focus and may be deleted (like it happens in this case with the item editor). Testing for isNull() instead of crashing. It would be great to not even add the "Action" entry to the system menu but in that moment we don't know that the current focuswidget will soon disappear. That's still a Todo. --- src/gui/widgets/qmenu_symbian.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index c7b117e..8983a50 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -74,7 +74,7 @@ struct SymbianMenuItem static QList symbianMenus; static QList nativeMenuBars; static uint qt_symbian_menu_static_cmd_id = QT_FIRST_MENU_ITEM; -static QWidget* widgetWithContextMenu=0; +static QPointer widgetWithContextMenu; static QList contextMenuActionList; static QAction contextAction(0); static int contexMenuCommand=0; @@ -254,7 +254,7 @@ Q_GUI_EXPORT void qt_symbian_show_submenu( CEikMenuPane* menuPane, int id) void QMenuBarPrivate::symbianCommands(int command) { - if (command == contexMenuCommand) { + if (command == contexMenuCommand && !widgetWithContextMenu.isNull()) { QContextMenuEvent* event = new QContextMenuEvent(QContextMenuEvent::Keyboard, QPoint(0,0)); QCoreApplication::postEvent(widgetWithContextMenu, event); } -- cgit v0.12 From 9b34c6dffcb19664e336d4b51092e042e861f475 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 12 Jun 2009 21:14:05 +0200 Subject: Translate "Actions" text --- src/gui/widgets/qmenu_symbian.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index 8983a50..69ce981 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -303,7 +303,7 @@ QMenuBarPrivate::QSymbianMenuBarPrivate::~QSymbianMenuBarPrivate() deleteAll( &symbianMenus ); symbianMenus.clear(); d = 0; - rebuild(); + rebuild(); } QMenuPrivate::QSymbianMenuPrivate::QSymbianMenuPrivate() @@ -393,7 +393,7 @@ void QMenuBarPrivate::QSymbianMenuBarPrivate::insertNativeMenuItems(const QList< symbianActionTopLevel->parent = 0; symbianActionTopLevel->command = qt_symbian_menu_static_cmd_id++; qt_symbian_insert_action(symbianActionTopLevel, &symbianMenus); - } + } } @@ -409,11 +409,10 @@ void QMenuBarPrivate::QSymbianMenuBarPrivate::rebuild() contextMenuActionList.clear(); if (widgetWithContextMenu) { contexMenuCommand = qt_symbian_menu_static_cmd_id; - contextAction.setText(QString("Actions")); + contextAction.setText(QMenuBar::tr("Actions")); contextMenuActionList.append(&contextAction); insertNativeMenuItems(contextMenuActionList); } - } QT_END_NAMESPACE -- cgit v0.12 From a612366300aef70d2574b3f738afebdb106f1214 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 15 Jun 2009 10:28:31 +0300 Subject: Added error handling to qdesktopservices example when openUrl fails. Now qdesktopservices example will show message box if openUrl call fails i.e. returns false. --- demos/embedded/desktopservices/contenttab.cpp | 12 +++++++++++- demos/embedded/desktopservices/contenttab.h | 2 +- demos/embedded/desktopservices/linktab.cpp | 9 +++++++++ demos/embedded/desktopservices/linktab.h | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/demos/embedded/desktopservices/contenttab.cpp b/demos/embedded/desktopservices/contenttab.cpp index 450a080..bdc5e03 100644 --- a/demos/embedded/desktopservices/contenttab.cpp +++ b/demos/embedded/desktopservices/contenttab.cpp @@ -41,6 +41,7 @@ // EXTERNAL INCLUDES #include +#include #include #include #include @@ -135,10 +136,19 @@ void ContentTab::keyPressEvent(QKeyEvent *event) } } +void ContentTab::handleErrorInOpen(QListWidgetItem *item) +{ + Q_UNUSED(item); + QMessageBox::warning( this, tr("Operation Failed"), tr("Unkown error!"), QMessageBox::Close); +} + // NEW SLOTS void ContentTab::openItem(QListWidgetItem *item) { - QDesktopServices::openUrl(itemUrl(item)); + bool ret = QDesktopServices::openUrl(itemUrl(item)); + if(!ret) + handleErrorInOpen(item); } + // End of File diff --git a/demos/embedded/desktopservices/contenttab.h b/demos/embedded/desktopservices/contenttab.h index a5a402e..8d37209 100644 --- a/demos/embedded/desktopservices/contenttab.h +++ b/demos/embedded/desktopservices/contenttab.h @@ -83,7 +83,7 @@ protected: // New Methods virtual void populateListWidget(); virtual QString itemName(const QFileInfo &item); virtual QUrl itemUrl(QListWidgetItem *item); - + virtual void handleErrorInOpen(QListWidgetItem *item); protected: void keyPressEvent(QKeyEvent *event); diff --git a/demos/embedded/desktopservices/linktab.cpp b/demos/embedded/desktopservices/linktab.cpp index b4ab308..58d1cc6 100644 --- a/demos/embedded/desktopservices/linktab.cpp +++ b/demos/embedded/desktopservices/linktab.cpp @@ -41,6 +41,7 @@ // EXTERNAL INCLUDES #include +#include #include // INTERNAL INCLUDES @@ -75,5 +76,13 @@ QUrl LinkTab::itemUrl(QListWidgetItem *item) return QUrl(); } } +void LinkTab::handleErrorInOpen(QListWidgetItem *item) +{ + if(m_MailToItem == item) { + QMessageBox::warning( this, tr("Operation Failed"), tr("Please check that you have\ne-mail accunt defined"), QMessageBox::Close); + } else { + ContentTab::handleErrorInOpen(item); + } +} // End of file diff --git a/demos/embedded/desktopservices/linktab.h b/demos/embedded/desktopservices/linktab.h index 2ce1094..a9c9868 100644 --- a/demos/embedded/desktopservices/linktab.h +++ b/demos/embedded/desktopservices/linktab.h @@ -71,6 +71,7 @@ public: // Constructors & Destructors protected: // Derived Methods virtual void populateListWidget(); virtual QUrl itemUrl(QListWidgetItem *item); + virtual void handleErrorInOpen(QListWidgetItem *item); private: // Used variables QListWidgetItem *m_WebItem; -- cgit v0.12 From cdb6cf0cd190b9d7373a4a295ef3ef65eedc6b53 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 15 Jun 2009 10:30:46 +0300 Subject: Added placeholder to create e-mail account in qdesktopservices. Currently e-mail sending with qdesktopservices::openUrl works in Symbian only if e-mail account already exists. The CSendUI API which is similar to RSendAs API we currently use, would provide that e-mail account creation service for us automatically but it requires so extensive capabilities that we cannot use it. --- src/gui/util/qdesktopservices_s60.cpp | 75 ++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp index d53c046..3588ec9 100644 --- a/src/gui/util/qdesktopservices_s60.cpp +++ b/src/gui/util/qdesktopservices_s60.cpp @@ -89,38 +89,51 @@ static void handleMailtoSchemeL(const QUrl &url) User::LeaveIfError(sendAs.Connect()); CleanupClosePushL(sendAs); - RSendAsMessage sendAsMessage; - sendAsMessage.CreateL(sendAs, KUidMsgTypeSMTP); - CleanupClosePushL(sendAsMessage); - - - // Subject - sendAsMessage.SetSubjectL(qt_QString2TPtrC(subject)); - - // Body - sendAsMessage.SetBodyTextL(qt_QString2TPtrC(body)); - - // To - foreach(QString item, recipients) - sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientTo ); - - foreach(QString item, tos) - sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientTo ); - - // Cc - foreach(QString item, ccs) - sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientCc ); - - // Bcc - foreach(QString item, bccs) - sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientBcc ); - - // send the message - sendAsMessage.LaunchEditorAndCloseL(); - - // sendAsMessage (already closed) - CleanupStack::Pop(); + CSendAsAccounts* accounts = CSendAsAccounts::NewL(); + CleanupStack::PushL(accounts); + sendAs.AvailableAccountsL(KUidMsgTypeSMTP, *accounts); + TInt count = accounts->Count(); + CleanupStack::PopAndDestroy(accounts); + + if(!count) { + // TODO: we should try to create account if count == 0 + // CSendUi would provide account creation service for us, but it requires ridicilous + // capabilities: LocalServices NetworkServices ReadDeviceData ReadUserData WriteDeviceData WriteUserData + User::Leave(KErrNotSupported); + } else { + RSendAsMessage sendAsMessage; + sendAsMessage.CreateL(sendAs, KUidMsgTypeSMTP); + CleanupClosePushL(sendAsMessage); + + + // Subject + sendAsMessage.SetSubjectL(qt_QString2TPtrC(subject)); + + // Body + sendAsMessage.SetBodyTextL(qt_QString2TPtrC(body)); + + // To + foreach(QString item, recipients) + sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientTo ); + + foreach(QString item, tos) + sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientTo ); + + // Cc + foreach(QString item, ccs) + sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientCc ); + + // Bcc + foreach(QString item, bccs) + sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientBcc ); + + // send the message + sendAsMessage.LaunchEditorAndCloseL(); + + // sendAsMessage (already closed) + CleanupStack::Pop(); + } // sendAs CleanupStack::PopAndDestroy(); } -- cgit v0.12 From 56942fc52e637e6b721ddd8e11b84e1855c6b84d Mon Sep 17 00:00:00 2001 From: Markku Luukkainen Date: Mon, 15 Jun 2009 09:40:27 +0200 Subject: Better text to label --- examples/widgets/softkeys/softkeys.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/widgets/softkeys/softkeys.cpp b/examples/widgets/softkeys/softkeys.cpp index 87d11c9..083d05c 100644 --- a/examples/widgets/softkeys/softkeys.cpp +++ b/examples/widgets/softkeys/softkeys.cpp @@ -46,7 +46,7 @@ MainWindow::MainWindow(QWidget *parent) { central = new QWidget(this); setCentralWidget(central); - infoLabel = new QLabel(tr("Funky stuff in menu!")); + infoLabel = new QLabel(tr("Open menu to start!")); layout = new QVBoxLayout; layout->addWidget(infoLabel); -- cgit v0.12 From 47ec0f00869019fd7ea08577b9906209dd4bdf55 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 15 Jun 2009 10:22:09 +0200 Subject: export QSymbianLeaveException --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 450fd86..10dee86 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2314,7 +2314,7 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf(); #include -class QSymbianLeaveException : public std::exception +class Q_CORE_EXPORT QSymbianLeaveException : public std::exception { public: inline QSymbianLeaveException(int err) : error(err) {} -- cgit v0.12 From b36117b3ca028da664075b2d249f2e106e54a8f4 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 15 Jun 2009 12:44:10 +0300 Subject: Added my changes to Tower changes document. --- dist/changes-4.5.2-tower | 70 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 11 deletions(-) diff --git a/dist/changes-4.5.2-tower b/dist/changes-4.5.2-tower index 1a039ba..4e12ea2 100644 --- a/dist/changes-4.5.2-tower +++ b/dist/changes-4.5.2-tower @@ -56,46 +56,94 @@ Features Optimizations ------------- -- todo - * todo +- qdrawhelper + * Optimized drawing operations for RVCT builds, particulary for ARMV6. **************************************************************************** * Build issues * **************************************************************************** -- todo +- QTest + * Fixed testlib export macros for RVCT builds. **************************************************************************** * Changes to existing classes * **************************************************************************** -- todo - * todo +- QPluginLoader + * QPluginLoader will look for plugin stubs from the same folder on other + drives if it can't find them from the indicated drive. + +- QEventDispatcher + * Lowered the timeout for reprioritizing the process to 100ms **************************************************************************** * Examples and demos * **************************************************************************** -- todo - * todo +- Deform, Pathstroke, and Wiggly + * Removed Symbian specific animation timer fixes since more generic + fix was made to event dispatcher. + +- SecureSocketClient + * Fixed build issue caused by lack of cursor. + +- Fluidlauncher + * Removed ugly workaround to make emulator deployment work correctly, + since the issue has been fixed in qmake. + * Updated screenshots to S60 style + **************************************************************************** * Tools * **************************************************************************** -- todo - * todo +- qmake + * Support for generating Symbian "test" targets: CONFIG += symbian_test. + * Support for Symbian Build System, version 2 (aka Raptor) via + symbian-sbsv2 mkspec. + * PAGED keyword is added to all MMP files by default, except in S60 3.1 + builds. + * Read-only flag is no longer preserved when deploying files into + emulator environment. + * Changed the timestamp to ISO format in all files generated + by qmake for symbian-* mkspecs. + * Qt's VERSION variable will now generate VERSION keyword in mmp files. + * Made Open C include paths handling bit more robust. + +- configure + * -cetest is no longer a supported switch for configure. + +- Release package creation + * Removed the obsolete script to create release package. + +- Createpackage script + * Now creates packages with .sis suffix. + +- Patch_capabilities script + * Will now patch also vendor id. **************************************************************************** * Plugins * **************************************************************************** -- todo - * todo +- S60 version specific plugins + * Isolated S60 version dependent functionality to S60 version specific + plugins (qts60plugin_x_y.dll) to make it possible for single build to + run on any supported device, even if with reduced functionality on + some. + **************************************************************************** * Important Behavior Changes * **************************************************************************** +- Qt libs + * Qt libs are now built with "All -Tcb" capabilities always. It is now + always necessary to run patch_capabilities.pl script if self-signing + of Qt libs is desired. + * QtCore and QtSql made UNPAGED as workaround for an obscure crash + when they are paged. + - todo * todo -- cgit v0.12 From 2621111ad1424c621e48fc2b3f5774a5bbfa9f3f Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 15 Jun 2009 13:02:31 +0200 Subject: doc: remove qdoc warnings --- doc/src/platform-notes.qdoc | 2 +- doc/src/symbian-exceptionsafety.qdoc | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/src/platform-notes.qdoc b/doc/src/platform-notes.qdoc index 63b721a..53db855 100644 --- a/doc/src/platform-notes.qdoc +++ b/doc/src/platform-notes.qdoc @@ -521,7 +521,7 @@ supported by Qt can be found on the \l{Supported Platforms} page. For information about mixing exceptions with symbian leaves, - see \l QSymbianLeaveException. + see \l{Exception Safety with Symbian} */ /*! diff --git a/doc/src/symbian-exceptionsafety.qdoc b/doc/src/symbian-exceptionsafety.qdoc index 212f707..ea9e9b8 100644 --- a/doc/src/symbian-exceptionsafety.qdoc +++ b/doc/src/symbian-exceptionsafety.qdoc @@ -80,11 +80,11 @@ Symbian leaves to standard C++ exceptions. The following help is provided: \list - \o \l qt_translateSymbianErrorToException(int error) takes a Symbian + \o \l qt_translateSymbianErrorToException() takes a Symbian error code and throws an appropriate exception to represent it. This will do nothing if the error code is not in fact an error. The function is equivalent to Symbian's \c User::LeaveIfError. - \o \l QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION(f) takes a Symbian leaving + \o \l QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION() takes a Symbian leaving code fragment f and runs it under a trap harness converting any resulting error into an exception. \o \c TRAP and \c TRAPD from the Symbian libraries can be used to convert @@ -113,18 +113,18 @@ provided: \list - \o \l qt_translateExceptionToSymbianError(const std::exception& ex) - + \o \l qt_translateExceptionToSymbianError() - this takes a standard exception and gives an appropriate Symbian error code. If no mapping is known for the exception type, \c KErrGeneral is returned. - \o \l qt_translateExceptionToSymbianErrorL(const std::exception& ex) - + \o \l qt_translateExceptionToSymbianErrorL() - this takes a standard exception and generates an appropriate Symbian leave. - \o \l QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR(err, f) - this macro + \o \l QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR() - this macro takes the standard C++ code fragment \c f, catches any std::exceptions thrown from it, and sets err to the corresponding Symbian error code. err is set to \c KErrNone otherwise. - \o \l QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE(f) - this macro takes the + \o \l QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE() - this macro takes the standard C++ code fragment \c f, catches any std::exceptions thrown from it, and throws a corresponding Symbian leave. \endlist -- cgit v0.12 From a6942e6ac4a734a4251573b9c10ed8470099fc6a Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 15 Jun 2009 13:02:40 +0200 Subject: move QSymbianLeaveException to the *.cpp file don't need to include stl's header in qglobal.h also updated documentation --- src/corelib/global/qglobal.cpp | 48 +++++++++++++++--------------------------- src/corelib/global/qglobal.h | 12 ++--------- 2 files changed, 19 insertions(+), 41 deletions(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 6590ea6..e53fd2d 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -3215,7 +3215,8 @@ bool QInternal::callFunction(InternalFunction func, void **args) #include /*! \macro QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION(function) - \relates QSymbianLeaveException + \relates + \ingroup qts60 TRAP leaves from Symbian \a function and throws an appropriate standard C++ exception instead. @@ -3241,7 +3242,7 @@ bool QInternal::callFunction(InternalFunction func, void **args) */ /*! \macro QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR(error, function) - \relates QSymbianLeaveException + \relates \ingroup qts60 Catch standard C++ exceptions from a \a function and convert them to a Symbian OS @@ -3272,7 +3273,7 @@ bool QInternal::callFunction(InternalFunction func, void **args) */ /*! \macro QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE(function) - \relates QSymbianLeaveException + \relates \ingroup qts60 Catch standard C++ exceptions from \a function and convert them to Symbian OS @@ -3298,37 +3299,22 @@ bool QInternal::callFunction(InternalFunction func, void **args) \sa QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION(), QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR() */ -/*! \class QSymbianLeaveException - \ingroup qts60 - \brief The QSymbianLeaveException class represents a block of Symbian leave code. - - \warning This class is only available on Symbian. -*/ - -/*! \fn QSymbianLeaveException::QSymbianLeaveException(int error) +#include - Constructs a QSymbianLeaveException object that stores the given - Symbian \a error code. -*/ - -/*! \fn const char *QSymbianLeaveException::what() const - - Returns a C-style character string describing the general - cause of the current error. - - The string is not localized. -*/ -const char *QSymbianLeaveException::what() const throw() +class QSymbianLeaveException : public std::exception { - static char msg[36]; - snprintf(msg, sizeof(msg), "Symbian leave exception %d", error); - return msg; -} +public: + inline QSymbianLeaveException(int err) : error(err) {} + inline const char* what() const throw() { return "Symbian leave exception"; } + +public: + int error; +}; -/*! \relates QSymbianLeaveException +/*! \relates \ingroup qts60 - Throws a QSymbianLeaveException if the \a error parameter is a symbian error code. + Throws an exception if the \a error parameter is a symbian error code. This is the exception throwing equivalent of Symbian's User::LeaveIfError. \warning This function is only available on Symbian. @@ -3347,7 +3333,7 @@ void qt_translateSymbianErrorToException(int error) } } -/*! \relates QSymbianLeaveException +/*! \relates \ingroup qts60 Convert a caught standard C++ exception \a aThrow to a Symbian leave @@ -3361,7 +3347,7 @@ void qt_translateExceptionToSymbianErrorL(const std::exception& aThrow) User::Leave(qt_translateExceptionToSymbianError(aThrow)); } -/*! \relates QSymbianLeaveException +/*! \relates \ingroup qts60 Convert a caught standard C++ exception \a aThrow to a Symbian error code diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 10dee86..825b7e8 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2312,16 +2312,8 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf(); #if defined(Q_OS_SYMBIAN) -#include - -class Q_CORE_EXPORT QSymbianLeaveException : public std::exception -{ -public: - inline QSymbianLeaveException(int err) : error(err) {} - const char* what() const throw(); -public: - int error; -}; +// forward declare std::exception +namespace std { class exception; } Q_CORE_EXPORT void qt_translateSymbianErrorToException(int error); Q_CORE_EXPORT void qt_translateExceptionToSymbianErrorL(const std::exception& ex); -- cgit v0.12 From 7887079cbb5e543728d205b8358163c25d31fbfa Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 15 Jun 2009 14:28:12 +0300 Subject: Updated changes-4.5.2-tower. --- dist/changes-4.5.2-tower | 119 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 115 insertions(+), 4 deletions(-) diff --git a/dist/changes-4.5.2-tower b/dist/changes-4.5.2-tower index 4e12ea2..0e1215e 100644 --- a/dist/changes-4.5.2-tower +++ b/dist/changes-4.5.2-tower @@ -28,7 +28,8 @@ New modules ----------- - QtSql - * todo + * Implemented QtSql module with sqlite3 backend. For now backend is + provided only in binary format. - QtWebkit * todo - Phonon @@ -44,12 +45,19 @@ New classes Ported classes -------------- -- todo - * todo +- QSound + * Implemented CMdaAudioPlayerUtility based Symbian backend for QSound. +- QLocalSocket and QLocalServer + * Added support for QLocalSocket and QLocalServer on Symbian Features -------- +- QApplication + * Implemented QApplication::beep() for Symbian +- QSslSocket + * Added support for -openssl option i.e. runtime resolving of OpenSSL + symbols - todo * todo @@ -58,6 +66,33 @@ Optimizations - qdrawhelper * Optimized drawing operations for RVCT builds, particulary for ARMV6. + +- qwidget_s60.cpp + * Avoid unnecessary calls to FocusChanged in Symbian + +**************************************************************************** +* Code clean-up * +**************************************************************************** + +- Cleanup qeventdispatcher_unix.cpp + * 247268: All qeventdispatcher_unix.cpp changes were reverted since, + this file is not anymore used in Symbian OS branch. +- Cleanup QtNetwork workarounds implemented earlier due to Open C bugs. + * 247287: Removed getaddrinfo workaround + * 247288: Removed waitForConnected workaround + * 247289: Removed qt_socket_accept workaround + * 247290: Removed qt_socket_connect workaround + * 247290: Removed E32IONREAD workaround + * 247293: Removed nativeHasPendingDatagrams workaround + * 247295: Removed QNativeSocketEnginePrivate::nativeRead EPIPE + workaround +- Other code clean-ups + * 247278: Removed unnecessary includes from qbackingstore.cpp. + * Fixed Q_OS_SYMBIAN ifdef usage in qfiledialog_p.h + * 247272: Removed qtestnetworkservers.h dependency, used + network-settings.h + * Revert "Work around compiler bug on Nokia Metrowerks compiler." + **************************************************************************** * Build issues * @@ -70,6 +105,9 @@ Optimizations * Changes to existing classes * **************************************************************************** +- QDesktopServices + * Fixed forwardslash/backslash usage as an path separator + - QPluginLoader * QPluginLoader will look for plugin stubs from the same folder on other drives if it can't find them from the indicated drive. @@ -77,20 +115,85 @@ Optimizations - QEventDispatcher * Lowered the timeout for reprioritizing the process to 100ms +- QNetworkInterface + * Fixed R-handle leak in Symbian version of qnetworkinterface_unix.cpp + * Introduced a new qnetworkinterface_symbian.cpp, because there wasn't + really anything common to UNIX equivalent + +- QHostInfo + * Added support for host lookups with multiple ipv4 addresses. + +- QUdpSocket + * Updated BindFlag documentation to reflect behaviour on Symbian OS + +- QLocale + * Removed workaround for missing tzname symbol, fixes QLocal timeZone + implementation for Symbian. + +- QTemporaryFile + * Fixed temporary file rename in Symbian OS. + +- QThread + * Fix for thread termination in Symbian OS. + +- QIoDevice + * Fixed compilation error when QIODEVICE_DEBUG is defined. + +- QS60Style + * Added subElementRect implementation for SE_ItemViewItemCheckIndicator. + +- QDesktopServices + * Switched QDesktopServices mail-to URL handling to RSendAs in Symbian, + due to the fact that CSendUi requires extensive capabilities to work + correctly. Currently e-mail sending with qdesktopservices::openUrl + works in Symbian only if e-mail account already exists. + +- QCoeFepInputContext (non-public) + * Fixes FEP crash when changing the focused Qt widget to NULL. + +- QApplication + * 252798: Fixed layout when orientation changed via + AknAppUi::SetOrientationL. + +- QUdpSocket + * Wrote hack for QUdpSocket::writeDatagram return value in Symbian OS. + +- QNativeSocketEnginePrivate (non-public) + * Changed select to listen also expectfds in Symbain OS for given + sockets (Workaround to Open C bug). + * Fix to Open C bug: Socket connect failure is indicated exception set. + +- QEventDispatcherSymbian (non-public) + * Fixed ASSERT panic in Symbian event dispatcher + * 246600: Fix problem in eventdispatcher destructor / AO canceling + * Fixed active scheduler removal when calling QThread::terminate + * Fix to Open C bug: select sometimes returns -1 and errno is + ECONNREFUSED + **************************************************************************** * Examples and demos * **************************************************************************** - +- Drilldown + * Added to demonstrate QtSql usage in Symbian OS + - Deform, Pathstroke, and Wiggly * Removed Symbian specific animation timer fixes since more generic fix was made to event dispatcher. +- Ftp + * Enabled default iap setting for FTP example + +- DesktopServices + * Implemented content filters for desktopservices example. + * Added error handling to qdesktopservices example when openUrl fails. + - SecureSocketClient * Fixed build issue caused by lack of cursor. - Fluidlauncher * Removed ugly workaround to make emulator deployment work correctly, since the issue has been fixed in qmake. + * Included drilldown to demonstrate QtSql usage * Updated screenshots to S60 style @@ -113,6 +216,8 @@ Optimizations - configure * -cetest is no longer a supported switch for configure. + * -stl option is enabled by default for Symbian OS + * -openssl option is enabled by default for Symbian OS. - Release package creation * Removed the obsolete script to create release package. @@ -122,6 +227,12 @@ Optimizations - Patch_capabilities script * Will now patch also vendor id. + +**************************************************************************** +* Documnetation * +**************************************************************************** +- qmake-manual + * 250370: Added documentation for ICON keyword **************************************************************************** * Plugins * -- cgit v0.12 From 8dd4a3bcfb8d6ec011119459f91737f7e48e885a Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 15 Jun 2009 13:41:05 +0200 Subject: doc: document operator== and != --- src/corelib/tools/qscopedpointer.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index 0239575..6a1ffb6 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -134,6 +134,21 @@ */ /*! + \fn bool QScopedPointer::operator==(const QScopedPointer &other) const + + Equality operator. Returns true if the scoped pointer \a other + is pointing to the same object as this pointer, otherwise returns false. +*/ + + +/*! + \fn bool QScopedPointer::operator!=(const QScopedPointer *other) const + + Inequality operator. Returns true if the scoped pointer \a other + is not pointing to the same object as this pointer, otherwise returns false. +*/ + +/*! \fn bool QScopedPointer::isNull() const Returns \c true if this object is holding a pointer that is \c null. -- cgit v0.12 From 06dad6387cd198852448085b470e3a9c7343f6af Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 15 Jun 2009 13:49:29 +0200 Subject: doc: introduce qts60 group to silence qdoc warnings --- doc/src/topics.qdoc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/src/topics.qdoc b/doc/src/topics.qdoc index 6ef3a89..09a86bd 100644 --- a/doc/src/topics.qdoc +++ b/doc/src/topics.qdoc @@ -300,3 +300,14 @@ including ARM, Intel x86, MIPS and SH-4. \endlist \endtable */ + +/*! +\group qts60 +\title Qt for S60 +\ingroup topics +\brief Documents related to Qt for S60 + +\list + \o \l {Exception Safety with Symbian} +\endlist +*/ -- cgit v0.12 From 217d263ee1feb5a0c2b19d634093f4c7975ac7c9 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 15 Jun 2009 14:17:17 +0200 Subject: Fixes leak introduced by QScopedPointer QPainterPath is kinda evil with a somewhat public private class and a really private cast, so we need to up-cast the d pointer when deleting. RevBy: aportale --- src/gui/painting/qpainterpath.cpp | 18 ++++++++++++++++++ src/gui/painting/qpainterpath.h | 6 +++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 12dbc62..635218e 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -73,6 +73,24 @@ QT_BEGIN_NAMESPACE +struct QPainterPathPrivateHandler +{ + static inline void cleanup(QPainterPathPrivate *d) + { + // note - we must up-cast to QPainterPathData since QPainterPathPrivate + // has a non-virtual destructor! + if (d && !d->ref.deref()) + delete static_cast(d); + } + + static inline void reset(QPainterPathPrivate *&d, QPainterPathPrivate *other) + { + QPainterPathPrivate *oldD = d; + d = other; + cleanup(oldD); + } +}; + // This value is used to determine the length of control point vectors // when approximating arc segments as curves. The factor is multiplied // with the radius of the circle. diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h index 0513593..e12194e 100644 --- a/src/gui/painting/qpainterpath.h +++ b/src/gui/painting/qpainterpath.h @@ -57,6 +57,7 @@ QT_MODULE(Gui) class QFont; class QPainterPathPrivate; +struct QPainterPathPrivateHandler; class QPainterPathData; class QPainterPathStrokerPrivate; class QPolygonF; @@ -196,7 +197,7 @@ public: QPainterPath &operator-=(const QPainterPath &other); private: - QScopedSharedPointer d_ptr; + QScopedCustomPointer d_ptr; inline void ensureData() { if (!d_ptr) ensureData_helper(); } void ensureData_helper(); @@ -230,8 +231,7 @@ public: friend class QPainterPathStrokerPrivate; friend class QMatrix; friend class QTransform; - friend class QScopedSharedPointer; - friend class QScopedSharedPointerHandler; + friend struct QPainterPathPrivateHandler; #ifndef QT_NO_DATASTREAM friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QPainterPath &); friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPainterPath &); -- cgit v0.12 From 17975c71e2578b1eab92d93085f0737251666fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Mon, 15 Jun 2009 15:18:40 +0300 Subject: S60Style: changes for style to Tower release. --- dist/changes-4.5.2-tower | 125 ++++++++++++++++++++++++++++------------------- 1 file changed, 74 insertions(+), 51 deletions(-) diff --git a/dist/changes-4.5.2-tower b/dist/changes-4.5.2-tower index 0e1215e..19e8d3c 100644 --- a/dist/changes-4.5.2-tower +++ b/dist/changes-4.5.2-tower @@ -28,7 +28,7 @@ New modules ----------- - QtSql - * Implemented QtSql module with sqlite3 backend. For now backend is + * Implemented QtSql module with sqlite3 backend. For now backend is provided only in binary format. - QtWebkit * todo @@ -56,7 +56,7 @@ Features * Implemented QApplication::beep() for Symbian - QSslSocket - * Added support for -openssl option i.e. runtime resolving of OpenSSL + * Added support for -openssl option i.e. runtime resolving of OpenSSL symbols - todo * todo @@ -66,7 +66,7 @@ Optimizations - qdrawhelper * Optimized drawing operations for RVCT builds, particulary for ARMV6. - + - qwidget_s60.cpp * Avoid unnecessary calls to FocusChanged in Symbian @@ -75,24 +75,25 @@ Optimizations **************************************************************************** - Cleanup qeventdispatcher_unix.cpp - * 247268: All qeventdispatcher_unix.cpp changes were reverted since, + * 247268: All qeventdispatcher_unix.cpp changes were reverted since, this file is not anymore used in Symbian OS branch. - Cleanup QtNetwork workarounds implemented earlier due to Open C bugs. - * 247287: Removed getaddrinfo workaround + * 247287: Removed getaddrinfo workaround * 247288: Removed waitForConnected workaround * 247289: Removed qt_socket_accept workaround * 247290: Removed qt_socket_connect workaround * 247290: Removed E32IONREAD workaround * 247293: Removed nativeHasPendingDatagrams workaround - * 247295: Removed QNativeSocketEnginePrivate::nativeRead EPIPE + * 247295: Removed QNativeSocketEnginePrivate::nativeRead EPIPE workaround - Other code clean-ups - * 247278: Removed unnecessary includes from qbackingstore.cpp. + * 247278: Removed unnecessary includes from qbackingstore.cpp. * Fixed Q_OS_SYMBIAN ifdef usage in qfiledialog_p.h - * 247272: Removed qtestnetworkservers.h dependency, used + * 247272: Removed qtestnetworkservers.h dependency, used network-settings.h * Revert "Work around compiler bug on Nokia Metrowerks compiler." - + * Remove UI highlights being inverted colors based on highlight text colors. + **************************************************************************** * Build issues * @@ -108,66 +109,88 @@ Optimizations - QDesktopServices * Fixed forwardslash/backslash usage as an path separator -- QPluginLoader +- QPluginLoader * QPluginLoader will look for plugin stubs from the same folder on other drives if it can't find them from the indicated drive. - + - QEventDispatcher * Lowered the timeout for reprioritizing the process to 100ms - QNetworkInterface * Fixed R-handle leak in Symbian version of qnetworkinterface_unix.cpp - * Introduced a new qnetworkinterface_symbian.cpp, because there wasn't + * Introduced a new qnetworkinterface_symbian.cpp, because there wasn't really anything common to UNIX equivalent - + - QHostInfo * Added support for host lookups with multiple ipv4 addresses. - + - QUdpSocket - * Updated BindFlag documentation to reflect behaviour on Symbian OS - + * Updated BindFlag documentation to reflect behaviour on Symbian OS + - QLocale * Removed workaround for missing tzname symbol, fixes QLocal timeZone implementation for Symbian. - + - QTemporaryFile - * Fixed temporary file rename in Symbian OS. - + * Fixed temporary file rename in Symbian OS. + - QThread * Fix for thread termination in Symbian OS. - -- QIoDevice + +- QIoDevice * Fixed compilation error when QIODEVICE_DEBUG is defined. - + - QS60Style * Added subElementRect implementation for SE_ItemViewItemCheckIndicator. - + * Added support for E90 layouts. + * Added support for QScrollArea, QTextEditor, QGroupBox, QTreeView, QToolBar and QDial styling. + * Better support for theme and layout changes. + * Better support for themed palettes and themed text colors. + * Better support for multiselection in item views. + * Better theming for QTable and QPanel. + * Better support of highlight graphics and texts for QLists, QTreeViews, QCalendarWidgets and QComboBoxes. + * Support polishing fonts. Fonts are no longer changed within the drawing code. + * Draw spinbox arrowbuttons side-by-side, instead one on top of the other. + * Harmonize widget drawing so that widgets are of similar height. + * Support check states for QLists and QPushButtons. + * Support flat QPushButtons. + * Support busy indicator. + * Support QScrollBar pressed state. + * Support QPushButton disabled theme graphics. + * Separate theme background for QDialogs. + * Clarify QToolButton pressed state. + * Removed linedrawing of panels and groupboxes. + * Fix palette-polution for a style that is activated from an application after S60Style has been in use. + * Fix for frame masks with color depth other than EGrey2. + * Fix for squeezed QTabBars. + * Fix memory leak when color skinning graphics. + - QDesktopServices * Switched QDesktopServices mail-to URL handling to RSendAs in Symbian, - due to the fact that CSendUi requires extensive capabilities to work - correctly. Currently e-mail sending with qdesktopservices::openUrl + due to the fact that CSendUi requires extensive capabilities to work + correctly. Currently e-mail sending with qdesktopservices::openUrl works in Symbian only if e-mail account already exists. - + - QCoeFepInputContext (non-public) * Fixes FEP crash when changing the focused Qt widget to NULL. - + - QApplication - * 252798: Fixed layout when orientation changed via - AknAppUi::SetOrientationL. - + * 252798: Fixed layout when orientation changed via + AknAppUi::SetOrientationL. + - QUdpSocket - * Wrote hack for QUdpSocket::writeDatagram return value in Symbian OS. - + * Wrote hack for QUdpSocket::writeDatagram return value in Symbian OS. + - QNativeSocketEnginePrivate (non-public) - * Changed select to listen also expectfds in Symbain OS for given + * Changed select to listen also expectfds in Symbain OS for given sockets (Workaround to Open C bug). * Fix to Open C bug: Socket connect failure is indicated exception set. - + - QEventDispatcherSymbian (non-public) * Fixed ASSERT panic in Symbian event dispatcher * 246600: Fix problem in eventdispatcher destructor / AO canceling * Fixed active scheduler removal when calling QThread::terminate - * Fix to Open C bug: select sometimes returns -1 and errno is + * Fix to Open C bug: select sometimes returns -1 and errno is ECONNREFUSED **************************************************************************** @@ -175,14 +198,14 @@ Optimizations **************************************************************************** - Drilldown * Added to demonstrate QtSql usage in Symbian OS - + - Deform, Pathstroke, and Wiggly * Removed Symbian specific animation timer fixes since more generic fix was made to event dispatcher. -- Ftp +- Ftp * Enabled default iap setting for FTP example - + - DesktopServices * Implemented content filters for desktopservices example. * Added error handling to qdesktopservices example when openUrl fails. @@ -191,10 +214,10 @@ Optimizations * Fixed build issue caused by lack of cursor. - Fluidlauncher - * Removed ugly workaround to make emulator deployment work correctly, + * Removed ugly workaround to make emulator deployment work correctly, since the issue has been fixed in qmake. * Included drilldown to demonstrate QtSql usage - * Updated screenshots to S60 style + * Updated screenshots to S60 style **************************************************************************** @@ -203,36 +226,36 @@ Optimizations - qmake * Support for generating Symbian "test" targets: CONFIG += symbian_test. - * Support for Symbian Build System, version 2 (aka Raptor) via + * Support for Symbian Build System, version 2 (aka Raptor) via symbian-sbsv2 mkspec. * PAGED keyword is added to all MMP files by default, except in S60 3.1 builds. - * Read-only flag is no longer preserved when deploying files into + * Read-only flag is no longer preserved when deploying files into emulator environment. * Changed the timestamp to ISO format in all files generated by qmake for symbian-* mkspecs. * Qt's VERSION variable will now generate VERSION keyword in mmp files. * Made Open C include paths handling bit more robust. - + - configure * -cetest is no longer a supported switch for configure. * -stl option is enabled by default for Symbian OS * -openssl option is enabled by default for Symbian OS. - + - Release package creation * Removed the obsolete script to create release package. - Createpackage script * Now creates packages with .sis suffix. - -- Patch_capabilities script + +- Patch_capabilities script * Will now patch also vendor id. - + **************************************************************************** * Documnetation * **************************************************************************** - qmake-manual - * 250370: Added documentation for ICON keyword + * 250370: Added documentation for ICON keyword **************************************************************************** * Plugins * @@ -241,8 +264,8 @@ Optimizations - S60 version specific plugins * Isolated S60 version dependent functionality to S60 version specific plugins (qts60plugin_x_y.dll) to make it possible for single build to - run on any supported device, even if with reduced functionality on - some. + run on any supported device, even if with reduced functionality on + some. **************************************************************************** @@ -251,7 +274,7 @@ Optimizations - Qt libs * Qt libs are now built with "All -Tcb" capabilities always. It is now - always necessary to run patch_capabilities.pl script if self-signing + always necessary to run patch_capabilities.pl script if self-signing of Qt libs is desired. * QtCore and QtSql made UNPAGED as workaround for an obscure crash when they are paged. -- cgit v0.12 From f67100b49b492f09522d6d351d32a6ab9ddea098 Mon Sep 17 00:00:00 2001 From: mread Date: Mon, 15 Jun 2009 13:32:47 +0100 Subject: removed mention of qt_QString2TPtrC from qdoc --- doc/src/symbian-exceptionsafety.qdoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/src/symbian-exceptionsafety.qdoc b/doc/src/symbian-exceptionsafety.qdoc index ea9e9b8..e42ecd1 100644 --- a/doc/src/symbian-exceptionsafety.qdoc +++ b/doc/src/symbian-exceptionsafety.qdoc @@ -164,9 +164,8 @@ it's dealing with strings it probably does, again bad. Line 4 is tricky, it calls a leaving function which is ok within a \c TRAP, - but it also uses \l qt_QString2TPtrC. You might think this is safe, but - there is a potential realloc call in there, so this can cause an unwelcome - exception. + but it also uses a helper function to convert string types. In this case + the helper function may cause an unwelcome exception. We could rewrite this with nested exception translations, but it's much easier to refactor it. -- cgit v0.12 From 2b630bd12b9e944707d8e52c1135e88750323ed0 Mon Sep 17 00:00:00 2001 From: Markku Luukkainen Date: Mon, 15 Jun 2009 14:41:16 +0200 Subject: Updated softkey example to be more complete --- examples/widgets/softkeys/softkeys.cpp | 83 +++++++++++++++++++++++++--------- examples/widgets/softkeys/softkeys.h | 13 ++++-- 2 files changed, 70 insertions(+), 26 deletions(-) diff --git a/examples/widgets/softkeys/softkeys.cpp b/examples/widgets/softkeys/softkeys.cpp index 083d05c..9672aee 100644 --- a/examples/widgets/softkeys/softkeys.cpp +++ b/examples/widgets/softkeys/softkeys.cpp @@ -42,33 +42,73 @@ #include "softkeys.h" MainWindow::MainWindow(QWidget *parent) - : QMainWindow(parent) + : QMainWindow(parent) { central = new QWidget(this); + central->setContextMenuPolicy(Qt::NoContextMenu); // explicitly forbid usage of context menu so actions item is not shown menu setCentralWidget(central); - infoLabel = new QLabel(tr("Open menu to start!")); + + // Create text editor and set softkeys to it + textEditor= new QTextEdit(tr("Choose items from menu or navigate around with tab+selection to see what softkeys can do"), this); + QAction* fill = new QAction(tr("Fill"), this); + fill->setSoftKeyRole(QAction::OkSoftKey); + QAction* clear = new QAction(tr("Clear"), this); + clear->setSoftKeyRole(QAction::CancelSoftKey); + + QList textEditorSoftKeys; + textEditorSoftKeys.append(fill); + textEditorSoftKeys.append(clear); + textEditor->setSoftKeys(textEditorSoftKeys); + + infoLabel = new QLabel(tr(""), this); + infoLabel->setContextMenuPolicy(Qt::NoContextMenu); + + pushButton = new QPushButton(tr("Open File Dialog"), this); + pushButton->setContextMenuPolicy(Qt::NoContextMenu); + + QComboBox* comboBox = new QComboBox(this); + comboBox->setContextMenuPolicy(Qt::NoContextMenu); + comboBox->insertItems(0, QStringList() + << QApplication::translate("MainWindow", "Selection1", 0, QApplication::UnicodeUTF8) + << QApplication::translate("MainWindow", "Selection2", 0, QApplication::UnicodeUTF8) + << QApplication::translate("MainWindow", "Selection3", 0, QApplication::UnicodeUTF8) + ); layout = new QVBoxLayout; + layout->addWidget(textEditor); layout->addWidget(infoLabel); + layout->addWidget(pushButton); + layout->addWidget(comboBox); central->setLayout(layout); - central->setFocusPolicy(Qt::TabFocus); - + fileMenu = menuBar()->addMenu(tr("&File")); - openDialogAct = new QAction(tr("&Open Dialog"), this); addSoftKeysAct = new QAction(tr("&Add Softkeys"), this); - clearSoftKeysAct = new QAction(tr("&Clear Softkeys"), this); - fileMenu->addAction(openDialogAct); fileMenu->addAction(addSoftKeysAct); - fileMenu->addAction(clearSoftKeysAct); - connect(openDialogAct, SIGNAL(triggered()), this, SLOT(openDialog())); - connect(addSoftKeysAct, SIGNAL(triggered()), this, SLOT(addSoftKeys())); - connect(clearSoftKeysAct, SIGNAL(triggered()), this, SLOT(clearSoftKeys())); + exit = new QAction(tr("&Exit"), this); + fileMenu->addAction(exit); + + connect(fill, SIGNAL(triggered()), this, SLOT(fillTextEditor())); + connect(clear, SIGNAL(triggered()), this, SLOT(clearTextEditor())); + connect(pushButton, SIGNAL(clicked()), this, SLOT(openDialog())); + connect(addSoftKeysAct, SIGNAL(triggered()), this, SLOT(addSoftKeys())); + connect(exit, SIGNAL(triggered()), this, SLOT(exitApplication())); + pushButton->setFocus(); } MainWindow::~MainWindow() { } +void MainWindow::fillTextEditor() +{ + textEditor->setText(tr("The fill softkey was pressed and here is some text to fill the editor")); +} + +void MainWindow::clearTextEditor() +{ + textEditor->setText(tr("")); +} + void MainWindow::openDialog() { QFileDialog::getOpenFileName(this); @@ -78,33 +118,34 @@ void MainWindow::addSoftKeys() { ok = new QAction(tr("Ok"), this); ok->setSoftKeyRole(QAction::OkSoftKey); - connect(ok, SIGNAL(triggered()), this, SLOT(okPressed())); - + connect(ok, SIGNAL(triggered()), this, SLOT(okPressed())); + cancel = new QAction(tr("Cancel"), this); cancel->setSoftKeyRole(QAction::OkSoftKey); - connect(cancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); + connect(cancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); QList softkeys; softkeys.append(ok); softkeys.append(cancel); - central->setSoftKeys(softkeys); - central->setFocus(); - + pushButton->setSoftKeys(softkeys); } -void MainWindow::clearSoftKeys() +void MainWindow::exitApplication() { - central->setSoftKey(0); + qApp->exit(); } void MainWindow::okPressed() { infoLabel->setText(tr("OK pressed")); - central->setSoftKey(0); + pushButton->setSoftKey(0); } void MainWindow::cancelPressed() { infoLabel->setText(tr("Cancel pressed")); - central->setSoftKey(0); + pushButton->setSoftKey(0); } + + + diff --git a/examples/widgets/softkeys/softkeys.h b/examples/widgets/softkeys/softkeys.h index 11db419..bd75473 100644 --- a/examples/widgets/softkeys/softkeys.h +++ b/examples/widgets/softkeys/softkeys.h @@ -48,24 +48,27 @@ class MainWindow : public QMainWindow { Q_OBJECT public: - + private slots: + void fillTextEditor(); + void clearTextEditor(); void openDialog(); void addSoftKeys(); - void clearSoftKeys(); + void exitApplication(); void okPressed(); void cancelPressed(); public: - MainWindow(QWidget *parent = 0); + MainWindow(QWidget *parent = 0); ~MainWindow(); private: QVBoxLayout *layout; QWidget *central; + QTextEdit* textEditor; QLabel *infoLabel; + QPushButton* pushButton; QMenu* fileMenu; - QAction* openDialogAct; QAction* addSoftKeysAct; - QAction* clearSoftKeysAct; + QAction* exit; QAction* ok; QAction* cancel; }; -- cgit v0.12 From 81a74bb1ad1ee6c925c24efd4e0171df749aeb55 Mon Sep 17 00:00:00 2001 From: mread Date: Mon, 15 Jun 2009 13:53:49 +0100 Subject: fixed code formatting to Qt style --- .../qmainexceptions/tst_qmainexceptions.cpp | 83 ++++++++++++---------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp b/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp index db80496..adad544 100644 --- a/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp +++ b/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp @@ -52,12 +52,12 @@ class tst_qmainexceptions : public QObject public: tst_qmainexceptions(){}; ~tst_qmainexceptions(){}; - + void TestSchedulerCatchesError(TLeavingFunc* f, int error); void TestSymbianRoundTrip(int leave, int trap); - + bool event(QEvent *event); - + public slots: void initTestCase(); private slots: @@ -101,6 +101,7 @@ void tst_qmainexceptions::cleanupstack() CleanupStack::PopAndDestroy(dummy1); __UHEAP_MARKEND; } + void tst_qmainexceptions::leave() { __UHEAP_MARK; @@ -109,58 +110,57 @@ void tst_qmainexceptions::leave() CDummy* csDummy = new (ELeave) CDummy; CleanupStack::PushL(csDummy); __UHEAP_FAILNEXT(1); - dummy1 = new (ELeave) CDummy; + dummy1 = new (ELeave) CDummy; //CleanupStack::PopAndDestroy(csDummy); not executed as previous line throws }); QCOMPARE(err,KErrNoMemory); - QVERIFY(!((int)dummy1)); + QVERIFY(!((int)dummy1)); __UHEAP_MARKEND; } class CTestActive : public CActive - { +{ public: - CTestActive(TLeavingFunc* aFunc) : CActive(EPriorityStandard), iFunc(aFunc) - { + CTestActive(TLeavingFunc* aFunc) : CActive(EPriorityStandard), iFunc(aFunc) + { CActiveScheduler::Add(this); - } + } ~CTestActive() - { + { Cancel(); - } - void DoCancel() - {} + } + void DoCancel() {} void Test() - { + { // complete this AO in a nested scheduler, to make it synchronous TRequestStatus* s = &iStatus; SetActive(); User::RequestComplete(s, KErrNone); CActiveScheduler::Start(); - } + } void RunL() - { + { (*iFunc)(); CActiveScheduler::Stop(); // will only get here if iFunc does not leave - } + } TInt RunError(TInt aError) - { + { error = aError; CActiveScheduler::Stop(); // will only get here if iFunc leaves return KErrNone; - } + } public: TLeavingFunc* iFunc; int error; - }; +}; void tst_qmainexceptions::TestSchedulerCatchesError(TLeavingFunc* f, int error) - { +{ CTestActive *act = new(ELeave) CTestActive(f); act->Test(); QCOMPARE(act->error, error); delete act; - } +} void ThrowBadAlloc() { @@ -200,9 +200,9 @@ void tst_qmainexceptions::TestSymbianRoundTrip(int leave, int trap) // check that leave converted to exception, converted to error gives expected error code int trapped; QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR( - trapped, - QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION( - User::LeaveIfError(leave))); + trapped, + QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION( + User::LeaveIfError(leave))); QCOMPARE(trap, trapped); } @@ -224,31 +224,36 @@ void tst_qmainexceptions::testTrap() } bool tst_qmainexceptions::event(QEvent *aEvent) - { +{ if (aEvent->type() == QEvent::User+1) throw std::bad_alloc(); - else if (aEvent->type() == QEvent::User+2) - { + else if (aEvent->type() == QEvent::User+2) { QEvent event(QEvent::Type(QEvent::User+1)); QApplication::sendEvent(this, &event); - } - return QObject::event(aEvent); } + return QObject::event(aEvent); +} void tst_qmainexceptions::testPropagation() { // test exception thrown from event is propagated back to sender QEvent event(QEvent::Type(QEvent::User+1)); bool caught = false; - try { QApplication::sendEvent(this, &event); } - catch (const std::bad_alloc&) { caught = true; } + try { + QApplication::sendEvent(this, &event); + } catch (const std::bad_alloc&) { + caught = true; + } QCOMPARE(caught, true); // testing nested events propagate back to top level sender caught = false; QEvent event2(QEvent::Type(QEvent::User+2)); - try { QApplication::sendEvent(this, &event2); } - catch (const std::bad_alloc&) { caught = true; } + try { + QApplication::sendEvent(this, &event2); + } catch (const std::bad_alloc&) { + caught = true; + } QCOMPARE(caught, true); } @@ -290,13 +295,13 @@ void tst_qmainexceptions::testDtor2() void tst_qmainexceptions::testNestedExceptions() { // throwing exceptions while handling exceptions - struct Oops { + struct Oops { Oops* next; Oops(int level) : next(level > 0 ? new Oops(level-1) : 0) {} - ~Oops() { - try { throw std::bad_alloc(); } - catch (const std::exception&) {delete next;} - } + ~Oops() { + try { throw std::bad_alloc(); } + catch (const std::exception&) {delete next;} + } }; try { Oops oops(5); -- cgit v0.12 From ea271d2e8e418a489d123971e0418b57050402a9 Mon Sep 17 00:00:00 2001 From: Markku Luukkainen Date: Mon, 15 Jun 2009 14:58:47 +0200 Subject: Added ExitSoftKey role --- src/gui/kernel/qaction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qaction.h b/src/gui/kernel/qaction.h index 8791a5c..dfa4933 100644 --- a/src/gui/kernel/qaction.h +++ b/src/gui/kernel/qaction.h @@ -94,7 +94,7 @@ public: enum SoftKeyRole { OptionsSoftKey, SelectSoftKey, BackSoftKey, NextSoftKey, PreviousSoftKey, OkSoftKey, CancelSoftKey, EditSoftKey, ViewSoftKey, BackSpaceSoftKey, EndEditSoftKey, RevertEditSoftKey, DeselectSoftKey, FinishSoftKey, - MenuSoftKey, ContextMenuSoftKey, Key1SoftKey, Key2SoftKey, + MenuSoftKey, ContextMenuSoftKey, ExitSoftKey, Key1SoftKey, Key2SoftKey, Key3SoftKey, Key4SoftKey, CustomSoftKey }; explicit QAction(QObject* parent); QAction(const QString &text, QObject* parent); -- cgit v0.12 From 94e684e1503230e950c56c234e4683fc78ab5356 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Mon, 15 Jun 2009 15:02:49 +0200 Subject: updated changes-4.5.2-tower. --- dist/changes-4.5.2-tower | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.5.2-tower b/dist/changes-4.5.2-tower index 19e8d3c..ea9e34a 100644 --- a/dist/changes-4.5.2-tower +++ b/dist/changes-4.5.2-tower @@ -31,7 +31,7 @@ New modules * Implemented QtSql module with sqlite3 backend. For now backend is provided only in binary format. - QtWebkit - * todo + * Experimental webkit build for s60. Can be enabled by passing -webkit to configure. - Phonon * todo @@ -101,6 +101,8 @@ Optimizations - QTest * Fixed testlib export macros for RVCT builds. +- namespaces + * Now builds when -qtnamespace option is defined **************************************************************************** * Changes to existing classes * @@ -177,6 +179,7 @@ Optimizations - QApplication * 252798: Fixed layout when orientation changed via AknAppUi::SetOrientationL. + * Generating MouseEvents has gone through several changes - QUdpSocket * Wrote hack for QUdpSocket::writeDatagram return value in Symbian OS. @@ -241,6 +244,7 @@ Optimizations * -cetest is no longer a supported switch for configure. * -stl option is enabled by default for Symbian OS * -openssl option is enabled by default for Symbian OS. + * -fpu option enables vfpu type selection for ARM targets. - Release package creation * Removed the obsolete script to create release package. -- cgit v0.12 From 3230496d13fd36a732b7a32914cac66dda7f4461 Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Mon, 15 Jun 2009 15:20:33 +0200 Subject: Include Phonon changes. --- dist/changes-4.5.2-tower | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.5.2-tower b/dist/changes-4.5.2-tower index ea9e34a..41dc8c8 100644 --- a/dist/changes-4.5.2-tower +++ b/dist/changes-4.5.2-tower @@ -33,8 +33,11 @@ New modules - QtWebkit * Experimental webkit build for s60. Can be enabled by passing -webkit to configure. - Phonon - * todo - + * The Phonon library is now part of Qt, but it comes without a backend. + This means that applications can build and run against the Phonon + library, but there is currently no S60 backend plugin providing actual + multimedia playback. Possible alternatives such as Helix and MMF are + being investigated. New classes ------------ -- cgit v0.12 From ebbb3f553bf9f882bfb732391d46494ea02d5569 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 15 Jun 2009 15:24:53 +0200 Subject: Remove compiler warning on Qt/Windows The QFileDialogPrivate constructor must be non-inline. RevBy: aportale --- src/gui/dialogs/qfiledialog.cpp | 28 ++++++++++++++++++++++++++++ src/gui/dialogs/qfiledialog_p.h | 26 +------------------------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 60d3034..9768162 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -487,6 +487,34 @@ void QFileDialog::changeEvent(QEvent *e) QDialog::changeEvent(e); } +QFileDialogPrivate::QFileDialogPrivate() + : +#ifndef QT_NO_PROXYMODEL + proxyModel(0), +#endif + model(0), + fileMode(QFileDialog::AnyFile), + acceptMode(QFileDialog::AcceptOpen), + currentHistoryLocation(-1), + renameAction(0), + deleteAction(0), + showHiddenAction(0), + useDefaultCaption(true), + defaultFileTypes(true), + fileNameLabelExplicitlySat(false), + nativeDialogInUse(false), +#ifdef Q_WS_MAC + mDelegate(0), +#ifndef QT_MAC_USE_COCOA + mDialog(0), + mDialogStarted(false), + mDialogClosed(true), +#endif +#endif + qFileDialogUi(0) +{ +} + QFileDialogPrivate::~QFileDialogPrivate() { } diff --git a/src/gui/dialogs/qfiledialog_p.h b/src/gui/dialogs/qfiledialog_p.h index 99f61f0..3195583 100644 --- a/src/gui/dialogs/qfiledialog_p.h +++ b/src/gui/dialogs/qfiledialog_p.h @@ -113,31 +113,7 @@ class Q_AUTOTEST_EXPORT QFileDialogPrivate : public QDialogPrivate Q_DECLARE_PUBLIC(QFileDialog) public: - QFileDialogPrivate() : -#ifndef QT_NO_PROXYMODEL - proxyModel(0), -#endif - model(0), - fileMode(QFileDialog::AnyFile), - acceptMode(QFileDialog::AcceptOpen), - currentHistoryLocation(-1), - renameAction(0), - deleteAction(0), - showHiddenAction(0), - useDefaultCaption(true), - defaultFileTypes(true), - fileNameLabelExplicitlySat(false), - nativeDialogInUse(false), -#ifdef Q_WS_MAC - mDelegate(0), -#ifndef QT_MAC_USE_COCOA - mDialog(0), - mDialogStarted(false), - mDialogClosed(true), -#endif -#endif - qFileDialogUi(0) - {} + QFileDialogPrivate(); void createToolButtons(); void createMenuActions(); -- cgit v0.12 From 08ae7ee1fb930e7d4b4039e2294cba69f9380964 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 15 Jun 2009 15:27:24 +0200 Subject: remove compiler warning on MSVC --- src/gui/kernel/qwidget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h index 680bbaa..1edd466 100644 --- a/src/gui/kernel/qwidget.h +++ b/src/gui/kernel/qwidget.h @@ -731,7 +731,7 @@ private: friend class QGraphicsProxyWidget; friend class QGraphicsProxyWidgetPrivate; friend class QStyleSheetStyle; - friend class QWidgetExceptionCleaner; + friend struct QWidgetExceptionCleaner; #ifdef Q_WS_MAC friend class QCoreGraphicsPaintEnginePrivate; -- cgit v0.12 From 00690dbb12af3a7cf20480571bef85565af00517 Mon Sep 17 00:00:00 2001 From: Markku Luukkainen Date: Mon, 15 Jun 2009 16:12:15 +0200 Subject: Added Softkeys example to fluidlauncher --- demos/embedded/fluidlauncher/config_s60/config.xml | 1 + demos/embedded/fluidlauncher/fluidlauncher.pro | 23 ++++++++++++--------- .../fluidlauncher/screenshots/softkeys.png | Bin 0 -> 42853 bytes 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 demos/embedded/fluidlauncher/screenshots/softkeys.png diff --git a/demos/embedded/fluidlauncher/config_s60/config.xml b/demos/embedded/fluidlauncher/config_s60/config.xml index 41b3b6d..b543fa2 100644 --- a/demos/embedded/fluidlauncher/config_s60/config.xml +++ b/demos/embedded/fluidlauncher/config_s60/config.xml @@ -12,6 +12,7 @@ + diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro index 9c08801..341b321 100644 --- a/demos/embedded/fluidlauncher/fluidlauncher.pro +++ b/demos/embedded/fluidlauncher/fluidlauncher.pro @@ -71,10 +71,11 @@ symbian { saxbookmarks.exe \ desktopservices.exe \ fridgemagnets.exe \ - drilldown.exe + drilldown.exe \ + softkeys.exe executables.path = /sys/bin - + reg_resource.sources = \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/embeddedsvgviewer_reg.rsc \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/styledemo_reg.rsc \ @@ -83,14 +84,15 @@ symbian { $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/wiggly_reg.rsc \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/ftp_reg.rsc\ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/context2d_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/saxbookmarks_reg.rsc \ + $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/saxbookmarks_reg.rsc \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/desktopservices_reg.rsc \ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/fridgemagnets_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/drilldown_reg.rsc - + $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/drilldown_reg.rsc \ + $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/softkeys_reg.rsc + reg_resource.path = $$REG_RESOURCE_IMPORT_DIR - + resource.sources = \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/embeddedsvgviewer.rsc \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/styledemo.rsc \ @@ -102,10 +104,11 @@ symbian { $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/saxbookmarks.rsc \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/desktopservices.rsc \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fridgemagnets.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/drilldown.rsc - + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/drilldown.rsc \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/softkeys.rsc + resource.path = $$APP_RESOURCE_DIR - + mifs.sources = \ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/0xA000C611.mif mifs.path = $$APP_RESOURCE_DIR @@ -131,7 +134,7 @@ symbian { saxbookmarks.sources += $$PWD/../../../examples/xml/saxbookmarks/jennifer.xbel saxbookmarks.path = /data/qt/saxbookmarks - DEPLOYMENT += config files executables viewerimages saxbookmarks reg_resource resource \ + DEPLOYMENT += config files executables viewerimages saxbookmarks reg_resource resource \ mifs desktopservices_music desktopservices_images TARGET.EPOCHEAPSIZE = 100000 20000000 diff --git a/demos/embedded/fluidlauncher/screenshots/softkeys.png b/demos/embedded/fluidlauncher/screenshots/softkeys.png new file mode 100644 index 0000000..99681b9 Binary files /dev/null and b/demos/embedded/fluidlauncher/screenshots/softkeys.png differ -- cgit v0.12 From df82f57bf7b2194a798e10a8b375c07d33dde925 Mon Sep 17 00:00:00 2001 From: mread Date: Mon, 15 Jun 2009 15:16:45 +0100 Subject: undeclared variable when exceptions disabled --- src/gui/kernel/qeventdispatcher_s60.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qeventdispatcher_s60.cpp b/src/gui/kernel/qeventdispatcher_s60.cpp index fcf572e..51878df 100644 --- a/src/gui/kernel/qeventdispatcher_s60.cpp +++ b/src/gui/kernel/qeventdispatcher_s60.cpp @@ -70,12 +70,14 @@ bool QEventDispatcherS60::processEvents ( QEventLoop::ProcessEventsFlags flags ) m_noInputEvents = false; ret = sendDeferredInputEvents() || ret; } - + ret = QEventDispatcherSymbian::processEvents(flags) || ret; - + m_noInputEvents = oldNoInputEventsValue; } QT_CATCH (const std::exception& ex) { - CActiveScheduler::Current()->Error(qt_translateExceptionToSymbianError(ex)); +#ifndef QT_NO_EXCEPTIONS + CActiveScheduler::Current()->Error(qt_translateExceptionToSymbianError(ex)); +#endif } return ret; -- cgit v0.12 From ce409be66b8e62f36f210818e7fcaffcf29935ce Mon Sep 17 00:00:00 2001 From: Aleksandar Sasha Babic Date: Mon, 15 Jun 2009 16:11:48 +0200 Subject: Improving the code for setting the default IAP. First we ask if there is already active IAP. If yes, we will use that one, if not IAP dialog will pop-up. This strategy should save us from some dialogs when accessing the network. --- examples/network/ftp/ftp.pro | 2 +- examples/network/ftp/main.cpp | 99 ++++++++++++++++++++++++++++++++----------- 2 files changed, 75 insertions(+), 26 deletions(-) diff --git a/examples/network/ftp/ftp.pro b/examples/network/ftp/ftp.pro index b958f6a..0fb9934 100644 --- a/examples/network/ftp/ftp.pro +++ b/examples/network/ftp/ftp.pro @@ -15,5 +15,5 @@ include($$QT_SOURCE_TREE/examples/examplebase.pri) symbian { TARGET.CAPABILITY="NetworkServices" TARGET.UID3 = 0xA000A648 - LIBS+=-lesock # For IAP selection + LIBS+=-lesock -lconnmon # For IAP selection } \ No newline at end of file diff --git a/examples/network/ftp/main.cpp b/examples/network/ftp/main.cpp index a92a8b2..118dcfc 100644 --- a/examples/network/ftp/main.cpp +++ b/examples/network/ftp/main.cpp @@ -48,32 +48,82 @@ #include #include +#include #include -static void setDefaultIapL() -{ - TInt err = KErrNone; - RSocketServ serv; - CleanupClosePushL(serv); - User::LeaveIfError(serv.Connect()); +QString qt_TDesC2QStringL(const TDesC& aDescriptor) { +#ifdef QT_NO_UNICODE + return QString::fromLocal8Bit(aDescriptor.Ptr(), aDescriptor.Length()); +#else + return QString::fromUtf16(aDescriptor.Ptr(), aDescriptor.Length()); +#endif +} - RConnection conn; - CleanupClosePushL(conn); - User::LeaveIfError(conn.Open(serv)); - User::LeaveIfError(conn.Start()); - - _LIT(KIapNameSetting, "IAP\\Name"); - TBuf8<50> iapName; - User::LeaveIfError(conn.GetDesSetting(TPtrC(KIapNameSetting), iapName)); - iapName.ZeroTerminate(); - - conn.Stop(); - CleanupStack::PopAndDestroy(&conn); - CleanupStack::PopAndDestroy(&serv); +static void setDefaultIapL() { + RConnectionMonitor monitor; + CleanupClosePushL(monitor); + monitor.ConnectL(); + TUint count; + TRequestStatus status; + TUint ids[ 15 ]; - struct ifreq ifReq; - strcpy( ifReq.ifr_name, (char*)iapName.Ptr()); - User::LeaveIfError(setdefaultif( &ifReq )); + monitor.GetConnectionCount( count, status ); + User::WaitForRequest( status ); + if(status.Int() != KErrNone) { + User::Leave(status.Int()); + } + + TUint numSubConnections; + + if(count > 0) { + for ( TInt i = 1; i <= count; i++ ) { + User::LeaveIfError(monitor.GetConnectionInfo( i, ids[ i-1 ], numSubConnections )); + } + /* + * get IAP value for first active connection + */ + TBuf< 50 > iapName; + monitor.GetStringAttribute( ids[ 0 ], 0, KIAPName, iapName, status ); + User::WaitForRequest( status ); + if ( status.Int() != KErrNone ) { + User::Leave(status.Int()); + } else { + QString strIapName = qt_TDesC2QStringL(iapName); + struct ifreq ifReq; + strcpy( ifReq.ifr_name, strIapName.toLatin1().data()); + User::LeaveIfError(setdefaultif( &ifReq )); + } + } else { + /* + * no active connections yet + * use IAP dialog to select one + */ + RSocketServ serv; + CleanupClosePushL(serv); + User::LeaveIfError(serv.Connect()); + + RConnection conn; + CleanupClosePushL(conn); + User::LeaveIfError(conn.Open(serv)); + User::LeaveIfError(conn.Start()); + + _LIT(KIapNameSetting, "IAP\\Name"); + TBuf8<50> iap8Name; + User::LeaveIfError(conn.GetDesSetting(TPtrC(KIapNameSetting), iap8Name)); + iap8Name.ZeroTerminate(); + + struct ifreq ifReq; + strcpy( ifReq.ifr_name, (char*)iap8Name.Ptr()); + User::LeaveIfError(setdefaultif( &ifReq )); + + conn.Stop(); + conn.Close(); + serv.Close(); + CleanupStack::PopAndDestroy(&conn); + CleanupStack::PopAndDestroy(&serv); + } + monitor.Close(); + CleanupStack::PopAndDestroy(&monitor); } static int setDefaultIap() @@ -86,13 +136,12 @@ static int setDefaultIap() int main(int argc, char *argv[]) { Q_INIT_RESOURCE(ftp); - #ifdef Q_OS_SYMBIAN setDefaultIap(); // Change current directory from default private to c:\data // in order that user can access the downloaded content QDir::setCurrent( "c:\\data" ); -#endif +#endif QApplication app(argc, argv); FtpWindow ftpWin; #ifdef Q_OS_SYMBIAN @@ -100,6 +149,6 @@ int main(int argc, char *argv[]) ftpWin.showMaximized(); #else ftpWin.show(); -#endif +#endif return ftpWin.exec(); } -- cgit v0.12 From 77a41bfb4f1ce5e3fa52412e72c69b4397011fc1 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 15 Jun 2009 16:49:04 +0200 Subject: export qBadAlloc only if exceptions are on --- src/corelib/global/qglobal.cpp | 2 ++ src/corelib/global/qglobal.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index e53fd2d..88f845a 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1929,6 +1929,7 @@ void qt_check_pointer(const char *n, int l) qWarning("In file %s, line %d: Out of memory", n, l); } +#ifndef QT_NO_EXCEPTIONS /* \internal Allows you to throw an exception without including Called internally from Q_CHECK_PTR on certain OS combinations @@ -1937,6 +1938,7 @@ void qBadAlloc() { QT_THROW(std::bad_alloc()); } +#endif /* The Q_ASSERT macro calls this function when the test fails. diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 825b7e8..361c038 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1605,7 +1605,10 @@ Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char * #endif Q_CORE_EXPORT void qt_check_pointer(const char *, int); + +#ifndef QT_NO_EXCEPTIONS Q_CORE_EXPORT void qBadAlloc(); +#endif #ifdef QT_NO_EXCEPTIONS # if defined(QT_NO_DEBUG) -- cgit v0.12 From 40c70459b40e4e54c2cf515f502824c8d191626b Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 15 Jun 2009 17:33:09 +0200 Subject: Remove compiler warning on Qt/Windows The QFileDialogPrivate constructor must be non-inline. RevBy: Harald Fernengel --- src/gui/image/qpicture.cpp | 12 ++++++++++++ src/gui/image/qpicture_p.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp index 8528173..a16305e 100644 --- a/src/gui/image/qpicture.cpp +++ b/src/gui/image/qpicture.cpp @@ -1041,6 +1041,18 @@ QPicture& QPicture::operator=(const QPicture &p) /*! \internal + Constructs a QPicturePrivate +*/ +QPicturePrivate::QPicturePrivate() + : in_memory_only(false), + q_ptr(0) +{ + ref = 1; +} + +/*! + \internal + Sets formatOk to false and resets the format version numbers to default */ diff --git a/src/gui/image/qpicture_p.h b/src/gui/image/qpicture_p.h index e0c3117..373ff15 100644 --- a/src/gui/image/qpicture_p.h +++ b/src/gui/image/qpicture_p.h @@ -143,7 +143,7 @@ public: PdcReservedStop = 199 // for Qt }; - inline QPicturePrivate() : in_memory_only(false), q_ptr(0) { ref = 1; } + QPicturePrivate(); QAtomicInt ref; bool checkFormat(); -- cgit v0.12 From d476a0054aff074f83600fcc12d7e9356b920da3 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 15 Jun 2009 18:14:08 +0200 Subject: Remove warnings --- src/gui/styles/qs60style.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index c6118d6..d9ef8ef 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -559,7 +559,7 @@ void QS60StylePrivate::drawRow(QS60StyleEnums::SkinParts start, QRect endRect; if (orientation == Qt::Horizontal) { - startRect.setWidth(qMin(rect.width() >>1 - 1, startRect.width())); + startRect.setWidth(qMin((rect.width() >> 1) - 1, startRect.width())); endRect = startRect.translated(rect.width() - startRect.width(), 0); middleRect.adjust(startRect.width(), 0, -startRect.width(), 0); if (startRect.bottomRight().x() > endRect.topLeft().x()) { @@ -568,7 +568,7 @@ void QS60StylePrivate::drawRow(QS60StyleEnums::SkinParts start, endRect.adjust(overlap,0,0,0); } } else { - startRect.setHeight(qMin(rect.height() >>1 - 1, startRect.height())); + startRect.setHeight(qMin((rect.height() >> 1) - 1, startRect.height())); endRect = startRect.translated(0, rect.height() - startRect.height()); middleRect.adjust(0, startRect.height(), 0, -startRect.height()); if (startRect.topRight().y() > endRect.bottomLeft().y()) { -- cgit v0.12 From 12b4262f1f6e5d7560c0495096e86668cdf69cad Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Mon, 15 Jun 2009 18:16:49 +0200 Subject: added sendui.lib to qtgui --- mkspecs/common/symbian/symbian.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 663a1df..7b78033 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -62,8 +62,8 @@ QMAKE_LFLAGS_DLL = -shared QMAKE_LINK_OBJECT_MAX = 10 QMAKE_LINK_OBJECT_SCRIPT= object_script -QMAKE_DESKTOPSERVICES_LIBS = -lsendas2 -lplatformenv -lcommonui -letext -lapmime -QMAKE_STATUSPANE_LIBS = -lavkon -leikcoctl +QMAKE_DESKTOPSERVICES_LIBS = -lsendas2 -lsendui -lplatformenv -lcommonui -letext -lapmime +QMAKE_STATUSPANE_LIBS = -lavkon -leikcoctl QMAKE_LIBS = -llibc -llibm -leuser -llibdl QMAKE_LIBS_CORE = $$QMAKE_LIBS -llibpthread -lefsrv -- cgit v0.12 From 82e19a10f13005a327b134999315ecf39d5d70e3 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 15 Jun 2009 19:40:18 +0200 Subject: Fix for Task #256174 Bring back the keyPad Navigation focus visualization. It disappeared with commit e0690577327097ec3d9be99205bfcf01f8404d23 --- src/gui/styles/qs60style.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index c6118d6..1292092 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2038,16 +2038,12 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti #endif //QT_NO_SPINBOX case PE_FrameFocusRect: // Calendar widget and combox both do not use styled itemDelegate - if ( widget && ( + if (!(false #ifndef QT_NO_CALENDARWIDGET - (qobject_cast(widget->parent())) -#else - false + || (widget && qobject_cast(widget->parent())) #endif //QT_NO_CALENDARWIDGET #ifndef QT_NO_COMBOBOX || (qobject_cast(widget)) -#else - || false #endif //QT_NO_COMBOBOX )) { // no focus selection for touch @@ -2326,6 +2322,7 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w break; case SH_UnderlineShortcut: retValue = 0; + break; default: break; } -- cgit v0.12 From de3e3d6bff2b585524cd504cf052cf181a6c2eae Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 15 Jun 2009 23:29:19 +0200 Subject: Fix commit 82e19a10f13005a327b134999315ecf39d5d70e3 --- src/gui/styles/qs60style.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 29827b7..d2bd679 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2038,12 +2038,12 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti #endif //QT_NO_SPINBOX case PE_FrameFocusRect: // Calendar widget and combox both do not use styled itemDelegate - if (!(false + if (widget && !(false #ifndef QT_NO_CALENDARWIDGET - || (widget && qobject_cast(widget->parent())) + || qobject_cast(widget->parent()) #endif //QT_NO_CALENDARWIDGET #ifndef QT_NO_COMBOBOX - || (qobject_cast(widget)) + || qobject_cast(widget) #endif //QT_NO_COMBOBOX )) { // no focus selection for touch @@ -2322,7 +2322,7 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w break; case SH_UnderlineShortcut: retValue = 0; - break; + break; default: break; } -- cgit v0.12