diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2011-09-28 22:20:06 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-03 05:59:07 +0200 |
commit | 3fd9398052d2b483d2830c3661ceed26e551fa49 (patch) | |
tree | 9eeca582e2c749aca76c3df38ffb1043344a70c6 /src/widgets/platforms | |
parent | 302b3c7d073d1bccd4468c990510697b77b2ece9 (diff) |
Remove the remaining traces of QT3_SUPPORT
The only place that now still knows about it is moc,
so it can still parse old headers.
Change-Id: Iafec080f99c67560974e9ebc0cbfb27d9a4b2d6f
Reviewed-on: http://codereview.qt-project.org/5755
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/widgets/platforms')
-rw-r--r-- | src/widgets/platforms/mac/qapplication_mac.mm | 9 | ||||
-rw-r--r-- | src/widgets/platforms/mac/qkeymapper_mac.cpp | 30 | ||||
-rw-r--r-- | src/widgets/platforms/mac/qwidget_mac.mm | 3 | ||||
-rw-r--r-- | src/widgets/platforms/win/qkeymapper_win.cpp | 16 | ||||
-rw-r--r-- | src/widgets/platforms/x11/qkeymapper_x11.cpp | 12 |
5 files changed, 2 insertions, 68 deletions
diff --git a/src/widgets/platforms/mac/qapplication_mac.mm b/src/widgets/platforms/mac/qapplication_mac.mm index 5868849836..d77c01fc95 100644 --- a/src/widgets/platforms/mac/qapplication_mac.mm +++ b/src/widgets/platforms/mac/qapplication_mac.mm @@ -1350,15 +1350,6 @@ bool qt_wstate_iconified(WId) extern QWidget * mac_mouse_grabber; extern QWidget * mac_keyboard_grabber; -#ifdef QT3_SUPPORT -void QApplication::setMainWidget(QWidget *mainWidget) -{ - QApplicationPrivate::main_widget = mainWidget; - if (QApplicationPrivate::main_widget && windowIcon().isNull() - && QApplicationPrivate::main_widget->testAttribute(Qt::WA_SetWindowIcon)) - setWindowIcon(QApplicationPrivate::main_widget->windowIcon()); -} -#endif #ifndef QT_NO_CURSOR /***************************************************************************** diff --git a/src/widgets/platforms/mac/qkeymapper_mac.cpp b/src/widgets/platforms/mac/qkeymapper_mac.cpp index e96caf1b9d..75a36673be 100644 --- a/src/widgets/platforms/mac/qkeymapper_mac.cpp +++ b/src/widgets/platforms/mac/qkeymapper_mac.cpp @@ -970,36 +970,10 @@ QKeyMapper::sendKeyEvent(QWidget *widget, bool grab, quint32 nativeModifiers, bool *isAccepted) { Q_UNUSED(count); + Q_UNUSED(grab); + if (widget && widget->isEnabled()) { bool key_event = true; -#if defined(QT3_SUPPORT) && !defined(QT_NO_SHORTCUT) - if (type == QEvent::KeyPress && !grab - && QApplicationPrivate::instance()->use_compat()) { - QKeyEventEx accel_ev(type, code, modifiers, - text, autorepeat, qMax(1, int(text.length())), - nativeScanCode, nativeVirtualKey, nativeModifiers); - if (QApplicationPrivate::instance()->qt_tryAccelEvent(widget, &accel_ev)) { -#if defined(DEBUG_KEY_BINDINGS) || defined(DEBUG_KEY_BINDINGS_MODIFIERS) - qDebug("KeyEvent: %s::%s consumed Accel: %s", - widget ? widget->metaObject()->className() : "none", - widget ? widget->objectName().toLatin1().constData() : "", - text.toLatin1().constData()); -#endif - key_event = false; - } else { - if (accel_ev.isAccepted()) { -#if defined(DEBUG_KEY_BINDINGS) || defined(DEBUG_KEY_BINDINGS_MODIFIERS) - qDebug("KeyEvent: %s::%s overrode Accel: %s", - widget ? widget->metaObject()->className() : "none", - widget ? widget->objectName().toLatin1().constData() : "", - text.toLatin1().constData()); -#endif - } - } - } -#else -Q_UNUSED(grab); -#endif // QT3_SUPPORT && !QT_NO_SHORTCUT if (key_event) { #if defined(DEBUG_KEY_BINDINGS) || defined(DEBUG_KEY_BINDINGS_MODIFIERS) qDebug("KeyEvent: Sending %s to %s::%s: %s 0x%08x%s", diff --git a/src/widgets/platforms/mac/qwidget_mac.mm b/src/widgets/platforms/mac/qwidget_mac.mm index 4adaa6b288..39a4895357 100644 --- a/src/widgets/platforms/mac/qwidget_mac.mm +++ b/src/widgets/platforms/mac/qwidget_mac.mm @@ -1381,9 +1381,6 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event, qrgn.translate(redirectionOffset); QPaintEvent e(qrgn); widget->d_func()->dirtyOnWidget = QRegion(); -#ifdef QT3_SUPPORT - e.setErased(true); -#endif QApplication::sendSpontaneousEvent(widget, &e); if (!redirectionOffset.isNull()) widget->d_func()->restoreRedirected(); diff --git a/src/widgets/platforms/win/qkeymapper_win.cpp b/src/widgets/platforms/win/qkeymapper_win.cpp index 78389c1160..076b37038d 100644 --- a/src/widgets/platforms/win/qkeymapper_win.cpp +++ b/src/widgets/platforms/win/qkeymapper_win.cpp @@ -1168,24 +1168,8 @@ bool QKeyMapper::sendKeyEvent(QWidget *widget, bool grab, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, bool *) { -#if defined(Q_OS_WINCE) Q_UNUSED(grab); -#endif Q_UNUSED(count); -#if defined QT3_SUPPORT && !defined(QT_NO_SHORTCUT) - if (type == QEvent::KeyPress - && !grab - && QApplicationPrivate::instance()->use_compat()) { - // send accel events if the keyboard is not grabbed - QKeyEventEx a(type, code, modifiers, - text, autorepeat, qMax(1, int(text.length())), - nativeScanCode, nativeVirtualKey, nativeModifiers); - if (QApplicationPrivate::instance()->qt_tryAccelEvent(widget, &a)) - return true; - } -#else - Q_UNUSED(grab); -#endif if (!widget->isEnabled()) return false; diff --git a/src/widgets/platforms/x11/qkeymapper_x11.cpp b/src/widgets/platforms/x11/qkeymapper_x11.cpp index 455840f8b2..7e348b3385 100644 --- a/src/widgets/platforms/x11/qkeymapper_x11.cpp +++ b/src/widgets/platforms/x11/qkeymapper_x11.cpp @@ -1708,18 +1708,6 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *keyWidget, const XEvent *even curr_autorep = autor ? event->xkey.keycode : 0; } -#if defined QT3_SUPPORT && !defined(QT_NO_SHORTCUT) - // process accelerators before doing key compression - if (type == QEvent::KeyPress && !grab - && QApplicationPrivate::instance()->use_compat()) { - // send accel events if the keyboard is not grabbed - QKeyEventEx a(type, code, modifiers, text, autor, qMax(qMax(count,1), int(text.length())), - event->xkey.keycode, keysym, event->xkey.state); - if (QApplicationPrivate::instance()->qt_tryAccelEvent(keyWidget, &a)) - return true; - } -#endif - #ifndef QT_NO_IM QInputContext *qic = keyWidget->inputContext(); #endif |