Commit 54c1e42e authored by hjk's avatar hjk

Compile fix after recent QT_NO_CAST... changes

Change-Id: I83564b1618d0d5de949383ae3e5a9633de04e478
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent cb64537a
......@@ -68,7 +68,7 @@ void CppToolsPlugin::test_codegen_public_in_empty_class()
"};\n"
"\n";
Document::Ptr doc = Document::create("public_in_empty_class");
Document::Ptr doc = Document::create(QLatin1String("public_in_empty_class"));
doc->setUtf8Source(src);
doc->parse();
doc->check();
......@@ -108,7 +108,7 @@ void CppToolsPlugin::test_codegen_public_in_nonempty_class()
"};\n" // line 4
"\n";
Document::Ptr doc = Document::create("public_in_nonempty_class");
Document::Ptr doc = Document::create(QLatin1String("public_in_nonempty_class"));
doc->setUtf8Source(src);
doc->parse();
doc->check();
......@@ -148,7 +148,7 @@ void CppToolsPlugin::test_codegen_public_before_protected()
"};\n"
"\n";
Document::Ptr doc = Document::create("public_before_protected");
Document::Ptr doc = Document::create(QLatin1String("public_before_protected"));
doc->setUtf8Source(src);
doc->parse();
doc->check();
......@@ -189,7 +189,7 @@ void CppToolsPlugin::test_codegen_private_after_protected()
"};\n"
"\n";
Document::Ptr doc = Document::create("private_after_protected");
Document::Ptr doc = Document::create(QLatin1String("private_after_protected"));
doc->setUtf8Source(src);
doc->parse();
doc->check();
......@@ -230,7 +230,7 @@ void CppToolsPlugin::test_codegen_protected_in_nonempty_class()
"};\n" // line 4
"\n";
Document::Ptr doc = Document::create("protected_in_nonempty_class");
Document::Ptr doc = Document::create(QLatin1String("protected_in_nonempty_class"));
doc->setUtf8Source(src);
doc->parse();
doc->check();
......@@ -271,7 +271,7 @@ void CppToolsPlugin::test_codegen_protected_between_public_and_private()
"};\n" // line 5
"\n";
Document::Ptr doc = Document::create("protected_betwee_public_and_private");
Document::Ptr doc = Document::create(QLatin1String("protected_betwee_public_and_private"));
doc->setUtf8Source(src);
doc->parse();
doc->check();
......@@ -332,7 +332,7 @@ void CppToolsPlugin::test_codegen_qtdesigner_integration()
"\n"
"#endif // MAINWINDOW_H\n";
Document::Ptr doc = Document::create("qtdesigner_integration");
Document::Ptr doc = Document::create(QLatin1String("qtdesigner_integration"));
doc->setUtf8Source(src);
doc->parse();
doc->check();
......@@ -429,7 +429,7 @@ void CppToolsPlugin::test_codegen_definition_first_member()
"};\n"
"\n";
const QByteArray dstText = QString(
const QByteArray dstText = QString::fromLatin1(
"\n"
"#include \"%1/file.h\"\n" // line 1
"int x;\n"
......@@ -498,7 +498,7 @@ void CppToolsPlugin::test_codegen_definition_last_member()
"};\n"
"\n";
const QByteArray dstText = QString(
const QByteArray dstText = QString::fromLatin1(
"\n"
"#include \"%1/file.h\"\n" // line 1
"int x;\n"
......@@ -568,7 +568,7 @@ void CppToolsPlugin::test_codegen_definition_middle_member()
"};\n"
"\n";
const QByteArray dstText = QString(
const QByteArray dstText = QString::fromLatin1(
"\n"
"#include \"%1/file.h\"\n" // line 1
"int x;\n"
......
......@@ -55,7 +55,7 @@ void QmlJSTools::Internal::QmlJSToolsPlugin::test_basic()
{
QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance();
const QString welcomescreenRootPath = Core::ICore::resourcePath() + "/welcomescreen/welcomescreen.qml";
const QString welcomescreenRootPath = Core::ICore::resourcePath() + QLatin1String("/welcomescreen/welcomescreen.qml");
modelManager->updateSourceFiles(QStringList(welcomescreenRootPath), false);
modelManager->joinAllThreads();
......@@ -67,34 +67,34 @@ void QmlJSTools::Internal::QmlJSToolsPlugin::test_basic()
QVERIFY(context);
const CppComponentValue *rectangleValue = context->valueOwner()->cppQmlTypes().objectByQualifiedName(
"QtQuick", "QDeclarative1Rectangle", LanguageUtils::ComponentVersion(1, 0));
QLatin1String("QtQuick"), QLatin1String("QDeclarative1Rectangle"), LanguageUtils::ComponentVersion(1, 0));
QVERIFY(rectangleValue);
QVERIFY(!rectangleValue->isWritable("border"));
QVERIFY(rectangleValue->hasProperty("border"));
QVERIFY(rectangleValue->isPointer("border"));
QVERIFY(rectangleValue->isWritable("color"));
QVERIFY(!rectangleValue->isPointer("color"));
QVERIFY(!rectangleValue->isWritable(QLatin1String("border")));
QVERIFY(rectangleValue->hasProperty(QLatin1String("border")));
QVERIFY(rectangleValue->isPointer(QLatin1String("border")));
QVERIFY(rectangleValue->isWritable(QLatin1String("color")));
QVERIFY(!rectangleValue->isPointer(QLatin1String("color")));
const ObjectValue *ovItem = context->lookupType(doc.data(), QStringList() << "Item");
const ObjectValue *ovItem = context->lookupType(doc.data(), QStringList(QLatin1String("Item")));
QVERIFY(ovItem);
QCOMPARE(ovItem->className(), QString("Item"));
QCOMPARE(context->imports(doc.data())->info("Item", context.data()).name(), QString("QtQuick"));
QCOMPARE(ovItem->className(), QLatin1String("Item"));
QCOMPARE(context->imports(doc.data())->info(QLatin1String("Item"), context.data()).name(), QLatin1String("QtQuick"));
const ObjectValue *ovProperty = context->lookupType(doc.data(), QStringList() << "Item" << "states");
const ObjectValue *ovProperty = context->lookupType(doc.data(), QStringList() << QLatin1String("Item") << QLatin1String("states"));
QVERIFY(ovProperty);
QCOMPARE(ovProperty->className(), QString("State"));
QCOMPARE(ovProperty->className(), QLatin1String("State"));
const CppComponentValue * qmlItemValue = value_cast<CppComponentValue>(ovItem);
const CppComponentValue *qmlItemValue = value_cast<CppComponentValue>(ovItem);
QVERIFY(qmlItemValue);
QCOMPARE(qmlItemValue->defaultPropertyName(), QString("data"));
QCOMPARE(qmlItemValue->propertyType("state"), QString("string"));
QCOMPARE(qmlItemValue->defaultPropertyName(), QLatin1String("data"));
QCOMPARE(qmlItemValue->propertyType(QLatin1String("state")), QLatin1String("string"));
const ObjectValue *ovState = context->lookupType(doc.data(), QStringList() << "State");
const CppComponentValue * qmlState2Value = value_cast<CppComponentValue>(ovState);
QCOMPARE(qmlState2Value->className(), QString("State"));
const ObjectValue *ovState = context->lookupType(doc.data(), QStringList(QLatin1String("State")));
const CppComponentValue *qmlState2Value = value_cast<CppComponentValue>(ovState);
QCOMPARE(qmlState2Value->className(), QLatin1String("State"));
const ObjectValue *ovImage = context->lookupType(doc.data(), QStringList() << "Image");
const CppComponentValue * qmlImageValue = value_cast<CppComponentValue>(ovImage);
QCOMPARE(qmlImageValue->className(), QString("Image"));
QCOMPARE(qmlImageValue->propertyType("source"), QString("QUrl"));
const ObjectValue *ovImage = context->lookupType(doc.data(), QStringList(QLatin1String("Image")));
const CppComponentValue *qmlImageValue = value_cast<CppComponentValue>(ovImage);
QCOMPARE(qmlImageValue->className(), QLatin1String("Image"));
QCOMPARE(qmlImageValue->propertyType(QLatin1String("source")), QLatin1String("QUrl"));
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment