From a4c9bde033df86354bfdae1de0554550cf867035 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20R=C3=B8dal?= Date: Wed, 16 May 2012 18:45:34 +0200 Subject: [PATCH] Fixed qml-compositor and made it properly installable without a qrc. Change-Id: I40936865453392dc90b03f67220f70480c0eae56 Reviewed-by: Laszlo Agocs --- .../qml-compositor/{qml/QmlCompositor => }/ContrastEffect.qml | 6 +++--- .../qml-compositor/{qml/QmlCompositor => }/WindowChrome.qml | 0 .../{qml/QmlCompositor => }/WindowContainer.qml | 0 examples/qml-compositor/{qml/QmlCompositor => }/compositor.js | 0 examples/qml-compositor/main.cpp | 2 +- examples/qml-compositor/{qml/QmlCompositor => }/main.qml | 2 +- examples/qml-compositor/qml-compositor.pro | 7 ++++--- examples/qml-compositor/qml-compositor.qrc | 11 ----------- 8 files changed, 9 insertions(+), 19 deletions(-) rename examples/qml-compositor/{qml/QmlCompositor => }/ContrastEffect.qml (94%) rename examples/qml-compositor/{qml/QmlCompositor => }/WindowChrome.qml (100%) rename examples/qml-compositor/{qml/QmlCompositor => }/WindowContainer.qml (100%) rename examples/qml-compositor/{qml/QmlCompositor => }/compositor.js (100%) rename examples/qml-compositor/{qml/QmlCompositor => }/main.qml (98%) delete mode 100644 examples/qml-compositor/qml-compositor.qrc diff --git a/examples/qml-compositor/qml/QmlCompositor/ContrastEffect.qml b/examples/qml-compositor/ContrastEffect.qml similarity index 94% rename from examples/qml-compositor/qml/QmlCompositor/ContrastEffect.qml rename to examples/qml-compositor/ContrastEffect.qml index 332c968..0a9ad67 100644 --- a/examples/qml-compositor/qml/QmlCompositor/ContrastEffect.qml +++ b/examples/qml-compositor/ContrastEffect.qml @@ -48,15 +48,15 @@ ShaderEffect { onSourceChanged: { if (source != null) { source.setPaintEnabled(false); - vertexShader = source.isYInverted ? vShaderInvertedY : vShader; + vertexShader = source.yInverted ? vShaderInvertedY : vShader; } } Connections { target: source; onYInvertedChanged: { - print("onY " + source.isYInverted); - vertexShader = source.isYInverted ? vShaderInvertedY : vShader; + print("onY " + source.yInverted); + vertexShader = source.yInverted ? vShaderInvertedY : vShader; } } diff --git a/examples/qml-compositor/qml/QmlCompositor/WindowChrome.qml b/examples/qml-compositor/WindowChrome.qml similarity index 100% rename from examples/qml-compositor/qml/QmlCompositor/WindowChrome.qml rename to examples/qml-compositor/WindowChrome.qml diff --git a/examples/qml-compositor/qml/QmlCompositor/WindowContainer.qml b/examples/qml-compositor/WindowContainer.qml similarity index 100% rename from examples/qml-compositor/qml/QmlCompositor/WindowContainer.qml rename to examples/qml-compositor/WindowContainer.qml diff --git a/examples/qml-compositor/qml/QmlCompositor/compositor.js b/examples/qml-compositor/compositor.js similarity index 100% rename from examples/qml-compositor/qml/QmlCompositor/compositor.js rename to examples/qml-compositor/compositor.js diff --git a/examples/qml-compositor/main.cpp b/examples/qml-compositor/main.cpp index 93175a4..9571c80 100644 --- a/examples/qml-compositor/main.cpp +++ b/examples/qml-compositor/main.cpp @@ -60,7 +60,7 @@ public: : WaylandCompositor(this) { enableSubSurfaceExtension(); - setSource(QUrl(QLatin1String("qrc:qml/QmlCompositor/main.qml"))); + setSource(QUrl("main.qml")); setResizeMode(QQuickView::SizeRootObjectToView); winId(); diff --git a/examples/qml-compositor/qml/QmlCompositor/main.qml b/examples/qml-compositor/main.qml similarity index 98% rename from examples/qml-compositor/qml/QmlCompositor/main.qml rename to examples/qml-compositor/main.qml index 65f6109..bd859f0 100644 --- a/examples/qml-compositor/qml/QmlCompositor/main.qml +++ b/examples/qml-compositor/main.qml @@ -51,7 +51,7 @@ Item { id: background anchors.fill: parent fillMode: Image.Tile - source: "../../background.jpg" + source: "background.jpg" smooth: true } diff --git a/examples/qml-compositor/qml-compositor.pro b/examples/qml-compositor/qml-compositor.pro index 002cce1..866f54c 100644 --- a/examples/qml-compositor/qml-compositor.pro +++ b/examples/qml-compositor/qml-compositor.pro @@ -5,7 +5,7 @@ CONFIG += use_pkgconfig LIBS += -L ../../lib -QT += quick qml v8 +QT += quick qml v8 QT += quick-private QT += compositor @@ -16,9 +16,10 @@ QT += compositor #include (../../src/compositor/compositor.pri) SOURCES += main.cpp -RESOURCES = qml-compositor.qrc + +OTHER_FILES = ContrastEffect.qml main.qml WindowChrome.qml WindowContainer.qml background.jpg compositor.js target.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qml-compositor -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qml-compositor.pro +sources.files = $$OTHER_FILES $$SOURCES $$HEADERS $$RESOURCES $$FORMS qml-compositor.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qml-compositor INSTALLS += target sources diff --git a/examples/qml-compositor/qml-compositor.qrc b/examples/qml-compositor/qml-compositor.qrc deleted file mode 100644 index 0a3898f..0000000 --- a/examples/qml-compositor/qml-compositor.qrc +++ /dev/null @@ -1,11 +0,0 @@ - - - background.jpg - qml/QmlCompositor/main.qml - qml/QmlCompositor/compositor.js - qml/QmlCompositor/ContrastEffect.qml - qml/QmlCompositor/WindowChrome.qml - qml/QmlCompositor/WindowContainer.qml - - - -- 2.7.4