[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_2_BRANCH: kdelibs/kdeprint
From:       Michael Goffioul <goffioul () imec ! be>
Date:       2004-03-01 13:44:09
Message-ID: 20040301134409.D58909190 () office ! kde ! org
[Download RAW message or body]

CVS commit by goffioul: 

Use default IPP port value (631) and restrict port to integer only (backport)


  M +3 -0      cups/kmwipp.cpp   1.6.2.1
  M +8 -0      management/kmwinfobase.cpp   1.3.2.1
  M +3 -0      management/kmwinfobase.h   1.4.2.1


--- kdelibs/kdeprint/management/kmwinfobase.cpp  #1.3:1.3.2.1
@@ -81,2 +81,10 @@ void KMWInfoBase::setCurrent(int i)
         }
 }
+
+QLineEdit* KMWInfoBase::lineEdit( int i )
+{
+        if ( i >= 0 && i < m_nlines )
+                return m_edits.at( i );
+        else
+                return NULL;
+}

--- kdelibs/kdeprint/management/kmwinfobase.h  #1.4:1.4.2.1
@@ -39,4 +39,7 @@ public:
         QString text(int);
 
+protected:
+        QLineEdit* lineEdit( int );
+
 private:
         QPtrList<QLabel>                m_labels;

--- kdelibs/kdeprint/cups/kmwipp.cpp  #1.6:1.6.2.1
@@ -25,4 +25,5 @@
 #include <qlineedit.h>
 #include <klocale.h>
+#include <qvalidator.h>
 
 #include <cups/http.h>
@@ -34,4 +35,5 @@ KMWIpp::KMWIpp(QWidget *parent, const ch
         m_title = i18n("Remote IPP server");
         m_nextpage = KMWizard::IPPSelect;
+        lineEdit( 1 )->setValidator( new QIntValidator( this ) );
 
         setInfo(i18n("<p>Enter the information concerning the remote IPP server "
@@ -40,4 +42,5 @@ KMWIpp::KMWIpp(QWidget *parent, const ch
         setLabel(0,i18n("Host:"));
         setLabel(1,i18n("Port:"));
+        setText( 1, QString::fromLatin1( "631" ) );
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic