diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-11-08 14:37:35 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-11-11 10:33:09 +0000 |
commit | f78cc32299aa34069c64ae8f48163ac4eda560d5 (patch) | |
tree | 7cd611c471a7eaebe20536544cb68b6df533f8b5 /sources/pyside2/PySide2/QtSql | |
parent | 5db35b37ac2401697a6238f21979fa1e84f0ff77 (diff) |
Clean up pyside2_global.h
Make it possible to prepend or append something to the global module
header by providing a .pre/.post.h file. This removes the need to have
global includes and defines in pyside2_global.h and reduces module
dependencies.
Change-Id: I517c5765212813732b5694dcfcc86d2492e71a57
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/QtSql')
-rw-r--r-- | sources/pyside2/PySide2/QtSql/CMakeLists.txt | 3 | ||||
-rw-r--r-- | sources/pyside2/PySide2/QtSql/QtSql_global.pre.h.in | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/QtSql/CMakeLists.txt b/sources/pyside2/PySide2/QtSql/CMakeLists.txt index dd78c2388..0573ab5cd 100644 --- a/sources/pyside2/PySide2/QtSql/CMakeLists.txt +++ b/sources/pyside2/PySide2/QtSql/CMakeLists.txt @@ -20,6 +20,9 @@ ${QtSql_GEN_DIR}/qsqltablemodel_wrapper.cpp ${QtSql_GEN_DIR}/qtsql_module_wrapper.cpp ) +configure_file("${QtSql_SOURCE_DIR}/QtSql_global.pre.h.in" + "${QtSql_BINARY_DIR}/QtSql_global.pre.h" @ONLY) + set(QtSql_include_dirs ${QtSql_SOURCE_DIR} ${QtSql_BINARY_DIR} ${Qt5Core_INCLUDE_DIRS} diff --git a/sources/pyside2/PySide2/QtSql/QtSql_global.pre.h.in b/sources/pyside2/PySide2/QtSql/QtSql_global.pre.h.in new file mode 100644 index 000000000..0c20c1888 --- /dev/null +++ b/sources/pyside2/PySide2/QtSql/QtSql_global.pre.h.in @@ -0,0 +1,5 @@ +// QT_WIDGETS_LIB must be defined for QSqlRelationalDelegate to become visible. + +#if @Qt5Widgets_FOUND@ +# define QT_WIDGETS_LIB +#endif |