Replace 'Event' #define strings

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit ef173e633b)
r14.1.x
Michele Calgaro 1 year ago
parent 51d0291b08
commit ae35bc48cb
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -3830,7 +3830,7 @@ void KMComposeWin::slotCopy()
#endif #endif
TQKeyEvent k(TQEvent::KeyPress, Key_C, 0, ControlButton); TQKeyEvent k(TQEvent::KeyPress, Key_C, 0, ControlButton);
kapp->notify(TQT_TQOBJECT(fw), TQT_TQEVENT(&k)); kapp->notify(fw, &k);
} }

@ -569,7 +569,7 @@ bool KMEdit::eventFilter(TQObject*o, TQEvent* e)
} }
} }
} else if ( e->type() == TQEvent::FocusIn || e->type() == TQEvent::FocusOut ) { } else if ( e->type() == TQEvent::FocusIn || e->type() == TQEvent::FocusOut ) {
TQFocusEvent *fe = TQT_TQFOCUSEVENT(e); TQFocusEvent *fe = static_cast<TQFocusEvent*>(e);
if(! (fe->reason() == TQFocusEvent::ActiveWindow || fe->reason() == TQFocusEvent::Popup) ) if(! (fe->reason() == TQFocusEvent::ActiveWindow || fe->reason() == TQFocusEvent::Popup) )
emit focusChanged( fe->gotFocus() ); emit focusChanged( fe->gotFocus() );
} }

@ -1753,10 +1753,10 @@ void KMFolderTree::slotToggleSizeColumn()
bool KMFolderTree::eventFilter( TQObject *o, TQEvent *e ) bool KMFolderTree::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( e->type() == TQEvent::MouseButtonPress && if ( e->type() == TQEvent::MouseButtonPress &&
TQT_TQMOUSEEVENT(e)->button() == TQt::RightButton && static_cast<TQMouseEvent*>(e)->button() == TQt::RightButton &&
o->isA("TQHeader") ) o->isA("TQHeader") )
{ {
mPopup->popup( TQT_TQMOUSEEVENT(e)->globalPos() ); mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() );
return true; return true;
} }
return KFolderTree::eventFilter(o, e); return KFolderTree::eventFilter(o, e);

@ -235,7 +235,7 @@ KMHeaders::~KMHeaders ()
bool KMHeaders::eventFilter ( TQObject *o, TQEvent *e ) bool KMHeaders::eventFilter ( TQObject *o, TQEvent *e )
{ {
if ( e->type() == TQEvent::MouseButtonPress && if ( e->type() == TQEvent::MouseButtonPress &&
TQT_TQMOUSEEVENT(e)->button() == TQt::RightButton && static_cast<TQMouseEvent*>(e)->button() == TQt::RightButton &&
o->isA("TQHeader") ) o->isA("TQHeader") )
{ {
// if we currently only show one of either sender/receiver column // if we currently only show one of either sender/receiver column
@ -248,7 +248,7 @@ bool KMHeaders::eventFilter ( TQObject *o, TQEvent *e )
else else
mPopup->changeItem(KPaintInfo::COL_RECEIVER, i18n("Receiver")); mPopup->changeItem(KPaintInfo::COL_RECEIVER, i18n("Receiver"));
mPopup->popup( TQT_TQMOUSEEVENT(e)->globalPos() ); mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() );
return true; return true;
} }
return TDEListView::eventFilter(o, e); return TDEListView::eventFilter(o, e);

@ -2754,7 +2754,7 @@ static TQString linkForNode( const DOM::Node &node )
bool KMReaderWin::eventFilter( TQObject *, TQEvent *e ) bool KMReaderWin::eventFilter( TQObject *, TQEvent *e )
{ {
if ( e->type() == TQEvent::MouseButtonPress ) { if ( e->type() == TQEvent::MouseButtonPress ) {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if ( me->button() == TQt::LeftButton && ( me->state() & ShiftButton ) ) { if ( me->button() == TQt::LeftButton && ( me->state() & ShiftButton ) ) {
// special processing for shift+click // special processing for shift+click
URLHandlerManager::instance()->handleShiftClick( mHoveredUrl, this ); URLHandlerManager::instance()->handleShiftClick( mHoveredUrl, this );
@ -2786,7 +2786,7 @@ bool KMReaderWin::eventFilter( TQObject *, TQEvent *e )
} }
if ( e->type() == TQEvent::MouseMove ) { if ( e->type() == TQEvent::MouseMove ) {
TQMouseEvent* me = TQT_TQMOUSEEVENT( e ); TQMouseEvent* me = static_cast<TQMouseEvent*>( e );
// Handle this ourselves instead of connecting to mViewer::onURL(), since TDEHTML misses some // Handle this ourselves instead of connecting to mViewer::onURL(), since TDEHTML misses some
// notifications in case we started a drag ourselves // notifications in case we started a drag ourselves

@ -1472,7 +1472,7 @@ void ArticleWidget::focusOutEvent( TQFocusEvent *e )
bool ArticleWidget::eventFilter( TQObject *o, TQEvent *e ) bool ArticleWidget::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( e->type() == TQEvent::KeyPress && (TQT_TQKEYEVENT(e)->key() == Key_Tab) ) { if ( e->type() == TQEvent::KeyPress && (static_cast<TQKeyEvent*>(e)->key() == Key_Tab) ) {
emit focusChangeRequest( this ); emit focusChangeRequest( this );
if ( !hasFocus() ) // focusChangeRequest was successful if ( !hasFocus() ) // focusChangeRequest was successful
return true; return true;

@ -540,7 +540,7 @@ void KNHeaderView::slotSizeChanged( int section, int, int newSize )
bool KNHeaderView::eventFilter(TQObject *o, TQEvent *e) bool KNHeaderView::eventFilter(TQObject *o, TQEvent *e)
{ {
if ((e->type() == TQEvent::KeyPress) && (TQT_TQKEYEVENT(e)->key() == Key_Tab)) { if ((e->type() == TQEvent::KeyPress) && (static_cast<TQKeyEvent*>(e)->key() == Key_Tab)) {
emit(focusChangeRequest(this)); emit(focusChangeRequest(this));
if (!hasFocus()) // focusChangeRequest was successful if (!hasFocus()) // focusChangeRequest was successful
return true; return true;
@ -548,10 +548,10 @@ bool KNHeaderView::eventFilter(TQObject *o, TQEvent *e)
// right click on header // right click on header
if ( e->type() == TQEvent::MouseButtonPress && if ( e->type() == TQEvent::MouseButtonPress &&
TQT_TQMOUSEEVENT(e)->button() == TQt::RightButton && static_cast<TQMouseEvent*>(e)->button() == TQt::RightButton &&
o->isA("TQHeader") ) o->isA("TQHeader") )
{ {
mPopup->popup( TQT_TQMOUSEEVENT(e)->globalPos() ); mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() );
return true; return true;
} }

@ -421,7 +421,7 @@ void KNCollectionView::updatePopup() const
bool KNCollectionView::eventFilter(TQObject *o, TQEvent *e) bool KNCollectionView::eventFilter(TQObject *o, TQEvent *e)
{ {
if ((e->type() == TQEvent::KeyPress) && (TQT_TQKEYEVENT(e)->key() == Key_Tab)) { if ((e->type() == TQEvent::KeyPress) && (static_cast<TQKeyEvent*>(e)->key() == Key_Tab)) {
emit(focusChangeRequest(this)); emit(focusChangeRequest(this));
if (!hasFocus()) // focusChangeRequest was successful if (!hasFocus()) // focusChangeRequest was successful
return true; return true;
@ -429,10 +429,10 @@ bool KNCollectionView::eventFilter(TQObject *o, TQEvent *e)
// header popup menu // header popup menu
if ( e->type() == TQEvent::MouseButtonPress && if ( e->type() == TQEvent::MouseButtonPress &&
TQT_TQMOUSEEVENT(e)->button() == TQt::RightButton && static_cast<TQMouseEvent*>(e)->button() == TQt::RightButton &&
o->isA("TQHeader") ) o->isA("TQHeader") )
{ {
mPopup->popup( TQT_TQMOUSEEVENT(e)->globalPos() ); mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() );
return true; return true;
} }

@ -1381,7 +1381,7 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev )
if ( o == m_editor ) { if ( o == m_editor ) {
if ( ev->type() == TQEvent::FocusOut ) { if ( ev->type() == TQEvent::FocusOut ) {
TQFocusEvent *fe = TQT_TQFOCUSEVENT(ev); TQFocusEvent *fe = static_cast<TQFocusEvent*>(ev);
if ( fe->reason() != TQFocusEvent::Popup && if ( fe->reason() != TQFocusEvent::Popup &&
fe->reason() != TQFocusEvent::Mouse ) { fe->reason() != TQFocusEvent::Mouse ) {
updateFocus(); updateFocus();

@ -384,14 +384,14 @@ bool KOAgenda::eventFilter ( TQObject *object, TQEvent *event )
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
case TQEvent::MouseMove: case TQEvent::MouseMove:
return eventFilter_mouse( object, TQT_TQMOUSEEVENT( event ) ); return eventFilter_mouse( object, static_cast<TQMouseEvent*>( event ) );
#ifndef TQT_NO_WHEELEVENT #ifndef TQT_NO_WHEELEVENT
case TQEvent::Wheel: case TQEvent::Wheel:
return eventFilter_wheel( object, TQT_TQWHEELEVENT( event ) ); return eventFilter_wheel( object, static_cast<TQWheelEvent*>( event ) );
#endif #endif
case TQEvent::KeyPress: case TQEvent::KeyPress:
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
return eventFilter_key( object, TQT_TQKEYEVENT( event ) ); return eventFilter_key( object, static_cast<TQKeyEvent*>( event ) );
case ( TQEvent::Leave ): case ( TQEvent::Leave ):
if ( !mActionItem ) if ( !mActionItem )
@ -526,10 +526,10 @@ bool KOAgenda::eventFilter_key( TQObject *, TQKeyEvent *ke )
case Key_Alt: case Key_Alt:
break; break;
default: default:
mTypeAheadEvents.append( TQT_TQEVENT( new TQKeyEvent( ke->type(), ke->key(), mTypeAheadEvents.append( new TQKeyEvent( ke->type(), ke->key(),
ke->ascii(), ke->state(), ke->ascii(), ke->state(),
ke->text(), ke->isAutoRepeat(), ke->text(), ke->isAutoRepeat(),
ke->count() ) ) ); ke->count() ) );
if ( !mTypeAhead ) { if ( !mTypeAhead ) {
mTypeAhead = true; mTypeAhead = true;
emitNewEventForSelection(); emitNewEventForSelection();
@ -615,7 +615,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
mClickedItem->incidence(), mClickedItem->incidence(),
mClickedItem->itemDate() ); mClickedItem->itemDate() );
} else { } else {
return TQScrollView::eventFilter( TQT_TQOBJECT(object), TQT_TQEVENT(me) ); // pass through for use by multiagenda return TQScrollView::eventFilter( object, me ); // pass through for use by multiagenda
} }
} else { } else {
KOAgendaItem* item = dynamic_cast<KOAgendaItem *>(object); KOAgendaItem* item = dynamic_cast<KOAgendaItem *>(object);
@ -635,7 +635,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
// null. // null.
selectItem( item ); selectItem( item );
} else { } else {
return TQScrollView::eventFilter( TQT_TQOBJECT(object), TQT_TQEVENT(me) ); // pass through for use by multiagenda return TQScrollView::eventFilter( object, me ); // pass through for use by multiagenda
} }
} }
} else { } else {
@ -662,7 +662,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
startSelectAction(viewportPos); startSelectAction(viewportPos);
} }
} }
return TQScrollView::eventFilter( TQT_TQOBJECT(object), TQT_TQEVENT(me) ); // pass through for use by multiagenda return TQScrollView::eventFilter( object, me ); // pass through for use by multiagenda
} }
break; break;

@ -1042,7 +1042,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
e->type() == TQEvent::MouseMove || e->type() == TQEvent::MouseMove ||
e->type() == TQEvent::MouseButtonRelease || e->type() == TQEvent::MouseButtonRelease ||
e->type() == TQEvent::MouseButtonDblClick ) { e->type() == TQEvent::MouseButtonDblClick ) {
TQMouseEvent* me = TQT_TQMOUSEEVENT( e ); TQMouseEvent* me = static_cast<TQMouseEvent*>( e );
// find list box item at the event position // find list box item at the event position
TQListBoxItem *item = completionBox()->itemAt( me->pos() ); TQListBoxItem *item = completionBox()->itemAt( me->pos() );
if ( !item ) { if ( !item ) {
@ -1072,7 +1072,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
} }
if ( ( obj == this ) && if ( ( obj == this ) &&
( e->type() == TQEvent::AccelOverride ) ) { ( e->type() == TQEvent::AccelOverride ) ) {
TQKeyEvent *ke = TQT_TQKEYEVENT( e ); TQKeyEvent *ke = static_cast<TQKeyEvent*>( e );
if ( ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Tab ) { if ( ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Tab ) {
ke->accept(); ke->accept();
return true; return true;
@ -1081,7 +1081,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
if ( ( obj == this ) && if ( ( obj == this ) &&
( e->type() == TQEvent::KeyPress || e->type() == TQEvent::KeyRelease ) && ( e->type() == TQEvent::KeyPress || e->type() == TQEvent::KeyRelease ) &&
completionBox()->isVisible() ) { completionBox()->isVisible() ) {
TQKeyEvent *ke = TQT_TQKEYEVENT( e ); TQKeyEvent *ke = static_cast<TQKeyEvent*>( e );
int currentIndex = completionBox()->currentItem(); int currentIndex = completionBox()->currentItem();
if ( currentIndex < 0 ) { if ( currentIndex < 0 ) {
return true; return true;

Loading…
Cancel
Save