Merge branch 'f17' into f16
This commit is contained in:
commit
8e30ea3629
|
@ -1,2 +1,3 @@
|
|||
/kdelibs-4.6.5.tar.bz2
|
||||
/kdelibs-4.8.3.tar.xz
|
||||
/kdelibs-4.8.4.tar.xz
|
||||
|
|
|
@ -1,28 +1,7 @@
|
|||
From 00a8b22ad6dbb03eea18090f6d9f578101632752 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <00a8b22ad6dbb03eea18090f6d9f578101632752.1313007841.git.kevin.kofler@chello.at>
|
||||
From: Kevin Kofler <kevin.kofler@chello.at>
|
||||
Date: Wed, 10 Aug 2011 21:48:19 +0200
|
||||
Subject: [PATCH] Trigger installation of missing components when installing a
|
||||
package.
|
||||
|
||||
For script engines, the existing metadata (X-Plasma-API) is sufficient.
|
||||
|
||||
For data engines, we introduce a new metadata entry:
|
||||
X-Plasma-RequiredDataEngines. Third-party packages will have to add this entry
|
||||
to benefit from this feature at this time. Automatic support for scanning
|
||||
package source code on installation (at least for some languages) is planned,
|
||||
but the metadata entry is definitely the most efficient method.
|
||||
---
|
||||
plasma/package.cpp | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
plasma/packagemetadata.cpp | 13 +++++++++++++
|
||||
plasma/packagemetadata.h | 7 +++++++
|
||||
3 files changed, 59 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/plasma/package.cpp b/plasma/package.cpp
|
||||
index 4c00d36..0a45c87 100644
|
||||
--- a/plasma/package.cpp
|
||||
+++ b/plasma/package.cpp
|
||||
@@ -49,8 +49,11 @@
|
||||
diff -up kdelibs-4.8.4/plasma/package.cpp.libplasma-pk-0002 kdelibs-4.8.4/plasma/package.cpp
|
||||
--- kdelibs-4.8.4/plasma/package.cpp.libplasma-pk-0002 2012-06-01 14:28:39.306441886 +0200
|
||||
+++ kdelibs-4.8.4/plasma/package.cpp 2012-06-06 11:19:01.239154039 +0200
|
||||
@@ -43,8 +43,11 @@
|
||||
#include <kdebug.h>
|
||||
|
||||
#include "authorizationmanager.h"
|
||||
|
@ -34,7 +13,7 @@ index 4c00d36..0a45c87 100644
|
|||
#include "private/package_p.h"
|
||||
#include "private/plasmoidservice_p.h"
|
||||
#include "private/service_p.h"
|
||||
@@ -603,6 +606,42 @@ bool Package::installPackage(const QString &package,
|
||||
@@ -581,6 +584,42 @@ bool Package::installPackage(const QStri
|
||||
tempdir.setAutoRemove(false);
|
||||
}
|
||||
|
||||
|
@ -76,11 +55,10 @@ index 4c00d36..0a45c87 100644
|
|||
+
|
||||
if (!servicePrefix.isEmpty()) {
|
||||
// and now we register it as a service =)
|
||||
QString metaPath = targetName + "/metadata.desktop";
|
||||
diff --git a/plasma/packagemetadata.cpp b/plasma/packagemetadata.cpp
|
||||
index 59163b2..8cfaf64 100644
|
||||
--- a/plasma/packagemetadata.cpp
|
||||
+++ b/plasma/packagemetadata.cpp
|
||||
kDebug() << "************************** 1";
|
||||
diff -up kdelibs-4.8.4/plasma/packagemetadata.cpp.libplasma-pk-0002 kdelibs-4.8.4/plasma/packagemetadata.cpp
|
||||
--- kdelibs-4.8.4/plasma/packagemetadata.cpp.libplasma-pk-0002 2011-12-21 01:14:57.000000000 +0100
|
||||
+++ kdelibs-4.8.4/plasma/packagemetadata.cpp 2012-06-06 11:14:36.743181062 +0200
|
||||
@@ -52,6 +52,7 @@ class PackageMetadataPrivate
|
||||
QString serviceType;
|
||||
QString api;
|
||||
|
@ -89,7 +67,7 @@ index 59163b2..8cfaf64 100644
|
|||
};
|
||||
|
||||
PackageMetadata::PackageMetadata(const PackageMetadata &other)
|
||||
@@ -106,6 +107,7 @@ void PackageMetadata::write(const QString &filename) const
|
||||
@@ -108,6 +109,7 @@ void PackageMetadata::write(const QStrin
|
||||
config.writeEntry("X-KDE-ParentApp", d->app);
|
||||
config.writeEntry("Type", d->type);
|
||||
config.writeEntry("X-Plasma-RemoteLocation", d->location);
|
||||
|
@ -97,7 +75,7 @@ index 59163b2..8cfaf64 100644
|
|||
}
|
||||
|
||||
void PackageMetadata::read(const QString &filename)
|
||||
@@ -133,6 +135,7 @@ void PackageMetadata::read(const QString &filename)
|
||||
@@ -154,6 +156,7 @@ void PackageMetadata::read(const QString
|
||||
d->app = config.readEntry("X-KDE-ParentApp", d->app);
|
||||
d->type = config.readEntry("Type", d->type);
|
||||
d->location = config.readEntry("X-Plasma-RemoteLocation", d->location);
|
||||
|
@ -105,7 +83,7 @@ index 59163b2..8cfaf64 100644
|
|||
}
|
||||
|
||||
QString PackageMetadata::name() const
|
||||
@@ -225,6 +228,11 @@ QString PackageMetadata::implementationApi() const
|
||||
@@ -246,6 +249,11 @@ QString PackageMetadata::implementationA
|
||||
return d->api;
|
||||
}
|
||||
|
||||
|
@ -117,7 +95,7 @@ index 59163b2..8cfaf64 100644
|
|||
void PackageMetadata::setImplementationApi(const QString &api)
|
||||
{
|
||||
d->api = api;
|
||||
@@ -300,6 +308,11 @@ void PackageMetadata::setRemoteLocation(const KUrl &location)
|
||||
@@ -321,6 +329,11 @@ void PackageMetadata::setRemoteLocation(
|
||||
d->location = location;
|
||||
}
|
||||
|
||||
|
@ -129,10 +107,9 @@ index 59163b2..8cfaf64 100644
|
|||
void PackageMetadata::setType(const QString &type)
|
||||
{
|
||||
d->type = type;
|
||||
diff --git a/plasma/packagemetadata.h b/plasma/packagemetadata.h
|
||||
index b10f0e4..ec396a6 100644
|
||||
--- a/plasma/packagemetadata.h
|
||||
+++ b/plasma/packagemetadata.h
|
||||
diff -up kdelibs-4.8.4/plasma/packagemetadata.h.libplasma-pk-0002 kdelibs-4.8.4/plasma/packagemetadata.h
|
||||
--- kdelibs-4.8.4/plasma/packagemetadata.h.libplasma-pk-0002 2011-07-27 20:34:38.705247040 +0200
|
||||
+++ kdelibs-4.8.4/plasma/packagemetadata.h 2012-06-06 11:14:36.743181062 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
#define PLASMA_PACKAGEMETADATA_H
|
||||
|
||||
|
@ -161,6 +138,3 @@ index b10f0e4..ec396a6 100644
|
|||
private:
|
||||
PackageMetadataPrivate * const d;
|
||||
};
|
||||
--
|
||||
1.7.4.4
|
||||
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
diff -up kdelibs-4.8.3/CMakeLists.txt.webkit kdelibs-4.8.3/CMakeLists.txt
|
||||
--- kdelibs-4.8.3/CMakeLists.txt.webkit 2012-04-29 22:38:24.266748427 +0200
|
||||
+++ kdelibs-4.8.3/CMakeLists.txt 2012-05-04 12:35:38.086634268 +0200
|
||||
@@ -325,7 +325,6 @@ if(NOT WINCE)
|
||||
add_subdirectory( plasma )
|
||||
endif(NOT WINCE)
|
||||
add_subdirectory( kunitconversion )
|
||||
-add_subdirectory( kdewebkit )
|
||||
add_subdirectory( includes )
|
||||
|
||||
add_subdirectory( experimental )
|
||||
diff -up kdelibs-4.8.3/kdewidgets/CMakeLists.txt.webkit kdelibs-4.8.3/kdewidgets/CMakeLists.txt
|
||||
--- kdelibs-4.8.3/kdewidgets/CMakeLists.txt.webkit 2012-05-04 12:35:38.000000000 +0200
|
||||
+++ kdelibs-4.8.3/kdewidgets/CMakeLists.txt 2012-05-04 12:37:23.482261882 +0200
|
||||
@@ -88,41 +88,6 @@ if(QT_QTDESIGNER_FOUND)
|
||||
install(TARGETS kdedeprecated DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer )
|
||||
endif(NOT KDE_NO_DEPRECATED)
|
||||
|
||||
-
|
||||
- # kdewebkit widgets
|
||||
- include_directories(
|
||||
- ${CMAKE_SOURCE_DIR}/kdewebkit
|
||||
- )
|
||||
-
|
||||
- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kdewebkitwidgets.cpp
|
||||
- COMMAND "${MAKEKDEWIDGETS_EXECUTABLE}" -o ${CMAKE_CURRENT_BINARY_DIR}/kdewebkitwidgets.cpp ${CMAKE_CURRENT_SOURCE_DIR}/kdewebkit.widgets
|
||||
- MAIN_DEPENDENCY kdewebkit.widgets DEPENDS makekdewidgets4)
|
||||
-
|
||||
- set(kdewebkitwidgets_PART_SRCS
|
||||
- classpreviews.cpp
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/kdewebkitwidgets.cpp
|
||||
- )
|
||||
-
|
||||
- qt4_generate_moc(${CMAKE_CURRENT_BINARY_DIR}/kdewebkitwidgets.cpp ${CMAKE_CURRENT_BINARY_DIR}/kdewebkitwidgets.moc)
|
||||
-
|
||||
-
|
||||
- qt4_add_resources(kdewebkitwidgets_PART_SRCS kdewebkitwidgets.qrc)
|
||||
-
|
||||
- kde4_add_plugin(kdewebkitwidgets ${kdewebkitwidgets_PART_SRCS})
|
||||
-
|
||||
- target_link_libraries(kdewebkitwidgets ${KDE4_KDEUI_LIBS} ${KDE4_KDEWEBKIT_LIBS} ${QT_QTWEBKIT_LIBRARY})
|
||||
-# if(NOT WIN32)
|
||||
-# set_target_properties(kdewebkitwidgets PROPERTIES
|
||||
-# INSTALL_RPATH_USE_LINK_PATH TRUE
|
||||
-# SKIP_BUILD_RPATH TRUE
|
||||
-# BUILD_WITH_INSTALL_RPATH TRUE
|
||||
-# INSTALL_RPATH ${LIB_INSTALL_DIR}
|
||||
-# )
|
||||
-# endif(NOT WIN32)
|
||||
-
|
||||
- install(TARGETS kdewebkitwidgets DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer )
|
||||
-
|
||||
-
|
||||
if (QT_QT3SUPPORT_FOUND)
|
||||
|
||||
include_directories(
|
||||
diff -up kdelibs-4.8.3/plasma/CMakeLists.txt.webkit kdelibs-4.8.3/plasma/CMakeLists.txt
|
||||
--- kdelibs-4.8.3/plasma/CMakeLists.txt.webkit 2012-02-29 22:55:52.532149866 +0100
|
||||
+++ kdelibs-4.8.3/plasma/CMakeLists.txt 2012-05-04 12:35:38.088634242 +0200
|
||||
@@ -10,6 +10,8 @@ if(KDE_PLATFORM_FEATURE_BINARY_COMPATIBL
|
||||
set(PLASMA_NO_GLOBAL_SHORTCUTS TRUE)
|
||||
endif(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION)
|
||||
|
||||
+set(PLASMA_NO_KDEWEBKIT TRUE)
|
||||
+
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${KDE4_KDECORE_INCLUDES}
|
||||
${KDE4_KDEUI_INCLUDES}
|
||||
@@ -114,7 +116,6 @@ set(plasma_LIB_SRCS
|
||||
framesvg.cpp
|
||||
plasma.cpp
|
||||
popupapplet.cpp
|
||||
- private/animablegraphicswebview.cpp
|
||||
private/applethandle.cpp
|
||||
private/associatedapplicationmanager.cpp
|
||||
private/datacontainer_p.cpp
|
||||
@@ -202,7 +203,6 @@ set(plasma_LIB_SRCS
|
||||
widgets/textbrowser.cpp
|
||||
widgets/treeview.cpp
|
||||
widgets/textedit.cpp
|
||||
- widgets/webview.cpp
|
||||
|
||||
#Temporary QtJolie branch
|
||||
private/qtjolie-branch/qtjolie/abstractadaptor.cpp
|
||||
@@ -266,7 +266,7 @@ endif(PHONON_FOUND)
|
||||
|
||||
kde4_add_library(plasma ${LIBRARY_TYPE} ${plasma_LIB_SRCS})
|
||||
|
||||
-target_link_libraries(plasma ${QT_QTUITOOLS_LIBRARY} ${QT_QTWEBKIT_LIBRARY}
|
||||
+target_link_libraries(plasma ${QT_QTUITOOLS_LIBRARY}
|
||||
${QT_QTSCRIPT_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTSQL_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY}
|
||||
${KDE4_KDEUI_LIBS} ${KDE4_KDNSSD_LIBS} ${KDE4_THREADWEAVER_LIBS} ${PLASMA_EXTRA_LIBS})
|
||||
|
||||
@@ -406,7 +406,6 @@ install(FILES
|
||||
widgets/textbrowser.h
|
||||
widgets/treeview.h
|
||||
widgets/textedit.h
|
||||
- widgets/webview.h
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/widgets COMPONENT Devel)
|
||||
|
||||
install(FILES
|
|
@ -1,118 +1,3 @@
|
|||
diff --git a/tier1/solid/src/solid/CMakeLists.txt b/tier1/solid/src/solid/CMakeLists.txt
|
||||
index 5deadcf..40af6bc 100644
|
||||
--- a/tier1/solid/src/solid/CMakeLists.txt
|
||||
+++ b/tier1/solid/src/solid/CMakeLists.txt
|
||||
@@ -32,7 +32,6 @@ configure_file(config-processor.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-proce
|
||||
|
||||
file(MAKE_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR}/backends/fakehw
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/backends/hal
|
||||
${CMAKE_CURRENT_BINARY_DIR}/backends/udev
|
||||
${CMAKE_CURRENT_BINARY_DIR}/backends/wmi
|
||||
)
|
||||
@@ -198,33 +197,6 @@ if(NOT WIN32 AND NOT APPLE)
|
||||
endif( UDEV_FOUND )
|
||||
|
||||
|
||||
- message(STATUS "Building Solid HAL backend." )
|
||||
- set(solid_LIB_SRCS ${solid_LIB_SRCS}
|
||||
- backends/hal/halacadapter.cpp
|
||||
- backends/hal/halaudiointerface.cpp
|
||||
- backends/hal/halbattery.cpp
|
||||
- backends/hal/halblock.cpp
|
||||
- backends/hal/halbutton.cpp
|
||||
- backends/hal/halcamera.cpp
|
||||
- backends/hal/halcdrom.cpp
|
||||
- backends/hal/haldeviceinterface.cpp
|
||||
- backends/hal/haldvbinterface.cpp
|
||||
- backends/hal/halfstabhandling.cpp
|
||||
- backends/hal/halgenericinterface.cpp
|
||||
- backends/hal/haldevice.cpp
|
||||
- backends/hal/halmanager.cpp
|
||||
- backends/hal/halnetworkinterface.cpp
|
||||
- backends/hal/halserialinterface.cpp
|
||||
- backends/hal/halopticaldisc.cpp
|
||||
- backends/hal/halportablemediaplayer.cpp
|
||||
- backends/hal/halprocessor.cpp
|
||||
- backends/hal/halstorageaccess.cpp
|
||||
- backends/hal/halstorage.cpp
|
||||
- backends/hal/halvideo.cpp
|
||||
- backends/hal/halvolume.cpp
|
||||
- backends/hal/halsmartcardreader.cpp
|
||||
- )
|
||||
-
|
||||
message(STATUS "Building Solid UPower backend." )
|
||||
set(solid_LIB_SRCS ${solid_LIB_SRCS}
|
||||
backends/upower/upowermanager.cpp
|
||||
@@ -237,18 +209,19 @@ if(NOT WIN32 AND NOT APPLE)
|
||||
|
||||
# FIXME: this should work on more Unix systems
|
||||
if (CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||
- message(STATUS "Building Solid UDisks backend." )
|
||||
+ message(STATUS "Building Solid UDisks2 backend." )
|
||||
set(solid_LIB_SRCS ${solid_LIB_SRCS}
|
||||
- backends/udisks/udisksmanager.cpp
|
||||
- backends/udisks/udisksdevice.cpp
|
||||
- backends/udisks/udisksblock.cpp
|
||||
- backends/udisks/udisksstoragevolume.cpp
|
||||
- backends/udisks/udisksdeviceinterface.cpp
|
||||
- backends/udisks/udisksopticaldisc.cpp
|
||||
- backends/udisks/udisksopticaldrive.cpp
|
||||
- backends/udisks/udisksstoragedrive.cpp
|
||||
- backends/udisks/udisksstorageaccess.cpp
|
||||
- backends/udisks/udisksgenericinterface.cpp
|
||||
+ backends/udisks2/udisksmanager.cpp
|
||||
+ backends/udisks2/udisksdevice.cpp
|
||||
+ backends/udisks2/udisksblock.cpp
|
||||
+ backends/udisks2/udisksstoragevolume.cpp
|
||||
+ backends/udisks2/udisksdeviceinterface.cpp
|
||||
+ backends/udisks2/udisksopticaldisc.cpp
|
||||
+ backends/udisks2/udisksopticaldrive.cpp
|
||||
+ backends/udisks2/udisksstoragedrive.cpp
|
||||
+ backends/udisks2/udisksstorageaccess.cpp
|
||||
+ backends/udisks2/udisksgenericinterface.cpp
|
||||
+ backends/udisks2/dbus/manager.cpp
|
||||
)
|
||||
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||
|
||||
diff --git a/tier1/solid/src/solid/managerbase.cpp b/tier1/solid/src/solid/managerbase.cpp
|
||||
index e228b48..7a7cc7d 100644
|
||||
--- a/tier1/solid/src/solid/managerbase.cpp
|
||||
+++ b/tier1/solid/src/solid/managerbase.cpp
|
||||
@@ -30,8 +30,7 @@
|
||||
#if defined (Q_OS_MAC)
|
||||
#include "backends/iokit/iokitmanager.h"
|
||||
#elif defined (Q_OS_UNIX)
|
||||
-#include "backends/hal/halmanager.h"
|
||||
-#include "backends/udisks/udisksmanager.h"
|
||||
+#include "backends/udisks2/udisksmanager.h"
|
||||
#include "backends/upower/upowermanager.h"
|
||||
|
||||
#if defined (HUPNP_FOUND)
|
||||
@@ -71,22 +70,13 @@ void Solid::ManagerBasePrivate::loadBackends()
|
||||
# elif defined(Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
|
||||
m_backends << new Solid::Backends::Wmi::WmiManager(0);
|
||||
|
||||
-# elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
|
||||
- m_backends << new Solid::Backends::Hal::HalManager(0);
|
||||
-
|
||||
# elif defined(Q_OS_LINUX)
|
||||
- bool solidHalLegacyEnabled
|
||||
- = QString::fromLocal8Bit(qgetenv("SOLID_HAL_LEGACY")).toInt()==1;
|
||||
- if (solidHalLegacyEnabled) {
|
||||
- m_backends << new Solid::Backends::Hal::HalManager(0);
|
||||
- } else {
|
||||
# if defined(UDEV_FOUND)
|
||||
m_backends << new Solid::Backends::UDev::UDevManager(0);
|
||||
# endif
|
||||
- m_backends << new Solid::Backends::UDisks::UDisksManager(0)
|
||||
+ m_backends << new Solid::Backends::UDisks2::Manager(0)
|
||||
<< new Solid::Backends::UPower::UPowerManager(0)
|
||||
<< new Solid::Backends::Fstab::FstabManager(0);
|
||||
- }
|
||||
# endif
|
||||
|
||||
# if defined (HUPNP_FOUND)
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/dbus/manager.cpp b/tier1/solid/src/solid/backends/udisks2/dbus/manager.cpp
|
||||
new file mode 100644
|
||||
index 0000000..7ea4aa8
|
||||
|
@ -322,10 +207,10 @@ index 0000000..25a1dc0
|
|||
+#endif // SOLID_BACKENDS_UDISKS2_H
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/udisksblock.cpp b/tier1/solid/src/solid/backends/udisks2/udisksblock.cpp
|
||||
new file mode 100644
|
||||
index 0000000..8a7a0b5
|
||||
index 0000000..c27b1c4
|
||||
--- /dev/null
|
||||
+++ b/tier1/solid/src/solid/backends/udisks2/udisksblock.cpp
|
||||
@@ -0,0 +1,52 @@
|
||||
@@ -0,0 +1,84 @@
|
||||
+/*
|
||||
+ Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
|
||||
+
|
||||
|
@ -349,15 +234,47 @@ index 0000000..8a7a0b5
|
|||
+#include <linux/kdev_t.h>
|
||||
+
|
||||
+#include <QFile>
|
||||
+#include <QtDBus/QDBusConnection>
|
||||
+#include <QtDBus/QDBusPendingReply>
|
||||
+
|
||||
+#include "udisksblock.h"
|
||||
+#include "dbus/manager.h"
|
||||
+
|
||||
+using namespace Solid::Backends::UDisks2;
|
||||
+
|
||||
+Block::Block(Device *device)
|
||||
+ : DeviceInterface(device)
|
||||
+Block::Block(Device *dev)
|
||||
+ : DeviceInterface(dev)
|
||||
+{
|
||||
+ m_devNum = m_device->prop("DeviceNumber").toULongLong();
|
||||
+ m_devFile = QFile::decodeName(m_device->prop("Device").toByteArray());
|
||||
+
|
||||
+ // we have a drive (non-block device for udisks), so let's find the corresponding (real) block device
|
||||
+ if (m_devNum == 0 || m_devFile.isEmpty()) {
|
||||
+ org::freedesktop::DBus::ObjectManager manager(UD2_DBUS_SERVICE, UD2_DBUS_PATH, QDBusConnection::systemBus());
|
||||
+ QDBusPendingReply<DBUSManagerStruct> reply = manager.GetManagedObjects();
|
||||
+ reply.waitForFinished();
|
||||
+ if (!reply.isError()) { // enum devices
|
||||
+ Q_FOREACH(const QDBusObjectPath &path, reply.value().keys()) {
|
||||
+ const QString udi = path.path();
|
||||
+
|
||||
+ if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS))
|
||||
+ continue;
|
||||
+
|
||||
+ Device device(udi);
|
||||
+ if (device.drivePath() == dev->udi()) {
|
||||
+ m_devNum = device.prop("DeviceNumber").toULongLong();
|
||||
+ m_devFile = QFile::decodeName(device.prop("Device").toByteArray());
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else // show error
|
||||
+ {
|
||||
+ qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ qDebug() << "devnum:" << m_devNum << "dev file:" << m_devFile;
|
||||
+}
|
||||
+
|
||||
+Block::~Block()
|
||||
|
@ -366,7 +283,7 @@ index 0000000..8a7a0b5
|
|||
+
|
||||
+QString Block::device() const
|
||||
+{
|
||||
+ return QFile::decodeName(m_device->prop("Device").toByteArray());
|
||||
+ return m_devFile;
|
||||
+}
|
||||
+
|
||||
+int Block::deviceMinor() const
|
||||
|
@ -380,10 +297,10 @@ index 0000000..8a7a0b5
|
|||
+}
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/udisksblock.h b/tier1/solid/src/solid/backends/udisks2/udisksblock.h
|
||||
new file mode 100644
|
||||
index 0000000..804d712
|
||||
index 0000000..19cb70a
|
||||
--- /dev/null
|
||||
+++ b/tier1/solid/src/solid/backends/udisks2/udisksblock.h
|
||||
@@ -0,0 +1,55 @@
|
||||
@@ -0,0 +1,56 @@
|
||||
+/*
|
||||
+ Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
|
||||
+
|
||||
|
@ -424,7 +341,7 @@ index 0000000..804d712
|
|||
+ Q_INTERFACES(Solid::Ifaces::Block)
|
||||
+
|
||||
+public:
|
||||
+ Block(Device *device);
|
||||
+ Block(Device *dev);
|
||||
+ virtual ~Block();
|
||||
+
|
||||
+ virtual QString device() const;
|
||||
|
@ -432,6 +349,7 @@ index 0000000..804d712
|
|||
+ virtual int deviceMajor() const;
|
||||
+private:
|
||||
+ dev_t m_devNum;
|
||||
+ QString m_devFile;
|
||||
+};
|
||||
+
|
||||
+}
|
||||
|
@ -441,10 +359,10 @@ index 0000000..804d712
|
|||
+#endif // UDISKS2BLOCK_H
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/udisksdevice.cpp b/tier1/solid/src/solid/backends/udisks2/udisksdevice.cpp
|
||||
new file mode 100644
|
||||
index 0000000..628c0b0
|
||||
index 0000000..fb74fa2
|
||||
--- /dev/null
|
||||
+++ b/tier1/solid/src/solid/backends/udisks2/udisksdevice.cpp
|
||||
@@ -0,0 +1,906 @@
|
||||
@@ -0,0 +1,910 @@
|
||||
+/*
|
||||
+ Copyright 2010 Michael Zanetti <mzanetti@kde.org>
|
||||
+ Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
|
||||
|
@ -803,8 +721,7 @@ index 0000000..628c0b0
|
|||
+ if (!volume_label.isEmpty())
|
||||
+ return volume_label;
|
||||
+
|
||||
+ const QString drivePath = prop("Drive").value<QDBusObjectPath>().path();
|
||||
+ UDisks2::Device storageDevice(drivePath);
|
||||
+ UDisks2::Device storageDevice(drivePath());
|
||||
+ const UDisks2::StorageDrive storageDrive(&storageDevice);
|
||||
+ Solid::StorageDrive::DriveType drive_type = storageDrive.driveType();
|
||||
+
|
||||
|
@ -991,8 +908,7 @@ index 0000000..628c0b0
|
|||
+ }
|
||||
+ }
|
||||
+ else if (isBlock()) {
|
||||
+ const QString drivePath = prop("Drive").value<QDBusObjectPath>().path();
|
||||
+ Device drive(drivePath);
|
||||
+ Device drive(drivePath());
|
||||
+
|
||||
+ // handle media
|
||||
+ const QString media = drive.prop("Media").toString();
|
||||
|
@ -1143,7 +1059,7 @@ index 0000000..628c0b0
|
|||
+ if (iface.startsWith("org.freedesktop.DBus"))
|
||||
+ continue;
|
||||
+ QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "GetAll");
|
||||
+ call.setArguments(QList<QVariant>() << iface);
|
||||
+ call << iface;
|
||||
+ QDBusPendingReply<QVariantMap> reply = QDBusConnection::systemBus().asyncCall(call);
|
||||
+ reply.waitForFinished();
|
||||
+
|
||||
|
@ -1199,9 +1115,10 @@ index 0000000..628c0b0
|
|||
+ QMapIterator<QString, QVariant> i(changedProps);
|
||||
+ while (i.hasNext()) {
|
||||
+ i.next();
|
||||
+ m_cache.insert(i.key(), i.value()); // replace the value
|
||||
+ changeMap.insert(i.key(), Solid::GenericInterface::PropertyModified);
|
||||
+ qDebug() << "\t modified:" << i.key() << ":" << m_cache.value(i.key());
|
||||
+ const QString key = i.key();
|
||||
+ m_cache.insert(key, i.value()); // replace the value
|
||||
+ changeMap.insert(key, Solid::GenericInterface::PropertyModified);
|
||||
+ qDebug() << "\t modified:" << key << ":" << m_cache.value(key);
|
||||
+ }
|
||||
+
|
||||
+ Q_EMIT propertyChanged(changeMap);
|
||||
|
@ -1310,21 +1227,21 @@ index 0000000..628c0b0
|
|||
+
|
||||
+bool Device::isOpticalDisc() const
|
||||
+{
|
||||
+ QString drivePath = prop("Drive").value<QDBusObjectPath>().path();
|
||||
+ if (drivePath.isEmpty() || drivePath == "/")
|
||||
+ const QString drv = drivePath();
|
||||
+ if (drv.isEmpty() || drv == "/")
|
||||
+ return false;
|
||||
+
|
||||
+ Device drive(drivePath);
|
||||
+ Device drive(drv);
|
||||
+ return drive.prop("Optical").toBool();
|
||||
+}
|
||||
+
|
||||
+bool Device::mightBeOpticalDisc() const
|
||||
+{
|
||||
+ QString drivePath = prop("Drive").value<QDBusObjectPath>().path();
|
||||
+ if (drivePath.isEmpty() || drivePath == "/")
|
||||
+ const QString drv = drivePath();
|
||||
+ if (drv.isEmpty() || drv == "/")
|
||||
+ return false;
|
||||
+
|
||||
+ Device drive(drivePath);
|
||||
+ Device drive(drv);
|
||||
+ return drive.isOpticalDrive();
|
||||
+}
|
||||
+
|
||||
|
@ -1351,12 +1268,17 @@ index 0000000..628c0b0
|
|||
+{
|
||||
+ return hasInterface(UD2_DBUS_INTERFACE_SWAP);
|
||||
+}
|
||||
+
|
||||
+QString Device::drivePath() const
|
||||
+{
|
||||
+ return prop("Drive").value<QDBusObjectPath>().path();
|
||||
+}
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/udisksdevice.h b/tier1/solid/src/solid/backends/udisks2/udisksdevice.h
|
||||
new file mode 100644
|
||||
index 0000000..6f8056b
|
||||
index 0000000..cf8e2f5
|
||||
--- /dev/null
|
||||
+++ b/tier1/solid/src/solid/backends/udisks2/udisksdevice.h
|
||||
@@ -0,0 +1,110 @@
|
||||
@@ -0,0 +1,112 @@
|
||||
+/*
|
||||
+ Copyright 2010 Michael Zanetti <mzanetti@kde.org>
|
||||
+ Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
|
||||
|
@ -1439,6 +1361,8 @@ index 0000000..6f8056b
|
|||
+ bool isEncryptedCleartext() const;
|
||||
+ bool isSwap() const;
|
||||
+
|
||||
+ QString drivePath() const;
|
||||
+
|
||||
+Q_SIGNALS:
|
||||
+ void changed();
|
||||
+ void propertyChanged(const QMap<QString,int> &changes);
|
||||
|
@ -1784,10 +1708,10 @@ index 0000000..d225f32
|
|||
+#endif // SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/udisksmanager.cpp b/tier1/solid/src/solid/backends/udisks2/udisksmanager.cpp
|
||||
new file mode 100644
|
||||
index 0000000..2e6f8c6
|
||||
index 0000000..9af8ee2
|
||||
--- /dev/null
|
||||
+++ b/tier1/solid/src/solid/backends/udisks2/udisksmanager.cpp
|
||||
@@ -0,0 +1,294 @@
|
||||
@@ -0,0 +1,227 @@
|
||||
+/*
|
||||
+ Copyright 2012 Lukáš Tinkl <ltinkl@redhat.com>
|
||||
+
|
||||
|
@ -1959,77 +1883,6 @@ index 0000000..2e6f8c6
|
|||
+ return UD2_UDI_DISKS_PREFIX;
|
||||
+}
|
||||
+
|
||||
+#if 0
|
||||
+void Manager::slotDeviceAdded(const QDBusObjectPath &opath)
|
||||
+{
|
||||
+ const QString udi = opath.path();
|
||||
+
|
||||
+ if (!m_deviceCache.contains(udi)) {
|
||||
+ m_deviceCache.append(udi);
|
||||
+ }
|
||||
+
|
||||
+ Device device(udi);
|
||||
+ if (device.queryDeviceInterface(Solid::DeviceInterface::StorageDrive)
|
||||
+ && !device.prop("DeviceIsMediaAvailable").toBool()
|
||||
+ && !m_dirtyDevices.contains(udi))
|
||||
+ m_dirtyDevices.append(udi);
|
||||
+
|
||||
+ Q_EMIT deviceAdded(udi);
|
||||
+ slotDeviceChanged(opath); // case: hotswap event (optical drive with media inside)
|
||||
+}
|
||||
+
|
||||
+void Manager::slotDeviceRemoved(const QDBusObjectPath &opath)
|
||||
+{
|
||||
+ const QString udi = opath.path();
|
||||
+
|
||||
+ // case: hotswap event (optical drive with media inside)
|
||||
+ if (m_knownDrivesWithMedia.contains(udi)) {
|
||||
+ m_knownDrivesWithMedia.removeAll(udi);
|
||||
+ m_deviceCache.removeAll(udi + ":media");
|
||||
+ Q_EMIT deviceRemoved(udi + ":media");
|
||||
+ }
|
||||
+
|
||||
+ if (m_dirtyDevices.contains(udi))
|
||||
+ m_dirtyDevices.removeAll(udi);
|
||||
+
|
||||
+ Q_EMIT deviceRemoved(udi);
|
||||
+ m_deviceCache.removeAll(udi);
|
||||
+}
|
||||
+
|
||||
+void Manager::slotDeviceChanged(const QDBusObjectPath &opath)
|
||||
+{
|
||||
+ const QString udi = opath.path();
|
||||
+ Device device(udi);
|
||||
+
|
||||
+ if (device.queryDeviceInterface(Solid::DeviceInterface::OpticalDrive))
|
||||
+ {
|
||||
+ if (!m_knownDrivesWithMedia.contains(udi) && device.prop("DeviceIsOpticalDisc").toBool())
|
||||
+ {
|
||||
+ m_knownDrivesWithMedia.append(udi);
|
||||
+ if (!m_deviceCache.isEmpty()) {
|
||||
+ m_deviceCache.append(udi + ":media");
|
||||
+ }
|
||||
+ Q_EMIT deviceAdded(udi + ":media");
|
||||
+ }
|
||||
+
|
||||
+ if (m_knownDrivesWithMedia.contains(udi) && !device.prop("DeviceIsOpticalDisc").toBool())
|
||||
+ {
|
||||
+ m_knownDrivesWithMedia.removeAll(udi);
|
||||
+ m_deviceCache.removeAll(udi + ":media");
|
||||
+ Q_EMIT deviceRemoved(udi + ":media");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (device.queryDeviceInterface(Solid::DeviceInterface::StorageDrive) && device.prop("MediaAvailable").toBool() && m_dirtyDevices.contains(udi))
|
||||
+ {
|
||||
+ qDebug() << "dirty device added:" << udi;
|
||||
+ Q_EMIT deviceAdded(udi);
|
||||
+ m_dirtyDevices.removeAll(udi);
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+void Manager::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties)
|
||||
+{
|
||||
+ const QString udi = object_path.path();
|
||||
|
@ -2060,6 +1913,10 @@ index 0000000..2e6f8c6
|
|||
+void Manager::slotMediaChanged(const QDBusMessage & msg)
|
||||
+{
|
||||
+ const QVariantMap properties = qdbus_cast<QVariantMap>(msg.arguments().at(1));
|
||||
+
|
||||
+ if (!properties.contains("Size")) // react only on Size changes
|
||||
+ return;
|
||||
+
|
||||
+ const QString udi = msg.path();
|
||||
+ qulonglong size = properties.value("Size").toULongLong();
|
||||
+ qDebug() << "MEDIA CHANGED in" << udi << "; size is:" << size;
|
||||
|
@ -2159,10 +2016,10 @@ index 0000000..7cf0a72
|
|||
+#endif // UDISKS2MANAGER_H
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.cpp b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.cpp
|
||||
new file mode 100644
|
||||
index 0000000..bceb277
|
||||
index 0000000..478c930
|
||||
--- /dev/null
|
||||
+++ b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.cpp
|
||||
@@ -0,0 +1,274 @@
|
||||
@@ -0,0 +1,277 @@
|
||||
+/*
|
||||
+ Copyright 2010 Michael Zanetti <mzanetti@kde.org>
|
||||
+ Copyright 2010 - 2012 Lukáš Tinkl <ltinkl@redhat.com>
|
||||
|
@ -2192,7 +2049,7 @@ index 0000000..bceb277
|
|||
+#include <QtCore/QFile>
|
||||
+#include <QtDBus/QDBusConnection>
|
||||
+
|
||||
+#include "../shared/udevqt.h"
|
||||
+#include "../shared/udevqtclient.h"
|
||||
+
|
||||
+#include "udisks2.h"
|
||||
+#include "udisksopticaldisc.h"
|
||||
|
@ -2330,11 +2187,13 @@ index 0000000..bceb277
|
|||
+
|
||||
+using namespace Solid::Backends::UDisks2;
|
||||
+
|
||||
+OpticalDisc::OpticalDisc(Device *device)
|
||||
+ : StorageVolume(device), m_needsReprobe(true), m_cachedContent(Solid::OpticalDisc::NoContent)
|
||||
+OpticalDisc::OpticalDisc(Device *dev)
|
||||
+ : StorageVolume(dev), m_needsReprobe(true), m_cachedContent(Solid::OpticalDisc::NoContent)
|
||||
+{
|
||||
+ UdevQt::Client client(this);
|
||||
+ m_udevDevice = client.deviceByDeviceFile(QFile::decodeName(m_device->prop("Device").toByteArray()));
|
||||
+ m_udevDevice = client.deviceByDeviceFile(device());
|
||||
+ //qDebug() << "udev device:" << m_udevDevice.name() << "valid:" << m_udevDevice.isValid();
|
||||
+ /*qDebug() << "\tProperties:" << */ m_udevDevice.deviceProperties(); // initialize the properties DB so that it doesn't crash further down, #298416
|
||||
+
|
||||
+ m_drive = new Device(m_device->prop("Drive").value<QDBusObjectPath>().path());
|
||||
+ QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_drive->udi(), DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
|
||||
|
@ -2367,6 +2226,7 @@ index 0000000..bceb277
|
|||
+
|
||||
+bool OpticalDisc::isAppendable() const
|
||||
+{
|
||||
+ //qDebug() << "appendable prop" << m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE");
|
||||
+ return m_udevDevice.deviceProperty("ID_CDROM_MEDIA_STATE").toString() == QLatin1String("appendable");
|
||||
+}
|
||||
+
|
||||
|
@ -2439,7 +2299,7 @@ index 0000000..bceb277
|
|||
+}
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.h b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.h
|
||||
new file mode 100644
|
||||
index 0000000..1e2f030
|
||||
index 0000000..5b80995
|
||||
--- /dev/null
|
||||
+++ b/tier1/solid/src/solid/backends/udisks2/udisksopticaldisc.h
|
||||
@@ -0,0 +1,69 @@
|
||||
|
@ -2469,7 +2329,7 @@ index 0000000..1e2f030
|
|||
+
|
||||
+#include <solid/ifaces/opticaldisc.h>
|
||||
+
|
||||
+#include "../shared/udevqt.h"
|
||||
+#include "../shared/udevqtdevice.h"
|
||||
+
|
||||
+#include "udisksstoragevolume.h"
|
||||
+#include "udisksdevice.h"
|
||||
|
@ -2487,7 +2347,7 @@ index 0000000..1e2f030
|
|||
+ Q_INTERFACES(Solid::Ifaces::OpticalDisc)
|
||||
+
|
||||
+public:
|
||||
+ OpticalDisc(Device *device);
|
||||
+ OpticalDisc(Device *dev);
|
||||
+ virtual ~OpticalDisc();
|
||||
+
|
||||
+ virtual qulonglong capacity() const;
|
||||
|
@ -2795,7 +2655,7 @@ index 0000000..4c98ef5
|
|||
+#endif // UDISKS2OPTICALDRIVE_H
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.cpp b/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.cpp
|
||||
new file mode 100644
|
||||
index 0000000..9239bcb
|
||||
index 0000000..146c227
|
||||
--- /dev/null
|
||||
+++ b/tier1/solid/src/solid/backends/udisks2/udisksstorageaccess.cpp
|
||||
@@ -0,0 +1,359 @@
|
||||
|
@ -2859,7 +2719,7 @@ index 0000000..9239bcb
|
|||
+
|
||||
+bool StorageAccess::isLuksDevice() const
|
||||
+{
|
||||
+ return m_device->isEncryptedContainer(); // encrypted (and unlocked) device
|
||||
+ return m_device->isEncryptedContainer(); // encrypted device
|
||||
+}
|
||||
+
|
||||
+bool StorageAccess::isAccessible() const
|
||||
|
@ -2957,7 +2817,7 @@ index 0000000..9239bcb
|
|||
+ if (m_setupInProgress)
|
||||
+ {
|
||||
+ if (isLuksDevice() && !isAccessible()) { // unlocked device, now mount it
|
||||
+ if (reply.type() == QDBusMessage::ReplyMessage)
|
||||
+ if (reply.type() == QDBusMessage::ReplyMessage) // we've got a response from Unlock
|
||||
+ m_clearTextPath = reply.arguments().value(0).value<QDBusObjectPath>().path();
|
||||
+ mount();
|
||||
+ }
|
||||
|
@ -3105,7 +2965,7 @@ index 0000000..9239bcb
|
|||
+
|
||||
+ QString appId = QCoreApplication::applicationName();
|
||||
+
|
||||
+ QDBusInterface soliduiserver("org.kde.kded", "/modules/soliduiserver", "org.kde.SolidUiServer");
|
||||
+ QDBusInterface soliduiserver("org.kde.kded5", "/modules/soliduiserver", "org.kde.SolidUiServer");
|
||||
+ QDBusReply<void> reply = soliduiserver.call("showPassphraseDialog", udi, returnService,
|
||||
+ m_lastReturnObject, wId, appId);
|
||||
+ m_passphraseRequested = reply.isValid();
|
||||
|
@ -3136,7 +2996,7 @@ index 0000000..9239bcb
|
|||
+ QDBusConnection c = QDBusConnection::systemBus();
|
||||
+ QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_device->udi(), UD2_DBUS_INTERFACE_ENCRYPTED, "Unlock");
|
||||
+
|
||||
+ msg << passphrase.toUtf8(); // QByteArray
|
||||
+ msg << passphrase;
|
||||
+ msg << QVariantMap(); // options, unused now
|
||||
+
|
||||
+ c.callWithCallback(msg, this,
|
||||
|
@ -3270,10 +3130,10 @@ index 0000000..36f2102
|
|||
+#endif // UDISKS2STORAGEACCESS_H
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.cpp b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.cpp
|
||||
new file mode 100644
|
||||
index 0000000..3a62857
|
||||
index 0000000..c79ac20
|
||||
--- /dev/null
|
||||
+++ b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.cpp
|
||||
@@ -0,0 +1,144 @@
|
||||
@@ -0,0 +1,147 @@
|
||||
+/*
|
||||
+ Copyright 2010 Michael Zanetti <mzanetti@kde.org>
|
||||
+ Copyright 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
|
||||
|
@ -3297,18 +3157,19 @@ index 0000000..3a62857
|
|||
+
|
||||
+#include "udisksstoragedrive.h"
|
||||
+
|
||||
+#include "../shared/udevqt.h"
|
||||
+#include "../shared/udevqtclient.h"
|
||||
+
|
||||
+#include <QtCore/QDebug>
|
||||
+#include <QtCore/QFile>
|
||||
+
|
||||
+using namespace Solid::Backends::UDisks2;
|
||||
+
|
||||
+StorageDrive::StorageDrive(Device *device)
|
||||
+ : Block(device)
|
||||
+StorageDrive::StorageDrive(Device *dev)
|
||||
+ : Block(dev)
|
||||
+{
|
||||
+ UdevQt::Client client(this);
|
||||
+ m_udevDevice = client.deviceByDeviceFile(QFile::decodeName(m_device->prop("Device").toByteArray()));
|
||||
+ m_udevDevice = client.deviceByDeviceFile(device());
|
||||
+ m_udevDevice.deviceProperties();
|
||||
+}
|
||||
+
|
||||
+StorageDrive::~StorageDrive()
|
||||
|
@ -3386,6 +3247,8 @@ index 0000000..3a62857
|
|||
+ const QString bus = m_device->prop("ConnectionBus").toString();
|
||||
+ const QString udevBus = m_udevDevice.deviceProperty("ID_BUS").toString();
|
||||
+
|
||||
+ //qDebug() << "bus:" << bus << "udev bus:" << udevBus;
|
||||
+
|
||||
+ if (udevBus == "ata")
|
||||
+ {
|
||||
+ if (m_udevDevice.deviceProperty("ID_ATA_SATA").toInt() == 1) // serial ATA
|
||||
|
@ -3420,7 +3283,7 @@ index 0000000..3a62857
|
|||
+}
|
||||
diff --git a/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.h b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.h
|
||||
new file mode 100644
|
||||
index 0000000..97007b3
|
||||
index 0000000..9c87a23
|
||||
--- /dev/null
|
||||
+++ b/tier1/solid/src/solid/backends/udisks2/udisksstoragedrive.h
|
||||
@@ -0,0 +1,61 @@
|
||||
|
@ -3450,7 +3313,7 @@ index 0000000..97007b3
|
|||
+
|
||||
+#include <ifaces/storagedrive.h>
|
||||
+
|
||||
+#include "../shared/udevqt.h"
|
||||
+#include "../shared/udevqtdevice.h"
|
||||
+
|
||||
+#include "udisksblock.h"
|
||||
+
|
||||
|
@ -3467,7 +3330,7 @@ index 0000000..97007b3
|
|||
+ Q_INTERFACES(Solid::Ifaces::StorageDrive)
|
||||
+
|
||||
+public:
|
||||
+ StorageDrive(Device *device);
|
||||
+ StorageDrive(Device *dev);
|
||||
+ virtual ~StorageDrive();
|
||||
+
|
||||
+ virtual qulonglong size() const;
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
diff --git a/tier1/solid/src/solid/CMakeLists.txt b/tier1/solid/src/solid/CMakeLists.txt
|
||||
index 0fabd2c..75bb642 100644
|
||||
--- a/tier1/solid/src/solid/CMakeLists.txt
|
||||
+++ b/tier1/solid/src/solid/CMakeLists.txt
|
||||
@@ -29,7 +29,6 @@ configure_file(config-processor.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-proce
|
||||
|
||||
file(MAKE_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR}/backends/fakehw
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/backends/hal
|
||||
${CMAKE_CURRENT_BINARY_DIR}/backends/udev
|
||||
${CMAKE_CURRENT_BINARY_DIR}/backends/wmi
|
||||
)
|
||||
@@ -205,33 +204,6 @@ if(NOT WIN32 AND NOT APPLE)
|
||||
endif( UDEV_FOUND )
|
||||
|
||||
|
||||
- message(STATUS "Building Solid HAL backend." )
|
||||
- set(solid_LIB_SRCS ${solid_LIB_SRCS}
|
||||
- backends/hal/halacadapter.cpp
|
||||
- backends/hal/halaudiointerface.cpp
|
||||
- backends/hal/halbattery.cpp
|
||||
- backends/hal/halblock.cpp
|
||||
- backends/hal/halbutton.cpp
|
||||
- backends/hal/halcamera.cpp
|
||||
- backends/hal/halcdrom.cpp
|
||||
- backends/hal/haldeviceinterface.cpp
|
||||
- backends/hal/haldvbinterface.cpp
|
||||
- backends/hal/halfstabhandling.cpp
|
||||
- backends/hal/halgenericinterface.cpp
|
||||
- backends/hal/haldevice.cpp
|
||||
- backends/hal/halmanager.cpp
|
||||
- backends/hal/halnetworkinterface.cpp
|
||||
- backends/hal/halserialinterface.cpp
|
||||
- backends/hal/halopticaldisc.cpp
|
||||
- backends/hal/halportablemediaplayer.cpp
|
||||
- backends/hal/halprocessor.cpp
|
||||
- backends/hal/halstorageaccess.cpp
|
||||
- backends/hal/halstorage.cpp
|
||||
- backends/hal/halvideo.cpp
|
||||
- backends/hal/halvolume.cpp
|
||||
- backends/hal/halsmartcardreader.cpp
|
||||
- )
|
||||
-
|
||||
message(STATUS "Building Solid UPower backend." )
|
||||
set(solid_LIB_SRCS ${solid_LIB_SRCS}
|
||||
backends/upower/upowermanager.cpp
|
||||
@@ -244,18 +216,19 @@ if(NOT WIN32 AND NOT APPLE)
|
||||
|
||||
# FIXME: this should work on more Unix systems
|
||||
if (CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||
- message(STATUS "Building Solid UDisks backend." )
|
||||
+ message(STATUS "Building Solid UDisks2 backend." )
|
||||
set(solid_LIB_SRCS ${solid_LIB_SRCS}
|
||||
- backends/udisks/udisksmanager.cpp
|
||||
- backends/udisks/udisksdevice.cpp
|
||||
- backends/udisks/udisksblock.cpp
|
||||
- backends/udisks/udisksstoragevolume.cpp
|
||||
- backends/udisks/udisksdeviceinterface.cpp
|
||||
- backends/udisks/udisksopticaldisc.cpp
|
||||
- backends/udisks/udisksopticaldrive.cpp
|
||||
- backends/udisks/udisksstoragedrive.cpp
|
||||
- backends/udisks/udisksstorageaccess.cpp
|
||||
- backends/udisks/udisksgenericinterface.cpp
|
||||
+ backends/udisks2/udisksmanager.cpp
|
||||
+ backends/udisks2/udisksdevice.cpp
|
||||
+ backends/udisks2/udisksblock.cpp
|
||||
+ backends/udisks2/udisksstoragevolume.cpp
|
||||
+ backends/udisks2/udisksdeviceinterface.cpp
|
||||
+ backends/udisks2/udisksopticaldisc.cpp
|
||||
+ backends/udisks2/udisksopticaldrive.cpp
|
||||
+ backends/udisks2/udisksstoragedrive.cpp
|
||||
+ backends/udisks2/udisksstorageaccess.cpp
|
||||
+ backends/udisks2/udisksgenericinterface.cpp
|
||||
+ backends/udisks2/dbus/manager.cpp
|
||||
)
|
||||
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||
|
||||
diff --git a/tier1/solid/src/solid/managerbase.cpp b/tier1/solid/src/solid/managerbase.cpp
|
||||
index e228b48..7a7cc7d 100644
|
||||
--- a/tier1/solid/src/solid/managerbase.cpp
|
||||
+++ b/tier1/solid/src/solid/managerbase.cpp
|
||||
@@ -30,8 +30,7 @@
|
||||
#if defined (Q_OS_MAC)
|
||||
#include "backends/iokit/iokitmanager.h"
|
||||
#elif defined (Q_OS_UNIX)
|
||||
-#include "backends/hal/halmanager.h"
|
||||
-#include "backends/udisks/udisksmanager.h"
|
||||
+#include "backends/udisks2/udisksmanager.h"
|
||||
#include "backends/upower/upowermanager.h"
|
||||
|
||||
#if defined (HUPNP_FOUND)
|
||||
@@ -71,22 +70,13 @@ void Solid::ManagerBasePrivate::loadBackends()
|
||||
# elif defined(Q_OS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
|
||||
m_backends << new Solid::Backends::Wmi::WmiManager(0);
|
||||
|
||||
-# elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
|
||||
- m_backends << new Solid::Backends::Hal::HalManager(0);
|
||||
-
|
||||
# elif defined(Q_OS_LINUX)
|
||||
- bool solidHalLegacyEnabled
|
||||
- = QString::fromLocal8Bit(qgetenv("SOLID_HAL_LEGACY")).toInt()==1;
|
||||
- if (solidHalLegacyEnabled) {
|
||||
- m_backends << new Solid::Backends::Hal::HalManager(0);
|
||||
- } else {
|
||||
# if defined(UDEV_FOUND)
|
||||
m_backends << new Solid::Backends::UDev::UDevManager(0);
|
||||
# endif
|
||||
- m_backends << new Solid::Backends::UDisks::UDisksManager(0)
|
||||
+ m_backends << new Solid::Backends::UDisks2::Manager(0)
|
||||
<< new Solid::Backends::UPower::UPowerManager(0)
|
||||
<< new Solid::Backends::Fstab::FstabManager(0);
|
||||
- }
|
||||
# endif
|
||||
|
||||
# if defined (HUPNP_FOUND)
|
50
kdelibs.spec
50
kdelibs.spec
|
@ -24,8 +24,8 @@
|
|||
%global dbusmenu_qt_version %(pkg-config --modversion dbusmenu-qt 2>/dev/null || echo %{dbusmenu_qt_ver})
|
||||
|
||||
Summary: KDE Libraries
|
||||
Version: 4.8.3
|
||||
Release: 1%{?dist}
|
||||
Version: 4.8.4
|
||||
Release: 3%{?dist}
|
||||
|
||||
Name: kdelibs
|
||||
Epoch: 6
|
||||
|
@ -123,8 +123,9 @@ Patch42: 0003-Implement-automatic-scanning-of-source-code-for-requ.patch
|
|||
Patch45: kdelibs-4.7.3-halectomy.patch
|
||||
|
||||
# udisks2 Solid backend, halectomy
|
||||
Patch46: kdelibs-4.8.2-udisks2_prep.patch
|
||||
Patch46: kdelibs-udisks2_prep.patch
|
||||
Patch47: kdelibs-udisks2-backend.patch
|
||||
Patch48: kdelibs-udisks2_post.patch
|
||||
|
||||
## upstreamable
|
||||
# knewstuff2 variant of:
|
||||
|
@ -149,6 +150,9 @@ Patch100: kdelibs-4.8.3-kdeclarative-install-location.patch
|
|||
# Not Upstreamed? why not ? -- Rex
|
||||
Patch200: kdelibs-4.3.1-CVE-2009-2702.patch
|
||||
|
||||
# rhel patches
|
||||
Patch300: kdelibs-4.8.3-webkit.patch
|
||||
|
||||
# force upgrade of apps using the discontinued KatePart Smart* interfaces to
|
||||
# versions using the new Moving* interfaces instead
|
||||
# conditionize these? how long to carry them? -- rex
|
||||
|
@ -159,7 +163,9 @@ Conflicts: kile < 2.1-0.9
|
|||
Conflicts: rkward < 0.5.4
|
||||
|
||||
BuildRequires: qt4-devel >= %{qt4_ver}
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: pkgconfig(QtWebKit)
|
||||
%endif
|
||||
%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}}
|
||||
Requires: xdg-utils
|
||||
Requires: redhat-menus
|
||||
|
@ -261,7 +267,9 @@ Requires: pkgconfig(phonon)
|
|||
# considered part of nepomuk-devel
|
||||
Requires: pkgconfig(shared-desktop-ontologies) pkgconfig(soprano)
|
||||
Requires: qt4-devel
|
||||
Requires: pkgconfig(QtWebKit)
|
||||
%if 0%{?fedora}
|
||||
Requires: pkgconfig(QtWebKit)
|
||||
%endif
|
||||
# do we really still need all these below? -- Rex
|
||||
Requires: pkgconfig(libstreams)
|
||||
Requires: pkgconfig(gamin)
|
||||
|
@ -326,6 +334,14 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
|
|||
pushd solid
|
||||
%patch46 -p2 -b .udisks2_prep
|
||||
%patch47 -p4 -b .udisks2backend
|
||||
sed -i.udisks2_sed \
|
||||
-e 's|#include "../shared/udevqtdevice.h"|#include "../shared/udevqt.h"|g' \
|
||||
-e 's|#include "../shared/udevqtclient.h"|#include "../shared/udevqt.h"|g' \
|
||||
solid/backends/udisks2/udisksopticaldisc.h \
|
||||
solid/backends/udisks2/udisksstoragedrive.h \
|
||||
solid/backends/udisks2/udisksopticaldisc.cpp \
|
||||
solid/backends/udisks2/udisksstoragedrive.cpp
|
||||
%patch48 -p4 -b .udisks2_post
|
||||
popd
|
||||
%else
|
||||
%patch45 -p1 -b .halectomy
|
||||
|
@ -338,11 +354,15 @@ popd
|
|||
%patch53 -p1 -b .kjs-s390
|
||||
|
||||
# upstream patches
|
||||
%patch100 -p1 -b .kdeclarative-install-location
|
||||
|
||||
# security fixes
|
||||
%patch200 -p1 -b .CVE-2009-2702
|
||||
|
||||
|
||||
# rhel patches
|
||||
%if 0%{?rhel}
|
||||
%patch300 -p1 -b .webkit
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
|
@ -590,6 +610,26 @@ rm -rf %{buildroot}
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Jun 07 2012 Lukáš Tinkl <ltinkl@redhat.com> - 6:4.8.4-3
|
||||
- another respin
|
||||
|
||||
* Wed Jun 06 2012 Than Ngo <than@redhat.com> - 6:4.8.4-2
|
||||
- respin
|
||||
|
||||
* Mon Jun 04 2012 Than Ngo <than@redhat.com> - 6:4.8.4-1
|
||||
- 4.8.4
|
||||
|
||||
* Fri May 25 2012 Rex Dieter <rdieter@fedoraproject.org>
|
||||
- 6:4.8.3-4
|
||||
- include upstream kmessagewidget fixes
|
||||
- apply kdeclarative-install-location.patch
|
||||
|
||||
* Thu May 24 2012 Lukas Tinkl <ltinkl@redhat.com> - 6:4.8.3-3
|
||||
- update the udisks2 backend patch, fixing some bugs with storage drives
|
||||
|
||||
* Thu May 03 2012 Than Ngo <than@redhat.com> - 6:4.8.3-2
|
||||
- add rhel/fedora condition
|
||||
|
||||
* Mon Apr 30 2012 Jaroslav Reznik <jreznik@redhat.com> - 6:4.8.3-1
|
||||
- 4.8.3
|
||||
- remove cmake implicit link directories patch
|
||||
|
|
Loading…
Reference in New Issue