diff options
44 files changed, 101 insertions, 101 deletions
diff --git a/chalk/ui/kis_view.cpp b/chalk/ui/kis_view.cpp index 2e123f5d..3a810538 100644 --- a/chalk/ui/kis_view.cpp +++ b/chalk/ui/kis_view.cpp @@ -3449,7 +3449,7 @@ bool KisView::eventFilter(TQObject *o, TQEvent *e) case TQEvent::TabletPress: case TQEvent::TabletRelease: { - TQTabletEvent *te = TQT_TQTABLETEVENT(e); + TQTabletEvent *te = static_cast<TQTabletEvent*>(e); KisInputDevice device; switch (te->device()) { diff --git a/chalk/ui/kobirdeyepanel.cpp b/chalk/ui/kobirdeyepanel.cpp index 5cc9799e..b096725e 100644 --- a/chalk/ui/kobirdeyepanel.cpp +++ b/chalk/ui/kobirdeyepanel.cpp @@ -308,11 +308,11 @@ void KoBirdEyePanel::updateVisibleArea() bool KoBirdEyePanel::eventFilter(TQObject* o, TQEvent* ev) { if (o == m_page->view && ev->type() == TQEvent::Resize) { - resizeViewEvent(TQT_TQRESIZEEVENT(ev)->size()); + resizeViewEvent(static_cast<TQResizeEvent*>(ev)->size()); } if (o == m_page->view && ev->type() == TQEvent::Paint) { - paintViewEvent(TQT_TQPAINTEVENT(ev)); + paintViewEvent(static_cast<TQPaintEvent*>(ev)); } if (o == m_page->view && ev->type() == TQEvent::MouseMove) { diff --git a/karbon/dockers/vdocumentdocker.cpp b/karbon/dockers/vdocumentdocker.cpp index dc676a85..cf02d2cd 100644 --- a/karbon/dockers/vdocumentdocker.cpp +++ b/karbon/dockers/vdocumentdocker.cpp @@ -102,7 +102,7 @@ VDocumentPreview::eventFilter( TQObject* object, TQEvent* event ) } KoRect rect = m_view->canvasWidget()->boundingBox(); - TQMouseEvent* mouseEvent = TQT_TQMOUSEEVENT( event ); + TQMouseEvent* mouseEvent = static_cast<TQMouseEvent*>( event ); if( event->type() == TQEvent::MouseButtonPress ) { m_firstPoint.setX( mouseEvent->pos().x() ); diff --git a/karbon/vtool.cpp b/karbon/vtool.cpp index a9b29ac8..906f53c9 100644 --- a/karbon/vtool.cpp +++ b/karbon/vtool.cpp @@ -150,7 +150,7 @@ VTool::keyEvent( TQEvent* event ) // Key press events. if( event->type() == TQEvent::KeyPress ) { - TQKeyEvent* keyEvent = TQT_TQKEYEVENT( event ); + TQKeyEvent* keyEvent = static_cast<TQKeyEvent*>( event ); // Terminate the current drawing with the Enter-key: if( @@ -211,7 +211,7 @@ VTool::keyEvent( TQEvent* event ) // Key release events: if( event->type() == TQEvent::KeyRelease ) { - TQKeyEvent* keyEvent = TQT_TQKEYEVENT( event ); + TQKeyEvent* keyEvent = static_cast<TQKeyEvent*>( event ); TQt::Key key = (TQt::Key)keyEvent->key(); if( key == TQt::Key_Shift ) diff --git a/karbon/widgets/vstrokefillpreview.cpp b/karbon/widgets/vstrokefillpreview.cpp index 5e05eecd..c7b165f4 100644 --- a/karbon/widgets/vstrokefillpreview.cpp +++ b/karbon/widgets/vstrokefillpreview.cpp @@ -84,7 +84,7 @@ VStrokeFillPreview::paintEvent( TQPaintEvent* event ) bool VStrokeFillPreview::eventFilter( TQObject *, TQEvent *event ) { - TQMouseEvent* e = TQT_TQMOUSEEVENT( event ); + TQMouseEvent* e = static_cast<TQMouseEvent*>( event ); int ex = e->x() - int( ( width() - PANEL_SIZEX ) / 2 ); int ey = e->y() - int( ( height() - PANEL_SIZEY ) / 2 ); diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp index 17f1ced8..ae75caa2 100644 --- a/kexi/formeditor/container.cpp +++ b/kexi/formeditor/container.cpp @@ -63,7 +63,7 @@ EventEater::eventFilter(TQObject *, TQEvent *ev) // we need to simulate the Press event if(ev->type() == TQEvent::MouseButtonRelease && m_widget->inherits("TQTabWidget")) { - TQMouseEvent *mev = TQT_TQMOUSEEVENT(ev); + TQMouseEvent *mev = static_cast<TQMouseEvent*>(ev); if(mev->button() == TQt::LeftButton) { TQMouseEvent *myev = new TQMouseEvent(TQEvent::MouseButtonPress, mev->pos(), mev->button(), mev->state()); @@ -162,7 +162,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) kdDebug() << "TQEvent::MouseButtonPress this = " << name() << endl; m_moving = TQT_TQWIDGET(s); - TQMouseEvent *mev = TQT_TQMOUSEEVENT(e); + TQMouseEvent *mev = static_cast<TQMouseEvent*>(e); m_grab = TQPoint(mev->x(), mev->y()); // we are drawing a connection @@ -239,7 +239,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) case TQEvent::MouseButtonRelease: { - TQMouseEvent *mev = TQT_TQMOUSEEVENT(e); + TQMouseEvent *mev = static_cast<TQMouseEvent*>(e); if (!m_mousePressEventReceived) { m_mouseReleaseEvent = *mev; m_objectForMouseReleaseEvent = s; @@ -252,7 +252,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) case TQEvent::MouseMove: { - TQMouseEvent *mev = TQT_TQMOUSEEVENT(e); + TQMouseEvent *mev = static_cast<TQMouseEvent*>(e); if(m_insertBegin!=TQPoint(-1,-1) && FormManager::self()->isInserting() && ((mev->state() == TQt::LeftButton) || (mev->state() == (TQt::LeftButton|TQt::ControlButton)) || (mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) || (mev->state() == (TQt::LeftButton|TQt::ShiftButton)) ) ) // draw the insert rect @@ -343,7 +343,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) //case TQEvent::AccelOverride: case TQEvent::KeyPress: { - TQKeyEvent *kev = TQT_TQKEYEVENT(e); + TQKeyEvent *kev = static_cast<TQKeyEvent*>(e); if(kev->key() == Key_F2) // pressing F2 == double-clicking { @@ -374,7 +374,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) // we simulate a mouse move event to update screen TQMouseEvent *mev = new TQMouseEvent(TQEvent::MouseMove, m_moving->mapFromGlobal(TQCursor::pos()), TQt::NoButton, TQt::LeftButton|TQt::ControlButton ); - eventFilter(TQT_TQOBJECT(m_moving), TQT_TQEVENT(mev)); + eventFilter(m_moving, mev); delete mev; } else if(kev->key() == FormManager::self()->contextMenuKey()) @@ -435,7 +435,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) case TQEvent::KeyRelease: { - TQKeyEvent *kev = TQT_TQKEYEVENT(e); + TQKeyEvent *kev = static_cast<TQKeyEvent*>(e); if((kev->key() == Key_Control) && (m_state == CopyingWidget)) { // cancel copying //m_copyRect = TQRect(); diff --git a/kexi/formeditor/widgetfactory.cpp b/kexi/formeditor/widgetfactory.cpp index 14fd2665..6611be2f 100644 --- a/kexi/formeditor/widgetfactory.cpp +++ b/kexi/formeditor/widgetfactory.cpp @@ -388,7 +388,7 @@ WidgetFactory::eventFilter(TQObject *obj, TQEvent *ev) if(obj != (TQObject *)w) return false; - TQKeyEvent *e = TQT_TQKEYEVENT(ev); + TQKeyEvent *e = static_cast<TQKeyEvent*>(ev); if(((e->key() == TQt::Key_Return) || (e->key() == TQt::Key_Enter)) && (e->state() != AltButton)) resetEditor(); if(e->key() == TQt::Key_Escape) diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp index 99e6f511..5beed16b 100644 --- a/kexi/formeditor/widgetpropertyset.cpp +++ b/kexi/formeditor/widgetpropertyset.cpp @@ -749,13 +749,13 @@ WidgetPropertySet::eventFilter(TQObject *o, TQEvent *ev) return false; if(d->lastGeoCommand) - d->lastGeoCommand->setPos(TQT_TQMOVEEVENT(ev)->pos()); + d->lastGeoCommand->setPos(static_cast<TQMoveEvent*>(ev)->pos()); else { TQStringList list; foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets) list.append((*it)->name()); - d->lastGeoCommand = new GeometryPropertyCommand(this, list, TQT_TQMOVEEVENT(ev)->oldPos()); + d->lastGeoCommand = new GeometryPropertyCommand(this, list, static_cast<TQMoveEvent*>(ev)->oldPos()); if (KFormDesigner::FormManager::self()->activeForm()) KFormDesigner::FormManager::self()->activeForm()->addCommand(d->lastGeoCommand, false); } diff --git a/kexi/kexiutils/utils.cpp b/kexi/kexiutils/utils.cpp index ed62c07c..4a0d5489 100644 --- a/kexi/kexiutils/utils.cpp +++ b/kexi/kexiutils/utils.cpp @@ -375,17 +375,17 @@ void* KexiUtils::stringToPtrInternal(const TQString& str, uint size) void KexiUtils::setFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason) { TQEvent fe( TQEvent::FocusIn ); - TQT_TQFOCUSEVENT(&fe)->setReason(reason); + static_cast<TQFocusEvent*>(&fe)->setReason(reason); TQApplication::sendEvent( widget, &fe ); - TQT_TQFOCUSEVENT(&fe)->resetReason(); + static_cast<TQFocusEvent*>(&fe)->resetReason(); } void KexiUtils::unsetFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason) { TQEvent fe( TQEvent::FocusOut ); - TQT_TQFOCUSEVENT(&fe)->setReason(reason); + static_cast<TQFocusEvent*>(&fe)->setReason(reason); TQApplication::sendEvent( widget, &fe ); - TQT_TQFOCUSEVENT(&fe)->resetReason(); + static_cast<TQFocusEvent*>(&fe)->resetReason(); } CopyFileResult KexiUtils::copyFile(const TQString& src, const TQString& dest) diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp index 1c313ba2..0920928b 100644 --- a/kexi/main/keximainwindowimpl.cpp +++ b/kexi/main/keximainwindowimpl.cpp @@ -3408,18 +3408,18 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) { //KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name()<<endl; if (e->type()==TQEvent::KeyPress) { - KexiVDebug << "KEY EVENT " << TQString::number(TQT_TQKEYEVENT(e)->key(), 16) << endl; + KexiVDebug << "KEY EVENT " << TQString::number(static_cast<TQKeyEvent*>(e)->key(), 16) << endl; KexiVDebug << endl; } if (e->type()==TQEvent::AccelOverride) { - //KexiVDebug << "AccelOverride EVENT " << TQT_TQKEYEVENT(e)->key() << " " << TQT_TQKEYEVENT(e)->state() == ControlButton << endl; + //KexiVDebug << "AccelOverride EVENT " << static_cast<TQKeyEvent*>(e)->key() << " " << static_cast<TQKeyEvent*>(e)->state() == ControlButton << endl; //avoid sending CTRL+Tab key twice for tabbed/ideal mode, epecially for win32 - if (TQT_TQKEYEVENT(e)->key()==TQt::Key_Tab && TQT_TQKEYEVENT(e)->state() == ControlButton) { + if (static_cast<TQKeyEvent*>(e)->key()==TQt::Key_Tab && static_cast<TQKeyEvent*>(e)->state() == ControlButton) { if (d->action_window_next->shortcut().keyCodeQt()==TQt::Key_Tab+TQt::CTRL && d->action_window_next->shortcut().count()==1 && (mdiMode()==KMdi::TabPageMode || mdiMode()==KMdi::IDEAlMode)) { - TQT_TQKEYEVENT(e)->accept(); + static_cast<TQKeyEvent*>(e)->accept(); } } } @@ -3536,7 +3536,7 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) //remember currently focued window invalidate act. if (e->type()==TQEvent::FocusOut) { - if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { + if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Popup) { if (KexiUtils::hasParent(TQT_TQOBJECT(d->curDialog), TQT_TQOBJECT(focus_w))) { invalidateSharedActions(TQT_TQOBJECT(d->curDialog)); d->focus_before_popup=d->curDialog; @@ -3558,14 +3558,14 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) d->focus_before_popup=0; return true; } else if (e->type()==TQEvent::FocusOut) { - if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Tab) { + if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Tab) { //activate current child: if (d->curDialog) { d->curDialog->activate(); return true; } } - else if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { + else if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Popup) { d->focus_before_popup=w; } //invalidateSharedActions(); diff --git a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp index 3870f09e..b6cb9f44 100644 --- a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp +++ b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp @@ -338,7 +338,7 @@ bool KexiSimplePrintPreviewWindow::event( TQEvent * e ) { TQEvent::Type t = e->type(); if (t==TQEvent::KeyPress) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); const int k = ke->key(); bool ok = true; if (k==TQt::Key_Equal || k==TQt::Key_Plus) @@ -358,7 +358,7 @@ bool KexiSimplePrintPreviewWindow::event( TQEvent * e ) } } else if (t==TQEvent::AccelOverride) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); const int k = ke->key(); bool ok = true; if (k==TQt::Key_PageUp) diff --git a/kexi/main/startup/KexiStartupDialog.cpp b/kexi/main/startup/KexiStartupDialog.cpp index 9f3e5de7..c738d192 100644 --- a/kexi/main/startup/KexiStartupDialog.cpp +++ b/kexi/main/startup/KexiStartupDialog.cpp @@ -658,7 +658,7 @@ bool KexiStartupDialog::eventFilter( TQObject *o, TQEvent *e ) { if (o==d->templatesWidget_IconListBox && d->templatesWidget_IconListBox) { if (e->type()==TQEvent::KeyPress - && (TQT_TQKEYEVENT(e)->key()==Key_Enter || TQT_TQKEYEVENT(e)->key()==Key_Return) + && (static_cast<TQKeyEvent*>(e)->key()==Key_Enter || static_cast<TQKeyEvent*>(e)->key()==Key_Return) || e->type()==TQEvent::MouseButtonDblClick) { const int t_id = d->templatesWidget->activePageIndex(); diff --git a/kexi/main/startup/KexiStartupFileDialog.cpp b/kexi/main/startup/KexiStartupFileDialog.cpp index 7b0aa5c8..61aa0735 100644 --- a/kexi/main/startup/KexiStartupFileDialog.cpp +++ b/kexi/main/startup/KexiStartupFileDialog.cpp @@ -409,9 +409,9 @@ void KexiStartupFileDialog::setFocus() bool KexiStartupFileDialog::eventFilter ( TQObject * watched, TQEvent * e ) { //filter-out ESC key - if (e->type()==TQEvent::KeyPress && TQT_TQKEYEVENT(e)->key()==TQt::Key_Escape - && TQT_TQKEYEVENT(e)->state()==TQt::NoButton) { - TQT_TQKEYEVENT(e)->accept(); + if (e->type()==TQEvent::KeyPress && static_cast<TQKeyEvent*>(e)->key()==TQt::Key_Escape + && static_cast<TQKeyEvent*>(e)->state()==TQt::NoButton) { + static_cast<TQKeyEvent*>(e)->accept(); emit rejected(); return true; } diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp index 088d0a48..5fb89443 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp +++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp @@ -338,7 +338,7 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e ) } else if (e->type()==TQEvent::Enter) { if (!d->isEditable - || /*over button if editable combo*/buttonGeometry().contains( TQT_TQMOUSEEVENT(e)->pos() )) + || /*over button if editable combo*/buttonGeometry().contains( static_cast<TQMouseEvent*>(e)->pos() )) { d->mouseOver = true; update(); @@ -346,7 +346,7 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e ) } else if (e->type()==TQEvent::MouseMove) { if (d->isEditable) { - const bool overButton = buttonGeometry().contains( TQT_TQMOUSEEVENT(e)->pos() ); + const bool overButton = buttonGeometry().contains( static_cast<TQMouseEvent*>(e)->pos() ); if (overButton != d->mouseOver) { d->mouseOver = overButton; update(); @@ -359,7 +359,7 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e ) } else if (e->type()==TQEvent::KeyPress) { // handle F2/F4 - if (handleKeyPressEvent(TQT_TQKEYEVENT(e))) + if (handleKeyPressEvent(static_cast<TQKeyEvent*>(e))) return true; } else if (e->type()==TQEvent::FocusOut) { @@ -372,11 +372,11 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e ) else if (!d->isEditable && d->subWidgetsWithDisabledEvents && d->subWidgetsWithDisabledEvents->find(o)) { if (e->type()==TQEvent::MouseButtonPress) { // clicking the subwidget should mean the same as clicking the combo box (i.e. show the popup) - if (handleMousePressEvent(TQT_TQMOUSEEVENT(e))) + if (handleMousePressEvent(static_cast<TQMouseEvent*>(e))) return true; } else if (e->type()==TQEvent::KeyPress) { - if (handleKeyPressEvent(TQT_TQKEYEVENT(e))) + if (handleKeyPressEvent(static_cast<TQKeyEvent*>(e))) return true; } return e->type()!=TQEvent::Paint; diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp index 0fb4519e..81ce6684 100644 --- a/kexi/plugins/forms/widgets/kexidbform.cpp +++ b/kexi/plugins/forms/widgets/kexidbform.cpp @@ -394,7 +394,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) kexipluginsdbg << "RESIZE" << endl; if (e->type()==TQEvent::KeyPress) { if (preview()) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); const int key = ke->key(); bool tab = ke->state() == TQt::NoButton && key == TQt::Key_Tab; bool backtab = ((ke->state() == TQt::NoButton || ke->state() == TQt::ShiftButton) && key == TQt::Key_Backtab) @@ -569,7 +569,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) } else if (e->type()==TQEvent::FocusIn) { bool focusDataWidget = preview(); - if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { + if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Popup) { kdDebug() << "->>> focus IN, popup" <<endl; focusDataWidget = !d->popupFocused; d->popupFocused = false; @@ -608,7 +608,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) } } else if (e->type()==TQEvent::FocusOut) { - if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { + if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Popup) { //d->widgetFocusedBeforePopup = (TQWidget*)watched; d->popupFocused = true; } @@ -616,7 +616,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) d->popupFocused = false; // d->widgetFocusedBeforePopup = 0; // kdDebug() << "e->type()==TQEvent::FocusOut " << watched->className() << " " <<watched->name() << endl; -// UNSET_FOCUS_USING_REASON(watched, TQT_TQFOCUSEVENT(e)->reason()); +// UNSET_FOCUS_USING_REASON(watched, static_cast<TQFocusEvent*>(e)->reason()); } return KexiDBFormBase::eventFilter(watched, e); } diff --git a/kexi/plugins/forms/widgets/kexidblineedit.cpp b/kexi/plugins/forms/widgets/kexidblineedit.cpp index 5d1fadf6..5e2ac08a 100644 --- a/kexi/plugins/forms/widgets/kexidblineedit.cpp +++ b/kexi/plugins/forms/widgets/kexidblineedit.cpp @@ -346,7 +346,7 @@ bool KexiDBLineEdit::event( TQEvent * e ) const bool ret = KLineEdit::event( e ); KexiDBTextWidgetInterface::event(e, this, text().isEmpty()); if (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::Tab || fe->reason()==TQFocusEvent::Backtab) { //display aligned to left after loosing the focus (only if this is tab/backtab event) diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp index daf536c5..9c9c5f22 100644 --- a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp +++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp @@ -1630,7 +1630,7 @@ bool KexiCSVImportDialog::eventFilter ( TQObject * watched, TQEvent * e ) return true; if (watched == m_startAtLineSpinBox && t==TQEvent::KeyPress) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) { m_table->setFocus(); return true; diff --git a/kexi/widget/kexibrowser.cpp b/kexi/widget/kexibrowser.cpp index 1d59dae0..dd0b16a1 100644 --- a/kexi/widget/kexibrowser.cpp +++ b/kexi/widget/kexibrowser.cpp @@ -567,7 +567,7 @@ bool KexiBrowser::eventFilter ( TQObject *o, TQEvent * e ) itemRenameDone(); } else if (e->type()==TQEvent::KeyPress) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) { if (0==(ke->state() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton))) { TQListViewItem *it = m_list->selectedItem(); @@ -580,7 +580,7 @@ bool KexiBrowser::eventFilter ( TQObject *o, TQEvent * e ) } } else if (e->type()==TQEvent::AccelOverride) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); //override delete action if (ke->key()==TQt::Key_Delete && ke->state()==TQt::NoButton) { slotRemove(); diff --git a/kexi/widget/relations/kexirelationviewtable.cpp b/kexi/widget/relations/kexirelationviewtable.cpp index 347805be..7053c778 100644 --- a/kexi/widget/relations/kexirelationviewtable.cpp +++ b/kexi/widget/relations/kexirelationviewtable.cpp @@ -208,10 +208,10 @@ bool KexiRelationViewTableContainerHeader::eventFilter(TQObject *, TQEvent *ev) { if (ev->type()==TQEvent::MouseMove) { - if (m_dragging && TQT_TQMOUSEEVENT(ev)->state()==TQt::LeftButton) { + if (m_dragging && static_cast<TQMouseEvent*>(ev)->state()==TQt::LeftButton) { int diffX,diffY; - diffX=TQT_TQMOUSEEVENT(ev)->globalPos().x()-m_grabX; - diffY=TQT_TQMOUSEEVENT(ev)->globalPos().y()-m_grabY; + diffX=static_cast<TQMouseEvent*>(ev)->globalPos().x()-m_grabX; + diffY=static_cast<TQMouseEvent*>(ev)->globalPos().y()-m_grabY; if ((abs(diffX)>2) || (abs(diffY)>2)) { TQPoint newPos=parentWidget()->pos()+TQPoint(diffX,diffY); @@ -245,8 +245,8 @@ bool KexiRelationViewTableContainerHeader::eventFilter(TQObject *, TQEvent *ev) //move and update helpers parentWidget()->move(newPos); - m_grabX=TQT_TQMOUSEEVENT(ev)->globalPos().x(); - m_grabY=TQT_TQMOUSEEVENT(ev)->globalPos().y(); + m_grabX=static_cast<TQMouseEvent*>(ev)->globalPos().x(); + m_grabY=static_cast<TQMouseEvent*>(ev)->globalPos().y(); // kdDebug()<<"HEADER:emitting moved"<<endl; emit moved(); } diff --git a/kexi/widget/tableview/kexiblobtableedit.cpp b/kexi/widget/tableview/kexiblobtableedit.cpp index 75f51611..b3de3419 100644 --- a/kexi/widget/tableview/kexiblobtableedit.cpp +++ b/kexi/widget/tableview/kexiblobtableedit.cpp @@ -456,7 +456,7 @@ void KexiBlobTableEdit::handleAction(const TQString& actionName) bool KexiBlobTableEdit::eventFilter( TQObject *o, TQEvent *e ) { if (o == d->popup && e->type()==TQEvent::KeyPress) { - TQKeyEvent* ke = TQT_TQKEYEVENT(e); + TQKeyEvent* ke = static_cast<TQKeyEvent*>(e); const int state = ke->state(); const int k = ke->key(); if ( (state==TQt::NoButton && (k==TQt::Key_Tab || k==TQt::Key_Left || k==TQt::Key_Right)) diff --git a/kexi/widget/tableview/kexicomboboxpopup.cpp b/kexi/widget/tableview/kexicomboboxpopup.cpp index dfd6edb4..6877bd78 100644 --- a/kexi/widget/tableview/kexicomboboxpopup.cpp +++ b/kexi/widget/tableview/kexicomboboxpopup.cpp @@ -351,7 +351,7 @@ bool KexiComboBoxPopup::eventFilter( TQObject *o, TQEvent *e ) } else if (o==d->tv) { if (e->type()==TQEvent::KeyPress) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); const int k = ke->key(); if ((ke->state()==TQt::NoButton && (k==Key_Escape || k==Key_F4)) || (ke->state()==AltButton && k==Key_Up)) diff --git a/kexi/widget/tableview/kexicomboboxtableedit.cpp b/kexi/widget/tableview/kexicomboboxtableedit.cpp index a818e40b..0ac9923e 100644 --- a/kexi/widget/tableview/kexicomboboxtableedit.cpp +++ b/kexi/widget/tableview/kexicomboboxtableedit.cpp @@ -348,7 +348,7 @@ int KexiComboBoxTableEdit::widthForValue( TQVariant &val, const TQFontMetrics &f bool KexiComboBoxTableEdit::eventFilter( TQObject *o, TQEvent *e ) { if (!column()->isReadOnly() && e->type()==TQEvent::MouseButtonPress && m_scrollView) { - TQPoint gp = TQT_TQMOUSEEVENT(e)->globalPos() + TQPoint gp = static_cast<TQMouseEvent*>(e)->globalPos() + TQPoint(m_scrollView->childX(d->button), m_scrollView->childY(d->button)); TQRect r(d->button->mapToGlobal(d->button->geometry().topLeft()), d->button->mapToGlobal(d->button->geometry().bottomRight())); diff --git a/kexi/widget/tableview/kexitableedit.cpp b/kexi/widget/tableview/kexitableedit.cpp index 943ec1e8..a4b70aab 100644 --- a/kexi/widget/tableview/kexitableedit.cpp +++ b/kexi/widget/tableview/kexitableedit.cpp @@ -124,7 +124,7 @@ KexiTableEdit::eventFilter(TQObject* watched, TQEvent* e) { if(e->type() == TQEvent::KeyPress) { - TQKeyEvent* ev = TQT_TQKEYEVENT(e); + TQKeyEvent* ev = static_cast<TQKeyEvent*>(e); if(ev->key() == Key_Escape) { diff --git a/kexi/widget/tableview/kexitableview.cpp b/kexi/widget/tableview/kexitableview.cpp index 284cbd1d..dbb89f5d 100644 --- a/kexi/widget/tableview/kexitableview.cpp +++ b/kexi/widget/tableview/kexitableview.cpp @@ -2412,7 +2412,7 @@ bool KexiTableView::eventFilter( TQObject *o, TQEvent *e ) if (e->type()==TQEvent::KeyPress) { if (e->spontaneous() /*|| e->type()==TQEvent::AccelOverride*/) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); const int k = ke->key(); int s = ke->state(); //cell editor's events: diff --git a/kexi/widget/tableview/kexitableviewheader.cpp b/kexi/widget/tableview/kexitableviewheader.cpp index 0ee90f5a..305222ca 100644 --- a/kexi/widget/tableview/kexitableviewheader.cpp +++ b/kexi/widget/tableview/kexitableviewheader.cpp @@ -120,7 +120,7 @@ void KexiTableViewHeader::setToolTip( int section, const TQString & toolTip ) bool KexiTableViewHeader::eventFilter(TQObject * watched, TQEvent * e) { if (e->type()==TQEvent::MouseMove) { - const int section = sectionAt( TQT_TQMOUSEEVENT(e)->x() ); + const int section = sectionAt( static_cast<TQMouseEvent*>(e)->x() ); if (section != m_lastToolTipSection && section >= 0 && section < (int)m_toolTips.count()) { TQToolTip::remove(this, m_toolTipRect); TQString tip = m_toolTips[ section ]; diff --git a/kexi/widget/utils/kexirecordnavigator.cpp b/kexi/widget/utils/kexirecordnavigator.cpp index d61c7dc8..334c605a 100644 --- a/kexi/widget/utils/kexirecordnavigator.cpp +++ b/kexi/widget/utils/kexirecordnavigator.cpp @@ -196,7 +196,7 @@ bool KexiRecordNavigator::eventFilter( TQObject *o, TQEvent *e ) bool recordEntered = false; bool ret; if (e->type()==TQEvent::KeyPress) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); switch (ke->key()) { case TQt::Key_Escape: { ke->accept(); @@ -218,9 +218,9 @@ bool KexiRecordNavigator::eventFilter( TQObject *o, TQEvent *e ) } } else if (e->type()==TQEvent::FocusOut) { - if (TQT_TQFOCUSEVENT(e)->reason()!=TQFocusEvent::Tab - && TQT_TQFOCUSEVENT(e)->reason()!=TQFocusEvent::Backtab - && TQT_TQFOCUSEVENT(e)->reason()!=TQFocusEvent::Other) + if (static_cast<TQFocusEvent*>(e)->reason()!=TQFocusEvent::Tab + && static_cast<TQFocusEvent*>(e)->reason()!=TQFocusEvent::Backtab + && static_cast<TQFocusEvent*>(e)->reason()!=TQFocusEvent::Other) recordEntered=true; ret = false; } diff --git a/kivio/kiviopart/addstenciltool.cpp b/kivio/kiviopart/addstenciltool.cpp index ddbe38c5..4e3f14ec 100644 --- a/kivio/kiviopart/addstenciltool.cpp +++ b/kivio/kiviopart/addstenciltool.cpp @@ -51,7 +51,7 @@ bool AddStencilTool::processEvent(TQEvent* e) switch(e->type()) { case TQEvent::MouseButtonPress: { - TQMouseEvent* me = TQT_TQMOUSEEVENT(e); + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); if(me->button() == TQt::LeftButton) { m_leftMouseButtonPressed = true; @@ -63,7 +63,7 @@ bool AddStencilTool::processEvent(TQEvent* e) } case TQEvent::MouseButtonRelease: { - TQMouseEvent* me = TQT_TQMOUSEEVENT(e); + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); if(m_leftMouseButtonPressed && (me->button() == TQt::LeftButton)) { m_leftMouseButtonPressed = false; @@ -75,7 +75,7 @@ bool AddStencilTool::processEvent(TQEvent* e) } case TQEvent::MouseMove: { - TQMouseEvent* me = TQT_TQMOUSEEVENT(e); + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); if(m_leftMouseButtonPressed) { resize(me->pos()); diff --git a/kivio/kiviopart/ui/kivio_birdeye_panel.cpp b/kivio/kiviopart/ui/kivio_birdeye_panel.cpp index 8cb18976..ed92bff8 100644 --- a/kivio/kiviopart/ui/kivio_birdeye_panel.cpp +++ b/kivio/kiviopart/ui/kivio_birdeye_panel.cpp @@ -99,7 +99,7 @@ bool KivioBirdEyePanel::eventFilter(TQObject* o, TQEvent* ev) } if (o == canvas && ev->type() == TQEvent::MouseMove) { - TQMouseEvent* me = TQT_TQMOUSEEVENT(ev); + TQMouseEvent* me = static_cast<TQMouseEvent*>(ev); if (me->state() == TQt::LeftButton) handleMouseMoveAction(me->pos()); else @@ -110,7 +110,7 @@ bool KivioBirdEyePanel::eventFilter(TQObject* o, TQEvent* ev) } if (o == canvas && ev->type() == TQEvent::MouseButtonPress) { - TQMouseEvent* me = TQT_TQMOUSEEVENT(ev); + TQMouseEvent* me = static_cast<TQMouseEvent*>(ev); if (me->button() == TQt::LeftButton) handleMousePress(me->pos()); diff --git a/kivio/plugins/kivioconnectortool/tool_connector.cpp b/kivio/plugins/kivioconnectortool/tool_connector.cpp index 5e45cc36..5ca46ebb 100644 --- a/kivio/plugins/kivioconnectortool/tool_connector.cpp +++ b/kivio/plugins/kivioconnectortool/tool_connector.cpp @@ -93,17 +93,17 @@ bool ConnectorTool::processEvent(TQEvent* e) switch (e->type()) { case TQEvent::MouseButtonPress: - mousePress( TQT_TQMOUSEEVENT(e) ); + mousePress( static_cast<TQMouseEvent*>(e) ); return true; break; case TQEvent::MouseButtonRelease: - mouseRelease( TQT_TQMOUSEEVENT(e) ); + mouseRelease( static_cast<TQMouseEvent*>(e) ); return true; break; case TQEvent::MouseMove: - mouseMove( TQT_TQMOUSEEVENT(e) ); + mouseMove( static_cast<TQMouseEvent*>(e) ); return true; break; diff --git a/kivio/plugins/kivioselecttool/tool_select.cpp b/kivio/plugins/kivioselecttool/tool_select.cpp index 86a05245..50cdecc7 100644 --- a/kivio/plugins/kivioselecttool/tool_select.cpp +++ b/kivio/plugins/kivioselecttool/tool_select.cpp @@ -128,13 +128,13 @@ bool SelectTool::processEvent(TQEvent* e) break; case TQEvent::MouseMove: - mouseMove( TQT_TQMOUSEEVENT(e)); + mouseMove( static_cast<TQMouseEvent*>(e)); return true; break; case TQEvent::KeyPress: - if((TQT_TQKEYEVENT(e)->key() >= Key_Left) && (TQT_TQKEYEVENT(e)->key() <= Key_Down)) { - keyPress(TQT_TQKEYEVENT(e)); + if((static_cast<TQKeyEvent*>(e)->key() >= Key_Left) && (static_cast<TQKeyEvent*>(e)->key() <= Key_Down)) { + keyPress(static_cast<TQKeyEvent*>(e)); return true; } break; diff --git a/kivio/plugins/kiviotargettool/kiviotargettool.cpp b/kivio/plugins/kiviotargettool/kiviotargettool.cpp index be6f60d8..46f6b5c5 100644 --- a/kivio/plugins/kiviotargettool/kiviotargettool.cpp +++ b/kivio/plugins/kiviotargettool/kiviotargettool.cpp @@ -49,10 +49,10 @@ namespace Kivio { bool TargetTool::processEvent(TQEvent* e) { if(e->type() == TQEvent::MouseButtonPress) { - mousePress(TQT_TQMOUSEEVENT(e)); + mousePress(static_cast<TQMouseEvent*>(e)); return true; } else if(e->type() == TQEvent::MouseMove) { - mouseMove(TQT_TQMOUSEEVENT(e)); + mouseMove(static_cast<TQMouseEvent*>(e)); return true; } diff --git a/kivio/plugins/kiviozoomtool/tool_zoom.cpp b/kivio/plugins/kiviozoomtool/tool_zoom.cpp index d2a10db8..2ae6cfea 100644 --- a/kivio/plugins/kiviozoomtool/tool_zoom.cpp +++ b/kivio/plugins/kiviozoomtool/tool_zoom.cpp @@ -110,14 +110,14 @@ bool ZoomTool::processEvent(TQEvent* e) if(!m_bHandMode) { switch(e->type()) { case TQEvent::KeyPress: - if (!m_bLockKeyboard && (TQT_TQKEYEVENT(e)->key() == Key_Shift)) { + if (!m_bLockKeyboard && (static_cast<TQKeyEvent*>(e)->key() == Key_Shift)) { m_pCurrent = m_pMinus; canvas->setCursor(*m_pMinusCursor); return true; } break; case TQEvent::KeyRelease: - if (!m_bLockKeyboard && (TQT_TQKEYEVENT(e)->key() == Key_Shift)) { + if (!m_bLockKeyboard && (static_cast<TQKeyEvent*>(e)->key() == Key_Shift)) { m_pCurrent = m_pPlus; canvas->setCursor(*m_pPlusCursor); return true; @@ -125,7 +125,7 @@ bool ZoomTool::processEvent(TQEvent* e) break; case TQEvent::MouseButtonPress: { - TQMouseEvent* me = TQT_TQMOUSEEVENT(e); + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); if(me->button() == TQt::LeftButton) { if(m_pCurrent == m_pMinus) { @@ -153,7 +153,7 @@ bool ZoomTool::processEvent(TQEvent* e) break; case TQEvent::MouseMove: if (m_bDrawRubber) { - canvas->continueRectDraw(TQT_TQMOUSEEVENT(e)->pos(), KivioCanvas::Rubber); + canvas->continueRectDraw(static_cast<TQMouseEvent*>(e)->pos(), KivioCanvas::Rubber); return true; } break; @@ -164,7 +164,7 @@ bool ZoomTool::processEvent(TQEvent* e) switch(e->type()) { case TQEvent::MouseButtonPress: isHandMousePressed = true; - mousePos = TQT_TQMOUSEEVENT(e)->pos(); + mousePos = static_cast<TQMouseEvent*>(e)->pos(); return true; break; case TQEvent::MouseButtonRelease: @@ -174,7 +174,7 @@ bool ZoomTool::processEvent(TQEvent* e) case TQEvent::MouseMove: if (isHandMousePressed) { canvas->setUpdatesEnabled(false); - TQPoint newPos = TQT_TQMOUSEEVENT(e)->pos(); + TQPoint newPos = static_cast<TQMouseEvent*>(e)->pos(); mousePos -= newPos; canvas->scrollDx(-mousePos.x()); canvas->scrollDy(-mousePos.y()); diff --git a/kpresenter/KPrCanvas.cpp b/kpresenter/KPrCanvas.cpp index 04a81ae3..245d83f2 100644 --- a/kpresenter/KPrCanvas.cpp +++ b/kpresenter/KPrCanvas.cpp @@ -226,7 +226,7 @@ bool KPrCanvas::eventFilter( TQObject *o, TQEvent *e ) return TRUE; case TQEvent::KeyPress: { - TQKeyEvent * keyev = TQT_TQKEYEVENT(e); + TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e); if ( keyev->key() == TDEGlobalSettings::contextMenuKey() ) { popupContextMenu(); return true; @@ -249,7 +249,7 @@ bool KPrCanvas::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::AccelOverride: { #ifndef NDEBUG - TQKeyEvent * keyev = TQT_TQKEYEVENT(e); + TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e); // Debug keys if ( ( keyev->state() & ControlButton ) && ( keyev->state() & ShiftButton ) ) { diff --git a/kspread/kspread_canvas.cpp b/kspread/kspread_canvas.cpp index 1154f650..837f6e98 100644 --- a/kspread/kspread_canvas.cpp +++ b/kspread/kspread_canvas.cpp @@ -357,7 +357,7 @@ bool Canvas::eventFilter( TQObject *o, TQEvent *e ) { case TQEvent::KeyPress: { - TQKeyEvent * keyev = TQT_TQKEYEVENT(e); + TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e); if ((keyev->key()==Key_Tab) || (keyev->key()==Key_Backtab)) { keyPressEvent ( keyev ); diff --git a/kword/KWCanvas.cpp b/kword/KWCanvas.cpp index fb0889f6..3412b029 100644 --- a/kword/KWCanvas.cpp +++ b/kword/KWCanvas.cpp @@ -1725,7 +1725,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e ) { // kdDebug() << " KeyPress m_currentFrameSetEdit=" << m_currentFrameSetEdit << " isRW="<<m_doc->isReadWrite() << endl; // kdDebug() << " m_printing=" << m_printing << " mousemode=" << m_mouseMode << " (MM_EDIT=" << MM_EDIT<<")"<<endl; - TQKeyEvent * keyev = TQT_TQKEYEVENT(e); + TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e); #ifndef NDEBUG // Debug keys if ( ( keyev->state() & ControlButton ) && ( keyev->state() & ShiftButton ) ) @@ -1768,7 +1768,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e ) { // kdDebug() << " KeyPress m_currentFrameSetEdit=" << m_currentFrameSetEdit << " isRW="<<m_doc->isReadWrite() << endl; // kdDebug() << " m_printing=" << m_printing << " mousemode=" << m_mouseMode << " (MM_EDIT=" << MM_EDIT<<")"<<endl; - TQKeyEvent * keyev = TQT_TQKEYEVENT(e); + TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e); // By default PgUp and PgDown move the scrollbars and not the caret anymore - this is done here if ( !m_doc->pgUpDownMovesCaret() && ( (keyev->state() & ShiftButton) == 0 ) && ( keyev->key() == TQt::Key_PageUp || keyev->key() == Key_PageDown ) ) @@ -1879,7 +1879,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e ) } break; case TQEvent::KeyRelease: { - TQKeyEvent * keyev = TQT_TQKEYEVENT(e); + TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e); if ( keyev->key() == TQt::Key_Control ) { TQPoint mousep = mapFromGlobal(TQCursor::pos()) + TQPoint( contentsX(), contentsY() ); diff --git a/lib/kofficecore/KoContainerHandler.cpp b/lib/kofficecore/KoContainerHandler.cpp index ff81b632..74c49a7e 100644 --- a/lib/kofficecore/KoContainerHandler.cpp +++ b/lib/kofficecore/KoContainerHandler.cpp @@ -302,7 +302,7 @@ bool KoContainerHandler::eventFilter( TQObject*, TQEvent* ev ) { KoChild::Gadget gadget; TQPoint pos; - TQMouseEvent *e=TQT_TQMOUSEEVENT(ev); + TQMouseEvent *e=static_cast<TQMouseEvent*>(ev); KoChild *ch=child(gadget, pos, e); if ( e->button() == TQt::RightButton && gadget != KoChild::NoGadget ) @@ -327,7 +327,7 @@ bool KoContainerHandler::eventFilter( TQObject*, TQEvent* ev ) TQWidget *targetWidget = TQT_TQWIDGET( target() ); KoChild::Gadget gadget; TQPoint pos; - TQMouseEvent *e=TQT_TQMOUSEEVENT(ev); + TQMouseEvent *e=static_cast<TQMouseEvent*>(ev); child(gadget, pos, e); bool retval = true; diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp index 1c5f5f1f..bbe4145a 100644 --- a/lib/kofficeui/KoTooluButton.cpp +++ b/lib/kofficeui/KoTooluButton.cpp @@ -811,7 +811,7 @@ bool KoToolButton::eventFilter( TQObject* o, TQEvent* e ) { if ( o == m_popup ) { if ( e->type() == TQEvent::MouseButtonPress ) - if ( hitArrow( mapFromGlobal( TQT_TQMOUSEEVENT( e )->globalPos() ) ) ) { + if ( hitArrow( mapFromGlobal( static_cast<TQMouseEvent*>( e )->globalPos() ) ) ) { kdDebug() << "KoToolButton::eventFilter-------------->" << endl; m_popup->close(); m_arrowPressed = false; @@ -821,7 +821,7 @@ bool KoToolButton::eventFilter( TQObject* o, TQEvent* e ) } if ( e->type() == TQEvent::MouseButtonPress ) { - m_arrowPressed = hitArrow( TQT_TQMOUSEEVENT( e )->pos() ); + m_arrowPressed = hitArrow( static_cast<TQMouseEvent*>( e )->pos() ); if ( m_arrowPressed ) m_popup->popup( mapToGlobal( TQPoint( 0, height() ) ) ); } diff --git a/lib/koproperty/editor.cpp b/lib/koproperty/editor.cpp index 2a72fdbe..ddd23539 100644 --- a/lib/koproperty/editor.cpp +++ b/lib/koproperty/editor.cpp @@ -916,7 +916,7 @@ bool Editor::eventFilter( TQObject * watched, TQEvent * e ) { if ((watched==this || watched==viewport()) && e->type()==TQEvent::KeyPress) { - if (handleKeyPress(TQT_TQKEYEVENT(e))) + if (handleKeyPress(static_cast<TQKeyEvent*>(e))) return true; } return TDEListView::eventFilter(watched, e); diff --git a/lib/koproperty/editoritem.cpp b/lib/koproperty/editoritem.cpp index 2d2b99de..1d186c4c 100644 --- a/lib/koproperty/editoritem.cpp +++ b/lib/koproperty/editoritem.cpp @@ -157,7 +157,7 @@ class GroupWidgetBase : public TQWidget virtual bool event( TQEvent * e ) { if (e->type()==TQEvent::MouseButtonPress || e->type()==TQEvent::MouseButtonRelease) { - TQMouseEvent* me = TQT_TQMOUSEEVENT(e); + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); if (me->button() == TQt::LeftButton) { m_mouseDown = e->type()==TQEvent::MouseButtonPress; update(); @@ -238,7 +238,7 @@ void GroupContainer::setContents( TQWidget* contents ) bool GroupContainer::event( TQEvent * e ) { if (e->type()==TQEvent::MouseButtonPress) { - TQMouseEvent* me = TQT_TQMOUSEEVENT(e); + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); if (me->button() == TQt::LeftButton && d->contents && d->groupWidget->rect().contains(me->pos())) { d->groupWidget->setOpen(!d->groupWidget->isOpen()); if (d->groupWidget->isOpen()) diff --git a/lib/koproperty/editors/booledit.cpp b/lib/koproperty/editors/booledit.cpp index 0e14bf27..fb71a445 100644 --- a/lib/koproperty/editors/booledit.cpp +++ b/lib/koproperty/editors/booledit.cpp @@ -131,7 +131,7 @@ bool BoolEdit::eventFilter(TQObject* watched, TQEvent* e) { if(e->type() == TQEvent::KeyPress) { - TQKeyEvent* ev = TQT_TQKEYEVENT(e); + TQKeyEvent* ev = static_cast<TQKeyEvent*>(e); const int k = ev->key(); if(k == TQt::Key_Space || k == TQt::Key_Enter || k == TQt::Key_Return) { if (m_toggle) diff --git a/lib/koproperty/editors/fontedit.cpp b/lib/koproperty/editors/fontedit.cpp index 0ea29b6e..e53e785f 100644 --- a/lib/koproperty/editors/fontedit.cpp +++ b/lib/koproperty/editors/fontedit.cpp @@ -138,7 +138,7 @@ bool FontEdit::eventFilter(TQObject* watched, TQEvent* e) { if(e->type() == TQEvent::KeyPress) { - TQKeyEvent* ev = TQT_TQKEYEVENT(e); + TQKeyEvent* ev = static_cast<TQKeyEvent*>(e); if(ev->key() == Key_Space) { m_edit->button()->animateClick(); return true; diff --git a/lib/koproperty/editors/pixmapedit.cpp b/lib/koproperty/editors/pixmapedit.cpp index b6454a96..070de038 100644 --- a/lib/koproperty/editors/pixmapedit.cpp +++ b/lib/koproperty/editors/pixmapedit.cpp @@ -206,7 +206,7 @@ bool PixmapEdit::eventFilter(TQObject *o, TQEvent *ev) { if(o == m_edit) { - if(ev->type() == TQEvent::MouseButtonPress && TQT_TQMOUSEEVENT(ev)->button()==TQt::LeftButton) { + if(ev->type() == TQEvent::MouseButtonPress && static_cast<TQMouseEvent*>(ev)->button()==TQt::LeftButton) { if(m_previewPixmap.height() <= m_edit->height() && m_previewPixmap.width() <= m_edit->width()) return false; @@ -227,7 +227,7 @@ PixmapEdit::eventFilter(TQObject *o, TQEvent *ev) m_popup->hide(); } else if(ev->type() == TQEvent::KeyPress) { - TQKeyEvent* e = TQT_TQKEYEVENT(ev); + TQKeyEvent* e = static_cast<TQKeyEvent*>(ev); if((e->key() == Key_Enter) || (e->key()== Key_Space) || (e->key() == Key_Return)) { m_button->animateClick(); return true; diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp index e76ca930..81f0c1cb 100644 --- a/lib/koproperty/editors/spinbox.cpp +++ b/lib/koproperty/editors/spinbox.cpp @@ -63,7 +63,7 @@ IntSpinBox::eventFilter(TQObject *o, TQEvent *e) { if(e->type() == TQEvent::KeyPress) { - TQKeyEvent* ev = TQT_TQKEYEVENT(e); + TQKeyEvent* ev = static_cast<TQKeyEvent*>(e); if((ev->key()==Key_Up || ev->key()==Key_Down) && ev->state() !=ControlButton) { parentWidget()->eventFilter(o, e); @@ -196,7 +196,7 @@ DoubleSpinBox::eventFilter(TQObject *o, TQEvent *e) { if(e->type() == TQEvent::KeyPress) { - TQKeyEvent* ev = TQT_TQKEYEVENT(e); + TQKeyEvent* ev = static_cast<TQKeyEvent*>(e); if((ev->key()==Key_Up || ev->key()==Key_Down) && ev->state()!=ControlButton) { parentWidget()->eventFilter(o, e); diff --git a/lib/koproperty/widget.cpp b/lib/koproperty/widget.cpp index 1e1593db..99724979 100644 --- a/lib/koproperty/widget.cpp +++ b/lib/koproperty/widget.cpp @@ -109,7 +109,7 @@ Widget::eventFilter(TQObject*, TQEvent* e) { if(e->type() == TQEvent::KeyPress) { - TQKeyEvent* ev = TQT_TQKEYEVENT(e); + TQKeyEvent* ev = static_cast<TQKeyEvent*>(e); if(ev->key() == Key_Escape) { emit rejectInput(this); |