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.
This commit is contained in:
Andrius Štikonas 2016-01-06 15:56:32 +02:00
parent d7a77c8934
commit 333e03ac10
10 changed files with 18 additions and 68 deletions

View File

@ -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)

View File

@ -2,7 +2,5 @@ File=partitionmanager.kcfg
ClassName=Config
Singleton=true
Mutators=true
Visibility=LIBKPMGUI_EXPORT
IncludeFiles=\"util/libpartitionmanagerguiexport.h\"
ItemAccessors=true
SetUserTexts=true

View File

@ -19,8 +19,6 @@
#define CONFIGUREOPTIONSDIALOG__H
#include "util/libpartitionmanagerguiexport.h"
#include <KConfigDialog>
class GeneralPageWidget;
@ -28,7 +26,7 @@ class FileSystemColorsPageWidget;
class AdvancedPageWidget;
class OperationStack;
class LIBKPMGUI_EXPORT ConfigureOptionsDialog : public KConfigDialog
class ConfigureOptionsDialog : public KConfigDialog
{
Q_OBJECT

View File

@ -19,8 +19,6 @@
#define LISTDEVICES__H
#include "util/libpartitionmanagerguiexport.h"
#include <kpmcore/core/operationstack.h>
#include "ui_listdevicesbase.h"
@ -34,7 +32,7 @@ class KActionCollection;
/** A list of devices.
@author Volker Lanz <vl@fidra.de>
*/
class LIBKPMGUI_EXPORT ListDevices : public QWidget, public Ui::ListDevicesBase
class ListDevices : public QWidget, public Ui::ListDevicesBase
{
Q_OBJECT
Q_DISABLE_COPY(ListDevices)

View File

@ -21,8 +21,6 @@
#include <kpmcore/core/operationstack.h>
#include "util/libpartitionmanagerguiexport.h"
#include "ui_listoperationsbase.h"
#include <QWidget>
@ -35,7 +33,7 @@ class KActionCollection;
@author Volker Lanz <vl@fidra.de>
*/
class LIBKPMGUI_EXPORT ListOperations : public QWidget, public Ui::ListOperationsBase
class ListOperations : public QWidget, public Ui::ListOperationsBase
{
Q_OBJECT
Q_DISABLE_COPY(ListOperations)

View File

@ -23,8 +23,6 @@
#include <kpmcore/core/operationstack.h>
#include <kpmcore/core/devicescanner.h>
#include "util/libpartitionmanagerguiexport.h"
#include "ui_mainwindowbase.h"
#include <KXmlGuiWindow>
@ -46,7 +44,7 @@ class QEvent;
@author Volker Lanz <vl@fidra.de>
*/
class LIBKPMGUI_EXPORT MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase
class MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase
{
Q_OBJECT
Q_DISABLE_COPY(MainWindow)

View File

@ -22,8 +22,6 @@
#include <kpmcore/core/operationstack.h>
#include <kpmcore/core/operationrunner.h>
#include "util/libpartitionmanagerguiexport.h"
#include "ui_partitionmanagerwidgetbase.h"
#include <QWidget>
@ -40,7 +38,7 @@ class QPoint;
@author Volker Lanz <vl@fidra.de>
*/
class LIBKPMGUI_EXPORT PartitionManagerWidget : public QWidget, Ui::PartitionManagerWidgetBase
class PartitionManagerWidget : public QWidget, Ui::PartitionManagerWidgetBase
{
Q_OBJECT
Q_DISABLE_COPY(PartitionManagerWidget)

View File

@ -19,8 +19,6 @@
#define TREELOG__H
#include "util/libpartitionmanagerguiexport.h"
#include "ui_treelogbase.h"
#include <kpmcore/util/globallog.h>
@ -32,7 +30,7 @@ class QTreeWidget;
/** A tree for formatted log output.
@author Volker Lanz <vl@fidra.de>
*/
class LIBKPMGUI_EXPORT TreeLog: public QWidget, public Ui::TreeLogBase
class TreeLog: public QWidget, public Ui::TreeLogBase
{
Q_OBJECT
Q_DISABLE_COPY(TreeLog)

View File

@ -19,16 +19,14 @@
#define GUIHELPERS__H
#include "util/libpartitionmanagerguiexport.h"
#include <kpmcore/fs/filesystem.h>
#include <kpmcore/util/capacity.h>
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

View File

@ -1,29 +0,0 @@
/*************************************************************************
* Copyright (C) 2008 by Volker Lanz <vl@fidra.de> *
* *
* 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 <http://www.gnu.org/licenses/>.*
*************************************************************************/
#include "libpartitionmanagergui_export.h"
#if !defined(LIBPARTITIONMANAGERGUIEXPORT__H)
#define LIBPARTITIONMANAGERGUIEXPORT__H
#include <QtGlobal>
#if !defined(LIBKPMGUI_EXPORT)
#define LIBKPMGUI_EXPORT Q_DECL_EXPORT
#endif
#endif