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() ...@@ -68,7 +68,7 @@ void CppToolsPlugin::test_codegen_public_in_empty_class()
"};\n" "};\n"
"\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->setUtf8Source(src);
doc->parse(); doc->parse();
doc->check(); doc->check();
...@@ -108,7 +108,7 @@ void CppToolsPlugin::test_codegen_public_in_nonempty_class() ...@@ -108,7 +108,7 @@ void CppToolsPlugin::test_codegen_public_in_nonempty_class()
"};\n" // line 4 "};\n" // line 4
"\n"; "\n";
Document::Ptr doc = Document::create("public_in_nonempty_class"); Document::Ptr doc = Document::create(QLatin1String("public_in_nonempty_class"));
doc->setUtf8Source(src); doc->setUtf8Source(src);
doc->parse(); doc->parse();
doc->check(); doc->check();
...@@ -148,7 +148,7 @@ void CppToolsPlugin::test_codegen_public_before_protected() ...@@ -148,7 +148,7 @@ void CppToolsPlugin::test_codegen_public_before_protected()
"};\n" "};\n"
"\n"; "\n";
Document::Ptr doc = Document::create("public_before_protected"); Document::Ptr doc = Document::create(QLatin1String("public_before_protected"));
doc->setUtf8Source(src); doc->setUtf8Source(src);
doc->parse(); doc->parse();
doc->check(); doc->check();
...@@ -189,7 +189,7 @@ void CppToolsPlugin::test_codegen_private_after_protected() ...@@ -189,7 +189,7 @@ void CppToolsPlugin::test_codegen_private_after_protected()
"};\n" "};\n"
"\n"; "\n";
Document::Ptr doc = Document::create("private_after_protected"); Document::Ptr doc = Document::create(QLatin1String("private_after_protected"));
doc->setUtf8Source(src); doc->setUtf8Source(src);
doc->parse(); doc->parse();
doc->check(); doc->check();
...@@ -230,7 +230,7 @@ void CppToolsPlugin::test_codegen_protected_in_nonempty_class() ...@@ -230,7 +230,7 @@ void CppToolsPlugin::test_codegen_protected_in_nonempty_class()
"};\n" // line 4 "};\n" // line 4
"\n"; "\n";
Document::Ptr doc = Document::create("protected_in_nonempty_class"); Document::Ptr doc = Document::create(QLatin1String("protected_in_nonempty_class"));
doc->setUtf8Source(src); doc->setUtf8Source(src);
doc->parse(); doc->parse();
doc->check(); doc->check();
...@@ -271,7 +271,7 @@ void CppToolsPlugin::test_codegen_protected_between_public_and_private() ...@@ -271,7 +271,7 @@ void CppToolsPlugin::test_codegen_protected_between_public_and_private()
"};\n" // line 5 "};\n" // line 5
"\n"; "\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->setUtf8Source(src);
doc->parse(); doc->parse();
doc->check(); doc->check();
...@@ -332,7 +332,7 @@ void CppToolsPlugin::test_codegen_qtdesigner_integration() ...@@ -332,7 +332,7 @@ void CppToolsPlugin::test_codegen_qtdesigner_integration()
"\n" "\n"
"#endif // MAINWINDOW_H\n"; "#endif // MAINWINDOW_H\n";
Document::Ptr doc = Document::create("qtdesigner_integration"); Document::Ptr doc = Document::create(QLatin1String("qtdesigner_integration"));
doc->setUtf8Source(src); doc->setUtf8Source(src);
doc->parse(); doc->parse();
doc->check(); doc->check();
...@@ -429,7 +429,7 @@ void CppToolsPlugin::test_codegen_definition_first_member() ...@@ -429,7 +429,7 @@ void CppToolsPlugin::test_codegen_definition_first_member()
"};\n" "};\n"
"\n"; "\n";
const QByteArray dstText = QString( const QByteArray dstText = QString::fromLatin1(
"\n" "\n"
"#include \"%1/file.h\"\n" // line 1 "#include \"%1/file.h\"\n" // line 1
"int x;\n" "int x;\n"
...@@ -498,7 +498,7 @@ void CppToolsPlugin::test_codegen_definition_last_member() ...@@ -498,7 +498,7 @@ void CppToolsPlugin::test_codegen_definition_last_member()
"};\n" "};\n"
"\n"; "\n";
const QByteArray dstText = QString( const QByteArray dstText = QString::fromLatin1(
"\n" "\n"
"#include \"%1/file.h\"\n" // line 1 "#include \"%1/file.h\"\n" // line 1
"int x;\n" "int x;\n"
...@@ -568,7 +568,7 @@ void CppToolsPlugin::test_codegen_definition_middle_member() ...@@ -568,7 +568,7 @@ void CppToolsPlugin::test_codegen_definition_middle_member()
"};\n" "};\n"
"\n"; "\n";
const QByteArray dstText = QString( const QByteArray dstText = QString::fromLatin1(
"\n" "\n"
"#include \"%1/file.h\"\n" // line 1 "#include \"%1/file.h\"\n" // line 1
"int x;\n" "int x;\n"
......
...@@ -55,7 +55,7 @@ void QmlJSTools::Internal::QmlJSToolsPlugin::test_basic() ...@@ -55,7 +55,7 @@ void QmlJSTools::Internal::QmlJSToolsPlugin::test_basic()
{ {
QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance(); 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->updateSourceFiles(QStringList(welcomescreenRootPath), false);
modelManager->joinAllThreads(); modelManager->joinAllThreads();
...@@ -67,34 +67,34 @@ void QmlJSTools::Internal::QmlJSToolsPlugin::test_basic() ...@@ -67,34 +67,34 @@ void QmlJSTools::Internal::QmlJSToolsPlugin::test_basic()
QVERIFY(context); QVERIFY(context);
const CppComponentValue *rectangleValue = context->valueOwner()->cppQmlTypes().objectByQualifiedName( 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);
QVERIFY(!rectangleValue->isWritable("border")); QVERIFY(!rectangleValue->isWritable(QLatin1String("border")));
QVERIFY(rectangleValue->hasProperty("border")); QVERIFY(rectangleValue->hasProperty(QLatin1String("border")));
QVERIFY(rectangleValue->isPointer("border")); QVERIFY(rectangleValue->isPointer(QLatin1String("border")));
QVERIFY(rectangleValue->isWritable("color")); QVERIFY(rectangleValue->isWritable(QLatin1String("color")));
QVERIFY(!rectangleValue->isPointer("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); QVERIFY(ovItem);
QCOMPARE(ovItem->className(), QString("Item")); QCOMPARE(ovItem->className(), QLatin1String("Item"));
QCOMPARE(context->imports(doc.data())->info("Item", context.data()).name(), QString("QtQuick")); 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); 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); QVERIFY(qmlItemValue);
QCOMPARE(qmlItemValue->defaultPropertyName(), QString("data")); QCOMPARE(qmlItemValue->defaultPropertyName(), QLatin1String("data"));
QCOMPARE(qmlItemValue->propertyType("state"), QString("string")); QCOMPARE(qmlItemValue->propertyType(QLatin1String("state")), QLatin1String("string"));
const ObjectValue *ovState = context->lookupType(doc.data(), QStringList() << "State"); const ObjectValue *ovState = context->lookupType(doc.data(), QStringList(QLatin1String("State")));
const CppComponentValue * qmlState2Value = value_cast<CppComponentValue>(ovState); const CppComponentValue *qmlState2Value = value_cast<CppComponentValue>(ovState);
QCOMPARE(qmlState2Value->className(), QString("State")); QCOMPARE(qmlState2Value->className(), QLatin1String("State"));
const ObjectValue *ovImage = context->lookupType(doc.data(), QStringList() << "Image"); const ObjectValue *ovImage = context->lookupType(doc.data(), QStringList(QLatin1String("Image")));
const CppComponentValue * qmlImageValue = value_cast<CppComponentValue>(ovImage); const CppComponentValue *qmlImageValue = value_cast<CppComponentValue>(ovImage);
QCOMPARE(qmlImageValue->className(), QString("Image")); QCOMPARE(qmlImageValue->className(), QLatin1String("Image"));
QCOMPARE(qmlImageValue->propertyType("source"), QString("QUrl")); 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