aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/qbs-qmltypes
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-02-26 17:21:06 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2014-02-27 11:41:31 +0100
commit574ccc7d3670da11d23723259b2e990e2a516e94 (patch)
tree40b1a903e5db13b5e546e6ff81459b42faecb525 /src/app/qbs-qmltypes
parent224073153d461c3b7030546fd6b5f777352eef72 (diff)
introduce qbs::LanguageInfo class
This public API can be used to get information about the qbs language items. Currently it's only used for qbs-qmltypes. This change will enable us to un-export ScriptEngine and Loader. Change-Id: I0c92c7f6e37f6444c51198729cbb5435dc90bb40 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/app/qbs-qmltypes')
-rw-r--r--src/app/qbs-qmltypes/main.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/app/qbs-qmltypes/main.cpp b/src/app/qbs-qmltypes/main.cpp
index c7f71ae46..074245d86 100644
--- a/src/app/qbs-qmltypes/main.cpp
+++ b/src/app/qbs-qmltypes/main.cpp
@@ -28,8 +28,7 @@
****************************************************************************/
#include "../shared/logging/consolelogger.h"
-#include <language/scriptengine.h>
-#include <language/loader.h>
+#include <api/languageinfo.h>
#include <logging/translator.h>
#include <QCoreApplication>
@@ -37,15 +36,13 @@
#include <iostream>
-using qbs::Internal::Loader;
-using qbs::Internal::ScriptEngine;
using qbs::Internal::Tr;
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
+ ConsoleLogger::instance();
- ConsoleLogger &cl = ConsoleLogger::instance();
const QStringList args = app.arguments().mid(1);
if (args.count() == 1 && (args.first() == QLatin1String("--help")
|| args.first() == QLatin1String("-h"))) {
@@ -60,8 +57,8 @@ int main(int argc, char *argv[])
"but this tool does not use any.");
}
- ScriptEngine engine(cl);
- QByteArray typeData = Loader(&engine, cl).qmlTypeInfo();
+ qbs::LanguageInfo languageInfo;
+ const QByteArray typeData = languageInfo.qmlTypeInfo();
std::cout << typeData.constData();