diff --git a/.gitignore b/.gitignore index bdc8ec1..6a40a3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/kdelibs-4.8.5.tar.xz /kdelibs-4.9.5.tar.xz +/kdelibs-4.10.1.tar.xz diff --git a/kdelibs-4.1.70-cmake.patch b/kdelibs-4.1.70-cmake.patch deleted file mode 100644 index faffd56..0000000 --- a/kdelibs-4.1.70-cmake.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur kdelibs-4.1.70/cmake/modules/FindKDE4Internal.cmake kdelibs-4.1.70.cmake/cmake/modules/FindKDE4Internal.cmake ---- kdelibs-4.1.70/cmake/modules/FindKDE4Internal.cmake 2008-10-19 16:56:45.000000000 +0200 -+++ kdelibs-4.1.70.cmake/cmake/modules/FindKDE4Internal.cmake 2008-10-19 17:06:14.000000000 +0200 -@@ -817,6 +817,7 @@ - # CMake generators if no build type is set. - if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE RelWithDebInfo) -+ set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE}) - endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) - - diff --git a/kdelibs-4.3.1-CVE-2009-2702.patch b/kdelibs-4.10.0-CVE-2009-2702.patch similarity index 61% rename from kdelibs-4.3.1-CVE-2009-2702.patch rename to kdelibs-4.10.0-CVE-2009-2702.patch index d95a012..9aee863 100644 --- a/kdelibs-4.3.1-CVE-2009-2702.patch +++ b/kdelibs-4.10.0-CVE-2009-2702.patch @@ -1,7 +1,7 @@ -diff -Nur kdelibs-4.3.1.orig/kio/kssl/kopenssl.cpp kdelibs-4.3.1/kio/kssl/kopenssl.cpp ---- kdelibs-4.3.1.orig/kio/kssl/kopenssl.cpp 2008-10-23 01:05:00.000000000 +0200 -+++ kdelibs-4.3.1/kio/kssl/kopenssl.cpp 2009-09-04 14:09:22.000000000 +0200 -@@ -196,6 +196,7 @@ +diff -up kdelibs-4.10.0/kio/kssl/kopenssl.cpp.CVE-2009-2702 kdelibs-4.10.0/kio/kssl/kopenssl.cpp +--- kdelibs-4.10.0/kio/kssl/kopenssl.cpp.CVE-2009-2702 2013-01-23 15:44:24.000000000 -0600 ++++ kdelibs-4.10.0/kio/kssl/kopenssl.cpp 2013-01-31 07:37:12.210503883 -0600 +@@ -196,6 +196,7 @@ static int (*K_X509_NAME_add_entry_by_tx static X509_NAME *(*K_X509_NAME_new)() = 0L; static int (*K_X509_REQ_set_subject_name)(X509_REQ*,X509_NAME*) = 0L; static unsigned char *(*K_ASN1_STRING_data)(ASN1_STRING*) = 0L; @@ -9,7 +9,7 @@ diff -Nur kdelibs-4.3.1.orig/kio/kssl/kopenssl.cpp kdelibs-4.3.1/kio/kssl/kopens static STACK_OF(SSL_CIPHER) *(*K_SSL_get_ciphers)(const SSL *ssl) = 0L; #endif -@@ -530,6 +531,7 @@ +@@ -525,6 +526,7 @@ KOpenSSLProxy::KOpenSSLProxy() K_X509_NAME_new = (X509_NAME *(*)()) d->cryptoLib->resolveFunction("X509_NAME_new"); K_X509_REQ_set_subject_name = (int (*)(X509_REQ*,X509_NAME*)) d->cryptoLib->resolveFunction("X509_REQ_set_subject_name"); K_ASN1_STRING_data = (unsigned char *(*)(ASN1_STRING*)) d->cryptoLib->resolveFunction("ASN1_STRING_data"); @@ -17,7 +17,7 @@ diff -Nur kdelibs-4.3.1.orig/kio/kssl/kopenssl.cpp kdelibs-4.3.1/kio/kssl/kopens #endif } -@@ -1577,6 +1579,13 @@ +@@ -1572,6 +1574,13 @@ unsigned char *KOpenSSLProxy::ASN1_STRIN return 0L; } @@ -31,10 +31,10 @@ diff -Nur kdelibs-4.3.1.orig/kio/kssl/kopenssl.cpp kdelibs-4.3.1/kio/kssl/kopens STACK_OF(SSL_CIPHER) *KOpenSSLProxy::SSL_get_ciphers(const SSL* ssl) { if (K_SSL_get_ciphers) return (K_SSL_get_ciphers)(ssl); return 0L; -diff -Nur kdelibs-4.3.1.orig/kio/kssl/kopenssl.h kdelibs-4.3.1/kio/kssl/kopenssl.h ---- kdelibs-4.3.1.orig/kio/kssl/kopenssl.h 2009-05-19 14:06:53.000000000 +0200 -+++ kdelibs-4.3.1/kio/kssl/kopenssl.h 2009-09-04 14:09:22.000000000 +0200 -@@ -589,13 +589,17 @@ +diff -up kdelibs-4.10.0/kio/kssl/kopenssl.h.CVE-2009-2702 kdelibs-4.10.0/kio/kssl/kopenssl.h +--- kdelibs-4.10.0/kio/kssl/kopenssl.h.CVE-2009-2702 2013-01-23 15:44:24.000000000 -0600 ++++ kdelibs-4.10.0/kio/kssl/kopenssl.h 2013-01-31 07:37:12.210503883 -0600 +@@ -607,13 +607,17 @@ public: */ void ASN1_INTEGER_free(ASN1_INTEGER *x); @@ -53,10 +53,10 @@ diff -Nur kdelibs-4.3.1.orig/kio/kssl/kopenssl.h kdelibs-4.3.1/kio/kssl/kopenssl * */ int OBJ_obj2nid(ASN1_OBJECT *o); -diff -Nur kdelibs-4.3.1.orig/kio/kssl/ksslcertificate.cpp kdelibs-4.3.1/kio/kssl/ksslcertificate.cpp ---- kdelibs-4.3.1.orig/kio/kssl/ksslcertificate.cpp 2009-01-16 16:07:05.000000000 +0100 -+++ kdelibs-4.3.1/kio/kssl/ksslcertificate.cpp 2009-09-04 14:09:22.000000000 +0200 -@@ -1305,7 +1305,9 @@ +diff -up kdelibs-4.10.0/kio/kssl/ksslcertificate.cpp.CVE-2009-2702 kdelibs-4.10.0/kio/kssl/ksslcertificate.cpp +--- kdelibs-4.10.0/kio/kssl/ksslcertificate.cpp.CVE-2009-2702 2013-01-23 15:44:24.000000000 -0600 ++++ kdelibs-4.10.0/kio/kssl/ksslcertificate.cpp 2013-01-31 07:37:12.210503883 -0600 +@@ -1301,7 +1301,9 @@ QStringList KSSLCertificate::subjAltName } QString s = (const char *)d->kossl->ASN1_STRING_data(val->d.ia5); diff --git a/kdelibs-4.7.4-SOLID_UPNP.patch b/kdelibs-4.10.0-SOLID_UPNP.patch similarity index 53% rename from kdelibs-4.7.4-SOLID_UPNP.patch rename to kdelibs-4.10.0-SOLID_UPNP.patch index 06d6f86..4809a85 100644 --- a/kdelibs-4.7.4-SOLID_UPNP.patch +++ b/kdelibs-4.10.0-SOLID_UPNP.patch @@ -1,7 +1,7 @@ -diff -up kdelibs-4.7.4/solid/solid/managerbase.cpp.UPNP kdelibs-4.7.4/solid/solid/managerbase.cpp ---- kdelibs-4.7.4/solid/solid/managerbase.cpp.UPNP 2011-12-01 19:22:43.644706401 -0600 -+++ kdelibs-4.7.4/solid/solid/managerbase.cpp 2011-12-01 19:29:11.825853422 -0600 -@@ -80,7 +80,11 @@ void Solid::ManagerBasePrivate::loadBack +diff -up kdelibs-4.10.0/solid/solid/managerbase.cpp.SOLID_UPNP kdelibs-4.10.0/solid/solid/managerbase.cpp +--- kdelibs-4.10.0/solid/solid/managerbase.cpp.SOLID_UPNP 2013-01-23 15:44:27.000000000 -0600 ++++ kdelibs-4.10.0/solid/solid/managerbase.cpp 2013-01-31 07:48:05.058342162 -0600 +@@ -98,7 +98,11 @@ void Solid::ManagerBasePrivate::loadBack # endif # if defined (HUPNP_FOUND) diff --git a/kdelibs-4.10.0-branding.patch b/kdelibs-4.10.0-branding.patch new file mode 100644 index 0000000..d760122 --- /dev/null +++ b/kdelibs-4.10.0-branding.patch @@ -0,0 +1,11 @@ +diff -up kdelibs-4.10.0/kio/kio/kprotocolmanager.cpp.branding kdelibs-4.10.0/kio/kio/kprotocolmanager.cpp +--- kdelibs-4.10.0/kio/kio/kprotocolmanager.cpp.branding 2013-01-23 15:44:24.000000000 -0600 ++++ kdelibs-4.10.0/kio/kio/kprotocolmanager.cpp 2013-01-31 07:41:09.248540500 -0600 +@@ -743,6 +743,7 @@ QString KProtocolManager::defaultUserAge + d->useragent += QString::number(KDE::versionMajor()); + d->useragent += QL1C('.'); + d->useragent += QString::number(KDE::versionMinor()); ++ d->useragent += QL1S(" Fedora/@@VERSION_RELEASE@@"); + } + else + { diff --git a/kdelibs-4.10.0-cmake.patch b/kdelibs-4.10.0-cmake.patch new file mode 100644 index 0000000..52f99ae --- /dev/null +++ b/kdelibs-4.10.0-cmake.patch @@ -0,0 +1,11 @@ +diff -up kdelibs-4.10.0/cmake/modules/FindKDE4Internal.cmake.xxcmake kdelibs-4.10.0/cmake/modules/FindKDE4Internal.cmake +--- kdelibs-4.10.0/cmake/modules/FindKDE4Internal.cmake.xxcmake 2013-01-31 07:45:31.958256176 -0600 ++++ kdelibs-4.10.0/cmake/modules/FindKDE4Internal.cmake 2013-01-31 07:45:31.989255789 -0600 +@@ -955,6 +955,7 @@ endif(WIN32) + # CMake generators if no build type is set. + if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE RelWithDebInfo) ++ set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE}) + endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + + diff --git a/kdelibs-4.2.85-kde149705.patch b/kdelibs-4.10.0-kde149705.patch similarity index 58% rename from kdelibs-4.2.85-kde149705.patch rename to kdelibs-4.10.0-kde149705.patch index 9e7af74..a7d5179 100644 --- a/kdelibs-4.2.85-kde149705.patch +++ b/kdelibs-4.10.0-kde149705.patch @@ -1,7 +1,7 @@ -diff -up kdelibs-4.2.85/kdeui/icons/kicontheme.cpp.kde149705 kdelibs-4.2.85/kdeui/icons/kicontheme.cpp ---- kdelibs-4.2.85/kdeui/icons/kicontheme.cpp.kde149705 2009-04-15 12:26:44.000000000 +0200 -+++ kdelibs-4.2.85/kdeui/icons/kicontheme.cpp 2009-05-11 16:01:29.000000000 +0200 -@@ -525,7 +525,7 @@ QString KIconTheme::current() +diff -up kdelibs-4.10.0/kdeui/icons/kicontheme.cpp.kde149705 kdelibs-4.10.0/kdeui/icons/kicontheme.cpp +--- kdelibs-4.10.0/kdeui/icons/kicontheme.cpp.kde149705 2013-01-23 15:44:19.000000000 -0600 ++++ kdelibs-4.10.0/kdeui/icons/kicontheme.cpp 2013-01-31 07:40:19.163166653 -0600 +@@ -527,7 +527,7 @@ QString KIconTheme::current() } KConfigGroup cg(KGlobal::config(), "Icons"); @@ -10,10 +10,10 @@ diff -up kdelibs-4.2.85/kdeui/icons/kicontheme.cpp.kde149705 kdelibs-4.2.85/kdeu if ( *_theme == QLatin1String("hicolor") ) { *_theme = defaultThemeName(); } -diff -up kdelibs-4.2.85/kdeui/kernel/kglobalsettings.cpp.kde149705 kdelibs-4.2.85/kdeui/kernel/kglobalsettings.cpp ---- kdelibs-4.2.85/kdeui/kernel/kglobalsettings.cpp.kde149705 2009-03-27 15:47:33.000000000 +0100 -+++ kdelibs-4.2.85/kdeui/kernel/kglobalsettings.cpp 2009-05-11 16:00:06.000000000 +0200 -@@ -856,7 +856,7 @@ void KGlobalSettings::Private::applyGUIS +diff -up kdelibs-4.10.0/kdeui/kernel/kglobalsettings.cpp.kde149705 kdelibs-4.10.0/kdeui/kernel/kglobalsettings.cpp +--- kdelibs-4.10.0/kdeui/kernel/kglobalsettings.cpp.kde149705 2013-01-23 15:44:19.000000000 -0600 ++++ kdelibs-4.10.0/kdeui/kernel/kglobalsettings.cpp 2013-01-31 07:40:19.163166653 -0600 +@@ -942,7 +942,7 @@ void KGlobalSettings::Private::applyGUIS if (kde_overrideStyle.isEmpty()) { const QString &defaultStyle = KStyle::defaultStyle(); const KConfigGroup pConfig(KGlobal::config(), "General"); @@ -22,9 +22,9 @@ diff -up kdelibs-4.2.85/kdeui/kernel/kglobalsettings.cpp.kde149705 kdelibs-4.2.8 if (styleStr.isEmpty() || // check whether we already use the correct style to return then -diff -up kdelibs-4.2.85/kutils/kdeglobals.kcfg.kde149705 kdelibs-4.2.85/kutils/kdeglobals.kcfg ---- kdelibs-4.2.85/kutils/kdeglobals.kcfg.kde149705 2009-04-15 12:26:45.000000000 +0200 -+++ kdelibs-4.2.85/kutils/kdeglobals.kcfg 2009-05-11 16:00:06.000000000 +0200 +diff -up kdelibs-4.10.0/kutils/kdeglobals.kcfg.kde149705 kdelibs-4.10.0/kutils/kdeglobals.kcfg +--- kdelibs-4.10.0/kutils/kdeglobals.kcfg.kde149705 2013-01-23 15:44:26.000000000 -0600 ++++ kdelibs-4.10.0/kutils/kdeglobals.kcfg 2013-01-31 07:40:19.164166641 -0600 @@ -24,6 +24,10 @@ The name of the widget style, for example "keramik" or "plastik". Without quotes. keramik diff --git a/kdelibs-4.6.90-kstandarddirs.patch b/kdelibs-4.10.0-kstandarddirs.patch similarity index 71% rename from kdelibs-4.6.90-kstandarddirs.patch rename to kdelibs-4.10.0-kstandarddirs.patch index 7fab2db..c5de6df 100644 --- a/kdelibs-4.6.90-kstandarddirs.patch +++ b/kdelibs-4.10.0-kstandarddirs.patch @@ -1,7 +1,7 @@ -diff -up kdelibs-4.6.90/kdecore/kernel/kstandarddirs.cpp.me kdelibs-4.6.90/kdecore/kernel/kstandarddirs.cpp ---- kdelibs-4.6.90/kdecore/kernel/kstandarddirs.cpp.me 2011-06-28 09:43:49.000000000 +0200 -+++ kdelibs-4.6.90/kdecore/kernel/kstandarddirs.cpp 2011-06-28 09:47:44.000000000 +0200 -@@ -1152,7 +1152,9 @@ QStringList KStandardDirs::KStandardDirs +diff -up kdelibs-4.10.0/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4.10.0/kdecore/kernel/kstandarddirs.cpp +--- kdelibs-4.10.0/kdecore/kernel/kstandarddirs.cpp.kstandarddirs 2013-01-31 07:44:58.336676504 -0600 ++++ kdelibs-4.10.0/kdecore/kernel/kstandarddirs.cpp 2013-01-31 07:44:58.340676454 -0600 +@@ -1153,7 +1153,9 @@ QStringList KStandardDirs::KStandardDirs pit != prefixList->end(); ++pit) { @@ -12,7 +12,7 @@ diff -up kdelibs-4.6.90/kdecore/kernel/kstandarddirs.cpp.me kdelibs-4.6.90/kdeco { for (QStringList::ConstIterator it = dirs.constBegin(); it != dirs.constEnd(); ++it) -@@ -1170,6 +1172,11 @@ QStringList KStandardDirs::KStandardDirs +@@ -1171,6 +1173,11 @@ QStringList KStandardDirs::KStandardDirs if ((local || testdir.exists()) && !candidates.contains(path)) candidates.append(path); } diff --git a/kdelibs-4.5.80-no_rpath.patch b/kdelibs-4.10.0-no_rpath.patch similarity index 88% rename from kdelibs-4.5.80-no_rpath.patch rename to kdelibs-4.10.0-no_rpath.patch index 23a95c0..7e4808e 100644 --- a/kdelibs-4.5.80-no_rpath.patch +++ b/kdelibs-4.10.0-no_rpath.patch @@ -1,7 +1,7 @@ -diff -up kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake.no_rpath kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake ---- kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake.no_rpath 2010-11-20 16:28:26.945612607 -0600 -+++ kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake 2010-11-20 18:18:01.926613935 -0600 -@@ -1042,7 +1042,7 @@ if (UNIX) +diff -up kdelibs-4.10.0/cmake/modules/FindKDE4Internal.cmake.no_rpath kdelibs-4.10.0/cmake/modules/FindKDE4Internal.cmake +--- kdelibs-4.10.0/cmake/modules/FindKDE4Internal.cmake.no_rpath 2013-01-31 07:47:15.581960702 -0600 ++++ kdelibs-4.10.0/cmake/modules/FindKDE4Internal.cmake 2013-01-31 07:47:15.583960677 -0600 +@@ -1050,7 +1050,7 @@ if (UNIX) set(CMAKE_SKIP_BUILD_RPATH FALSE) set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) @@ -10,9 +10,9 @@ diff -up kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake.no_rpath kdelibs-4. endif (APPLE) endif (UNIX) -diff -up kdelibs-4.5.80/kdewidgets/CMakeLists.txt.no_rpath kdelibs-4.5.80/kdewidgets/CMakeLists.txt ---- kdelibs-4.5.80/kdewidgets/CMakeLists.txt.no_rpath 2010-11-20 16:28:26.784363550 -0600 -+++ kdelibs-4.5.80/kdewidgets/CMakeLists.txt 2010-11-20 18:20:09.111363760 -0600 +diff -up kdelibs-4.10.0/kdewidgets/CMakeLists.txt.no_rpath kdelibs-4.10.0/kdewidgets/CMakeLists.txt +--- kdelibs-4.10.0/kdewidgets/CMakeLists.txt.no_rpath 2013-01-31 07:47:15.556961014 -0600 ++++ kdelibs-4.10.0/kdewidgets/CMakeLists.txt 2013-01-31 07:47:15.583960677 -0600 @@ -46,14 +46,14 @@ if(QT_QTDESIGNER_FOUND) kde4_add_plugin(kdewidgets ${kdewidgets_PART_SRCS}) diff --git a/kdelibs-4.8.3-webkit.patch b/kdelibs-4.10.0-webkit.patch similarity index 71% rename from kdelibs-4.8.3-webkit.patch rename to kdelibs-4.10.0-webkit.patch index f986f5e..1aad529 100644 --- a/kdelibs-4.8.3-webkit.patch +++ b/kdelibs-4.10.0-webkit.patch @@ -1,7 +1,7 @@ -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) +diff -up kdelibs-4.10.0/CMakeLists.txt.webkit kdelibs-4.10.0/CMakeLists.txt +--- kdelibs-4.10.0/CMakeLists.txt.webkit 2013-01-29 22:55:26.000000000 +0100 ++++ kdelibs-4.10.0/CMakeLists.txt 2013-02-28 11:43:57.653616989 +0100 +@@ -328,7 +328,6 @@ if(NOT WINCE) add_subdirectory( plasma ) endif(NOT WINCE) add_subdirectory( kunitconversion ) @@ -9,9 +9,9 @@ diff -up kdelibs-4.8.3/CMakeLists.txt.webkit kdelibs-4.8.3/CMakeLists.txt 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 +diff -up kdelibs-4.10.0/kdewidgets/CMakeLists.txt.webkit kdelibs-4.10.0/kdewidgets/CMakeLists.txt +--- kdelibs-4.10.0/kdewidgets/CMakeLists.txt.webkit 2013-02-28 11:43:57.589617095 +0100 ++++ kdelibs-4.10.0/kdewidgets/CMakeLists.txt 2013-02-28 11:43:57.654616988 +0100 @@ -88,41 +88,6 @@ if(QT_QTDESIGNER_FOUND) install(TARGETS kdedeprecated DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer ) endif(NOT KDE_NO_DEPRECATED) @@ -54,27 +54,27 @@ diff -up kdelibs-4.8.3/kdewidgets/CMakeLists.txt.webkit kdelibs-4.8.3/kdewidgets 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 +diff -up kdelibs-4.10.0/plasma/CMakeLists.txt.webkit kdelibs-4.10.0/plasma/CMakeLists.txt +--- kdelibs-4.10.0/plasma/CMakeLists.txt.webkit 2013-02-28 11:43:57.600617077 +0100 ++++ kdelibs-4.10.0/plasma/CMakeLists.txt 2013-02-28 11:47:28.121778200 +0100 +@@ -11,6 +11,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 + if(NOT Q_WS_X11) + set(PLASMA_NO_PACKAGEKIT TRUE) + endif(NOT Q_WS_X11) +@@ -124,7 +126,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 + private/componentinstaller.cpp +@@ -214,7 +215,6 @@ set(plasma_LIB_SRCS widgets/textbrowser.cpp widgets/treeview.cpp widgets/textedit.cpp @@ -82,7 +82,7 @@ diff -up kdelibs-4.8.3/plasma/CMakeLists.txt.webkit kdelibs-4.8.3/plasma/CMakeLi #Temporary QtJolie branch private/qtjolie-branch/qtjolie/abstractadaptor.cpp -@@ -266,7 +266,7 @@ endif(PHONON_FOUND) +@@ -278,7 +278,7 @@ endif(PHONON_FOUND) kde4_add_library(plasma ${LIBRARY_TYPE} ${plasma_LIB_SRCS}) @@ -91,7 +91,7 @@ diff -up kdelibs-4.8.3/plasma/CMakeLists.txt.webkit kdelibs-4.8.3/plasma/CMakeLi ${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 +@@ -430,7 +430,6 @@ install(FILES widgets/textbrowser.h widgets/treeview.h widgets/textedit.h diff --git a/kdelibs-4.1.0-xdg-menu.patch b/kdelibs-4.10.0-xdg-menu.patch similarity index 87% rename from kdelibs-4.1.0-xdg-menu.patch rename to kdelibs-4.10.0-xdg-menu.patch index fa87400..b9f7f98 100644 --- a/kdelibs-4.1.0-xdg-menu.patch +++ b/kdelibs-4.10.0-xdg-menu.patch @@ -1,6 +1,6 @@ -diff -ur kdelibs-4.1.0/kded/applications.menu kdelibs-4.1.0-xdg-menu/kded/applications.menu ---- kdelibs-4.1.0/kded/applications.menu 2008-05-21 13:07:34.000000000 +0200 -+++ kdelibs-4.1.0-xdg-menu/kded/applications.menu 2008-08-23 09:45:03.000000000 +0200 +diff -up kdelibs-4.10.0/kded/applications.menu.Administration-menu kdelibs-4.10.0/kded/applications.menu +--- kdelibs-4.10.0/kded/applications.menu.Administration-menu 2013-01-23 15:44:19.000000000 -0600 ++++ kdelibs-4.10.0/kded/applications.menu 2013-01-31 07:42:28.173553801 -0600 @@ -31,29 +31,31 @@ Core KDE @@ -50,7 +50,7 @@ diff -ur kdelibs-4.1.0/kded/applications.menu kdelibs-4.1.0-xdg-menu/kded/applic Development kde-development.directory -@@ -358,7 +360,11 @@ +@@ -369,7 +371,11 @@ Settingsmenu kde-settingsmenu.directory @@ -63,7 +63,7 @@ diff -ur kdelibs-4.1.0/kded/applications.menu kdelibs-4.1.0-xdg-menu/kded/applic -@@ -367,7 +373,9 @@ +@@ -378,7 +384,9 @@ System diff --git a/kdelibs-4.6.2-uri_mimetypes.patch b/kdelibs-4.6.2-uri_mimetypes.patch deleted file mode 100644 index b301c44..0000000 --- a/kdelibs-4.6.2-uri_mimetypes.patch +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/kio/misc/mms.protocol b/kio/misc/mms.protocol -index 286ccd8..e8afbdb 100644 ---- a/kio/misc/mms.protocol -+++ b/kio/misc/mms.protocol -@@ -1,7 +1,7 @@ - [Protocol] - helper=true - exec= --defaultMimetype=uri/mms -+defaultMimetype=x-scheme-handler/mms - protocol=mms - input=none - output=none -diff --git a/kio/misc/mmst.protocol b/kio/misc/mmst.protocol -index 1f0f763..455694a 100644 ---- a/kio/misc/mmst.protocol -+++ b/kio/misc/mmst.protocol -@@ -1,5 +1,5 @@ - [Protocol] --defaultMimetype=uri/mmst -+defaultMimetype=x-scheme-handler/mmst - exec= - protocol=mmst - input=none -diff --git a/kio/misc/mmsu.protocol b/kio/misc/mmsu.protocol -index deda935..1c1a7f6 100644 ---- a/kio/misc/mmsu.protocol -+++ b/kio/misc/mmsu.protocol -@@ -1,5 +1,5 @@ - [Protocol] --defaultMimetype=uri/mmsu -+defaultMimetype=x-scheme-handler/mmsu - exec= - protocol=mmsu - input=none -diff --git a/kio/misc/pnm.protocol b/kio/misc/pnm.protocol -index 3ca3a7d..fe44c37 100644 ---- a/kio/misc/pnm.protocol -+++ b/kio/misc/pnm.protocol -@@ -1,5 +1,5 @@ - [Protocol] --defaultMimetype=uri/pnm -+defaultMimetype=x-scheme-handler/pnm - exec= - protocol=pnm - input=none -diff --git a/kio/misc/rtspt.protocol b/kio/misc/rtspt.protocol -index 9e4fe96..4d86282 100644 ---- a/kio/misc/rtspt.protocol -+++ b/kio/misc/rtspt.protocol -@@ -1,5 +1,5 @@ - [Protocol] --defaultMimetype=uri/rtspt -+defaultMimetype=x-scheme-handler/rtspt - exec= - protocol=rtspt - input=none -diff --git a/kio/misc/rtspu.protocol b/kio/misc/rtspu.protocol -index 9cc9299..5fc9d6b 100644 ---- a/kio/misc/rtspu.protocol -+++ b/kio/misc/rtspu.protocol -@@ -1,5 +1,5 @@ - [Protocol] --defaultMimetype=uri/rtspu -+defaultMimetype=x-scheme-handler/rtspu - exec= - protocol=rtspu - input=none -diff --git a/mimetypes/kde.xml b/mimetypes/kde.xml -index 2810b5b..8de16f6 100644 ---- a/mimetypes/kde.xml -+++ b/mimetypes/kde.xml -@@ -187,24 +187,30 @@ Notes: - all files - - -- -- -+ -+ - mms: URIs -+ - -- -+ - mmst: URIs -+ - -- -+ - mmsu: URIs -+ - -- -+ - pnm: URIs -+ - -- -+ - rtspt: URIs -+ - -- -+ - rtspu: URIs -+ - - - diff --git a/kdelibs-4.6.80-branding.patch b/kdelibs-4.6.80-branding.patch deleted file mode 100644 index ca378ad..0000000 --- a/kdelibs-4.6.80-branding.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up kdelibs-4.6.80/kio/kio/kprotocolmanager.cpp.branding kdelibs-4.6.80/kio/kio/kprotocolmanager.cpp ---- kdelibs-4.6.80/kio/kio/kprotocolmanager.cpp.branding 2011-05-20 22:24:54.000000000 +0200 -+++ kdelibs-4.6.80/kio/kio/kprotocolmanager.cpp 2011-05-27 14:18:43.999356195 +0200 -@@ -645,6 +645,7 @@ QString KProtocolManager::defaultUserAge - d->useragent += QString::number(KDE::versionMajor()); - d->useragent += QL1C('.'); - d->useragent += QString::number(KDE::versionMinor()); -+ d->useragent += QL1S(" Fedora/@@VERSION_RELEASE@@"); - } - else - { diff --git a/kdelibs-4.7.3-halectomy.patch b/kdelibs-4.7.3-halectomy.patch deleted file mode 100644 index f2799a0..0000000 --- a/kdelibs-4.7.3-halectomy.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff -up kdelibs-4.7.3/solid/solid/CMakeLists.txt.halectomy kdelibs-4.7.3/solid/solid/CMakeLists.txt ---- kdelibs-4.7.3/solid/solid/CMakeLists.txt.halectomy 2011-05-20 15:24:54.000000000 -0500 -+++ kdelibs-4.7.3/solid/solid/CMakeLists.txt 2011-11-16 17:12:05.439596850 -0600 -@@ -39,7 +39,6 @@ configure_file(config-processor.h.cmake - - 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 - ) -@@ -199,33 +198,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 -diff -up kdelibs-4.7.3/solid/solid/managerbase.cpp.halectomy kdelibs-4.7.3/solid/solid/managerbase.cpp ---- kdelibs-4.7.3/solid/solid/managerbase.cpp.halectomy 2011-05-20 15:24:54.000000000 -0500 -+++ kdelibs-4.7.3/solid/solid/managerbase.cpp 2011-11-16 17:14:45.193599658 -0600 -@@ -30,7 +30,6 @@ - #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/upower/upowermanager.h" - -@@ -71,22 +70,13 @@ void Solid::ManagerBasePrivate::loadBack - # elif defined(Q_WS_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) - << new Solid::Backends::UPower::UPowerManager(0) - << new Solid::Backends::Fstab::FstabManager(0); -- } - # endif - - # if defined (HUPNP_FOUND) -diff -up kdelibs-4.7.3/solid/tests/CMakeLists.txt.halectomy kdelibs-4.7.3/solid/tests/CMakeLists.txt ---- kdelibs-4.7.3/solid/tests/CMakeLists.txt.halectomy 2011-10-28 02:41:29.000000000 -0500 -+++ kdelibs-4.7.3/solid/tests/CMakeLists.txt 2011-11-16 17:12:05.440596838 -0600 -@@ -15,21 +15,6 @@ endif(WIN32) - target_link_libraries(fakehardwaretest solid_static ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} ) - add_definitions(-DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"") - -- --########### halbasictest ############### -- --if(NOT WIN32 AND NOT APPLE) --set(halbasictest_SRCS halbasictest.cpp ) -- --kde4_add_executable(halbasictest ${halbasictest_SRCS}) -- --if(WIN32) -- set_target_properties(halbasictest PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=) --endif(WIN32) -- --target_link_libraries(halbasictest solid_static ${KDEWIN_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} ) --endif(NOT WIN32 AND NOT APPLE) -- - ########### solidhwtest ############### - - set(solidhwtest_SRCS diff --git a/kdelibs-4.9.1-FindKipi-libkipi2.patch b/kdelibs-4.9.1-FindKipi-libkipi2.patch deleted file mode 100644 index fcabda3..0000000 --- a/kdelibs-4.9.1-FindKipi-libkipi2.patch +++ /dev/null @@ -1,224 +0,0 @@ -diff -up kdelibs-4.9.1/cmake/modules/FindKipi.cmake.FindKipi-libkipi2 kdelibs-4.9.1/cmake/modules/FindKipi.cmake ---- kdelibs-4.9.1/cmake/modules/FindKipi.cmake.FindKipi-libkipi2 2012-08-13 03:39:41.000000000 -0500 -+++ kdelibs-4.9.1/cmake/modules/FindKipi.cmake 2012-09-26 08:01:10.326462520 -0500 -@@ -1,116 +1,119 @@ --# - Try to find the Kipi library -+# Module that tries to find the Kipi library - # - # If you have put a local version of libkipi into your source tree, - # set KIPI_LOCAL_DIR to the relative path to the local directory. - # - # Once done this will define - # --# KIPI_FOUND - system has libkipi --# KIPI_INCLUDE_DIR - the libkipi include directory --# KIPI_LIBRARIES - Link these to use libkipi -+# KIPI_FOUND - System has libkipi -+# KIPI_INCLUDE_DIR - The libkipi include directory -+# KIPI_LIBRARIES - Link these to use libkipi - # KIPI_DEFINITIONS - Compiler switches required for using libkipi -+# KIPI_VERSION - The release version of the Kipi library -+# KIPI_SO_VERSION - The binary SO version of the Kipi library - # - --# Copyright (c) 2008, Gilles Caulier, -+# Copyright (c) 2012, Victor Dodon -+# Copyright (c) 2012, Gilles Caulier - # - # Redistribution and use is allowed according to the terms of the BSD license. - # For details see the accompanying COPYING-CMAKE-SCRIPTS file. - --if (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS) -+IF(KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS AND KIPI_VERSION AND KIPI_SO_VERSION) - -- message(STATUS "Found Kipi library in cache: ${KIPI_LIBRARIES}") -+ IF(NOT Kipi_FIND_QUIETLY) -+ MESSAGE(STATUS "Found kipi library in cache ${KIPI_LIBRARIES}") -+ ENDIF(NOT Kipi_FIND_QUIETLY) -+ # Already in cache -+ SET(KIPI_FOUND TRUE) -+ -+ELSE(KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS AND KIPI_VERSION AND KIPI_SO_VERSION) -+ -+ IF(NOT Kipi_FIND_QUIETLY) -+ MESSAGE(STATUS "Check Kipi library in local sub-folder...") -+ ENDIF(NOT Kipi_FIND_QUIETLY) -+ -+ IF(KIPI_LOCAL_DIR) -+ FIND_FILE(KIPI_LOCAL_FOUND libkipi/version.h.cmake ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR} NO_DEFAULT_PATH) -+ IF(NOT KIPI_LOCAL_FOUND) -+ MESSAGE(WARNING "KIPI_LOCAL_DIR specified as \"${KIPI_LOCAL_DIR}\" but libkipi could not be found there.") -+ ENDIF(NOT KIPI_LOCAL_FOUND) -+ ELSE(KIPI_LOCAL_DIR) -+ FIND_FILE(KIPI_LOCAL_FOUND libkipi/version.h.cmake ${CMAKE_SOURCE_DIR}/libkipi NO_DEFAULT_PATH) -+ IF(KIPI_LOCAL_FOUND) -+ SET(KIPI_LOCAL_DIR libkipi) -+ ENDIF(KIPI_LOCAL_FOUND) -+ -+ FIND_FILE(KIPI_LOCAL_FOUND libkipi/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH) -+ IF(KIPI_LOCAL_FOUND) -+ SET(KIPI_LOCAL_DIR libs/libkipi) -+ ENDIF(KIPI_LOCAL_FOUND) -+ ENDIF(KIPI_LOCAL_DIR) -+ -+ IF(KIPI_LOCAL_FOUND) -+ -+ SET(KIPI_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}") -+ SET(KIPI_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}") -+ SET(KIPI_LIBRARIES kipi) -+ IF(NOT Kipi_FIND_QUIETLY) -+ MESSAGE(STATUS "Found Kipi library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}") -+ ENDIF(NOT Kipi_FIND_QUIETLY) -+ SET(KIPI_FOUND TRUE) -+ SET(KIPI_VERSION_H_FILENAME "${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}/libkipi/version.h") -+ -+ ELSE(KIPI_LOCAL_FOUND) -+ -+ IF(NOT WIN32) -+ IF(NOT Kipi_FIND_QUIETLY) -+ MESSAGE(STATUS "Check Kipi library using pkg-config...") -+ ENDIF(NOT Kipi_FIND_QUIETLY) -+ -+ INCLUDE(FindPkgConfig) -+ PKG_CHECK_MODULES(KIPI libkipi>=1.2.0) -+ ENDIF(NOT WIN32) -+ -+ FIND_LIBRARY(KIPI_LIBRARIES NAMES libkipi PATHS ${KIPI_LIBRARY_DIRS} ${LIB_INSTALL_DIR} ${KDE4_LIB_DIR}) -+ FIND_PATH(KIPI_INCLUDE_DIR NAMES libkipi/version.h PATHS ${KIPI_INCLUDE_DIRS} ${INCLUDE_INSTALL_DIR} ${KDE4_INCLUDE_DIR}) -+ SET(KIPI_VERSION_H_FILENAME "${KIPI_INCLUDE_DIR}/libkipi/version.h") -+ SET(KIPI_DEFINITIONS ${KIPI_CFLAGS} CACHE STRING "Kipi definitions") -+ -+ INCLUDE(FindPackageHandleStandardArgs) -+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(KIPI DEFAULT_MSG KIPI_LIBRARIES KIPI_INCLUDE_DIR) -+ -+ ENDIF(KIPI_LOCAL_FOUND) -+ -+ IF(KIPI_FOUND) -+ -+ IF(NOT KIPI_VERSION) -+ FILE(READ "${KIPI_VERSION_H_FILENAME}" KIPI_VERSION_H_CONTENT) -+ STRING(REGEX REPLACE ".*static +const +char +kipi_version\\[\\] += +\"([^\"]+)\".*" "\\1" KIPI_VERSION "${KIPI_VERSION_H_CONTENT}") -+ MESSAGE(STATUS "Kipi library version: ${KIPI_VERSION}") -+ ENDIF(NOT KIPI_VERSION) -+ -+ IF(NOT KIPI_SO_VERSION) -+ FILE(READ "${KIPI_VERSION_H_FILENAME}" KIPI_VERSION_H_CONTENT) -+ STRING(REGEX REPLACE -+ ".*static +const +int +kipi_binary_version += ([^ ;]+).*" -+ "\\1" -+ KIPI_SO_VERSION_FOUND -+ "${KIPI_VERSION_H_CONTENT}" -+ ) -+ SET(KIPI_SO_VERSION ${KIPI_SO_VERSION_FOUND} CACHE STRING "libkipi so version") -+ MESSAGE(STATUS "Kipi library SO binary version: ${KIPI_SO_VERSION}") -+ ENDIF(NOT KIPI_SO_VERSION) -+ -+ UNSET(KIPI_VERSION_H_CONTENT) -+ UNSET(KIPI_VERSION_H_FILENAME) -+ ENDIF(KIPI_FOUND) -+ -+ IF(KIPI_FOUND) -+ MARK_AS_ADVANCED(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS KIPI_VERSION KIPI_SO_VERSION) -+ ELSE(KIPI_FOUND) -+ UNSET(KIPI_INCLUDE_DIR) -+ UNSET(KIPI_LIBRARIES) -+ UNSET(KIPI_DEFINITIONS) -+ UNSET(KIPI_VERSION) -+ UNSET(KIPI_SO_VERSION) -+ ENDIF(KIPI_FOUND) - -- # in cache already -- set(KIPI_FOUND TRUE) -- --else (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS) -- -- message(STATUS "Check Kipi library in local sub-folder...") -- -- # Check if library is not in local sub-folder -- -- if (KIPI_LOCAL_DIR) -- set (KIPI_LOCAL_FOUND TRUE) -- else (KIPI_LOCAL_DIR) -- find_file(KIPI_LOCAL_FOUND libkipi/kipi.h ${CMAKE_SOURCE_DIR}/libkipi ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH) -- -- if (KIPI_LOCAL_FOUND) -- # Was it found in libkdcraw/ or in libs/libkdcraw? -- find_file(KIPI_LOCAL_FOUND_IN_LIBS libkipi/kipi.h ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH) -- if (KIPI_LOCAL_FOUND_IN_LIBS) -- set(KIPI_LOCAL_DIR libs/libkipi) -- else (KIPI_LOCAL_FOUND_IN_LIBS) -- set(KIPI_LOCAL_DIR libkipi) -- endif (KIPI_LOCAL_FOUND_IN_LIBS) -- endif (KIPI_LOCAL_FOUND) -- endif (KIPI_LOCAL_DIR) -- -- if (KIPI_LOCAL_FOUND) -- # we need two include directories: because the version.h file is put into the build directory -- # TODO KIPI_INCLUDE_DIR sounds like it should contain only one directory... -- set(KIPI_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}) -- set(KIPI_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}") -- set(KIPI_LIBRARIES kipi) -- message(STATUS "Found Kipi library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}") -- set(KIPI_FOUND TRUE) -- mark_as_advanced(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS) -- -- else (KIPI_LOCAL_FOUND) -- -- if (NOT WIN32) -- message(STATUS "Check Kipi library using pkg-config...") -- -- # use pkg-config to get the directories and then use these values -- # in the FIND_PATH() and FIND_LIBRARY() calls -- include(UsePkgConfig) -- -- PKGCONFIG(libkipi _KIPIIncDir _KIPILinkDir _KIPILinkFlags _KIPICflags) -- -- if (_KIPILinkFlags) -- # query pkg-config asking for a libkipi >= 0.2.0 -- exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkipi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) -- if (_return_VALUE STREQUAL "0") -- message(STATUS "Found libkipi release >= 0.2.0") -- set(KIPI_VERSION_GOOD_FOUND TRUE) -- else (_return_VALUE STREQUAL "0") -- message(STATUS "Found libkipi release < 0.2.0, too old") -- set(KIPI_VERSION_GOOD_FOUND FALSE) -- set(KIPI_FOUND FALSE) -- endif (_return_VALUE STREQUAL "0") -- else (_KIPILinkFlags) -- set(KIPI_VERSION_GOOD_FOUND FALSE) -- set(KIPI_FOUND FALSE) -- endif (_KIPILinkFlags) -- else (NOT WIN32) -- set(KIPI_VERSION_GOOD_FOUND TRUE) -- endif (NOT WIN32) -- if (KIPI_VERSION_GOOD_FOUND) -- set(KIPI_DEFINITIONS ${_KIPICflags}) -- -- find_path(KIPI_INCLUDE_DIR NAMES libkipi/version.h PATHS ${KDE4_INCLUDE_DIR} ${_KIPIIncDir}) -- find_library(KIPI_LIBRARIES NAMES kipi PATHS ${KDE4_LIB_DIR} ${_KIPILinkDir}) -- -- if (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES) -- set(KIPI_FOUND TRUE) -- endif (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES) -- endif (KIPI_VERSION_GOOD_FOUND) -- if (KIPI_FOUND) -- if (NOT Kipi_FIND_QUIETLY) -- message(STATUS "Found libkipi: ${KIPI_LIBRARIES}") -- endif (NOT Kipi_FIND_QUIETLY) -- else (KIPI_FOUND) -- if (Kipi_FIND_REQUIRED) -- if (NOT KIPI_INCLUDE_DIR) -- message(FATAL_ERROR "Could NOT find libkipi header files") -- endif (NOT KIPI_INCLUDE_DIR) -- if (NOT KIPI_LIBRARIES) -- message(FATAL_ERROR "Could NOT find libkipi library") -- endif (NOT KIPI_LIBRARIES) -- endif (Kipi_FIND_REQUIRED) -- endif (KIPI_FOUND) -- -- mark_as_advanced(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS) -- -- endif (KIPI_LOCAL_FOUND) -- --endif (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS) -+ENDIF(KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS AND KIPI_VERSION AND KIPI_SO_VERSION) diff --git a/kdelibs-4.9.2-FindSamba_samba4.patch b/kdelibs-4.9.2-FindSamba_samba4.patch deleted file mode 100644 index df380b5..0000000 --- a/kdelibs-4.9.2-FindSamba_samba4.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -up kdelibs-4.9.2/cmake/modules/FindSamba.cmake.samba4 kdelibs-4.9.2/cmake/modules/FindSamba.cmake ---- kdelibs-4.9.2/cmake/modules/FindSamba.cmake.samba4 2012-09-27 19:09:04.000000000 -0500 -+++ kdelibs-4.9.2/cmake/modules/FindSamba.cmake 2012-10-02 07:11:38.137381941 -0500 -@@ -17,10 +17,22 @@ if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES - set(Samba_FIND_QUIETLY TRUE) - endif(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES) - --find_path(SAMBA_INCLUDE_DIR NAMES libsmbclient.h ) -+IF (NOT WIN32) -+ # use pkg-config to get the directories and then use these values -+ # in the FIND_PATH() and FIND_LIBRARY() calls -+ find_package(PkgConfig) -+ pkg_check_modules(PC_LIBSMBCLIENT QUIET smbclient) -+ENDIF (NOT WIN32) - --find_library(SAMBA_LIBRARIES NAMES smbclient ) -+find_path(SAMBA_INCLUDE_DIR NAMES libsmbclient.h -+ PATHS -+ ${PC_LIBSMBCLIENT_INCLUDEDIR} -+ ${PC_LIBSMBCLIENT_INCLUDE_DIRS}) - -+find_library(SAMBA_LIBRARIES NAMES smbclient -+ PATHS -+ ${PC_LIBSMBCLIENT_LIBDIR} -+ ${PC_LIBSMBCLIENT_LIB_DIRS}) - - if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES) - set(SAMBA_FOUND TRUE) diff --git a/kdelibs-4.9.90-FindSamba_samba4.patch b/kdelibs-4.9.90-FindSamba_samba4.patch new file mode 100644 index 0000000..636713e --- /dev/null +++ b/kdelibs-4.9.90-FindSamba_samba4.patch @@ -0,0 +1,26 @@ +diff -up kdelibs-4.9.90/cmake/modules/FindSamba.cmake.FindSamba-samba4 kdelibs-4.9.90/cmake/modules/FindSamba.cmake +--- kdelibs-4.9.90/cmake/modules/FindSamba.cmake.FindSamba-samba4 2012-11-14 09:58:29.000000000 -0600 ++++ kdelibs-4.9.90/cmake/modules/FindSamba.cmake 2012-12-03 07:29:54.103057454 -0600 +@@ -17,10 +17,20 @@ if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES + set(Samba_FIND_QUIETLY TRUE) + endif(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES) + +-find_path(SAMBA_INCLUDE_DIR NAMES libsmbclient.h ) ++# use pkg-config to get the directories and then use these values ++# in the FIND_PATH() and FIND_LIBRARY() calls ++find_package(PkgConfig) ++pkg_check_modules(PC_LIBSMBCLIENT QUIET smbclient) + +-find_library(SAMBA_LIBRARIES NAMES smbclient ) ++find_path(SAMBA_INCLUDE_DIR NAMES libsmbclient.h ++ HINTS ++ ${PC_LIBSMBCLIENT_INCLUDEDIR} ++ ${PC_LIBSMBCLIENT_INCLUDE_DIRS}) + ++find_library(SAMBA_LIBRARIES NAMES smbclient ++ HINTS ++ ${PC_LIBSMBCLIENT_LIBDIR} ++ ${PC_LIBSMBCLIENT_LIB_DIRS}) + + if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES) + set(SAMBA_FOUND TRUE) diff --git a/kdelibs-4.5.80-parallel_devel.patch b/kdelibs-4.9.95-parallel_devel.patch similarity index 82% rename from kdelibs-4.5.80-parallel_devel.patch rename to kdelibs-4.9.95-parallel_devel.patch index 3058de7..97979db 100644 --- a/kdelibs-4.5.80-parallel_devel.patch +++ b/kdelibs-4.9.95-parallel_devel.patch @@ -1,6 +1,6 @@ -diff -ur kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake kdelibs-4.5.80-parallel_devel/cmake/modules/FindKDE4Internal.cmake ---- kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake 2010-10-27 21:55:42.000000000 +0200 -+++ kdelibs-4.5.80-parallel_devel/cmake/modules/FindKDE4Internal.cmake 2010-11-20 19:41:54.000000000 +0100 +diff -up kdelibs-4.9.95/cmake/modules/FindKDE4Internal.cmake.parallel_devel kdelibs-4.9.95/cmake/modules/FindKDE4Internal.cmake +--- kdelibs-4.9.95/cmake/modules/FindKDE4Internal.cmake.parallel_devel 2012-12-18 02:26:38.000000000 -0600 ++++ kdelibs-4.9.95/cmake/modules/FindKDE4Internal.cmake 2012-12-19 15:21:37.963466601 -0600 @@ -38,10 +38,10 @@ # The following variables are defined for the various tools required to # compile KDE software: @@ -23,7 +23,7 @@ diff -ur kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake kdelibs-4.5.80-para # for Qt Designer plugins. # # KDE4_CREATE_FINAL_FILES (filename_CXX filename_C file1 ... fileN) -@@ -506,31 +506,31 @@ +@@ -509,31 +509,31 @@ if (_kdeBootStrapping) set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH} ) # CMAKE_CFG_INTDIR is the output subdirectory created e.g. by XCode and MSVC if (NOT WINCE) @@ -62,7 +62,7 @@ diff -ur kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake kdelibs-4.5.80-para set( _KDE4_MEINPROC_EXECUTABLE_DEP meinproc4) set(KDE4_INSTALLED_VERSION_OK TRUE) -@@ -579,7 +579,8 @@ +@@ -582,7 +582,8 @@ else (_kdeBootStrapping) # KDE4_LIB_INSTALL_DIR and KDE4_INCLUDE_INSTALL_DIR are set in KDELibsDependencies.cmake, # use them to set the KDE4_LIB_DIR and KDE4_INCLUDE_DIR "public interface" variables @@ -72,7 +72,7 @@ diff -ur kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake kdelibs-4.5.80-para set(KDE4_INCLUDE_DIR ${KDE4_INCLUDE_INSTALL_DIR} ) -@@ -593,18 +594,18 @@ +@@ -596,18 +597,18 @@ else (_kdeBootStrapping) # get the build CONFIGURATIONS which were exported in this file, and use just the first # of them to get the location of the installed executables @@ -95,7 +95,7 @@ diff -ur kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake kdelibs-4.5.80-para # allow searching cmake modules in all given kde install locations (KDEDIRS based) execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) -@@ -930,7 +931,8 @@ +@@ -934,7 +935,8 @@ set(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SY set(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH} "${KDE4_BIN_INSTALL_DIR}" ) @@ -105,7 +105,7 @@ diff -ur kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake kdelibs-4.5.80-para "${KDE4_LIB_INSTALL_DIR}" ) # under Windows dlls may be also installed in bin/ -@@ -1360,9 +1362,9 @@ +@@ -1363,9 +1365,9 @@ macro (KDE4_PRINT_RESULTS) endif (NOT _kdeBootStrapping) if(KDE4_KCFGC_EXECUTABLE) @@ -117,7 +117,7 @@ diff -ur kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake kdelibs-4.5.80-para endif(KDE4_KCFGC_EXECUTABLE) if(AUTOMOC4_EXECUTABLE) -@@ -1381,7 +1383,7 @@ +@@ -1384,7 +1386,7 @@ if (KDE4Internal_FIND_REQUIRED AND NOT K endif (NOT KDE4_INSTALLED_VERSION_OK) if (NOT KDE4_KCFGC_EXECUTABLE) @@ -126,9 +126,9 @@ diff -ur kdelibs-4.5.80/cmake/modules/FindKDE4Internal.cmake kdelibs-4.5.80-para endif (NOT KDE4_KCFGC_EXECUTABLE) message(FATAL_ERROR "ERROR: could NOT find everything required for compiling KDE 4 programs") -diff -ur kdelibs-4.5.80/doc/api/doxygen-preprocess-kcfg.sh kdelibs-4.5.80-parallel_devel/doc/api/doxygen-preprocess-kcfg.sh ---- kdelibs-4.5.80/doc/api/doxygen-preprocess-kcfg.sh 2008-05-21 13:07:26.000000000 +0200 -+++ kdelibs-4.5.80-parallel_devel/doc/api/doxygen-preprocess-kcfg.sh 2010-11-20 19:30:18.000000000 +0100 +diff -up kdelibs-4.9.95/doc/api/doxygen-preprocess-kcfg.sh.parallel_devel kdelibs-4.9.95/doc/api/doxygen-preprocess-kcfg.sh +--- kdelibs-4.9.95/doc/api/doxygen-preprocess-kcfg.sh.parallel_devel 2012-12-17 08:14:16.000000000 -0600 ++++ kdelibs-4.9.95/doc/api/doxygen-preprocess-kcfg.sh 2012-12-19 15:21:37.963466601 -0600 @@ -2,9 +2,9 @@ # Generates and cleans KConfigXT source code during a API dox build # @@ -141,10 +141,10 @@ diff -ur kdelibs-4.5.80/doc/api/doxygen-preprocess-kcfg.sh kdelibs-4.5.80-parall exit 1; fi -diff -ur kdelibs-4.5.80/kdecore/kconfig_compiler/checkkcfg.pl kdelibs-4.5.80-parallel_devel/kdecore/kconfig_compiler/checkkcfg.pl ---- kdelibs-4.5.80/kdecore/kconfig_compiler/checkkcfg.pl 2008-05-21 13:09:13.000000000 +0200 -+++ kdelibs-4.5.80-parallel_devel/kdecore/kconfig_compiler/checkkcfg.pl 2010-11-20 19:30:18.000000000 +0100 -@@ -15,12 +15,12 @@ +diff -up kdelibs-4.9.95/kdecore/kconfig_compiler/checkkcfg.pl.parallel_devel kdelibs-4.9.95/kdecore/kconfig_compiler/checkkcfg.pl +--- kdelibs-4.9.95/kdecore/kconfig_compiler/checkkcfg.pl.parallel_devel 2012-12-17 08:14:16.000000000 -0600 ++++ kdelibs-4.9.95/kdecore/kconfig_compiler/checkkcfg.pl 2012-12-19 15:21:37.963466601 -0600 +@@ -15,12 +15,12 @@ $file_cpp = "$filebase.cpp"; $kcfgc = $file . "c"; @@ -159,9 +159,9 @@ diff -ur kdelibs-4.5.80/kdecore/kconfig_compiler/checkkcfg.pl kdelibs-4.5.80-par exit 1; } -diff -ur kdelibs-4.5.80/kdecore/kconfig_compiler/CMakeLists.txt kdelibs-4.5.80-parallel_devel/kdecore/kconfig_compiler/CMakeLists.txt ---- kdelibs-4.5.80/kdecore/kconfig_compiler/CMakeLists.txt 2010-05-27 19:25:31.000000000 +0200 -+++ kdelibs-4.5.80-parallel_devel/kdecore/kconfig_compiler/CMakeLists.txt 2010-11-20 19:30:18.000000000 +0100 +diff -up kdelibs-4.9.95/kdecore/kconfig_compiler/CMakeLists.txt.parallel_devel kdelibs-4.9.95/kdecore/kconfig_compiler/CMakeLists.txt +--- kdelibs-4.9.95/kdecore/kconfig_compiler/CMakeLists.txt.parallel_devel 2012-12-17 08:14:16.000000000 -0600 ++++ kdelibs-4.9.95/kdecore/kconfig_compiler/CMakeLists.txt 2012-12-19 15:21:37.964466589 -0600 @@ -11,13 +11,13 @@ set(kconfig_compiler_SRCS kconfig_compiler.cpp) @@ -179,10 +179,10 @@ diff -ur kdelibs-4.5.80/kdecore/kconfig_compiler/CMakeLists.txt kdelibs-4.5.80-p # # export this binary for cross-compilation -diff -ur kdelibs-4.5.80/kdeui/tests/kconfig_compiler/CMakeLists.txt kdelibs-4.5.80-parallel_devel/kdeui/tests/kconfig_compiler/CMakeLists.txt ---- kdelibs-4.5.80/kdeui/tests/kconfig_compiler/CMakeLists.txt 2009-08-12 12:00:20.000000000 +0200 -+++ kdelibs-4.5.80-parallel_devel/kdeui/tests/kconfig_compiler/CMakeLists.txt 2010-11-20 19:30:18.000000000 +0100 -@@ -9,7 +9,7 @@ +diff -up kdelibs-4.9.95/kdeui/tests/kconfig_compiler/CMakeLists.txt.parallel_devel kdelibs-4.9.95/kdeui/tests/kconfig_compiler/CMakeLists.txt +--- kdelibs-4.9.95/kdeui/tests/kconfig_compiler/CMakeLists.txt.parallel_devel 2012-12-17 08:14:16.000000000 -0600 ++++ kdelibs-4.9.95/kdeui/tests/kconfig_compiler/CMakeLists.txt 2012-12-19 15:21:37.964466589 -0600 +@@ -9,7 +9,7 @@ macro(GEN_KCFG_TEST_SOURCE _testName _sr add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_testName}.cpp ${CMAKE_CURRENT_BINARY_DIR}/${_testName}.h COMMAND ${KDE4_KCFGC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${_testName}.kcfg ${CMAKE_CURRENT_SOURCE_DIR}/${_testName}.kcfgc @@ -191,10 +191,10 @@ diff -ur kdelibs-4.5.80/kdeui/tests/kconfig_compiler/CMakeLists.txt kdelibs-4.5. # set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_testName}.h PROPERTIES GENERATED TRUE) qt4_generate_moc(${CMAKE_CURRENT_BINARY_DIR}/${_testName}.h ${CMAKE_CURRENT_BINARY_DIR}/${_testName}.moc ) -diff -ur kdelibs-4.5.80/kdewidgets/CMakeLists.txt kdelibs-4.5.80-parallel_devel/kdewidgets/CMakeLists.txt ---- kdelibs-4.5.80/kdewidgets/CMakeLists.txt 2010-11-05 11:48:27.000000000 +0100 -+++ kdelibs-4.5.80-parallel_devel/kdewidgets/CMakeLists.txt 2010-11-20 19:34:43.000000000 +0100 -@@ -14,24 +14,24 @@ +diff -up kdelibs-4.9.95/kdewidgets/CMakeLists.txt.parallel_devel kdelibs-4.9.95/kdewidgets/CMakeLists.txt +--- kdelibs-4.9.95/kdewidgets/CMakeLists.txt.parallel_devel 2012-12-17 08:14:16.000000000 -0600 ++++ kdelibs-4.9.95/kdewidgets/CMakeLists.txt 2012-12-19 15:21:37.964466589 -0600 +@@ -14,24 +14,24 @@ include_directories( set(makekdewidgets_SRCS makekdewidgets.cpp ) @@ -224,7 +224,7 @@ diff -ur kdelibs-4.5.80/kdewidgets/CMakeLists.txt kdelibs-4.5.80-parallel_devel/ set(kdewidgets_PART_SRCS classpreviews.cpp -@@ -61,7 +61,7 @@ +@@ -61,7 +61,7 @@ if(QT_QTDESIGNER_FOUND) if(NOT KDE_NO_DEPRECATED) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kdedeprecated.cpp COMMAND "${MAKEKDEWIDGETS_EXECUTABLE}" -o ${CMAKE_CURRENT_BINARY_DIR}/kdedeprecated.cpp ${CMAKE_CURRENT_SOURCE_DIR}/kdedeprecated.widgets @@ -233,7 +233,7 @@ diff -ur kdelibs-4.5.80/kdewidgets/CMakeLists.txt kdelibs-4.5.80-parallel_devel/ set(kdedeprecated_PART_SRCS classpreviews.cpp -@@ -96,7 +96,7 @@ +@@ -96,7 +96,7 @@ if(QT_QTDESIGNER_FOUND) 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 @@ -242,7 +242,7 @@ diff -ur kdelibs-4.5.80/kdewidgets/CMakeLists.txt kdelibs-4.5.80-parallel_devel/ set(kdewebkitwidgets_PART_SRCS classpreviews.cpp -@@ -132,7 +132,7 @@ +@@ -132,7 +132,7 @@ if(QT_QTDESIGNER_FOUND) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kde3supportwidgets.cpp COMMAND "${MAKEKDEWIDGETS_EXECUTABLE}" -o ${CMAKE_CURRENT_BINARY_DIR}/kde3supportwidgets.cpp ${CMAKE_CURRENT_SOURCE_DIR}/kde3support.widgets diff --git a/kdelibs-4.8.0-libexecdir.patch b/kdelibs-4.9.97-libexecdir.patch similarity index 52% rename from kdelibs-4.8.0-libexecdir.patch rename to kdelibs-4.9.97-libexecdir.patch index c6073b7..b34b6e8 100644 --- a/kdelibs-4.8.0-libexecdir.patch +++ b/kdelibs-4.9.97-libexecdir.patch @@ -1,6 +1,6 @@ -diff -up kdelibs-4.8.0/kdecore/kernel/kstandarddirs.cpp.libexecdir kdelibs-4.8.0/kdecore/kernel/kstandarddirs.cpp ---- kdelibs-4.8.0/kdecore/kernel/kstandarddirs.cpp.libexecdir 2012-01-10 15:17:51.000000000 +0100 -+++ kdelibs-4.8.0/kdecore/kernel/kstandarddirs.cpp 2012-01-19 13:38:07.424309462 +0100 +diff -up kdelibs-4.9.97/kdecore/kernel/kstandarddirs.cpp.libexecdir kdelibs-4.9.97/kdecore/kernel/kstandarddirs.cpp +--- kdelibs-4.9.97/kdecore/kernel/kstandarddirs.cpp.libexecdir 2012-12-17 08:14:17.000000000 -0600 ++++ kdelibs-4.9.97/kdecore/kernel/kstandarddirs.cpp 2013-01-03 14:56:38.768459213 -0600 @@ -1871,7 +1871,7 @@ void KStandardDirs::addKDEDefaults() addResourceType(types_string + types_indices[index], 0, types_string + types_indices[index+1], true); index+=2; @@ -10,9 +10,9 @@ diff -up kdelibs-4.8.0/kdecore/kernel/kstandarddirs.cpp.libexecdir kdelibs-4.8.0 addResourceDir("home", QDir::homePath(), false); -diff -up kdelibs-4.8.0/kdecore/kernel/kstandarddirs_unix.cpp.libexecdir kdelibs-4.8.0/kdecore/kernel/kstandarddirs_unix.cpp ---- kdelibs-4.8.0/kdecore/kernel/kstandarddirs_unix.cpp.libexecdir 2011-07-27 20:34:33.000000000 +0200 -+++ kdelibs-4.8.0/kdecore/kernel/kstandarddirs_unix.cpp 2012-01-19 13:38:07.424309462 +0100 +diff -up kdelibs-4.9.97/kdecore/kernel/kstandarddirs_unix.cpp.libexecdir kdelibs-4.9.97/kdecore/kernel/kstandarddirs_unix.cpp +--- kdelibs-4.9.97/kdecore/kernel/kstandarddirs_unix.cpp.libexecdir 2012-12-17 08:14:16.000000000 -0600 ++++ kdelibs-4.9.97/kdecore/kernel/kstandarddirs_unix.cpp 2013-01-03 14:56:38.768459213 -0600 @@ -63,7 +63,7 @@ QString KStandardDirs::installPath(const if (strcmp("lib", type) == 0) return QFile::decodeName(LIB_INSTALL_DIR "/"); @@ -22,9 +22,9 @@ diff -up kdelibs-4.8.0/kdecore/kernel/kstandarddirs_unix.cpp.libexecdir kdelibs- if (strcmp("locale", type) == 0) return QFile::decodeName(LOCALE_INSTALL_DIR "/"); break; -diff -up kdelibs-4.8.0/kdecore/tests/kstandarddirstest.cpp.libexecdir kdelibs-4.8.0/kdecore/tests/kstandarddirstest.cpp ---- kdelibs-4.8.0/kdecore/tests/kstandarddirstest.cpp.libexecdir 2012-01-18 19:06:22.000000000 +0100 -+++ kdelibs-4.8.0/kdecore/tests/kstandarddirstest.cpp 2012-01-19 13:42:17.955103619 +0100 +diff -up kdelibs-4.9.97/kdecore/tests/kstandarddirstest.cpp.libexecdir kdelibs-4.9.97/kdecore/tests/kstandarddirstest.cpp +--- kdelibs-4.9.97/kdecore/tests/kstandarddirstest.cpp.libexecdir 2012-12-17 08:14:17.000000000 -0600 ++++ kdelibs-4.9.97/kdecore/tests/kstandarddirstest.cpp 2013-01-03 14:56:38.769459202 -0600 @@ -96,8 +96,9 @@ void KStandarddirsTest::testFindResource #define KIOSLAVE "bin/kioslave.exe" #else @@ -46,15 +46,4 @@ diff -up kdelibs-4.8.0/kdecore/tests/kstandarddirstest.cpp.libexecdir kdelibs-4. #endif #ifndef Q_OS_MAC // kdeinit4 is a bundle on Mac, so the below doesn't work -diff -up kdelibs-4.8.0/kio/tests/krununittest.cpp.libexecdir kdelibs-4.8.0/kio/tests/krununittest.cpp ---- kdelibs-4.8.0/kio/tests/krununittest.cpp.libexecdir 2011-07-27 20:34:37.000000000 +0200 -+++ kdelibs-4.8.0/kio/tests/krununittest.cpp 2012-01-19 13:38:07.427309472 +0100 -@@ -160,7 +160,7 @@ void KRunUnitTest::testProcessDesktopExe - if (kmailservice.isEmpty()) kmailservice = "kmailservice"; - if (!kdeinit.isEmpty()) { - QVERIFY(!kmailservice.isEmpty()); -- QVERIFY(kmailservice.contains("kde4/libexec")); -+ QVERIFY(kmailservice.contains("kde4/libexec") || kmailservice.contains("libexec/kde4")); - } - - QTest::newRow("%U l0") << "kdeinit4 %U" << l0 << false << kdeinit; +diff -up kdelibs-4.9.97/kio/tests/krununittest.cpp.libexecdir kdelibs-4.9.97/kio/tests/krununittest.cpp diff --git a/kdelibs-FindKdcraw.patch b/kdelibs-FindKdcraw.patch deleted file mode 100644 index 9012bb5..0000000 --- a/kdelibs-FindKdcraw.patch +++ /dev/null @@ -1,246 +0,0 @@ -diff --git a/cmake/modules/FindKdcraw.cmake b/cmake/modules/FindKdcraw.cmake -index 518033d..1d1a2ac 100644 ---- a/cmake/modules/FindKdcraw.cmake -+++ b/cmake/modules/FindKdcraw.cmake -@@ -1,124 +1,157 @@ --# - Try to find the Kdcraw library -+# Try to find the Kdcraw library - # --# If you have put a local version of libkdcraw into your source tree, --# set KDCRAW_LOCAL_DIR to the relative path to the local directory. -+# Parameters: -+# KDCRAW_LOCAL_DIR - If you have put a local version of libkdcraw into -+# your source tree, set KDCRAW_LOCAL_DIR to the -+# relative path from the root of your source tree -+# to the libkdcraw local directory. - # - # Once done this will define - # --# KDCRAW_FOUND - system has libkdcraw --# KDCRAW_INCLUDE_DIR - the libkdcraw include directory -+# KDCRAW_FOUND - System has libkdcraw -+# KDCRAW_INCLUDE_DIR - The libkdcraw include directory/directories (for #include style) - # KDCRAW_LIBRARIES - Link these to use libkdcraw - # KDCRAW_DEFINITIONS - Compiler switches required for using libkdcraw -+# KDCRAW_VERSION - Version of libkdcraw which was found - # -- --# Copyright (c) 2008, Gilles Caulier, -+# Copyright (c) 2008-2011, Gilles Caulier, -+# Copyright (c) 2011, Michael G. Hansen, - # - # Redistribution and use is allowed according to the terms of the BSD license. - # For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -+# Kdcraw_FIND_QUIETLY and Kdcraw_FIND_REQUIRED may be defined by CMake. - --if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS) -+if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION) - -- message(STATUS "Found Kdcraw library in cache: ${KDCRAW_LIBRARIES}") -+ if (NOT Kdcraw_FIND_QUIETLY) -+ message(STATUS "Found Kdcraw library in cache: ${KDCRAW_LIBRARIES}") -+ endif (NOT Kdcraw_FIND_QUIETLY) - - # in cache already - set(KDCRAW_FOUND TRUE) - --else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS) -- -- message(STATUS "Check Kdcraw library in local sub-folder...") -+else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION) - -- # Check if library is not in local sub-folder -+ if (NOT Kdcraw_FIND_QUIETLY) -+ message(STATUS "Check for Kdcraw library in local sub-folder...") -+ endif (NOT Kdcraw_FIND_QUIETLY) - -+ # Check for a local version of the library. - if (KDCRAW_LOCAL_DIR) -- set (KDCRAW_LOCAL_FOUND TRUE) -+ find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} NO_DEFAULT_PATH) -+ if (NOT KDCRAW_LOCAL_FOUND) -+ message(WARNING "KDCRAW_LOCAL_DIR specified as \"${KDCRAW_LOCAL_DIR}\" but libkdcraw could not be found there.") -+ endif (NOT KDCRAW_LOCAL_FOUND) - else (KDCRAW_LOCAL_DIR) -- find_file(KDCRAW_LOCAL_FOUND libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libkdcraw ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH) -- -+ find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/libkdcraw NO_DEFAULT_PATH) - if (KDCRAW_LOCAL_FOUND) -- # Was it found in libkdcraw/ or in libs/libkdcraw? -- find_file(KDCRAW_LOCAL_FOUND_IN_LIBS libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH) -- if (KDCRAW_LOCAL_FOUND_IN_LIBS) -- set(KDCRAW_LOCAL_DIR libs/libkdcraw) -- else (KDCRAW_LOCAL_FOUND_IN_LIBS) -- set(KDCRAW_LOCAL_DIR libkdcraw) -- endif (KDCRAW_LOCAL_FOUND_IN_LIBS) -+ set(KDCRAW_LOCAL_DIR libkdcraw) -+ endif (KDCRAW_LOCAL_FOUND) -+ find_file(KDCRAW_LOCAL_FOUND libkdcraw/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH) -+ if (KDCRAW_LOCAL_FOUND) -+ set(KDCRAW_LOCAL_DIR libs/libkdcraw) - endif (KDCRAW_LOCAL_FOUND) - endif (KDCRAW_LOCAL_DIR) - - if (KDCRAW_LOCAL_FOUND) -- -- # we need two include directories: because the version.h file is put into the build directory -+ # We need two include directories: because the version.h file is put into the build directory - # TODO KDCRAW_INCLUDE_DIR sounds like it should contain only one directory... - set(KDCRAW_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}) - set(KDCRAW_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}") - set(KDCRAW_LIBRARIES kdcraw) -- message(STATUS "Found Kdcraw library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}") -+ if (NOT Kdcraw_FIND_QUIETLY) -+ message(STATUS "Found Kdcraw library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}") -+ endif (NOT Kdcraw_FIND_QUIETLY) - set(KDCRAW_FOUND TRUE) -- mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS) - -- else(KDCRAW_LOCAL_FOUND) -+ set(kdcraw_version_h_filename "${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}/libkdcraw/version.h") - -- message(STATUS "Check Kdcraw library using pkg-config...") -+ else (KDCRAW_LOCAL_FOUND) - if (NOT WIN32) -- # use pkg-config to get the directories and then use these values -- # in the FIND_PATH() and FIND_LIBRARY() calls -- include(UsePkgConfig) -- -- PKGCONFIG(libkdcraw _KDCRAWIncDir _KDCRAWLinkDir _KDCRAWLinkFlags _KDCRAWCflags) -- -- if (_KDCRAWLinkFlags) -- # query pkg-config asking for a libkdcraw >= 0.2.0 -- exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkdcraw RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) -- if (_return_VALUE STREQUAL "0") -- message(STATUS "Found libkdcraw release >= 0.2.0") -- set(KDCRAW_VERSION_GOOD_FOUND TRUE) -- else (_return_VALUE STREQUAL "0") -- message(STATUS "Found libkdcaw release < 0.2.0, too old") -- set(KDCRAW_VERSION_GOOD_FOUND FALSE) -- set(KDCRAW_FOUND FALSE) -- endif (_return_VALUE STREQUAL "0") -- else (_KDCRAWLinkFlags) -+ if (NOT Kdcraw_FIND_QUIETLY) -+ message(STATUS "Check Kdcraw library using pkg-config...") -+ endif (NOT Kdcraw_FIND_QUIETLY) -+ -+ # use FindPkgConfig to get the directories and then use these values -+ # in the find_path() and find_library() calls -+ include(FindPkgConfig) -+ -+ pkg_check_modules(PC_KDCRAW libkdcraw) -+ -+ if (PC_KDCRAW_FOUND) -+ # make sure the version is >= 0.2.0 -+ # TODO: WHY? -+ if (PC_KDCRAW_VERSION VERSION_LESS 0.2.0) -+ message(STATUS "Found libkdcraw release < 0.2.0, too old") -+ set(KDCRAW_VERSION_GOOD_FOUND FALSE) -+ set(KDCRAW_FOUND FALSE) -+ else (PC_KDCRAW_VERSION VERSION_LESS 0.2.0) -+ set(KDCRAW_VERSION "${PC_KDCRAW_VERSION}") -+ if (NOT Kdcraw_FIND_QUIETLY) -+ message(STATUS "Found libkdcraw release ${KDCRAW_VERSION}") -+ endif (NOT Kdcraw_FIND_QUIETLY) -+ set(KDCRAW_VERSION_GOOD_FOUND TRUE) -+ endif (PC_KDCRAW_VERSION VERSION_LESS 0.2.0) -+ else (PC_KDCRAW_FOUND) - set(KDCRAW_VERSION_GOOD_FOUND FALSE) -- set(KDCRAW_FOUND FALSE) -- endif (_KDCRAWLinkFlags) -+ endif (PC_KDCRAW_FOUND) - else (NOT WIN32) -+ # TODO: Why do we just assume the version is good? - set(KDCRAW_VERSION_GOOD_FOUND TRUE) - endif (NOT WIN32) - - if (KDCRAW_VERSION_GOOD_FOUND) -- set(KDCRAW_DEFINITIONS "${_KDCRAWCflags}") -- -- find_path(KDCRAW_INCLUDE_DIR libkdcraw/version.h -- ${_KDCRAWIncDir} -- ) -- -- find_library(KDCRAW_LIBRARIES NAMES kdcraw -- PATHS -- ${_KDCRAWLinkDir} -- ) -- -- if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES) -- set(KDCRAW_FOUND TRUE) -- endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES) -- endif (KDCRAW_VERSION_GOOD_FOUND) -- if (KDCRAW_FOUND) -- if (NOT Kdcraw_FIND_QUIETLY) -- message(STATUS "Found libkdcraw: ${KDCRAW_LIBRARIES}") -- endif (NOT Kdcraw_FIND_QUIETLY) -- else (KDCRAW_FOUND) -- if (Kdcraw_FIND_REQUIRED) -- if (NOT KDCRAW_INCLUDE_DIR) -- message(FATAL_ERROR "Could NOT find libkdcraw header files") -- endif (NOT KDCRAW_INCLUDE_DIR) -- if (NOT KDCRAW_LIBRARIES) -- message(FATAL_ERROR "Could NOT find libkdcraw library") -- endif (NOT KDCRAW_LIBRARIES) -- endif (Kdcraw_FIND_REQUIRED) -- endif (KDCRAW_FOUND) -- -- mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS) -- -- endif(KDCRAW_LOCAL_FOUND) -- --endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS) -+ set(KDCRAW_DEFINITIONS "${PC_KDCRAW_CFLAGS_OTHER}") -+ -+ find_path(KDCRAW_INCLUDE_DIR libkdcraw/version.h ${PC_KDCRAW_INCLUDE_DIRS}) -+ set(kdcraw_version_h_filename "${KDCRAW_INCLUDE_DIR}/libkdcraw/version.h") -+ -+ find_library(KDCRAW_LIBRARIES NAMES kdcraw HINTS ${PC_KDCRAW_LIBRARY_DIRS}) -+ -+ if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES) -+ set(KDCRAW_FOUND TRUE) -+ else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES) -+ set(KDCRAW_FOUND FALSE) -+ endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES) -+ endif (KDCRAW_VERSION_GOOD_FOUND) -+ -+ if (KDCRAW_FOUND) -+ if (NOT Kdcraw_FIND_QUIETLY) -+ message(STATUS "Found libkdcraw: ${KDCRAW_LIBRARIES}") -+ endif (NOT Kdcraw_FIND_QUIETLY) -+ else (KDCRAW_FOUND) -+ if (Kdcraw_FIND_REQUIRED) -+ if (NOT KDCRAW_INCLUDE_DIR) -+ message(FATAL_ERROR "Could NOT find libkdcraw header files.") -+ else(NOT KDCRAW_INCLUDE_DIR) -+ message(FATAL_ERROR "Could NOT find libkdcraw library.") -+ endif (NOT KDCRAW_INCLUDE_DIR) -+ endif (Kdcraw_FIND_REQUIRED) -+ endif (KDCRAW_FOUND) -+ -+ endif (KDCRAW_LOCAL_FOUND) -+ -+ if (KDCRAW_FOUND) -+ # Find the version information, unless that was reported by pkg_search_module. -+ if (NOT KDCRAW_VERSION) -+ file(READ "${kdcraw_version_h_filename}" kdcraw_version_h_content) -+ # This is the line we are trying to find: static const char kdcraw_version[] = "1.22.4-beta_5+dfsg"; -+ string(REGEX REPLACE ".*char +kdcraw_version\\[\\] += +\"([^\"]+)\".*" "\\1" KDCRAW_VERSION "${kdcraw_version_h_content}") -+ unset(kdcraw_version_h_content) -+ -+ endif (NOT KDCRAW_VERSION) -+ unset(kdcraw_version_h_filename) -+ endif (KDCRAW_FOUND) -+ -+ if (KDCRAW_FOUND) -+ mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS KDCRAW_VERSION KDCRAW_FOUND) -+ else (KDCRAW_FOUND) -+ # The library was not found, reset all related variables. -+ unset(KDCRAW_INCLUDE_DIR) -+ unset(KDCRAW_LIBRARIES) -+ unset(KDCRAW_DEFINITIONS) -+ unset(KDCRAW_VERSION) -+ endif (KDCRAW_FOUND) -+ -+endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS AND KDCRAW_VERSION) diff --git a/kdelibs-cmake_python3.patch b/kdelibs-cmake_python3.patch deleted file mode 100644 index 3bc1ad0..0000000 --- a/kdelibs-cmake_python3.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/cmake/modules/FindLibPython.py 2011-07-27 13:34:31.000000000 -0500 -+++ b/cmake/modules/FindLibPython.py 2012-07-24 14:57:17.259160400 -0500 -@@ -11,3 +11,5 @@ - print("long_version:%s" % sys.version.split()[0]) - print("py_inc_dir:%s" % distutils.sysconfig.get_python_inc()) - print("site_packages_dir:%s" % distutils.sysconfig.get_python_lib(plat_specific=1)) -+if sys.version_info >= (3, 2): -+ print("abiflags:%s" % sys.abiflags) ---- a/cmake/modules/FindPythonLibrary.cmake 2011-07-27 13:34:31.000000000 -0500 -+++ b/cmake/modules/FindPythonLibrary.cmake 2012-07-24 15:06:50.180929600 -0500 -@@ -54,6 +54,9 @@ - - string(REGEX REPLACE ".*\npy_inc_dir:([^\n]+).*$" "\\1" _TMP_PYTHON_INCLUDE_PATH ${python_config}) - string(REGEX REPLACE ".*\nsite_packages_dir:([^\n]+).*$" "\\1" _TMP_PYTHON_SITE_PACKAGES_DIR ${python_config}) -+ if(PYTHON_SHORT_VERSION VERSION_GREATER "3.1") -+ string(REGEX REPLACE ".*\nabiflags:([^\n]+).*$" "\\1" _TMP_PYTHON_ABIFLAGS ${python_config}) -+ endif(PYTHON_SHORT_VERSION VERSION_GREATER "3.1") - - # Put these two variables in the cache so they are visible for the user, but read-only: - set(PYTHON_INCLUDE_PATH "${_TMP_PYTHON_INCLUDE_PATH}" CACHE PATH "The python include directory" FORCE) -@@ -63,7 +66,7 @@ - set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/python${PYTHON_SHORT_VERSION}/site-packages CACHE PATH "The directory where python modules will be installed to.") - - string(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1\\2" PYTHON_SHORT_VERSION_NO_DOT ${PYTHON_SHORT_VERSION}) -- set(PYTHON_LIBRARY_NAMES python${PYTHON_SHORT_VERSION} python${PYTHON_SHORT_VERSION_NO_DOT}) -+ set(PYTHON_LIBRARY_NAMES python${PYTHON_SHORT_VERSION}${_TMP_PYTHON_ABIFLAGS} python${PYTHON_SHORT_VERSION_NO_DOT}) - if(WIN32) - string(REPLACE "\\" "/" PYTHON_SITE_PACKAGES_DIR ${PYTHON_SITE_PACKAGES_DIR}) - endif(WIN32) diff --git a/kdelibs-solid_qt_no_debug_output.patch b/kdelibs-solid_qt_no_debug_output.patch index 743f39c..197e53a 100644 --- a/kdelibs-solid_qt_no_debug_output.patch +++ b/kdelibs-solid_qt_no_debug_output.patch @@ -1,6 +1,21 @@ -diff -up kdelibs-4.9.4/solid/solid/backends/udisks2/udisksstorageaccess.cpp.solid_qt_no_debug_output kdelibs-4.9.4/solid/solid/backends/udisks2/udisksstorageaccess.cpp ---- kdelibs-4.9.4/solid/solid/backends/udisks2/udisksstorageaccess.cpp.solid_qt_no_debug_output 2012-12-12 14:52:52.199346662 -0600 -+++ kdelibs-4.9.4/solid/solid/backends/udisks2/udisksstorageaccess.cpp 2012-12-12 15:44:40.854085494 -0600 +diff -up kdelibs-4.9.90/solid/solid/backends/hal/halstorageaccess.cpp.solid_qt_no_debug_output kdelibs-4.9.90/solid/solid/backends/hal/halstorageaccess.cpp +--- kdelibs-4.9.90/solid/solid/backends/hal/halstorageaccess.cpp.solid_qt_no_debug_output 2012-11-14 09:58:29.000000000 -0600 ++++ kdelibs-4.9.90/solid/solid/backends/hal/halstorageaccess.cpp 2012-12-12 16:18:25.817495558 -0600 +@@ -340,9 +340,11 @@ bool StorageAccess::requestPassphrase() + returnService, m_lastReturnObject, + wId, appId); + m_passphraseRequested = reply.isValid(); ++#ifndef QT_NO_DEBUG_STREAM + if (!m_passphraseRequested) { + qWarning() << "Failed to call the SolidUiServer, D-Bus said:" << reply.error(); + } ++#endif + return m_passphraseRequested; + } + +diff -up kdelibs-4.9.90/solid/solid/backends/udisks2/udisksstorageaccess.cpp.solid_qt_no_debug_output kdelibs-4.9.90/solid/solid/backends/udisks2/udisksstorageaccess.cpp +--- kdelibs-4.9.90/solid/solid/backends/udisks2/udisksstorageaccess.cpp.solid_qt_no_debug_output 2012-11-14 09:58:29.000000000 -0600 ++++ kdelibs-4.9.90/solid/solid/backends/udisks2/udisksstorageaccess.cpp 2012-12-12 16:17:36.922022895 -0600 @@ -341,9 +341,10 @@ bool StorageAccess::requestPassphrase() QDBusReply reply = soliduiserver.call("showPassphraseDialog", udi, returnService, m_lastReturnObject, wId, appId); @@ -13,10 +28,10 @@ diff -up kdelibs-4.9.4/solid/solid/backends/udisks2/udisksstorageaccess.cpp.soli return m_passphraseRequested; } -diff -up kdelibs-4.9.4/solid/solid/CMakeLists.txt.solid_qt_no_debug_output kdelibs-4.9.4/solid/solid/CMakeLists.txt ---- kdelibs-4.9.4/solid/solid/CMakeLists.txt.solid_qt_no_debug_output 2012-12-12 14:52:52.194346712 -0600 -+++ kdelibs-4.9.4/solid/solid/CMakeLists.txt 2012-12-12 14:52:52.203346619 -0600 -@@ -240,7 +240,7 @@ if(NOT WIN32 AND NOT APPLE) +diff -up kdelibs-4.9.90/solid/solid/CMakeLists.txt.solid_qt_no_debug_output kdelibs-4.9.90/solid/solid/CMakeLists.txt +--- kdelibs-4.9.90/solid/solid/CMakeLists.txt.solid_qt_no_debug_output 2012-11-14 09:58:29.000000000 -0600 ++++ kdelibs-4.9.90/solid/solid/CMakeLists.txt 2012-12-12 16:17:36.922022895 -0600 +@@ -268,7 +268,7 @@ if(NOT WIN32 AND NOT APPLE) if ( WITH_SOLID_UDISKS2 ) message(STATUS "Building Solid UDisks2 backend." ) diff --git a/kdelibs-udisks2-backend.patch b/kdelibs-udisks2-backend.patch deleted file mode 100644 index 9ab0ac4..0000000 --- a/kdelibs-udisks2-backend.patch +++ /dev/null @@ -1,4068 +0,0 @@ -diff --git a/solid/solid/CMakeLists.txt b/solid/solid/CMakeLists.txt -index 0aa7a43..b00e50a 100644 ---- a/solid/solid/CMakeLists.txt -+++ b/solid/solid/CMakeLists.txt -@@ -1,6 +1,7 @@ - set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) - add_subdirectory( ifaces ) - include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) -+include_directories( ${QT_QTDBUS_INCLUDE_DIR} ) - - if(WIN32) - include_directories( ${KDEWIN_INCLUDES} ) -@@ -39,7 +40,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 - ) -@@ -225,33 +225,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 -@@ -264,19 +237,39 @@ 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." ) -- 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 -- ) -+ -+ if ( WITH_SOLID_UDISKS2 ) -+ message(STATUS "Building Solid UDisks2 backend." ) -+ add_definitions(-DWITH_SOLID_UDISKS2) -+ set(solid_LIB_SRCS ${solid_LIB_SRCS} -+ backends/udisks2/udisksmanager.cpp -+ backends/udisks2/udisksdevice.cpp -+ backends/udisks2/udisksdevicebackend.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 -+ ) -+ else ( WITH_SOLID_UDISKS2 ) -+ message(STATUS "Building Solid UDisks 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 -+ ) -+ endif ( WITH_SOLID_UDISKS2 ) - endif (CMAKE_SYSTEM_NAME MATCHES Linux) - - message(STATUS "Building Solid fstab backend." ) -diff --git a/solid/solid/backends/udisks2/dbus/manager.cpp b/solid/solid/backends/udisks2/dbus/manager.cpp -new file mode 100644 -index 0000000..7ea4aa8 ---- /dev/null -+++ b/solid/solid/backends/udisks2/dbus/manager.cpp -@@ -0,0 +1,26 @@ -+/* -+ * This file was generated by qdbusxml2cpp version 0.7 -+ * Command line was: qdbusxml2cpp -p manager manager.xml -+ * -+ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -+ * -+ * This is an auto-generated file. -+ * This file may have been hand-edited. Look for HAND-EDIT comments -+ * before re-generating it. -+ */ -+ -+#include "manager.h" -+ -+/* -+ * Implementation of interface class OrgFreedesktopDBusObjectManagerInterface -+ */ -+ -+OrgFreedesktopDBusObjectManagerInterface::OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) -+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) -+{ -+} -+ -+OrgFreedesktopDBusObjectManagerInterface::~OrgFreedesktopDBusObjectManagerInterface() -+{ -+} -+ -diff --git a/solid/solid/backends/udisks2/dbus/manager.h b/solid/solid/backends/udisks2/dbus/manager.h -new file mode 100644 -index 0000000..11f0be8 ---- /dev/null -+++ b/solid/solid/backends/udisks2/dbus/manager.h -@@ -0,0 +1,59 @@ -+/* -+ * This file was generated by qdbusxml2cpp version 0.7 -+ * Command line was: qdbusxml2cpp -p manager manager.xml -+ * -+ * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -+ * -+ * This is an auto-generated file. -+ * Do not edit! All changes made to it will be lost. -+ */ -+ -+#ifndef MANAGER_H_1329493525 -+#define MANAGER_H_1329493525 -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "../udisks2.h" -+ -+/* -+ * Proxy class for interface org.freedesktop.DBus.ObjectManager -+ */ -+class OrgFreedesktopDBusObjectManagerInterface: public QDBusAbstractInterface -+{ -+ Q_OBJECT -+public: -+ static inline const char *staticInterfaceName() -+ { return "org.freedesktop.DBus.ObjectManager"; } -+ -+public: -+ OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); -+ -+ ~OrgFreedesktopDBusObjectManagerInterface(); -+ -+public Q_SLOTS: // METHODS -+ inline QDBusPendingReply GetManagedObjects() -+ { -+ QList argumentList; -+ return asyncCallWithArgumentList(QLatin1String("GetManagedObjects"), argumentList); -+ } -+ -+Q_SIGNALS: // SIGNALS -+ void InterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties); -+ void InterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces); -+}; -+ -+namespace org { -+ namespace freedesktop { -+ namespace DBus { -+ typedef ::OrgFreedesktopDBusObjectManagerInterface ObjectManager; -+ } -+ } -+} -+#endif -diff --git a/solid/solid/backends/udisks2/dbus/manager.xml b/solid/solid/backends/udisks2/dbus/manager.xml -new file mode 100644 -index 0000000..8f25cb6 ---- /dev/null -+++ b/solid/solid/backends/udisks2/dbus/manager.xml -@@ -0,0 +1,21 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/solid/solid/backends/udisks2/udisks2.h b/solid/solid/backends/udisks2/udisks2.h -new file mode 100644 -index 0000000..8dda86a ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisks2.h -@@ -0,0 +1,78 @@ -+/* -+ Copyright 2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef SOLID_BACKENDS_UDISKS2_H -+#define SOLID_BACKENDS_UDISKS2_H -+ -+#include -+#include -+#include -+#include -+#include -+ -+typedef QList QByteArrayList; -+Q_DECLARE_METATYPE(QByteArrayList) -+ -+typedef QMap QVariantMapMap; -+Q_DECLARE_METATYPE(QVariantMapMap) -+ -+typedef QMap DBUSManagerStruct; -+Q_DECLARE_METATYPE(DBUSManagerStruct) -+ -+/* UDisks2 */ -+#define UD2_DBUS_SERVICE "org.freedesktop.UDisks2" -+#define UD2_DBUS_PATH "/org/freedesktop/UDisks2" -+#define UD2_UDI_DISKS_PREFIX "/org/freedesktop/UDisks2" -+#define UD2_DBUS_PATH_MANAGER "/org/freedesktop/UDisks2/Manager" -+#define UD2_DBUS_PATH_DRIVES "/org/freedesktop/UDisks2/drives/" -+#define UD2_DBUS_PATH_JOBS "/org/freedesktop/UDisks2/jobs/" -+#define DBUS_INTERFACE_PROPS "org.freedesktop.DBus.Properties" -+#define DBUS_INTERFACE_INTROSPECT "org.freedesktop.DBus.Introspectable" -+#define DBUS_INTERFACE_MANAGER "org.freedesktop.DBus.ObjectManager" -+#define UD2_DBUS_INTERFACE_BLOCK "org.freedesktop.UDisks2.Block" -+#define UD2_DBUS_INTERFACE_DRIVE "org.freedesktop.UDisks2.Drive" -+#define UD2_DBUS_INTERFACE_PARTITION "org.freedesktop.UDisks2.Partition" -+#define UD2_DBUS_INTERFACE_PARTITIONTABLE "org.freedesktop.UDisks2.PartitionTable" -+#define UD2_DBUS_INTERFACE_FILESYSTEM "org.freedesktop.UDisks2.Filesystem" -+#define UD2_DBUS_INTERFACE_ENCRYPTED "org.freedesktop.UDisks2.Encrypted" -+#define UD2_DBUS_INTERFACE_SWAP "org.freedesktop.UDisks2.Swapspace" -+#define UD2_DBUS_INTERFACE_LOOP "org.freedesktop.UDisks2.Loop" -+ -+/* errors */ -+#define UD2_ERROR_UNAUTHORIZED "org.freedesktop.PolicyKit.Error.NotAuthorized" -+#define UD2_ERROR_BUSY "org.freedesktop.UDisks2.Error.DeviceBusy" -+#define UD2_ERROR_FAILED "org.freedesktop.UDisks2.Error.Failed" -+#define UD2_ERROR_CANCELED "org.freedesktop.UDisks2.Error.Cancelled" -+#define UD2_ERROR_INVALID_OPTION "org.freedesktop.UDisks2.Error.OptionNotPermitted" -+#define UD2_ERROR_MISSING_DRIVER "org.freedesktop.UDisks2.Error.NotSupported" -+ -+#define UD2_ERROR_ALREADY_MOUNTED "org.freedesktop.UDisks2.Error.AlreadyMounted" -+#define UD2_ERROR_NOT_MOUNTED "org.freedesktop.UDisks2.Error.NotMounted" -+#define UD2_ERROR_MOUNTED_BY_OTHER_USER "org.freedesktop.UDisks2.Error.MountedByOtherUser" -+#define UD2_ERROR_ALREADY_UNMOUNTING "org.freedesktop.UDisks2.Error.AlreadyUnmounting" -+#define UD2_ERROR_TIMED_OUT "org.freedesktop.UDisks2.Error.Timedout" -+#define UD2_ERROR_WOULD_WAKEUP "org.freedesktop.UDisks2.Error.WouldWakeup" -+#define UD2_ERROR_ALREADY_CANCELLED "org.freedesktop.UDisks2.Error.AlreadyCancelled" -+ -+#define UD2_ERROR_NOT_AUTHORIZED "org.freedesktop.UDisks2.Error.NotAuthorized" -+#define UD2_ERROR_NOT_AUTHORIZED_CAN_OBTAIN "org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain" -+#define UD2_ERROR_NOT_AUTHORIZED_DISMISSED "org.freedesktop.UDisks2.Error.NotAuthorizedDismissed" -+ -+#endif // SOLID_BACKENDS_UDISKS2_H -diff --git a/solid/solid/backends/udisks2/udisksblock.cpp b/solid/solid/backends/udisks2/udisksblock.cpp -new file mode 100644 -index 0000000..f3cd1e8 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksblock.cpp -@@ -0,0 +1,88 @@ -+/* -+ Copyright 2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "udisksblock.h" -+ -+using namespace Solid::Backends::UDisks2; -+ -+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()) { -+ const QString path = "/org/freedesktop/UDisks2/block_devices"; -+ QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, -+ DBUS_INTERFACE_INTROSPECT, "Introspect"); -+ QDBusPendingReply reply = QDBusConnection::systemBus().asyncCall(call); -+ reply.waitForFinished(); -+ -+ if (reply.isValid()) { -+ QDomDocument dom; -+ dom.setContent(reply.value()); -+ QDomNodeList nodeList = dom.documentElement().elementsByTagName("node"); -+ for (int i = 0; i < nodeList.count(); i++) { -+ QDomElement nodeElem = nodeList.item(i).toElement(); -+ if (!nodeElem.isNull() && nodeElem.hasAttribute("name")) { -+ const QString udi = path + "/" + nodeElem.attribute("name"); -+ -+ Device device(udi); -+ if (device.drivePath() == dev->udi()) { -+ m_devNum = device.prop("DeviceNumber").toULongLong(); -+ m_devFile = QFile::decodeName(device.prop("Device").toByteArray()); -+ break; -+ } -+ } -+ } -+ } -+ else -+ qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message(); -+ } -+ -+ //qDebug() << "devnum:" << m_devNum << "dev file:" << m_devFile; -+} -+ -+Block::~Block() -+{ -+} -+ -+QString Block::device() const -+{ -+ return m_devFile; -+} -+ -+int Block::deviceMinor() const -+{ -+ return MINOR(m_devNum); -+} -+ -+int Block::deviceMajor() const -+{ -+ return MAJOR(m_devNum); -+} -diff --git a/solid/solid/backends/udisks2/udisksblock.h b/solid/solid/backends/udisks2/udisksblock.h -new file mode 100644 -index 0000000..19cb70a ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksblock.h -@@ -0,0 +1,56 @@ -+/* -+ Copyright 2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef UDISKS2BLOCK_H -+#define UDISKS2BLOCK_H -+ -+#include -+#include "udisksdeviceinterface.h" -+ -+namespace Solid -+{ -+namespace Backends -+{ -+namespace UDisks2 -+{ -+ -+class Block: public DeviceInterface, virtual public Solid::Ifaces::Block -+{ -+ -+ Q_OBJECT -+ Q_INTERFACES(Solid::Ifaces::Block) -+ -+public: -+ Block(Device *dev); -+ virtual ~Block(); -+ -+ virtual QString device() const; -+ virtual int deviceMinor() const; -+ virtual int deviceMajor() const; -+private: -+ dev_t m_devNum; -+ QString m_devFile; -+}; -+ -+} -+} -+} -+ -+#endif // UDISKS2BLOCK_H -diff --git a/solid/solid/backends/udisks2/udisksdevice.cpp b/solid/solid/backends/udisks2/udisksdevice.cpp -new file mode 100644 -index 0000000..2a4313a ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksdevice.cpp -@@ -0,0 +1,833 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010-2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include "udisksdevice.h" -+#include "udisksdevicebackend.h" -+#include "udisksblock.h" -+#include "udisksdeviceinterface.h" -+#include "udisksstoragevolume.h" -+#include "udisksopticaldisc.h" -+#include "udisksopticaldrive.h" -+#include "udisksstorageaccess.h" -+#include "udisksgenericinterface.h" -+ -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+using namespace Solid::Backends::UDisks2; -+ -+// Adapted from KLocale as Solid needs to be Qt-only -+static QString formatByteSize(double size) -+{ -+ // Per IEC 60027-2 -+ -+ // Binary prefixes -+ //Tebi-byte TiB 2^40 1,099,511,627,776 bytes -+ //Gibi-byte GiB 2^30 1,073,741,824 bytes -+ //Mebi-byte MiB 2^20 1,048,576 bytes -+ //Kibi-byte KiB 2^10 1,024 bytes -+ -+ QString s; -+ // Gibi-byte -+ if ( size >= 1073741824.0 ) -+ { -+ size /= 1073741824.0; -+ if ( size > 1024 ) // Tebi-byte -+ s = QCoreApplication::translate("", "%1 TiB").arg(QLocale().toString(size / 1024.0, 'f', 1)); -+ else -+ s = QCoreApplication::translate("", "%1 GiB").arg(QLocale().toString(size, 'f', 1)); -+ } -+ // Mebi-byte -+ else if ( size >= 1048576.0 ) -+ { -+ size /= 1048576.0; -+ s = QCoreApplication::translate("", "%1 MiB").arg(QLocale().toString(size, 'f', 1)); -+ } -+ // Kibi-byte -+ else if ( size >= 1024.0 ) -+ { -+ size /= 1024.0; -+ s = QCoreApplication::translate("", "%1 KiB").arg(QLocale().toString(size, 'f', 1)); -+ } -+ // Just byte -+ else if ( size > 0 ) -+ { -+ s = QCoreApplication::translate("", "%1 B").arg(QLocale().toString(size, 'f', 1)); -+ } -+ // Nothing -+ else -+ { -+ s = QCoreApplication::translate("", "0 B"); -+ } -+ return s; -+} -+ -+Device::Device(const QString &udi) -+ : Solid::Ifaces::Device() -+ , m_backend(DeviceBackend::backendForUDI(udi)) -+{ -+ if (m_backend) { -+ connect(m_backend, SIGNAL(changed()), this, SIGNAL(changed())); -+ connect(m_backend, SIGNAL(propertyChanged(QMap)), this, SIGNAL(propertyChanged(QMap))); -+ } else { -+ qDebug() << "Created invalid Device for udi" << udi; -+ } -+} -+ -+Device::~Device() -+{ -+} -+ -+QString Device::udi() const -+{ -+ if (m_backend) { -+ return m_backend->udi(); -+ } -+ -+ return QString(); -+} -+ -+QVariant Device::prop(const QString &key) const -+{ -+ if (m_backend) { -+ return m_backend->prop(key); -+ } -+ -+ return QVariant(); -+} -+ -+bool Device::propertyExists(const QString &key) const -+{ -+ if (m_backend) { -+ return m_backend->propertyExists(key); -+ } -+ -+ return false; -+} -+ -+QVariantMap Device::allProperties() const -+{ -+ if (m_backend) { -+ return m_backend->allProperties(); -+ } -+ -+ return QVariantMap(); -+} -+ -+bool Device::hasInterface(const QString &name) const -+{ -+ if (m_backend) { -+ return m_backend->interfaces().contains(name); -+ } -+ -+ return false; -+} -+ -+QStringList Device::interfaces() const -+{ -+ if (m_backend) { -+ return m_backend->interfaces(); -+ } -+ -+ return QStringList(); -+} -+ -+QObject* Device::createDeviceInterface(const Solid::DeviceInterface::Type& type) -+{ -+ if (!queryDeviceInterface(type)) { -+ return 0; -+ } -+ -+ DeviceInterface *iface = 0; -+ switch (type) -+ { -+ case Solid::DeviceInterface::GenericInterface: -+ iface = new GenericInterface(this); -+ break; -+ case Solid::DeviceInterface::Block: -+ iface = new Block(this); -+ break; -+ case Solid::DeviceInterface::StorageAccess: -+ iface = new StorageAccess(this); -+ break; -+ case Solid::DeviceInterface::StorageDrive: -+ iface = new StorageDrive(this); -+ break; -+ case Solid::DeviceInterface::OpticalDrive: -+ iface = new OpticalDrive(this); -+ break; -+ case Solid::DeviceInterface::StorageVolume: -+ iface = new StorageVolume(this); -+ break; -+ case Solid::DeviceInterface::OpticalDisc: -+ iface = new OpticalDisc(this); -+ break; -+ default: -+ break; -+ } -+ return iface; -+} -+ -+bool Device::queryDeviceInterface(const Solid::DeviceInterface::Type& type) const -+{ -+ switch (type) { -+ case Solid::DeviceInterface::GenericInterface: -+ return true; -+ case Solid::DeviceInterface::Block: -+ return isBlock() || isDrive(); -+ case Solid::DeviceInterface::StorageVolume: -+ return isStorageVolume(); -+ case Solid::DeviceInterface::StorageAccess: -+ return isStorageAccess(); -+ case Solid::DeviceInterface::StorageDrive: -+ return isDrive(); -+ case Solid::DeviceInterface::OpticalDrive: -+ return isOpticalDrive(); -+ case Solid::DeviceInterface::OpticalDisc: -+ return isOpticalDisc(); -+ default: -+ return false; -+ } -+} -+ -+QStringList Device::emblems() const -+{ -+ QStringList res; -+ -+ if (queryDeviceInterface(Solid::DeviceInterface::StorageAccess)) -+ { -+ const UDisks2::StorageAccess accessIface(const_cast(this)); -+ if (accessIface.isAccessible()) -+ { -+ if (isEncryptedContainer()) -+ res << "emblem-encrypted-unlocked"; -+ else -+ res << "emblem-mounted"; -+ } -+ else -+ { -+ if (isEncryptedContainer()) -+ res << "emblem-encrypted-locked"; -+ else -+ res << "emblem-unmounted"; -+ } -+ } -+ -+ return res; -+} -+ -+QString Device::description() const -+{ -+ const QString hintName = property("HintName").toString(); // non-cached -+ if (!hintName.isEmpty()) -+ return hintName; -+ -+ if (isLoop()) -+ return QObject::tr("Loop Device"); -+ else if (isSwap()) -+ return QObject::tr("Swap Space"); -+ else if (queryDeviceInterface(Solid::DeviceInterface::StorageDrive)) -+ return storageDescription(); -+ else if (queryDeviceInterface(Solid::DeviceInterface::StorageVolume)) -+ return volumeDescription(); -+ else -+ return product(); -+} -+ -+QString Device::storageDescription() const -+{ -+ QString description; -+ const UDisks2::StorageDrive storageDrive(const_cast(this)); -+ Solid::StorageDrive::DriveType drive_type = storageDrive.driveType(); -+ const bool drive_is_hotpluggable = storageDrive.isHotpluggable(); -+ -+ if (drive_type == Solid::StorageDrive::CdromDrive) -+ { -+ const UDisks2::OpticalDrive opticalDrive(const_cast(this)); -+ Solid::OpticalDrive::MediumTypes mediumTypes = opticalDrive.supportedMedia(); -+ QString first; -+ QString second; -+ -+ first = QCoreApplication::translate("", "CD-ROM", "First item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::Cdr) -+ first = QCoreApplication::translate("", "CD-R", "First item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::Cdrw) -+ first = QCoreApplication::translate("", "CD-RW", "First item of %1%2 Drive sentence"); -+ -+ if (mediumTypes & Solid::OpticalDrive::Dvd) -+ second = QCoreApplication::translate("", "/DVD-ROM", "Second item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::Dvdplusr) -+ second = QCoreApplication::translate("", "/DVD+R", "Second item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::Dvdplusrw) -+ second = QCoreApplication::translate("", "/DVD+RW", "Second item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::Dvdr) -+ second = QCoreApplication::translate("", "/DVD-R", "Second item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::Dvdrw) -+ second = QCoreApplication::translate("", "/DVD-RW", "Second item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::Dvdram) -+ second = QCoreApplication::translate("", "/DVD-RAM", "Second item of %1%2 Drive sentence"); -+ if ((mediumTypes & Solid::OpticalDrive::Dvdr) && (mediumTypes & Solid::OpticalDrive::Dvdplusr)) -+ { -+ if(mediumTypes & Solid::OpticalDrive::Dvdplusdl) -+ second = QObject::trUtf8("/DVD±R DL", "Second item of %1%2 Drive sentence"); -+ else -+ second = QObject::trUtf8("/DVD±R", "Second item of %1%2 Drive sentence"); -+ } -+ if ((mediumTypes & Solid::OpticalDrive::Dvdrw) && (mediumTypes & Solid::OpticalDrive::Dvdplusrw)) -+ { -+ if((mediumTypes & Solid::OpticalDrive::Dvdplusdl) || (mediumTypes & Solid::OpticalDrive::Dvdplusdlrw)) -+ second = QObject::trUtf8("/DVD±RW DL", "Second item of %1%2 Drive sentence"); -+ else -+ second = QObject::trUtf8("/DVD±RW", "Second item of %1%2 Drive sentence"); -+ } -+ if (mediumTypes & Solid::OpticalDrive::Bd) -+ second = QCoreApplication::translate("", "/BD-ROM", "Second item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::Bdr) -+ second = QCoreApplication::translate("", "/BD-R", "Second item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::Bdre) -+ second = QCoreApplication::translate("", "/BD-RE", "Second item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::HdDvd) -+ second = QCoreApplication::translate("", "/HD DVD-ROM", "Second item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::HdDvdr) -+ second = QCoreApplication::translate("", "/HD DVD-R", "Second item of %1%2 Drive sentence"); -+ if (mediumTypes & Solid::OpticalDrive::HdDvdrw) -+ second = QCoreApplication::translate("", "/HD DVD-RW", "Second item of %1%2 Drive sentence"); -+ -+ if (drive_is_hotpluggable) -+ description = QCoreApplication::translate("", "External %1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second); -+ else -+ description = QCoreApplication::translate("", "%1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second); -+ -+ return description; -+ } -+ -+ if (drive_type == Solid::StorageDrive::Floppy) -+ { -+ if (drive_is_hotpluggable) -+ description = QCoreApplication::translate("", "External Floppy Drive"); -+ else -+ description = QCoreApplication::translate("", "Floppy Drive"); -+ -+ return description; -+ } -+ -+ const bool drive_is_removable = storageDrive.isRemovable(); -+ -+ if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable) -+ { -+ QString size_str = formatByteSize(storageDrive.size()); -+ if (!size_str.isEmpty()) -+ { -+ if (drive_is_hotpluggable) -+ description = QCoreApplication::translate("", "%1 External Hard Drive", "%1 is the size").arg(size_str); -+ else -+ description = QCoreApplication::translate("", "%1 Hard Drive", "%1 is the size").arg(size_str); -+ } else { -+ if (drive_is_hotpluggable) -+ description = QCoreApplication::translate("", "External Hard Drive"); -+ else -+ description = QCoreApplication::translate("", "Hard Drive"); -+ } -+ -+ return description; -+ } -+ -+ QString vendormodel_str; -+ QString model = product(); -+ QString vendor_str = vendor(); -+ -+ if (vendor_str.isEmpty()) -+ { -+ if (!model.isEmpty()) -+ vendormodel_str = model; -+ } -+ else -+ { -+ if (model.isEmpty()) -+ vendormodel_str = vendor_str; -+ else -+ { -+ if (model.startsWith(vendor_str)) -+ { -+ // e.g. vendor is "Nokia" and model is "Nokia N950" we do not want "Nokia Nokia N950" as description -+ vendormodel_str = model; -+ } -+ else -+ { -+ vendormodel_str = QCoreApplication::translate("", "%1 %2", "%1 is the vendor, %2 is the model of the device").arg(vendor_str).arg(model); -+ } -+ } -+ } -+ -+ if (vendormodel_str.isEmpty()) -+ description = QCoreApplication::translate("", "Drive"); -+ else -+ description = vendormodel_str; -+ -+ return description; -+} -+ -+QString Device::volumeDescription() const -+{ -+ QString description; -+ const UDisks2::StorageVolume storageVolume(const_cast(this)); -+ QString volume_label = prop("IdLabel").toString(); -+ if (volume_label.isEmpty()) -+ volume_label = prop("Name").toString(); -+ if (!volume_label.isEmpty()) -+ return volume_label; -+ -+ UDisks2::Device storageDevice(drivePath()); -+ const UDisks2::StorageDrive storageDrive(&storageDevice); -+ Solid::StorageDrive::DriveType drive_type = storageDrive.driveType(); -+ -+ // Handle media in optical drives -+ if (drive_type == Solid::StorageDrive::CdromDrive) -+ { -+ const UDisks2::OpticalDisc disc(const_cast(this)); -+ switch (disc.discType()) -+ { -+ case Solid::OpticalDisc::UnknownDiscType: -+ case Solid::OpticalDisc::CdRom: -+ description = QCoreApplication::translate("", "CD-ROM"); -+ break; -+ -+ case Solid::OpticalDisc::CdRecordable: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank CD-R"); -+ else -+ description = QCoreApplication::translate("", "CD-R"); -+ break; -+ -+ case Solid::OpticalDisc::CdRewritable: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank CD-RW"); -+ else -+ description = QCoreApplication::translate("", "CD-RW"); -+ break; -+ -+ case Solid::OpticalDisc::DvdRom: -+ description = QCoreApplication::translate("", "DVD-ROM"); -+ break; -+ -+ case Solid::OpticalDisc::DvdRam: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank DVD-RAM"); -+ else -+ description = QCoreApplication::translate("", "DVD-RAM"); -+ break; -+ -+ case Solid::OpticalDisc::DvdRecordable: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank DVD-R"); -+ else -+ description = QCoreApplication::translate("", "DVD-R"); -+ break; -+ -+ case Solid::OpticalDisc::DvdPlusRecordableDuallayer: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank DVD+R Dual-Layer"); -+ else -+ description = QCoreApplication::translate("", "DVD+R Dual-Layer"); -+ break; -+ -+ case Solid::OpticalDisc::DvdRewritable: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank DVD-RW"); -+ else -+ description = QCoreApplication::translate("", "DVD-RW"); -+ break; -+ -+ case Solid::OpticalDisc::DvdPlusRecordable: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank DVD+R"); -+ else -+ description = QCoreApplication::translate("", "DVD+R"); -+ break; -+ -+ case Solid::OpticalDisc::DvdPlusRewritable: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank DVD+RW"); -+ else -+ description = QCoreApplication::translate("", "DVD+RW"); -+ break; -+ -+ case Solid::OpticalDisc::DvdPlusRewritableDuallayer: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank DVD+RW Dual-Layer"); -+ else -+ description = QCoreApplication::translate("", "DVD+RW Dual-Layer"); -+ break; -+ -+ case Solid::OpticalDisc::BluRayRom: -+ description = QCoreApplication::translate("", "BD-ROM"); -+ break; -+ -+ case Solid::OpticalDisc::BluRayRecordable: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank BD-R"); -+ else -+ description = QCoreApplication::translate("", "BD-R"); -+ break; -+ -+ case Solid::OpticalDisc::BluRayRewritable: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank BD-RE"); -+ else -+ description = QCoreApplication::translate("", "BD-RE"); -+ break; -+ -+ case Solid::OpticalDisc::HdDvdRom: -+ description = QCoreApplication::translate("", "HD DVD-ROM"); -+ break; -+ -+ case Solid::OpticalDisc::HdDvdRecordable: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank HD DVD-R"); -+ else -+ description = QCoreApplication::translate("", "HD DVD-R"); -+ break; -+ -+ case Solid::OpticalDisc::HdDvdRewritable: -+ if (disc.isBlank()) -+ description = QCoreApplication::translate("", "Blank HD DVD-RW"); -+ else -+ description = QCoreApplication::translate("", "HD DVD-RW"); -+ break; -+ } -+ -+ // Special case for pure audio disc -+ if (disc.availableContent() == Solid::OpticalDisc::Audio) -+ description = QCoreApplication::translate("", "Audio CD"); -+ -+ return description; -+ } -+ -+ const bool drive_is_removable = storageDrive.isRemovable(); -+ const bool drive_is_hotpluggable = storageDrive.isHotpluggable(); -+ -+ QString size_str = formatByteSize(storageVolume.size()); -+ if (isEncryptedContainer()) -+ { -+ if (!size_str.isEmpty()) -+ description = QCoreApplication::translate("", "%1 Encrypted Drive", "%1 is the size").arg(size_str); -+ else -+ description = QCoreApplication::translate("", "Encrypted Drive"); -+ } -+ else if (drive_type == Solid::StorageDrive::HardDisk && !drive_is_removable) -+ { -+ if (!size_str.isEmpty()) -+ { -+ if (drive_is_hotpluggable) -+ description = QCoreApplication::translate("", "%1 External Hard Drive", "%1 is the size").arg(size_str); -+ else -+ description = QCoreApplication::translate("", "%1 Hard Drive", "%1 is the size").arg(size_str); -+ } -+ else -+ { -+ if (drive_is_hotpluggable) -+ description = QCoreApplication::translate("", "External Hard Drive"); -+ else -+ description = QCoreApplication::translate("", "Hard Drive"); -+ } -+ } -+ else -+ { -+ if (drive_is_removable) -+ description = QCoreApplication::translate("", "%1 Removable Media", "%1 is the size").arg(size_str); -+ else -+ description = QCoreApplication::translate("", "%1 Media", "%1 is the size").arg(size_str); -+ } -+ -+ return description; -+} -+ -+QString Device::icon() const -+{ -+ QString iconName = property( "HintIconName" ).toString(); // non-cached -+ -+ if ( !iconName.isEmpty() ) -+ { -+ return iconName; -+ } -+ else if (isLoop() || isSwap()) -+ { -+ return "drive-harddisk"; -+ } -+ else if (isDrive()) { -+ const bool isRemovable = prop("Removable").toBool(); -+ const QString conn = prop("ConnectionBus").toString(); -+ -+ if (isOpticalDrive()) -+ return "drive-optical"; -+ else if (isRemovable && !prop("Optical").toBool()) { -+ if (conn == "usb") -+ return "drive-removable-media-usb"; -+ else -+ return "drive-removable-media"; -+ } -+ } -+ else if (isBlock()) { -+ const QString drv = drivePath(); -+ if (drv.isEmpty() || drv == "/") -+ return "drive-harddisk"; // stuff like loop devices or swap which don't have the Drive prop set -+ -+ Device drive(drv); -+ -+ // handle media -+ const QString media = drive.prop("Media").toString(); -+ -+ if ( !media.isEmpty() ) -+ { -+ if ( drive.prop("Optical").toBool() ) // optical stuff -+ { -+ bool isWritable = drive.prop("OpticalBlank").toBool(); -+ -+ const UDisks2::OpticalDisc disc(const_cast(this)); -+ Solid::OpticalDisc::ContentTypes availContent = disc.availableContent(); -+ -+ if (availContent & Solid::OpticalDisc::VideoDvd) // Video DVD -+ return "media-optical-dvd-video"; -+ else if ((availContent & Solid::OpticalDisc::VideoCd) || (availContent & Solid::OpticalDisc::SuperVideoCd)) // Video CD -+ return "media-optical-video"; -+ else if ((availContent & Solid::OpticalDisc::Data) && (availContent & Solid::OpticalDisc::Audio)) // Mixed CD -+ return "media-optical-mixed-cd"; -+ else if (availContent & Solid::OpticalDisc::Audio) // Audio CD -+ return "media-optical-audio"; -+ else if (availContent & Solid::OpticalDisc::Data) // Data CD -+ return "media-optical-data"; -+ else if ( isWritable ) -+ return "media-optical-recordable"; -+ else -+ { -+ if ( media.startsWith( "optical_dvd" ) || media.startsWith( "optical_hddvd" ) ) // DVD -+ return "media-optical-dvd"; -+ else if ( media.startsWith( "optical_bd" ) ) // BluRay -+ return "media-optical-blu-ray"; -+ } -+ -+ // fallback for every other optical disc -+ return "media-optical"; -+ } -+ -+ if ( media == "flash_ms" ) // Flash & Co. -+ return "media-flash-memory-stick"; -+ else if ( media == "flash_sd" || media == "flash_sdhc" || media == "flash_sdxc" || media == "flash_mmc" ) -+ return "media-flash-sd-mmc"; -+ else if ( media == "flash_sm" ) -+ return "media-flash-smart-media"; -+ else if ( media == "thumb" ) -+ return "drive-removable-media-usb-pendrive"; -+ else if ( media.startsWith( "flash" ) ) -+ return "media-flash"; -+ else if ( media == "floppy" ) // the good ol' floppy -+ return "media-floppy"; -+ } -+ -+ if (drive.prop("ConnectionBus").toString() == "sdio") // hack for SD cards connected thru sdio bus -+ return "media-flash-sd-mmc"; -+ -+ return drive.icon(); -+ } -+ -+ return "drive-harddisk"; // general fallback -+} -+ -+QString Device::product() const -+{ -+ if (!isDrive()) { -+ Device drive(drivePath()); -+ return drive.prop("Model").toString(); -+ } -+ -+ return prop("Model").toString(); -+} -+ -+QString Device::vendor() const -+{ -+ if (!isDrive()) { -+ Device drive(drivePath()); -+ return drive.prop("Vendor").toString(); -+ } -+ -+ return prop("Vendor").toString(); -+} -+ -+QString Device::parentUdi() const -+{ -+ QString parent; -+ -+ if (propertyExists("Drive")) // block -+ parent = prop("Drive").value().path(); -+ else if (propertyExists("Table")) // partition -+ parent = prop("Table").value().path(); -+ else if (parent.isEmpty() || parent=="/") { -+ parent = UD2_UDI_DISKS_PREFIX; -+ } -+ return parent; -+} -+ -+QString Device::errorToString(const QString & error) const -+{ -+ if (error == UD2_ERROR_UNAUTHORIZED || error == UD2_ERROR_NOT_AUTHORIZED) -+ return QCoreApplication::translate("", "You are not authorized to perform this operation"); -+ else if (error == UD2_ERROR_BUSY) -+ return QCoreApplication::translate("", "The device is currently busy"); -+ else if (error == UD2_ERROR_FAILED) -+ return QCoreApplication::translate("", "The requested operation has failed"); -+ else if (error == UD2_ERROR_CANCELED) -+ return QCoreApplication::translate("", "The requested operation has been canceled"); -+ else if (error == UD2_ERROR_INVALID_OPTION) -+ return QCoreApplication::translate("", "An invalid or malformed option has been given"); -+ else if (error == UD2_ERROR_MISSING_DRIVER) -+ return QCoreApplication::translate("", "The kernel driver for this filesystem type is not available"); -+ else if (error == UD2_ERROR_ALREADY_MOUNTED) -+ return QCoreApplication::translate("", "The device is already mounted"); -+ else if (error == UD2_ERROR_NOT_MOUNTED) -+ return QCoreApplication::translate("", "The device is not mounted"); -+ else if (error == UD2_ERROR_MOUNTED_BY_OTHER_USER) -+ return QCoreApplication::translate("", "The device is mounted by another user"); -+ else if (error == UD2_ERROR_ALREADY_UNMOUNTING) -+ return QCoreApplication::translate("", "The device is already unmounting"); -+ else if (error == UD2_ERROR_TIMED_OUT) -+ return QCoreApplication::translate("", "The operation timed out"); -+ else if (error == UD2_ERROR_WOULD_WAKEUP) -+ return QCoreApplication::translate("", "The operation would wake up a disk that is in a deep-sleep state"); -+ else if (error == UD2_ERROR_ALREADY_CANCELLED) -+ return QCoreApplication::translate("", "The operation has already been canceled"); -+ else -+ return QCoreApplication::translate("", "An unspecified error has occurred"); -+} -+ -+Solid::ErrorType Device::errorToSolidError(const QString & error) const -+{ -+ if (error == UD2_ERROR_BUSY) -+ return Solid::DeviceBusy; -+ else if (error == UD2_ERROR_FAILED) -+ return Solid::OperationFailed; -+ else if (error == UD2_ERROR_CANCELED) -+ return Solid::UserCanceled; -+ else if (error == UD2_ERROR_INVALID_OPTION) -+ return Solid::InvalidOption; -+ else if (error == UD2_ERROR_MISSING_DRIVER) -+ return Solid::MissingDriver; -+ else -+ return Solid::UnauthorizedOperation; -+} -+ -+bool Device::isBlock() const -+{ -+ return hasInterface(UD2_DBUS_INTERFACE_BLOCK); -+} -+ -+bool Device::isPartition() const -+{ -+ return hasInterface(UD2_DBUS_INTERFACE_PARTITION); -+} -+ -+bool Device::isPartitionTable() const -+{ -+ return hasInterface(UD2_DBUS_INTERFACE_PARTITIONTABLE); -+} -+ -+bool Device::isStorageVolume() const -+{ -+ return isPartition() || isPartitionTable() || isStorageAccess() || isOpticalDisc(); -+} -+ -+bool Device::isStorageAccess() const -+{ -+ return hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM) || isEncryptedContainer(); -+} -+ -+bool Device::isDrive() const -+{ -+ return hasInterface(UD2_DBUS_INTERFACE_DRIVE); -+} -+ -+bool Device::isOpticalDrive() const -+{ -+ return isDrive() && !prop("MediaCompatibility").toStringList().filter("optical_").isEmpty(); -+} -+ -+bool Device::isOpticalDisc() const -+{ -+ const QString drv = drivePath(); -+ if (drv.isEmpty() || drv == "/") -+ return false; -+ -+ Device drive(drv); -+ return drive.prop("Optical").toBool(); -+} -+ -+bool Device::mightBeOpticalDisc() const -+{ -+ const QString drv = drivePath(); -+ if (drv.isEmpty() || drv == "/") -+ return false; -+ -+ Device drive(drv); -+ return drive.isOpticalDrive(); -+} -+ -+bool Device::isMounted() const -+{ -+ return propertyExists("MountPoints") && !qdbus_cast(prop("MountPoints")).isEmpty(); -+} -+ -+bool Device::isEncryptedContainer() const -+{ -+ return hasInterface(UD2_DBUS_INTERFACE_ENCRYPTED); -+} -+ -+bool Device::isEncryptedCleartext() const -+{ -+ const QString holderDevice = prop("CryptoBackingDevice").toString(); -+ if (holderDevice.isEmpty() || holderDevice == "/") -+ return false; -+ else -+ return true; -+} -+ -+bool Device::isSwap() const -+{ -+ return hasInterface(UD2_DBUS_INTERFACE_SWAP); -+} -+ -+bool Device::isLoop() const -+{ -+ return hasInterface(UD2_DBUS_INTERFACE_LOOP); -+} -+ -+QString Device::drivePath() const -+{ -+ return prop("Drive").value().path(); -+} -diff --git a/solid/solid/backends/udisks2/udisksdevice.h b/solid/solid/backends/udisks2/udisksdevice.h -new file mode 100644 -index 0000000..6038178 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksdevice.h -@@ -0,0 +1,104 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010-2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef UDISKS2DEVICE_H -+#define UDISKS2DEVICE_H -+ -+#include "udisks2.h" -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+namespace Solid -+{ -+namespace Backends -+{ -+namespace UDisks2 -+{ -+ -+class DeviceBackend; -+ -+class Device: public Solid::Ifaces::Device -+{ -+ Q_OBJECT -+public: -+ Device(const QString &udi); -+ virtual ~Device(); -+ -+ virtual QObject* createDeviceInterface(const Solid::DeviceInterface::Type& type); -+ virtual bool queryDeviceInterface(const Solid::DeviceInterface::Type& type) const; -+ virtual QString description() const; -+ virtual QStringList emblems() const; -+ virtual QString icon() const; -+ virtual QString product() const; -+ virtual QString vendor() const; -+ virtual QString udi() const; -+ virtual QString parentUdi() const; -+ -+ QVariant prop(const QString &key) const; -+ bool propertyExists(const QString &key) const; -+ QVariantMap allProperties() const; -+ -+ bool hasInterface(const QString & name) const; -+ QStringList interfaces() const; -+ -+ QString errorToString(const QString & error) const; -+ Solid::ErrorType errorToSolidError(const QString & error) const; -+ -+ bool isBlock() const; -+ bool isPartition() const; -+ bool isPartitionTable() const; -+ bool isStorageVolume() const; -+ bool isStorageAccess() const; -+ bool isDrive() const; -+ bool isOpticalDrive() const; -+ bool isOpticalDisc() const; -+ bool mightBeOpticalDisc() const; -+ bool isMounted() const; -+ bool isEncryptedContainer() const; -+ bool isEncryptedCleartext() const; -+ bool isSwap() const; -+ bool isLoop() const; -+ -+ QString drivePath() const; -+ -+Q_SIGNALS: -+ void changed(); -+ void propertyChanged(const QMap &changes); -+ -+protected: -+ QPointer m_backend; -+ -+private: -+ QString storageDescription() const; -+ QString volumeDescription() const; -+}; -+ -+} -+} -+} -+ -+#endif // UDISKS2DEVICE_H -diff --git a/solid/solid/backends/udisks2/udisksdevicebackend.cpp b/solid/solid/backends/udisks2/udisksdevicebackend.cpp -new file mode 100644 -index 0000000..8131cb5 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksdevicebackend.cpp -@@ -0,0 +1,239 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010-2012 Lukáš Tinkl -+ Copyright 2012 Dan Vrátil -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include "udisksdevicebackend.h" -+ -+#include -+#include -+#include -+ -+#include "solid/deviceinterface.h" -+#include "solid/genericinterface.h" -+ -+using namespace Solid::Backends::UDisks2; -+ -+/* Static cache for DeviceBackends for all UDIs */ -+QMap DeviceBackend::s_backends; -+ -+DeviceBackend* DeviceBackend::backendForUDI(const QString& udi) -+{ -+ DeviceBackend *backend = 0; -+ if (udi.isEmpty()) { -+ return backend; -+ } -+ -+ if (s_backends.contains(udi)) { -+ backend = s_backends.value(udi); -+ } else { -+ backend = new DeviceBackend(udi); -+ s_backends.insert(udi, backend); -+ } -+ -+ return backend; -+} -+ -+void DeviceBackend::destroyBackend(const QString& udi) -+{ -+ if (s_backends.contains(udi)) { -+ DeviceBackend *backend = s_backends.value(udi); -+ s_backends.remove(udi); -+ delete backend; -+ } -+} -+ -+DeviceBackend::DeviceBackend(const QString& udi) -+ : m_udi(udi) -+{ -+ qDebug() << "Creating backend for device" << m_udi; -+ m_device = new QDBusInterface(UD2_DBUS_SERVICE, m_udi, -+ QString(), // no interface, we aggregate them -+ QDBusConnection::systemBus(), this); -+ -+ if (m_device->isValid()) { -+ QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this, -+ SLOT(slotPropertiesChanged(QString,QVariantMap,QStringList))); -+ QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesAdded", -+ this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap))); -+ QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesRemoved", -+ this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList))); -+ -+ initInterfaces(); -+ } -+} -+ -+DeviceBackend::~DeviceBackend() -+{ -+ qDebug() << "Destroying backend for device" << m_udi; -+} -+ -+void DeviceBackend::initInterfaces() -+{ -+ m_interfaces.clear(); -+ -+ const QString xmlData = introspect(); -+ if (xmlData.isEmpty()) { -+ qDebug() << m_udi << "has no interfaces!"; -+ return; -+ } -+ -+ QDomDocument dom; -+ dom.setContent(xmlData); -+ -+ QDomNodeList ifaceNodeList = dom.elementsByTagName("interface"); -+ for (int i = 0; i < ifaceNodeList.count(); i++) { -+ QDomElement ifaceElem = ifaceNodeList.item(i).toElement(); -+ /* Accept only org.freedesktop.UDisks2.* interfaces so that when the device is unplugged, -+ * m_interfaces goes empty and we can easily verify that the device is gone. */ -+ if (!ifaceElem.isNull() && ifaceElem.attribute("name").startsWith(UD2_DBUS_SERVICE)) { -+ m_interfaces.append(ifaceElem.attribute("name")); -+ } -+ } -+ -+ qDebug() << m_udi << "has interfaces:" << m_interfaces; -+} -+ -+QStringList DeviceBackend::interfaces() const -+{ -+ return m_interfaces; -+} -+ -+const QString& DeviceBackend::udi() const -+{ -+ return m_udi; -+} -+ -+QVariant DeviceBackend::prop(const QString& key) const -+{ -+ checkCache(key); -+ return m_propertyCache.value(key); -+} -+ -+bool DeviceBackend::propertyExists(const QString& key) const -+{ -+ checkCache(key); -+ /* checkCache() will put an invalid QVariant in cache when the property -+ * does not exist, so check for validity, not for an actual presence. */ -+ return m_propertyCache.value(key).isValid(); -+} -+ -+QVariantMap DeviceBackend::allProperties() const -+{ -+ QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "GetAll"); -+ -+ Q_FOREACH (const QString & iface, m_interfaces) { -+ call.setArguments(QVariantList() << iface); -+ QDBusPendingReply reply = QDBusConnection::systemBus().call(call); -+ -+ if (reply.isValid()) { -+ m_propertyCache.unite(reply.value()); -+ } else { -+ qWarning() << "Error getting props:" << reply.error().name() << reply.error().message(); -+ } -+ //qDebug() << "After iface" << iface << ", cache now contains" << m_cache.size() << "items"; -+ } -+ -+ return m_propertyCache; -+} -+ -+QString DeviceBackend::introspect() const -+{ -+ QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_udi, -+ DBUS_INTERFACE_INTROSPECT, "Introspect"); -+ QDBusPendingReply reply = QDBusConnection::systemBus().call(call); -+ -+ if (reply.isValid()) -+ return reply.value(); -+ else { -+ return QString(); -+ } -+} -+ -+void DeviceBackend::checkCache(const QString& key) const -+{ -+ if (m_propertyCache.isEmpty()) { // recreate the cache -+ allProperties(); -+ } -+ -+ if (m_propertyCache.contains(key)) { -+ return; -+ } -+ -+ QVariant reply = m_device->property(key.toUtf8()); -+ m_propertyCache.insert(key, reply); -+ -+ if (!reply.isValid()) { -+ /* Store the item in the cache anyway so next time we don't have to -+ * do the DBus call to find out it does not exist but just check whether -+ * prop(key).isValid() */ -+ qDebug() << m_udi << ": property" << key << "does not exist"; -+ } -+} -+ -+void DeviceBackend::slotPropertiesChanged(const QString& ifaceName, const QVariantMap& changedProps, const QStringList& invalidatedProps) -+{ -+ qDebug() << m_udi << "'s interface" << ifaceName << "changed props:"; -+ -+ QMap changeMap; -+ -+ Q_FOREACH(const QString & key, invalidatedProps) { -+ m_propertyCache.remove(key); -+ changeMap.insert(key, Solid::GenericInterface::PropertyRemoved); -+ qDebug() << "\t invalidated:" << key; -+ } -+ -+ QMapIterator i(changedProps); -+ while (i.hasNext()) { -+ i.next(); -+ const QString key = i.key(); -+ m_propertyCache.insert(key, i.value()); // replace the value -+ changeMap.insert(key, Solid::GenericInterface::PropertyModified); -+ qDebug() << "\t modified:" << key << ":" << m_propertyCache.value(key); -+ } -+ -+ Q_EMIT propertyChanged(changeMap); -+ Q_EMIT changed(); -+} -+ -+void DeviceBackend::slotInterfacesAdded(const QDBusObjectPath& object_path, const QVariantMapMap& interfaces_and_properties) -+{ -+ if (object_path.path() != m_udi) { -+ return; -+ } -+ -+ Q_FOREACH(const QString & iface, interfaces_and_properties.keys()) { -+ /* Don't store generic DBus interfaces */ -+ if (iface.startsWith(UD2_DBUS_SERVICE)) { -+ m_interfaces.append(interfaces_and_properties.keys()); -+ } -+ } -+} -+ -+void DeviceBackend::slotInterfacesRemoved(const QDBusObjectPath& object_path, const QStringList& interfaces) -+{ -+ if (object_path.path() != m_udi) { -+ return; -+ } -+ -+ Q_FOREACH(const QString & iface, interfaces) { -+ m_interfaces.removeAll(iface); -+ } -+} -diff --git a/solid/solid/backends/udisks2/udisksdevicebackend.h b/solid/solid/backends/udisks2/udisksdevicebackend.h -new file mode 100644 -index 0000000..829fa41 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksdevicebackend.h -@@ -0,0 +1,84 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010-2012 Lukáš Tinkl -+ Copyright 2012 Dan Vrátil -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef UDISKSDEVICEBACKEND_H -+#define UDISKSDEVICEBACKEND_H -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include "udisks2.h" -+ -+namespace Solid { -+namespace Backends { -+namespace UDisks2 { -+ -+class DeviceBackend: public QObject { -+ -+ Q_OBJECT -+ -+ public: -+ static DeviceBackend* backendForUDI(const QString &udi); -+ static void destroyBackend(const QString &udi); -+ -+ DeviceBackend(const QString &udi); -+ ~DeviceBackend(); -+ -+ QVariant prop(const QString &key) const; -+ bool propertyExists(const QString &key) const; -+ QVariantMap allProperties() const; -+ -+ QStringList interfaces() const; -+ const QString & udi() const; -+ -+ Q_SIGNALS: -+ void propertyChanged(const QMap &changeMap); -+ void changed(); -+ -+ private Q_SLOTS: -+ void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties); -+ void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces); -+ void slotPropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps); -+ -+ private: -+ void initInterfaces(); -+ QString introspect() const; -+ void checkCache(const QString &key) const; -+ -+ QDBusInterface *m_device; -+ -+ mutable QVariantMap m_propertyCache; -+ QStringList m_interfaces; -+ QString m_udi; -+ -+ static QMap s_backends; -+ -+}; -+ -+} /* namespace UDisks2 */ -+} /* namespace Backends */ -+} /* namespace Solid */ -+ -+#endif /* UDISKSDEVICEBACKEND_H */ -\ No newline at end of file -diff --git a/solid/solid/backends/udisks2/udisksdeviceinterface.cpp b/solid/solid/backends/udisks2/udisksdeviceinterface.cpp -new file mode 100644 -index 0000000..9fa60e5 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksdeviceinterface.cpp -@@ -0,0 +1,33 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include "udisksdeviceinterface.h" -+ -+using namespace Solid::Backends::UDisks2; -+ -+DeviceInterface::DeviceInterface(Device *device) -+ : QObject(device), m_device(device) -+{ -+ -+} -+ -+DeviceInterface::~DeviceInterface() -+{ -+} -diff --git a/solid/solid/backends/udisks2/udisksdeviceinterface.h b/solid/solid/backends/udisks2/udisksdeviceinterface.h -new file mode 100644 -index 0000000..43a1b6f ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksdeviceinterface.h -@@ -0,0 +1,148 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef UDISKS2DEVICEINTERFACE_H -+#define UDISKS2DEVICEINTERFACE_H -+ -+#include -+#include "udisksdevice.h" -+ -+#include -+#include -+ -+namespace Solid -+{ -+namespace Backends -+{ -+namespace UDisks2 -+{ -+ -+class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInterface -+{ -+ Q_OBJECT -+ Q_INTERFACES(Solid::Ifaces::DeviceInterface) -+public: -+ DeviceInterface(Device *device); -+ virtual ~DeviceInterface(); -+ -+protected: -+ Device *m_device; -+ -+public: -+ inline static QStringList toStringList(Solid::DeviceInterface::Type type) -+ { -+ QStringList list; -+ -+ switch(type) -+ { -+ case Solid::DeviceInterface::GenericInterface: -+ list << "generic"; -+ break; -+ case Solid::DeviceInterface::Processor: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::Block: -+ list << "block"; -+ break; -+ case Solid::DeviceInterface::StorageAccess: -+ list << "volume"; -+ break; -+ case Solid::DeviceInterface::StorageDrive: -+ list << "storage"; -+ break; -+ case Solid::DeviceInterface::OpticalDrive: -+ list << "storage.cdrom"; -+ break; -+ case Solid::DeviceInterface::StorageVolume: -+ list << "volume"; -+ break; -+ case Solid::DeviceInterface::OpticalDisc: -+ list << "volume.disc"; -+ break; -+ case Solid::DeviceInterface::Camera: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::PortableMediaPlayer: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::NetworkInterface: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::AcAdapter: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::Battery: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::Button: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::AudioInterface: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::DvbInterface: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::Video: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::SerialInterface: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::InternetGateway: -+ break; -+ case Solid::DeviceInterface::SmartCardReader: -+ // Doesn't exist with UDisks -+ case Solid::DeviceInterface::NetworkShare: -+ // Doesn't exist with UDisks -+ break; -+ case Solid::DeviceInterface::Unknown: -+ break; -+ case Solid::DeviceInterface::Last: -+ break; -+ } -+ -+ return list; -+ } -+ -+ inline static Solid::DeviceInterface::Type fromString(const QString &capability) -+ { -+ if (capability == "generic") -+ return Solid::DeviceInterface::GenericInterface; -+ else if (capability == "block") -+ return Solid::DeviceInterface::Block; -+ else if (capability == "storage") -+ return Solid::DeviceInterface::StorageDrive; -+ else if (capability == "storage.cdrom") -+ return Solid::DeviceInterface::OpticalDrive; -+ else if (capability == "volume") -+ return Solid::DeviceInterface::StorageVolume; -+ else if (capability == "volume.disc") -+ return Solid::DeviceInterface::OpticalDisc; -+ else -+ return Solid::DeviceInterface::Unknown; -+ } -+}; -+ -+} -+} -+} -+ -+#endif // UDISKS2DEVICEINTERFACE_H -diff --git a/solid/solid/backends/udisks2/udisksgenericinterface.cpp b/solid/solid/backends/udisks2/udisksgenericinterface.cpp -new file mode 100644 -index 0000000..2d8cea2 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksgenericinterface.cpp -@@ -0,0 +1,53 @@ -+/* -+ Copyright 2009 Pino Toscano -+ Copyright 2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include "udisksgenericinterface.h" -+ -+#include "udisksdevice.h" -+ -+using namespace Solid::Backends::UDisks2; -+ -+GenericInterface::GenericInterface(Device *device) -+ : DeviceInterface(device) -+{ -+ connect(device, SIGNAL(propertyChanged(QMap)), -+ this, SIGNAL(propertyChanged(QMap))); -+} -+ -+GenericInterface::~GenericInterface() -+{ -+} -+ -+QVariant GenericInterface::property(const QString &key) const -+{ -+ return m_device->prop(key); -+} -+ -+QVariantMap GenericInterface::allProperties() const -+{ -+ return m_device->allProperties(); -+} -+ -+bool GenericInterface::propertyExists(const QString &key) const -+{ -+ return m_device->propertyExists(key); -+} -+ -diff --git a/solid/solid/backends/udisks2/udisksgenericinterface.h b/solid/solid/backends/udisks2/udisksgenericinterface.h -new file mode 100644 -index 0000000..d225f32 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksgenericinterface.h -@@ -0,0 +1,57 @@ -+/* -+ Copyright 2009 Pino Toscano -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H -+#define SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H -+ -+#include -+#include -+#include "udisksdeviceinterface.h" -+ -+namespace Solid -+{ -+namespace Backends -+{ -+namespace UDisks2 -+{ -+class Device; -+ -+class GenericInterface : public DeviceInterface, virtual public Solid::Ifaces::GenericInterface -+{ -+ Q_OBJECT -+ Q_INTERFACES(Solid::Ifaces::GenericInterface) -+ -+public: -+ GenericInterface(Device *device); -+ virtual ~GenericInterface(); -+ -+ virtual QVariant property(const QString &key) const; -+ virtual QVariantMap allProperties() const; -+ virtual bool propertyExists(const QString &key) const; -+ -+Q_SIGNALS: -+ void propertyChanged(const QMap &changes); -+ void conditionRaised(const QString &condition, const QString &reason); -+}; -+} -+} -+} -+ -+#endif // SOLID_BACKENDS_UDISKS2_GENERICINTERFACE_H -diff --git a/solid/solid/backends/udisks2/udisksmanager.cpp b/solid/solid/backends/udisks2/udisksmanager.cpp -new file mode 100644 -index 0000000..35b0d23 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksmanager.cpp -@@ -0,0 +1,248 @@ -+/* -+ Copyright 2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include "udisksmanager.h" -+#include "udisksdevicebackend.h" -+ -+#include -+#include -+#include -+#include -+ -+#include "../shared/rootdevice.h" -+ -+using namespace Solid::Backends::UDisks2; -+using namespace Solid::Backends::Shared; -+ -+Manager::Manager(QObject *parent) -+ : Solid::Ifaces::DeviceManager(parent), -+ m_manager(UD2_DBUS_SERVICE, -+ UD2_DBUS_PATH, -+ QDBusConnection::systemBus()) -+{ -+ m_supportedInterfaces -+ << Solid::DeviceInterface::GenericInterface -+ << Solid::DeviceInterface::Block -+ << Solid::DeviceInterface::StorageAccess -+ << Solid::DeviceInterface::StorageDrive -+ << Solid::DeviceInterface::OpticalDrive -+ << Solid::DeviceInterface::OpticalDisc -+ << Solid::DeviceInterface::StorageVolume; -+ -+ qDBusRegisterMetaType >(); -+ qDBusRegisterMetaType(); -+ qDBusRegisterMetaType(); -+ qDBusRegisterMetaType(); -+ qDBusRegisterMetaType(); -+ -+ bool serviceFound = m_manager.isValid(); -+ if (!serviceFound) { -+ // find out whether it will be activated automatically -+ QDBusMessage message = QDBusMessage::createMethodCall("org.freedesktop.DBus", -+ "/org/freedesktop/DBus", -+ "org.freedesktop.DBus", -+ "ListActivatableNames"); -+ -+ QDBusReply reply = QDBusConnection::systemBus().call(message); -+ if (reply.isValid() && reply.value().contains(UD2_DBUS_SERVICE)) { -+ QDBusConnection::systemBus().interface()->startService(UD2_DBUS_SERVICE); -+ serviceFound = true; -+ } -+ } -+ -+ if (serviceFound) { -+ connect(&m_manager, SIGNAL(InterfacesAdded(QDBusObjectPath, QVariantMapMap)), -+ this, SLOT(slotInterfacesAdded(QDBusObjectPath,QVariantMapMap))); -+ connect(&m_manager, SIGNAL(InterfacesRemoved(QDBusObjectPath,QStringList)), -+ this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList))); -+ } -+} -+ -+Manager::~Manager() -+{ -+ while (!m_deviceCache.isEmpty()) { -+ QString udi = m_deviceCache.takeFirst(); -+ DeviceBackend::destroyBackend(udi); -+ } -+} -+ -+QObject* Manager::createDevice(const QString& udi) -+{ -+ if (udi==udiPrefix()) { -+ RootDevice *root = new RootDevice(udi); -+ -+ root->setProduct(QCoreApplication::translate("", "Storage")); -+ root->setDescription(QCoreApplication::translate("", "Storage devices")); -+ root->setIcon("server-database"); // Obviously wasn't meant for that, but maps nicely in oxygen icon set :-p -+ -+ return root; -+ } else if (deviceCache().contains(udi)) { -+ return new Device(udi); -+ } else { -+ return 0; -+ } -+} -+ -+QStringList Manager::devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type) -+{ -+ QStringList result; -+ -+ if (!parentUdi.isEmpty()) -+ { -+ Q_FOREACH (const QString &udi, deviceCache()) -+ { -+ Device device(udi); -+ if (device.queryDeviceInterface(type) && device.parentUdi() == parentUdi) -+ result << udi; -+ } -+ -+ return result; -+ } -+ else if (type != Solid::DeviceInterface::Unknown) -+ { -+ Q_FOREACH (const QString &udi, deviceCache()) -+ { -+ Device device(udi); -+ if (device.queryDeviceInterface(type)) -+ result << udi; -+ } -+ -+ return result; -+ } -+ -+ return deviceCache(); -+} -+ -+QStringList Manager::allDevices() -+{ -+ /* Clear the cache, destroy all backends */ -+ while (!m_deviceCache.isEmpty()) { -+ QString udi= m_deviceCache.takeFirst(); -+ DeviceBackend::destroyBackend(udi); -+ } -+ -+ introspect("/org/freedesktop/UDisks2/block_devices", true /*checkOptical*/); -+ introspect("/org/freedesktop/UDisks2/drives"); -+ -+ return m_deviceCache; -+} -+ -+void Manager::introspect(const QString & path, bool checkOptical) -+{ -+ QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, -+ DBUS_INTERFACE_INTROSPECT, "Introspect"); -+ QDBusPendingReply reply = QDBusConnection::systemBus().call(call); -+ -+ if (reply.isValid()) { -+ QDomDocument dom; -+ dom.setContent(reply.value()); -+ QDomNodeList nodeList = dom.documentElement().elementsByTagName("node"); -+ for (int i = 0; i < nodeList.count(); i++) { -+ QDomElement nodeElem = nodeList.item(i).toElement(); -+ if (!nodeElem.isNull() && nodeElem.hasAttribute("name")) { -+ const QString udi = path + "/" + nodeElem.attribute("name"); -+ -+ if (checkOptical) { -+ Device device(udi); -+ if (device.mightBeOpticalDisc()) { -+ QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this, -+ SLOT(slotMediaChanged(QDBusMessage))); -+ if (!device.isOpticalDisc()) // skip empty CD disc -+ continue; -+ } -+ } -+ -+ m_deviceCache.append(udi); -+ } -+ } -+ } -+ else -+ qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message(); -+} -+ -+QSet< Solid::DeviceInterface::Type > Manager::supportedInterfaces() const -+{ -+ return m_supportedInterfaces; -+} -+ -+QString Manager::udiPrefix() const -+{ -+ return UD2_UDI_DISKS_PREFIX; -+} -+ -+void Manager::slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties) -+{ -+ const QString udi = object_path.path(); -+ -+ qDebug() << udi << "has new interfaces:" << interfaces_and_properties.keys(); -+ -+ // new device, we don't know it yet -+ if (!m_deviceCache.contains(udi)) { -+ m_deviceCache.append(udi); -+ Q_EMIT deviceAdded(udi); -+ } -+} -+ -+void Manager::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces) -+{ -+ const QString udi = object_path.path(); -+ -+ qDebug() << udi << "lost interfaces:" << interfaces; -+ -+ Device device(udi); -+ -+ if (!udi.isEmpty() && (interfaces.isEmpty() || device.interfaces().isEmpty() || device.interfaces().contains(UD2_DBUS_INTERFACE_FILESYSTEM))) { -+ Q_EMIT deviceRemoved(udi); -+ m_deviceCache.removeAll(udi); -+ DeviceBackend::destroyBackend(udi); -+ } -+} -+ -+void Manager::slotMediaChanged(const QDBusMessage & msg) -+{ -+ const QVariantMap properties = qdbus_cast(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; -+ -+ if (!m_deviceCache.contains(udi) && size > 0) { // we don't know the optdisc, got inserted -+ m_deviceCache.append(udi); -+ Q_EMIT deviceAdded(udi); -+ } -+ -+ if (m_deviceCache.contains(udi) && size == 0) { // we know the optdisc, got removed -+ Q_EMIT deviceRemoved(udi); -+ m_deviceCache.removeAll(udi); -+ DeviceBackend::destroyBackend(udi); -+ } -+} -+ -+const QStringList & Manager::deviceCache() -+{ -+ if (m_deviceCache.isEmpty()) -+ allDevices(); -+ -+ return m_deviceCache; -+} -+ -diff --git a/solid/solid/backends/udisks2/udisksmanager.h b/solid/solid/backends/udisks2/udisksmanager.h -new file mode 100644 -index 0000000..fb929ce ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksmanager.h -@@ -0,0 +1,70 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010-2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef UDISKS2MANAGER_H -+#define UDISKS2MANAGER_H -+ -+#include "udisks2.h" -+#include "udisksdevice.h" -+#include "dbus/manager.h" -+ -+#include "solid/ifaces/devicemanager.h" -+ -+#include -+#include -+ -+namespace Solid -+{ -+namespace Backends -+{ -+namespace UDisks2 -+{ -+ -+class Manager: public Solid::Ifaces::DeviceManager -+{ -+ Q_OBJECT -+ -+public: -+ Manager(QObject *parent); -+ virtual QObject* createDevice(const QString& udi); -+ virtual QStringList devicesFromQuery(const QString& parentUdi, Solid::DeviceInterface::Type type); -+ virtual QStringList allDevices(); -+ virtual QSet< Solid::DeviceInterface::Type > supportedInterfaces() const; -+ virtual QString udiPrefix() const; -+ virtual ~Manager(); -+ -+private Q_SLOTS: -+ void slotInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &interfaces_and_properties); -+ void slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces); -+ void slotMediaChanged(const QDBusMessage &msg); -+ -+private: -+ const QStringList &deviceCache(); -+ void introspect(const QString & path, bool checkOptical = false); -+ QSet m_supportedInterfaces; -+ org::freedesktop::DBus::ObjectManager m_manager; -+ QStringList m_deviceCache; -+}; -+ -+} -+} -+} -+#endif // UDISKS2MANAGER_H -diff --git a/solid/solid/backends/udisks2/udisksopticaldisc.cpp b/solid/solid/backends/udisks2/udisksopticaldisc.cpp -new file mode 100644 -index 0000000..dc5256d ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksopticaldisc.cpp -@@ -0,0 +1,297 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010 - 2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "../shared/udevqt.h" -+ -+#include "udisks2.h" -+#include "udisksopticaldisc.h" -+#include "soliddefs_p.h" -+ -+typedef QMap ContentTypesCache; -+SOLID_GLOBAL_STATIC(ContentTypesCache, cache) -+SOLID_GLOBAL_STATIC(QMutex, cacheLock) -+ -+// inspired by http://cgit.freedesktop.org/hal/tree/hald/linux/probing/probe-volume.c -+static Solid::OpticalDisc::ContentType advancedDiscDetect(const QByteArray & device_file) -+{ -+ /* the discs block size */ -+ unsigned short bs; -+ /* the path table size */ -+ unsigned short ts; -+ /* the path table location (in blocks) */ -+ unsigned int tl; -+ /* length of the directory name in current path table entry */ -+ unsigned char len_di = 0; -+ /* the number of the parent directory's path table entry */ -+ unsigned int parent = 0; -+ /* filename for the current path table entry */ -+ char dirname[256]; -+ /* our position into the path table */ -+ int pos = 0; -+ /* the path table record we're on */ -+ int curr_record = 1; -+ -+ Solid::OpticalDisc::ContentType result = Solid::OpticalDisc::NoContent; -+ -+ int fd = open(device_file.constData(), O_RDONLY); -+ -+ /* read the block size */ -+ lseek (fd, 0x8080, SEEK_CUR); -+ if (read (fd, &bs, 2) != 2) -+ { -+ qDebug("Advanced probing on %s failed while reading block size", qPrintable(device_file)); -+ goto out; -+ } -+ -+ /* read in size of path table */ -+ lseek (fd, 2, SEEK_CUR); -+ if (read (fd, &ts, 2) != 2) -+ { -+ qDebug("Advanced probing on %s failed while reading path table size", qPrintable(device_file)); -+ goto out; -+ } -+ -+ /* read in which block path table is in */ -+ lseek (fd, 6, SEEK_CUR); -+ if (read (fd, &tl, 4) != 4) -+ { -+ qDebug("Advanced probing on %s failed while reading path table block", qPrintable(device_file)); -+ goto out; -+ } -+ -+ /* seek to the path table */ -+ lseek (fd, bs * tl, SEEK_SET); -+ -+ /* loop through the path table entries */ -+ while (pos < ts) -+ { -+ /* get the length of the filename of the current entry */ -+ if (read (fd, &len_di, 1) != 1) -+ { -+ qDebug("Advanced probing on %s failed, cannot read more entries", qPrintable(device_file)); -+ break; -+ } -+ -+ /* get the record number of this entry's parent -+ i'm pretty sure that the 1st entry is always the top directory */ -+ lseek (fd, 5, SEEK_CUR); -+ if (read (fd, &parent, 2) != 2) -+ { -+ qDebug("Advanced probing on %s failed, couldn't read parent entry", qPrintable(device_file)); -+ break; -+ } -+ -+ /* read the name */ -+ if (read (fd, dirname, len_di) != len_di) -+ { -+ qDebug("Advanced probing on %s failed, couldn't read the entry name", qPrintable(device_file)); -+ break; -+ } -+ dirname[len_di] = 0; -+ -+ /* if we found a folder that has the root as a parent, and the directory name matches -+ one of the special directories then set the properties accordingly */ -+ if (parent == 1) -+ { -+ if (!strcasecmp (dirname, "VIDEO_TS")) -+ { -+ qDebug("Disc in %s is a Video DVD", qPrintable(device_file)); -+ result = Solid::OpticalDisc::VideoDvd; -+ break; -+ } -+ else if (!strcasecmp (dirname, "BDMV")) -+ { -+ qDebug("Disc in %s is a Blu-ray video disc", qPrintable(device_file)); -+ result = Solid::OpticalDisc::VideoBluRay; -+ break; -+ } -+ else if (!strcasecmp (dirname, "VCD")) -+ { -+ qDebug("Disc in %s is a Video CD", qPrintable(device_file)); -+ result = Solid::OpticalDisc::VideoCd; -+ break; -+ } -+ else if (!strcasecmp (dirname, "SVCD")) -+ { -+ qDebug("Disc in %s is a Super Video CD", qPrintable(device_file)); -+ result = Solid::OpticalDisc::SuperVideoCd; -+ break; -+ } -+ } -+ -+ /* all path table entries are padded to be even, -+ so if this is an odd-length table, seek a byte to fix it */ -+ if (len_di%2 == 1) -+ { -+ lseek (fd, 1, SEEK_CUR); -+ pos++; -+ } -+ -+ /* update our position */ -+ pos += 8 + len_di; -+ curr_record++; -+ } -+ -+ close(fd); -+ return result; -+ -+out: -+ /* go back to the start of the file */ -+ lseek (fd, 0, SEEK_SET); -+ close(fd); -+ return result; -+} -+ -+using namespace Solid::Backends::UDisks2; -+ -+OpticalDisc::OpticalDisc(Device *dev) -+ : StorageVolume(dev), m_needsReprobe(true), m_cachedContent(Solid::OpticalDisc::NoContent) -+{ -+ UdevQt::Client client(this); -+ 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().path()); -+ QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_drive->udi(), DBUS_INTERFACE_PROPS, "PropertiesChanged", this, -+ SLOT(slotDrivePropertiesChanged(QString,QVariantMap,QStringList))); -+} -+ -+OpticalDisc::~OpticalDisc() -+{ -+ delete m_drive; -+} -+ -+qulonglong OpticalDisc::capacity() const -+{ -+ return m_device->prop("Size").toULongLong(); -+} -+ -+bool OpticalDisc::isRewritable() const -+{ -+ // the hard way, udisks has no notion of a disc "rewritability" -+ const QString mediaType = media(); -+ return mediaType == "optical_cd_rw" || mediaType == "optical_dvd_rw" || mediaType == "optical_dvd_ram" || -+ mediaType == "optical_dvd_plus_rw" || mediaType == "optical_dvd_plus_rw_dl" || -+ mediaType == "optical_bd_re" || mediaType == "optical_hddvd_rw"; -+} -+ -+bool OpticalDisc::isBlank() const -+{ -+ return m_drive->prop("OpticalBlank").toBool(); -+} -+ -+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"); -+} -+ -+Solid::OpticalDisc::DiscType OpticalDisc::discType() const -+{ -+ QMap map; -+ map[Solid::OpticalDisc::CdRom] = "optical_cd"; -+ map[Solid::OpticalDisc::CdRecordable] = "optical_cd_r"; -+ map[Solid::OpticalDisc::CdRewritable] = "optical_cd_rw"; -+ map[Solid::OpticalDisc::DvdRom] = "optical_dvd"; -+ map[Solid::OpticalDisc::DvdRecordable] = "optical_dvd_r"; -+ map[Solid::OpticalDisc::DvdRewritable] ="optical_dvd_rw"; -+ map[Solid::OpticalDisc::DvdRam] ="optical_dvd_ram"; -+ map[Solid::OpticalDisc::DvdPlusRecordable] ="optical_dvd_plus_r"; -+ map[Solid::OpticalDisc::DvdPlusRewritable] ="optical_dvd_plus_rw"; -+ map[Solid::OpticalDisc::DvdPlusRecordableDuallayer] ="optical_dvd_plus_r_dl"; -+ map[Solid::OpticalDisc::DvdPlusRewritableDuallayer] ="optical_dvd_plus_rw_dl"; -+ map[Solid::OpticalDisc::BluRayRom] ="optical_bd"; -+ map[Solid::OpticalDisc::BluRayRecordable] ="optical_bd_r"; -+ map[Solid::OpticalDisc::BluRayRewritable] ="optical_bd_re"; -+ map[Solid::OpticalDisc::HdDvdRom] ="optical_hddvd"; -+ map[Solid::OpticalDisc::HdDvdRecordable] ="optical_hddvd_r"; -+ map[Solid::OpticalDisc::HdDvdRewritable] ="optical_hddvd_rw"; -+ // TODO add these to Solid -+ //map[Solid::OpticalDisc::MagnetoOptical] ="optical_mo"; -+ //map[Solid::OpticalDisc::MountRainer] ="optical_mrw"; -+ //map[Solid::OpticalDisc::MountRainerWritable] ="optical_mrw_w"; -+ -+ return map.key(media(), Solid::OpticalDisc::UnknownDiscType); // FIXME optimize, lookup by value, not key -+} -+ -+Solid::OpticalDisc::ContentTypes OpticalDisc::availableContent() const -+{ -+ if (isBlank()) { -+ m_needsReprobe = false; -+ return Solid::OpticalDisc::NoContent; -+ } -+ -+ if (m_needsReprobe) { -+ QMutexLocker lock(cacheLock); -+ -+ const QByteArray deviceFile = m_device->prop("Device").toByteArray(); -+ -+ if (cache->contains(deviceFile)) { -+ m_cachedContent = cache->value(deviceFile); -+ m_needsReprobe = false; -+ return m_cachedContent; -+ } -+ -+ m_cachedContent = Solid::OpticalDisc::NoContent; -+ const bool hasData = m_drive->prop("OpticalNumDataTracks").toUInt() > 0; -+ const bool hasAudio = m_drive->prop("OpticalNumAudioTracks").toUInt() > 0; -+ -+ if ( hasData ) { -+ m_cachedContent |= Solid::OpticalDisc::Data; -+ m_cachedContent |= advancedDiscDetect(deviceFile); -+ } -+ if ( hasAudio ) -+ m_cachedContent |= Solid::OpticalDisc::Audio; -+ -+ m_needsReprobe = false; -+ cache->insert(deviceFile, m_cachedContent); -+ } -+ -+ return m_cachedContent; -+} -+ -+void OpticalDisc::slotDrivePropertiesChanged(const QString &ifaceName, const QVariantMap &changedProps, const QStringList &invalidatedProps) -+{ -+ Q_UNUSED(ifaceName); -+ -+ if (changedProps.keys().contains("Media") || invalidatedProps.contains("Media")) { -+ QMutexLocker lock(cacheLock); -+ m_needsReprobe = true; -+ m_cachedContent = Solid::OpticalDisc::NoContent; -+ cache->remove(m_device->prop("Device").toByteArray()); -+ } -+} -+ -+QString OpticalDisc::media() const -+{ -+ return m_drive->prop("Media").toString(); -+} -diff --git a/solid/solid/backends/udisks2/udisksopticaldisc.h b/solid/solid/backends/udisks2/udisksopticaldisc.h -new file mode 100644 -index 0000000..0cdcc66 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksopticaldisc.h -@@ -0,0 +1,69 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010 - 2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef UDISKS2OPTICALDISC_H -+#define UDISKS2OPTICALDISC_H -+ -+#include -+ -+#include "../shared/udevqt.h" -+ -+#include "udisksstoragevolume.h" -+#include "udisksdevice.h" -+ -+namespace Solid -+{ -+namespace Backends -+{ -+namespace UDisks2 -+{ -+ -+class OpticalDisc: public StorageVolume, virtual public Solid::Ifaces::OpticalDisc -+{ -+ Q_OBJECT -+ Q_INTERFACES(Solid::Ifaces::OpticalDisc) -+ -+public: -+ OpticalDisc(Device *dev); -+ virtual ~OpticalDisc(); -+ -+ virtual qulonglong capacity() const; -+ virtual bool isRewritable() const; -+ virtual bool isBlank() const; -+ virtual bool isAppendable() const; -+ virtual Solid::OpticalDisc::DiscType discType() const; -+ virtual Solid::OpticalDisc::ContentTypes availableContent() const; -+ -+private Q_SLOTS: -+ void slotDrivePropertiesChanged(const QString & ifaceName, const QVariantMap & changedProps, const QStringList & invalidatedProps); -+ -+private: -+ QString media() const; -+ mutable bool m_needsReprobe; -+ mutable Solid::OpticalDisc::ContentTypes m_cachedContent; -+ Device * m_drive; -+ UdevQt::Device m_udevDevice; -+}; -+ -+} -+} -+} -+#endif // UDISKS2OPTICALDISC_H -diff --git a/solid/solid/backends/udisks2/udisksopticaldrive.cpp b/solid/solid/backends/udisks2/udisksopticaldrive.cpp -new file mode 100644 -index 0000000..4df18b1 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksopticaldrive.cpp -@@ -0,0 +1,226 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010-2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "udisksopticaldrive.h" -+#include "udisks2.h" -+#include "udisksdevice.h" -+#include "dbus/manager.h" -+ -+using namespace Solid::Backends::UDisks2; -+ -+OpticalDrive::OpticalDrive(Device *device) -+ : StorageDrive(device) -+ , m_ejectInProgress(false) -+ , m_readSpeed(0) -+ , m_writeSpeed(0) -+ , m_speedsInit(false) -+{ -+ m_device->registerAction("eject", this, -+ SLOT(slotEjectRequested()), -+ SLOT(slotEjectDone(int, const QString&))); -+ -+ connect(m_device, SIGNAL(changed()), this, SLOT(slotChanged())); -+} -+ -+OpticalDrive::~OpticalDrive() -+{ -+} -+ -+bool OpticalDrive::eject() -+{ -+ if (m_ejectInProgress) -+ return false; -+ m_ejectInProgress = true; -+ m_device->broadcastActionRequested("eject"); -+ -+ const QString path = m_device->udi(); -+ QDBusConnection c = QDBusConnection::connectToBus(QDBusConnection::SystemBus, "Solid::Udisks2::OpticalDrive::" + path); -+ -+ // if the device is mounted, unmount first -+ QString blockPath; -+ org::freedesktop::DBus::ObjectManager manager(UD2_DBUS_SERVICE, UD2_DBUS_PATH, c); -+ QDBusPendingReply reply = manager.GetManagedObjects(); -+ reply.waitForFinished(); -+ if (!reply.isError()) { // enum devices -+ Q_FOREACH(const QDBusObjectPath &objPath, reply.value().keys()) { -+ const QString udi = objPath.path(); -+ -+ //qDebug() << "Inspecting" << udi; -+ -+ if (udi == UD2_DBUS_PATH_MANAGER || udi == UD2_UDI_DISKS_PREFIX || udi.startsWith(UD2_DBUS_PATH_JOBS)) -+ continue; -+ -+ Device device(udi); -+ if (device.drivePath() == path && device.isMounted()) { -+ //qDebug() << "Got mounted block device:" << udi; -+ blockPath = udi; -+ break; -+ } -+ } -+ } -+ else // show error -+ { -+ qWarning() << "Failed enumerating UDisks2 objects:" << reply.error().name() << "\n" << reply.error().message(); -+ } -+ -+ if (!blockPath.isEmpty()) { -+ //qDebug() << "Calling unmount on" << blockPath; -+ QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, blockPath, UD2_DBUS_INTERFACE_FILESYSTEM, "Unmount"); -+ msg << QVariantMap(); // options, unused now -+ c.call(msg, QDBus::BlockWithGui); -+ } -+ -+ QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_DRIVE, "Eject"); -+ msg << QVariantMap(); -+ return c.callWithCallback(msg, this, SLOT(slotDBusReply(const QDBusMessage &)), SLOT(slotDBusError(const QDBusError &))); -+} -+ -+void OpticalDrive::slotDBusReply(const QDBusMessage &/*reply*/) -+{ -+ m_ejectInProgress = false; -+ m_device->broadcastActionDone("eject"); -+} -+ -+void OpticalDrive::slotDBusError(const QDBusError &error) -+{ -+ m_ejectInProgress = false; -+ m_device->broadcastActionDone("eject", m_device->errorToSolidError(error.name()), -+ m_device->errorToString(error.name()) + ": " +error.message()); -+} -+ -+void OpticalDrive::slotEjectRequested() -+{ -+ m_ejectInProgress = true; -+ Q_EMIT ejectRequested(m_device->udi()); -+} -+ -+void OpticalDrive::slotEjectDone(int error, const QString &errorString) -+{ -+ m_ejectInProgress = false; -+ Q_EMIT ejectDone(static_cast(error), errorString, m_device->udi()); -+} -+ -+void OpticalDrive::initReadWriteSpeeds() const -+{ -+#if 0 -+ int read_speed, write_speed; -+ char *write_speeds = 0; -+ QByteArray device_file = QFile::encodeName(m_device->property("Device").toString()); -+ -+ //qDebug("Doing open (\"%s\", O_RDONLY | O_NONBLOCK)", device_file.constData()); -+ int fd = open(device_file, O_RDONLY | O_NONBLOCK); -+ if (fd < 0) { -+ qWarning("Cannot open %s: %s", device_file.constData(), strerror (errno)); -+ return; -+ } -+ -+ if (get_read_write_speed(fd, &read_speed, &write_speed, &write_speeds) >= 0) { -+ m_readSpeed = read_speed; -+ m_writeSpeed = write_speed; -+ -+ QStringList list = QString::fromLatin1(write_speeds).split(',', QString::SkipEmptyParts); -+ Q_FOREACH (const QString & speed, list) -+ m_writeSpeeds.append(speed.toInt()); -+ -+ free(write_speeds); -+ -+ m_speedsInit = true; -+ } -+ -+ close(fd); -+#endif -+} -+ -+QList OpticalDrive::writeSpeeds() const -+{ -+ if (!m_speedsInit) -+ initReadWriteSpeeds(); -+ //qDebug() << "solid write speeds:" << m_writeSpeeds; -+ return m_writeSpeeds; -+} -+ -+int OpticalDrive::writeSpeed() const -+{ -+ if (!m_speedsInit) -+ initReadWriteSpeeds(); -+ return m_writeSpeed; -+} -+ -+int OpticalDrive::readSpeed() const -+{ -+ if (!m_speedsInit) -+ initReadWriteSpeeds(); -+ return m_readSpeed; -+} -+ -+Solid::OpticalDrive::MediumTypes OpticalDrive::supportedMedia() const -+{ -+ const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList(); -+ Solid::OpticalDrive::MediumTypes supported; -+ -+ QMap map; -+ map[Solid::OpticalDrive::Cdr] = "optical_cd_r"; -+ map[Solid::OpticalDrive::Cdrw] = "optical_cd_rw"; -+ map[Solid::OpticalDrive::Dvd] = "optical_dvd"; -+ map[Solid::OpticalDrive::Dvdr] = "optical_dvd_r"; -+ map[Solid::OpticalDrive::Dvdrw] ="optical_dvd_rw"; -+ map[Solid::OpticalDrive::Dvdram] ="optical_dvd_ram"; -+ map[Solid::OpticalDrive::Dvdplusr] ="optical_dvd_plus_r"; -+ map[Solid::OpticalDrive::Dvdplusrw] ="optical_dvd_plus_rw"; -+ map[Solid::OpticalDrive::Dvdplusdl] ="optical_dvd_plus_r_dl"; -+ map[Solid::OpticalDrive::Dvdplusdlrw] ="optical_dvd_plus_rw_dl"; -+ map[Solid::OpticalDrive::Bd] ="optical_bd"; -+ map[Solid::OpticalDrive::Bdr] ="optical_bd_r"; -+ map[Solid::OpticalDrive::Bdre] ="optical_bd_re"; -+ map[Solid::OpticalDrive::HdDvd] ="optical_hddvd"; -+ map[Solid::OpticalDrive::HdDvdr] ="optical_hddvd_r"; -+ map[Solid::OpticalDrive::HdDvdrw] ="optical_hddvd_rw"; -+ // TODO add these to Solid -+ //map[Solid::OpticalDrive::Mo] ="optical_mo"; -+ //map[Solid::OpticalDrive::Mr] ="optical_mrw"; -+ //map[Solid::OpticalDrive::Mrw] ="optical_mrw_w"; -+ -+ Q_FOREACH ( const Solid::OpticalDrive::MediumType & type, map.keys() ) -+ { -+ if ( mediaTypes.contains( map[type] ) ) -+ { -+ supported |= type; -+ } -+ } -+ -+ return supported; -+} -+ -+void OpticalDrive::slotChanged() -+{ -+ m_speedsInit = false; // reset the read/write speeds, changes eg. with an inserted media -+} -diff --git a/solid/solid/backends/udisks2/udisksopticaldrive.h b/solid/solid/backends/udisks2/udisksopticaldrive.h -new file mode 100644 -index 0000000..4c98ef5 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksopticaldrive.h -@@ -0,0 +1,81 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010-2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef UDISKS2OPTICALDRIVE_H -+#define UDISKS2OPTICALDRIVE_H -+ -+#include -+#include "udisksstoragedrive.h" -+ -+namespace Solid -+{ -+namespace Backends -+{ -+namespace UDisks2 -+{ -+ -+class OpticalDrive: public StorageDrive, virtual public Solid::Ifaces::OpticalDrive -+{ -+ Q_OBJECT -+ Q_INTERFACES(Solid::Ifaces::OpticalDrive) -+ -+public: -+ OpticalDrive(Device *device); -+ virtual ~OpticalDrive(); -+ -+Q_SIGNALS: -+ void ejectPressed(const QString &udi); -+ void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi); -+ void ejectRequested(const QString &udi); -+ -+public: -+ virtual bool eject(); -+ virtual QList writeSpeeds() const; -+ virtual int writeSpeed() const; -+ virtual int readSpeed() const; -+ virtual Solid::OpticalDrive::MediumTypes supportedMedia() const; -+ -+private Q_SLOTS: -+ void slotDBusReply(const QDBusMessage &reply); -+ void slotDBusError(const QDBusError &error); -+ -+ void slotEjectRequested(); -+ void slotEjectDone(int error, const QString &errorString); -+ -+ void slotChanged(); -+ -+private: -+ void initReadWriteSpeeds() const; -+ -+ bool m_ejectInProgress; -+ -+ // read/write speeds -+ mutable int m_readSpeed; -+ mutable int m_writeSpeed; -+ mutable QList m_writeSpeeds; -+ mutable bool m_speedsInit; -+}; -+ -+} -+} -+} -+ -+#endif // UDISKS2OPTICALDRIVE_H -diff --git a/solid/solid/backends/udisks2/udisksstorageaccess.cpp b/solid/solid/backends/udisks2/udisksstorageaccess.cpp -new file mode 100644 -index 0000000..6958459 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksstorageaccess.cpp -@@ -0,0 +1,390 @@ -+/* -+ Copyright 2009 Pino Toscano -+ Copyright 2009-2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include "udisksstorageaccess.h" -+#include "udisks2.h" -+ -+#include -+#include -+#include -+#include -+ -+using namespace Solid::Backends::UDisks2; -+ -+StorageAccess::StorageAccess(Device *device) -+ : DeviceInterface(device), m_setupInProgress(false), m_teardownInProgress(false), m_passphraseRequested(false) -+{ -+ connect(device, SIGNAL(changed()), this, SLOT(checkAccessibility())); -+ updateCache(); -+ -+ // Delay connecting to DBus signals to avoid the related time penalty -+ // in hot paths such as predicate matching -+ QTimer::singleShot(0, this, SLOT(connectDBusSignals())); -+} -+ -+StorageAccess::~StorageAccess() -+{ -+} -+ -+void StorageAccess::connectDBusSignals() -+{ -+ m_device->registerAction("setup", this, -+ SLOT(slotSetupRequested()), -+ SLOT(slotSetupDone(int, const QString&))); -+ -+ m_device->registerAction("teardown", this, -+ SLOT(slotTeardownRequested()), -+ SLOT(slotTeardownDone(int, const QString&))); -+} -+ -+bool StorageAccess::isLuksDevice() const -+{ -+ return m_device->isEncryptedContainer(); // encrypted device -+} -+ -+bool StorageAccess::isAccessible() const -+{ -+ if (isLuksDevice()) { // check if the cleartext slave is mounted -+ const QString path = clearTextPath(); -+ //qDebug() << Q_FUNC_INFO << "CLEARTEXT device path: " << path; -+ if (path.isEmpty() || path == "/") -+ return false; -+ Device holderDevice(path); -+ return holderDevice.isMounted(); -+ } -+ -+ return m_device->isMounted(); -+} -+ -+QString StorageAccess::filePath() const -+{ -+ QByteArrayList mntPoints; -+ -+ if (isLuksDevice()) { // encrypted (and unlocked) device -+ const QString path = clearTextPath(); -+ if (path.isEmpty() || path == "/") -+ return QString(); -+ Device holderDevice(path); -+ mntPoints = qdbus_cast(holderDevice.prop("MountPoints")); -+ if (!mntPoints.isEmpty()) -+ return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points -+ else -+ return QString(); -+ } -+ -+ mntPoints = qdbus_cast(m_device->prop("MountPoints")); -+ -+ if (!mntPoints.isEmpty()) -+ return QFile::decodeName(mntPoints.first()); // FIXME Solid doesn't support multiple mount points -+ else -+ return QString(); -+} -+ -+bool StorageAccess::isIgnored() const -+{ -+ return m_device->prop("HintIgnore").toBool(); -+} -+ -+bool StorageAccess::setup() -+{ -+ if ( m_teardownInProgress || m_setupInProgress ) -+ return false; -+ m_setupInProgress = true; -+ m_device->broadcastActionRequested("setup"); -+ -+ if (m_device->isEncryptedContainer() && clearTextPath().isEmpty()) -+ return requestPassphrase(); -+ else -+ return mount(); -+} -+ -+bool StorageAccess::teardown() -+{ -+ if ( m_teardownInProgress || m_setupInProgress ) -+ return false; -+ m_teardownInProgress = true; -+ m_device->broadcastActionRequested("teardown"); -+ -+ return unmount(); -+} -+ -+void StorageAccess::updateCache() -+{ -+ m_isAccessible = isAccessible(); -+} -+ -+void StorageAccess::checkAccessibility() -+{ -+ const bool old_isAccessible = m_isAccessible; -+ updateCache(); -+ -+ if (old_isAccessible != m_isAccessible) { -+ Q_EMIT accessibilityChanged(m_isAccessible, m_device->udi()); -+ } -+} -+ -+void StorageAccess::slotDBusReply( const QDBusMessage & /*reply*/ ) -+{ -+ const QString ctPath = clearTextPath(); -+ if (m_setupInProgress) -+ { -+ if (isLuksDevice() && !isAccessible()) { // unlocked device, now mount it -+ mount(); -+ } -+ else // Don't broadcast setupDone unless the setup is really done. (Fix kde#271156) -+ { -+ m_setupInProgress = false; -+ m_device->broadcastActionDone("setup"); -+ -+ checkAccessibility(); -+ } -+ } -+ else if (m_teardownInProgress) // FIXME -+ { -+ if (isLuksDevice() && !ctPath.isEmpty() && ctPath != "/") // unlocked device, lock it -+ { -+ callCryptoTeardown(); -+ } -+ else if (!ctPath.isEmpty() && ctPath != "/") { -+ callCryptoTeardown(true); // Lock crypted parent -+ } -+ else -+ { -+ // try to "eject" (aka safely remove) from the (parent) drive, e.g. SD card from a reader -+ QString drivePath = m_device->drivePath(); -+ if (!drivePath.isEmpty() || drivePath != "/") -+ { -+ Device drive(drivePath); -+ if (drive.prop("Ejectable").toBool() && -+ drive.prop("MediaAvailable").toBool() && -+ !m_device->isOpticalDisc()) // optical drives have their Eject method -+ { -+ QDBusConnection c = QDBusConnection::systemBus(); -+ QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, drivePath, UD2_DBUS_INTERFACE_DRIVE, "Eject"); -+ msg << QVariantMap(); // options, unused now -+ c.call(msg, QDBus::NoBlock); -+ } -+ } -+ -+ m_teardownInProgress = false; -+ m_device->broadcastActionDone("teardown"); -+ -+ checkAccessibility(); -+ } -+ } -+} -+ -+void StorageAccess::slotDBusError( const QDBusError & error ) -+{ -+ //qDebug() << Q_FUNC_INFO << "DBUS ERROR:" << error.name() << error.message(); -+ -+ if (m_setupInProgress) -+ { -+ m_setupInProgress = false; -+ m_device->broadcastActionDone("setup", m_device->errorToSolidError(error.name()), -+ m_device->errorToString(error.name()) + ": " +error.message()); -+ -+ checkAccessibility(); -+ } -+ else if (m_teardownInProgress) -+ { -+ m_teardownInProgress = false; -+ m_device->broadcastActionDone("teardown", m_device->errorToSolidError(error.name()), -+ m_device->errorToString(error.name()) + ": " + error.message()); -+ checkAccessibility(); -+ } -+} -+ -+void StorageAccess::slotSetupRequested() -+{ -+ m_setupInProgress = true; -+ //qDebug() << "SETUP REQUESTED:" << m_device->udi(); -+ Q_EMIT setupRequested(m_device->udi()); -+} -+ -+void StorageAccess::slotSetupDone(int error, const QString &errorString) -+{ -+ m_setupInProgress = false; -+ //qDebug() << "SETUP DONE:" << m_device->udi(); -+ Q_EMIT setupDone(static_cast(error), errorString, m_device->udi()); -+ -+ checkAccessibility(); -+} -+ -+void StorageAccess::slotTeardownRequested() -+{ -+ m_teardownInProgress = true; -+ Q_EMIT teardownRequested(m_device->udi()); -+} -+ -+void StorageAccess::slotTeardownDone(int error, const QString &errorString) -+{ -+ m_teardownInProgress = false; -+ Q_EMIT teardownDone(static_cast(error), errorString, m_device->udi()); -+ -+ checkAccessibility(); -+} -+ -+bool StorageAccess::mount() -+{ -+ QString path = m_device->udi(); -+ const QString ctPath = clearTextPath(); -+ -+ if (isLuksDevice() && !ctPath.isEmpty()) { // mount options for the cleartext volume -+ path = ctPath; -+ } -+ -+ QDBusConnection c = QDBusConnection::systemBus(); -+ QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Mount"); -+ QVariantMap options; -+ -+ if (m_device->prop("IdType").toString() == "vfat") -+ options.insert("options", "flush"); -+ -+ msg << options; -+ -+ return c.callWithCallback(msg, this, -+ SLOT(slotDBusReply(const QDBusMessage &)), -+ SLOT(slotDBusError(const QDBusError &))); -+} -+ -+bool StorageAccess::unmount() -+{ -+ QString path = m_device->udi(); -+ const QString ctPath = clearTextPath(); -+ -+ if (isLuksDevice() && !ctPath.isEmpty()) { // unmount options for the cleartext volume -+ path = ctPath; -+ } -+ -+ QDBusConnection c = QDBusConnection::systemBus(); -+ QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, path, UD2_DBUS_INTERFACE_FILESYSTEM, "Unmount"); -+ -+ msg << QVariantMap(); // options, unused now -+ -+ return c.callWithCallback(msg, this, -+ SLOT(slotDBusReply(const QDBusMessage &)), -+ SLOT(slotDBusError(const QDBusError &)), -+ s_unmountTimeout); -+} -+ -+QString StorageAccess::generateReturnObjectPath() -+{ -+ static int number = 1; -+ -+ return "/org/kde/solid/UDisks2StorageAccess_"+QString::number(number++); -+} -+ -+QString StorageAccess::clearTextPath() const -+{ -+ const QString prefix = "/org/freedesktop/UDisks2/block_devices"; -+ QDBusMessage call = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, prefix, -+ DBUS_INTERFACE_INTROSPECT, "Introspect"); -+ QDBusPendingReply reply = QDBusConnection::systemBus().asyncCall(call); -+ reply.waitForFinished(); -+ -+ if (reply.isValid()) { -+ QDomDocument dom; -+ dom.setContent(reply.value()); -+ QDomNodeList nodeList = dom.documentElement().elementsByTagName("node"); -+ for (int i = 0; i < nodeList.count(); i++) { -+ QDomElement nodeElem = nodeList.item(i).toElement(); -+ if (!nodeElem.isNull() && nodeElem.hasAttribute("name")) { -+ const QString udi = prefix + "/" + nodeElem.attribute("name"); -+ Device holderDevice(udi); -+ -+ if (m_device->udi() == holderDevice.prop("CryptoBackingDevice").value().path()) { -+ //qDebug() << Q_FUNC_INFO << "CLEARTEXT device path: " << udi; -+ return udi; -+ } -+ } -+ } -+ } -+ -+ return QString(); -+} -+ -+bool StorageAccess::requestPassphrase() -+{ -+ QString udi = m_device->udi(); -+ QString returnService = QDBusConnection::sessionBus().baseService(); -+ m_lastReturnObject = generateReturnObjectPath(); -+ -+ QDBusConnection::sessionBus().registerObject(m_lastReturnObject, this, QDBusConnection::ExportScriptableSlots); -+ -+ QWidget *activeWindow = QApplication::activeWindow(); -+ uint wId = 0; -+ if (activeWindow!=0) -+ wId = (uint)activeWindow->winId(); -+ -+ QString appId = QCoreApplication::applicationName(); -+ -+ QDBusInterface soliduiserver("org.kde.kded", "/modules/soliduiserver", "org.kde.SolidUiServer"); -+ QDBusReply reply = soliduiserver.call("showPassphraseDialog", udi, returnService, -+ m_lastReturnObject, wId, appId); -+ m_passphraseRequested = reply.isValid(); -+ if (!m_passphraseRequested) -+ qWarning() << "Failed to call the SolidUiServer, D-Bus said:" << reply.error(); -+ -+ return m_passphraseRequested; -+} -+ -+void StorageAccess::passphraseReply(const QString & passphrase) -+{ -+ if (m_passphraseRequested) -+ { -+ QDBusConnection::sessionBus().unregisterObject(m_lastReturnObject); -+ m_passphraseRequested = false; -+ if (!passphrase.isEmpty()) -+ callCryptoSetup(passphrase); -+ else -+ { -+ m_setupInProgress = false; -+ m_device->broadcastActionDone("setup"); -+ } -+ } -+} -+ -+void StorageAccess::callCryptoSetup(const QString & passphrase) -+{ -+ QDBusConnection c = QDBusConnection::systemBus(); -+ QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, m_device->udi(), UD2_DBUS_INTERFACE_ENCRYPTED, "Unlock"); -+ -+ msg << passphrase; -+ msg << QVariantMap(); // options, unused now -+ -+ c.callWithCallback(msg, this, -+ SLOT(slotDBusReply(const QDBusMessage &)), -+ SLOT(slotDBusError(const QDBusError &))); -+} -+ -+bool StorageAccess::callCryptoTeardown(bool actOnParent) -+{ -+ QDBusConnection c = QDBusConnection::systemBus(); -+ QDBusMessage msg = QDBusMessage::createMethodCall(UD2_DBUS_SERVICE, -+ actOnParent ? (m_device->prop("CryptoBackingDevice").value().path()) : m_device->udi(), -+ UD2_DBUS_INTERFACE_ENCRYPTED, "Lock"); -+ msg << QVariantMap(); // options, unused now -+ -+ return c.callWithCallback(msg, this, -+ SLOT(slotDBusReply(const QDBusMessage &)), -+ SLOT(slotDBusError(const QDBusError &))); -+} -diff --git a/solid/solid/backends/udisks2/udisksstorageaccess.h b/solid/solid/backends/udisks2/udisksstorageaccess.h -new file mode 100644 -index 0000000..ec91f89 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksstorageaccess.h -@@ -0,0 +1,104 @@ -+/* -+ Copyright 2009 Pino Toscano -+ Copyright 2009-2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef UDISKS2STORAGEACCESS_H -+#define UDISKS2STORAGEACCESS_H -+ -+#include -+#include "udisksdeviceinterface.h" -+ -+#include -+#include -+ -+namespace Solid -+{ -+namespace Backends -+{ -+namespace UDisks2 -+{ -+class StorageAccess : public DeviceInterface, virtual public Solid::Ifaces::StorageAccess -+{ -+ Q_OBJECT -+ Q_INTERFACES(Solid::Ifaces::StorageAccess) -+ -+public: -+ StorageAccess(Device *device); -+ virtual ~StorageAccess(); -+ -+ virtual bool isAccessible() const; -+ virtual QString filePath() const; -+ virtual bool isIgnored() const; -+ virtual bool setup(); -+ virtual bool teardown(); -+ -+Q_SIGNALS: -+ void accessibilityChanged(bool accessible, const QString &udi); -+ void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi); -+ void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi); -+ void setupRequested(const QString &udi); -+ void teardownRequested(const QString &udi); -+ -+public Q_SLOTS: -+ Q_SCRIPTABLE Q_NOREPLY void passphraseReply(const QString & passphrase); -+ -+private Q_SLOTS: -+ void slotDBusReply(const QDBusMessage & reply); -+ void slotDBusError(const QDBusError & error); -+ -+ void connectDBusSignals(); -+ -+ void slotSetupRequested(); -+ void slotSetupDone(int error, const QString &errorString); -+ void slotTeardownRequested(); -+ void slotTeardownDone(int error, const QString &errorString); -+ -+ void checkAccessibility(); -+ -+private: -+ /// @return true if this device is luks and unlocked -+ bool isLuksDevice() const; -+ -+ void updateCache(); -+ -+ bool mount(); -+ bool unmount(); -+ -+ bool requestPassphrase(); -+ void callCryptoSetup( const QString & passphrase ); -+ bool callCryptoTeardown( bool actOnParent=false ); -+ -+ QString generateReturnObjectPath(); -+ QString clearTextPath() const; -+ -+private: -+ bool m_isAccessible; -+ bool m_setupInProgress; -+ bool m_teardownInProgress; -+ bool m_passphraseRequested; -+ QString m_lastReturnObject; -+ -+ static const int s_unmountTimeout = 0x7fffffff; -+}; -+} -+} -+} -+ -+#endif // UDISKS2STORAGEACCESS_H -diff --git a/solid/solid/backends/udisks2/udisksstoragedrive.cpp b/solid/solid/backends/udisks2/udisksstoragedrive.cpp -new file mode 100644 -index 0000000..e382154 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksstoragedrive.cpp -@@ -0,0 +1,147 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010-2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include "udisksstoragedrive.h" -+ -+#include "../shared/udevqt.h" -+ -+#include -+#include -+ -+using namespace Solid::Backends::UDisks2; -+ -+StorageDrive::StorageDrive(Device *dev) -+ : Block(dev) -+{ -+ UdevQt::Client client(this); -+ m_udevDevice = client.deviceByDeviceFile(device()); -+ m_udevDevice.deviceProperties(); -+} -+ -+StorageDrive::~StorageDrive() -+{ -+} -+ -+qulonglong StorageDrive::size() const -+{ -+ return m_device->prop("Size").toULongLong(); -+} -+ -+bool StorageDrive::isHotpluggable() const -+{ -+ const Solid::StorageDrive::Bus _bus = bus(); -+ return _bus == Solid::StorageDrive::Usb || _bus == Solid::StorageDrive::Ieee1394; -+} -+ -+bool StorageDrive::isRemovable() const -+{ -+ return m_device->prop("MediaRemovable").toBool() || m_device->prop("Removable").toBool(); -+} -+ -+Solid::StorageDrive::DriveType StorageDrive::driveType() const -+{ -+ const QStringList mediaTypes = m_device->prop("MediaCompatibility").toStringList(); -+ -+ if ( m_device->isOpticalDrive() ) // optical disks -+ { -+ return Solid::StorageDrive::CdromDrive; -+ } -+ else if ( mediaTypes.contains( "floppy" ) ) -+ { -+ return Solid::StorageDrive::Floppy; -+ } -+#if 0 // TODO add to Solid -+ else if ( mediaTypes.contains( "floppy_jaz" ) ) -+ { -+ return Solid::StorageDrive::Jaz; -+ } -+ else if ( mediaTypes.contains( "floppy_zip" ) ) -+ { -+ return Solid::StorageDrive::Zip; -+ } -+ else if ( mediaTypes.contains( "flash" ) ) -+ { -+ return Solid::StorageDrive::Flash; -+ } -+#endif -+ else if ( mediaTypes.contains( "flash_cf" ) ) -+ { -+ return Solid::StorageDrive::CompactFlash; -+ } -+ else if ( mediaTypes.contains( "flash_ms" ) ) -+ { -+ return Solid::StorageDrive::MemoryStick; -+ } -+ else if ( mediaTypes.contains( "flash_sm" ) ) -+ { -+ return Solid::StorageDrive::SmartMedia; -+ } -+ else if ( mediaTypes.contains( "flash_sd" ) || mediaTypes.contains( "flash_sdhc" ) -+ || mediaTypes.contains( "flash_mmc" ) || mediaTypes.contains("flash_sdxc") ) -+ { -+ return Solid::StorageDrive::SdMmc; -+ } -+ // FIXME: udisks2 doesn't know about xD cards -+ else -+ { -+ return Solid::StorageDrive::HardDisk; -+ } -+} -+ -+Solid::StorageDrive::Bus StorageDrive::bus() const -+{ -+ 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 -+ return Solid::StorageDrive::Sata; -+ else // parallel (classical) ATA -+ return Solid::StorageDrive::Ide; -+ } -+ else if (bus == "usb") -+ { -+ return Solid::StorageDrive::Usb; -+ } -+ else if (bus == "ieee1394") -+ { -+ return Solid::StorageDrive::Ieee1394; -+ } -+ else if (udevBus == "scsi") -+ { -+ return Solid::StorageDrive::Scsi; -+ } -+#if 0 // TODO add these to Solid -+ else if ( bus == "sdio" ) -+ { -+ return Solid::StorageDrive::SDIO; -+ } -+ else if ( bus == "virtual" ) -+ { -+ return Solid::StorageDrive::Virtual; -+ } -+#endif -+ else -+ return Solid::StorageDrive::Platform; -+} -diff --git a/solid/solid/backends/udisks2/udisksstoragedrive.h b/solid/solid/backends/udisks2/udisksstoragedrive.h -new file mode 100644 -index 0000000..d8c1046 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksstoragedrive.h -@@ -0,0 +1,61 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010-2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef UDISKS2STORAGEDRIVE_H -+#define UDISKS2STORAGEDRIVE_H -+ -+#include -+ -+#include "../shared/udevqt.h" -+ -+#include "udisksblock.h" -+ -+namespace Solid -+{ -+namespace Backends -+{ -+namespace UDisks2 -+{ -+ -+class StorageDrive: public Block, virtual public Solid::Ifaces::StorageDrive -+{ -+ Q_OBJECT -+ Q_INTERFACES(Solid::Ifaces::StorageDrive) -+ -+public: -+ StorageDrive(Device *dev); -+ virtual ~StorageDrive(); -+ -+ virtual qulonglong size() const; -+ virtual bool isHotpluggable() const; -+ virtual bool isRemovable() const; -+ virtual Solid::StorageDrive::DriveType driveType() const; -+ virtual Solid::StorageDrive::Bus bus() const; -+ -+private: -+ UdevQt::Device m_udevDevice; -+}; -+ -+} -+} -+} -+ -+#endif // UDISK2SSTORAGEDRIVE_H -diff --git a/solid/solid/backends/udisks2/udisksstoragevolume.cpp b/solid/solid/backends/udisks2/udisksstoragevolume.cpp -new file mode 100644 -index 0000000..a7d8fad ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksstoragevolume.cpp -@@ -0,0 +1,105 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ Copyright 2010-2012 Lukáš Tinkl -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#include "udisksstoragevolume.h" -+#include "udisks2.h" -+ -+using namespace Solid::Backends::UDisks2; -+ -+StorageVolume::StorageVolume(Device *device) -+ : Block(device) -+{ -+} -+ -+StorageVolume::~StorageVolume() -+{ -+} -+ -+QString StorageVolume::encryptedContainerUdi() const -+{ -+ const QString path = m_device->prop("CryptoBackingDevice").value().path(); -+ if ( path.isEmpty() || path == "/") -+ return QString(); -+ else -+ return path; -+} -+ -+qulonglong StorageVolume::size() const -+{ -+ return m_device->prop("Size").toULongLong(); -+} -+ -+QString StorageVolume::uuid() const -+{ -+ return m_device->prop("IdUUID").toString(); -+} -+ -+QString StorageVolume::label() const -+{ -+ QString label = m_device->prop("HintName").toString(); -+ if (label.isEmpty()) -+ label = m_device->prop("IdLabel").toString(); -+ if (label.isEmpty()) -+ label = m_device->prop("Name").toString(); -+ return label; -+} -+ -+QString StorageVolume::fsType() const -+{ -+ return m_device->prop("IdType").toString(); -+} -+ -+Solid::StorageVolume::UsageType StorageVolume::usage() const -+{ -+ const QString usage = m_device->prop("IdUsage").toString(); -+ -+ if (m_device->hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM)) -+ { -+ return Solid::StorageVolume::FileSystem; -+ } -+ else if (m_device->isPartitionTable()) -+ { -+ return Solid::StorageVolume::PartitionTable; -+ } -+ else if (usage == "raid") -+ { -+ return Solid::StorageVolume::Raid; -+ } -+ else if (m_device->isEncryptedContainer()) -+ { -+ return Solid::StorageVolume::Encrypted; -+ } -+ else if (usage == "unused" || usage.isEmpty()) -+ { -+ return Solid::StorageVolume::Unused; -+ } -+ else -+ { -+ return Solid::StorageVolume::Other; -+ } -+} -+ -+bool StorageVolume::isIgnored() const -+{ -+ const Solid::StorageVolume::UsageType usg = usage(); -+ return m_device->prop("HintIgnore").toBool() || m_device->isSwap() || -+ ((usg == Solid::StorageVolume::Unused || usg == Solid::StorageVolume::Other || usg == Solid::StorageVolume::PartitionTable) && !m_device->isOpticalDisc()); -+} -diff --git a/solid/solid/backends/udisks2/udisksstoragevolume.h b/solid/solid/backends/udisks2/udisksstoragevolume.h -new file mode 100644 -index 0000000..2ca04d2 ---- /dev/null -+++ b/solid/solid/backends/udisks2/udisksstoragevolume.h -@@ -0,0 +1,57 @@ -+/* -+ Copyright 2010 Michael Zanetti -+ -+ This library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) version 3, or any -+ later version accepted by the membership of KDE e.V. (or its -+ successor approved by the membership of KDE e.V.), which shall -+ act as a proxy defined in Section 6 of version 3 of the license. -+ -+ This library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with this library. If not, see . -+*/ -+ -+#ifndef UDISKS2STORAGEVOLUME_H -+#define UDISKS2STORAGEVOLUME_H -+ -+#include -+#include "udisksblock.h" -+ -+ -+namespace Solid -+{ -+namespace Backends -+{ -+namespace UDisks2 -+{ -+ -+class StorageVolume: public Block, virtual public Solid::Ifaces::StorageVolume -+{ -+ Q_OBJECT -+ Q_INTERFACES(Solid::Ifaces::StorageVolume) -+ -+public: -+ StorageVolume(Device *device); -+ virtual ~StorageVolume(); -+ -+ virtual QString encryptedContainerUdi() const; -+ virtual qulonglong size() const; -+ virtual QString uuid() const; -+ virtual QString label() const; -+ virtual QString fsType() const; -+ virtual Solid::StorageVolume::UsageType usage() const; -+ virtual bool isIgnored() const; -+}; -+ -+} -+} -+} -+ -+#endif // UDISKS2STORAGEVOLUME_H -diff --git a/solid/solid/managerbase.cpp b/solid/solid/managerbase.cpp -index fb5a67c..4084323 100644 ---- a/solid/solid/managerbase.cpp -+++ b/solid/solid/managerbase.cpp -@@ -30,8 +30,11 @@ - #if defined (Q_OS_MAC) - #include "backends/iokit/iokitmanager.h" - #elif defined (Q_OS_UNIX) --#include "backends/hal/halmanager.h" -+#if defined (WITH_SOLID_UDISKS2) -+#include "backends/udisks2/udisksmanager.h" -+#else - #include "backends/udisks/udisksmanager.h" -+#endif - #include "backends/upower/upowermanager.h" - - #if defined (HUPNP_FOUND) -@@ -71,22 +74,17 @@ void Solid::ManagerBasePrivate::loadBackends() - # elif defined(Q_WS_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 -+# if defined(WITH_SOLID_UDISKS2) -+ m_backends << new Solid::Backends::UDisks2::Manager(0) -+# else - m_backends << new Solid::Backends::UDisks::UDisksManager(0) -+# endif - << new Solid::Backends::UPower::UPowerManager(0) - << new Solid::Backends::Fstab::FstabManager(0); -- } - # endif - - # if defined (HUPNP_FOUND) -diff --git a/solid/tests/CMakeLists.txt b/solid/tests/CMakeLists.txt -index ef507d1..b9f3720 100644 ---- a/solid/tests/CMakeLists.txt -+++ b/solid/tests/CMakeLists.txt -@@ -15,21 +15,6 @@ endif(WIN32) - target_link_libraries(fakehardwaretest solid_static ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} ) - add_definitions(-DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"") - -- --########### halbasictest ############### -- --if(NOT WIN32 AND NOT APPLE) --set(halbasictest_SRCS halbasictest.cpp ) -- --kde4_add_executable(halbasictest ${halbasictest_SRCS}) -- --if(WIN32) -- set_target_properties(halbasictest PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=) --endif(WIN32) -- --target_link_libraries(halbasictest solid_static ${KDEWIN_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} ) --endif(NOT WIN32 AND NOT APPLE) -- - ########### solidhwtest ############### - - set(solidhwtest_SRCS diff --git a/kdelibs-udisks2_2_stage.patch b/kdelibs-udisks2_2_stage.patch deleted file mode 100644 index d81f967..0000000 --- a/kdelibs-udisks2_2_stage.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up kdelibs-4.10.0/solid/solid/backends/udisks2/udisksmanager.cpp.udisks2_2_stage kdelibs-4.10.0/solid/solid/backends/udisks2/udisksmanager.cpp ---- kdelibs-4.10.0/solid/solid/backends/udisks2/udisksmanager.cpp.udisks2_2_stage 2013-01-23 15:44:27.000000000 -0600 -+++ kdelibs-4.10.0/solid/solid/backends/udisks2/udisksmanager.cpp 2013-02-01 09:43:49.032367743 -0600 -@@ -203,6 +203,10 @@ void Manager::slotInterfacesAdded(const - m_deviceCache.append(udi); - Q_EMIT deviceAdded(udi); - } -+ // re-emit in case of 2-stage devices like N9 or some Android phones -+ else if (m_deviceCache.contains(udi) && interfaces_and_properties.keys().contains(UD2_DBUS_INTERFACE_FILESYSTEM)) { -+ Q_EMIT deviceAdded(udi); -+ } - } - - void Manager::slotInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces) diff --git a/kdelibs.spec b/kdelibs.spec index 5da143a..0e3e8a3 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -8,11 +8,9 @@ %define apidocs 1 # to build/include QCH apidocs or not (currently broken) #define apidocs_qch 1 -%if 0%{?fedora} && 0%{?fedora} > 16 -%define libplasma_pk 1 -%endif %if 0%{?rhel} > 6 || 0%{?fedora} > 17 %define udisks udisks2 +%define udisks2 1 %else %define udisks udisks %endif @@ -24,8 +22,8 @@ %global dbusmenu_qt_version %(pkg-config --modversion dbusmenu-qt 2>/dev/null || echo %{dbusmenu_qt_ver}) Summary: KDE Libraries -Version: 4.9.5 -Release: 4%{?dist} +Version: 4.10.1 +Release: 1%{?dist} Name: kdelibs Epoch: 6 @@ -58,7 +56,6 @@ Requires: kde-settings %{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} } Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: hunspell -# https://git.reviewboard.kde.org/r/103028/ Requires: media-player-info # beware of possible bootstrapping problems # moved back to kde-runtime @@ -70,17 +67,17 @@ Requires: soprano%{?_isa} >= %{soprano_version} Requires: strigi-libs%{?_isa} >= %{strigi_version} # make kdelibs-devel parallel-installable with kdelibs3-devel -Patch0: kdelibs-4.5.80-parallel_devel.patch +Patch0: kdelibs-4.9.95-parallel_devel.patch -# fix kde#149705 -Patch2: kdelibs-4.2.85-kde149705.patch +# fix http://bugs.kde.org/149705 +Patch2: kdelibs-4.10.0-kde149705.patch # install all .css files and Doxyfile.global in kdelibs-common to build # kdepimlibs-apidocs against Patch8: kdelibs-4.3.90-install_all_css.patch # add Fedora/V-R to KHTML UA string -Patch9: kdelibs-4.6.80-branding.patch +Patch9: kdelibs-4.10.0-branding.patch # don't cache kdeglobals paths because they change after profile directories # are loaded from kde4rc @@ -88,22 +85,22 @@ Patch10: kdelibs-4.1.72-no-cache-kdeglobals-paths.patch # adds the Administration menu from redhat-menus which equals System + Settings # This prevents the stuff getting listed twice, under both System and Settings. -Patch12: kdelibs-4.1.0-xdg-menu.patch +Patch12: kdelibs-4.10.0-xdg-menu.patch # patch KStandardDirs to use %{_libexecdir}/kde4 instead of %{_libdir}/kde4/libexec -Patch14: kdelibs-4.8.0-libexecdir.patch +Patch14: kdelibs-4.9.97-libexecdir.patch # kstandarddirs changes: search /etc/kde, find %{_kde4_libexecdir} -Patch18: kdelibs-4.6.90-kstandarddirs.patch +Patch18: kdelibs-4.10.0-kstandarddirs.patch # set build type -Patch20: kdelibs-4.1.70-cmake.patch +Patch20: kdelibs-4.10.0-cmake.patch # die rpath die, since we're using standard paths, we can avoid # this extra hassle (even though cmake is *supposed* to not add standard # paths (like /usr/lib64) already! With this, we can drop # -DCMAKE_SKIP_RPATH:BOOL=ON (finally) -Patch27: kdelibs-4.5.80-no_rpath.patch +Patch27: kdelibs-4.10.0-no_rpath.patch ## libplasma PackageKit integration # Add an API (currently private) for installing missing Plasma engines. @@ -118,12 +115,6 @@ Patch41: 0002-Trigger-installation-of-missing-components-when-inst.patch # https://git.reviewboard.kde.org/r/102350/ Patch42: 0003-Implement-automatic-scanning-of-source-code-for-requ.patch -# make forcefully hal-free build -Patch45: kdelibs-4.7.3-halectomy.patch - -# udisks2 Solid backend -Patch47: kdelibs-udisks2-backend.patch - # limit solid qDebug spam # http://bugzilla.redhat.com/882731 # TODO: could make uptreamable and conditional only on Release-type builds @@ -134,12 +125,8 @@ Patch49: kdelibs-solid_qt_no_debug_output.patch # https://git.reviewboard.kde.org/r/102439/ Patch50: kdelibs-4.7.0-knewstuff2_gpg2.patch -# https://bugs.kde.org/show_bug.cgi?id=269045 -# https://git.reviewboard.kde.org/r/101231/ -Patch51: kdelibs-4.6.2-uri_mimetypes.patch - # Toggle solid upnp support at runtime via env var SOLID_UPNP=1 (disabled by default) -Patch52: kdelibs-4.7.4-SOLID_UPNP.patch +Patch52: kdelibs-4.10.0-SOLID_UPNP.patch # add s390/s390x support in kjs Patch53: kdelibs-4.7.2-kjs-s390.patch @@ -149,38 +136,30 @@ Patch54: kdelibs-4.8.4-kjs-locale.patch # patch FindSamba.cmake to find samba4 libs (using pkg-config hints) # https://git.reviewboard.kde.org/r/106861/ -Patch55: kdelibs-4.9.2-FindSamba_samba4.patch +Patch55: kdelibs-4.9.90-FindSamba_samba4.patch -# backport FindKipi.cmake from Digikam SC 3.0.0-beta1 for libkipi 2 (kde#307213) -Patch56: kdelibs-4.9.1-FindKipi-libkipi2.patch - -# cmake/python3 love, see # https://bugs.kde.org/show_bug.cgi?id=275919 -# see also http://git.reviewboard.kde.org/r/106707/ -# reviewboard finished, double check if these remaining patches are still -# required or not -- rex -Patch58: kdelibs-cmake_python3.patch - -# make filter working +# make filter working, TODO: upstream? -- rex Patch59: kdelibs-4.9.3-kcm_ssl.patch -# solid/udisks2 fix/workaround for 2-stage devides -Patch60: kdelibs-udisks2_2_stage.patch +# disable dot to reduce apidoc size +Patch61: kdelibs-4.9.3-dot.patch ## upstream -# FindKdcraw.cmake fixes -Patch100: kdelibs-FindKdcraw.patch ## security fix # Not Upstreamed? why not ? -- Rex -Patch200: kdelibs-4.3.1-CVE-2009-2702.patch +Patch200: kdelibs-4.10.0-CVE-2009-2702.patch # rhel patches -Patch300: kdelibs-4.8.3-webkit.patch -Patch301: kdelibs-4.9.3-dot.patch -Patch302: kdelibs-4.x-abrt.patch -# kmailservice moved here -Conflicts: kdelibs3 < 3.5.10-38 +# disable webkit +Patch300: kdelibs-4.10.0-webkit.patch + +# set abrt default +Patch301: kdelibs-4.x-abrt.patch + +# kmailservice/ktelnetservice moved here +Conflicts: kdelibs3 < 3.5.10-42 BuildRequires: qt4-devel >= %{qt4_ver} %if 0%{?fedora} @@ -206,6 +185,8 @@ BuildRequires: libacl-devel libattr-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libutempter-devel +# strictly only a runtime dependency, but makes cmake happier at buildtime too -- rex +BuildRequires: media-player-info BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(avahi-core) BuildRequires: pkgconfig(dbusmenu-qt) @@ -320,33 +301,25 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage %patch27 -p1 -b .no_rpath # libplasma PackageKit integration -%if 0%{?libplasma_pk} -%patch40 -p1 -b .libplasma-pk-0001 +## hrm, seems only 0001 is upstreamed so far, need to poke Kevin why that is. -- rex +#patch40 -p1 -b .libplasma-pk-0001 %patch41 -p1 -b .libplasma-pk-0002 %patch42 -p1 -b .libplasma-pk-0003 -%endif %if "%{?udisks}" == "udisks2" -%patch47 -p1 -b .udisks2backend %patch49 -p1 -b .solid_qt_no_debug_output -%else -%patch45 -p1 -b .halectomy %endif # upstreamable patches %patch50 -p1 -b .knewstuff2_gpg2 -%patch51 -p1 -b .uri_mimetypes %patch52 -p1 -b .SOLID_UPNP %patch53 -p1 -b .kjs-s390 %patch54 -p1 -b .kjs-locale %patch55 -p1 -b .FindSamba-samba4 -%patch56 -p1 -b .FindKipi-libkipi2 -%patch58 -p1 -b .cmake_python3 %patch59 -p1 -b .filter -%patch60 -p1 -b .udisks2_2_stage +%patch61 -p1 -b .dot # upstream patches -%patch100 -p1 -b .FindKdcraw # security fixes %patch200 -p1 -b .CVE-2009-2702 @@ -354,8 +327,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage # rhel patches %if 0%{?rhel} %patch300 -p1 -b .webkit -%patch301 -p1 -b .dot -%patch302 -p1 -b .abrt +%patch301 -p1 -b .abrt %endif %build @@ -363,10 +335,9 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage mkdir -p %{_target_platform} pushd %{_target_platform} %{cmake_kde4} \ + -DKAUTH_BACKEND:STRING="PolkitQt-1" \ -DKDE_DISTRIBUTION_TEXT="%{version}-%{release}%{?fedora: Fedora}%{?rhel: Red Hat Enterprise Linux}" \ - %if 0%{?rhel} > 6 || 0%{?fedora} > 17 - -DWITH_SOLID_UDISKS2:BOOL=ON \ - %endif + %{?udisks2:-DWITH_SOLID_UDISKS2:BOOL=ON} \ .. popd @@ -394,18 +365,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} mv %{buildroot}%{_kde4_sysconfdir}/xdg/menus/applications.menu \ %{buildroot}%{_kde4_sysconfdir}/xdg/menus/kde4-applications.menu -# kmailservice symlink -# Mailto not working in Firefox: can't find kmailservice -# http://bugzilla.redhat.com/773414 -ln -s %{_kde4_libexecdir}/kmailservice %{buildroot}%{_kde4_bindir}/kmailservice - # create/own stuff # see http://bugzilla.redhat.com/483318 mkdir -p %{buildroot}%{_kde4_libdir}/kconf_update_bin -%if 0%{?fedora} && 0%{?fedora} < 15 -# moved to kde-filesystem f15+ -mkdir -p %{buildroot}%{_kde4_libdir}/kde4/plugins/{gui_platform,styles} -%endif ## use ca-certificates' ca-bundle.crt, symlink as what most other ## distros do these days (http://bugzilla.redhat.com/521902) @@ -477,11 +439,6 @@ update-desktop-database -q &> /dev/null update-mime-database %{_kde4_datadir}/mime >& /dev/null gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || : - -%clean -rm -rf %{buildroot} - - %files %doc AUTHORS README TODO %doc COPYING.LIB @@ -499,6 +456,7 @@ rm -rf %{buildroot} %{_kde4_bindir}/kmailservice %{_kde4_bindir}/kross %{_kde4_bindir}/kshell4 +%{_kde4_bindir}/ktelnetservice %{_kde4_bindir}/kunittestmodrunner %{_kde4_bindir}/kwrapper4 %{_kde4_bindir}/nepomuk-rcgen @@ -543,11 +501,9 @@ rm -rf %{buildroot} %{_kde4_libexecdir}/kio_http_cache_cleaner %{_kde4_libexecdir}/kioslave %{_kde4_libexecdir}/klauncher -%{_kde4_libexecdir}/kmailservice # see kio/misc/kpac/README.wpad %attr(4755,root,root) %{_kde4_libexecdir}/kpac_dhcp_helper %{_kde4_libexecdir}/ksendbugmail -%{_kde4_libexecdir}/ktelnetservice %{_kde4_libexecdir}/lnusertemp %{_kde4_libexecdir}/start_kdeinit %{_kde4_libexecdir}/start_kdeinit_wrapper @@ -586,9 +542,7 @@ rm -rf %{buildroot} %{_mandir}/man1/preparetips.1* %{_kde4_bindir}/kconfig_compiler4 %{_kde4_bindir}/makekdewidgets4 -%if 0%{?libplasma_pk} %{_kde4_bindir}/plasma-dataengine-depextractor -%endif %{_kde4_bindir}/kde4-doxygen.sh %{_kde4_appsdir}/cmake/ %{_kde4_includedir}/* @@ -607,31 +561,54 @@ rm -rf %{buildroot} %changelog -* Thu Feb 28 2013 Than Ngo - 6:4.9.5-4 -- abrt by default for RHEL +* Sat Mar 02 2013 Rex Dieter - 6:4.10.1-1 +- 4.10.1 -* Fri Feb 01 2013 Rex Dieter 6:4.9.5-3 +* Thu Feb 28 2013 Than Ngo - 6:4.10.0-4 +- rhel condition: + adapt webkit patch + abrt by default + disable dot to reduce doc size + +* Thu Feb 07 2013 Lukáš Tinkl 6:4.10.0-3 +- complete kdelibs-udisks2_2_stage.patch + +* Tue Feb 05 2013 Rex Dieter 6:4.10.0-2 - kdelibs-udisks2_2_stage.patch (fix for some phones/mtp-device detection) -* Tue Jan 01 2013 Rex Dieter 6:4.9.5-2 +* Thu Jan 31 2013 Rex Dieter - 6:4.10.0-1 +- 4.10.0 + +* Sat Jan 19 2013 Rex Dieter - 6:4.9.98-1 +- 4.9.98 + +* Fri Jan 18 2013 Adam Tkac - 6:4.9.97-2 +- rebuild due to "jpeg8-ABI" feature drop + +* Thu Jan 03 2013 Rex Dieter - 6:4.9.97-1 +- 4.9.97 + +* Sat Dec 29 2012 Rex Dieter 6:4.9.95-3 - FindKdcraw.cmake fixes(kde#311936) -* Fri Dec 28 2012 Rex Dieter 6:4.9.5-1 -- 4.9.5 +* Thu Dec 20 2012 Rex Dieter 6:4.9.95-2 +- Conflicts: kdelibs3 < 3.5.10-42 -* Wed Dec 11 2012 Rex Dieter 6:4.9.4-5 +* Wed Dec 19 2012 Rex Dieter - 6:4.9.95-1 +- 4.9.95 + +* Thu Dec 13 2012 Rex Dieter 6:4.9.90-4 +- prune/fix changelog + +* Wed Dec 12 2012 Rex Dieter 6:4.9.90-3 +- fix udisks2 conditional, so -DWITH_SOLID_UDISKS2:BOOL=ON really gets set + +* Wed Dec 12 2012 Rex Dieter - 6:4.9.90-2 +- sync with latest solid/udisks2 upstream bits - Debug output in kdelibs-udisks2-backend.patch should be disabled (#882731) -* Thu Dec 06 2012 Than Ngo - 6:4.9.4-4 -- apply upstream patch to fix crash when no service was selected - -* Thu Dec 06 2012 Than Ngo - 6:4.9.4-3 -- apply upstream patch to revert the check parent mimetypes in - protocolForArchiveMimetype() (kde#311214) - -* Tue Dec 04 2012 Than Ngo - 6:4.9.4-2 -- disable kfileplacesdevicecache which causes bad regression -- add rhel condition +* Mon Dec 03 2012 Rex Dieter 6:4.9.90-1 +- 4.9.90 (4.10beta2) * Mon Dec 03 2012 Than Ngo - 6:4.9.4-1 - 4.9.4 @@ -1141,7 +1118,7 @@ rm -rf %{buildroot} * Tue Aug 03 2010 Than Ngo - 4.5.0-1 - 4.5.0 -* Sat Jul 25 2010 Rex Dieter - 6:4.4.95-1 +* Sun Jul 25 2010 Rex Dieter - 6:4.4.95-1 - 4.5 RC3 (4.4.95) * Wed Jul 21 2010 Than Ngo - 6:4.4.92-4 @@ -1549,7 +1526,7 @@ rm -rf %{buildroot} * Mon Mar 09 2009 Than Ngo - 4.2.1-5 - apply patch to fix issue in CSS style that causes konqueror shows a blank page -* Wed Mar 05 2009 Rex Dieter - 4.2.1-4 +* Thu Mar 05 2009 Rex Dieter - 4.2.1-4 - move designer plugins to main/runtime (#487622) * Sun Mar 01 2009 Than Ngo - 4.2.1-2 @@ -1980,243 +1957,3 @@ rm -rf %{buildroot} * Mon Jan 07 2008 Than Ngo 4.0.0-1 - 4.0.0 - -* Fri Jan 04 2008 Kevin Kofler 3.97.0-11 -- force Phonon to use the ALSA default device by default - -* Wed Jan 02 2008 Kevin Kofler 3.97.0-10 -- apply patch by Alex Merry to support FLAC 1.1.3+ in FindFlac.cmake - -* Sat Dec 22 2007 Kevin Kofler 3.97.0-9 -- drop BR aspell-devel on F9+, use only enchant (FeatureDictionary) - -* Tue Dec 18 2007 Kevin Kofler 3.97.0-8 -- don't put binaries into kdelibs-common, they drag in kdelibs (#417251) - -* Mon Dec 17 2007 Kevin Kofler 3.97.0-7 -- split out kdelibs-common on F9+ (shared with KDE 3) (#417251) -- Requires: kdelibs-common (F9+) (#417251) - -* Tue Dec 11 2007 Than Ngo 3.97.0-6 -- enable subversion again - -* Tue Dec 11 2007 Kevin Kofler 3.97.0-5 -- rebuild for changed _kde4_includedir - -* Thu Dec 06 2007 Rex Dieter 3.97.0-4 -- drop Req: kdebase-runtime oxygen-icon-theme (at least for now) - -* Thu Dec 06 2007 Rex Dieter 3.97.0-2 -- drop BR: subversion temporarily (due to rawhide breakage) - -* Wed Dec 05 2007 Rex Dieter 3.97.0-1 -- kde-3.97.0 - -* Tue Dec 04 2007 Than Ngo 3.96.2-4 -- rebuilt against new openssl/openldap - -* Sat Dec 01 2007 Kevin Kofler 3.96.2-3 -- install profile scripts as 644 instead of 755 (Ville Skyttä, #407521) - -* Sat Dec 01 2007 Kevin Kofler 3.96.2-2 -- BR openssh-clients and subversion (Sebastian Vahl) -- make this the default kdelibs for F9 again - -* Tue Nov 29 2007 Rex Dieter 3.96.2-1 -- kde-3.96.2 - -* Tue Nov 27 2007 Rex Dieter 3.96.1-1 -- kde-3.96.1 - -* Tue Nov 20 2007 Rex Dieter 3.96.0-4 -- Requires: kdebase-runtime oxygen-icon-theme (where available) - -* Mon Nov 19 2007 Rex Dieter 3.96.0-3 -- Requires: dbus-x11 (#390851) - -* Mon Nov 19 2007 Rex Dieter 3.96.0-2 -- -devel: (Build)Requires: libXcomposite-devel libXdamage-devel - libxkbfile-devel libXpm-devel libXScrnSaver-devel libXtst-devel - libXv-devel libXxf86misc-devel -- devel: Requires: strigi-devel >= 0.5.7 -- (Build)Requires: kde-filesystem >= 4 - -* Thu Nov 15 2007 Rex Dieter 3.96.0-1 -- kde-3.96.0 - -* Sat Nov 10 2007 Rex Dieter 3.95.2-2 -- BR: strigi-devel >= 0.5.7, soprano-devel >= 1.97.1 -- License: LGPLv2 (only) - -* Fri Nov 09 2007 Rex Dieter 3.95.2-1 -- kde-3.95.2 - -* Tue Nov 06 2007 Rex Dieter 3.95.0-2 -- fix parallel_devel patch (typo in KDE4_KPARTS_LIBRARY) - -* Sun Nov 04 2007 Rex Dieter 3.95.0-1 -- kde-3.95.0 (kde4 dev platform rc1) - -* Thu Oct 18 2007 Kevin Kofler 3.94.0-2 -- drop optional BR hspell-devel again due to broken x86_64 static library - -* Thu Oct 18 2007 Kevin Kofler 3.94.0-1 -- update to 3.94.0 -- BR soprano-devel >= 1.95.0 -- don't rename js to kjs after installation, fixed upstream -- update parallel-devel patch -- drop kde#149704 patch, fixed upstream -- drop colorscheme-hack patch -- backport upstream fix for unversioned kpty library (rev 724528) -- add new BRs hspell-devel and jasper-devel -- 3.94.0 generates some manpages, add them to the file list - -* Thu Oct 4 2007 Kevin Kofler 3.93.0-11 -- don't make this the default kdelibs on F9 yet -- retry ppc64 build (#300571) - -* Fri Sep 21 2007 Kevin Kofler 3.93.0-10 -- ExcludeArch: ppc64 (#300571) - -* Thu Sep 20 2007 Rex Dieter 3.93.0-9 -- -devel: (re)add Requires: bzip2-devel gamin-devel libacl-devel strigi-devel zlib-devel -- update sources -- sync kde4.(sh|csh) changes wrt KDE_IS_PRELINKED w/ devel/ branch - -* Fri Sep 14 2007 Kevin Kofler 3.93.0-8 -- rename js to kjs because of file conflict (kde#149840) - -* Thu Sep 13 2007 Kevin Kofler 3.93.0-7 -- actually install kde4.sh and kde4.csh -- sync KDE_IS_PRELINKED setting in kde4.sh and kde4.csh with kdelibs 3 - (workaround for #244065 no longer needed, fixed in 3.93.0) - -* Thu Sep 13 2007 Kevin Kofler 3.93.0-6 -- set QT_PLUGIN_PATH in kde4.sh and kde4.csh - -* Wed Sep 12 2007 Kevin Kofler 3.93.0-5 -- fix strange coloring due to incomplete changes to KColorScheme - -* Mon Sep 10 2007 Kevin Kofler 3.93.0-4 -- use upstream fix (by David Faure) for kde#149704 - -* Mon Sep 10 2007 Kevin Kofler 3.93.0-3 -- fix kde#149703, kde#149704, kde#149705 - -* Sun Sep 9 2007 Kevin Kofler 3.93.0-2 -- remove files which conflict with KDE 3 -- rename kconfig_compiler and makekdewidgets to *4 -- move devel symlinks to %%{_kde4_libdir}/kde4/devel/ -- drop Conflicts: kdelibs-devel - -* Sun Sep 9 2007 Kevin Kofler 3.93.0-1 -- update to 3.93.0 -- drop kde4home patch (no longer applied) -- drop kdeprint soversion conflict patch (fixed upstream) -- remove icon-related code, pics/ is now in kdebase-runtime -- BR strigi-devel >= 0.5.5 due to API changes -- package hicolor presence_* icons which are not in hicolor-icon-theme -- don't list non-existing ksvgtopng in devel binaries (now in kdebase-runtime) - -* Tue Aug 14 2007 Rex Dieter 3.92.0-4 -- -devel: omit most (hopefully) extraneous Requires: -- use macros.kde4 -- -devel: Conflicts: kdelibs-devel (in %%_bindir,%%_libdir) -- License clarification - -* Fri Aug 03 2007 Rex Dieter 3.92.0-3 -- name kdelibs4, don't mess with %%_prefix (for now) -- move to -devel: checkXML, kconfig_compiler, (make)kdewidgets, ksgmltools2, - ksvgtopng, kunittestmodrunner -- set KDE_IS_PRELINKED unconditionally (#244065) -- License: LGPLv2 -- Requires: shared-mime-info - -* Mon Jul 30 2007 Than Ngo 3.92.0-2 -- fix conlict with kde3 -- add -DSYSCONF_INSTALL_DIR - -* Sat Jul 28 2007 Rex Dieter 3.92.0-1 -- kde-3.92.0 (kde4-beta1) - -* Thu Jul 19 2007 Kevin Kofler 3.91.0-6 -- add missing epoch to main package Requires for -devel if name is kdelibs - -* Tue Jul 17 2007 Rex Dieter 3.91.0-5 -- BR: soprano-devel -- prefix=/usr cleanups - -* Wed Jul 11 2007 Kevin Kofler 3.91.0-4 -- apply upstream bugfix for KatePart syntax highlighting (kde #145571) - -* Thu Jun 29 2007 Rex Dieter 3.91.0-3 -- fix %%_sysconfdir for %%_prefix != /usr case. - -* Thu Jun 28 2007 Rex Dieter 3.91.0-2 -- updated kde4home.diff -- CMAKE_BUILD_TYPE=RelWithDebInfo (we're already using %%optflags) - -* Wed Jun 27 2007 Rex Dieter 3.91.0-1 -- kde-3.91.0 -- CMAKE_BUILD_TYPE=debug - -* Sat Jun 23 2007 Rex Dieter 3.90.1-3 -- specfile cleanup (%%prefix issues mostly) - -* Wed May 30 2007 Kevin Kofler 3.90.1-2 -- add missing BR shared-mime-info - -* Sun May 13 2007 Kevin Kofler 3.90.1-1 -- update to 3.90.1 -- drop backported upstream fixes already in 3.90.1 -- bump cmake BR to 2.4.5 as required upstream now -- add BR strigi-devel, alsa-lib-devel, avahi-devel -- don't set execute bits by hand anymore, cmake has been fixed -- use multilibs in /opt/kde4 - -* Mon Mar 26 2007 Kevin Kofler 3.80.3-5 -- apply upstream fixes to build with Qt 4.3 Beta - -* Sat Mar 24 2007 Kevin Kofler 3.80.3-4 -- restore minimum version requirements for cmake and qt4-devel -- drop visibility hack (no longer needed with latest qt4 package) -- don't set QT4DIR and PATH anymore, qdbuscpp2xml has been fixed -- apply upstream bugfixes: -- * khtml segfault fix -- * message box cancel button fix -- * kprocio received buffer truncation fix (backported) -- * KatePart keyboard shortcut (Ctrl+Right, Shift+Right) fix - -* Mon Mar 05 2007 Rex Dieter 3.80.3-3 -- +eXecute perms for %%{_prefix}/lib/* - -* Fri Feb 23 2007 Kevin Kofler 3.80.3-2 -- apply upstream patch to fix klauncher crash -- hack around Qt 4 being built with no visibility support -- install Qt Designer plugin - -* Wed Feb 21 2007 Kevin Kofler 3.80.3-1 -- update to 3.80.3 -- update and improve parallel-installability patch -- set QT4DIR and PATH so CMake's direct $QT4DIR/qdbuscpp2xml calls work -- move libkdeinit_*.so from -devel to main package -- symlink kde4-config into /usr/bin so it can be used for path setting - -* Wed Nov 29 2006 Chitlesh Goorah 3.80.2-0.4.20061003svn -- dropped -DCMAKE_SKIP_RPATH=TRUE from cmake -- compiling with QA_RPATHS=0x0003; export QA_RPATHS - -* Sun Nov 26 2006 Chitlesh Goorah 3.80.2-0.3.20061003svn -- Added foolishly dropped libjpeg-devel, zlib-devel, krb5-devel, libattr-devel again as BR - -* Thu Nov 23 2006 Chitlesh Goorah 3.80.2-0.2.20061003svn -- parallel build support -- added -DCMAKE_SKIP_RPATH=TRUE to cmake to skip rpath -- dropped libjpeg-devel, zlib-devel, krb5-devel, libattr-devel as BR -- dropped duplicate libattr-devel in BR -- spec file cleanups and added clean up in %%install -- fixed missing dependency : libkdeinit_knotify.so - -* Sat Oct 07 2006 Kevin Kofler 3.80.2-0.1.20061003svn -- first Fedora RPM (parts borrowed from the OpenSUSE kdelibs 4 RPM and the Fedora kdelibs 3 RPM) -- apply parallel-installability patch diff --git a/sources b/sources index 8206557..c794f36 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2155d7ae075a1c7e9c6398b381c67177 kdelibs-4.9.5.tar.xz +c90b95d95e7e5cbe92017ee957b5d691 kdelibs-4.10.1.tar.xz