Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-1098

Converting a negative integer to a hexadecimal QString, and then back to an integer again doesn't work

    XMLWordPrintable

Details

    Description

      Converting a negative integer to a hexadecimal QString, and then back to an integer again doesn't work, i.e.

      bool ok;
      int i = QString::number(-1, 16).toInt(&ok, 16);
      

      makes "i" become 0, and "ok" become false.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            admin Administrator
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes