KDateTimeEdit is broken (but unused)

Albert Astals Cid aacid at kde.org
Sat Apr 18 23:03:54 UTC 2015


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


More information about the Kde-frameworks-devel mailing list