diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-26 14:53:30 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-31 10:10:06 +0900 |
commit | e8f6750e65767709575720eb6da1402e6ef20bad (patch) | |
tree | d1d2db5eff55dc1f66155b8f4ef2ba260a1b1b3c /tdeui/qxembed.cpp | |
parent | 97fea74e68727e260cb1901763ad4d43f7f96342 (diff) | |
download | tdelibs-e8f6750e65767709575720eb6da1402e6ef20bad.tar.gz tdelibs-e8f6750e65767709575720eb6da1402e6ef20bad.zip |
Drop USE_TQT4 code
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 57af4f9d87ac88216a3bbcebaeed55db07a8948d)
Diffstat (limited to 'tdeui/qxembed.cpp')
-rw-r--r-- | tdeui/qxembed.cpp | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tdeui/qxembed.cpp b/tdeui/qxembed.cpp index 9a31d68e1..0915813f8 100644 --- a/tdeui/qxembed.cpp +++ b/tdeui/qxembed.cpp @@ -319,11 +319,7 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // Variable `obeyFocus' suggests that this is the result of mouse // activity in the client. The XEMBED_REQUEST_FOCUS message causes // the embedding widget to take the Qt focus (L2085). -#ifdef USE_QT4 - WId window = ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->effectiveWinId(); -#else // USE_QT4 WId window = ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->parentWinId; -#endif // USE_QT4 focusMap->remove( tqApp->focusWidget()->topLevelWidget() ); sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS ); } else if ( fe->reason() == TQFocusEvent::ActiveWindow ) { @@ -365,32 +361,20 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) bool tabForward = true; if ( !(k->state() & ControlButton || k->state() & AltButton) ) { if ( k->key() == Key_Backtab || (k->key() == Key_Tab && (k->state() & ShiftButton)) ) { -#ifdef USE_QT4 - res = ((QPublicWidget*)w)->focusNextPrev( tabForward = false ); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Backtab ); res = ((QPublicWidget*)w)->focusNextPrev( tabForward = false ); TQFocusEvent::resetReason(); -#endif // USE_QT4 } else if ( k->key() == Key_Tab ) { -#ifdef USE_QT4 - res = ((QPublicWidget*)w)->focusNextPrev( tabForward = true ); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Tab ); res = ((QPublicWidget*)w)->focusNextPrev( tabForward = true ); TQFocusEvent::resetReason(); -#endif // USE_QT4 } } if (res) { // L0625: We changed the focus because of tab/backtab key // Now check whether we have been looping around. TQFocusData *fd = ((QPublicWidget*)w)->focusData(); -#ifdef USE_QT4 - WId window = ((QPublicWidget*)w->topLevelWidget())->effectiveWinId(); -#else // USE_QT4 WId window = ((QPublicWidget*)w->topLevelWidget())->topData()->parentWinId; -#endif // USE_QT4 TQWidget *cw = 0; TQWidget *fw = fd->home(); if (tabForward && window) { @@ -445,12 +429,7 @@ static int qxembed_x11_event_filter( XEvent* e) // L0675: We just have been embedded into a XEMBED aware widget. TQTLWExtra *extra = ((QPublicWidget*)w->topLevelWidget())->topData(); extra->embedded = 1; -#ifdef USE_QT4 - // [FIXME] - printf("[FIXME] WId not set in tdelibs/tdeui/qxembed.cpp\n"); -#else // USE_QT4 extra->parentWinId = e->xclient.data.l[3]; -#endif // USE_QT4 w->topLevelWidget()->show(); break; } @@ -509,29 +488,19 @@ static int qxembed_x11_event_filter( XEvent* e) case XEMBED_FOCUS_FIRST: { // L0684: Search first widget in tab chain -#ifdef USE_QT4 - w->topLevelWidget()->setFocus(); - ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Tab ); w->topLevelWidget()->setFocus(); ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true); TQFocusEvent::resetReason(); -#endif // USE_QT4 } break; case XEMBED_FOCUS_LAST: { // L0686: Search last widget in tab chain -#ifdef USE_QT4 - w->topLevelWidget()->setFocus(); - ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Backtab ); w->topLevelWidget()->setFocus(); ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false); TQFocusEvent::resetReason(); -#endif // USE_QT4 } break; default: @@ -1168,13 +1137,9 @@ bool QXEmbed::x11Event( XEvent* e) if (d->xplain && d->xgrab) { // L2060: The passive grab has intercepted a mouse click // in the embedded client window. Take the focus. -#ifdef USE_QT4 - setFocus(); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Mouse ); setFocus(); TQFocusEvent::resetReason(); -#endif // USE_QT4 // L2064: Resume X11 event processing. XAllowEvents(tqt_xdisplay(), ReplayPointer, CurrentTime); // L2065: Qt should not know about this. @@ -1213,20 +1178,12 @@ bool QXEmbed::x11Event( XEvent* e) if( ((QPublicWidget*)topLevelWidget())->topData()->embedded ) { focusMap->remove( topLevelWidget() ); focusMap->insert( topLevelWidget(), new TQGuardedPtr<TQWidget>( this )); -#ifdef USE_QT4 - WId window = ((QPublicWidget*)topLevelWidget())->effectiveWinId(); -#else // USE_QT4 WId window = ((QPublicWidget*)topLevelWidget())->topData()->parentWinId; -#endif // USE_QT4 sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS ); } else { -#ifdef USE_QT4 - setFocus(); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Mouse ); setFocus(); TQFocusEvent::resetReason(); -#endif // USE_QT4 } break; default: @@ -1318,12 +1275,7 @@ void QXEmbed::embedClientIntoWindow(TQWidget* client, WId window) XReparentWindow(tqt_xdisplay(), client->winId(), window, 0, 0); // L2451: These two lines are redundant. See L0680. ((QXEmbed*)client)->topData()->embedded = true; -#ifdef USE_QT4 - // [FIXME] - printf("[FIXME] WId not set in tdelibs/tdeui/qxembed.cpp\n"); -#else // USE_QT4 ((QXEmbed*)client)->topData()->parentWinId = window; -#endif // USE_QT4 // L2452: This seems redundant because L2020 maps the window. // But calling show() might also set Qt internal flags. client->show(); |