Bug 271347 - KDateWidget shows double set of monthes after setDate call
Summary: KDateWidget shows double set of monthes after setDate call
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdeui (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 269716 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-20 13:51 UTC by Sergey Ivanov
Modified: 2011-04-20 21:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.3
Sentry Crash Report:


Attachments
Patch to fix (598 bytes, patch)
2011-04-20 13:53 UTC, Sergey Ivanov
Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***