qmake: fix a few deprecated QChar(non-char-type) warnings
The QChar ctors from non-char-types are going to be deprecated. Change-Id: I17d7916fb1dac9889ead61daca846b1257d17312 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
23849826b4
commit
1a8916cc4f
@ -94,7 +94,7 @@ struct FileInfoCacheKey
|
||||
return true;
|
||||
|
||||
const QChar c0 = file.at(0);
|
||||
const QChar c1 = length >= 2 ? file.at(1) : QChar(0);
|
||||
const QChar c1 = length >= 2 ? file.at(1) : QChar::Null;
|
||||
return !(c0 == QLatin1Char('/')
|
||||
|| c0 == QLatin1Char('\\')
|
||||
|| (c0.isLetter() && c1 == QLatin1Char(':'))
|
||||
|
@ -282,10 +282,10 @@ ProStringList QMakeEvaluator::split_value_list(const QStringRef &vals, int sourc
|
||||
|
||||
const QChar *vals_data = vals.data();
|
||||
const int vals_len = vals.length();
|
||||
ushort quote = 0;
|
||||
char16_t quote = 0;
|
||||
bool hadWord = false;
|
||||
for (int x = 0; x < vals_len; x++) {
|
||||
ushort unicode = vals_data[x].unicode();
|
||||
char16_t unicode = vals_data[x].unicode();
|
||||
if (unicode == quote) {
|
||||
quote = 0;
|
||||
hadWord = true;
|
||||
@ -313,7 +313,7 @@ ProStringList QMakeEvaluator::split_value_list(const QStringRef &vals, int sourc
|
||||
break;
|
||||
case '\\':
|
||||
if (x + 1 != vals_len) {
|
||||
ushort next = vals_data[++x].unicode();
|
||||
char16_t next = vals_data[++x].unicode();
|
||||
if (next == '\'' || next == '"' || next == '\\') {
|
||||
build += QChar(unicode);
|
||||
unicode = next;
|
||||
|
@ -372,9 +372,9 @@ void QMakeParser::read(ProFile *pro, const QStringRef &in, int line, SubGrammar
|
||||
int wordCount = 0; // Number of words in currently accumulated expression
|
||||
int lastIndent = 0; // Previous line's indentation, to detect accidental continuation abuse
|
||||
bool lineMarked = true; // For in-expression markers
|
||||
ushort needSep = TokNewStr; // Met unquoted whitespace
|
||||
ushort quote = 0;
|
||||
ushort term = 0;
|
||||
char16_t needSep = TokNewStr; // Met unquoted whitespace
|
||||
char16_t quote = 0;
|
||||
char16_t term = 0;
|
||||
|
||||
Context context;
|
||||
ushort *ptr;
|
||||
@ -450,7 +450,7 @@ void QMakeParser::read(ProFile *pro, const QStringRef &in, int line, SubGrammar
|
||||
}
|
||||
|
||||
forever {
|
||||
ushort c;
|
||||
char16_t c;
|
||||
|
||||
// First, skip leading whitespace
|
||||
for (indent = 0; ; ++cur, ++indent) {
|
||||
@ -636,7 +636,7 @@ void QMakeParser::read(ProFile *pro, const QStringRef &in, int line, SubGrammar
|
||||
}
|
||||
} else if (c == '\\') {
|
||||
static const char symbols[] = "[]{}()$\\'\"";
|
||||
ushort c2;
|
||||
char16_t c2;
|
||||
if (cur != end && !((c2 = *cur) & 0xff00) && strchr(symbols, c2)) {
|
||||
c = c2;
|
||||
cur++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user