From 333e03ac10d2c11ac7817a330574d916d77e5ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 6 Jan 2016 15:56:32 +0200 Subject: [PATCH] Get rid of kpmgui internal library. kpmgui was basically the whole partitionmanager except for main.cpp file. All useful functions were moved to kpmcore library, kpmgui is not necessary now. --- src/CMakeLists.txt | 25 +++++++++------------ src/config.kcfgc | 2 -- src/config/configureoptionsdialog.h | 4 +--- src/gui/listdevices.h | 4 +--- src/gui/listoperations.h | 4 +--- src/gui/mainwindow.h | 4 +--- src/gui/partitionmanagerwidget.h | 4 +--- src/gui/treelog.h | 4 +--- src/util/guihelpers.h | 6 ++--- src/util/libpartitionmanagerguiexport.h | 29 ------------------------- 10 files changed, 18 insertions(+), 68 deletions(-) delete mode 100644 src/util/libpartitionmanagerguiexport.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e9dce36..9a70ff5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,22 +19,25 @@ include(config/CMakeLists.txt) include(gui/CMakeLists.txt) include(util/CMakeLists.txt) -set(kpmgui_SRCS +set(partitionmanager_SRCS + main.cpp ${CONFIG_SRC} ${GUI_SRC} ${UTIL_SRC} ) -file(GLOB kpmgui_UIFILES config/*.ui gui/*.ui) +file(GLOB partitionmanager_UIFILES config/*.ui gui/*.ui) -ki18n_wrap_ui(kpmgui_SRCS ${kpmgui_UIFILES}) +ki18n_wrap_ui(partitionmanager_SRCS ${partitionmanager_UIFILES}) -kconfig_add_kcfg_files(kpmgui_SRCS config.kcfgc) +kconfig_add_kcfg_files(partitionmanager_SRCS config.kcfgc) install(FILES partitionmanager.kcfg DESTINATION ${KCFG_INSTALL_DIR}) -add_library(kpmgui SHARED ${kpmgui_SRCS}) -generate_export_header(kpmgui EXPORT_FILE_NAME libpartitionmanagergui_export.h) -target_link_libraries( kpmgui ${BLKID_LIBRARIES} +############################################ + +add_executable(partitionmanager ${partitionmanager_SRCS} ) + +target_link_libraries( partitionmanager ${BLKID_LIBRARIES} kpmcore KF5::ConfigCore KF5::ConfigGui @@ -47,14 +50,6 @@ target_link_libraries( kpmgui ${BLKID_LIBRARIES} KF5::XmlGui ) -install(TARGETS kpmgui ${INSTALL_TARGETS_DEFAULT_ARGS}) - -############################################ - -add_executable(partitionmanager main.cpp) - -target_link_libraries(partitionmanager kpmgui) - install(TARGETS partitionmanager ${INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.PartitionManager.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/appdata) install(FILES gui/partitionmanagerui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/partitionmanager) diff --git a/src/config.kcfgc b/src/config.kcfgc index 1fef055..064746e 100644 --- a/src/config.kcfgc +++ b/src/config.kcfgc @@ -2,7 +2,5 @@ File=partitionmanager.kcfg ClassName=Config Singleton=true Mutators=true -Visibility=LIBKPMGUI_EXPORT -IncludeFiles=\"util/libpartitionmanagerguiexport.h\" ItemAccessors=true SetUserTexts=true diff --git a/src/config/configureoptionsdialog.h b/src/config/configureoptionsdialog.h index 3fafcbb..8700fa6 100644 --- a/src/config/configureoptionsdialog.h +++ b/src/config/configureoptionsdialog.h @@ -19,8 +19,6 @@ #define CONFIGUREOPTIONSDIALOG__H -#include "util/libpartitionmanagerguiexport.h" - #include class GeneralPageWidget; @@ -28,7 +26,7 @@ class FileSystemColorsPageWidget; class AdvancedPageWidget; class OperationStack; -class LIBKPMGUI_EXPORT ConfigureOptionsDialog : public KConfigDialog +class ConfigureOptionsDialog : public KConfigDialog { Q_OBJECT diff --git a/src/gui/listdevices.h b/src/gui/listdevices.h index d58879f..5fffe64 100644 --- a/src/gui/listdevices.h +++ b/src/gui/listdevices.h @@ -19,8 +19,6 @@ #define LISTDEVICES__H -#include "util/libpartitionmanagerguiexport.h" - #include #include "ui_listdevicesbase.h" @@ -34,7 +32,7 @@ class KActionCollection; /** A list of devices. @author Volker Lanz */ -class LIBKPMGUI_EXPORT ListDevices : public QWidget, public Ui::ListDevicesBase +class ListDevices : public QWidget, public Ui::ListDevicesBase { Q_OBJECT Q_DISABLE_COPY(ListDevices) diff --git a/src/gui/listoperations.h b/src/gui/listoperations.h index ea0683a..9dc28e6 100644 --- a/src/gui/listoperations.h +++ b/src/gui/listoperations.h @@ -21,8 +21,6 @@ #include -#include "util/libpartitionmanagerguiexport.h" - #include "ui_listoperationsbase.h" #include @@ -35,7 +33,7 @@ class KActionCollection; @author Volker Lanz */ -class LIBKPMGUI_EXPORT ListOperations : public QWidget, public Ui::ListOperationsBase +class ListOperations : public QWidget, public Ui::ListOperationsBase { Q_OBJECT Q_DISABLE_COPY(ListOperations) diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 5bd73bd..190350d 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -23,8 +23,6 @@ #include #include -#include "util/libpartitionmanagerguiexport.h" - #include "ui_mainwindowbase.h" #include @@ -46,7 +44,7 @@ class QEvent; @author Volker Lanz */ -class LIBKPMGUI_EXPORT MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase +class MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase { Q_OBJECT Q_DISABLE_COPY(MainWindow) diff --git a/src/gui/partitionmanagerwidget.h b/src/gui/partitionmanagerwidget.h index 3524a4d..55637ac 100644 --- a/src/gui/partitionmanagerwidget.h +++ b/src/gui/partitionmanagerwidget.h @@ -22,8 +22,6 @@ #include #include -#include "util/libpartitionmanagerguiexport.h" - #include "ui_partitionmanagerwidgetbase.h" #include @@ -40,7 +38,7 @@ class QPoint; @author Volker Lanz */ -class LIBKPMGUI_EXPORT PartitionManagerWidget : public QWidget, Ui::PartitionManagerWidgetBase +class PartitionManagerWidget : public QWidget, Ui::PartitionManagerWidgetBase { Q_OBJECT Q_DISABLE_COPY(PartitionManagerWidget) diff --git a/src/gui/treelog.h b/src/gui/treelog.h index b1e3188..dadd1eb 100644 --- a/src/gui/treelog.h +++ b/src/gui/treelog.h @@ -19,8 +19,6 @@ #define TREELOG__H -#include "util/libpartitionmanagerguiexport.h" - #include "ui_treelogbase.h" #include @@ -32,7 +30,7 @@ class QTreeWidget; /** A tree for formatted log output. @author Volker Lanz */ -class LIBKPMGUI_EXPORT TreeLog: public QWidget, public Ui::TreeLogBase +class TreeLog: public QWidget, public Ui::TreeLogBase { Q_OBJECT Q_DISABLE_COPY(TreeLog) diff --git a/src/util/guihelpers.h b/src/util/guihelpers.h index f9e79ff..e25b80c 100644 --- a/src/util/guihelpers.h +++ b/src/util/guihelpers.h @@ -19,16 +19,14 @@ #define GUIHELPERS__H -#include "util/libpartitionmanagerguiexport.h" - #include #include class QString; class QIcon; -LIBKPMGUI_EXPORT bool checkPermissions(); -LIBKPMGUI_EXPORT bool loadBackend(); +bool checkPermissions(); +bool loadBackend(); QIcon createFileSystemColor(FileSystem::Type type, quint32 size); Capacity::Unit preferredUnit(); namespace GuiHelpers diff --git a/src/util/libpartitionmanagerguiexport.h b/src/util/libpartitionmanagerguiexport.h deleted file mode 100644 index ff99ca0..0000000 --- a/src/util/libpartitionmanagerguiexport.h +++ /dev/null @@ -1,29 +0,0 @@ -/************************************************************************* - * Copyright (C) 2008 by Volker Lanz * - * * - * This program 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. * - * * - * 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 General Public License * - * along with this program. If not, see .* - *************************************************************************/ - -#include "libpartitionmanagergui_export.h" - -#if !defined(LIBPARTITIONMANAGERGUIEXPORT__H) -#define LIBPARTITIONMANAGERGUIEXPORT__H - -#include - -#if !defined(LIBKPMGUI_EXPORT) -#define LIBKPMGUI_EXPORT Q_DECL_EXPORT -#endif - -#endif