From e03fe19320acf41e5d6f285bbb34e2728ebc3ac8 Mon Sep 17 00:00:00 2001
From: Simon Hausmann <simon.hausmann@qt.io>
Date: Thu, 23 Aug 2018 09:54:54 +0200
Subject: [PATCH] Clean up resource handling in tweetsearch examples

Use the modern RESOURCES syntax in the .pro file to replace the XML
file on disk.

Change-Id: I3ea61d8eddb7e72cc49e8466ce23d0b08033d1bc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
---
 examples/demos/tweetsearch/tweetsearch.pro | 21 ++++++++++++++++++++-
 examples/demos/tweetsearch/tweetsearch.qrc | 19 -------------------
 2 files changed, 20 insertions(+), 20 deletions(-)
 delete mode 100644 examples/demos/tweetsearch/tweetsearch.qrc

diff --git a/examples/demos/tweetsearch/tweetsearch.pro b/examples/demos/tweetsearch/tweetsearch.pro
index bc4a09e1..3995a15f 100644
--- a/examples/demos/tweetsearch/tweetsearch.pro
+++ b/examples/demos/tweetsearch/tweetsearch.pro
@@ -2,7 +2,26 @@ TEMPLATE = app
 
 QT += quick qml
 SOURCES += main.cpp
-RESOURCES += tweetsearch.qrc
+
+content.prefix = /demos/tweetsearch
+content.files = \
+        tweetsearch.qml \
+        content/FlipBar.qml \
+        content/LineInput.qml \
+        content/ListFooter.qml \
+        content/ListHeader.qml \
+        content/SearchDelegate.qml \
+        content/TweetDelegate.qml \
+        content/tweetsearch.mjs \
+        content/TweetsModel.qml \
+        content/resources/anonymous.png \
+        content/resources/bird-anim-sprites.png \
+        content/resources/icon-clear.png \
+        content/resources/icon-loading.png \
+        content/resources/icon-refresh.png \
+        content/resources/icon-search.png
+
+RESOURCES += content
 
 OTHER_FILES = tweetsearch.qml \
               content/*.qml \
diff --git a/examples/demos/tweetsearch/tweetsearch.qrc b/examples/demos/tweetsearch/tweetsearch.qrc
deleted file mode 100644
index 253be77a..00000000
--- a/examples/demos/tweetsearch/tweetsearch.qrc
+++ /dev/null
@@ -1,19 +0,0 @@
-<RCC>
-    <qresource prefix="/demos/tweetsearch">
-        <file>tweetsearch.qml</file>
-        <file>content/FlipBar.qml</file>
-        <file>content/LineInput.qml</file>
-        <file>content/ListFooter.qml</file>
-        <file>content/ListHeader.qml</file>
-        <file>content/SearchDelegate.qml</file>
-        <file>content/TweetDelegate.qml</file>
-        <file>content/tweetsearch.mjs</file>
-        <file>content/TweetsModel.qml</file>
-        <file>content/resources/anonymous.png</file>
-        <file>content/resources/bird-anim-sprites.png</file>
-        <file>content/resources/icon-clear.png</file>
-        <file>content/resources/icon-loading.png</file>
-        <file>content/resources/icon-refresh.png</file>
-        <file>content/resources/icon-search.png</file>
-    </qresource>
-</RCC>
-- 
GitLab