diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-10 15:56:40 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-11 13:59:44 +0000 |
commit | 1a7b140eb8f3f03354452c4669aabae2f141b9c8 (patch) | |
tree | 35f5d92966427a9488c4b6e3b57cc2f24be9c4ce /tools/testcon | |
parent | 4db7de9fafb6d4620828ad8ed51c3d22b3efba9f (diff) |
String fixes.
- Avoid conversion from QString to QByteArray.
- Replace a = a.mid() by a.remove().
- Replace a = a.left() by a.truncate().
- Streamline code extracting an error code.
Change-Id: I43c1f04e947632f725bbb86af5abf108b2b02261
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'tools/testcon')
-rw-r--r-- | tools/testcon/invokemethod.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testcon/invokemethod.cpp b/tools/testcon/invokemethod.cpp index 0f898b1..ec6024c 100644 --- a/tools/testcon/invokemethod.cpp +++ b/tools/testcon/invokemethod.cpp @@ -114,7 +114,7 @@ void InvokeMethod::on_comboMethods_activated(const QString &method) const QMetaObject *mo = activex->metaObject(); const QMetaMethod slot = mo->method(mo->indexOfSlot(method.toLatin1())); QString signature = QString::fromLatin1(slot.methodSignature()); - signature = signature.mid(signature.indexOf(QLatin1Char('(')) + 1); + signature.remove(0, signature.indexOf(QLatin1Char('(')) + 1); signature.truncate(signature.length()-1); QList<QByteArray> pnames = slot.parameterNames(); |