Split partitionmanagerprivate into kpmcore and kpmgui.

Please enter the commit message for your changes. Lines starting
This commit is contained in:
Chris Campbell 2015-02-18 12:05:42 +00:00 committed by Andrius Štikonas
parent 2f780df746
commit 0ff2c923c3
90 changed files with 302 additions and 394 deletions

View File

@ -53,7 +53,6 @@ find_package(KF5 REQUIRED
IconThemes
JobWidgets
KIO
WindowSystem
XmlGui
WidgetsAddons
)

View File

@ -15,50 +15,67 @@
############################################
file(GLOB partitionmanagerprivate_SRCS
backend/*.cpp
core/*.cpp
util/*.cpp
ops/*.cpp
jobs/*.cpp
fs/*.cpp
gui/*.cpp
config/*.cpp
include(config/CMakeLists.txt)
include(backend/CMakeLists.txt)
include(core/CMakeLists.txt)
include(util/CMakeLists.txt)
include(ops/CMakeLists.txt)
include(jobs/CMakeLists.txt)
include(fs/CMakeLists.txt)
include(gui/CMakeLists.txt)
set(kpmcore_SRCS
${BACKEND_SRC}
${FS_SRC}
${CORE_SRC}
${UTIL_SRC}
${OPS_SRC}
${JOBS_SRC}
)
file(GLOB partitionmanagerprivate_UIFILES config/*.ui gui/*.ui)
set(kpmgui_SRCS
${CONFIG_SRC}
${GUI_SRC}
)
ki18n_wrap_ui(partitionmanagerprivate_SRCS ${partitionmanagerprivate_UIFILES})
file(GLOB kpmcore_UIFILES config/*.ui)
file(GLOB kpmgui_UIFILES gui/*.ui)
kconfig_add_kcfg_files(partitionmanagerprivate_SRCS config.kcfgc)
ki18n_wrap_ui(kpmcore_SRCS ${kpmcore_UIFILES})
ki18n_wrap_ui(kpmgui_SRCS ${kpmgui_UIFILES})
kconfig_add_kcfg_files(kpmcore_SRCS config.kcfgc)
kconfig_add_kcfg_files(kpmgui_SRCS config.kcfgc)
install(FILES config.kcfg DESTINATION ${KCFG_INSTALL_DIR})
add_library(partitionmanagerprivate SHARED ${partitionmanagerprivate_SRCS})
generate_export_header(partitionmanagerprivate EXPORT_FILE_NAME libpartitionmanager_export.h)
target_link_libraries( partitionmanagerprivate libfatlabel
${UUID_LIBRARIES} ${BLKID_LIBRARIES} ${LIBATASMART_LIBRARIES}
KF5::ConfigCore
KF5::ConfigGui
KF5::Crash
KF5::I18n
KF5::IconThemes
KF5::JobWidgets
KF5::KIOCore
KF5::KIOWidgets
KF5::XmlGui
KF5::WidgetsAddons
KF5::WindowSystem
add_library(kpmcore SHARED ${kpmcore_SRCS})
generate_export_header(kpmcore EXPORT_FILE_NAME libpartitionmanager_export.h)
target_link_libraries( kpmcore libfatlabel
${UUID_LIBRARIES} ${BLKID_LIBRARIES} ${LIBATASMART_LIBRARIES}
KF5::ConfigCore
KF5::ConfigGui
KF5::Crash
KF5::I18n
KF5::IconThemes
KF5::KIOCore
KF5::WidgetsAddons
)
install(TARGETS partitionmanagerprivate ${INSTALL_TARGETS_DEFAULT_ARGS})
add_library(kpmgui SHARED ${kpmgui_SRCS})
target_link_libraries( kpmgui
kpmcore
KF5::JobWidgets
KF5::KIOWidgets
KF5::XmlGui
)
install(TARGETS kpmcore kpmgui ${INSTALL_TARGETS_DEFAULT_ARGS})
############################################
file(GLOB partitionmanager_SRCS main.cpp)
add_executable(partitionmanager main.cpp)
add_executable(partitionmanager ${partitionmanager_SRCS})
target_link_libraries(partitionmanager partitionmanagerprivate)
target_link_libraries(partitionmanager kpmcore kpmgui)
install(TARGETS partitionmanager ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.PartitionManager.appdata.xml DESTINATION share/appdata)
@ -68,4 +85,3 @@ install(PROGRAMS org.kde.PartitionManager.desktop DESTINATION ${XDG_APPS_INSTALL
############################################
add_subdirectory(plugins)

View File

@ -0,0 +1,7 @@
set(BACKEND_SRC
backend/corebackendmanager.cpp
backend/corebackenddevice.cpp
backend/corebackend.cpp
backend/corebackendpartition.cpp
backend/corebackendpartitiontable.cpp
)

View File

@ -36,7 +36,7 @@ class QString;
* @author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT CoreBackend : public QObject
class LIBKPMCORE_EXPORT CoreBackend : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(CoreBackend)

View File

@ -33,7 +33,7 @@ class Report;
* Interface class representing a device in the backend plugin.
* @author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT CoreBackendDevice
class LIBKPMCORE_EXPORT CoreBackendDevice
{
public:
CoreBackendDevice(const QString& device_node);

View File

@ -34,7 +34,7 @@ class CoreBackend;
* selected backend and also to manage the available backend plugins.
* @author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT CoreBackendManager
class LIBKPMCORE_EXPORT CoreBackendManager
{
private:
CoreBackendManager();

View File

@ -29,7 +29,7 @@ class Report;
* Represents a partition in the backend plugin.
* @author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT CoreBackendPartition
class LIBKPMCORE_EXPORT CoreBackendPartition
{
public:
CoreBackendPartition();

View File

@ -35,7 +35,7 @@ class Partition;
* Interface class to represent a partition table in the backend.
* @author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT CoreBackendPartitionTable
class LIBKPMCORE_EXPORT CoreBackendPartitionTable
{
public:
virtual ~CoreBackendPartitionTable() {}

View File

@ -2,7 +2,7 @@ File=config.kcfg
ClassName=Config
Singleton=true
Mutators=true
Visibility=LIBPARTITIONMANAGERPRIVATE_EXPORT
Visibility=LIBKPMCORE_EXPORT
IncludeFiles=\"util/libpartitionmanagerexport.h\"
ItemAccessors=true
SetUserTexts=true

View File

@ -0,0 +1,6 @@
set(CONFIG_SRC
config/advancedpagewidget.cpp
config/configureoptionsdialog.cpp
config/filesystemcolorspagewidget.cpp
config/generalpagewidget.cpp
)

View File

@ -18,6 +18,7 @@
#if !defined(CONFIGUREOPTIONSDIALOG__H)
#define CONFIGUREOPTIONSDIALOG__H
#include "util/libpartitionmanagerexport.h"
#include <KConfigDialog>
@ -26,7 +27,7 @@ class FileSystemColorsPageWidget;
class AdvancedPageWidget;
class OperationStack;
class ConfigureOptionsDialog : public KConfigDialog
class LIBKPMCORE_EXPORT ConfigureOptionsDialog : public KConfigDialog
{
Q_OBJECT

21
src/core/CMakeLists.txt Normal file
View File

@ -0,0 +1,21 @@
set(CORE_SRC
core/copysourceshred.cpp
core/copysource.cpp
core/partition.cpp
core/mountentry.cpp
core/copytargetdevice.cpp
core/copytarget.cpp
core/copysourcedevice.cpp
core/operationrunner.cpp
core/partitiontable.cpp
core/copytargetfile.cpp
core/smartstatus.cpp
core/copysourcefile.cpp
core/smartattribute.cpp
core/devicescanner.cpp
core/partitionnode.cpp
core/partitionalignment.cpp
core/device.cpp
core/operationstack.cpp
core/partitionrole.cpp
)

View File

@ -39,7 +39,7 @@ class SmartStatus;
@see PartitionTable, Partition
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT Device : public QObject
class LIBKPMCORE_EXPORT Device : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(Device)

View File

@ -17,6 +17,7 @@
#ifndef DEVICESCANNER_H
#define DEVICESCANNER_H
#include "util/libpartitionmanagerexport.h"
#include <QThread>
@ -28,7 +29,7 @@ class OperationStack;
@author Volker Lanz <vl@fidra.de>
*/
class DeviceScanner : public QThread
class LIBKPMCORE_EXPORT DeviceScanner : public QThread
{
Q_OBJECT

View File

@ -18,6 +18,7 @@
#if !defined(MOUNTENTRY__H)
#define MOUNTENTRY__H
#include "util/libpartitionmanagerexport.h"
#include <QString>
#include <QStringList>
@ -25,7 +26,7 @@
struct mntent;
class MountEntry
class LIBKPMCORE_EXPORT MountEntry
{
public:
enum IdentifyType { deviceNode, uuid, label };

View File

@ -19,6 +19,8 @@
#define OPERATIONRUNNER__H
#include "util/libpartitionmanagerexport.h"
#include <QThread>
#include <QMutex>
#include <qglobal.h>
@ -33,7 +35,7 @@ class Report;
@author Volker Lanz <vl@fidra.de>
*/
class OperationRunner : public QThread
class LIBKPMCORE_EXPORT OperationRunner : public QThread
{
Q_OBJECT
Q_DISABLE_COPY(OperationRunner)
@ -43,9 +45,9 @@ class OperationRunner : public QThread
public:
void run();
qint32 numJobs() const;
qint32 numOperations() const;
qint32 numProgressSub() const;
LIBKPMCORE_EXPORT qint32 numJobs() const;
LIBKPMCORE_EXPORT qint32 numOperations() const;
LIBKPMCORE_EXPORT qint32 numProgressSub() const;
bool isCancelling() const { return m_Cancelling; } /**< @return if the user has requested cancelling */
void cancel() const { m_Cancelling = true; } /**< Sets cancelling to true. */
QMutex& suspendMutex() const { return m_SuspendMutex; } /**< @return the QMutex used for syncing */

View File

@ -18,6 +18,7 @@
#if !defined(OPERATIONSTACK__H)
#define OPERATIONSTACK__H
#include "util/libpartitionmanagerexport.h"
#include <QObject>
#include <QList>
@ -37,7 +38,7 @@ class DeviceScanner;
@author Volker Lanz <vl@fidra.de>
*/
class OperationStack : public QObject
class LIBKPMCORE_EXPORT OperationStack : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(OperationStack)

View File

@ -70,7 +70,7 @@ class QTextStream;
@see PartitionTable, Device, FileSystem
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT Partition : public PartitionNode
class LIBKPMCORE_EXPORT Partition : public PartitionNode
{
friend class PartitionTable;
friend class OperationStack;

View File

@ -26,7 +26,7 @@
class Device;
class Partition;
class LIBPARTITIONMANAGERPRIVATE_EXPORT PartitionAlignment
class LIBKPMCORE_EXPORT PartitionAlignment
{
private:
PartitionAlignment();

View File

@ -18,6 +18,7 @@
#if !defined(PARTITIONNODE__H)
#define PARTITIONNODE__H
#include "util/libpartitionmanagerexport.h"
#include <QObject>
#include <QList>
@ -34,7 +35,7 @@ class PartitionRole;
@see Device, PartitionTable, Partition
@author Volker Lanz <vl@fidra.de>
*/
class PartitionNode : public QObject
class LIBKPMCORE_EXPORT PartitionNode : public QObject
{
Q_OBJECT

View File

@ -31,7 +31,7 @@ class QString;
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT PartitionRole
class LIBKPMCORE_EXPORT PartitionRole
{
public:
/** A Partition's role: What kind of Partition is it? */

View File

@ -41,12 +41,12 @@ class QTextStream;
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT PartitionTable : public PartitionNode
class LIBKPMCORE_EXPORT PartitionTable : public PartitionNode
{
Q_DISABLE_COPY(PartitionTable)
friend class CoreBackend;
friend QTextStream& operator<<(QTextStream& stream, const PartitionTable& ptable);
friend LIBKPMCORE_EXPORT QTextStream& operator<<(QTextStream& stream, const PartitionTable& ptable);
public:
enum TableType

View File

@ -18,12 +18,13 @@
#if !defined(SMARTATTRIBUTE__H)
#define SMARTATTRIBUTE__H
#include "util/libpartitionmanagerexport.h"
#include <QString>
struct SkSmartAttributeParsedData;
class SmartAttribute
class LIBKPMCORE_EXPORT SmartAttribute
{
public:
enum FailureType

View File

@ -18,6 +18,7 @@
#if !defined(SMARTSTATUS__H)
#define SMARTSTATUS__H
#include "util/libpartitionmanagerexport.h"
#include <qglobal.h>
#include <QString>
@ -28,7 +29,7 @@ class SmartAttribute;
struct SkSmartAttributeParsedData;
struct SkDisk;
class SmartStatus
class LIBKPMCORE_EXPORT SmartStatus
{
public:
enum Overall

29
src/fs/CMakeLists.txt Normal file
View File

@ -0,0 +1,29 @@
set(FS_SRC
fs/fat32.cpp
fs/filesystem.cpp
fs/hfs.cpp
fs/nilfs2.cpp
fs/unknown.cpp
fs/linuxswap.cpp
fs/hfsplus.cpp
fs/ext3.cpp
fs/hpfs.cpp
fs/unformatted.cpp
fs/luks.cpp
fs/btrfs.cpp
fs/ufs.cpp
fs/reiserfs.cpp
fs/exfat.cpp
fs/filesystemfactory.cpp
fs/lvm2_pv.cpp
fs/reiser4.cpp
fs/ext2.cpp
fs/jfs.cpp
fs/ntfs.cpp
fs/fat16.cpp
fs/ext4.cpp
fs/xfs.cpp
fs/extended.cpp
fs/zfs.cpp
fs/ocfs2.cpp
)

View File

@ -34,7 +34,7 @@ namespace FS
/** A btrfs file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT btrfs : public FileSystem
class LIBKPMCORE_EXPORT btrfs : public FileSystem
{
public:
btrfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** An exfat file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT exfat : public FileSystem
class LIBKPMCORE_EXPORT exfat : public FileSystem
{
public:
exfat(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** An ext2 file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT ext2 : public FileSystem
class LIBKPMCORE_EXPORT ext2 : public FileSystem
{
public:
ext2(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, FileSystem::Type t = FileSystem::Ext2);

View File

@ -37,7 +37,7 @@ namespace FS
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT ext3 : public ext2
class LIBKPMCORE_EXPORT ext3 : public ext2
{
public:
ext3(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -37,7 +37,7 @@ namespace FS
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT ext4 : public ext2
class LIBKPMCORE_EXPORT ext4 : public ext2
{
public:
ext4(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -37,7 +37,7 @@ namespace FS
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT extended : public FileSystem
class LIBKPMCORE_EXPORT extended : public FileSystem
{
public:
extended(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** A fat16 file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT fat16 : public FileSystem
class LIBKPMCORE_EXPORT fat16 : public FileSystem
{
public:
fat16(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, FileSystem::Type t = FileSystem::Fat16);

View File

@ -37,7 +37,7 @@ namespace FS
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT fat32 : public fat16
class LIBKPMCORE_EXPORT fat32 : public fat16
{
public:
fat32(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -18,6 +18,7 @@
#if !defined(FILESYSTEM__H)
#define FILESYSTEM__H
#include "util/libpartitionmanagerexport.h"
#include <qglobal.h>
#include <QStringList>
@ -35,7 +36,7 @@ class Report;
@author Volker Lanz <vl@fidra.de>
*/
class FileSystem
class LIBKPMCORE_EXPORT FileSystem
{
Q_DISABLE_COPY(FileSystem)

View File

@ -31,7 +31,7 @@ class QString;
/** Factory to create instances of FileSystem.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT FileSystemFactory
class LIBKPMCORE_EXPORT FileSystemFactory
{
public:
/** map of FileSystem::Types to pointers of FileSystem */

View File

@ -34,7 +34,7 @@ namespace FS
/** An hfs file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT hfs : public FileSystem
class LIBKPMCORE_EXPORT hfs : public FileSystem
{
public:
hfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** An hfsplus file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT hfsplus : public FileSystem
class LIBKPMCORE_EXPORT hfsplus : public FileSystem
{
public:
hfsplus(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** A hpfs file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT hpfs : public FileSystem
class LIBKPMCORE_EXPORT hpfs : public FileSystem
{
public:
hpfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** A JFS file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT jfs : public FileSystem
class LIBKPMCORE_EXPORT jfs : public FileSystem
{
public:
jfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** A linux swap pseudo file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT linuxswap : public FileSystem
class LIBKPMCORE_EXPORT linuxswap : public FileSystem
{
public:
linuxswap(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -18,12 +18,9 @@
#include "fs/luks.h"
#include "gui/decryptluksdialog.h"
#include "util/capacity.h"
#include "util/externalcommand.h"
#include <QDialog>
#include <QPointer>
#include <QString>
#include <QUuid>
@ -86,37 +83,11 @@ namespace FS
return 3 * Capacity::unitFactor(Capacity::Byte, Capacity::MiB);
}
QString luks::mountTitle() const
{
return i18nc("@title:menu", "Decrypt");
}
QString luks::unmountTitle() const
{
return i18nc("@title:menu", "Deactivate");
}
bool luks::mount(const QString& deviceNode)
{
QPointer<DecryptLuksDialog> dlg = new DecryptLuksDialog(0, deviceNode); //TODO: parent widget instead of 0
if (dlg->exec() == QDialog::Accepted)
{
std::vector<QString> commands;
commands.push_back(QStringLiteral("echo"));
commands.push_back(QStringLiteral("cryptsetup"));
std::vector<QStringList> args;
args.push_back(QStringList() << dlg->luksPassphrase().text());
args.push_back(QStringList() << QStringLiteral("luksOpen") << deviceNode << dlg->luksName().text());
ExternalCommand cmd(commands, args);
delete dlg;
return cmd.run(-1) && cmd.exitCode() == 0;
}
delete dlg;
return false;
}
bool luks::unmount(const QString& deviceNode)
{
ExternalCommand cmd(QStringLiteral("cryptsetup"), QStringList() << QStringLiteral("luksClose") << mapperName(deviceNode));

View File

@ -34,7 +34,7 @@ namespace FS
/** A LUKS crypto file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT luks : public FileSystem
class LIBKPMCORE_EXPORT luks : public FileSystem
{
public:
luks(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);
@ -61,12 +61,9 @@ namespace FS
virtual QString readUUID(const QString& deviceNode) const;
virtual bool updateUUID(Report& report, const QString& deviceNode) const;
virtual bool canMount(const QString&) const { return true; };
virtual bool canUnmount(const QString&) const { return true; };
virtual bool mount(const QString& deviceNode);
virtual bool unmount(const QString& deviceNode);
virtual QString mountTitle() const;
virtual QString unmountTitle() const;
static QString mapperName (const QString& deviceNode);

View File

@ -34,7 +34,7 @@ namespace FS
/** LVM2 physical volume.
@author Andrius Štikonas <stikonas@gmail.com>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT lvm2_pv : public FileSystem
class LIBKPMCORE_EXPORT lvm2_pv : public FileSystem
{
public:
lvm2_pv(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** A nilfs2 file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT nilfs2 : public FileSystem
class LIBKPMCORE_EXPORT nilfs2 : public FileSystem
{
public:
nilfs2(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** An NTFS file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT ntfs : public FileSystem
class LIBKPMCORE_EXPORT ntfs : public FileSystem
{
public:
ntfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** A ocfs2 file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT ocfs2 : public FileSystem
class LIBKPMCORE_EXPORT ocfs2 : public FileSystem
{
public:
ocfs2(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** A Reiser4 file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT reiser4 : public FileSystem
class LIBKPMCORE_EXPORT reiser4 : public FileSystem
{
public:
reiser4(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -36,7 +36,7 @@ namespace FS
/** A ReiserFS file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT reiserfs : public FileSystem
class LIBKPMCORE_EXPORT reiserfs : public FileSystem
{
public:
reiserfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -32,7 +32,7 @@ namespace FS
/** A UFS file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT ufs : public FileSystem
class LIBKPMCORE_EXPORT ufs : public FileSystem
{
public:
ufs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** A pseudo file system for unformatted partitions.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT unformatted : public FileSystem
class LIBKPMCORE_EXPORT unformatted : public FileSystem
{
public:
unformatted(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -30,7 +30,7 @@ namespace FS
/** A pseudo file system for partitions whose file system we cannot determine.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT unknown : public FileSystem
class LIBKPMCORE_EXPORT unknown : public FileSystem
{
public:
unknown(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** An XFS file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT xfs : public FileSystem
class LIBKPMCORE_EXPORT xfs : public FileSystem
{
public:
xfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

View File

@ -34,7 +34,7 @@ namespace FS
/** A zfs file system.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT zfs : public FileSystem
class LIBKPMCORE_EXPORT zfs : public FileSystem
{
public:
zfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);

36
src/gui/CMakeLists.txt Normal file
View File

@ -0,0 +1,36 @@
set(GUI_SRC
gui/applyprogressdetailswidget.cpp
gui/applyprogressdialog.cpp
gui/applyprogressdialogwidget.cpp
gui/createpartitiontabledialog.cpp
gui/createpartitiontablewidget.cpp
gui/devicepropsdialog.cpp
gui/devicepropswidget.cpp
gui/editmountpointdialog.cpp
gui/editmountpointdialogwidget.cpp
gui/editmountoptionsdialog.cpp
gui/editmountoptionsdialogwidget.cpp
gui/filesystemsupportdialog.cpp
gui/filesystemsupportdialogwidget.cpp
gui/formattedspinbox.cpp
gui/infopane.cpp
gui/insertdialog.cpp
gui/listdevices.cpp
gui/listoperations.cpp
gui/mainwindow.cpp
gui/newdialog.cpp
gui/partitionmanagerwidget.cpp
gui/partpropsdialog.cpp
gui/partresizerwidget.cpp
gui/partwidget.cpp
gui/partwidgetbase.cpp
gui/parttablewidget.cpp
gui/resizedialog.cpp
gui/scanprogressdialog.cpp
gui/sizedetailswidget.cpp
gui/sizedialogbase.cpp
gui/sizedialogwidget.cpp
gui/smartdialog.cpp
gui/smartdialogwidget.cpp
gui/treelog.cpp
)

View File

@ -1,48 +0,0 @@
/*************************************************************************
* Copyright (C) 2013 by Andrius Štikonas <andrius@stikonas.eu> *
* *
* 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 "gui/decryptluksdialog.h"
#include "gui/decryptluksdialogwidget.h"
#include "core/device.h"
#include "core/partitiontable.h"
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QPushButton>
#include <config.h>
DecryptLuksDialog::DecryptLuksDialog(QWidget* parent, const QString& deviceNode) :
QDialog(parent),
m_DialogWidget(new DecryptLuksDialogWidget(this)),
m_DeviceNode(deviceNode)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
setLayout(mainLayout);
mainLayout->addWidget(&widget());
setWindowTitle(xi18nc("@title:window", "Decrypt LUKS partition on <filename>%1</filename>", this->deviceNode()));
QDialogButtonBox* dialogButtonBox = new QDialogButtonBox;
QPushButton* decryptButton = new QPushButton;
decryptButton->setText(i18nc("@action:button", "&Decrypt"));
decryptButton->setIcon(QIcon::fromTheme(QStringLiteral("object-unlocked")));
dialogButtonBox->addButton(decryptButton, QDialogButtonBox::AcceptRole);
mainLayout->addWidget(dialogButtonBox);
connect(dialogButtonBox, SIGNAL(accepted()), this, SLOT(accept()));
}

View File

@ -1,53 +0,0 @@
/*************************************************************************
* Copyright (C) 2013 by Andrius Štikonas <andrius@stikonas.eu> *
* *
* 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/>.*
*************************************************************************/
#if !defined(DECRYPTLUKSDIALOG__H)
#define DECRYPTLUKSDIALOG__H
#include "gui/decryptluksdialogwidget.h"
#include <QDialog>
class Device;
class DecryptLuksDialog : public QDialog
{
Q_OBJECT
public:
DecryptLuksDialog(QWidget* parent, const QString& deviceNode);
protected:
DecryptLuksDialogWidget& widget() { return *m_DialogWidget; }
const DecryptLuksDialogWidget& widget() const { return *m_DialogWidget; }
const QString& deviceNode() const { return m_DeviceNode; }
private:
DecryptLuksDialogWidget* m_DialogWidget;
const QString& m_DeviceNode;
public:
QLineEdit& luksName() { return widget().luksName(); }
const QLineEdit& luksName() const { return widget().luksName(); }
QLineEdit& luksPassphrase() { return widget().luksPassphrase(); }
const QLineEdit& luksPassphrase() const { return widget().luksPassphrase(); }
};
#endif

View File

@ -1,24 +0,0 @@
/*************************************************************************
* Copyright (C) 2013 by Andrius Štikonas <andrius@stikonas.eu> *
* *
* 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 "gui/decryptluksdialogwidget.h"
DecryptLuksDialogWidget::DecryptLuksDialogWidget(QWidget* parent) :
QWidget(parent)
{
setupUi(this);
}

View File

@ -1,42 +0,0 @@
/*************************************************************************
* Copyright (C) 2013 by Andrius Štikonas <andrius@stikonas.eu> *
* *
* 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/>.*
*************************************************************************/
#if !defined(DECRYPTLUKSDIALOGWIDGET__H)
#define DECRYPTLUKSDIALOGWIDGET__H
#include "ui_decryptluksdialogwidgetbase.h"
#include <QLabel>
#include <QLineEdit>
class DecryptLuksDialogWidget : public QWidget, public Ui::DecryptLuksDialogWidgetBase
{
Q_OBJECT
public:
DecryptLuksDialogWidget(QWidget* parent);
public:
QLineEdit& luksName() { return *m_LineEditName; }
const QLineEdit& luksName() const { return *m_LineEditName; }
QLineEdit& luksPassphrase() { return *m_LineEditPassphrase; }
const QLineEdit& luksPassphrase() const { return *m_LineEditPassphrase; }
};
#endif

View File

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DecryptLuksDialogWidgetBase</class>
<widget class="QWidget" name="DecryptLuksDialogWidgetBase">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>377</width>
<height>122</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>10</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="label_Name">
<property name="text">
<string>&amp;Name:</string>
</property>
<property name="buddy">
<cstring>m_LineEditName</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="m_LineEditName"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_Pass">
<property name="text">
<string>&amp;Passphrase:</string>
</property>
<property name="buddy">
<cstring>m_LineEditPassphrase</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="m_LineEditPassphrase">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -34,7 +34,7 @@ class KActionCollection;
/** A list of devices.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT ListDevices : public QWidget, public Ui::ListDevicesBase
class LIBKPMCORE_EXPORT ListDevices : public QWidget, public Ui::ListDevicesBase
{
Q_OBJECT
Q_DISABLE_COPY(ListDevices)

View File

@ -35,7 +35,7 @@ class KActionCollection;
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT ListOperations : public QWidget, public Ui::ListOperationsBase
class LIBKPMCORE_EXPORT ListOperations : public QWidget, public Ui::ListOperationsBase
{
Q_OBJECT
Q_DISABLE_COPY(ListOperations)

View File

@ -46,7 +46,7 @@ class QEvent;
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase
class LIBKPMCORE_EXPORT MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase
{
Q_OBJECT
Q_DISABLE_COPY(MainWindow)

View File

@ -40,7 +40,7 @@ class QPoint;
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT PartitionManagerWidget : public QWidget, Ui::PartitionManagerWidgetBase
class LIBKPMCORE_EXPORT PartitionManagerWidget : public QWidget, Ui::PartitionManagerWidgetBase
{
Q_OBJECT
Q_DISABLE_COPY(PartitionManagerWidget)

View File

@ -32,7 +32,7 @@ class QTreeWidget;
/** A tree for formatted log output.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT TreeLog: public QWidget, public Ui::TreeLogBase
class LIBKPMCORE_EXPORT TreeLog: public QWidget, public Ui::TreeLogBase
{
Q_OBJECT
Q_DISABLE_COPY(TreeLog)

18
src/jobs/CMakeLists.txt Normal file
View File

@ -0,0 +1,18 @@
set(JOBS_SRC
jobs/resizefilesystemjob.cpp
jobs/createfilesystemjob.cpp
jobs/job.cpp
jobs/checkfilesystemjob.cpp
jobs/shredfilesystemjob.cpp
jobs/createpartitionjob.cpp
jobs/createpartitiontablejob.cpp
jobs/setfilesystemlabeljob.cpp
jobs/deletepartitionjob.cpp
jobs/restorefilesystemjob.cpp
jobs/setpartgeometryjob.cpp
jobs/deletefilesystemjob.cpp
jobs/backupfilesystemjob.cpp
jobs/setpartflagsjob.cpp
jobs/copyfilesystemjob.cpp
jobs/movefilesystemjob.cpp
)

View File

@ -42,7 +42,7 @@ class Report;
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT Job : public QObject
class LIBKPMCORE_EXPORT Job : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(Job)

14
src/ops/CMakeLists.txt Normal file
View File

@ -0,0 +1,14 @@
set(OPS_SRC
ops/operation.cpp
ops/deleteoperation.cpp
ops/restoreoperation.cpp
ops/resizeoperation.cpp
ops/newoperation.cpp
ops/createfilesystemoperation.cpp
ops/createpartitiontableoperation.cpp
ops/setfilesystemlabeloperation.cpp
ops/setpartflagsoperation.cpp
ops/checkoperation.cpp
ops/backupoperation.cpp
ops/copyoperation.cpp
)

View File

@ -18,6 +18,7 @@
#if !defined(BACKUPOPERATION__H)
#define BACKUPOPERATION__H
#include "util/libpartitionmanagerexport.h"
#include "ops/operation.h"
@ -30,7 +31,7 @@ class BackupFileSystemJob;
/** Back up a FileSystem.
@author Volker Lanz <vl@fidra.de>
*/
class BackupOperation : public Operation
class LIBKPMCORE_EXPORT BackupOperation : public Operation
{
Q_OBJECT
Q_DISABLE_COPY(BackupOperation)

View File

@ -18,6 +18,7 @@
#if !defined(CHECKOPERATION__H)
#define CHECKOPERATION__H
#include "util/libpartitionmanagerexport.h"
#include "ops/operation.h"
@ -31,7 +32,7 @@ class ResizeFileSystemJob;
/** Check a Partition.
@author Volker Lanz <vl@fidra.de>
*/
class CheckOperation : public Operation
class LIBKPMCORE_EXPORT CheckOperation : public Operation
{
friend class OperationStack;

View File

@ -18,6 +18,7 @@
#if !defined(COPYOPERATION__H)
#define COPYOPERATION__H
#include "util/libpartitionmanagerexport.h"
#include "ops/operation.h"
@ -40,7 +41,7 @@ class ResizeFileSystemJob;
@author Volker Lanz <vl@fidra.de>
*/
class CopyOperation : public Operation
class LIBKPMCORE_EXPORT CopyOperation : public Operation
{
friend class OperationStack;

View File

@ -18,6 +18,7 @@
#if !defined(CREATEFILESYSTEMOPERATION__H)
#define CREATEFILESYSTEMOPERATION__H
#include "util/libpartitionmanagerexport.h"
#include "ops/operation.h"
@ -38,7 +39,7 @@ class CheckFileSystemJob;
@author Volker Lanz <vl@fidra.de>
*/
class CreateFileSystemOperation : public Operation
class LIBKPMCORE_EXPORT CreateFileSystemOperation : public Operation
{
friend class OperationStack;

View File

@ -18,6 +18,7 @@
#if !defined(CREATEPARTITIONTABLEOPERATION__H)
#define CREATEPARTITIONTABLEOPERATION__H
#include "util/libpartitionmanagerexport.h"
#include "ops/operation.h"
@ -33,7 +34,7 @@ class OperationStack;
/** Create a PartitionTable.
@author Volker Lanz <vl@fidra.de>
*/
class CreatePartitionTableOperation : public Operation
class LIBKPMCORE_EXPORT CreatePartitionTableOperation : public Operation
{
Q_OBJECT
Q_DISABLE_COPY(CreatePartitionTableOperation)

View File

@ -18,6 +18,7 @@
#if !defined(DELETEOPERATION__H)
#define DELETEOPERATION__H
#include "util/libpartitionmanagerexport.h"
#include "ops/operation.h"
@ -33,7 +34,7 @@ class DeletePartitionJob;
/** Delete a Partition.
@author Volker Lanz <vl@fidra.de>
*/
class DeleteOperation : public Operation
class LIBKPMCORE_EXPORT DeleteOperation : public Operation
{
friend class OperationStack;

View File

@ -20,6 +20,7 @@
#define NEWOPERATION__H
#include "ops/operation.h"
#include "util/libpartitionmanagerexport.h"
#include <QString>
@ -38,7 +39,7 @@ class CheckFileSystemJob;
@author Volker Lanz <vl@fidra.de>
*/
class NewOperation : public Operation
class LIBKPMCORE_EXPORT NewOperation : public Operation
{
friend class OperationStack;

View File

@ -19,6 +19,8 @@
#define OPERATION__H
#include "util/libpartitionmanagerexport.h"
#include <QObject>
#include <QList>
#include <qglobal.h>
@ -113,7 +115,7 @@ class Operation : public QObject
virtual void setStatus(OperationStatus s) { m_Status = s; } /**< @param s the new status */
qint32 totalProgress() const;
LIBKPMCORE_EXPORT qint32 totalProgress() const;
protected Q_SLOTS:
void onJobStarted();

View File

@ -18,6 +18,7 @@
#if !defined(RESIZEOPERATION__H)
#define RESIZEOPERATION__H
#include "util/libpartitionmanagerexport.h"
#include "ops/operation.h"
@ -45,7 +46,7 @@ class CheckFileSystemJob;
@author Volker Lanz <vl@fidra.de>
*/
class ResizeOperation : public Operation
class LIBKPMCORE_EXPORT ResizeOperation : public Operation
{
friend class OperationStack;

View File

@ -18,6 +18,7 @@
#if !defined(RESTOREOPERATION__H)
#define RESTOREOPERATION__H
#include "util/libpartitionmanagerexport.h"
#include "ops/operation.h"
@ -41,7 +42,7 @@ class ResizeFileSystemJob;
@author Volker Lanz <vl@fidra.de>
*/
class RestoreOperation : public Operation
class LIBKPMCORE_EXPORT RestoreOperation : public Operation
{
friend class OperationStack;

View File

@ -18,6 +18,7 @@
#if !defined(SETFILESYSTEMLABELOPERATION__H)
#define SETFILESYSTEMLABELOPERATION__H
#include "util/libpartitionmanagerexport.h"
#include "ops/operation.h"
@ -34,7 +35,7 @@ class SetFileSystemLabelJob;
@author Volker Lanz <vl@fidra.de>
*/
class SetFileSystemLabelOperation : public Operation
class LIBKPMCORE_EXPORT SetFileSystemLabelOperation : public Operation
{
friend class OperationStack;

View File

@ -18,6 +18,7 @@
#if !defined(SETPARTFLAGSOPERATION__H)
#define SETPARTFLAGSOPERATION__H
#include "util/libpartitionmanagerexport.h"
#include "ops/operation.h"
@ -37,7 +38,7 @@ class SetPartFlagsJob;
@author Volker Lanz <vl@fidra.de>
*/
class SetPartFlagsOperation : public Operation
class LIBKPMCORE_EXPORT SetPartFlagsOperation : public Operation
{
friend class OperationStack;

View File

@ -17,7 +17,7 @@ file (GLOB pmdummybackendplugin_SRCS *.cpp)
add_library(pmdummybackendplugin SHARED ${pmdummybackendplugin_SRCS})
target_link_libraries(pmdummybackendplugin partitionmanagerprivate KF5::KIOCore ${LIBPARTED_LIBS} ${BLKID_LIBRARIES} KF5::Solid)
target_link_libraries(pmdummybackendplugin kpmgui KF5::KIOCore ${LIBPARTED_LIBS} ${BLKID_LIBRARIES} KF5::Solid)
install(TARGETS pmdummybackendplugin DESTINATION ${PLUGIN_INSTALL_DIR})
kcoreaddons_desktop_to_json(pmdummybackendplugin pmdummybackendplugin.desktop)

View File

@ -29,7 +29,7 @@ file (GLOB pmlibpartedbackendplugin_SRCS *.cpp)
add_library(pmlibpartedbackendplugin SHARED ${pmlibpartedbackendplugin_SRCS})
target_link_libraries(pmlibpartedbackendplugin partitionmanagerprivate ${LIBPARTED_LIBS} ${BLKID_LIBRARIES} KF5::KIOCore)
target_link_libraries(pmlibpartedbackendplugin kpmgui ${LIBPARTED_LIBS} ${BLKID_LIBRARIES} KF5::KIOCore)
install(TARGETS pmlibpartedbackendplugin DESTINATION ${PLUGIN_INSTALL_DIR})
kcoreaddons_desktop_to_json(pmlibpartedbackendplugin pmlibpartedbackendplugin.desktop)

8
src/util/CMakeLists.txt Normal file
View File

@ -0,0 +1,8 @@
set(UTIL_SRC
util/capacity.cpp
util/report.cpp
util/helpers.cpp
util/globallog.cpp
util/externalcommand.cpp
util/htmlreport.cpp
)

View File

@ -18,6 +18,7 @@
#if !defined(CAPACITY__H)
#define CAPACITY__H
#include "util/libpartitionmanagerexport.h"
class Partition;
class Device;
@ -31,7 +32,7 @@ class Device;
@author Volker Lanz <vl@fidra.de>
*/
class Capacity
class LIBKPMCORE_EXPORT Capacity
{
public:
/** Units we can deal with */

View File

@ -37,7 +37,7 @@ class Report;
@author Volker Lanz <vl@fidra.de>
@author Andrius Štikonas <andrius@stikonas.eu>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT ExternalCommand : public QProcess
class LIBKPMCORE_EXPORT ExternalCommand : public QProcess
{
Q_OBJECT
Q_DISABLE_COPY(ExternalCommand)

View File

@ -25,7 +25,7 @@
#include <QObject>
#include <qglobal.h>
class LIBPARTITIONMANAGERPRIVATE_EXPORT Log
class LIBKPMCORE_EXPORT Log
{
public:
enum Level
@ -49,7 +49,7 @@ class LIBPARTITIONMANAGERPRIVATE_EXPORT Log
/** Global logging.
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT GlobalLog : public QObject
class LIBKPMCORE_EXPORT GlobalLog : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(GlobalLog)

View File

@ -30,20 +30,20 @@ class QPoint;
class QTreeWidget;
LIBPARTITIONMANAGERPRIVATE_EXPORT void registerMetaTypes();
LIBPARTITIONMANAGERPRIVATE_EXPORT bool checkPermissions();
LIBKPMCORE_EXPORT void registerMetaTypes();
LIBKPMCORE_EXPORT bool checkPermissions();
LIBPARTITIONMANAGERPRIVATE_EXPORT KAboutData* createPartitionManagerAboutData();
LIBKPMCORE_EXPORT KAboutData* createPartitionManagerAboutData();
LIBPARTITIONMANAGERPRIVATE_EXPORT bool caseInsensitiveLessThan(const QString& s1, const QString& s2);
LIBPARTITIONMANAGERPRIVATE_EXPORT bool naturalLessThan(const QString& s1, const QString& s2);
LIBKPMCORE_EXPORT bool caseInsensitiveLessThan(const QString& s1, const QString& s2);
LIBKPMCORE_EXPORT bool naturalLessThan(const QString& s1, const QString& s2);
LIBPARTITIONMANAGERPRIVATE_EXPORT QIcon createFileSystemColor(FileSystem::Type type, quint32 size);
LIBKPMCORE_EXPORT QIcon createFileSystemColor(FileSystem::Type type, quint32 size);
LIBPARTITIONMANAGERPRIVATE_EXPORT void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree);
LIBKPMCORE_EXPORT void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree);
LIBPARTITIONMANAGERPRIVATE_EXPORT bool loadBackend();
LIBKPMCORE_EXPORT bool loadBackend();
LIBPARTITIONMANAGERPRIVATE_EXPORT bool checkAccessibleDevices();
LIBKPMCORE_EXPORT bool checkAccessibleDevices();
#endif

View File

@ -18,10 +18,11 @@
#if !defined(HTMLREPORT__H)
#define HTMLREPORT__H
#include "util/libpartitionmanagerexport.h"
class QString;
class HtmlReport
class LIBKPMCORE_EXPORT HtmlReport
{
public:
HtmlReport() {}

View File

@ -17,12 +17,13 @@
#include "libpartitionmanager_export.h"
#if !defined(LIBPARTITIONMANAGEREXPORT__H)
#define LIBPARTITIONMANAGEREXPORT__H
#if !defined(LIBPARTITIONMANAGERPRIVATE_EXPORT)
#define LIBPARTITIONMANAGERPRIVATE_EXPORT Q_DECL_EXPORT
#include <QtGlobal>
#if !defined(LIBKPMCORE_EXPORT)
#define LIBKPMCORE_EXPORT Q_DECL_EXPORT
#endif
#endif

View File

@ -21,8 +21,6 @@
#include "backend/corebackend.h"
#include "backend/corebackendmanager.h"
#include <QTextDocument>
#include <KLocalizedString>
#include <sys/utsname.h>

View File

@ -34,7 +34,7 @@ class ReportLine;
@author Volker Lanz <vl@fidra.de>
*/
class LIBPARTITIONMANAGERPRIVATE_EXPORT Report : public QObject
class LIBKPMCORE_EXPORT Report : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(Report)