desktop/tribe-partitionmanager/tribe.patch
AlmAck 3f890a5e2e tribe-partitionmanager
fix crash on "getSolidDeviceList()" function
2014-01-02 20:47:12 +01:00

628 lines
25 KiB
Diff

diff -ru partitionmanager-svn/CMakeLists.txt partitionmanager-svn-build/CMakeLists.txt
--- partitionmanager-svn/CMakeLists.txt 2013-01-16 17:10:20.667204891 +0000
+++ partitionmanager-svn-build/CMakeLists.txt 2013-01-16 18:14:21.725257033 +0000
@@ -45,7 +45,7 @@
include(KDE4Defaults)
include(MacroLibrary)
-include_directories(${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ${UUID_INCLUDE_DIRS} ${BLKID_INCLUDE_DIRS} lib/ src/)
+include_directories(${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ${UUID_INCLUDE_DIRS} ${BLKID_INCLUDE_DIRS} lib/ src/ build/)
add_subdirectory(lib)
add_subdirectory(src)
diff -ru partitionmanager-svn/src/CMakeLists.txt partitionmanager-svn-build/src/CMakeLists.txt
--- partitionmanager-svn/src/CMakeLists.txt 2013-01-16 17:10:20.653871970 +0000
+++ partitionmanager-svn-build/src/CMakeLists.txt 2013-01-16 18:13:40.083210915 +0000
@@ -28,17 +28,35 @@
config/*.cpp
)
+file(GLOB partitionmanagerprivate_core_HDRS
+ core/*.h
+)
+file(GLOB partitionmanagerprivate_fs_HDRS
+ fs/*.h
+)
+file(GLOB partitionmanagerprivate_util_HDRS
+ util/*.h
+)
+file(GLOB partitionmanagerprivate_ops_HDRS
+ ops/*.h
+)
+
file(GLOB partitionmanagerprivate_UIFILES config/*.ui gui/*.ui)
kde4_add_ui_files(partitionmanagerprivate_SRCS ${partitionmanagerprivate_UIFILES})
kde4_add_kcfg_files(partitionmanagerprivate_SRCS config.kcfgc)
-kde4_add_library(partitionmanagerprivate SHARED ${partitionmanagerprivate_SRCS})
+kde4_add_library(tribepartitionmanager SHARED ${partitionmanagerprivate_SRCS})
-target_link_libraries(partitionmanagerprivate libfatlabel ${KDE4_KDECORE_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} ${UUID_LIBRARIES} ${BLKID_LIBRARIES} ${LIBATASMART_LIBRARIES} ${KDE4_KDEUI_LIBS} ${KDE4_SOLID_LIBS})
+target_link_libraries(tribepartitionmanager libfatlabel ${KDE4_KDECORE_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS}
+ ${UUID_LIBRARIES} ${BLKID_LIBRARIES} ${LIBATASMART_LIBRARIES} ${KDE4_KDEUI_LIBS} ${KDE4_SOLID_LIBS})
-install(TARGETS partitionmanagerprivate ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS tribepartitionmanager ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(FILES ${partitionmanagerprivate_core_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/tribepartitionmanager/core)
+install(FILES ${partitionmanagerprivate_fs_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/tribepartitionmanager/fs)
+install(FILES ${partitionmanagerprivate_util_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/tribepartitionmanager/util)
+install(FILES ${partitionmanagerprivate_ops_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/tribepartitionmanager/ops)
############################################
@@ -48,7 +66,7 @@
kde4_add_executable(partitionmanager ${partitionmanager_SRCS})
-target_link_libraries(partitionmanager partitionmanagerprivate ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS})
+target_link_libraries(partitionmanager tribepartitionmanager ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS})
install(TARGETS partitionmanager ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES gui/partitionmanagerui.rc DESTINATION ${DATA_INSTALL_DIR}/partitionmanager)
diff -ru partitionmanager-svn/src/backend/corebackendmanager.cpp partitionmanager-svn-build/src/backend/corebackendmanager.cpp
--- partitionmanager-svn/src/backend/corebackendmanager.cpp 2013-01-16 17:10:20.530542447 +0000
+++ partitionmanager-svn-build/src/backend/corebackendmanager.cpp 2013-01-16 17:11:24.638561475 +0000
@@ -17,9 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
-#include "backend/corebackendmanager.h"
-#include "backend/corebackend.h"
-
#include <QStringList>
#include <QString>
@@ -31,6 +28,9 @@
#include <kservice.h>
#include <kservicetypetrader.h>
+#include <backend/corebackendmanager.h>
+#include <backend/corebackend.h>
+
#include <config.h>
CoreBackendManager::CoreBackendManager() :
@@ -66,11 +66,10 @@
{
m_Backend = factory->create<CoreBackend>(NULL);
backend()->setAboutData(factory->componentData().aboutData());
- kDebug() << "Loaded backend plugin: " << backend()->about().programName() << ", " << backend()->about().version();
return true;
}
- kWarning() << "Could not load plugin for core backend " << name << ": " << loader.errorString();
+ qWarning() << "Could not load plugin for core backend " << name << ": " << loader.errorString();
return false;
}
diff -ru partitionmanager-svn/src/backend/corebackendmanager.h partitionmanager-svn-build/src/backend/corebackendmanager.h
--- partitionmanager-svn/src/backend/corebackendmanager.h 2013-01-16 17:10:20.527209217 +0000
+++ partitionmanager-svn-build/src/backend/corebackendmanager.h 2013-01-16 17:11:24.638561475 +0000
@@ -21,6 +21,8 @@
#define COREBACKENDMANAGER__H
+#include <QDebug>
+
#include "util/libpartitionmanagerexport.h"
#include <kservice.h>
@@ -50,7 +52,7 @@
/**
* @return the name of the default backend plugin
*/
- static QString defaultBackendName() { return "pmlibpartedbackendplugin"; }
+ static QString defaultBackendName() { return "plugintribepmlibparted"; }
/**
* @return a list of available backend plugins
@@ -72,7 +74,7 @@
/**
* @return a pointer to the currently loaded backend
*/
- CoreBackend* backend() { return m_Backend; }
+ CoreBackend* backend() { return m_Backend; }
private:
CoreBackend* m_Backend;
diff -ru partitionmanager-svn/src/config/configurepageadvanced.ui partitionmanager-svn-build/src/config/configurepageadvanced.ui
--- partitionmanager-svn/src/config/configurepageadvanced.ui 2013-01-16 17:10:20.597207054 +0000
+++ partitionmanager-svn-build/src/config/configurepageadvanced.ui 2013-01-16 17:11:24.645227940 +0000
@@ -10,6 +10,9 @@
<height>420</height>
</rect>
</property>
+ <property name="windowTitle">
+ <string comment="KDE::DoNotExtract">Form</string>
+ </property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
diff -ru partitionmanager-svn/src/core/devicescanner.cpp partitionmanager-svn-build/src/core/devicescanner.cpp
--- partitionmanager-svn/src/core/devicescanner.cpp 2013-01-16 17:10:20.550541829 +0000
+++ partitionmanager-svn-build/src/core/devicescanner.cpp 2013-01-16 17:11:24.641894708 +0000
@@ -40,6 +40,7 @@
void DeviceScanner::setupConnections()
{
+ CoreBackendManager::self()->load("plugintribepmlibparted");
connect(CoreBackendManager::self()->backend(), SIGNAL(scanProgress(QString,int)), SIGNAL(progress(QString,int)));
}
diff -ru partitionmanager-svn/src/core/devicescanner.h partitionmanager-svn-build/src/core/devicescanner.h
--- partitionmanager-svn/src/core/devicescanner.h 2013-01-16 17:10:20.547208599 +0000
+++ partitionmanager-svn-build/src/core/devicescanner.h 2013-01-16 17:11:24.638561475 +0000
@@ -22,15 +22,17 @@
#include <QThread>
+#include "util/libpartitionmanagerexport.h"
+
class OperationStack;
-/** Thread to scan for all available Devices on this computer.
+/** @brief Thread to scan for all available Devices on this computer.
This class is used to find all Devices on the computer and to create new Device instances for each of them. It's subclassing QThread to run asynchronously.
@author Volker Lanz <vl@fidra.de>
*/
-class DeviceScanner : public QThread
+class LIBPARTITIONMANAGERPRIVATE_EXPORT DeviceScanner : public QThread
{
Q_OBJECT
diff -ru partitionmanager-svn/src/core/operationrunner.h partitionmanager-svn-build/src/core/operationrunner.h
--- partitionmanager-svn/src/core/operationrunner.h 2013-01-16 17:10:20.547208599 +0000
+++ partitionmanager-svn-build/src/core/operationrunner.h 2013-01-16 17:11:24.638561475 +0000
@@ -24,18 +24,19 @@
#include <QThread>
#include <QMutex>
#include <qglobal.h>
+#include "util/libpartitionmanagerexport.h"
class Operation;
class OperationStack;
class Report;
-/** Thread to run the Operations in the OperationStack.
+/** @brief Thread to run the Operations in the OperationStack.
Runs the OperationStack when the user applies operations.
@author Volker Lanz <vl@fidra.de>
*/
-class OperationRunner : public QThread
+class LIBPARTITIONMANAGERPRIVATE_EXPORT OperationRunner : public QThread
{
Q_OBJECT
Q_DISABLE_COPY(OperationRunner)
diff -ru partitionmanager-svn/src/core/operationstack.h partitionmanager-svn-build/src/core/operationstack.h
--- partitionmanager-svn/src/core/operationstack.h 2013-01-16 17:10:20.550541829 +0000
+++ partitionmanager-svn-build/src/core/operationstack.h 2013-01-16 17:11:24.638561475 +0000
@@ -26,20 +26,21 @@
#include <QReadWriteLock>
#include <qglobal.h>
+#include "util/libpartitionmanagerexport.h"
class Device;
class Partition;
class Operation;
class DeviceScanner;
-/** The list of Operations the user wants to have performed.
+/** @brief The list of Operations the user wants to have performed.
OperationStack also handles the Devices that were found on this computer and the merging of
Operations, e.g., when the user first creates a Partition, then deletes it.
@author Volker Lanz <vl@fidra.de>
*/
-class OperationStack : public QObject
+class LIBPARTITIONMANAGERPRIVATE_EXPORT OperationStack : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(OperationStack)
diff -ru partitionmanager-svn/src/core/partition.h partitionmanager-svn-build/src/core/partition.h
--- partitionmanager-svn/src/core/partition.h 2013-01-16 17:10:20.550541829 +0000
+++ partitionmanager-svn-build/src/core/partition.h 2013-01-16 17:11:24.641894708 +0000
@@ -101,6 +101,10 @@
friend class SetPartFlagsJob;
friend class RestoreFileSystemJob;
+ friend class PartitionManager;
+ friend class PartitionPage;
+ friend class PMHandler;
+
friend QTextStream& operator<<(QTextStream& stream, const Partition& p);
public:
diff -ru partitionmanager-svn/src/core/partitiontable.cpp partitionmanager-svn-build/src/core/partitiontable.cpp
--- partitionmanager-svn/src/core/partitiontable.cpp 2013-01-16 17:10:20.550541829 +0000
+++ partitionmanager-svn-build/src/core/partitiontable.cpp 2013-01-16 17:11:24.641894708 +0000
@@ -166,6 +166,7 @@
case PartitionTable::FlagPalo: return i18nc("@item partition flag", "palo");
case PartitionTable::FlagPrep: return i18nc("@item partition flag", "prep");
case PartitionTable::FlagMsftReserved: return i18nc("@item partition flag", "msft-reserved");
+ case PartitionTable::FlagBiosGrubBoot: return i18nc("@item partition flag", "bios_grub");
default:
break;
@@ -190,6 +191,7 @@
rval.append(PartitionTable::FlagPalo);
rval.append(PartitionTable::FlagPrep);
rval.append(PartitionTable::FlagMsftReserved);
+ rval.append(PartitionTable::FlagBiosGrubBoot);
return rval;
}
diff -ru partitionmanager-svn/src/core/partitiontable.h partitionmanager-svn-build/src/core/partitiontable.h
--- partitionmanager-svn/src/core/partitiontable.h 2013-01-16 17:10:20.547208599 +0000
+++ partitionmanager-svn-build/src/core/partitiontable.h 2013-01-16 17:11:24.638561475 +0000
@@ -83,7 +83,8 @@
FlagHpService = 128,
FlagPalo = 256,
FlagPrep = 512,
- FlagMsftReserved = 1024
+ FlagMsftReserved = 1024,
+ FlagBiosGrubBoot = 2048
};
Q_DECLARE_FLAGS(Flags, Flag)
diff -ru partitionmanager-svn/src/fs/filesystem.h partitionmanager-svn-build/src/fs/filesystem.h
--- partitionmanager-svn/src/fs/filesystem.h 2013-01-16 17:10:20.647205510 +0000
+++ partitionmanager-svn-build/src/fs/filesystem.h 2013-01-16 17:11:24.645227940 +0000
@@ -27,18 +27,19 @@
#include <QStringList>
#include <QString>
#include <QList>
+#include "util/libpartitionmanagerexport.h"
class Device;
class Report;
-/** Base class for all FileSystems.
+/** @brief Base class for all FileSystems.
Represents a file system and handles support for various types of operations that can
be performed on those.
@author Volker Lanz <vl@fidra.de>
*/
-class FileSystem
+class LIBPARTITIONMANAGERPRIVATE_EXPORT FileSystem
{
Q_DISABLE_COPY(FileSystem)
diff -ru partitionmanager-svn/src/gui/devicepropswidgetbase.ui partitionmanager-svn-build/src/gui/devicepropswidgetbase.ui
--- partitionmanager-svn/src/gui/devicepropswidgetbase.ui 2013-01-16 17:10:20.510543065 +0000
+++ partitionmanager-svn-build/src/gui/devicepropswidgetbase.ui 2013-01-16 17:11:24.635228243 +0000
@@ -10,6 +10,9 @@
<height>361</height>
</rect>
</property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="PartTableWidget" name="m_PartTableWidget" native="true">
diff -ru partitionmanager-svn/src/gui/partpropswidgetbase.ui partitionmanager-svn-build/src/gui/partpropswidgetbase.ui
--- partitionmanager-svn/src/gui/partpropswidgetbase.ui 2013-01-16 17:10:20.513876295 +0000
+++ partitionmanager-svn-build/src/gui/partpropswidgetbase.ui 2013-01-16 17:11:24.638561475 +0000
@@ -10,6 +10,9 @@
<height>502</height>
</rect>
</property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="PartWidget" name="m_PartWidget" native="true">
diff -ru partitionmanager-svn/src/gui/sizedialogwidgetbase.ui partitionmanager-svn-build/src/gui/sizedialogwidgetbase.ui
--- partitionmanager-svn/src/gui/sizedialogwidgetbase.ui 2013-01-16 17:10:20.513876295 +0000
+++ partitionmanager-svn-build/src/gui/sizedialogwidgetbase.ui 2013-01-16 17:11:24.635228243 +0000
@@ -10,6 +10,9 @@
<height>347</height>
</rect>
</property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="PartResizerWidget" name="m_PartResizerWidget" native="true">
diff -ru partitionmanager-svn/src/ops/createfilesystemoperation.h partitionmanager-svn-build/src/ops/createfilesystemoperation.h
--- partitionmanager-svn/src/ops/createfilesystemoperation.h 2013-01-16 17:10:20.587207363 +0000
+++ partitionmanager-svn-build/src/ops/createfilesystemoperation.h 2013-01-16 17:11:24.641894708 +0000
@@ -21,6 +21,8 @@
#define CREATEFILESYSTEMOPERATION__H
+#include "util/libpartitionmanagerexport.h"
+
#include "ops/operation.h"
#include "fs/filesystem.h"
@@ -34,13 +36,13 @@
class CreateFileSystemJob;
class CheckFileSystemJob;
-/** Create a FileSystem.
+/** @brief Create a FileSystem.
Creates a FileSystem on a given Partition and Device.
@author Volker Lanz <vl@fidra.de>
*/
-class CreateFileSystemOperation : public Operation
+class LIBPARTITIONMANAGERPRIVATE_EXPORT CreateFileSystemOperation : public Operation
{
friend class OperationStack;
diff -ru partitionmanager-svn/src/ops/deleteoperation.h partitionmanager-svn-build/src/ops/deleteoperation.h
--- partitionmanager-svn/src/ops/deleteoperation.h 2013-01-16 17:10:20.590540593 +0000
+++ partitionmanager-svn-build/src/ops/deleteoperation.h 2013-01-16 17:11:24.645227940 +0000
@@ -22,6 +22,7 @@
#define DELETEOPERATION__H
#include "ops/operation.h"
+#include "util/libpartitionmanagerexport.h"
#include <QString>
@@ -35,7 +36,7 @@
/** Delete a Partition.
@author Volker Lanz <vl@fidra.de>
*/
-class DeleteOperation : public Operation
+class LIBPARTITIONMANAGERPRIVATE_EXPORT DeleteOperation : public Operation
{
friend class OperationStack;
diff -ru partitionmanager-svn/src/ops/newoperation.h partitionmanager-svn-build/src/ops/newoperation.h
--- partitionmanager-svn/src/ops/newoperation.h 2013-01-16 17:10:20.590540593 +0000
+++ partitionmanager-svn-build/src/ops/newoperation.h 2013-01-16 17:11:24.641894708 +0000
@@ -22,6 +22,7 @@
#define NEWOPERATION__H
#include "ops/operation.h"
+#include "util/libpartitionmanagerexport.h"
#include <QString>
@@ -34,13 +35,13 @@
class SetPartFlagsJob;
class CheckFileSystemJob;
-/** Create a Partition.
+/** @brief Create a Partition.
Creates the given Partition on the given Device.
@author Volker Lanz <vl@fidra.de>
*/
-class NewOperation : public Operation
+class LIBPARTITIONMANAGERPRIVATE_EXPORT NewOperation : public Operation
{
friend class OperationStack;
diff -ru partitionmanager-svn/src/ops/resizeoperation.h partitionmanager-svn-build/src/ops/resizeoperation.h
--- partitionmanager-svn/src/ops/resizeoperation.h 2013-01-16 17:10:20.590540593 +0000
+++ partitionmanager-svn-build/src/ops/resizeoperation.h 2013-01-16 17:11:24.641894708 +0000
@@ -24,6 +24,7 @@
#include "ops/operation.h"
#include "core/partition.h"
+#include "util/libpartitionmanagerexport.h"
#include <QString>
@@ -47,7 +48,7 @@
@author Volker Lanz <vl@fidra.de>
*/
-class ResizeOperation : public Operation
+class LIBPARTITIONMANAGERPRIVATE_EXPORT ResizeOperation : public Operation
{
friend class OperationStack;
diff -ru partitionmanager-svn/src/plugins/dummy/CMakeLists.txt partitionmanager-svn-build/src/plugins/dummy/CMakeLists.txt
--- partitionmanager-svn/src/plugins/dummy/CMakeLists.txt 2013-01-16 17:10:20.403879694 +0000
+++ partitionmanager-svn-build/src/plugins/dummy/CMakeLists.txt 2013-01-16 17:11:24.635228243 +0000
@@ -19,7 +19,7 @@
kde4_add_plugin(pmdummybackendplugin ${pmdummybackendplugin_SRCS})
-target_link_libraries(pmdummybackendplugin partitionmanagerprivate ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${LIBPARTED_LIBS} ${BLKID_LIBRARIES} ${KDE4_SOLID_LIBS})
+target_link_libraries(pmdummybackendplugin tribepartitionmanager ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${LIBPARTED_LIBS} ${BLKID_LIBRARIES} ${KDE4_SOLID_LIBS})
install(TARGETS pmdummybackendplugin DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES pmdummybackendplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR})
diff -ru partitionmanager-svn/src/plugins/libparted/CMakeLists.txt partitionmanager-svn-build/src/plugins/libparted/CMakeLists.txt
--- partitionmanager-svn/src/plugins/libparted/CMakeLists.txt 2013-01-16 17:10:20.397213233 +0000
+++ partitionmanager-svn-build/src/plugins/libparted/CMakeLists.txt 2013-01-16 17:11:24.635228243 +0000
@@ -29,9 +29,11 @@
file (GLOB pmlibpartedbackendplugin_SRCS *.cpp)
-kde4_add_plugin(pmlibpartedbackendplugin ${pmlibpartedbackendplugin_SRCS})
+kde4_add_library(plugintribepmlibparted SHARED ${pmlibpartedbackendplugin_SRCS})
-target_link_libraries(pmlibpartedbackendplugin partitionmanagerprivate ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${LIBPARTED_LIBS} ${BLKID_LIBRARIES} ${KDE4_SOLID_LIBS})
+target_link_libraries(plugintribepmlibparted tribepartitionmanager ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${LIBPARTED_LIBS} ${BLKID_LIBRARIES} ${KDE4_SOLID_LIBS})
-install(TARGETS pmlibpartedbackendplugin DESTINATION ${PLUGIN_INSTALL_DIR})
+set_target_properties(plugintribepmlibparted PROPERTIES PREFIX "")
+
+install(TARGETS plugintribepmlibparted DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES pmlibpartedbackendplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR})
diff -ru partitionmanager-svn/src/plugins/libparted/libpartedbackend.cpp partitionmanager-svn-build/src/plugins/libparted/libpartedbackend.cpp
--- partitionmanager-svn/src/plugins/libparted/libpartedbackend.cpp 2013-01-16 17:10:20.397213233 +0000
+++ partitionmanager-svn-build/src/plugins/libparted/libpartedbackend.cpp 2013-01-16 17:11:24.635228243 +0000
@@ -20,6 +20,8 @@
/** @file
*/
+#include <QDebug>
+
#include "plugins/libparted/libpartedbackend.h"
#include "plugins/libparted/libparteddevice.h"
@@ -57,6 +59,9 @@
#include <unistd.h>
#include <blkid/blkid.h>
+#include "../../config.h"
+
+
K_PLUGIN_FACTORY(LibPartedBackendFactory, registerPlugin<LibPartedBackend>(); )
static KAboutData createPluginAboutData()
@@ -94,7 +99,8 @@
{ PED_PARTITION_HPSERVICE, PartitionTable::FlagHpService },
{ PED_PARTITION_PALO, PartitionTable::FlagPalo },
{ PED_PARTITION_PREP, PartitionTable::FlagPrep },
- { PED_PARTITION_MSFT_RESERVED, PartitionTable::FlagMsftReserved }
+ { PED_PARTITION_MSFT_RESERVED, PartitionTable::FlagMsftReserved },
+ { PED_PARTITION_BIOS_GRUB, PartitionTable::FlagBiosGrubBoot }
};
/** Callback to handle exceptions from libparted
@@ -385,9 +391,10 @@
partitions.append(part);
}
+ Config::instance("partitionmanagerrc");
d.partitionTable()->updateUnallocated(d);
- if (d.partitionTable()->isSectorBased(d))
+ if (d.partitionTable()->isSectorBased(d))
d.partitionTable()->setType(d, PartitionTable::msdos_sectorbased);
foreach(const Partition* part, partitions)
diff -ru partitionmanager-svn/src/plugins/libparted/pmlibpartedbackendplugin.desktop partitionmanager-svn-build/src/plugins/libparted/pmlibpartedbackendplugin.desktop
--- partitionmanager-svn/src/plugins/libparted/pmlibpartedbackendplugin.desktop 2013-01-16 17:10:20.397213233 +0000
+++ partitionmanager-svn-build/src/plugins/libparted/pmlibpartedbackendplugin.desktop 2013-01-16 17:11:24.635228243 +0000
@@ -77,8 +77,8 @@
ServiceTypes=PartitionManager/Plugin
Icon=preferences-plugin
-X-KDE-Library=pmlibpartedbackendplugin
-X-KDE-PluginInfo-Name=pmlibpartedbackendplugin
+X-KDE-Library=plugintribepmlibparted
+X-KDE-PluginInfo-Name=plugintribepmlibparted
X-KDE-PluginInfo-Author=Volker Lanz
X-KDE-PluginInfo-Email=vl@fidra.de
X-KDE-PluginInfo-License=GPL
diff -ru partitionmanager-svn/src/util/capacity.h partitionmanager-svn-build/src/util/capacity.h
--- partitionmanager-svn/src/util/capacity.h 2013-01-16 17:10:20.653871970 +0000
+++ partitionmanager-svn-build/src/util/capacity.h 2013-01-16 17:11:24.645227940 +0000
@@ -25,15 +25,16 @@
class Device;
#include <qglobal.h>
+#include "util/libpartitionmanagerexport.h"
-/** Represent any kind of capacity.
+/** @brief Represent any kind of capacity.
Any kind of capacity that can be expressed in units of Byte, KiB, MiB and so on. Also prints
capacities in nicely formatted ways.
@author Volker Lanz <vl@fidra.de>
*/
-class Capacity
+class LIBPARTITIONMANAGERPRIVATE_EXPORT Capacity
{
public:
/** Units we can deal with */
diff -ru partitionmanager-svn/src/util/helpers.cpp partitionmanager-svn-build/src/util/helpers.cpp
--- partitionmanager-svn/src/util/helpers.cpp 2013-01-16 17:10:20.653871970 +0000
+++ partitionmanager-svn-build/src/util/helpers.cpp 2013-01-16 17:11:24.645227940 +0000
@@ -191,14 +191,14 @@ void showColumnsContextMenu(const QPoint
bool loadBackend()
{
- if (CoreBackendManager::self()->load(Config::backend()) == false)
+ if (CoreBackendManager::self()->load("plugintribepmlibparted") == false)
{
if (CoreBackendManager::self()->load(CoreBackendManager::defaultBackendName()))
{
KMessageBox::sorry(NULL,
i18nc("@info", "<para>The configured backend plugin \"%1\" could not be loaded.</para>"
"<para>Loading the default backend plugin \"%2\" instead.</para>",
- Config::backend(), CoreBackendManager::defaultBackendName()),
+ "tribepmlibparted", CoreBackendManager::defaultBackendName()),
i18nc("@title:window", "Error: Could Not Load Backend Plugin"));
Config::setBackend(CoreBackendManager::defaultBackendName());
}
@@ -207,7 +207,7 @@ bool loadBackend()
KMessageBox::error(NULL,
i18nc("@info", "<para>Neither the configured (\"%1\") nor the default (\"%2\") backend "
"plugin could be loaded.</para><para>Please check your installation.</para>",
- Config::backend(), CoreBackendManager::defaultBackendName()),
+ "tribepmlibparted", CoreBackendManager::defaultBackendName()),
i18nc("@title:window", "Error: Could Not Load Backend Plugin"));
return false;
}
@@ -241,30 +241,30 @@ QList<Solid::Device> getSolidDeviceList(
"[ StorageDrive.driveType == 'SdMmc' OR StorageDrive.driveType == 'Xd'] ]";
#endif
- KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
- if (args->count() > 0)
- {
- predicate = " [ " + predicate + " AND ";
-
- qint32 brackets = (args->count() + 1) / 2;
- brackets = args->count() == 1 ? 0 : brackets;
- for (qint32 i = 0; i < brackets; i++)
- predicate += "[ ";
-
- bool right_bracket = false;
- for (qint32 i = 0; i < args->count(); i++, right_bracket =! right_bracket)
- {
- predicate += QString("Block.device == '%1' ").arg(args->arg(i));
-
- if (right_bracket)
- predicate += i == 1 ? "] " : "] ] ";
- if (i < args->count() - 1)
- predicate += "OR ";
- if (right_bracket && i != args->count() - 2 && i != args->count()-1)
- predicate += "[ ";
- }
- predicate += right_bracket && brackets > 0 ? "] ]" : "]";
- }
+// KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
+// if (args->count() > 0)
+// {
+// predicate = " [ " + predicate + " AND ";
+//
+// qint32 brackets = (args->count() + 1) / 2;
+// brackets = args->count() == 1 ? 0 : brackets;
+// for (qint32 i = 0; i < brackets; i++)
+// predicate += "[ ";
+//
+// bool right_bracket = false;
+// for (qint32 i = 0; i < args->count(); i++, right_bracket =! right_bracket)
+// {
+// predicate += QString("Block.device == '%1' ").arg(args->arg(i));
+//
+// if (right_bracket)
+// predicate += i == 1 ? "] " : "] ] ";
+// if (i < args->count() - 1)
+// predicate += "OR ";
+// if (right_bracket && i != args->count() - 2 && i != args->count()-1)
+// predicate += "[ ";
+// }
+// predicate += right_bracket && brackets > 0 ? "] ]" : "]";
+// }
return Solid::Device::listFromQuery(predicate);
}