diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-15 07:57:10 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-15 07:57:35 (GMT) |
commit | a814aba657288942b5beed70a2110446420f981c (patch) | |
tree | dd112e5838b9daf6aeb01d31a409f8a438047e0d /src/gui | |
parent | e479ba841f62cc4af709e97f8085d7779e14e3e9 (diff) | |
parent | 1a62cb6ba07ef64e5101cbfca85bb539075742d5 (diff) | |
download | Qt-a814aba657288942b5beed70a2110446420f981c.zip Qt-a814aba657288942b5beed70a2110446420f981c.tar.gz Qt-a814aba657288942b5beed70a2110446420f981c.tar.bz2 |
Merge commit origin/4.6 into team-widgets/4.6
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogs/qfiledialog_mac.mm | 3 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_mac.mm | 21 | ||||
-rw-r--r-- | src/gui/s60framework/qs60mainapplication.cpp | 47 | ||||
-rw-r--r-- | src/gui/s60framework/qs60mainappui.cpp | 44 | ||||
-rw-r--r-- | src/gui/s60framework/qs60maindocument.cpp | 44 |
5 files changed, 92 insertions, 67 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index 3a4ecce..8e4c461 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -62,6 +62,7 @@ #include <qvarlengtharray.h> #include <qdesktopwidget.h> #include <stdlib.h> +#include <qabstracteventdispatcher.h> #include "ui_qfiledialog.h" QT_BEGIN_NAMESPACE @@ -245,6 +246,8 @@ QT_USE_NAMESPACE mReturnCode = [mSavePanel runModalForDirectory:mCurrentDir file:selectable ? filename : @"untitled"]; + + QAbstractEventDispatcher::instance()->interrupt(); return (mReturnCode == NSOKButton); } diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm index 49c851b..c9dd949 100644 --- a/src/gui/kernel/qeventdispatcher_mac.mm +++ b/src/gui/kernel/qeventdispatcher_mac.mm @@ -136,14 +136,19 @@ void QEventDispatcherMacPrivate::activateTimer(CFRunLoopTimerRef, void *info) if (tmr == 0 || tmr->pending == true) return; // Can't send another timer event if it's pending. - tmr->pending = true; - QTimerEvent e(tmr->id); - qt_sendSpontaneousEvent(tmr->obj, &e); - // Get the value again in case the timer gets unregistered during the sendEvent. - tmr = macTimerHash.value(timerID); - if (tmr != 0) - tmr->pending = false; + if (blockSendPostedEvents) { + QCoreApplication::postEvent(tmr->obj, new QTimerEvent(tmr->id)); + } else { + tmr->pending = true; + QTimerEvent e(tmr->id); + qt_sendSpontaneousEvent(tmr->obj, &e); + // Get the value again in case the timer gets unregistered during the sendEvent. + tmr = macTimerHash.value(timerID); + if (tmr != 0) + tmr->pending = false; + } + } void QEventDispatcherMac::registerTimer(int timerId, int interval, QObject *obj) @@ -767,7 +772,7 @@ NSModalSession QEventDispatcherMacPrivate::currentModalSession() // Sadly, we need to introduce this little event flush // to stop dialogs from blinking/poping in front if a // modal session restart was needed: - while (NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask + while (NSEvent *event = [NSApp nextEventMatchingMask:0 untilDate:nil inMode:NSDefaultRunLoopMode dequeue: YES]) { diff --git a/src/gui/s60framework/qs60mainapplication.cpp b/src/gui/s60framework/qs60mainapplication.cpp index 2973c97..82e7743 100644 --- a/src/gui/s60framework/qs60mainapplication.cpp +++ b/src/gui/s60framework/qs60mainapplication.cpp @@ -60,27 +60,32 @@ CApaApplication *newS60Application() _LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main.rsc"); /*! - * \class QS60MainApplication - * \obsolete - * \since 4.6 - * \brief The QS60MainApplication class provides support for migration from S60. - * - * The QS60MainApplication provides a helper class for use in migrating from existing S60 based - * applications to Qt based applications. It is used in the exact same way as the - * \c CAknApplication class from Symbian, but internally provides extensions used by Qt. - * - * When modifying old S60 applications that rely on implementing functions in \c CAknApplication, - * the class should be modified to inherit from this class instead of \c CAknApplication. Then the - * application can choose to override only certain functions. To make Qt use the custom application - * objects, pass a factory function to - * QApplication::QApplication(QApplication::QS60MainApplicationFactory, int &, char **). - * - * For more information on \c CAknApplication, please see the S60 documentation. - * - * Unlike other Qt classes, QS60MainApplication behaves like an S60 class, and can throw Symbian - * leaves. - * - * \sa QS60MainDocument, QS60MainAppUi, QApplication::QS60MainApplicationFactory + \class QS60MainApplication + \since 4.6 + \brief The QS60MainApplication class provides support for migration from S60. + + \warning This class is provided only to get access to S60 specific + functionality in the application framework classes. It is not + portable. We strongly recommend against using it in new applications. + + The QS60MainApplication provides a helper class for use in migrating + from existing S60 based applications to Qt based applications. It is + used in the exact same way as the \c CAknApplication class from + Symbian, but internally provides extensions used by Qt. + + When modifying old S60 applications that rely on implementing + functions in \c CAknApplication, the class should be modified to + inherit from this class instead of \c CAknApplication. Then the + application can choose to override only certain functions. To make + Qt use the custom application objects, pass a factory function to + \c{QApplication::QApplication(QApplication::QS60MainApplicationFactory, int &, char **)}. + + For more information on \c CAknApplication, please see the S60 documentation. + + Unlike other Qt classes, QS60MainApplication behaves like an S60 class, and can throw Symbian + leaves. + + \sa QS60MainDocument, QS60MainAppUi, QApplication::QS60MainApplicationFactory */ /*! diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp index d8181f8..611ca59 100644 --- a/src/gui/s60framework/qs60mainappui.cpp +++ b/src/gui/s60framework/qs60mainappui.cpp @@ -58,25 +58,31 @@ QT_BEGIN_NAMESPACE /*! - * \class QS60MainAppUi - * \obsolete - * \since 4.6 - * \brief Helper class for S60 migration - * - * The QS60MainAppUi provides a helper class for use in migrating from existing S60 based - * applications to Qt based applications. It is used in the exact same way as the - * \c CAknAppUi class from Symbian, but internally provides extensions used by Qt. - * - * When modifying old S60 applications that rely on implementing functions in \c CAknAppUi, - * the class should be modified to inherit from this class instead of \c CAknAppUi. Then the - * application can choose to override only certain functions. - * - * For more information on \c CAknAppUi, please see the S60 documentation. - * - * Unlike other Qt classes, QS60MainAppUi behaves like an S60 class, and can throw Symbian - * leaves. - * - * \sa QS60MainDocument, QS60MainApplication + \class QS60MainAppUi + \since 4.6 + \brief Helper class for S60 migration + + \warning This class is provided only to get access to S60 specific + functionality in the application framework classes. It is not + portable. We strongly recommend against using it in new applications. + + The QS60MainAppUi provides a helper class for use in migrating from + existing S60 based applications to Qt based applications. It is used + in the exact same way as the \c CAknAppUi class from Symbian, but + internally provides extensions used by Qt. + + When modifying old S60 applications that rely on implementing + functions in \c CAknAppUi, the class should be modified to inherit + from this class instead of \c CAknAppUi. Then the application can + choose to override only certain functions. + + For more information on \c CAknAppUi, please see the S60 + documentation. + + Unlike other Qt classes, QS60MainAppUi behaves like an S60 class, + and can throw Symbian leaves. + + \sa QS60MainDocument, QS60MainApplication */ /*! diff --git a/src/gui/s60framework/qs60maindocument.cpp b/src/gui/s60framework/qs60maindocument.cpp index 52595db..54df17e 100644 --- a/src/gui/s60framework/qs60maindocument.cpp +++ b/src/gui/s60framework/qs60maindocument.cpp @@ -47,25 +47,31 @@ QT_BEGIN_NAMESPACE /*! - * \class QS60MainDocument - * \obsolete - * \since 4.6 - * \brief Helper class for S60 migration - * - * The QS60MainDocument provides a helper class for use in migrating from existing S60 based - * applications to Qt based applications. It is used in the exact same way as the - * \c CAknDocument class from Symbian, but internally provides extensions used by Qt. - * - * When modifying old S60 applications that rely on implementing functions in \c CAknDocument, - * the class should be modified to inherit from this class instead of \c CAknDocument. Then the - * application can choose to override only certain functions. - * - * For more information on \c CAknDocument, please see the S60 documentation. - * - * Unlike other Qt classes, QS60MainDocument behaves like an S60 class, and can throw Symbian - * leaves. - * - * \sa QS60MainApplication, QS60MainAppUi + \class QS60MainDocument + \since 4.6 + \brief Helper class for S60 migration + + \warning This class is provided only to get access to S60 specific + functionality in the application framework classes. It is not + portable. We strongly recommend against using it in new applications. + + The QS60MainDocument provides a helper class for use in migrating + from existing S60 based applications to Qt based applications. It is + used in the exact same way as the \c CAknDocument class from + Symbian, but internally provides extensions used by Qt. + + When modifying old S60 applications that rely on implementing + functions in \c CAknDocument, the class should be modified to + inherit from this class instead of \c CAknDocument. Then the + application can choose to override only certain functions. + + For more information on \c CAknDocument, please see the S60 + documentation. + + Unlike other Qt classes, QS60MainDocument behaves like an S60 class, + and can throw Symbian leaves. + + \sa QS60MainApplication, QS60MainAppUi */ /*! |