summaryrefslogtreecommitdiffabout
path: root/microkde/kdialogbase.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kdialogbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdialogbase.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index d1f7630..801094a 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -22,10 +22,12 @@ KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
const QString &user3) :
KDialog( parent, name, modal )
{
init( caption, buttonMask, user1, user2 );
- if (findButton( defaultButton ) )
- (findButton( defaultButton ) )->setFocus();
+ if (findButton( defaultButton ) ) {
+ (findButton( defaultButton ) )->setFocus();
+ (findButton( defaultButton ) )->setDefault( true );
+ }
}
KDialogBase::KDialogBase( int dialogFace, const QString &caption,
@@ -73,8 +75,9 @@ void KDialogBase::init( const QString &caption, int buttonMask,
if ( buttonMask & Ok ) {
mOkButton = new QPushButton( i18n("Ok"), this );
connect( mOkButton, SIGNAL( clicked() ), SLOT( slotOk() ) );
+ mOkButton->setDefault( true );
} else {
mOkButton = 0;
}
if ( buttonMask & Default ) {