diff options
author | Andreas Hüttel <dilfridge@gentoo.org> | 2011-04-07 20:19:14 +0000 |
---|---|---|
committer | Andreas Hüttel <dilfridge@gentoo.org> | 2011-04-07 20:19:14 +0000 |
commit | 34cc1b6c181586e56f335791fe70a06c56477208 (patch) | |
tree | 1ca99504fc41f779be6c6c66fa7fa492204f97cc /kde-base | |
parent | Use Python 2 (bug #315837). (diff) | |
download | historical-34cc1b6c181586e56f335791fe70a06c56477208.tar.gz historical-34cc1b6c181586e56f335791fe70a06c56477208.tar.bz2 historical-34cc1b6c181586e56f335791fe70a06c56477208.zip |
Remove safestrigi patch, since it breaks tags in dolphin, bug 362513
Package-Manager: portage-2.1.9.45/cvs/Linux x86_64
Diffstat (limited to 'kde-base')
-rw-r--r-- | kde-base/kdelibs/ChangeLog | 9 | ||||
-rw-r--r-- | kde-base/kdelibs/Manifest | 31 | ||||
-rw-r--r-- | kde-base/kdelibs/files/kdelibs-4.6.2-safestrigi.patch | 780 | ||||
-rw-r--r-- | kde-base/kdelibs/kdelibs-4.6.2-r1.ebuild (renamed from kde-base/kdelibs/kdelibs-4.6.2.ebuild) | 3 |
4 files changed, 24 insertions, 799 deletions
diff --git a/kde-base/kdelibs/ChangeLog b/kde-base/kdelibs/ChangeLog index 82bf6a74b544..bc7ab788d328 100644 --- a/kde-base/kdelibs/ChangeLog +++ b/kde-base/kdelibs/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for kde-base/kdelibs # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/ChangeLog,v 1.737 2011/04/07 07:55:13 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/ChangeLog,v 1.738 2011/04/07 20:19:14 dilfridge Exp $ + +*kdelibs-4.6.2-r1 (07 Apr 2011) + + 07 Apr 2011; Andreas K. Huettel <dilfridge@gentoo.org> + -kdelibs-4.6.2.ebuild, +kdelibs-4.6.2-r1.ebuild, + -files/kdelibs-4.6.2-safestrigi.patch: + Remove safestrigi patch, since it breaks tags in dolphin, bug 362513 07 Apr 2011; Andreas K. Huettel <dilfridge@gentoo.org> kdelibs-4.6.2.ebuild, +files/kdelibs-4.6.2-nonepomuk.patch: diff --git a/kde-base/kdelibs/Manifest b/kde-base/kdelibs/Manifest index 60985735aef3..30910d678d54 100644 --- a/kde-base/kdelibs/Manifest +++ b/kde-base/kdelibs/Manifest @@ -31,7 +31,6 @@ AUX kdelibs-4.6.0-logoutcrash.patch 769 RMD160 999f0adf323e0adbe6359c0533bfc8f7b AUX kdelibs-4.6.1-cve20111168.patch 648 RMD160 e9ab4d57bf2c33761aaac2ac7527a69b5e0aae96 SHA1 730534a337c88ef2a7c716f5d118f445d06898e7 SHA256 eaf04067911121a141036c5f2e22a810a566e9eec8f982c3573c0a2a51cc3014 AUX kdelibs-4.6.1-sslproxy.patch 867 RMD160 7d0abcf3a1e9736d210b270159c78ba9c25c590b SHA1 8de74e66f71f8ce379c5a9a64195333892918e0a SHA256 bb8407da2c02beaf09a102474932288ecf54201088998f7f3b5f8c07c392d953 AUX kdelibs-4.6.2-nonepomuk.patch 736 RMD160 3f6ab4acd649d47f045e2445544df3b84e7a700e SHA1 1f5af0271c6a5135bf0bc0acbd6f11abf256c81b SHA256 f27ec69f92e197bff33ecd6f25e3e47303e7599cdc28302477bca52ebe94b2a4 -AUX kdelibs-4.6.2-safestrigi.patch 28477 RMD160 0493c62e057ec2e8b01baa91289f4668b0d8c087 SHA1 a69387c5ed4c72d39f40a0e27041002319be192c SHA256 56ff0b19b298b08511c229e0023292a2a05f34e76c99118ddbe6449e18b8c0f0 DIST kdelibs-4.4.5.tar.bz2 14088335 RMD160 533a627116524d5365ba45f5eb17c972426f59c1 SHA1 73e37abee48536b85782d1a17f1b282313b16c4d SHA256 11d79203e70ba104bf5414cb2a4e8919793ffb5b201592f28fc8ae325c8c6085 DIST kdelibs-4.6.2.tar.bz2 12917847 RMD160 3a6f2a95f12d15c2ebfe2c5fb1e8f1fb3f51277f SHA1 b4794a9a69492ce4725abd9eb5d00d3a50e46603 SHA256 61d8d73d56f2e0198e590d1c6f5615dea9aa955fa69676265852744a1133b561 EBUILD kdelibs-4.4.5-r1.ebuild 9305 RMD160 990c1fada960973aa385b17f33e7ae39af18bbdc SHA1 f2af2ce09d6a7fec81861b8cfb20bb2b85fd5680 SHA256 a1d3c4ee9e1c72b16e80833bdaa20e75444eea04892e874b76a89253c99003fa @@ -39,23 +38,23 @@ EBUILD kdelibs-4.4.5-r2.ebuild 9348 RMD160 c49aabc622b1bdb285bb1734dc54516f4a5bf EBUILD kdelibs-4.4.5-r3.ebuild 9389 RMD160 623d5b887f84431bf568fc87cd69daa2e7cfcd28 SHA1 b9b4ffe449c7a73ae7b0a00acb2e0fb5d00a85d9 SHA256 49970c6e40ce296c329067244f42ac0746b57ea571ed96e9972f78197fe990fb EBUILD kdelibs-4.4.5-r4.ebuild 9431 RMD160 2844a2000bb885b30a1597f8274ecd15f57e7efd SHA1 9d1bdcaecbae0e80a1980f1f51c7fa6ca0fb8d34 SHA256 3d15b70c3e72410e05b519de40f53f125c0f633d0c14d591c70f8b7171874ea4 EBUILD kdelibs-4.4.5.ebuild 9261 RMD160 fa5cde9fa6918f1b00e99104f38e9906ec3a513f SHA1 731b5f1f193edfae407a40d1563fd731502abc3c SHA256 fae1b2fc955ae6eabc80e3f6c87a2b457a06fc47cd864e7a3c35c6a88a19b884 -EBUILD kdelibs-4.6.2.ebuild 9704 RMD160 a3abff624aaeefe18ac892251f88ccda6157d9e0 SHA1 bf24e9717cd9af0aa21f5d12afa5c2ac28fff125 SHA256 23936904d49ffe4ac4500bed5c87995fa67d2d9fae868486fa349298da51ff0f -MISC ChangeLog 123006 RMD160 1e2b58f13b5307d7b9149c68833146c2e910150b SHA1 8368c4aedb229f92fbb590d5ac73a1747ed6674f SHA256 794adb9e2878320f7dba325c8544cca08c43afd8cece54e0cf95e96da9931349 +EBUILD kdelibs-4.6.2-r1.ebuild 9663 RMD160 e6829792b3c9b01900350f9814bd57e9eeb36a37 SHA1 3e59d43fc03afbb414457dc74dd3c05514806b53 SHA256 b14f2c97bdde5eb1bfb9a2b895a19de9ab6dea8d612bed31306071f50fac4c62 +MISC ChangeLog 123260 RMD160 884c1191655c3ffe9deedc8744ef290209a6d2ef SHA1 faea003f34960455e3ad67552f88a14297be70b6 SHA256 477031c4d35c208c6c570362628d24e12d2a0e8bd322504ec12d2fe3bc8a2504 MISC metadata.xml 250 RMD160 1cf3a68b9ec97616d8ad515fba750a045cd261e5 SHA1 e13cc9329dd1557d621d84e042a3cfac56490548 SHA256 01ebccaddc9d829aec527fdcfd6d81dc72b5034d0eb59881838ecc10131c12a7 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iQIcBAEBCgAGBQJNnW6kAAoJENwGBM22xffedOgQAJ1NuGiMeRRt8DPI24DLLswJ -P09P9AkEB9ftfm93WV2R+hwtHxL+sEV42UzuTuI6NgRDhnw59lqWZtM9pw2cAo/3 -KM2lbmXMKBnmG1VahUvvf96Vwh4V0hdUgqTMuYgkcGBWWRwFwZZIWFKOw/Qmp+kW -7hspg2hDeWaYdUB61dqTE30pqRTYXYg4CInAJfzsQaRpKyxi+Ai537usQH9vjBTt -w3H+icdI0XBZZ92ZRXcQhrYqhTYw/KTW/LxhHywK3pzyF8xLiTsILUl3A7f+3+AW -tRq490XxnOxctk4dhJ1kit5waPhu6spBSBrkrFf/GR3BsCeaMJ9jfDFEKocDbopL -QuX2aqKPC+MgRhfYJq0PkU3zPfHDHUSCoXVm4j1Q6LQ4zdcbLRXFa2D75dE11oyO -4Qy9NZkbURrEDt8j8jOG5ANVR1hZPQiAu9mbhzzZd6tqKmfEYXN1BGg4cEWVeSQx -Rya5j4MjXe4lfcObu4+N2wHMzmkW5gP+NBCP5vvA1MtxwqsuDj7DQ/LRzIBfUG2G -4b98Xx+yfO7BfPQAc2k90rgWy748bV/9ZHx84GAPI/G7R+1j2izMokPX34k96PRE -tQ2siue0vPuHz4dztr85ytN0iDKk0JEvDcT5o3KieuvPm9U142qugwht618KIfFU -XxnWzZ7bq4gwjky9G8mj -=Xhby +iQIcBAEBCgAGBQJNnh0OAAoJENwGBM22xffelHIQAI11epmOxQKQT83APtq0gVmT +uop652FAlT09Erz5Aibf55oXlWBeLJ6/NDLIZUccl2ocVWzzOZj34Dwsl19gcxnV +fg2uA3blcnjSqQ/4d1bBnc0GeCSbETN2PlKm/pvIaaSKZX8wy2Anng/kcabvsT9D +PDuJk4uE4t9I1TplNofV+DS87m8+Vt+fmOMn2cLyTI/TRGDBNHZLCAACg46jlHwm +IOYZa7b44NhqPTHlaCyUxDiQ/9CZpA7MKRb9UGfjL6XxJ/1O9KpVEubY47eAb3Wq +xyzuPkJ6mpqeen851NiH5rjJcmF1vNagvlfkIuRYbh/cocJaXFR/DRsTtvHp+qT5 +7J9/4wxhGmbf8S5I6txtCBgYbB0R+8S/C0wHnnF5u+lcuxAr5y1g+ZfPzfTV1S5d +46otZsOfPHjGiTtRRbH1Jb3xqSsJa4MPICsH6C41EcQfUnDMmXxwk6ON3Sj7tT7J +hAsFyfX+CsoYSKWdhO5Mmpw4N/4wdJh3uyuKGFvBEOE0NZnPjgGMazq+x2OZ3KuD +FMNy1b1kem8AShIuHJ54oQSgeqg+htNC+5j/oy7Yb8CT96J5D2zlRVPgbrnl6znE +L7fXKTssSxScHY8Vbwfo1x3TH2uwBziEUASjGdhm12xJ1WzIQvEFoD6PMD1a6rfT +uWa1HKtHRCty1zSRnG8Y +=vKz7 -----END PGP SIGNATURE----- diff --git a/kde-base/kdelibs/files/kdelibs-4.6.2-safestrigi.patch b/kde-base/kdelibs/files/kdelibs-4.6.2-safestrigi.patch deleted file mode 100644 index f6c182841dc3..000000000000 --- a/kde-base/kdelibs/files/kdelibs-4.6.2-safestrigi.patch +++ /dev/null @@ -1,780 +0,0 @@ -commit d1254968eac95f4d9d8c47552e27f0cc40e6aed9 -Author: Peter Penz <peter.penz19@gmail.com> -Date: Sun Feb 27 20:01:19 2011 +0100 - - KFileMetaDataProvider: Don't crash if a Strigi analyzer crashes - - Some Strigi analyzers are still unstable and crash under certain circumstances. This patch moves the reading of the meta-data into a custom process instead of doing it in a thread, which assures that a crashing Strigi analyzer does not result in crashing Dolphin or Konqueror when hovering some items. - - FIXED-IN: 4.7.0 - BUG: 257964 - BUG: 258715 - BUG: 262299 - BUG: 263468 - BUG: 263502 - BUG: 264254 - BUG: 234799 - BUG: 251462 - BUG: 251701 - BUG: 258918 - BUG: 192377 - BUG: 195564 - BUG: 199368 - BUG: 210841 - BUG: 245376 - BUG: 246461 - BUG: 246901 - BUG: 249150 - BUG: 261952 - BUG: 249876 - BUG: 179376 - BUG: 179417 - BUG: 179420 - BUG: 181591 - BUG: 183269 - BUG: 183722 - BUG: 185667 - BUG: 188596 - BUG: 191864 - BUG: 193112 - BUG: 205813 - BUG: 244621 - BUG: 245451 - BUG: 248214 - BUG: 249655 - BUG: 249876 - BUG: 265549 - BUG: 267079 - -diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt -index 0802150..72386f8 100644 ---- a/kio/CMakeLists.txt -+++ b/kio/CMakeLists.txt -@@ -257,7 +257,6 @@ if(NOT KIO_NO_NEPOMUK) - set(kfile_STAT_SRCS - ${kfile_STAT_SRCS} - kfile/kcommentwidget.cpp -- kfile/kloadfilemetadatathread.cpp - ) - endif(NOT KIO_NO_NEPOMUK) - -@@ -307,6 +306,12 @@ set(kio_LIB_PRIVATE_SRCS - kio/slaveinterface_p.h - ) - -+if(NOT KIO_NO_NEPOMUK) -+ set(kfilemetadatareader_SRCS -+ kfile/kfilemetadatareader.cpp -+ ) -+endif(NOT KIO_NO_NEPOMUK) -+ - kde4_add_ui_files(kio_LIB_SRCS - kfile/kpropertiesdesktopadvbase.ui - kfile/kpropertiesdesktopbase.ui -@@ -323,6 +328,8 @@ install(FILES kssl/ksslcertificatemanager.upd - kde4_add_library(kio ${LIBRARY_TYPE} ${kio_LIB_SRCS}) - - if(NOT KIO_NO_NEPOMUK) -+ kde4_add_executable(kfilemetadatareader ${kfilemetadatareader_SRCS}) -+ target_link_libraries(kfilemetadatareader ${KDE4_KIO_LIBS} ${KDE4_NEPOMUK_LIBRARY} nepomukutils) - target_link_libraries(kio ${KDE4_NEPOMUK_LIBRARY} nepomukquery nepomukutils) - endif(NOT KIO_NO_NEPOMUK) - target_link_libraries(kio ${KDE4_KDEUI_LIBS} ${ZLIB_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTSVG_LIBRARY} ${X11_LIBRARIES} ${KIO_EXTRA_LIBS}) -@@ -343,6 +350,9 @@ set_target_properties(kio PROPERTIES VERSION ${KDE_NON_GENERIC_LIB_VERSION} - - ########### install files ############### - install(TARGETS kio EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) -+if(NOT KIO_NO_NEPOMUK) -+ install(TARGETS kfilemetadatareader ${INSTALL_TARGETS_DEFAULT_ARGS}) -+endif(NOT KIO_NO_NEPOMUK) - - install( PROGRAMS useragent.pl proxytype.pl DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) - -diff --git a/kio/kfile/kfilemetadataprovider.cpp b/kio/kfile/kfilemetadataprovider.cpp -index 09ce4b2..d6e4d0d 100644 ---- a/kio/kfile/kfilemetadataprovider.cpp -+++ b/kio/kfile/kfilemetadataprovider.cpp -@@ -22,18 +22,20 @@ - #include <kfileitem.h> - #include "knfotranslator_p.h" - #include <klocale.h> -+#include <kprocess.h> -+#include <kstandarddirs.h> - #include <kurl.h> - - #ifndef KIO_NO_NEPOMUK - #define DISABLE_NEPOMUK_LEGACY - #include "nepomukmassupdatejob.h" - #include "tagwidget.h" -+ #include "tag.h" - #include "kratingwidget.h" - #include "resource.h" - #include "resourcemanager.h" - - #include "kcommentwidget_p.h" -- #include "kloadfilemetadatathread_p.h" - #else - namespace Nepomuk - { -@@ -103,7 +105,7 @@ public: - Private(KFileMetaDataProvider* parent); - ~Private(); - -- void slotLoadingFinished(QThread* finishedThread); -+ void slotLoadingFinished(int exitCode, QProcess::ExitStatus exitStatus); - - void slotRatingChanged(unsigned int rating); - void slotTagsChanged(const QList<Nepomuk::Tag>& tags); -@@ -135,8 +137,8 @@ public: - #ifndef KIO_NO_NEPOMUK - QHash<KUrl, Nepomuk::Variant> m_data; - -- QList<KLoadFileMetaDataThread*> m_metaDataThreads; -- KLoadFileMetaDataThread* m_latestMetaDataThread; -+ QList<KProcess*> m_metaDataProcesses; -+ KProcess* m_latestMetaDataProcess; - - QWeakPointer<KRatingWidget> m_ratingWidget; - QWeakPointer<Nepomuk::TagWidget> m_tagWidget; -@@ -153,8 +155,8 @@ KFileMetaDataProvider::Private::Private(KFileMetaDataProvider* parent) : - m_fileItems(), - #ifndef KIO_NO_NEPOMUK - m_data(), -- m_metaDataThreads(), -- m_latestMetaDataThread(0), -+ m_metaDataProcesses(), -+ m_latestMetaDataProcess(0), - m_ratingWidget(), - m_tagWidget(), - m_commentWidget(), -@@ -169,35 +171,57 @@ KFileMetaDataProvider::Private::Private(KFileMetaDataProvider* parent) : - KFileMetaDataProvider::Private::~Private() - { - #ifndef KIO_NO_NEPOMUK -- foreach (KLoadFileMetaDataThread* thread, m_metaDataThreads) { -- disconnect(thread, SIGNAL(finished(QThread*)), -- q, SLOT(slotLoadingFinished(QThread*))); -- thread->wait(); -- } -+ qDeleteAll(m_metaDataProcesses); - #endif - } - --void KFileMetaDataProvider::Private::slotLoadingFinished(QThread* finishedThread) -+void KFileMetaDataProvider::Private::slotLoadingFinished(int exitCode, QProcess::ExitStatus exitStatus) - { -+ Q_UNUSED(exitCode); -+ Q_UNUSED(exitStatus); -+ - #ifndef KIO_NO_NEPOMUK -- // The thread that has emitted the finished() signal -- // will get deleted and removed from m_metaDataThreads. -- const int threadsCount = m_metaDataThreads.count(); -- for (int i = 0; i < threadsCount; ++i) { -- KLoadFileMetaDataThread* thread = m_metaDataThreads[i]; -- if (thread == finishedThread) { -- m_metaDataThreads.removeAt(i); -- if (thread != m_latestMetaDataThread) { -- // Ignore data of older threads, as the data got -- // obsolete by m_latestMetaDataThread. -- thread->deleteLater(); -+ KProcess* finishedProcess = qobject_cast<KProcess*>(q->sender()); -+ // The process that has emitted the finished() signal -+ // will get deleted and removed from m_metaDataProcesses. -+ for (int i = 0; i < m_metaDataProcesses.count(); ++i) { -+ KProcess* process = m_metaDataProcesses[i]; -+ if (process == finishedProcess) { -+ m_metaDataProcesses.removeAt(i); -+ if (process != m_latestMetaDataProcess) { -+ // Ignore data of older processs, as the data got -+ // obsolete by m_latestMetaDataProcess. -+ process->deleteLater(); - return; - } - } - } - -- m_data = m_latestMetaDataThread->data(); -- m_latestMetaDataThread->deleteLater(); -+ m_data.clear(); -+ while (m_latestMetaDataProcess->canReadLine()) { -+ // Read key -+ QString key = QString::fromLocal8Bit(m_latestMetaDataProcess->readLine()); -+ key.remove(QChar::Other_Control); -+ -+ // Read variant-type -+ if (!m_latestMetaDataProcess->canReadLine()) { -+ break; -+ } -+ QString valueTypeString(QString::fromLocal8Bit(m_latestMetaDataProcess->readLine())); -+ valueTypeString.remove(QChar::Other_Control); -+ const int valueType = valueTypeString.toInt(); -+ if (!m_latestMetaDataProcess->canReadLine()) { -+ break; -+ } -+ -+ // Read variant-value -+ QString value(QString::fromLocal8Bit(m_latestMetaDataProcess->readLine())); -+ value.remove(QChar::Other_Control); -+ // TODO: Handle value-types like QVariantList -+ Q_UNUSED(valueType); -+ m_data.insert(KUrl(key), value); -+ } -+ m_latestMetaDataProcess->deleteLater(); - - if (m_fileItems.count() == 1) { - // TODO: Handle case if remote URLs are used properly. isDir() does -@@ -219,14 +243,11 @@ void KFileMetaDataProvider::Private::slotLoadingFinished(QThread* finishedThread - } - m_data.insert(KUrl("kfileitem#totalSize"), KIO::convertSize(totalSize)); - } --#else -- Q_UNUSED(finishedThread) - #endif - - emit q->loadingFinished(); - } - -- - void KFileMetaDataProvider::Private::slotRatingChanged(unsigned int rating) - { - #ifndef KIO_NO_NEPOMUK -@@ -386,18 +407,27 @@ void KFileMetaDataProvider::setItems(const KFileItemList& items) - } - } - -- // Cancel all threads that have not emitted a finished() signal. -- // The deleting of those threads is done in slotLoadingFinished(). -- foreach (KLoadFileMetaDataThread* thread, d->m_metaDataThreads) { -- thread->cancel(); -+ // Create a new process that will provide the meta data for the items -+ d->m_latestMetaDataProcess = new KProcess(); -+ -+ const QString fileMetaDataReaderExe = KStandardDirs::findExe(QLatin1String("kfilemetadatareader")); -+ (*d->m_latestMetaDataProcess) << fileMetaDataReaderExe; -+ -+ foreach (const KUrl& url, urls) { -+ (*d->m_latestMetaDataProcess) << url.url(); - } - -- // Create a new thread that will provide the meta data for the items -- d->m_latestMetaDataThread = new KLoadFileMetaDataThread(); -- connect(d->m_latestMetaDataThread, SIGNAL(finished(QThread*)), -- this, SLOT(slotLoadingFinished(QThread*))); -- d->m_latestMetaDataThread->load(urls); -- d->m_metaDataThreads.append(d->m_latestMetaDataThread); -+ d->m_latestMetaDataProcess->setOutputChannelMode(KProcess::OnlyStdoutChannel); -+ d->m_latestMetaDataProcess->setNextOpenMode(QIODevice::ReadOnly | QIODevice::Text); -+ d->m_latestMetaDataProcess->start(); -+ if (d->m_latestMetaDataProcess->waitForStarted()) { -+ connect(d->m_latestMetaDataProcess, SIGNAL(finished(int, QProcess::ExitStatus)), -+ this, SLOT(slotLoadingFinished(int, QProcess::ExitStatus))); -+ d->m_metaDataProcesses.append(d->m_latestMetaDataProcess); -+ } else { -+ delete d->m_latestMetaDataProcess; -+ d->m_latestMetaDataProcess = 0; -+ } - #endif - } - -diff --git a/kio/kfile/kfilemetadataprovider_p.h b/kio/kfile/kfilemetadataprovider_p.h -index 05ae848..ce6e259 100644 ---- a/kio/kfile/kfilemetadataprovider_p.h -+++ b/kio/kfile/kfilemetadataprovider_p.h -@@ -33,6 +33,7 @@ - #endif - - class KFileItemList; -+class KProcess; - class KUrl; - class QWidget; - -@@ -131,7 +132,7 @@ private: - class Private; - Private* const d; - -- Q_PRIVATE_SLOT(d, void slotLoadingFinished(QThread* finishedThread)) -+ Q_PRIVATE_SLOT(d, void slotLoadingFinished(int exitCode, QProcess::ExitStatus exitStatus)) - Q_PRIVATE_SLOT(d, void slotRatingChanged(unsigned int rating)) - Q_PRIVATE_SLOT(d, void slotTagsChanged(const QList<Nepomuk::Tag>& tags)) - Q_PRIVATE_SLOT(d, void slotCommentChanged(const QString& comment)) -diff --git a/kio/kfile/kfilemetadatareader.cpp b/kio/kfile/kfilemetadatareader.cpp -new file mode 100644 -index 0000000..0609235 ---- /dev/null -+++ b/kio/kfile/kfilemetadatareader.cpp -@@ -0,0 +1,174 @@ -+/***************************************************************************** -+ * Copyright (C) 2011 by Peter Penz <peter.penz@gmx.at> * -+ * * -+ * This library is free software; you can redistribute it and/or * -+ * modify it under the terms of the GNU Library General Public * -+ * License as published by the Free Software Foundation; either * -+ * version 2 of the License, or (at your option) any later version. * -+ * * -+ * 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 * -+ * Library General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU Library General Public License * -+ * along with this library; see the file COPYING.LIB. If not, write to * -+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * -+ * Boston, MA 02110-1301, USA. * -+ *****************************************************************************/ -+ -+#include <iostream> -+ -+#include <kaboutdata.h> -+#include <kcmdlineargs.h> -+#include <kfilemetainfo.h> -+#include <klocale.h> -+ -+#include <QtCore/QHash> -+#include <QtCore/QString> -+ -+#define DISABLE_NEPOMUK_LEGACY -+#include "config-nepomuk.h" -+ -+#include <nepomuk/query/filequery.h> -+#include <nepomuk/query/comparisonterm.h> -+#include <nepomuk/query/andterm.h> -+#include <nepomuk/query/resourceterm.h> -+#include <nepomuk/query/resourcetypeterm.h> -+#include <nepomuk/query/optionalterm.h> -+#include <nepomuk/utils/utils.h> -+#include <nepomuk/property.h> -+#include <nepomuk/tag.h> -+#include <nepomuk/variant.h> -+#include <nepomuk/resourcemanager.h> -+ -+using namespace std; -+ -+static void sendMetaData(const QHash<KUrl, Nepomuk::Variant>& data) -+{ -+ // Write the meta-data as sequence of the following properties: -+ // 1. Metadata key -+ // 2. Variant type -+ // 3. Variant value -+ QHashIterator<KUrl, Nepomuk::Variant> it(data); -+ while (it.hasNext()) { -+ it.next(); -+ const QString key = it.key().url(); -+ const Nepomuk::Variant& variant = it.value(); -+ -+ const QString variantType = QString::number(variant.type()); -+ // TODO: serialize valuetypes like variant lists -+ QString variantValue = variant.toString(); -+ // QChar::Other_Control acts as separator between the output-values. -+ // Assure that this character is not already part of a value: -+ variantValue.remove(QChar::Other_Control); -+ -+ cout << key.toLocal8Bit().data() << endl; -+ cout << variantType.toLocal8Bit().data() << endl; -+ cout << variantValue.toLocal8Bit().data() << endl; -+ } -+} -+ -+static int readMetaData(const KCmdLineArgs* args) -+{ -+ KUrl::List urls; -+ const int argsCount = args->count(); -+ for (int i = 0; i < argsCount; ++i) { -+ urls.append(KUrl(args->arg(i))); -+ } -+ -+ unsigned int rating = 0; -+ QString comment; -+ QList<Nepomuk::Tag> tags; -+ QHash<KUrl, Nepomuk::Variant> data; -+ -+ bool first = true; -+ foreach (const KUrl& url, urls) { -+ Nepomuk::Resource file(url); -+ if (!file.isValid()) { -+ continue; -+ } -+ -+ if (!first && (rating != file.rating())) { -+ rating = 0; // Reset rating -+ } else if (first) { -+ rating = file.rating(); -+ } -+ -+ if (!first && (comment != file.description())) { -+ comment.clear(); // Reset comment -+ } else if (first) { -+ comment = file.description(); -+ } -+ -+ if (!first && (tags != file.tags())) { -+ tags.clear(); // Reset tags -+ } else if (first) { -+ tags = file.tags(); -+ } -+ -+ if (first && (urls.count() == 1)) { -+ // Get cached meta data by checking the indexed files -+ QHash<QUrl, Nepomuk::Variant> variants = file.properties(); -+ QHash<QUrl, Nepomuk::Variant>::const_iterator it = variants.constBegin(); -+ while (it != variants.constEnd()) { -+ Nepomuk::Types::Property prop(it.key()); -+ data.insert(prop.uri(), Nepomuk::Utils::formatPropertyValue(prop, it.value(), -+ QList<Nepomuk::Resource>() << file, -+ Nepomuk::Utils::WithKioLinks)); -+ ++it; -+ } -+ -+ if (variants.isEmpty()) { -+ // The file has not been indexed, query the meta data -+ // directly from the file. -+ const QString path = urls.first().toLocalFile(); -+ KFileMetaInfo metaInfo(path, QString(), KFileMetaInfo::Fastest); -+ const QHash<QString, KFileMetaInfoItem> metaInfoItems = metaInfo.items(); -+ foreach (const KFileMetaInfoItem& metaInfoItem, metaInfoItems) { -+ const QString uriString = metaInfoItem.name(); -+ const Nepomuk::Variant value(metaInfoItem.value()); -+ data.insert(uriString, -+ Nepomuk::Utils::formatPropertyValue(Nepomuk::Types::Property(), value)); -+ } -+ } -+ } -+ -+ first = false; -+ } -+ -+ if (Nepomuk::ResourceManager::instance()->initialized()) { -+ data.insert(KUrl("kfileitem#rating"), rating); -+ data.insert(KUrl("kfileitem#comment"), comment); -+ -+ QList<Nepomuk::Variant> tagVariants; -+ foreach (const Nepomuk::Tag& tag, tags) { -+ tagVariants.append(Nepomuk::Variant(tag)); -+ } -+ data.insert(KUrl("kfileitem#tags"), tagVariants); -+ } -+ -+ sendMetaData(data); -+ return 0; -+} -+ -+int main(int argc, char *argv[]) -+{ -+ KAboutData aboutData("kfilemetadatareader", 0, ki18n("KFileMetaDataReader"), -+ "1.0", -+ ki18n("KFileMetaDataReader can be used to read metadata from a file"), -+ KAboutData::License_GPL, -+ ki18n("(C) 2011, Peter Penz")); -+ aboutData.addAuthor(ki18n("Peter Penz"), ki18n("Current maintainer"), "peter.penz19@gmail.com"); -+ -+ KCmdLineArgs::init(argc, argv, &aboutData); -+ -+ KCmdLineOptions options; -+ options.add("+[arg]", ki18n("List of URLs where the meta-data should be read from")); -+ -+ KCmdLineArgs::addCmdLineOptions(options); -+ const KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); -+ -+ return readMetaData(args); -+} -+ -diff --git a/kio/kfile/kfilemetadatawidget.cpp b/kio/kfile/kfilemetadatawidget.cpp -index dca3a12..532d884 100644 ---- a/kio/kfile/kfilemetadatawidget.cpp -+++ b/kio/kfile/kfilemetadatawidget.cpp -@@ -41,9 +41,7 @@ - #include <property.h> - #include <tag.h> - -- #include <QMutex> - #include <QSpacerItem> -- #include <QThread> - #endif - - class KFileMetaDataWidget::Private -diff --git a/kio/kfile/kloadfilemetadatathread.cpp b/kio/kfile/kloadfilemetadatathread.cpp -deleted file mode 100644 -index 55d2c37..0000000 ---- a/kio/kfile/kloadfilemetadatathread.cpp -+++ /dev/null -@@ -1,178 +0,0 @@ --/***************************************************************************** -- * Copyright (C) 2009-2010 by Peter Penz <peter.penz@gmx.at> * -- * Copyright (C) 2009-2010 by Sebastian Trueg <trueg@kde.org> * -- * * -- * This library is free software; you can redistribute it and/or * -- * modify it under the terms of the GNU Library General Public * -- * License as published by the Free Software Foundation; either * -- * version 2 of the License, or (at your option) any later version. * -- * * -- * 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 * -- * Library General Public License for more details. * -- * * -- * You should have received a copy of the GNU Library General Public License * -- * along with this library; see the file COPYING.LIB. If not, write to * -- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * -- * Boston, MA 02110-1301, USA. * -- *****************************************************************************/ -- --#include "kloadfilemetadatathread_p.h" -- --#include <kfilemetainfo.h> --#include <kfilemetainfoitem.h> --#include <kglobal.h> --#include <klocale.h> --#include "kfilemetadataprovider_p.h" --#include <kprotocolinfo.h> -- --#include "resource.h" --#include "thing.h" --#include "variant.h" --#include "resourcemanager.h" -- --#include "config-nepomuk.h" -- --#include "query/filequery.h" --#include "query/comparisonterm.h" --#include "query/andterm.h" --#include "query/resourceterm.h" --#include "query/resourcetypeterm.h" --#include "query/optionalterm.h" --#include "utils/utils.h" -- --#include <Soprano/Model> --#include <Soprano/QueryResultIterator> --#include <Soprano/NodeIterator> -- --#include <QMutexLocker> -- --KLoadFileMetaDataThread::KLoadFileMetaDataThread() -- : m_canceled(false) --{ -- connect(this, SIGNAL(finished()), this, SLOT(slotLoadingFinished())); --} -- --KLoadFileMetaDataThread::~KLoadFileMetaDataThread() --{ --} -- --void KLoadFileMetaDataThread::load(const KUrl::List& urls) --{ -- QMutexLocker locker(&m_mutex); -- m_urls = urls; -- m_canceled = false; -- start(); --} -- --QHash<KUrl, Nepomuk::Variant> KLoadFileMetaDataThread::data() const --{ -- QMutexLocker locker(&m_mutex); -- return m_data; --} -- --void KLoadFileMetaDataThread::cancel() --{ -- // Setting m_canceled to true will cancel KLoadFileMetaDataThread::run() -- // as soon as run() gets the chance to check m_cancel. -- m_canceled = true; --} -- --void KLoadFileMetaDataThread::run() --{ -- QMutexLocker locker(&m_mutex); -- const KUrl::List urls = m_urls; -- locker.unlock(); // no shared member is accessed until locker.relock() -- -- unsigned int rating = 0; -- QString comment; -- QList<Nepomuk::Tag> tags; -- QHash<KUrl, Nepomuk::Variant> data; -- -- bool first = true; -- foreach (const KUrl& url, urls) { -- if (m_canceled) { -- return; -- } -- -- Nepomuk::Resource file(url); -- if (!file.isValid()) { -- continue; -- } -- -- if (!first && (rating != file.rating())) { -- rating = 0; // reset rating -- } else if (first) { -- rating = file.rating(); -- } -- -- if (!first && (comment != file.description())) { -- comment.clear(); // reset comment -- } else if (first) { -- comment = file.description(); -- } -- -- if (!first && (tags != file.tags())) { -- tags.clear(); // reset tags -- } else if (first) { -- tags = file.tags(); -- } -- -- if (first && (urls.count() == 1)) { -- // get cached meta data by checking the indexed files -- QHash<QUrl, Nepomuk::Variant> variants = file.properties(); -- QHash<QUrl, Nepomuk::Variant>::const_iterator it = variants.constBegin(); -- while (it != variants.constEnd()) { -- Nepomuk::Types::Property prop(it.key()); -- data.insert(prop.uri(), Nepomuk::Utils::formatPropertyValue(prop, it.value(), QList<Nepomuk::Resource>() << file, Nepomuk::Utils::WithKioLinks)); -- ++it; -- } -- -- if (variants.isEmpty()) { -- // The file has not been indexed, query the meta data -- // directly from the file -- -- // TODO: Some Strigi analyzers (used in KFileMetaInfo) are not reentrant. -- // As workaround the access is protected by a mutex here. To reproduce -- // the issue run kfilemetainfotest with helgrind. -- static QMutex metaInfoMutex; -- metaInfoMutex.lock(); -- -- const QString path = urls.first().toLocalFile(); -- KFileMetaInfo metaInfo(path, QString(), KFileMetaInfo::Fastest); -- const QHash<QString, KFileMetaInfoItem> metaInfoItems = metaInfo.items(); -- foreach (const KFileMetaInfoItem& metaInfoItem, metaInfoItems) { -- const QString uriString = metaInfoItem.name(); -- const Nepomuk::Variant value(metaInfoItem.value()); -- data.insert(uriString, Nepomuk::Utils::formatPropertyValue(Nepomuk::Types::Property(), value)); -- } -- -- metaInfoMutex.unlock(); -- } -- } -- -- first = false; -- } -- -- if (Nepomuk::ResourceManager::instance()->initialized()) { -- data.insert(KUrl("kfileitem#rating"), rating); -- data.insert(KUrl("kfileitem#comment"), comment); -- -- QList<Nepomuk::Variant> tagVariants; -- foreach (const Nepomuk::Tag& tag, tags) { -- tagVariants.append(Nepomuk::Variant(tag)); -- } -- data.insert(KUrl("kfileitem#tags"), tagVariants); -- } -- -- locker.relock(); -- m_data = data; --} -- --void KLoadFileMetaDataThread::slotLoadingFinished() --{ -- emit finished(this); --} -- --#include "kloadfilemetadatathread_p.moc" -diff --git a/kio/kfile/kloadfilemetadatathread_p.h b/kio/kfile/kloadfilemetadatathread_p.h -deleted file mode 100644 -index 006e3a0..0000000 ---- a/kio/kfile/kloadfilemetadatathread_p.h -+++ /dev/null -@@ -1,96 +0,0 @@ --/***************************************************************************** -- * Copyright (C) 2009-2010 by Peter Penz <peter.penz@gmx.at> * -- * * -- * This library is free software; you can redistribute it and/or * -- * modify it under the terms of the GNU Library General Public * -- * License as published by the Free Software Foundation; either * -- * version 2 of the License, or (at your option) any later version. * -- * * -- * 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 * -- * Library General Public License for more details. * -- * * -- * You should have received a copy of the GNU Library General Public License * -- * along with this library; see the file COPYING.LIB. If not, write to * -- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * -- * Boston, MA 02110-1301, USA. * -- *****************************************************************************/ -- --#ifndef KLOADFILEMETADATATHREAD_H --#define KLOADFILEMETADATATHREAD_H -- --#define DISABLE_NEPOMUK_LEGACY --#include <property.h> --#include <tag.h> --#include <variant.h> -- --#include <kurl.h> --#include <QList> --#include <QMutex> --#include <QThread> -- --/** -- * Loads the meta data of files that are -- * required by the widget KMetaDataWidget. -- * -- * Is used in KMetaDataModel. -- */ --class KLoadFileMetaDataThread : public QThread --{ -- Q_OBJECT -- --public: -- KLoadFileMetaDataThread(); -- virtual ~KLoadFileMetaDataThread(); -- -- /** -- * Starts the thread and loads the meta data for -- * the files given by \p urls. After receiving -- * the signal finished(), the method KLoadFileMetaDataThread::data() -- * provides the loaded meta data. -- */ -- void load(const KUrl::List& urls); -- -- /** -- * Returns the meta data for the URLs given -- * by KLoadFileMetaDataThread::load(). The method only provides -- * valid results after the signal finished() has been -- * emitted. -- */ -- QHash<KUrl, Nepomuk::Variant> data() const; -- -- /** -- * Tells the thread that it should cancel as soon -- * as possible. It is undefined when the thread -- * gets cancelled. The signal finished() will emitted -- * after the cancelling has been done.mergedIt -- */ -- void cancel(); -- -- /** @see QThread::run() */ -- virtual void run(); -- --Q_SIGNALS: -- /** -- * Is emitted if the thread has finished the loading. KMetaDataModel -- * requires the information which thread has been finished, hence -- * the thread is passed as parameter (using QObject::sender() would -- * be an alternative, but it is less understandable). -- */ -- void finished(QThread* thread); -- --private slots: -- /** -- * Emits the signal finished() including the thread as parameter. -- */ -- void slotLoadingFinished(); -- --private: -- mutable QMutex m_mutex; -- QHash<KUrl, Nepomuk::Variant> m_data; -- KUrl::List m_urls; -- -- volatile bool m_canceled; --}; --#endif diff --git a/kde-base/kdelibs/kdelibs-4.6.2.ebuild b/kde-base/kdelibs/kdelibs-4.6.2-r1.ebuild index e5f06f528ba9..7b946f39233d 100644 --- a/kde-base/kdelibs/kdelibs-4.6.2.ebuild +++ b/kde-base/kdelibs/kdelibs-4.6.2-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-4.6.2.ebuild,v 1.2 2011/04/07 07:55:13 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-4.6.2-r1.ebuild,v 1.1 2011/04/07 20:19:14 dilfridge Exp $ EAPI=3 @@ -136,7 +136,6 @@ PATCHES=( "${FILESDIR}/${PN}-4.5.90-mimetypes.patch" "${FILESDIR}/${PN}-4.4.90-xslt.patch" "${FILESDIR}/${PN}-4.6.0-kateacc.patch" - "${FILESDIR}/${PN}-4.6.2-safestrigi.patch" "${FILESDIR}/${PN}-4.6.2-nonepomuk.patch" ) |