summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kdateedit.cpp1
-rw-r--r--microkde/kdialogbase.cpp7
2 files changed, 6 insertions, 2 deletions
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index 946fc0d..3d9e690 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -74,24 +74,25 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
mDateFrame->setLineWidth(3);
mDateFrame->hide();
mDatePicker = new KDatePicker(mDateFrame,QDate::currentDate());
connect(mDatePicker,SIGNAL(dateEntered(QDate)),SLOT(setDate(QDate)));
connect(mDatePicker,SIGNAL(dateEntered(QDate)),SIGNAL(dateChanged(QDate)));
connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(setDate(QDate)));
connect(mDatePicker,SIGNAL(dateSelected(QDate)),SIGNAL(dateChanged(QDate)));
connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide()));
connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker()));
mDateButton->setFocusPolicy( QWidget::NoFocus );
+ mDateButton->setAutoDefault( false );
//mDateFrame->resize( 400, 300 );
}
connect(mDateEdit,SIGNAL(returnPressed()),SLOT(lineEnterPressed()));
connect(mDateEdit,SIGNAL(textChanged(const QString &)),
SLOT(textChanged(const QString &)));
// Create the keyword list. This will be used to match against when the user
// enters information.
mKeywordMap[i18n("tomorrow")] = 1;
mKeywordMap[i18n("today")] = 0;
mKeywordMap[i18n("yesterday")] = -1;
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index d1f7630..801094a 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -14,26 +14,28 @@ KDialogBase::KDialogBase()
}
KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
const QString &caption,
int buttonMask, ButtonCode defaultButton,
bool separator,
const QString &user1,
const QString &user2,
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,
int buttonMask, ButtonCode defaultButton,
QWidget *parent, const char *name, bool modal,
bool separator,
const QString &user1,
const QString &user2,
const QString &user3) :
KDialog( parent, name, modal )
{
@@ -65,24 +67,25 @@ void KDialogBase::init( const QString &caption, int buttonMask,
mUser1Button = 0;
}
if ( buttonMask & User2 ) {
mUser2Button = new QPushButton( user2, this );
connect( mUser2Button, SIGNAL( clicked() ), SLOT( slotUser2() ) );
} else {
mUser2Button = 0;
}
if ( buttonMask & Ok ) {
mOkButton = new QPushButton( i18n("Ok"), this );
connect( mOkButton, SIGNAL( clicked() ), SLOT( slotOk() ) );
+ mOkButton->setDefault( true );
} else {
mOkButton = 0;
}
if ( buttonMask & Default ) {
mDefaultButton = new QPushButton( i18n("Default"), this );
connect( mDefaultButton, SIGNAL( clicked() ), SIGNAL( defaultClicked() ) );
} else {
mDefaultButton = 0;
}
if ( buttonMask & Apply ) {
mApplyButton = new QPushButton( i18n("Apply"), this );