diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py index 54e2c732a..595269e59 100644 --- a/mesonbuild/modules/qt.py +++ b/mesonbuild/modules/qt.py @@ -83,7 +83,7 @@ class QtBaseModule: mlog.warning("malformed rcc file: ", os.path.join(state.subdir, fname)) break else: - result.append(os.path.join(state.subdir, relative_part, child.text)) + result.append(os.path.join(relative_part, child.text)) return result except Exception: return [] diff --git a/test cases/frameworks/4 qt/meson.build b/test cases/frameworks/4 qt/meson.build index 7c33268a8..b0e848d26 100644 --- a/test cases/frameworks/4 qt/meson.build +++ b/test cases/frameworks/4 qt/meson.build @@ -92,5 +92,8 @@ foreach qt : ['qt4', 'qt5'] plugin = library(qt + 'plugin', 'plugin/plugin.cpp', pluginpreprocess, include_directories : plugin_includes, dependencies : qtcore) + if qt == 'qt5' + subdir('subfolder') + endif endif endforeach diff --git a/test cases/frameworks/4 qt/subfolder/main.cpp b/test cases/frameworks/4 qt/subfolder/main.cpp new file mode 100644 index 000000000..61cc9d49b --- /dev/null +++ b/test cases/frameworks/4 qt/subfolder/main.cpp @@ -0,0 +1,10 @@ +#include + +int main(int argc, char **argv) { + Q_INIT_RESOURCE(stuff3); + QImage qi(":/thing.png"); + if(qi.width() != 640) { + return 1; + } + return 0; +} \ No newline at end of file diff --git a/test cases/frameworks/4 qt/subfolder/meson.build b/test cases/frameworks/4 qt/subfolder/meson.build new file mode 100644 index 000000000..d3ff60959 --- /dev/null +++ b/test cases/frameworks/4 qt/subfolder/meson.build @@ -0,0 +1,4 @@ + +qresources = qtmodule.preprocess(qresources : 'resources/stuff3.qrc') + +app = executable('subfolder', 'main.cpp', qresources, dependencies : qtdep) diff --git a/test cases/frameworks/4 qt/subfolder/resources/stuff3.qrc b/test cases/frameworks/4 qt/subfolder/resources/stuff3.qrc new file mode 100644 index 000000000..fdfb58eab --- /dev/null +++ b/test cases/frameworks/4 qt/subfolder/resources/stuff3.qrc @@ -0,0 +1,6 @@ + + + + thing.png + + diff --git a/test cases/frameworks/4 qt/subfolder/resources/thing.png b/test cases/frameworks/4 qt/subfolder/resources/thing.png new file mode 100644 index 000000000..4b001bd5c Binary files /dev/null and b/test cases/frameworks/4 qt/subfolder/resources/thing.png differ