Menu

syncDate incorrect ?

lamoda
2023-02-09
2024-03-26
  • lamoda

    lamoda - 2023-02-09

    i see in the gui column and from xml
    sinceDate="dd.MM.yyyy" just string format
    is it correct, i guess it show be a current date numbers or not ?

     
  • lamoda

    lamoda - 2023-05-30

    yep i found
    sinceDate was break by this commit
    https://github.com/danmar/cppcheck/pull/3923/files
    - const QString sinceDate = QDate::currentDate().toString(Qt::SystemLocaleShortDate);
    + const QString sinceDate = QLocale::system().dateFormat(QLocale::ShortFormat);
    before it sincDate was current date time
    after changes it transform to date time FORMAT instead real date time

    can some one fix this ?

     
  • anoy.

    anoy. - 2024-03-16

    This still is an issue in the current Cppcheck GUI.

    https://github.com/danmar/cppcheck/blob/0cc47a9dc1e0a790fdb5540c0851e31af57aeeed/gui/resultstree.cpp#L1259
    Should be the following instead:

    const QString sinceDate = QLocale::system().toString(QDate::currentDate(), QLocale::ShortFormat);
    

    The currently used dateFormat just returns a local formating string for a date (dd.MM.yyyy in Germany).

     
  • Oliver Stöneberg

    I introduced this. Sorry about that.

    Also sorry for the late reply I always forget to look at the forums.

    Thanks for the proposed fix. If you have a GitHub account, please file a pull request.

    Otherwise I will create one on your behalf. In that case I need a name to credit you with.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.