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

List:       kde-commits
Subject:    KDE/kdebase/apps/kdialog
From:       Laurent Montel <montel () kde ! org>
Date:       2009-06-08 7:32:14
Message-ID: 1244446334.498859.8808.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 978781 by mlaurent:

const'ify


 M  +1 -1      klistboxdialog.cpp  
 M  +1 -1      klistboxdialog.h  
 M  +8 -7      widgets.cpp  


--- trunk/KDE/kdebase/apps/kdialog/klistboxdialog.cpp #978780:978781
@@ -57,7 +57,7 @@
   }
 }
 
-int KListBoxDialog::currentItem()
+int KListBoxDialog::currentItem() const
 {
   return table->currentRow();
 }
--- trunk/KDE/kdebase/apps/kdialog/klistboxdialog.h #978780:978781
@@ -40,7 +40,7 @@
 
   void insertItem( const QString& text );
   void setCurrentItem ( const QString& text );
-  int currentItem();
+  int currentItem() const;
 
 protected:
 
--- trunk/KDE/kdebase/apps/kdialog/widgets.cpp #978780:978781
@@ -74,7 +74,7 @@
 bool Widgets::inputBox(QWidget *parent, const QString& title, const QString& text, \
const QString& init, QString &result)  {
   bool ok;
-  QString str = KInputDialog::getText( title, text, init, &ok, parent, 0, 0, \
QString() ); +  const QString str = KInputDialog::getText( title, text, init, &ok, \
parent, 0, 0, QString() );  if ( ok )
     result = str;
   return ok;
@@ -164,7 +164,7 @@
 
   handleXGeometry(&dlg);
   dlg.setCaption(title);
-  int returnDialogCode = dlg.exec();
+  const int returnDialogCode = dlg.exec();
   result = edit->toPlainText();
   return (returnDialogCode == KDialog::Accepted ? 0 : 1);
 }
@@ -213,7 +213,7 @@
 
   handleXGeometry(&box);
 
-  bool retcode = (box.exec() == QDialog::Accepted);
+  const bool retcode = (box.exec() == QDialog::Accepted);
   if ( retcode )
     result = args[ box.currentItem()*2 ];
   return retcode;
@@ -249,7 +249,7 @@
 
   handleXGeometry(&box);
 
-  bool retcode = (box.exec() == QDialog::Accepted);
+  const bool retcode = (box.exec() == QDialog::Accepted);
 
   if ( retcode ) {
     if (separateOutput) {
@@ -293,7 +293,7 @@
 
   handleXGeometry(&box);
 
-  bool retcode = (box.exec() == QDialog::Accepted);
+  const bool retcode = (box.exec() == QDialog::Accepted);
   if ( retcode )
     result = tags[ table.currentRow() ];
   return retcode;
@@ -332,7 +332,7 @@
     slider.setOrientation( Qt::Horizontal );
     handleXGeometry(&dlg);
 
-    bool retcode = (dlg.exec() == QDialog::Accepted);
+    const bool retcode = (dlg.exec() == QDialog::Accepted);
 
     if (retcode)
         result = slider.value();
@@ -357,10 +357,11 @@
     KDatePicker dateWidget( vbox );
     handleXGeometry(&dlg);
 
-    bool retcode = (dlg.exec() == QDialog::Accepted);
+    const bool retcode = (dlg.exec() == QDialog::Accepted);
 
     if (retcode)
         result = dateWidget.date();
 
     return retcode;
 }
+


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

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