From kde-commits Sun Jun 22 18:29:53 2003 From: Laurent Montel Date: Sun, 22 Jun 2003 18:29:53 +0000 To: kde-commits Subject: kdevelop/parts/valgrind X-MARC-Message: https://marc.info/?l=kde-commits&m=105630665415195 CVS commit by mlaurent: Disable ok button when executable is empty M +11 -1 valgrind_dialog.cpp 1.8 M +4 -1 valgrind_dialog.h 1.3 --- kdevelop/parts/valgrind/valgrind_dialog.cpp #1.7:1.8 @@ -12,4 +12,6 @@ #include "valgrind_dialog.h" +#include "valgrind_dialog.moc" + ValgrindDialog::ValgrindDialog( QWidget* parent ) @@ -20,4 +22,7 @@ ValgrindDialog::ValgrindDialog( QWidget* w->executableEdit->setFocus(); setMainWidget( w ); + connect( w->executableEdit->lineEdit(), SIGNAL( textChanged( const QString &)), this, SLOT( valgrindTextChanged())); + connect( w->valExecutableEdit->lineEdit(), SIGNAL( textChanged( const QString &)), this, SLOT( valgrindTextChanged())); + enableButtonOK( false ); } @@ -27,4 +32,9 @@ ValgrindDialog::~ValgrindDialog() } +void ValgrindDialog::valgrindTextChanged() +{ + enableButtonOK( !w->valExecutableEdit->lineEdit()->text().isEmpty() && !w->executableEdit->lineEdit()->text().isEmpty() ); +} + QString ValgrindDialog::executableName() const { --- kdevelop/parts/valgrind/valgrind_dialog.h #1.2:1.3 @@ -14,5 +14,5 @@ class DialogWidget; class ValgrindDialog : public KDialogBase { - + Q_OBJECT public: ValgrindDialog( QWidget* parent = 0 ); @@ -37,4 +37,7 @@ public: private: DialogWidget *w; + private slots: + void valgrindTextChanged(); + };