author | zautrix <zautrix> | 2005-02-21 13:34:06 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-21 13:34:06 (UTC) |
commit | ce261d6197d319d67f7b275813449f36ce42a730 (patch) (unidiff) | |
tree | 6221eef1d00a918127377883eaf76f8162db6772 /microkde | |
parent | b4ebc9c227f986369fe9b0193158f3893a29df08 (diff) | |
download | kdepimpi-ce261d6197d319d67f7b275813449f36ce42a730.zip kdepimpi-ce261d6197d319d67f7b275813449f36ce42a730.tar.gz kdepimpi-ce261d6197d319d67f7b275813449f36ce42a730.tar.bz2 |
default button fixes
-rw-r--r-- | microkde/kdialogbase.cpp | 7 |
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 | |||
@@ -18,18 +18,20 @@ KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal, | |||
18 | int buttonMask, ButtonCode defaultButton, | 18 | int buttonMask, ButtonCode defaultButton, |
19 | bool separator, | 19 | bool separator, |
20 | const QString &user1, | 20 | const QString &user1, |
21 | const QString &user2, | 21 | const QString &user2, |
22 | const QString &user3) : | 22 | const QString &user3) : |
23 | KDialog( parent, name, modal ) | 23 | KDialog( parent, name, modal ) |
24 | { | 24 | { |
25 | init( caption, buttonMask, user1, user2 ); | 25 | init( caption, buttonMask, user1, user2 ); |
26 | if (findButton( defaultButton ) ) | 26 | if (findButton( defaultButton ) ) { |
27 | (findButton( defaultButton ) )->setFocus(); | 27 | (findButton( defaultButton ) )->setFocus(); |
28 | (findButton( defaultButton ) )->setDefault( true ); | ||
29 | } | ||
28 | 30 | ||
29 | } | 31 | } |
30 | 32 | ||
31 | KDialogBase::KDialogBase( int dialogFace, const QString &caption, | 33 | KDialogBase::KDialogBase( int dialogFace, const QString &caption, |
32 | int buttonMask, ButtonCode defaultButton, | 34 | int buttonMask, ButtonCode defaultButton, |
33 | QWidget *parent, const char *name, bool modal, | 35 | QWidget *parent, const char *name, bool modal, |
34 | bool separator, | 36 | bool separator, |
35 | const QString &user1, | 37 | const QString &user1, |
@@ -69,16 +71,17 @@ void KDialogBase::init( const QString &caption, int buttonMask, | |||
69 | connect( mUser2Button, SIGNAL( clicked() ), SLOT( slotUser2() ) ); | 71 | connect( mUser2Button, SIGNAL( clicked() ), SLOT( slotUser2() ) ); |
70 | } else { | 72 | } else { |
71 | mUser2Button = 0; | 73 | mUser2Button = 0; |
72 | } | 74 | } |
73 | 75 | ||
74 | if ( buttonMask & Ok ) { | 76 | if ( buttonMask & Ok ) { |
75 | mOkButton = new QPushButton( i18n("Ok"), this ); | 77 | mOkButton = new QPushButton( i18n("Ok"), this ); |
76 | connect( mOkButton, SIGNAL( clicked() ), SLOT( slotOk() ) ); | 78 | connect( mOkButton, SIGNAL( clicked() ), SLOT( slotOk() ) ); |
79 | mOkButton->setDefault( true ); | ||
77 | } else { | 80 | } else { |
78 | mOkButton = 0; | 81 | mOkButton = 0; |
79 | } | 82 | } |
80 | if ( buttonMask & Default ) { | 83 | if ( buttonMask & Default ) { |
81 | mDefaultButton = new QPushButton( i18n("Default"), this ); | 84 | mDefaultButton = new QPushButton( i18n("Default"), this ); |
82 | connect( mDefaultButton, SIGNAL( clicked() ), SIGNAL( defaultClicked() ) ); | 85 | connect( mDefaultButton, SIGNAL( clicked() ), SIGNAL( defaultClicked() ) ); |
83 | } else { | 86 | } else { |
84 | mDefaultButton = 0; | 87 | mDefaultButton = 0; |