diff --git a/CMakeLists.txt b/CMakeLists.txt index dfbbc098281e399ced334768848a41fa759f1b76..07f00045dcb7dccf0ed923c3fa269eb07e618218 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,7 @@ find_package(Qt${QT_MAJOR_VERSION}XmlPatterns ${QT_REQUIRED_VERSION}) ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KIG VERSION_HEADER kig_version.h) -add_definitions (-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) +add_definitions (-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_NO_KEYWORDS) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) diff --git a/cmake/modules/FindBoostPython.cmake b/cmake/modules/FindBoostPython.cmake index 4881b08b9675fd5f820d1688d62ae6341a509313..5219639832fc2ed9651e6c5a30947375cc11850b 100644 --- a/cmake/modules/FindBoostPython.cmake +++ b/cmake/modules/FindBoostPython.cmake @@ -23,6 +23,7 @@ include(FindPackageHandleStandardArgs) macro(BoostPython_TRY_COMPILE varname) check_cxx_source_compiles(" #include +#include const char* greet() { return \"Hello world!\"; } BOOST_PYTHON_MODULE(hello) { boost::python::def(\"greet\", greet); } int main() { return 0; } @@ -39,10 +40,6 @@ if(NOT Boost_PYTHON3_FOUND) endif(NOT Boost_PYTHON3_FOUND) cmake_push_check_state() -set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${Boost_INCLUDE_DIRS}) -set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${Boost_PYTHON3_LIBRARY}) - -check_include_file_cxx(boost/shared_ptr.hpp HAVE_BOOST_SHARED_PTR_HPP) # This variable is not checked/used when user provide both # BoostPython_INCLUDE_DIRS and BoostPython_LIBRARIES, by design. @@ -52,15 +49,15 @@ set(BoostPython_COMPILES) # If shared_ptr.hpp or Python library is not available, then there is # no point to do anything. -if(HAVE_BOOST_SHARED_PTR_HPP AND Boost_PYTHON3_FOUND) +if(Boost_PYTHON3_FOUND) if(NOT BoostPython_INCLUDE_DIRS OR NOT BoostPython_LIBRARIES) # First try: check if CMake Python is suitable. set(Python_ADDITIONAL_VERSIONS "3.9;3.8;3.7;3.6;3.5") find_package(PythonLibs 3 QUIET) if(PYTHONLIBS_FOUND) cmake_push_check_state() - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${PYTHON_INCLUDE_DIRS}) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${PYTHON_LIBRARIES}) + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${PYTHON_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${PYTHON_LIBRARIES} ${Boost_PYTHON3_LIBRARY}) BoostPython_TRY_COMPILE(BoostPython_FromCMake) cmake_pop_check_state() @@ -104,7 +101,7 @@ if(HAVE_BOOST_SHARED_PTR_HPP AND Boost_PYTHON3_FOUND) endforeach(_pyver ${PYTHON_VERSIONS}) endif(PKG_CONFIG_FOUND) endif(NOT BoostPython_INCLUDE_DIRS OR NOT BoostPython_LIBRARIES ) -endif(HAVE_BOOST_SHARED_PTR_HPP AND Boost_PYTHON3_FOUND) +endif(Boost_PYTHON3_FOUND) cmake_pop_check_state() diff --git a/scripting/newscriptwizard.h b/scripting/newscriptwizard.h index 2b888f387ad9d99d9accba55a2d87f7963985243..86a7e11416145e077a7d5b6661a4b55eb2b5ab70 100644 --- a/scripting/newscriptwizard.h +++ b/scripting/newscriptwizard.h @@ -34,11 +34,11 @@ public: void setType(ScriptType::Type type); -public slots: +public Q_SLOTS: void accept() override; void reject() override; -protected slots: +protected Q_SLOTS: void slotHelpClicked(); void currentIdChanged(int id); diff --git a/scripting/python_type.cc b/scripting/python_type.cc index 4f7c0af5e96ac260ffd3cf585996437764aa831b..0616b7b24649c51c69c0657455cb4b5252e60b37 100644 --- a/scripting/python_type.cc +++ b/scripting/python_type.cc @@ -40,7 +40,7 @@ PythonCompiledScriptImp::PythonCompiledScriptImp(const CompiledPythonScript &s) const ObjectImpType *PythonCompiledScriptImp::stype() { - static const ObjectImpType t(BogusImp::stype(), "python-compiled-script-imp", 0, 0, 0, 0, 0, 0, 0, 0, 0); + static const ObjectImpType t(BogusImp::stype(), "python-compiled-script-imp", {}, 0, 0, {}, {}, {}, {}, {}, {}); return &t; }