summaryrefslogtreecommitdiffstats
path: root/lib/koproperty/editors/spinbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/koproperty/editors/spinbox.cpp')
-rw-r--r--lib/koproperty/editors/spinbox.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp
index 4d9266a8..e76ca930 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