Re: KDateTimeEdit is broken (but unused)
On Saturday 18 April 2015 23:21:59 David Faure wrote: In a KDateTimeEdit, changing the date in the date combo (whether by typing or selecting e.g. next month in the popupmenu), does NOT change the value of date(), which uses its own member variable, unaffected by user interaction. [...] This gives two options: 1) fixing KDateTimeEdit 2) deprecating KDateTimeEdit Does https://paste.kde.org/pksfgjntf fix it? I would prefer fixing it over option 2. Christoph Feck (kdepepo) ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: KDateTimeEdit is broken (but unused)
On Sunday 19 April 2015 09:54:14 Christoph Feck wrote: On Saturday 18 April 2015 23:21:59 David Faure wrote: In a KDateTimeEdit, changing the date in the date combo (whether by typing or selecting e.g. next month in the popupmenu), does NOT change the value of date(), which uses its own member variable, unaffected by user interaction. [...] This gives two options: 1) fixing KDateTimeEdit 2) deprecating KDateTimeEdit Does https://paste.kde.org/pksfgjntf fix it? It helps. The unittest passes. But note how KDateTimeEdit has 3 signals dateTimeEntered, dateTimeChanged and dateTimeEdited. Calling setDate only emits dateTimeChanged. I pushed the test and the fix - and debug statements in kdatetimeedittestapp showing which signals get emitted. Feel free to use this to fix it further :-) I would prefer fixing it over option 2. Well I was wondering how useful it was, if nobody had been using it in 4 years ;-) But OK I guess it's a step in the direction of allowing other calendar systems in KDE apps, it's just that nobody actually used that possibility in their apps -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
KDateTimeEdit is broken (but unused)
Hi John, In a KDateTimeEdit, changing the date in the date combo (whether by typing or selecting e.g. next month in the popupmenu), does NOT change the value of date(), which uses its own member variable, unaffected by user interaction. (tested in the kdelibs KDE/4.14 branch, I suppose frameworks is the same) This unittest shows the same problem, in an automated way: http://www.davidfaure.fr/2015/kdatetimeedittest.diff I suppose the fix would be something around connecting to the dateEntered signal of the KDateCombo, and similar things with the other widgets. Or possibly not having a member variable, and digging into the date and time combos instead? This makes KDateTimeEdit basically unusable, but fortunately (or maybe for that reason) it's not actually used :-) http://lxr.kde.org/ident?_i=KDateTimeEdit_remember=1 This gives two options: 1) fixing KDateTimeEdit 2) deprecating KDateTimeEdit (for the usage I'm looking for, a date combo with a calendar popup, QDateEdit should do the job just fine). But I guess it can be useful for other more advanced usages (calendar system choice; date and time; etc.) -- David Faure | david.fa...@kdab.com | Managing Director KDAB France KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.fr KDAB - The Qt Experts ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: KDateTimeEdit is broken (but unused)
El Dissabte, 18 d'abril de 2015, a les 23:21:59, David Faure va escriure: Hi John, In a KDateTimeEdit, changing the date in the date combo (whether by typing or selecting e.g. next month in the popupmenu), does NOT change the value of date(), which uses its own member variable, unaffected by user interaction. (tested in the kdelibs KDE/4.14 branch, I suppose frameworks is the same) This unittest shows the same problem, in an automated way: http://www.davidfaure.fr/2015/kdatetimeedittest.diff I suppose the fix would be something around connecting to the dateEntered signal of the KDateCombo, and similar things with the other widgets. Or possibly not having a member variable, and digging into the date and time combos instead? This makes KDateTimeEdit basically unusable, but fortunately (or maybe for that reason) it's not actually used :-) http://lxr.kde.org/ident?_i=KDateTimeEdit_remember=1 This gives two options: 1) fixing KDateTimeEdit 2) deprecating KDateTimeEdit (for the usage I'm looking for, a date combo with a calendar popup, QDateEdit should do the job just fine). But I guess it can be useful for other more advanced usages (calendar system choice; date and time; etc.) Seems that fixing it may not be that hard (TM) and you already have a test for it, so i'd say let's fix it :) Cheers, Albert ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel