summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-07-03 20:53:38 +0200
committerZeno Albisser <zeno.albisser@digia.com>2013-07-16 08:45:11 +0200
commite14f32db8374bec4dab395ecab3dced873283925 (patch)
tree55bbdc8536d8140bc5ada35f9ec325373e374162 /build
parent9407e2205c6e438efc222efb6694472dd17a865b (diff)
Add support for file and data url scheme.
Local file and data url support can simply be added by registering the appropriate ProtocolHandlers. Displaying the contents of a directory is slightly more complex. This requires access to some html resource files that can be used to list the contents in rows. For Chromium such resource files are usually contained in a .pak file which is shipped with the binary. Since deploying additional files is very complicated for Qt, we want to use the Qt Resource System to bundle .pak files. Therefore this patch adds handling of rcc content generated from a .qrc file to our gyp_generator.prf. Further it replaces the regular ResourceBundle implementation with a Qt specific one. And it also implements a DataPackQt class that allows using DataPack instances with data from a QByteArray and therefore from the Qt Resource System. Change-Id: Ic41e34fbd9aec8596cbc85666a762ecdaa604edc Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'build')
-rw-r--r--build/qmake/mkspecs/features/gyp_generator.prf7
-rw-r--r--build/qtwebengine_extras.gypi3
2 files changed, 10 insertions, 0 deletions
diff --git a/build/qmake/mkspecs/features/gyp_generator.prf b/build/qmake/mkspecs/features/gyp_generator.prf
index 9df87c4ec..02de2ecc7 100644
--- a/build/qmake/mkspecs/features/gyp_generator.prf
+++ b/build/qmake/mkspecs/features/gyp_generator.prf
@@ -104,6 +104,13 @@ GYP_CONTENTS += " 'sources': ["
for (sourcefile, SOURCES): GYP_CONTENTS += " '$$sourcefile',"
for (headerfile, HEADERS): GYP_CONTENTS += " '$$headerfile',"
+# Add Sources generated by rcc from qrc files.
+for (resourcefile, RESOURCES) {
+ RCC_CPP = $$replace(resourcefile, .qrc, .cpp)
+ RCC_CPP = $$join(RCC_CPP, "qrc_", qrc_)
+ GYP_CONTENTS += " '$$RCC_DIR/$$RCC_CPP',"
+}
+
# Add moc output files to compile that aren't included at the end of any other source
MOC_OUT_PATH = $$absolute_path($$MOC_DIR, $$OUT_PWD)$${QMAKE_DIR_SEP}
for (mocable_header, MOCABLE_HEADERS) {
diff --git a/build/qtwebengine_extras.gypi b/build/qtwebengine_extras.gypi
index d37c1bd65..954677744 100644
--- a/build/qtwebengine_extras.gypi
+++ b/build/qtwebengine_extras.gypi
@@ -2,6 +2,9 @@
'target_defaults': {
# patterns used to exclude chromium files from the build when we have a drop-in replacement
'sources/': [
+ ['exclude', 'ui/base/resource/resource_bundle_gtk.cc$'],
+ ['exclude', 'ui/base/resource/resource_bundle_mac.mm$'],
+ ['exclude', 'ui/base/resource/resource_bundle_win.cc$'],
['exclude', 'browser/web_contents/web_contents_view_gtk\\.(cc|h)$'],
['exclude', 'browser/web_contents/web_contents_view_mac\\.(mm|h)$'],
['exclude', 'browser/web_contents/web_contents_view_win\\.(cc|h)$'],