diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2011-09-29 10:29:22 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-29 14:59:15 +0200 |
commit | bcc9a4b3d10899f23b304fecb581aa0d50e1b4e5 (patch) | |
tree | 557b4391429873a0a30e122059a9b1207a1ddb3d /tools/qmlplugindump | |
parent | 15a52c1a5f9cf166305c264abc01e35bad918d84 (diff) |
Remove more QByteArray<->QString conversions
Prefer to store types as QStrings. It's only when we manipulate
raw (compiled, meta-)data that utf conversion is needed.
Change-Id: Ie138a69c9a409804e1b90b21c1d60dedea35bddb
Reviewed-on: http://codereview.qt-project.org/5781
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'tools/qmlplugindump')
-rw-r--r-- | tools/qmlplugindump/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 6132d15d0d..35e90cd3d4 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -204,8 +204,8 @@ QSet<const QMetaObject *> collectReachableMetaObjects(const QList<QDeclarativeTy if (ty->typeName() == "QDeclarativeComponent") continue; - QByteArray tyName = ty->qmlTypeName(); - tyName = tyName.mid(tyName.lastIndexOf('/') + 1); + QString tyName = ty->qmlTypeName(); + tyName = tyName.mid(tyName.lastIndexOf(QLatin1Char('/')) + 1); if (tyName.isEmpty()) continue; @@ -583,8 +583,8 @@ int main(int argc, char *argv[]) qWarning() << "Could not find QtObject type"; importCode = QByteArray("import QtQuick 2.0\n"); } else { - QByteArray module = qtObjectType->qmlTypeName(); - module = module.mid(0, module.lastIndexOf('/')); + QString module = qtObjectType->qmlTypeName(); + module = module.mid(0, module.lastIndexOf(QLatin1Char('/'))); importCode = QString("import %1 %2.%3\n").arg(module, QString::number(qtObjectType->majorVersion()), QString::number(qtObjectType->minorVersion())).toUtf8(); |