summaryrefslogtreecommitdiffstats
path: root/tdeui
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-01 22:27:12 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-01 22:27:12 -0500
commitd1c71f692f5329dbfe817bbed41c5137be608efa (patch)
tree0e4b22d3d4fc003e721d8fdb04f85bb9099c4275 /tdeui
parent513ffc6edff67b5f7f121c3064b059ce82cbb842 (diff)
downloadtdelibs-d1c71f692f5329dbfe817bbed41c5137be608efa.tar.gz
tdelibs-d1c71f692f5329dbfe817bbed41c5137be608efa.zip
Fix spinbox text entry when base is not 10
Diffstat (limited to 'tdeui')
-rw-r--r--tdeui/knuminput.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tdeui/knuminput.cpp b/tdeui/knuminput.cpp
index 27b86f98e..118af6c22 100644
--- a/tdeui/knuminput.cpp
+++ b/tdeui/knuminput.cpp
@@ -206,6 +206,7 @@ KIntSpinBox::KIntSpinBox(TQWidget *parent, const char *name)
{
editor()->setAlignment(AlignRight);
val_base = 10;
+ setValidator(new KIntValidator(this, val_base));
setValue(0);
}
@@ -219,11 +220,16 @@ KIntSpinBox::KIntSpinBox(int lower, int upper, int step, int value, int base,
{
editor()->setAlignment(AlignRight);
val_base = base;
+ setValidator(new KIntValidator(this, val_base));
setValue(value);
}
void KIntSpinBox::setBase(int base)
{
+ const KIntValidator* kvalidator = dynamic_cast<const KIntValidator*>(validator());
+ if (kvalidator) {
+ const_cast<KIntValidator*>(kvalidator)->setBase(base);
+ }
val_base = base;
}