diff --git a/src/ioslaves/trash/CMakeLists.txt b/src/ioslaves/trash/CMakeLists.txt index c09217e7..549c4baa 100644 --- a/src/ioslaves/trash/CMakeLists.txt +++ b/src/ioslaves/trash/CMakeLists.txt @@ -1,87 +1,87 @@ # find_package(Strigi) # set_package_properties(Strigi PROPERTIES DESCRIPTION "Desktop indexing and search support" # URL "http://strigi.sourceforge.net" # TYPE ${STRIGI_TYPE} # ) # if (WIN32) # set (STRIGI_TYPE "OPTIONAL") # else () # set (STRIGI_TYPE "REQUIRED") # endif () if(BUILD_TESTING) if(WIN32) message(AUTHOR_WARNING "kio_trash unit tests are broken on Windows, disabling them") else() add_subdirectory(tests) endif() endif() ########### next target ############### +ecm_qt_declare_logging_category(kio_trash_PART_DEBUG_SRCS HEADER kiotrashdebug.h IDENTIFIER KIO_TRASH CATEGORY_NAME kf5.kio.trash) if(WIN32) - set(kio_trash_PART_SRCS kio_trash_win.cpp kiotrashdebug.cpp) + set(kio_trash_PART_SRCS kio_trash_win.cpp ${kio_trash_PART_DEBUG_SRCS}) else() # Files that are shared with the KCM. Unix specific. set (trashcommon_unix_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/trashimpl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/discspaceutil.cpp ${CMAKE_CURRENT_SOURCE_DIR}/trashsizecache.cpp ${CMAKE_CURRENT_SOURCE_DIR}/kinterprocesslock.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/kiotrashdebug.cpp ) - set(kio_trash_PART_SRCS kio_trash.cpp ${trashcommon_unix_SRCS}) + set(kio_trash_PART_SRCS kio_trash.cpp ${trashcommon_unix_SRCS} ${kio_trash_PART_DEBUG_SRCS}) endif() add_library(kio_trash MODULE ${kio_trash_PART_SRCS}) target_link_libraries(kio_trash KF5::Solid KF5::KIOCore Qt5::DBus Qt5::Network KF5::I18n KF5::ConfigCore KF5::ConfigGui ) if(APPLE) target_link_libraries(kio_trash "-framework DiskArbitration -framework CoreFoundation") endif(APPLE) set_target_properties(kio_trash PROPERTIES OUTPUT_NAME "trash") set_target_properties(kio_trash PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/kf5/kio") install(TARGETS kio_trash DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kio ) set(ktrash_SRCS ktrash.cpp ) add_executable(ktrash5 ${ktrash_SRCS}) target_compile_definitions(ktrash5 PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}") ecm_mark_nongui_executable(ktrash5) target_link_libraries(ktrash5 KF5::KIOCore KF5::I18n KF5::ConfigCore KF5::ConfigGui ) install(TARGETS ktrash5 ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) ########### next target ############### # currently not on win32, TODO! if(NOT WIN32 AND NOT KIOCORE_ONLY) - set(kcm_trash_PART_SRCS kcmtrash.cpp ${trashcommon_unix_SRCS}) + set(kcm_trash_PART_SRCS kcmtrash.cpp ${trashcommon_unix_SRCS} ${kio_trash_PART_DEBUG_SRCS}) add_library(kcm_trash MODULE ${kcm_trash_PART_SRCS}) target_link_libraries(kcm_trash Qt5::DBus KF5::I18n KF5::ConfigWidgets KF5::KIOCore KF5::Solid) if(APPLE) target_link_libraries(kcm_trash "-framework DiskArbitration -framework CoreFoundation") endif(APPLE) install(TARGETS kcm_trash DESTINATION ${KDE_INSTALL_PLUGINDIR}) endif() ########### install files ############### install( FILES kcmtrash.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) diff --git a/src/ioslaves/trash/kiotrashdebug.cpp b/src/ioslaves/trash/kiotrashdebug.cpp deleted file mode 100644 index 0e4473a5..00000000 --- a/src/ioslaves/trash/kiotrashdebug.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "kiotrashdebug.h" - -Q_LOGGING_CATEGORY(KIO_TRASH, "kf5.kio.trash") diff --git a/src/ioslaves/trash/kiotrashdebug.h b/src/ioslaves/trash/kiotrashdebug.h deleted file mode 100644 index 4858ebc9..00000000 --- a/src/ioslaves/trash/kiotrashdebug.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef KIOTRASHDEBUG_H -#define KIOTRASHDEBUG_H - -#include -Q_DECLARE_LOGGING_CATEGORY(KIO_TRASH) - -#endif // KIOTRASHDEBUG_H diff --git a/src/ioslaves/trash/tests/CMakeLists.txt b/src/ioslaves/trash/tests/CMakeLists.txt index 5d0fd84b..d9914d30 100644 --- a/src/ioslaves/trash/tests/CMakeLists.txt +++ b/src/ioslaves/trash/tests/CMakeLists.txt @@ -1,33 +1,35 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ) ########### next target ############### +ecm_qt_declare_logging_category(kio_trash_PART_test_DEBUG_SRCS HEADER kiotrashdebug.h IDENTIFIER KIO_TRASH CATEGORY_NAME kf5.kio.trash) + set(testtrash_SRCS testtrash.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../trashimpl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../trashsizecache.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../discspaceutil.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../kinterprocesslock.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../kiotrashdebug.cpp + ${kio_trash_PART_test_DEBUG_SRCS} ) include(ECMAddTests) ecm_add_test(${testtrash_SRCS} TEST_NAME testtrash LINK_LIBRARIES KF5::I18n Qt5::DBus KF5::KIOCore KF5::Solid Qt5::Test Qt5::Network ) if(APPLE) target_link_libraries(testtrash "-framework DiskArbitration -framework CoreFoundation") endif(APPLE) # other tests like dropjob and fileundomanager use the trash in ~/.qttest, which this test cleans up set_tests_properties(testtrash PROPERTIES RUN_SERIAL TRUE) ### next target ### add_executable(lockingtest lockingtest.cpp ../kinterprocesslock.cpp) ecm_mark_nongui_executable(lockingtest) target_link_libraries(lockingtest Qt5::Core Qt5::DBus)