Commit 64839753 authored by Alexis Menard's avatar Alexis Menard
Browse files

QML WebKit component is now named QtWebKit

Reviewed-by:Christiaan Janssen
parent e8373b9d
......@@ -134,7 +134,7 @@ Internal::ObjectNodeInstance::Pointer NodeInstance::createInstance(const NodeMet
if (!metaInfo.isValid())
instance = Internal::DummyNodeInstance::create();
else if (metaInfo.isSubclassOf("org.webkit/WebView", 1, 0))
else if (metaInfo.isSubclassOf("QtWebKit/WebView", 1, 0))
instance = Internal::DummyNodeInstance::create();
else if (metaInfo.isSubclassOf("Qt/QWidget", 4, 7))
instance = Internal::DummyNodeInstance::create();
......
......@@ -130,7 +130,7 @@ void MetaInfoPrivate::loadPlugins(QDeclarativeEngine *engine)
QStringList pluginList;
pluginList += "import Qt 4.7";
pluginList += "import org.webkit 1.0";
pluginList += "import QtWebKit 1.0";
// load maybe useful plugins
pluginList += "import Qt.labs.folderlistmodel 1.0";
......
......@@ -111,7 +111,7 @@
</itemlibraryentry>
</node>
<node name="org.webkit/WebView" icon=":/fxplugin/images/webview-icon16.png">
<node name="QtWebKit/WebView" icon=":/fxplugin/images/webview-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="300"/>
<propertyDefaultValue name="height" type="int" defaultValue="300"/>
<itemlibraryentry name="Web View" category="Qt - Widgets" icon=":/fxplugin/images/webview-icon.png">
......
......@@ -260,7 +260,7 @@ int main(int argc, char *argv[])
code += "import Qt.labs.particles 4.7;\n";
code += "import Qt.labs.gestures 4.7;\n";
code += "import Qt.labs.folderlistmodel 4.7;\n";
code += "import org.webkit 1.0;\n";
code += "import QtWebKit 1.0;\n";
code += "Item {}";
QDeclarativeComponent c(engine);
c.setData(code, QUrl("xxx"));
......
......@@ -803,10 +803,10 @@ void TestCore::testRewriterImports()
QVERIFY(!import.hasVersion());
QVERIFY(!import.hasAlias());
// import org.webkit 1.0 as Web
// import QtWebKit 1.0 as Web
import = model->imports().at(2);
QVERIFY(import.isLibraryImport());
QCOMPARE(import.url(), QString("org.webkit"));
QCOMPARE(import.url(), QString("QtWebKit"));
QVERIFY(import.hasVersion());
QCOMPARE(import.version(), QString("1.0"));
QVERIFY(import.hasAlias());
......@@ -835,12 +835,12 @@ void TestCore::testRewriterChangeImports()
//
// Add / Remove an import in the model
//
Import webkitImport = Import::createLibraryImport("org.webkit", "1.0");
Import webkitImport = Import::createLibraryImport("QtWebKit", "1.0");
model->addImport(webkitImport);
const QLatin1String qmlWithImport("\n"
"import Qt 4.7\n"
"import org.webkit 1.0\n"
"import QtWebKit 1.0\n"
"\n"
"Rectangle {}\n");
QCOMPARE(textEdit.toPlainText(), qmlWithImport);
......@@ -856,12 +856,12 @@ void TestCore::testRewriterChangeImports()
//
// Add / Remove an import in the model (with alias)
//
webkitImport = Import::createLibraryImport("org.webkit", "1.0", "Web");
webkitImport = Import::createLibraryImport("QtWebKit", "1.0", "Web");
model->addImport(webkitImport);
const QLatin1String qmlWithAliasImport("\n"
"import Qt 4.7\n"
"import org.webkit 1.0 as Web\n"
"import QtWebKit 1.0 as Web\n"
"\n"
"Rectangle {}\n");
QCOMPARE(textEdit.toPlainText(), qmlWithAliasImport);
......@@ -880,12 +880,12 @@ void TestCore::testRewriterChangeImports()
textEdit.setPlainText(qmlWithImport);
QCOMPARE(model->imports().size(), 2);
QCOMPARE(model->imports().first(), Import::createLibraryImport("Qt", "4.7"));
QCOMPARE(model->imports().last(), Import::createLibraryImport("org.webkit", "1.0"));
QCOMPARE(model->imports().last(), Import::createLibraryImport("QtWebKit", "1.0"));
textEdit.setPlainText(qmlWithAliasImport);
QCOMPARE(model->imports().size(), 2);
QCOMPARE(model->imports().first(), Import::createLibraryImport("Qt", "4.7"));
QCOMPARE(model->imports().last(), Import::createLibraryImport("org.webkit", "1.0", "Web"));
QCOMPARE(model->imports().last(), Import::createLibraryImport("QtWebKit", "1.0", "Web"));
textEdit.setPlainText(qmlString);
QCOMPARE(model->imports().size(), 1);
......@@ -3709,7 +3709,7 @@ void TestCore::testMetaInfo()
QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item", 4, 7));
// test whether types from plugins are registered
QVERIFY(model->metaInfo().hasNodeMetaInfo("org.webkit/WebView", 1, 0));
QVERIFY(model->metaInfo().hasNodeMetaInfo("QtWebKit/WebView", 1, 0));
// test whether non-qml type is registered
QVERIFY(model->metaInfo().hasNodeMetaInfo("QGraphicsObject", 4, 7)); // Qt 4.7 namespace
......
import Qt 4.7
import "subitems"
import org.webkit 1.0 as Web
import QtWebKit 1.0 as Web
Rectangle {
}
import org.webkit 1.0
import QtWebKit 1.0
// Test loading of import libraries
WebView {
......
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