summaryrefslogtreecommitdiffstats
path: root/tdehtml
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-11-30 21:30:52 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-11-30 21:30:52 +0900
commitf22a9c72dda24871973033123039639af6577eaa (patch)
tree3e9e1aa31f39f5945b92282e7d14a0c88a0ebcbf /tdehtml
parent7a00e005dd5806a1056488e3a1199bf382a42623 (diff)
downloadtdelibs-f22a9c72dda24871973033123039639af6577eaa.tar.gz
tdelibs-f22a9c72dda24871973033123039639af6577eaa.zip
Replace 'Event' #define strings
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdehtml')
-rw-r--r--tdehtml/rendering/render_form.cpp4
-rw-r--r--tdehtml/rendering/render_replaced.cpp40
-rw-r--r--tdehtml/tdehtmlview.cpp12
3 files changed, 28 insertions, 28 deletions
diff --git a/tdehtml/rendering/render_form.cpp b/tdehtml/rendering/render_form.cpp
index 63bba2914..8462f711b 100644
--- a/tdehtml/rendering/render_form.cpp
+++ b/tdehtml/rendering/render_form.cpp
@@ -890,7 +890,7 @@ bool ComboBoxWidget::event(TQEvent *e)
return true;
if (e->type()==TQEvent::KeyPress)
{
- TQKeyEvent *ke = TQT_TQKEYEVENT(e);
+ TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
switch(ke->key())
{
case Key_Return:
@@ -909,7 +909,7 @@ bool ComboBoxWidget::eventFilter(TQObject *dest, TQEvent *e)
{
if (dest==listBox() && e->type()==TQEvent::KeyPress)
{
- TQKeyEvent *ke = TQT_TQKEYEVENT(e);
+ TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
bool forward = false;
switch(ke->key())
{
diff --git a/tdehtml/rendering/render_replaced.cpp b/tdehtml/rendering/render_replaced.cpp
index ddf4dfb4b..3c71656e1 100644
--- a/tdehtml/rendering/render_replaced.cpp
+++ b/tdehtml/rendering/render_replaced.cpp
@@ -642,7 +642,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
// Don't count popup as a valid reason for losing the focus
// (example: opening the options of a select combobox shouldn't emit onblur)
- if ( TQT_TQFOCUSEVENT(e)->reason() != TQFocusEvent::Popup )
+ if ( static_cast<TQFocusEvent*>(e)->reason() != TQFocusEvent::Popup )
handleFocusOut();
break;
case TQEvent::FocusIn:
@@ -663,7 +663,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
case TQEvent::KeyRelease:
// TODO this seems wrong - Qt events are not correctly translated to DOM ones,
// like in TDEHTMLView::dispatchKeyEvent()
- if (element()->dispatchKeyEvent(TQT_TQKEYEVENT(e),false))
+ if (element()->dispatchKeyEvent(static_cast<TQKeyEvent*>(e),false))
filtered = true;
break;
@@ -674,7 +674,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
// or something while wheeling a webpage.
if (tqApp->focusWidget() != widget() &&
widget()->focusPolicy() <= TQWidget::StrongFocus) {
- TQT_TQWHEELEVENT(e)->ignore();
+ static_cast<TQWheelEvent*>(e)->ignore();
TQApplication::sendEvent(view(), e);
filtered = true;
}
@@ -697,22 +697,22 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
void RenderWidget::EventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) {
case TQEvent::MouseButtonPress:
- mousePressEvent(TQT_TQMOUSEEVENT(e));
+ mousePressEvent(static_cast<TQMouseEvent*>(e));
break;
case TQEvent::MouseButtonRelease:
- mouseReleaseEvent(TQT_TQMOUSEEVENT(e));
+ mouseReleaseEvent(static_cast<TQMouseEvent*>(e));
break;
case TQEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e));
+ mouseDoubleClickEvent(static_cast<TQMouseEvent*>(e));
break;
case TQEvent::MouseMove:
- mouseMoveEvent(TQT_TQMOUSEEVENT(e));
+ mouseMoveEvent(static_cast<TQMouseEvent*>(e));
break;
case TQEvent::KeyPress:
- keyPressEvent(TQT_TQKEYEVENT(e));
+ keyPressEvent(static_cast<TQKeyEvent*>(e));
break;
case TQEvent::KeyRelease:
- keyReleaseEvent(TQT_TQKEYEVENT(e));
+ keyReleaseEvent(static_cast<TQKeyEvent*>(e));
break;
default:
break;
@@ -722,22 +722,22 @@ void RenderWidget::EventPropagator::sendEvent(TQEvent *e) {
void RenderWidget::ScrollViewEventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) {
case TQEvent::MouseButtonPress:
- viewportMousePressEvent(TQT_TQMOUSEEVENT(e));
+ viewportMousePressEvent(static_cast<TQMouseEvent*>(e));
break;
case TQEvent::MouseButtonRelease:
- viewportMouseReleaseEvent(TQT_TQMOUSEEVENT(e));
+ viewportMouseReleaseEvent(static_cast<TQMouseEvent*>(e));
break;
case TQEvent::MouseButtonDblClick:
- viewportMouseDoubleClickEvent(TQT_TQMOUSEEVENT(e));
+ viewportMouseDoubleClickEvent(static_cast<TQMouseEvent*>(e));
break;
case TQEvent::MouseMove:
- viewportMouseMoveEvent(TQT_TQMOUSEEVENT(e));
+ viewportMouseMoveEvent(static_cast<TQMouseEvent*>(e));
break;
case TQEvent::KeyPress:
- keyPressEvent(TQT_TQKEYEVENT(e));
+ keyPressEvent(static_cast<TQKeyEvent*>(e));
break;
case TQEvent::KeyRelease:
- keyReleaseEvent(TQT_TQKEYEVENT(e));
+ keyReleaseEvent(static_cast<TQKeyEvent*>(e));
break;
default:
break;
@@ -811,9 +811,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
TQMouseEvent e(type, p, button, state);
TQScrollView * sc = ::tqt_cast<TQScrollView*>(m_widget);
if (sc && !::tqt_cast<TQListBox*>(m_widget))
- static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(TQT_TQEVENT(&e));
+ static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(static_cast<TQEvent*>(&e));
else
- static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(&e));
+ static_cast<EventPropagator *>(m_widget)->sendEvent(static_cast<TQEvent*>(&e));
ret = e.isAccepted();
break;
}
@@ -827,7 +827,7 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
if (domKeyEv.isSynthetic() && !acceptsSyntheticEvents()) break;
TQKeyEvent* const ke = domKeyEv.qKeyEvent();
- static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(ke));
+ static_cast<EventPropagator *>(m_widget)->sendEvent(static_cast<TQEvent*>(ke));
ret = ke->isAccepted();
break;
}
@@ -854,9 +854,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
if (ke->isAutoRepeat()) {
TQKeyEvent releaseEv( TQEvent::KeyRelease, ke->key(), ke->ascii(), ke->state(),
ke->text(), ke->isAutoRepeat(), ke->count() );
- static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(&releaseEv));
+ static_cast<EventPropagator *>(m_widget)->sendEvent(static_cast<TQEvent*>(&releaseEv));
}
- static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(ke));
+ static_cast<EventPropagator *>(m_widget)->sendEvent(static_cast<TQEvent*>(ke));
ret = ke->isAccepted();
break;
}
diff --git a/tdehtml/tdehtmlview.cpp b/tdehtml/tdehtmlview.cpp
index ae2be579a..b3d3d2579 100644
--- a/tdehtml/tdehtmlview.cpp
+++ b/tdehtml/tdehtmlview.cpp
@@ -1114,9 +1114,9 @@ static inline void forwardPeripheralEvent(tdehtml::RenderWidget* r, TQMouseEvent
TQWidget* w = r->widget();
TQScrollView* sc = ::tqt_cast<TQScrollView*>(w);
if (sc && !::tqt_cast<TQListBox*>(w))
- static_cast<tdehtml::RenderWidget::ScrollViewEventPropagator*>(sc)->sendEvent(TQT_TQEVENT(&fw));
+ static_cast<tdehtml::RenderWidget::ScrollViewEventPropagator*>(sc)->sendEvent(static_cast<TQEvent*>(&fw));
else if(w)
- static_cast<tdehtml::RenderWidget::EventPropagator*>(w)->sendEvent(TQT_TQEVENT(&fw));
+ static_cast<tdehtml::RenderWidget::EventPropagator*>(w)->sendEvent(static_cast<TQEvent*>(&fw));
}
@@ -1899,7 +1899,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
// we need to install an event filter on all children of the viewport to
// be able to get correct stacking of children within the document.
if(e->type() == TQEvent::ChildInserted) {
- TQObject *c = TQT_TQOBJECT(TQT_TQCHILDEVENT(e)->child());
+ TQObject *c = TQT_TQOBJECT(static_cast<TQChildEvent*>(e)->child());
if (c->isWidgetType()) {
TQWidget *w = TQT_TQWIDGET(c);
// don't install the event filter on toplevels
@@ -1951,7 +1951,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
v = v->parentWidget();
}
viewportToContents( x, y, x, y );
- TQPaintEvent *pe = TQT_TQPAINTEVENT(e);
+ TQPaintEvent *pe = static_cast<TQPaintEvent*>(e);
bool asap = !d->contentsMoving && ::tqt_cast<TQScrollView *>(c);
// TQScrollView needs fast repaints
@@ -1970,7 +1970,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::MouseButtonRelease:
case TQEvent::MouseButtonDblClick: {
if ( (w->parentWidget() == view || ::tqt_cast<TQScrollView*>(c)) && !::tqt_cast<TQScrollBar *>(w)) {
- TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
+ TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
TQPoint pt = w->mapTo( view, me->pos());
TQMouseEvent me2(me->type(), pt, me->button(), me->state());
@@ -1989,7 +1989,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::KeyPress:
case TQEvent::KeyRelease:
if (w->parentWidget() == view && !::tqt_cast<TQScrollBar *>(w)) {
- TQKeyEvent *ke = TQT_TQKEYEVENT(e);
+ TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
if (e->type() == TQEvent::KeyPress)
keyPressEvent(ke);
else