Commit 70842aae authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Start to fix bug report on "Bug 314959 - Exporting contacts to vcard...

Start to fix bug report on "Bug 314959 - Exporting contacts to vcard overwrites already exported cards with same name"

I fixed select birtday

CCBUG: 314959
(will fix in 4.10.1)
parent c09f689e
......@@ -61,7 +61,7 @@ KDatePickerPopup::KDatePickerPopup( Items items, const QDate &date, QWidget *par
: QMenu( parent )
{
mItems = items;
mDate = date;
mDatePicker = new KDatePicker( this );
mDatePicker->setCloseButton( false );
......@@ -70,11 +70,19 @@ KDatePickerPopup::KDatePickerPopup( Items items, const QDate &date, QWidget *par
connect( mDatePicker, SIGNAL(dateSelected(QDate)),
SLOT(slotDateChanged(QDate)) );
connect( this, SIGNAL(aboutToHide()), SLOT(slotHidePickerPopup()));
mDatePicker->setDate( date );
buildMenu();
}
void KDatePickerPopup::slotHidePickerPopup()
{
if (mDatePicker->date() != mDate) {
emit dateChanged( mDatePicker->date() );
}
}
void KDatePickerPopup::buildMenu()
{
if ( isVisible() ) {
......@@ -124,9 +132,8 @@ void KDatePickerPopup::setItems( int items )
}
#endif
void KDatePickerPopup::slotDateChanged( const QDate &date )
void KDatePickerPopup::slotDateChanged( const QDate &/*date*/ )
{
emit dateChanged( date );
hide();
}
......
......@@ -103,12 +103,14 @@ class KDatePickerPopup: public QMenu
void slotNextWeek();
void slotNextMonth();
void slotNoDate();
void slotHidePickerPopup();
private:
void buildMenu();
KDatePicker *mDatePicker;
Items mItems;
QDate mDate;
};
Q_DECLARE_OPERATORS_FOR_FLAGS( KDatePickerPopup::Items )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment