forked from qt-creator/qt-creator
Do not use the fromAscii() and toAscii() functions.
They are deprecated in Qt 5. Use fromLatin1() and toLatin1() instead. In Qt 5, these always do the same thing as their "Ascii" counterparts. The same goes for Qt 4, provided QTextCodec::setCodecForCStrings has not been set, which it hasn't. Change-Id: I04edeb376762b6671eff8156094f0d5e2cb8e1ea Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -91,10 +91,10 @@ IntegerValidator::IntegerValidator(QObject *parent) :
|
||||
bool IntegerValidator::isCharAcceptable(const QChar &c, int base)
|
||||
{
|
||||
if (c.isLetter())
|
||||
return base == 16 && c.toLower().toAscii() <= 'f';
|
||||
return base == 16 && c.toLower().toLatin1() <= 'f';
|
||||
if (!c.isDigit())
|
||||
return false;
|
||||
const int digit = c.toAscii() - '0';
|
||||
const int digit = c.toLatin1() - '0';
|
||||
if (base == 8 && digit > 7)
|
||||
return false;
|
||||
if (base == 2 && digit > 1)
|
||||
|
||||
Reference in New Issue
Block a user