From 73091bec21adcf96c2d1e5406c00f992539a39ec Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sat, 7 Jul 2018 20:55:18 +0200 Subject: [PATCH] Qt4--: Remove any traces of WITH_KDE4, KDE4_FOUND, LEGACY_KDE_INTEGRATION --- CMakeLists.txt | 26 +---------- CMakeModules/FindTaglib.cmake | 2 - TomahawkUse.cmake.in | 1 - .../configstorage/telepathy/CMakeLists.txt | 13 ------ .../telepathy/KdeTelepathyConfigWidget.cpp | 46 ------------------- .../telepathy/KdeTelepathyConfigWidget.h | 36 --------------- src/tomahawk/CMakeLists.txt | 16 ------- 7 files changed, 1 insertion(+), 139 deletions(-) delete mode 100644 src/libtomahawk/accounts/configstorage/telepathy/KdeTelepathyConfigWidget.cpp delete mode 100644 src/libtomahawk/accounts/configstorage/telepathy/KdeTelepathyConfigWidget.h diff --git a/CMakeLists.txt b/CMakeLists.txt index bac1de659..4583af541 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,8 +98,6 @@ else() endif() option(WITH_CRASHREPORTER "Build with CrashReporter" ${CRASHREPORTER_ENABLED_BY_DEFAULT}) option(WITH_BINARY_ATTICA "Enable support for downloading binary resolvers automatically" ON) -option(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF) -option(WITH_KDE4 "Build with support for KDE specific stuff" ON) # build options for development purposes option(SANITIZE_ADDRESS "Enable Address Sanitizer for memory error detection" OFF) @@ -220,7 +218,6 @@ if( Qt5Core_DIR ) set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}") #FIXME: CrashReporter depends on deprecated QHttp - set(WITH_KDE4 OFF) endif() if( BUILD_GUI AND UNIX AND NOT APPLE ) @@ -343,23 +340,7 @@ add_subdirectory(${THIRDPARTY_DIR}/libportfwd) #### submodules end - -if (WITH_KDE4) - macro_optional_find_package(KDE4) - macro_optional_find_package(KDE4Installed) -endif(WITH_KDE4) -macro_log_feature(KDE4_FOUND "KDE4" "Provides support for configuring Telepathy Accounts from inside Tomahawk" "https://www.kde.org" FALSE "" "") - -IF( KDE4_FOUND ) - IF( CMAKE_C_FLAGS ) - # KDE4 adds and removes some compiler flags that we don't like - # (only for gcc not for clang e.g.) - STRING( REPLACE "-std=iso9899:1990" "" CLEAN_C_FLAGS ${CMAKE_C_FLAGS} ) - SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" ) - ENDIF() -ELSE() - SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} ) -ENDIF() +SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} ) #show dep log macro_display_feature_log() @@ -372,11 +353,6 @@ CONFIGURE_FILE( "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) -# KDE4 defines an uninstall target for us automatically (and at least with Qt4 Phonon does as well no matter if kdelibs was found) -# IF( NOT KDE4_FOUND ) -# ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") -# ENDIF() - IF( ( NOT APPLE ) AND ( NOT SANITIZE_ADDRESS )) # Make linking as strict on linux as it is on osx. Then we don't break linking on mac so often # diff --git a/CMakeModules/FindTaglib.cmake b/CMakeModules/FindTaglib.cmake index f54ff782d..d4ada2592 100644 --- a/CMakeModules/FindTaglib.cmake +++ b/CMakeModules/FindTaglib.cmake @@ -61,7 +61,6 @@ ELSE() tag.h PATH_SUFFIXES taglib PATHS - ${KDE4_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ) @@ -69,7 +68,6 @@ ELSE() WIN32_DEBUG_POSTFIX d NAMES tag PATHS - ${KDE4_LIB_DIR} ${LIB_INSTALL_DIR} ) diff --git a/TomahawkUse.cmake.in b/TomahawkUse.cmake.in index 93568839e..0fd9e4918 100644 --- a/TomahawkUse.cmake.in +++ b/TomahawkUse.cmake.in @@ -64,7 +64,6 @@ endmacro() set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}") #FIXME: CrashReporter depends on deprecated QHttp -set(WITH_KDE4 OFF) if(NOT TOMAHAWK_CMAKE_DIR) set(TOMAHAWK_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR}) diff --git a/src/libtomahawk/accounts/configstorage/telepathy/CMakeLists.txt b/src/libtomahawk/accounts/configstorage/telepathy/CMakeLists.txt index fb6967782..eba874ff7 100644 --- a/src/libtomahawk/accounts/configstorage/telepathy/CMakeLists.txt +++ b/src/libtomahawk/accounts/configstorage/telepathy/CMakeLists.txt @@ -11,16 +11,3 @@ tomahawk_add_plugin(telepathy ${TELEPATHY_QT_LIBRARIES} SHARED_LIB ) - -if( KDE4_FOUND ) - include_directories( ${KDE4_INCLUDES} ) - tomahawk_add_plugin(kde - TYPE configstorage_telepathy - EXPORT_MACRO CONFIGSTORAGETELEPATHYDLLEXPORT_PRO - SOURCES - KdeTelepathyConfigWidget.cpp - LINK_LIBRARIES - ${TOMAHAWK_BASE_TARGET_NAME}_configstorage_telepathy - ${KDE4_KCMUTILS_LIBS} - ) -endif() diff --git a/src/libtomahawk/accounts/configstorage/telepathy/KdeTelepathyConfigWidget.cpp b/src/libtomahawk/accounts/configstorage/telepathy/KdeTelepathyConfigWidget.cpp deleted file mode 100644 index a91683eca..000000000 --- a/src/libtomahawk/accounts/configstorage/telepathy/KdeTelepathyConfigWidget.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* === This file is part of Tomahawk Player - === - * - * Copyright 2013, Dominik Schmidt - * - * Tomahawk is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Tomahawk 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 General Public License - * along with Tomahawk. If not, see . - */ - -#include "KdeTelepathyConfigWidget.h" - -#include "utils/Logger.h" - -#include - -#include - -QWidget* -KdeTelepathyConfigWidget::configWidget() -{ - KCModuleProxy* proxy = new KCModuleProxy( "kcm_ktp_accounts" ); - - if ( !proxy->aboutData() ) - { - qWarning() << "Could not load kcm_ktp_accounts... "; - - delete proxy; - - return 0; - } - - return proxy; -} - -Q_EXPORT_PLUGIN2( TelepathyConfigStorageConfigWidgetPlugin, KdeTelepathyConfigWidget ) - - diff --git a/src/libtomahawk/accounts/configstorage/telepathy/KdeTelepathyConfigWidget.h b/src/libtomahawk/accounts/configstorage/telepathy/KdeTelepathyConfigWidget.h deleted file mode 100644 index 61acdbbf2..000000000 --- a/src/libtomahawk/accounts/configstorage/telepathy/KdeTelepathyConfigWidget.h +++ /dev/null @@ -1,36 +0,0 @@ -/* === This file is part of Tomahawk Player - === - * - * Copyright 2013, Dominik Schmidt - * - * Tomahawk is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Tomahawk 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 General Public License - * along with Tomahawk. If not, see . - */ - -#ifndef KDETELEPATHYCONFIGWIDGET_H -#define KDETELEPATHYCONFIGWIDGET_H - -#include "TelepathyConfigStorageConfigWidgetPlugin.h" - -#include "TelepathyConfigStorageConfigWidgetDllMacro.h" - -class CONFIGSTORAGETELEPATHYDLLEXPORT KdeTelepathyConfigWidget : public TelepathyConfigStorageConfigWidgetPlugin -{ - Q_OBJECT - Q_INTERFACES( TelepathyConfigStorageConfigWidgetPlugin ) - -public: - virtual QWidget* configWidget(); -}; - - -#endif // KDETELEPATHYCONFIGWIDGET_H diff --git a/src/tomahawk/CMakeLists.txt b/src/tomahawk/CMakeLists.txt index 2659e85fe..f112b859e 100644 --- a/src/tomahawk/CMakeLists.txt +++ b/src/tomahawk/CMakeLists.txt @@ -214,20 +214,4 @@ ENDIF( APPLE ) INSTALL( TARGETS ${TOMAHAWK_APPLICATION_TARGET} BUNDLE DESTINATION . RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) -IF( UNIX AND NOT APPLE AND KDE4_INSTALLED AND LEGACY_KDE_INTEGRATION ) #install protocol file - FILE( READ ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.protocol protocol ) - STRING( REPLACE "/path/to/binary" # match this - "${CMAKE_INSTALL_FULL_BINDIR}/tomahawk" # this is linux (kde) so pretty safe I think - edited_protocol # save in this variable - "${protocol}" # from the contents of this var - ) - FILE( WRITE ${CMAKE_BINARY_DIR}/tomahawk.protocol "${edited_protocol}" ) - IF( ${SERVICES_INSTALL_DIR} ) - SET( PROTOCOL_INSTALL_DIR ${SERVICES_INSTALL_DIR} ) - ELSE() - SET( PROTOCOL_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/kde4/services" ) - ENDIF() - INSTALL( FILES ${CMAKE_BINARY_DIR}/tomahawk.protocol DESTINATION ${PROTOCOL_INSTALL_DIR} ) -ENDIF() - #INCLUDE( "CPack.txt" )