diff --git a/CMakeLists.txt b/CMakeLists.txt index 0587349..886f9f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,72 +1,79 @@ cmake_minimum_required(VERSION 2.8.12) project(controlflowgraph) find_package(ECM 1.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ) include(KDECompilerSettings NO_POLICY_SCOPE) include(KDEInstallDirs) include(KDECMakeSettings) include(FeatureSummary) -set(QT_MIN_VERSION "5.4.0") +set(QT_MIN_VERSION "5.5.0") find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets) set(KF5_DEP_VERSION "5.18.0") find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS I18n TextEditor ThreadWeaver ConfigWidgets ItemModels ) find_package(KDevPlatform 5.1.40 ) set_package_properties(KDevPlatform PROPERTIES TYPE REQUIRED ) find_package(GraphViz) set_package_properties(GraphViz PROPERTIES TYPE REQUIRED ) +add_definitions( + -DQT_DEPRECATED_WARNINGS + -DQT_DISABLE_DEPRECATED_BEFORE=0x050500 + -DQT_NO_SIGNALS_SLOTS_KEYWORDS + -DQT_STRICT_ITERATORS +) + include_directories( ${GraphViz_INCLUDE_DIRECTORIES} ) set(kdevcontrolflowgraphview_PART_SRCS kdevcontrolflowgraphviewplugin.cpp controlflowgraphview.cpp duchaincontrolflow.cpp dotcontrolflowgraph.cpp duchaincontrolflowjob.cpp duchaincontrolflowinternaljob.cpp controlflowgraphnavigationcontext.cpp controlflowgraphnavigationwidget.cpp controlflowgraphusescollector.cpp controlflowgraphfiledialog.cpp ) set(kdevcontrolflowgraphview_PART_UI controlflowgraphview.ui controlflowgraphexportconfiguration.ui ) ki18n_wrap_ui(kdevcontrolflowgraphview_PART_SRCS ${kdevcontrolflowgraphview_PART_UI}) kdevplatform_add_plugin(kdevcontrolflowgraphview JSON kdevcontrolflowgraphview.json SOURCES ${kdevcontrolflowgraphview_PART_SRCS}) target_link_libraries(kdevcontrolflowgraphview KF5::Parts KF5::TextEditor KF5::ThreadWeaver KDev::Interfaces KDev::Language KDev::Project KDev::Util gvc cgraph cdt) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/duchaincontrolflowinternaljob.h b/duchaincontrolflowinternaljob.h index fcef775..749b985 100644 --- a/duchaincontrolflowinternaljob.h +++ b/duchaincontrolflowinternaljob.h @@ -1,54 +1,54 @@ /*************************************************************************** * Copyright 2009 Sandro Andrade * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef DUCHAINCONTROLFLOWINTERNALJOB_H #define DUCHAINCONTROLFLOWINTERNALJOB_H #include #include class DUChainControlFlow; class KDevControlFlowGraphViewPlugin; class DUChainControlFlowInternalJob : public QObject, public ThreadWeaver::Job { Q_OBJECT public: DUChainControlFlowInternalJob(DUChainControlFlow *duchainControlFlow, KDevControlFlowGraphViewPlugin *plugin); ~DUChainControlFlowInternalJob() override; enum ControlFlowJobType { ControlFlowJobInteractive, ControlFlowJobBatchForFunction, ControlFlowJobBatchForClass, ControlFlowJobBatchForProject }; void setControlFlowJobType (ControlFlowJobType controlFlowJobType); void requestAbort() override; -signals: +Q_SIGNALS: void done(); protected: void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) override; private: DUChainControlFlow *m_duchainControlFlow; KDevControlFlowGraphViewPlugin *m_plugin; ControlFlowJobType m_controlFlowJobType; }; #endif