From 2b7d2ff37742e7c2e89d1e95967ae1e45c5b4ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 28 Mar 2015 18:23:53 +0000 Subject: [PATCH] Move util/htmlreport util/helpers to kpmgui library. --- CMakeLists.txt | 1 + src/CMakeLists.txt | 6 ++++-- src/ops/operation.h | 2 +- src/util/CMakeLists.txt | 9 ++++++--- src/util/helpers.h | 17 ++++++++--------- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9661608..80d0b6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,7 @@ find_package(KF5 REQUIRED IconThemes JobWidgets KIO + Service XmlGui WidgetsAddons ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bd15f34..b34f1eb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,14 +28,15 @@ set(kpmcore_SRCS ${BACKEND_SRC} ${FS_SRC} ${CORE_SRC} - ${UTIL_SRC} ${OPS_SRC} ${JOBS_SRC} + ${UTIL_SRC} ) set(kpmgui_SRCS ${CONFIG_SRC} ${GUI_SRC} + ${UTILGUI_SRC} ) file(GLOB kpmcore_UIFILES config/*.ui) @@ -58,7 +59,7 @@ target_link_libraries( kpmcore libfatlabel KF5::I18n KF5::IconThemes KF5::KIOCore - KF5::WidgetsAddons + KF5::Service ) add_library(kpmgui SHARED ${kpmgui_SRCS}) @@ -67,6 +68,7 @@ target_link_libraries( kpmgui kpmcore KF5::JobWidgets KF5::KIOWidgets + KF5::WidgetsAddons KF5::XmlGui ) diff --git a/src/ops/operation.h b/src/ops/operation.h index adf9a84..73d304d 100644 --- a/src/ops/operation.h +++ b/src/ops/operation.h @@ -70,7 +70,7 @@ class QIcon; @author Volker Lanz */ -class Operation : public QObject +class LIBKPMCORE_EXPORT Operation : public QObject { Q_OBJECT Q_DISABLE_COPY(Operation) diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index 2c8e697..8f1b634 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -1,8 +1,11 @@ set(UTIL_SRC util/capacity.cpp - util/report.cpp - util/helpers.cpp - util/globallog.cpp util/externalcommand.cpp + util/globallog.cpp + util/report.cpp +) + +set(UTILGUI_SRC + util/helpers.cpp util/htmlreport.cpp ) diff --git a/src/util/helpers.h b/src/util/helpers.h index eb65f1b..2bc4e91 100644 --- a/src/util/helpers.h +++ b/src/util/helpers.h @@ -19,7 +19,7 @@ #define HELPERS__H -#include "util/libpartitionmanagerexport.h" +#include "util/libpartitionmanagerguiexport.h" #include "fs/filesystem.h" @@ -29,18 +29,17 @@ class QIcon; class QPoint; class QTreeWidget; +LIBKPMGUI_EXPORT void registerMetaTypes(); +LIBKPMGUI_EXPORT bool checkPermissions(); -LIBKPMCORE_EXPORT void registerMetaTypes(); -LIBKPMCORE_EXPORT bool checkPermissions(); +LIBKPMGUI_EXPORT bool caseInsensitiveLessThan(const QString& s1, const QString& s2); -LIBKPMCORE_EXPORT bool caseInsensitiveLessThan(const QString& s1, const QString& s2); +LIBKPMGUI_EXPORT QIcon createFileSystemColor(FileSystem::Type type, quint32 size); -LIBKPMCORE_EXPORT QIcon createFileSystemColor(FileSystem::Type type, quint32 size); +LIBKPMGUI_EXPORT void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree); -LIBKPMCORE_EXPORT void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree); +LIBKPMGUI_EXPORT bool loadBackend(); -LIBKPMCORE_EXPORT bool loadBackend(); - -LIBKPMCORE_EXPORT bool checkAccessibleDevices(); +LIBKPMGUI_EXPORT bool checkAccessibleDevices(); #endif