From f4f50db44155a4e050c58a74849ba8859e5daf51 Mon Sep 17 00:00:00 2001 From: Charles Brunet Date: Wed, 17 May 2023 16:29:39 -0400 Subject: qt: add preserve_paths keyword to functions This allow to generate ui and moc under subdirectories, as this is allowed with generic generators. --- test cases/frameworks/4 qt/mainWindow.h | 2 +- test cases/frameworks/4 qt/mainWindow.ui | 54 ----------------------------- test cases/frameworks/4 qt/meson.build | 10 ++++-- test cases/frameworks/4 qt/ui/mainWindow.ui | 54 +++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 58 deletions(-) delete mode 100644 test cases/frameworks/4 qt/mainWindow.ui create mode 100644 test cases/frameworks/4 qt/ui/mainWindow.ui (limited to 'test cases') diff --git a/test cases/frameworks/4 qt/mainWindow.h b/test cases/frameworks/4 qt/mainWindow.h index 7f6d90601..3be51a00f 100644 --- a/test cases/frameworks/4 qt/mainWindow.h +++ b/test cases/frameworks/4 qt/mainWindow.h @@ -3,7 +3,7 @@ #include #include -#include "ui_mainWindow.h" +#include "ui/ui_mainWindow.h" class NotificationModel; diff --git a/test cases/frameworks/4 qt/mainWindow.ui b/test cases/frameworks/4 qt/mainWindow.ui deleted file mode 100644 index c01b8bf9e..000000000 --- a/test cases/frameworks/4 qt/mainWindow.ui +++ /dev/null @@ -1,54 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 260 - 313 - - - - MainWindow - - - - - - 10 - 10 - 241 - 91 - - - - I am a button - - - - - - 10 - 112 - 241 - 91 - - - - - - - 10 - 212 - 241 - 91 - - - - - - - - diff --git a/test cases/frameworks/4 qt/meson.build b/test cases/frameworks/4 qt/meson.build index f8ba1751f..759e6cc17 100644 --- a/test cases/frameworks/4 qt/meson.build +++ b/test cases/frameworks/4 qt/meson.build @@ -61,11 +61,15 @@ foreach qt : ['qt4', 'qt5', 'qt6'] method : get_option('method') ) # XML files that need to be compiled with the uic tol. - prep += qtmodule.compile_ui(sources : 'mainWindow.ui', method: get_option('method')) + prep += qtmodule.compile_ui( + sources : 'ui/mainWindow.ui', + method: get_option('method'), + preserve_paths: true) qtmodule.preprocess( - ui_files : 'mainWindow.ui', - method: get_option('method')) + ui_files : 'ui/mainWindow.ui', + method: get_option('method'), + preserve_paths: true) # Resource file(s) for rcc compiler extra_cpp_args = [] diff --git a/test cases/frameworks/4 qt/ui/mainWindow.ui b/test cases/frameworks/4 qt/ui/mainWindow.ui new file mode 100644 index 000000000..c01b8bf9e --- /dev/null +++ b/test cases/frameworks/4 qt/ui/mainWindow.ui @@ -0,0 +1,54 @@ + + + MainWindow + + + + 0 + 0 + 260 + 313 + + + + MainWindow + + + + + + 10 + 10 + 241 + 91 + + + + I am a button + + + + + + 10 + 112 + 241 + 91 + + + + + + + 10 + 212 + 241 + 91 + + + + + + + + -- cgit v1.2.3