D22282: Fixes group separated stored constants that would show as nan

Joseph Winzer noreply at phabricator.kde.org
Thu Jul 4 22:47:27 BST 2019


Joefish created this revision.
Herald added a subscriber: kde-utils-devel.
Joefish requested review of this revision.

REVISION SUMMARY
    The integer_regex in KNumber(const QString &s) does not recognize
    numbers with group separators. Therefore, they are removed from the
    string representation of the number before being passed.
    Also, sanitizing the decimal separator is not needed as it is
    already done in the KNumber constructor.

TEST PLAN
    (Copied from @Dan that reported the bug)
    1. In Settings select Science Mode
    2. In Settings turn on Constants Buttons
    3. With a number greater than one thousand in the display field
       (with comma separators) select the Shift button.
       The C1-C6 buttons will all change to Store
    4. Select one of the Store buttons
    5. Clear the display with AC button
    6. Hover over the button the number was stored in (C1-C6).
       The stored number should be displayed as a tool tip
    7. Select the button the number was stored in
  
  BUG: 408752

REPOSITORY
  R353 KCalc

BRANCH
  bug_408752 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D22282

AFFECTED FILES
  kcalc.cpp

To: Joefish
Cc: kde-utils-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20190704/56146f56/attachment-0001.html>


More information about the Kde-utils-devel mailing list