From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- kde-frameworks/kio/files/kio-5.37.0-tests.patch | 50 +++++++++++++ kde-frameworks/kio/files/kio-5.38.0-kioexec.patch | 87 +++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 kde-frameworks/kio/files/kio-5.37.0-tests.patch create mode 100644 kde-frameworks/kio/files/kio-5.38.0-kioexec.patch (limited to 'kde-frameworks/kio/files') diff --git a/kde-frameworks/kio/files/kio-5.37.0-tests.patch b/kde-frameworks/kio/files/kio-5.37.0-tests.patch new file mode 100644 index 000000000000..4fdb08fc0288 --- /dev/null +++ b/kde-frameworks/kio/files/kio-5.37.0-tests.patch @@ -0,0 +1,50 @@ +commit dec4afb4145b1c9ccfe3474e26a86716f597910d +Author: Andreas Sturmlechner +Date: Tue Aug 8 22:33:08 2017 +0200 + + Use ecm_add_test and benefit from BUILD_TESTING awareness + + Reviewers: #frameworks, kfunk + + Reviewed By: kfunk + + Subscribers: kfunk + + Tags: #frameworks + + Differential Revision: https://phabricator.kde.org/D7213 + +diff --git a/src/ioslaves/trash/tests/CMakeLists.txt b/src/ioslaves/trash/tests/CMakeLists.txt +index 7adba49b..514fd79c 100644 +--- a/src/ioslaves/trash/tests/CMakeLists.txt ++++ b/src/ioslaves/trash/tests/CMakeLists.txt +@@ -11,21 +11,16 @@ set(testtrash_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/../kiotrashdebug.cpp + ) + +-add_executable(testtrash ${testtrash_SRCS}) +-ecm_mark_as_test(testtrash) +-add_test(NAME testtrash COMMAND testtrash) +- +-target_link_libraries(testtrash +- KF5::I18n +- Qt5::DBus +- KF5::KIOCore +- KF5::Solid +- Qt5::Test +-) + if(APPLE) +- target_link_libraries(testtrash "-framework DiskArbitration -framework CoreFoundation") ++ set(testtrash_APPLE_LIBS "-framework DiskArbitration -framework CoreFoundation") + endif(APPLE) +-ecm_mark_nongui_executable(testtrash) ++ ++include(ECMAddTests) ++ ++ecm_add_test(${testtrash_SRCS} ++ TEST_NAME testtrash ++ LINK_LIBRARIES KF5::I18n Qt5::DBus KF5::KIOCore KF5::Solid Qt5::Test ${testtrash_APPLE_LIBS} ++) + + ### next target ### + diff --git a/kde-frameworks/kio/files/kio-5.38.0-kioexec.patch b/kde-frameworks/kio/files/kio-5.38.0-kioexec.patch new file mode 100644 index 000000000000..1cf2a1bfb834 --- /dev/null +++ b/kde-frameworks/kio/files/kio-5.38.0-kioexec.patch @@ -0,0 +1,87 @@ +From c76c1486ec79e8a16329207e9b293eed1244adfb Mon Sep 17 00:00:00 2001 +From: Jonathan Marten +Date: Mon, 25 Sep 2017 08:56:04 +0100 +Subject: kioexec: Watch the file when it has finished copying + +To eliminate a spurious "The file has changed, do you want to upload +it?" dialogue. + +BUG:384500 + +Differential Revision: https://phabricator.kde.org/D7841 +--- + src/kioexec/main.cpp | 49 +++++++++++++++++++++++++++---------------------- + 1 file changed, 27 insertions(+), 22 deletions(-) + +diff --git a/src/kioexec/main.cpp b/src/kioexec/main.cpp +index 6b0ec1d..615dfbf 100644 +--- a/src/kioexec/main.cpp ++++ b/src/kioexec/main.cpp +@@ -118,11 +118,6 @@ KIOExec::KIOExec(const QStringList &args, bool tempFiles, const QString &suggest + KIO::Job *job = KIO::file_copy(url, dest); + jobList.append(job); + +- // Tell kioexecd to watch the file for changes. +- OrgKdeKIOExecdInterface kioexecd(QStringLiteral("org.kde.kioexecd"), QStringLiteral("/modules/kioexecd"), QDBusConnection::sessionBus()); +- kioexecd.watch(file.path, file.url.toString()); +- mUseDaemon = !kioexecd.lastError().isValid(); +- + connect(job, &KJob::result, this, &KIOExec::slotResult); + } + } +@@ -141,25 +136,35 @@ KIOExec::KIOExec(const QStringList &args, bool tempFiles, const QString &suggest + + void KIOExec::slotResult(KJob *job) + { +- if (job && job->error()) { +- // That error dialog would be queued, i.e. not immediate... +- //job->showErrorDialog(); +- if ((job->error() != KIO::ERR_USER_CANCELED)) +- KMessageBox::error(nullptr, job->errorString()); +- +- QString path = static_cast(job)->destUrl().path(); +- +- QList::Iterator it = fileList.begin(); +- for (; it != fileList.end(); ++it) { +- if (it->path == path) { +- break; ++ if (job) { ++ KIO::FileCopyJob *copyJob = static_cast(job); ++ const QString path = copyJob->destUrl().path(); ++ ++ if (job->error()) { ++ // That error dialog would be queued, i.e. not immediate... ++ //job->showErrorDialog(); ++ if ((job->error() != KIO::ERR_USER_CANCELED)) ++ KMessageBox::error(nullptr, job->errorString()); ++ ++ auto it = std::find_if(fileList.begin(), fileList.end(), ++ [&path](const FileInfo &i) { return (i.path == path); }); ++ if (it != fileList.end()) { ++ fileList.erase(it); ++ } else { ++ qDebug() << path << " not found in list"; + } + } +- +- if (it != fileList.end()) { +- fileList.erase(it); +- } else { +- qDebug() << path << " not found in list"; ++ else ++ { ++ // Tell kioexecd to watch the file for changes. ++ const QString dest = copyJob->srcUrl().toString(); ++ qDebug() << "Telling kioexecd to watch path" << path << "dest" << dest; ++ OrgKdeKIOExecdInterface kioexecd(QStringLiteral("org.kde.kioexecd"), QStringLiteral("/modules/kioexecd"), QDBusConnection::sessionBus()); ++ kioexecd.watch(path, dest); ++ mUseDaemon = !kioexecd.lastError().isValid(); ++ if (!mUseDaemon) { ++ qDebug() << "Not using kioexecd"; ++ } + } + } + +-- +cgit v0.11.2 + -- cgit v1.2.3