diff options
Diffstat (limited to 'lib/koproperty/editors')
-rw-r--r-- | lib/koproperty/editors/pixmapedit.cpp | 2 | ||||
-rw-r--r-- | lib/koproperty/editors/spinbox.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/koproperty/editors/pixmapedit.cpp b/lib/koproperty/editors/pixmapedit.cpp index cf7645bf5..4e295c964 100644 --- a/lib/koproperty/editors/pixmapedit.cpp +++ b/lib/koproperty/editors/pixmapedit.cpp @@ -205,7 +205,7 @@ PixmapEdit::resizeEvent(TQResizeEvent *e) bool PixmapEdit::eventFilter(TQObject *o, TQEvent *ev) { - if(TQT_BASE_OBJECT(o) == m_edit) { + if(o == m_edit) { if(ev->type() == TQEvent::MouseButtonPress && TQT_TQMOUSEEVENT(ev)->button()==Qt::LeftButton) { if(m_previewPixmap.height() <= m_edit->height() && m_previewPixmap.width() <= m_edit->width()) diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp index 4d9266a8e..e76ca930d 100644 --- a/lib/koproperty/editors/spinbox.cpp +++ b/lib/koproperty/editors/spinbox.cpp @@ -59,7 +59,7 @@ void IntSpinBox::setValue(const TQVariant &value) bool IntSpinBox::eventFilter(TQObject *o, TQEvent *e) { - if(TQT_BASE_OBJECT(o) == editor()) + if(o == editor()) { if(e->type() == TQEvent::KeyPress) { @@ -71,7 +71,7 @@ IntSpinBox::eventFilter(TQObject *o, TQEvent *e) } } } - if ((TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(editor()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o->parent()) == TQT_BASE_OBJECT(this)) + if ((o == editor() || o == this || o->parent() == this) && e->type() == TQEvent::Wheel && static_cast<IntEdit*>(parentWidget())->isReadOnly()) { return true; //avoid value changes for read-only widget @@ -192,7 +192,7 @@ DoubleSpinBox::DoubleSpinBox (double lower, double upper, double step, double va bool DoubleSpinBox::eventFilter(TQObject *o, TQEvent *e) { - if(TQT_BASE_OBJECT(o) == editor()) + if(o == editor()) { if(e->type() == TQEvent::KeyPress) { @@ -204,7 +204,7 @@ DoubleSpinBox::eventFilter(TQObject *o, TQEvent *e) } } } - if ((TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(editor()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o->parent()) == TQT_BASE_OBJECT(this)) + if ((o == editor() || o == this || o->parent() == this) && e->type() == TQEvent::Wheel && static_cast<IntEdit*>(parentWidget())->isReadOnly()) { return true; //avoid value changes for read-only widget |