From 451c3e973a49c8b467cc865f6d1f4a2c21902dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 11 Nov 2010 13:01:37 +0100 Subject: Remove qDebug. --- src/corelib/concurrent/qtconcurrentrunbase.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/corelib/concurrent/qtconcurrentrunbase.h b/src/corelib/concurrent/qtconcurrentrunbase.h index a7a5cc4..888d395 100644 --- a/src/corelib/concurrent/qtconcurrentrunbase.h +++ b/src/corelib/concurrent/qtconcurrentrunbase.h @@ -106,7 +106,6 @@ public: this->runFunctor(); #ifndef QT_NO_EXCEPTIONS } catch (QtConcurrent::Exception &e) { - qDebug() << "cought exception"; QFutureInterface::reportException(e); } catch (...) { QFutureInterface::reportException(QtConcurrent::UnhandledException()); -- cgit v0.12 From 54865d47cfd859a0e84ba8e1bbff3b56c93d4e0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 11 Nov 2010 13:37:48 +0100 Subject: Fix restore of maximized window geometry on Windows Task-number: QTBUG-2064 --- src/gui/kernel/qwidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 25450ce..cd1c9f0 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -7053,7 +7053,11 @@ bool QWidget::restoreGeometry(const QByteArray &geometry) if (maximized || fullScreen) { // set geomerty before setting the window state to make // sure the window is maximized to the right screen. + // Skip on windows: the window is restored into a broken + // half-maximized state. +#ifndef Q_WS_WIN setGeometry(restoredNormalGeometry); +#endif Qt::WindowStates ws = windowState(); if (maximized) ws |= Qt::WindowMaximized; -- cgit v0.12 From 4b618e48c909fcc5665e9d60645023c48b2ffb43 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Thu, 11 Nov 2010 12:29:44 +0100 Subject: ShortcutOverride has no effect on some shortcuts on Mac OS X (Cocoa). When generating the native key sequences for menu items, Qt prefers the non private unicode characters. But the characters in the NSEvent for keyboard events can contain characters form the unicode range reserved for Apple. For e.g. when user presses the "delete" key, the event contains NSDeleteFunctionKey, where in Qt is expecting NSDeleteCharacter. For now this is the only key identified for translation. If we find similar translations, those can be added to qt_mac_removePrivateUnicode(). Task-number: QTBUG-12495 Reviewed-by: Denis --- src/gui/kernel/qt_cocoa_helpers_mac.mm | 22 ++++++++++++++++++++++ src/gui/widgets/qcocoamenu_mac.mm | 22 ++++++++++++++-------- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 5a522f9..48d21e9 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -79,6 +79,7 @@ #include #include #include +#include #include #include #include @@ -616,6 +617,27 @@ Qt::KeyboardModifiers qt_cocoaModifiers2QtModifiers(ulong modifierFlags) return qtMods; } +NSString *qt_mac_removePrivateUnicode(NSString* string) +{ + int len = [string length]; + if (len) { + QVarLengthArray characters(len); + bool changed = false; + for (int i = 0; iactivePopupWidget()->focusWidget() : qApp->activePopupWidget()); else if (QApplicationPrivate::focus_widget) widget = QApplicationPrivate::focus_widget; + // If we could not find any receivers, pass it to the active window + if (!widget) + widget = qApp->activeWindow(); if (qaction && widget) { int key = qaction->shortcut(); QKeyEvent accel_ev(QEvent::ShortcutOverride, (key & (~Qt::KeyboardModifierMask)), @@ -177,11 +184,10 @@ QT_USE_NAMESPACE accel_ev.ignore(); qt_sendSpontaneousEvent(widget, &accel_ev); if (accel_ev.isAccepted()) { - if (qt_dispatchKeyEvent(event, widget)) { - *target = nil; - *action = nil; - return YES; - } + qt_dispatchKeyEvent(event, widget); + *target = nil; + *action = nil; + return YES; } } } -- cgit v0.12