diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-11-23 14:42:27 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-12-01 19:52:53 +0000 |
commit | 3fcc79261067fd4817c38fa9fc10d872507c6ee9 (patch) | |
tree | 7a1235d9e6bbd4a2233d58212f75fd214f2633c0 /src/lib/corelib/api/languageinfo.cpp | |
parent | cf2116b63a052bfcd7546bec56f66a5015cf5c51 (diff) |
Clean up LanguageInfo
Delete the constructor, change the functions' return types to more
appropriate ones, don't export a Qt dependency, and move the Qbs version
from the Version POD class into LanguageInfo.
Change-Id: I2fc3fd41de60962ee244d525572882e191195c4b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/api/languageinfo.cpp')
-rw-r--r-- | src/lib/corelib/api/languageinfo.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/corelib/api/languageinfo.cpp b/src/lib/corelib/api/languageinfo.cpp index df8d62ca0..8bae5243b 100644 --- a/src/lib/corelib/api/languageinfo.cpp +++ b/src/lib/corelib/api/languageinfo.cpp @@ -47,16 +47,12 @@ namespace qbs { -LanguageInfo::LanguageInfo() -{ -} - -QByteArray LanguageInfo::qmlTypeInfo() +std::string LanguageInfo::qmlTypeInfo() { const Internal::BuiltinDeclarations &builtins = Internal::BuiltinDeclarations::instance(); // Header: - QByteArray result; + std::string result; result.append("import QtQuick.tooling 1.0\n\n"); result.append("// This file describes the plugin-supplied types contained in the library.\n"); result.append("// It is used for QML tooling purposes only.\n\n"); @@ -126,9 +122,10 @@ QByteArray LanguageInfo::qmlTypeInfo() return result; } -QString LanguageInfo::qbsVersion() +Version LanguageInfo::qbsVersion() { - return Version::qbsVersion().toString(); + static const auto v = Version::fromString(QLatin1String(QBS_VERSION)); + return v; } } // namespace qbs |