CVS commit by mlaurent: Use Kintvalidator M +6 -2 kmwsocketutil.cpp 1.15 M +5 -1 networkscanner.cpp 1.8 --- kdelibs/kdeprint/management/kmwsocketutil.cpp #1.14:1.15 @@ -32,4 +32,5 @@ #include #include +#include #include @@ -49,5 +50,5 @@ SocketConfig::SocketConfig(KMWSocketUtil QWidget *dummy = new QWidget(this); setMainWidget(dummy); - + KIntValidator *val = new KIntValidator( this ); QLabel *masklabel = new QLabel(i18n("&Subnetwork:"),dummy); QLabel *portlabel = new QLabel(i18n("&Port:"),dummy); @@ -61,5 +62,8 @@ SocketConfig::SocketConfig(KMWSocketUtil mask_->setAlignment(Qt::AlignRight); port_ = new QComboBox(true,dummy); + if ( port_->lineEdit() ) + port_->lineEdit()->setValidator( val ); tout_ = new QLineEdit(dummy); + tout_->setValidator( val ); masklabel->setBuddy(mask_); --- kdelibs/kdeprint/management/networkscanner.cpp #1.7:1.8 @@ -34,4 +34,5 @@ #include #include +#include #include #include @@ -334,5 +335,5 @@ NetworkScannerConfig::NetworkScannerConf QWidget *dummy = new QWidget(this); setMainWidget(dummy); - + KIntValidator *val = new KIntValidator( this ); QLabel *masklabel = new QLabel(i18n("&Subnetwork:"),dummy); QLabel *portlabel = new QLabel(i18n("&Port:"),dummy); @@ -346,5 +347,8 @@ NetworkScannerConfig::NetworkScannerConf mask_->setAlignment(Qt::AlignRight); port_ = new QComboBox(true,dummy); + if ( port_->lineEdit() ) + port_->lineEdit()->setValidator( val ); tout_ = new QLineEdit(dummy); + tout_->setValidator( val ); masklabel->setBuddy(mask_);