summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@nokia.com>2010-03-01 12:54:34 (GMT)
committerMaurice Kalinowski <maurice.kalinowski@nokia.com>2010-03-01 12:54:34 (GMT)
commit5841e1d4662c97433a09ac0e3c6430145ee7ddee (patch)
treea76239336c477ebfce224f35038ad603a9579051
parent4795583b42577259499b34da07077f501e45ce42 (diff)
parentdd4079c6c465c80104ff0ea1cda681ed7cc18310 (diff)
downloadQt-5841e1d4662c97433a09ac0e3c6430145ee7ddee.zip
Qt-5841e1d4662c97433a09ac0e3c6430145ee7ddee.tar.gz
Qt-5841e1d4662c97433a09ac0e3c6430145ee7ddee.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into oslo1_47
-rwxr-xr-xbin/syncqt3
-rw-r--r--src/gui/kernel/qapplication_mac.mm20
-rw-r--r--tools/qdoc3/test/qdeclarative.qdocconf (renamed from tools/qdoc3/test/qml.qdocconf)0
3 files changed, 19 insertions, 4 deletions
diff --git a/bin/syncqt b/bin/syncqt
index 6fb21dd..be4af2a 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -356,12 +356,13 @@ sub fixPaths {
#setup
my $ret = $file;
+ $ret =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
my $file_dir = dirname($file);
if($file_dir eq ".") {
$file_dir = getcwd();
$file_dir =~ s=\\=/=g;
}
- $file_dir =~ s,/cygdrive/([a-zA-Z])/,$1:,g;
+ $file_dir =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
if($dir eq ".") {
$dir = getcwd();
$dir =~ s=\\=/=g;
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index e511c3a..babfc72 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -1222,9 +1222,16 @@ void qt_init(QApplicationPrivate *priv, int)
#endif
if (!app_proc_ae_handlerUPP) {
app_proc_ae_handlerUPP = AEEventHandlerUPP(QApplicationPrivate::globalAppleEventProcessor);
- for(uint i = 0; i < sizeof(app_apple_events) / sizeof(QMacAppleEventTypeSpec); ++i)
- AEInstallEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id,
- app_proc_ae_handlerUPP, SRefCon(qApp), false);
+ for(uint i = 0; i < sizeof(app_apple_events) / sizeof(QMacAppleEventTypeSpec); ++i) {
+ // Install apple event handler, but avoid overwriting an already
+ // existing handler (it means a 3rd party application has installed one):
+ SRefCon refCon = 0;
+ AEEventHandlerUPP current_handler = NULL;
+ AEGetEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id, &current_handler, &refCon, false);
+ if (!current_handler)
+ AEInstallEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id,
+ app_proc_ae_handlerUPP, SRefCon(qApp), false);
+ }
}
if (QApplicationPrivate::app_style) {
@@ -2495,6 +2502,13 @@ void QApplicationPrivate::setupAppleEvents()
// finished initialization, which appears to be just after [NSApplication run] has
// started to execute. By setting up our apple events handlers this late, we override
// the ones set up by NSApplication.
+
+ // If Qt is used as a plugin, we let the 3rd party application handle events
+ // like quit and open file events. Otherwise, if we install our own handlers, we
+ // easily end up breaking functionallity the 3rd party application depend on:
+ if (QApplication::testAttribute(Qt::AA_MacPluginApplication))
+ return;
+
QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) *newDelegate = [QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate];
NSAppleEventManager *eventManager = [NSAppleEventManager sharedAppleEventManager];
[eventManager setEventHandler:newDelegate andSelector:@selector(appleEventQuit:withReplyEvent:)
diff --git a/tools/qdoc3/test/qml.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf
index 3b5d8dc..3b5d8dc 100644
--- a/tools/qdoc3/test/qml.qdocconf
+++ b/tools/qdoc3/test/qdeclarative.qdocconf