summaryrefslogtreecommitdiff
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-12 21:15:58 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-19 17:32:27 +0000
commite8bdca74b513b58d3db892d838b3a499365ca7e2 (patch)
tree927fdbfab0f7b4940a7aa033a0dc7a4f2f45102c /qmake
parente6cc1d788dddda2998a9f941664ede928ce1e212 (diff)
downloadqtbase-e8bdca74b513b58d3db892d838b3a499365ca7e2.tar.gz
optimize ProString::toInt()/toShort()
QStringRef has respective overloads now. Change-Id: I9b94c53092ef3fdd62a68f5d3c5bacb98a14d8ec Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/library/proitems.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/qmake/library/proitems.h b/qmake/library/proitems.h
index 721abb90d0..d22fa0f11e 100644
--- a/qmake/library/proitems.h
+++ b/qmake/library/proitems.h
@@ -130,8 +130,8 @@ public:
bool contains(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(s, 0, cs) >= 0; }
bool contains(const char *s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(QLatin1String(s), 0, cs) >= 0; }
bool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(c, 0, cs) >= 0; }
- int toInt(bool *ok = 0, int base = 10) const { return toQString().toInt(ok, base); } // XXX optimize
- short toShort(bool *ok = 0, int base = 10) const { return toQString().toShort(ok, base); } // XXX optimize
+ int toInt(bool *ok = 0, int base = 10) const { return toQStringRef().toInt(ok, base); }
+ short toShort(bool *ok = 0, int base = 10) const { return toQStringRef().toShort(ok, base); }
uint hash() const { return m_hash; }
static uint hash(const QChar *p, int n);