diff options
author | Anton Kudryavtsev <antkudr@mail.ru> | 2017-03-29 07:10:46 +0300 |
---|---|---|
committer | Anton Kudryavtsev <antkudr@mail.ru> | 2017-03-30 20:31:59 +0000 |
commit | 5ec57560c0b497f9f48671dd200bb23d1f6eac35 (patch) | |
tree | 66903177b84d4fc481c8c4e689f47e79aa1a622c /src/tools/qdbusxml2cpp | |
parent | ce124d511917f95bd9193ec71f747f490ec982da (diff) |
Prefer rvalue versions of toLatin() and toUtf8()
... to re-use existing buffers.
Change-Id: I7c42529b8cd4400520a59e658ab76f4f8e965cd4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/tools/qdbusxml2cpp')
-rw-r--r-- | src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp index cdf3ad3310..9ccf8be73a 100644 --- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp +++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp @@ -217,7 +217,7 @@ static QByteArray qtTypeName(const QString &signature, const QDBusIntrospection: annotationName += QString::fromLatin1(".%1%2").arg(QLatin1String(direction)).arg(paramId); QString qttype = annotations.value(annotationName); if (!qttype.isEmpty()) - return qttype.toLatin1(); + return std::move(qttype).toLatin1(); QString oldAnnotationName = QString::fromLatin1("com.trolltech.QtDBus.QtTypeName"); if (paramId >= 0) @@ -242,7 +242,7 @@ static QByteArray qtTypeName(const QString &signature, const QDBusIntrospection: "suggest updating to '%s'\n", PROGRAMNAME, qPrintable(oldAnnotationName), qPrintable(inputFile), qPrintable(annotationName)); - return qttype.toLatin1(); + return std::move(qttype).toLatin1(); } return QVariant::typeToName(QVariant::Type(type)); |