diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-08-16 05:13:43 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-08-16 05:13:43 (GMT) |
commit | 07d6c4f8a92110a4fb386e184d4b0e866d897fbc (patch) | |
tree | cbd0bd5a9c9181af467c9765b869ac8e47d77da5 /src | |
parent | ab11576ca4987c7da9fcffb9cab286c1b227b74d (diff) | |
parent | 909c955ede61cff9eb520d8e90f346cca7716696 (diff) | |
download | Qt-07d6c4f8a92110a4fb386e184d4b0e866d897fbc.zip Qt-07d6c4f8a92110a4fb386e184d4b0e866d897fbc.tar.gz Qt-07d6c4f8a92110a4fb386e184d4b0e866d897fbc.tar.bz2 |
Merge remote branch 'staging/4.7' into bearermanagement/maemo-fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qcocoamenuloader_mac.mm | 5 | ||||
-rw-r--r-- | src/gui/kernel/qcocoamenuloader_mac_p.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_mac.mm | 12 | ||||
-rw-r--r-- | src/gui/widgets/qcocoamenu_mac.mm | 12 | ||||
-rw-r--r-- | src/gui/widgets/qcocoamenu_mac_p.h | 1 | ||||
-rw-r--r-- | src/network/bearer/qnetworkconfiguration.cpp | 7 | ||||
-rw-r--r-- | src/network/bearer/qnetworkconfiguration.h | 10 | ||||
-rw-r--r-- | src/network/bearer/qnetworksession.h | 4 | ||||
-rw-r--r-- | src/s60installs/eabi/QtNetworku.def | 2 |
9 files changed, 34 insertions, 20 deletions
diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm index 8d65aa1..8d38f45 100644 --- a/src/gui/kernel/qcocoamenuloader_mac.mm +++ b/src/gui/kernel/qcocoamenuloader_mac.mm @@ -255,5 +255,10 @@ QT_USE_NAMESPACE qApp->quit(); } } + + - (void)orderFrontCharacterPalette:(id)sender + { + [NSApp orderFrontCharacterPalette:sender]; + } @end #endif // QT_MAC_USE_COCOA diff --git a/src/gui/kernel/qcocoamenuloader_mac_p.h b/src/gui/kernel/qcocoamenuloader_mac_p.h index a75ad0a..edacfa5 100644 --- a/src/gui/kernel/qcocoamenuloader_mac_p.h +++ b/src/gui/kernel/qcocoamenuloader_mac_p.h @@ -88,6 +88,7 @@ - (IBAction)hide:(id)sender; - (IBAction)qtDispatcherToQAction:(id)sender; - (void)qtUpdateMenubar; +- (void)orderFrontCharacterPalette:(id)sender; @end #endif // QT_MAC_USE_COCOA diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm index e26fbde..89f01d8 100644 --- a/src/gui/kernel/qeventdispatcher_mac.mm +++ b/src/gui/kernel/qeventdispatcher_mac.mm @@ -785,7 +785,7 @@ void QEventDispatcherMacPrivate::temporarilyStopAllModalSessions() // the stacking order of the windows while doing so, we put // up a block that is used in QCocoaWindow and QCocoaPanel: int stackSize = cocoaModalSessionStack.size(); - for (int i=stackSize-1; i>=0; --i) { + for (int i=0; i<stackSize; ++i) { QCocoaModalSessionInfo &info = cocoaModalSessionStack[i]; if (info.session) { [NSApp endModalSession:info.session]; @@ -822,12 +822,12 @@ NSModalSession QEventDispatcherMacPrivate::currentModalSession() QBoolBlocker block1(blockSendPostedEvents, true); info.nswindow = window; [(NSWindow*) info.nswindow retain]; - // When creating a modal session cocoa will rearrange the windows. - // In order to avoid windows to be put behind another we need to - // keep the window level. - int level = [window level]; + int levelBeforeEnterModal = [window level]; info.session = [NSApp beginModalSessionForWindow:window]; - [window setLevel:level]; + // Make sure we don't stack the window lower that it was before + // entering modal, in case it e.g. had the stays-on-top flag set: + if (levelBeforeEnterModal > [window level]) + [window setLevel:levelBeforeEnterModal]; } currentModalSessionCached = info.session; } diff --git a/src/gui/widgets/qcocoamenu_mac.mm b/src/gui/widgets/qcocoamenu_mac.mm index ce85919..15fae23 100644 --- a/src/gui/widgets/qcocoamenu_mac.mm +++ b/src/gui/widgets/qcocoamenu_mac.mm @@ -188,6 +188,18 @@ QT_USE_NAMESPACE return NO; } +- (NSInteger)indexOfItemWithTarget:(id)anObject andAction:(SEL)actionSelector +{ + NSInteger index = [super indexOfItemWithTarget:anObject andAction:actionSelector]; + static SEL selForOFCP = NSSelectorFromString(@"orderFrontCharacterPalette:"); + if (index == -1 && selForOFCP == actionSelector) { + // Check if the 'orderFrontCharacterPalette' SEL exists for QCocoaMenuLoader object + QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = [NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)]; + return [super indexOfItemWithTarget:loader andAction:actionSelector]; + } + return index; +} + @end QT_BEGIN_NAMESPACE diff --git a/src/gui/widgets/qcocoamenu_mac_p.h b/src/gui/widgets/qcocoamenu_mac_p.h index d6ac8c5..1a42642 100644 --- a/src/gui/widgets/qcocoamenu_mac_p.h +++ b/src/gui/widgets/qcocoamenu_mac_p.h @@ -76,6 +76,7 @@ QT_FORWARD_DECLARE_CLASS(QAction) } - (id)initWithQMenu:(QMenu*)menu; - (BOOL)menuHasKeyEquivalent:(NSMenu *)menu forEvent:(NSEvent *)event target:(id *)target action:(SEL *)action; +- (NSInteger)indexOfItemWithTarget:(id)anObject andAction:(SEL)actionSelector; @end #endif diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp index 60851ac..3190a30 100644 --- a/src/network/bearer/qnetworkconfiguration.cpp +++ b/src/network/bearer/qnetworkconfiguration.cpp @@ -406,13 +406,6 @@ QList<QNetworkConfiguration> QNetworkConfiguration::children() const This function is deprecated. It is equivalent to calling bearerTypeName(), however bearerType() should be used in preference. */ -QString QNetworkConfiguration::bearerName() const -{ - // This function cannot be inline as it would break Qt Mobility. - // Qt Mobility uses the Qt header as well and since the Mobility Bearer library - // does not provide bearerTypeName() we cannot use an inline function. - return bearerTypeName(); -} /*! Returns the type of bearer used by this network configuration. diff --git a/src/network/bearer/qnetworkconfiguration.h b/src/network/bearer/qnetworkconfiguration.h index 18b92a9..593dbbe 100644 --- a/src/network/bearer/qnetworkconfiguration.h +++ b/src/network/bearer/qnetworkconfiguration.h @@ -103,6 +103,7 @@ public: Q_DECLARE_FLAGS(StateFlags, StateFlag) +#ifndef QT_MOBILITY_BEARER enum BearerType { BearerUnknown, BearerEthernet, @@ -114,17 +115,22 @@ public: BearerBluetooth, BearerWiMAX }; +#endif StateFlags state() const; Type type() const; Purpose purpose() const; - // Required to maintain source compatibility with Qt Mobility. +#ifndef QT_MOBILITY_BEARER #ifdef QT_DEPRECATED - QT_DEPRECATED QString bearerName() const; + // Required to maintain source compatibility with Qt Mobility. + QT_DEPRECATED inline QString bearerName() const { return bearerTypeName(); } #endif BearerType bearerType() const; QString bearerTypeName() const; +#else + QString bearerName() const; +#endif QString identifier() const; bool isRoamingAvailable() const; diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h index e7fffac..0b40147 100644 --- a/src/network/bearer/qnetworksession.h +++ b/src/network/bearer/qnetworksession.h @@ -89,11 +89,7 @@ public: OperationNotSupportedError, InvalidConfigurationError }; -#ifndef QT_MOBILITY_BEARER - QNetworkSession(const QNetworkConfiguration& connConfig, QObject* parent =0); -#else explicit QNetworkSession(const QNetworkConfiguration& connConfig, QObject* parent =0); -#endif virtual ~QNetworkSession(); bool isOpen() const; diff --git a/src/s60installs/eabi/QtNetworku.def b/src/s60installs/eabi/QtNetworku.def index 2442ee8..6b34a19 100644 --- a/src/s60installs/eabi/QtNetworku.def +++ b/src/s60installs/eabi/QtNetworku.def @@ -1131,7 +1131,7 @@ EXPORTS _ZNK21QNetworkAccessManager13configurationEv @ 1130 NONAME _ZNK21QNetworkAccessManager17networkAccessibleEv @ 1131 NONAME _ZNK21QNetworkAccessManager19activeConfigurationEv @ 1132 NONAME - _ZNK21QNetworkConfiguration10bearerNameEv @ 1133 NONAME + _ZNK21QNetworkConfiguration10bearerNameEv @ 1133 NONAME ABSENT _ZNK21QNetworkConfiguration10identifierEv @ 1134 NONAME _ZNK21QNetworkConfiguration18isRoamingAvailableEv @ 1135 NONAME _ZNK21QNetworkConfiguration4nameEv @ 1136 NONAME |