Bug 271347

Summary: KDateWidget shows double set of monthes after setDate call
Product: [Unmaintained] kdelibs Reporter: Sergey Ivanov <123kash>
Component: kdeuiAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: aspotashev, cfeck
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.6.3
Sentry Crash Report:
Attachments: Patch to fix

Description Sergey Ivanov 2011-04-20 13:51:39 UTC
Version:           SVN (using Devel) 
OS:                Linux

KDateWidget::setDate function adds to d->m_month KComboBox one more set of monthes. So after 1st call of setDate, widget contains double set of monthes, after 2nd - triple, and so on.

Reproducible: Always

Steps to Reproduce:
#include <QApplication>
#include <QDate>
#include <kdatewidget.h>

int main( int argc, char **argv )
{
    QApplication app( argc, argv );
    KDateWidget date;
    date.setDate( QDate::currentDate() );
    date.setDate( QDate::currentDate() );
    date.show();
    return app.exec();
}

Actual Results:  
Widget has triple set of monthes.

Expected Results:  
Widget contains only one set of monthes.
Comment 1 Sergey Ivanov 2011-04-20 13:53:37 UTC
Created attachment 59156 [details]
Patch to fix
Comment 2 Christoph Feck 2011-04-20 16:51:32 UTC
Git commit 9f7171aa55664bcdd0e03d5a39d8d5491ba607c8 by Christoph Feck.
Committed on 20/04/2011 at 16:58.
Pushed by cfeck into branch 'master'.

Fix month names appearing multiple times

Patch by Sergey Ivanov, thanks!
BUG: 271347
FIXED-IN: 4.6.3

M  +1    -0    kdeui/widgets/kdatewidget.cpp     

http://commits.kde.org/kdelibs/9f7171aa55664bcdd0e03d5a39d8d5491ba607c8
Comment 3 Christoph Feck 2011-04-20 17:07:18 UTC
Sorry, not backporting, so will appear in 4.7.0.
Comment 4 Christoph Feck 2011-04-20 17:38:41 UTC
Git commit 7e24c016c9716843b017560e2fca830ecd6f85bc by Christoph Feck.
Committed on 20/04/2011 at 16:58.
Pushed by cfeck into branch 'KDE/4.6'.

Fix month names appearing multiple times

Patch by Sergey Ivanov, thanks!
BUG: 271347
FIXED-IN: 4.6.3
(cherry picked from commit 9f7171aa55664bcdd0e03d5a39d8d5491ba607c8)

M  +1    -0    kdeui/widgets/kdatewidget.cpp     

http://commits.kde.org/kdelibs/7e24c016c9716843b017560e2fca830ecd6f85bc
Comment 5 Christoph Feck 2011-04-20 17:41:40 UTC
Sorry for the flood, but I am still learning how to use the new git tools... I hope the backport worked as intended.
Comment 6 Sergey Ivanov 2011-04-20 21:09:43 UTC
*** Bug 269716 has been marked as a duplicate of this bug. ***