From 4f6ae2f1ca26724e536f307e25d7dbf1c6be1629 2019-09-09 17:04:35 From: Alexis Jeandet Date: 2019-09-09 17:04:35 Subject: [PATCH] Added cpp_utils as subproject and removed few warnings Signed-off-by: Alexis Jeandet --- diff --git a/app/PySide2-bindings/meson.build b/app/PySide2-bindings/meson.build index bfec178..25ff924 100644 --- a/app/PySide2-bindings/meson.build +++ b/app/PySide2-bindings/meson.build @@ -19,6 +19,7 @@ sciqlop_bindings_incs = shiboken2_build_flags + [ '-I'+meson.current_source_dir()+'/../../gui/include', '-I'+meson.current_source_dir()+'/../../core/include', '-I'+meson.current_source_dir()+'/../../subprojects/TimeSeries/include', + '-I'+meson.current_source_dir()+'/../../subprojects/cpp_utils/include', '-I'+python3.get_path('include'), '-I'+qt_headers_path ] @@ -35,7 +36,7 @@ subdir('SciQLopBindings') shiboken_dep = declare_dependency(compile_args: shiboken2_build_flags, link_args: shiboken2_link_flags) sciqlop_bindings = python3.extension_module('SciQLopBindings',sciqlop_bindings_src,shiboken2_generator_out, - dependencies : [sciqlop_app_dep, python3.dependency(), shiboken_dep], + dependencies : [sciqlop_app_dep, python3.dependency(), shiboken_dep, cpp_utils_dep], ) diff --git a/app/PySide2-bindings/numpy_wrappers.h b/app/PySide2-bindings/numpy_wrappers.h index 64cbfe7..863228a 100644 --- a/app/PySide2-bindings/numpy_wrappers.h +++ b/app/PySide2-bindings/numpy_wrappers.h @@ -31,10 +31,14 @@ extern "C" #include #include +#include inline int init_numpy() { + DISABLE_WARNING_PUSH + DISABLE_WARNING_CONVERSION_NULL import_array(); // PyError if not successful + DISABLE_WARNING_POP return 0; } const static int numpy_initialized = init_numpy(); diff --git a/gui/include/SqpApplication.h b/gui/include/SqpApplication.h index cc2c417..d0e7795 100644 --- a/gui/include/SqpApplication.h +++ b/gui/include/SqpApplication.h @@ -40,8 +40,6 @@ public: int styleHint(StyleHint hint, const QStyleOption* option = nullptr, const QWidget* widget = nullptr, QStyleHintReturn* returnData = nullptr) const override { - if (widget) - auto cname = widget->metaObject()->className(); if (hint == QStyle::SH_ToolButton_PopupDelay && widget /*&& widget->inherits(QWidgetAction::staticMetaObject.className())*/) { diff --git a/gui/tests/catalogue/browser/main.cpp b/gui/tests/catalogue/browser/main.cpp index bad4f37..c4dd139 100644 --- a/gui/tests/catalogue/browser/main.cpp +++ b/gui/tests/catalogue/browser/main.cpp @@ -25,6 +25,7 @@ auto build_CatalogueBrowser_test() auto catalogue = sqpApp->catalogueController().add("new catalogue2", "default"); for (auto _ : std::array()) { + (void)_; static int i = 0; auto event = CatalogueController::make_event_ptr(); event->name = std::string("Event ") + std::to_string(i++); diff --git a/meson.build b/meson.build index fb61300..3e774cb 100644 --- a/meson.build +++ b/meson.build @@ -12,6 +12,8 @@ qt5printsupport = dependency('qt5', modules : 'PrintSupport') qt5Concurrent = dependency('qt5', modules : 'Concurrent') qt5test = dependency('qt5', modules : 'Test') +cpp_utils_dep = dependency('cpp_utils', fallback:['cpp_utils','cpp_utils_dep']) + moc = find_program('moc-qt5','moc') rcc = find_program('rcc-qt5','rcc')