| 777 | //const QChar *constData() const |
| 778 | |
| 779 | bool readBase(const QChar * str, int * value, int base, int size) |
| 780 | { |
| 781 | int i = 0, temp = 0; |
| 782 | *value = 0; |
| 783 | QChar max = QChar(QChar('0').digitValue() + base - 1); |
| 784 | QChar current; |
| 785 | while (i < size) |
| 786 | { |
| 787 | current = str[i]; |
| 788 | if (current >= 'A') |
| 789 | { |
| 790 | current = current.digitValue() & 0xdf; |
| 791 | current = current.digitValue() - ('A' - '0' - 10); |
| 792 | } |
| 793 | else if (current > '9') |
| 794 | return false; |
| 795 | |
| 796 | if (current >= '0' && current <= max) |
| 797 | { |
| 798 | temp *= base; |
| 799 | temp += (current.digitValue() - '0'); |
| 800 | } |
| 801 | else |
| 802 | { |
| 803 | return false; |
| 804 | } |
| 805 | ++i; |
| 806 | } |
| 807 | *value = temp; |
| 808 | return true; |
| 809 | } |
| 810 | |
| 811 | |
| 812 | int convertExtendedToString(QString& query, QString &result) |
no outgoing calls
no test coverage detected