Hello community, here is the log from the commit of package kcoreaddons for openSUSE:Factory checked in at 2016-07-15 12:32:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kcoreaddons (Old) and /work/SRC/openSUSE:Factory/.kcoreaddons.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kcoreaddons" Changes: -------- --- /work/SRC/openSUSE:Factory/kcoreaddons/kcoreaddons.changes 2016-07-03 12:20:39.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kcoreaddons.new/kcoreaddons.changes 2016-07-15 12:32:36.000000000 +0200 @@ -1,0 +2,7 @@ +Wed Jul 6 15:02:34 UTC 2016 - [email protected] + +- Update to 5.24.0 + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.24.0.php + +------------------------------------------------------------------- Old: ---- kcoreaddons-5.23.0.tar.xz New: ---- kcoreaddons-5.24.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kcoreaddons.spec ++++++ --- /var/tmp/diff_new_pack.Xu1eUr/_old 2016-07-15 12:32:37.000000000 +0200 +++ /var/tmp/diff_new_pack.Xu1eUr/_new 2016-07-15 12:32:37.000000000 +0200 @@ -18,9 +18,9 @@ %bcond_without lang %define lname libKF5CoreAddons5 -%define _tar_path 5.23 +%define _tar_path 5.24 Name: kcoreaddons -Version: 5.23.0 +Version: 5.24.0 Release: 0 BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules >= %{_tar_path} ++++++ kcoreaddons-5.23.0.tar.xz -> kcoreaddons-5.24.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/CMakeLists.txt new/kcoreaddons-5.24.0/CMakeLists.txt --- old/kcoreaddons-5.23.0/CMakeLists.txt 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/CMakeLists.txt 2016-07-03 02:03:33.000000000 +0200 @@ -3,7 +3,7 @@ project(KCoreAddons) include(FeatureSummary) -find_package(ECM 5.23.0 NO_MODULE) +find_package(ECM 5.24.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -15,6 +15,7 @@ include(ECMPackageConfigHelpers) include(ECMSetupVersion) include(ECMGenerateHeaders) +include(ECMQtDeclareLoggingCategory) include(KDEInstallDirs) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) @@ -45,7 +46,7 @@ include(ECMPoQmTools) -set(KF5_VERSION "5.23.0") # handled by release scripts +set(KF5_VERSION "5.24.0") # handled by release scripts ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KCOREADDONS VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_version.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/autotests/kdirwatch_unittest.cpp new/kcoreaddons-5.24.0/autotests/kdirwatch_unittest.cpp --- old/kcoreaddons-5.23.0/autotests/kdirwatch_unittest.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/autotests/kdirwatch_unittest.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -512,20 +512,24 @@ //QCOMPARE(KDE::stat(QFile::encodeName(file1), &stat_buf), 0); //qDebug() << "initial inode" << stat_buf.st_ino; - QFile::remove(file1); - // And recreate immediately, to try and fool KDirWatch with unchanged ctime/mtime ;) - // (This emulates the /etc/localtime case) - createFile(file1); + // Make sure this even works multiple times, as needed for ksycoca + for (int i = 0; i < 5; ++i) { - //QCOMPARE(KDE::stat(QFile::encodeName(file1), &stat_buf), 0); - //qDebug() << "new inode" << stat_buf.st_ino; // same! + QFile::remove(file1); + // And recreate immediately, to try and fool KDirWatch with unchanged ctime/mtime ;) + // (This emulates the /etc/localtime case) + createFile(file1); + + //QCOMPARE(KDE::stat(QFile::encodeName(file1), &stat_buf), 0); + //qDebug() << "new inode" << stat_buf.st_ino; // same! - { - QSignalSpy spyDirty(&watch, SIGNAL(dirty(QString))); - if(!waitForRecreationSignal(watch, file1)) { - // We may get a dirty signal here instead of a deleted/created set. - if (spyDirty.isEmpty() || !verifySignalPath(spyDirty, SIGNAL(dirty(QString)), file1)) { - QFAIL("Failed to detect file deletion and recreation through either a deleted/created signal pair or through a dirty signal!"); + { + QSignalSpy spyDirty(&watch, SIGNAL(dirty(QString))); + if(!waitForRecreationSignal(watch, file1)) { + // We may get a dirty signal here instead of a deleted/created set. + if (spyDirty.isEmpty() || !verifySignalPath(spyDirty, SIGNAL(dirty(QString)), file1)) { + QFAIL("Failed to detect file deletion and recreation through either a deleted/created signal pair or through a dirty signal!"); + } } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/autotests/kjobtest.cpp new/kcoreaddons-5.24.0/autotests/kjobtest.cpp --- old/kcoreaddons-5.23.0/autotests/kjobtest.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/autotests/kjobtest.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -45,8 +45,7 @@ { TestJob *job = new TestJob; - connect(job, SIGNAL(result(KJob*)), - this, SLOT(slotResult(KJob*))); + connect(job, &KJob::result, this, &KJobTest::slotResult); QFETCH(int, errorCode); QFETCH(QString, errorText); @@ -191,10 +190,15 @@ job->setError(errorCode); job->setErrorText(errorText); + int resultEmitted = 0; + // Prove to Kai Uwe that one can connect a job to a lambdas, despite the "private" signal + connect(job, &KJob::result, this, [&resultEmitted](KJob *) { ++resultEmitted; }); + QSignalSpy destroyed_spy(job, SIGNAL(destroyed(QObject*))); bool status = job->exec(); + QCOMPARE(resultEmitted, 1); QCOMPARE(status, (errorCode == KJob::NoError)); QCOMPARE(job->error(), errorCode); QCOMPARE(job->errorText(), errorText); @@ -231,10 +235,8 @@ { TestJob *job = new TestJob; - connect(job, SIGNAL(result(KJob*)), - this, SLOT(slotResult(KJob*))); - connect(job, SIGNAL(finished(KJob*)), - this, SLOT(slotFinished(KJob*))); + connect(job, &KJob::result, this, &KJobTest::slotResult); + connect(job, &KJob::finished, this, &KJobTest::slotFinished); m_lastError = KJob::NoError; m_lastErrorText.clear(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/metainfo.yaml new/kcoreaddons-5.24.0/metainfo.yaml --- old/kcoreaddons-5.23.0/metainfo.yaml 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/metainfo.yaml 2016-07-03 02:03:33.000000000 +0200 @@ -3,7 +3,10 @@ tier: 1 type: functional platforms: - - name: All + - name: Linux + - name: Windows + - name: MacOSX + - name: Android portingAid: false deprecated: false release: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/po/it/kcoreaddons5_qt.po new/kcoreaddons-5.24.0/po/it/kcoreaddons5_qt.po --- old/kcoreaddons-5.23.0/po/it/kcoreaddons5_qt.po 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/po/it/kcoreaddons5_qt.po 2016-07-03 02:03:33.000000000 +0200 @@ -23,7 +23,7 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 2.0\n" "X-Qt-Contexts: true\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/po/zh_TW/kcoreaddons5_qt.po new/kcoreaddons-5.24.0/po/zh_TW/kcoreaddons5_qt.po --- old/kcoreaddons-5.23.0/po/zh_TW/kcoreaddons5_qt.po 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/po/zh_TW/kcoreaddons5_qt.po 2016-07-03 02:03:33.000000000 +0200 @@ -11,19 +11,20 @@ # Frank Weng (a.k.a. Franklin) <franklin at goodhorse dot idv dot tw>, 2006-2009, 2010. # Franklin Weng <[email protected]>, 2010, 2011, 2012. # Franklin Weng <[email protected]>, 2010, 2011, 2012, 2013, 2014, 2015. +# Jeff Huang <[email protected]>, 2016. msgid "" msgstr "" "Project-Id-Version: kdelibs4\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-03-23 01:50+0000\n" -"PO-Revision-Date: 2015-02-15 20:37+0800\n" -"Last-Translator: Franklin Weng <[email protected]>\n" -"Language-Team: Chinese Traditional <[email protected]>\n" +"PO-Revision-Date: 2016-06-28 17:45+0800\n" +"Last-Translator: Jeff Huang <[email protected]>\n" +"Language-Team: Chinese <[email protected]>\n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.5\n" +"X-Generator: Lokalize 2.0\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Qt-Contexts: true\n" @@ -35,7 +36,8 @@ "licensing terms.\n" msgstr "" "這個程式沒有指定授權條款。\n" -"請檢查文件或原始碼來檢查是否有授權條款。\n" +"請檢查文件或原始碼來檢查是否有任何\n" +"授權條款。\n" #: lib/kaboutdata.cpp:258 #, qt-format @@ -161,14 +163,12 @@ #: lib/kaboutdata.cpp:1045 msgctxt "KAboutData CLI|" msgid "The base file name of the desktop entry for this application." -msgstr "" +msgstr "這個應用程式的桌面項目基礎檔案名稱。" #: lib/kaboutdata.cpp:1046 -#, fuzzy -#| msgid "Filename Error" msgctxt "KAboutData CLI|" msgid "file name" -msgstr "檔案名稱錯誤" +msgstr "檔案名稱" #: lib/kaboutdata.cpp:1055 msgctxt "KAboutData CLI|" @@ -176,12 +176,10 @@ msgstr "這個應用程式是由某個不願透露姓名的人編寫。" #: lib/kaboutdata.cpp:1057 -#, fuzzy, qt-format -#| msgctxt "KAboutData CLI|" -#| msgid "%s was written by:\n" +#, qt-format msgctxt "KAboutData CLI|" msgid "%1 was written by:" -msgstr "%s 的作者是:\n" +msgstr "%1 的作者是:" #: lib/kaboutdata.cpp:1068 msgctxt "KAboutData CLI|" @@ -189,12 +187,10 @@ msgstr "請使用 http://bugs.kde.org 報告問題。" #: lib/kaboutdata.cpp:1070 -#, fuzzy, qt-format -#| msgctxt "KAboutData CLI|" -#| msgid "Please report bugs to %s.\n" +#, qt-format msgctxt "KAboutData CLI|" msgid "Please report bugs to %1." -msgstr "請回報問題到 %s。\n" +msgstr "請報告問題到 %1。" #: lib/plugin/kpluginloader.cpp:122 #, qt-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/CMakeLists.txt new/kcoreaddons-5.24.0/src/lib/CMakeLists.txt --- old/kcoreaddons-5.23.0/src/lib/CMakeLists.txt 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/CMakeLists.txt 2016-07-03 02:03:33.000000000 +0200 @@ -96,6 +96,11 @@ ${CMAKE_CURRENT_SOURCE_DIR}/util/ ) +ecm_qt_declare_logging_category(libkcoreaddons_SRCS + HEADER kcoreaddons_debug.h + IDENTIFIER KCOREADDONS_DEBUG + CATEGORY_NAME org.kde.kcoreaddons) + add_library(KF5CoreAddons ${libkcoreaddons_SRCS}) generate_export_header(KF5CoreAddons BASE_NAME KCoreAddons) add_library(KF5::CoreAddons ALIAS KF5CoreAddons) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/caching/kshareddatacache.cpp new/kcoreaddons-5.24.0/src/lib/caching/kshareddatacache.cpp --- old/kcoreaddons-5.23.0/src/lib/caching/kshareddatacache.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/caching/kshareddatacache.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -23,6 +23,7 @@ #include "kshareddatacache.h" #include "kshareddatacache_p.h" // Various auxiliary support code +#include "kcoreaddons_debug.h" #include "qstandardpaths.h" #include <qplatformdefs.h> @@ -443,7 +444,7 @@ } if (!isProcessShared) { - qWarning() << "Cache initialized, but does not support being" + qCWarning(KCOREADDONS_DEBUG) << "Cache initialized, but does not support being" << "shared across processes."; } @@ -650,7 +651,7 @@ return; // That was easy } - qDebug() << "Defragmenting the shared cache"; + qCDebug(KCOREADDONS_DEBUG) << "Defragmenting the shared cache"; // Just do a linear scan, and anytime there is free space, swap it // with the pages to its right. In order to meet the precondition @@ -811,7 +812,7 @@ // eviction order set for the cache until there is enough room // available to hold the number of pages we need. - qDebug() << "Removing old entries to free up" << numberNeeded << "pages," + qCDebug(KCOREADDONS_DEBUG) << "Removing old entries to free up" << numberNeeded << "pages," << cacheAvail << "are already theoretically available."; if (cacheAvail > 3 * numberNeeded) { @@ -893,7 +894,7 @@ throw KSDCCorrupted(); } - qDebug() << "Removing entry of" << indexTable()[curIndex].totalItemSize + qCDebug(KCOREADDONS_DEBUG) << "Removing entry of" << indexTable()[curIndex].totalItemSize << "size"; removeEntry(curIndex); } @@ -1066,7 +1067,7 @@ // disambiguate against an uninitialized cache. if (mapped->version != SharedMemory::PIXMAP_CACHE_VERSION && mapped->version > 0) { - qWarning() << "Deleting wrong version of cache" << cacheName; + qCWarning(KCOREADDONS_DEBUG) << "Deleting wrong version of cache" << cacheName; // CAUTION: Potentially recursive since the recovery // involves calling this function again. @@ -1103,7 +1104,7 @@ // shared memory. If we don't get shared memory the disk info is ignored, // if we do get shared memory we never look at disk again. if (mapAddress == MAP_FAILED) { - qWarning() << "Failed to establish shared memory mapping, will fallback" + qCWarning(KCOREADDONS_DEBUG) << "Failed to establish shared memory mapping, will fallback" << "to private memory -- memory usage will increase"; mapAddress = QT_MMAP(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); @@ -1240,7 +1241,7 @@ d->recoverCorruptedCache(); if (!d->shm) { - qWarning() << "Lost the connection to shared memory for cache" + qCWarning(KCOREADDONS_DEBUG) << "Lost the connection to shared memory for cache" << d->m_cacheName; return false; } @@ -1326,7 +1327,7 @@ // Update page table first pageID firstPage = entriesIndex[index].firstPage; if (firstPage < 0 || static_cast<quint32>(firstPage) >= pageTableSize()) { - qDebug() << "Trying to remove an entry which is already invalid. This " + qCDebug(KCOREADDONS_DEBUG) << "Trying to remove an entry which is already invalid. This " << "cache is likely corrupt."; throw KSDCCorrupted(); } @@ -1475,7 +1476,7 @@ if (cullCollisions && (::time(0) - indices[position].lastUsedTime) > 60) { indices[position].useCount >>= 1; if (indices[position].useCount == 0) { - qDebug() << "Overwriting existing old cached entry due to collision."; + qCDebug(KCOREADDONS_DEBUG) << "Overwriting existing old cached entry due to collision."; d->shm->removeEntry(position); // Remove it first break; } @@ -1487,7 +1488,7 @@ } if (indices[position].useCount > 0 && indices[position].firstPage >= 0) { - //qDebug() << "Overwriting existing cached entry due to collision."; + //qCDebug(KCOREADDONS_DEBUG) << "Overwriting existing cached entry due to collision."; d->shm->removeEntry(position); // Remove it first } @@ -1500,7 +1501,7 @@ uint firstPage(-1); if (pagesNeeded >= d->shm->pageTableSize()) { - qWarning() << key << "is too large to be cached."; + qCWarning(KCOREADDONS_DEBUG) << key << "is too large to be cached."; return false; } @@ -1649,7 +1650,7 @@ // Note that it is important to simply unlink the file, and not truncate it // smaller first to avoid SIGBUS errors and similar with shared memory // attached to the underlying inode. - qDebug() << "Removing cache at" << cachePath; + qCDebug(KCOREADDONS_DEBUG) << "Removing cache at" << cachePath; QFile::remove(cachePath); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/caching/kshareddatacache_p.h new/kcoreaddons-5.24.0/src/lib/caching/kshareddatacache_p.h --- old/kcoreaddons-5.23.0/src/lib/caching/kshareddatacache_p.h 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/caching/kshareddatacache_p.h 2016-07-03 02:03:33.000000000 +0200 @@ -26,6 +26,8 @@ #include <QtCore/QSharedPointer> #include <qbasicatomic.h> +#include "kcoreaddons_debug.h" + #include <unistd.h> // Check for sched_yield #include <sched.h> // sched_yield #include <errno.h> @@ -476,7 +478,7 @@ #ifdef __GNUC__ #warning "This system does not seem to support posix_fallocate, which is needed to ensure KSharedDataCache's underlying files are fully committed to disk to avoid crashes with low disk space." #endif - qWarning() << "This system misses support for posix_fallocate()" + qCWarning(KCOREADDONS_DEBUG) << "This system misses support for posix_fallocate()" " -- ensure this partition has room for at least" << fileSize << "bytes."; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/io/kautosavefile.cpp new/kcoreaddons-5.24.0/src/lib/io/kautosavefile.cpp --- old/kcoreaddons-5.23.0/src/lib/io/kautosavefile.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/io/kautosavefile.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -30,6 +30,7 @@ #include <QtCore/QLockFile> #include <QtCore/QStandardPaths> #include "krandom.h" +#include "kcoreaddons_debug.h" class KAutoSaveFilePrivate { @@ -54,7 +55,7 @@ Q_FOREACH (const QString &dir, dirs) { QDir appDir(dir + QStringLiteral("/stalefiles/") + appName); - //qDebug() << "Looking in" << appDir.absolutePath(); + //qCDebug(KCOREADDONS_DEBUG) << "Looking in" << appDir.absolutePath(); Q_FOREACH (const QString &file, appDir.entryList(QDir::Files)) { files << (appDir.absolutePath() + QLatin1Char('/') + file); } @@ -160,7 +161,7 @@ if (d->lock->isLocked() || d->lock->tryLock()) { return true; } else { - qWarning()<<"Could not lock file:"<<tempFile; + qCWarning(KCOREADDONS_DEBUG)<<"Could not lock file:"<<tempFile; close(); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/io/kbackup.cpp new/kcoreaddons-5.24.0/src/lib/io/kbackup.cpp --- old/kcoreaddons-5.23.0/src/lib/io/kbackup.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/io/kbackup.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -66,7 +66,7 @@ backupFileName = backupDir + QLatin1Char('/') + fileInfo.fileName() + backupExtension; } -// qDebug() << "KBackup copying " << qFilename << " to " << backupFileName; +// qCDebug(KCOREADDONS_DEBUG) << "KBackup copying " << qFilename << " to " << backupFileName; QFile::remove(backupFileName); return QFile::copy(qFilename, backupFileName); } @@ -194,13 +194,13 @@ QString to = sTemplate.arg(maxBackupFound + 1); for (int i = maxBackupFound; i > 0; i--) { QString from = sTemplate.arg(i); -// qDebug() << "KBackup renaming " << from << " to " << to; +// qCDebug(KCOREADDONS_DEBUG) << "KBackup renaming " << from << " to " << to; QFile::rename(from, to); to = from; } // Finally create most recent backup by copying the file to backup number 1. -// qDebug() << "KBackup copying " << qFilename << " to " << sTemplate.arg(1); +// qCDebug(KCOREADDONS_DEBUG) << "KBackup copying " << qFilename << " to " << sTemplate.arg(1); return QFile::copy(qFilename, sTemplate.arg(1)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/io/kdirwatch.cpp new/kcoreaddons-5.24.0/src/lib/io/kdirwatch.cpp --- old/kcoreaddons-5.23.0/src/lib/io/kdirwatch.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/io/kdirwatch.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -43,6 +43,7 @@ #include "kdirwatch.h" #include "kdirwatch_p.h" #include "kfilesystemtype.h" +#include "kcoreaddons_debug.h" #include <io/config-kdirwatch.h> @@ -820,22 +821,6 @@ qCDebug(KDIRWATCH) << "Added already watched Entry" << path << "(for" << sub_entry->path << ")"; } -#if HAVE_SYS_INOTIFY_H - Entry *e = &(*it); - if ((e->m_mode == INotifyMode) && (e->wd >= 0)) { - int mask = IN_DELETE | IN_DELETE_SELF | IN_CREATE | IN_MOVE | IN_MOVE_SELF | IN_DONT_FOLLOW; - if (!e->isDir) { - mask |= IN_MODIFY | IN_ATTRIB; - } else { - mask |= IN_ONLYDIR; - } - - inotify_rm_watch(m_inotify_fd, e->wd); - e->wd = inotify_add_watch(m_inotify_fd, QFile::encodeName(e->path).data(), - mask); - //Q_ASSERT(e->wd >= 0); // fails in KDirListerTest::testDeleteCurrentDir - } -#endif } else { (*it).addClient(instance, watchModes); if (s_verboseDebug) { @@ -871,13 +856,13 @@ #endif if (e->isDir && !isDir) { - qWarning() << "KDirWatch:" << path << "is a directory. Use addDir!"; + qCWarning(KCOREADDONS_DEBUG) << "KDirWatch:" << path << "is a directory. Use addDir!"; } else if (!e->isDir && isDir) { qWarning("KDirWatch: %s is a file. Use addFile!", qPrintable(path)); } if (!e->isDir && (watchModes != KDirWatch::WatchDirOnly)) { - qWarning() << "KDirWatch:" << path << "is a file. You can't use recursive or " + qCWarning(KCOREADDONS_DEBUG) << "KDirWatch:" << path << "is a file. You can't use recursive or " "watchFiles options"; watchModes = KDirWatch::WatchDirOnly; } @@ -1610,7 +1595,7 @@ while (use_fam && FAMPending(&fc)) { if (FAMNextEvent(&fc, &fe) == -1) { - qWarning() << "FAM connection problem, switching to polling."; + qCWarning(KCOREADDONS_DEBUG) << "FAM connection problem, switching to polling."; use_fam = false; delete sn; sn = 0; @@ -1753,7 +1738,7 @@ #else void KDirWatchPrivate::famEventReceived() { - qWarning() << "Fam event received but FAM is not supported"; + qCWarning(KCOREADDONS_DEBUG) << "Fam event received but FAM is not supported"; } #endif @@ -1850,7 +1835,7 @@ void KDirWatchPrivate::fswEventReceived(const QString &path) { Q_UNUSED(path); - qWarning() << "QFileSystemWatcher event received but QFileSystemWatcher is not supported"; + qCWarning(KCOREADDONS_DEBUG) << "QFileSystemWatcher event received but QFileSystemWatcher is not supported"; } #endif // HAVE_QFILESYSTEMWATCHER @@ -1929,7 +1914,7 @@ { if (d) { if (!d->removeEntry(this, _path, 0)) { - qWarning() << "doesn't know" << _path; + qCWarning(KCOREADDONS_DEBUG) << "doesn't know" << _path; } } } @@ -1938,7 +1923,7 @@ { if (d) { if (!d->removeEntry(this, _path, 0)) { - qWarning() << "doesn't know" << _path; + qCWarning(KCOREADDONS_DEBUG) << "doesn't know" << _path; } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/io/kfilesystemtype.cpp new/kcoreaddons-5.24.0/src/lib/io/kfilesystemtype.cpp --- old/kcoreaddons-5.23.0/src/lib/io/kfilesystemtype.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/io/kfilesystemtype.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -19,7 +19,7 @@ #include "kfilesystemtype.h" #include <QFile> -#include <QDebug> +#include "kcoreaddons_debug.h" //#include <errno.h> #ifndef Q_OS_WIN @@ -96,7 +96,7 @@ { struct statfs buf; if (statfs(path.constData(), &buf) != 0) { - //qDebug() << path << errno << strerror(errno); + //qCDebug(KCOREADDONS_DEBUG) << path << errno << strerror(errno); return KFileSystemType::Unknown; } switch (static_cast<unsigned long>(buf.f_type)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/plugin/kpluginfactory.cpp new/kcoreaddons-5.24.0/src/lib/plugin/kpluginfactory.cpp --- old/kcoreaddons-5.23.0/src/lib/plugin/kpluginfactory.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/plugin/kpluginfactory.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -23,7 +23,7 @@ #include "kpluginfactory_p.h" #include <QObjectCleanupHandler> -#include <QDebug> +#include "kcoreaddons_debug.h" Q_GLOBAL_STATIC(QObjectCleanupHandler, factorycleanup) @@ -58,7 +58,7 @@ // we allow different interfaces to be registered without keyword if (!keyword.isEmpty()) { if (d->createInstanceHash.contains(keyword)) { - qWarning() << "A plugin with the keyword" << keyword << "was already registered. A keyword must be unique!"; + qCWarning(KCOREADDONS_DEBUG) << "A plugin with the keyword" << keyword << "was already registered. A keyword must be unique!"; } d->createInstanceHash.insert(keyword, KPluginFactoryPrivate::Plugin(metaObject, instanceFunction)); } else { @@ -69,7 +69,7 @@ for (const QMetaObject *otherSuper = plugin.first->superClass(); otherSuper; otherSuper = otherSuper->superClass()) { if (superClass == otherSuper) { - qWarning() << "Two plugins with the same interface(" << superClass->className() << ") were registered. Use keywords to identify the plugins."; + qCWarning(KCOREADDONS_DEBUG) << "Two plugins with the same interface(" << superClass->className() << ") were registered. Use keywords to identify the plugins."; } } } @@ -80,7 +80,7 @@ for (const QMetaObject *otherSuper = metaObject->superClass(); otherSuper; otherSuper = otherSuper->superClass()) { if (superClass == otherSuper) { - qWarning() << "Two plugins with the same interface(" << superClass->className() << ") were registered. Use keywords to identify the plugins."; + qCWarning(KCOREADDONS_DEBUG) << "Two plugins with the same interface(" << superClass->className() << ") were registered. Use keywords to identify the plugins."; } } } @@ -140,7 +140,7 @@ for (const QMetaObject *current = plugin.first; current; current = current->superClass()) { if (0 == qstrcmp(iface, current->className())) { if (obj) { - qWarning() << "ambiguous interface requested from a DSO containing more than one plugin"; + qCWarning(KCOREADDONS_DEBUG) << "ambiguous interface requested from a DSO containing more than one plugin"; } obj = plugin.second(parentWidget, parent, args); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/plugin/kpluginloader.cpp new/kcoreaddons-5.24.0/src/lib/plugin/kpluginloader.cpp --- old/kcoreaddons-5.23.0/src/lib/plugin/kpluginloader.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/plugin/kpluginloader.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -25,7 +25,7 @@ #include <QtCore/QDir> #include <QDirIterator> #include <QtCore/QFileInfo> -#include <QDebug> +#include "kcoreaddons_debug.h" #include <QCoreApplication> #include <QMutex> @@ -90,7 +90,7 @@ if (pluginName.isValid()) { d->loader->setFileName(pluginName.name()); if (d->loader->fileName().isEmpty()) { - qWarning() << "Error loading plugin" << pluginName.name() << d->loader->errorString() << endl + qCWarning(KCOREADDONS_DEBUG) << "Error loading plugin" << pluginName.name() << d->loader->errorString() << endl << "Plugin search paths are" << QCoreApplication::libraryPaths() << endl << "The environment variable QT_PLUGIN_PATH might be not correctly set"; } @@ -117,7 +117,7 @@ KPluginFactory *factory = qobject_cast<KPluginFactory *>(obj); if (factory == 0) { - qDebug() << "Expected a KPluginFactory, got a" << obj->metaObject()->className(); + qCDebug(KCOREADDONS_DEBUG) << "Expected a KPluginFactory, got a" << obj->metaObject()->className(); delete obj; d->errorString = tr("The library %1 does not offer a KPluginFactory.").arg(d->name); } @@ -294,7 +294,7 @@ loader.setFileName(metadata.fileName()); QObject* obj = loader.instance(); if (!obj) { - qWarning().nospace() << "Could not instantiate plugin \"" << metadata.fileName() << "\": " + qCWarning(KCOREADDONS_DEBUG).nospace() << "Could not instantiate plugin \"" << metadata.fileName() << "\": " << loader.errorString(); continue; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/plugin/kpluginmetadata.cpp new/kcoreaddons-5.24.0/src/lib/plugin/kpluginmetadata.cpp --- old/kcoreaddons-5.23.0/src/lib/plugin/kpluginmetadata.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/plugin/kpluginmetadata.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -26,7 +26,7 @@ #include <QLocale> #include <QPluginLoader> #include <QStringList> -#include <QDebug> +#include "kcoreaddons_debug.h" #include "kpluginloader.h" #include "kaboutdata.h" @@ -67,7 +67,7 @@ QFile f(file); bool b = f.open(QIODevice::ReadOnly); if (!b) { - qWarning() << "Couldn't open" << file; + qCWarning(KCOREADDONS_DEBUG) << "Couldn't open" << file; return; } m_metaData = QJsonDocument::fromJson(f.readAll()).object(); @@ -175,7 +175,7 @@ } else { QString asString = value.isString() ? value.toString() : value.toVariant().toString(); const QString id = obj.value(QStringLiteral("KPlugin")).toObject().value(QStringLiteral("Id")).toString(); - qWarning() << "Expected JSON property" << key << "to be a string list." + qCWarning(KCOREADDONS_DEBUG) << "Expected JSON property" << key << "to be a string list." " Treating it as a list with a single entry:" << asString << id.toLatin1().constData(); return QStringList(asString); } @@ -209,7 +209,7 @@ static inline void addPersonFromJson(const QJsonObject &obj, QList<KAboutPerson>* out) { KAboutPerson person = KAboutPerson::fromJSON(obj); if (person.name().isEmpty()) { - qWarning() << "Invalid plugin metadata: Attempting to create a KAboutPerson from json without 'Name' property:" << obj; + qCWarning(KCOREADDONS_DEBUG) << "Invalid plugin metadata: Attempting to create a KAboutPerson from json without 'Name' property:" << obj; return; } out->append(person); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/text/ktexttohtml.cpp new/kcoreaddons-5.24.0/src/lib/text/ktexttohtml.cpp --- old/kcoreaddons-5.23.0/src/lib/text/ktexttohtml.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/text/ktexttohtml.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -32,7 +32,7 @@ #include <limits.h> -#include <QDebug> +#include "kcoreaddons_debug.h" static KTextToHTMLEmoticonsInterface *s_emoticonsInterface = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/util/kdelibs4migration.cpp new/kcoreaddons-5.24.0/src/lib/util/kdelibs4migration.cpp --- old/kcoreaddons-5.23.0/src/lib/util/kdelibs4migration.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/util/kdelibs4migration.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -22,7 +22,7 @@ #include "kdelibs4migration.h" #include "config-kde4home.h" #include <QDir> -#include <QDebug> +#include "kcoreaddons_debug.h" #include <QVector> #ifdef Q_OS_WIN @@ -39,7 +39,7 @@ : d(new Kdelibs4MigrationPrivate) { if (qEnvironmentVariableIsSet("KDEHOME")) { - //qDebug() << "Using KDEHOME as the location of the old config file"; + //qCDebug(KCOREADDONS_DEBUG) << "Using KDEHOME as the location of the old config file"; d->m_kdeHome = QString::fromLocal8Bit(qgetenv("KDEHOME")); } else { QDir homeDir = QDir::home(); @@ -54,7 +54,7 @@ #endif Q_FOREACH (const QString &testSubdir, testSubdirs) { if (homeDir.exists(testSubdir)) { - //qDebug() << "Using" << testSubdir << "as the location of the old config file"; + //qCDebug(KCOREADDONS_DEBUG) << "Using" << testSubdir << "as the location of the old config file"; d->m_kdeHome = homeDir.filePath(testSubdir); break; } @@ -128,7 +128,7 @@ return dir; } } - qWarning() << "No such resource" << type; + qCWarning(KCOREADDONS_DEBUG) << "No such resource" << type; return QString(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/util/kshell_unix.cpp new/kcoreaddons-5.24.0/src/lib/util/kshell_unix.cpp --- old/kcoreaddons-5.23.0/src/lib/util/kshell_unix.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/util/kshell_unix.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -152,7 +152,7 @@ } c = args.unicode()[pos++]; } while (c != QLatin1Char('\'')); - cret += args.mid(spos, pos - spos - 1); + cret += args.midRef(spos, pos - spos - 1); } else if (c == QLatin1Char('"')) { for (;;) { if (pos >= args.length()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.23.0/src/lib/util/kuser_win.cpp new/kcoreaddons-5.24.0/src/lib/util/kuser_win.cpp --- old/kcoreaddons-5.23.0/src/lib/util/kuser_win.cpp 2016-06-06 13:29:26.000000000 +0200 +++ new/kcoreaddons-5.24.0/src/lib/util/kuser_win.cpp 2016-07-03 02:03:33.000000000 +0200 @@ -21,7 +21,7 @@ #include "kuser.h" -#include <QDebug> +#include "kcoreaddons_debug.h" #include <QDir> #include <QStandardPaths> @@ -156,7 +156,7 @@ NET_API_STATUS ret = NetUserGetGroups(nullptr, nameStr, level, buffer, MAX_PREFERRED_LENGTH, count, total); // if we return ERROR_MORE_DATA here it will result in an enless loop if (ret == ERROR_MORE_DATA) { - qWarning() << "NetUserGetGroups for user" << name << "returned ERROR_MORE_DATA. This should not happen!"; + qCWarning(KCOREADDONS_DEBUG) << "NetUserGetGroups for user" << name << "returned ERROR_MORE_DATA. This should not happen!"; ret = NERR_Success; } return ret; @@ -226,13 +226,13 @@ WCHAR domainBuffer[UNLEN + 1]; SID_NAME_USE use; if (!LookupAccountSidW(nullptr, uid.nativeId(), nameBuffer, &nameBufferLen, domainBuffer, &domainBufferLen, &use)) { - qWarning() << "Could not lookup user " << uid.toString() << "error =" << GetLastError(); + qCWarning(KCOREADDONS_DEBUG) << "Could not lookup user " << uid.toString() << "error =" << GetLastError(); return sharedNull; } QString loginName = QString::fromWCharArray(nameBuffer); QString domainName = QString::fromWCharArray(domainBuffer); if (use != SidTypeUser && use != SidTypeDeletedAccount) { - qWarning().nospace() + qCWarning(KCOREADDONS_DEBUG).nospace() << "SID for " << domainName << "\\" << loginName << " (" << uid.toString() << ") is not of type user (" << SidTypeUser << " or " << SidTypeDeletedAccount << "). Got type " << use << " instead."; @@ -273,7 +273,7 @@ homeDir = QString::fromWCharArray(userInfo11->usri11_home_dir); isAdmin = userInfo11->usri11_priv == USER_PRIV_ADMIN; } else { - qWarning().nospace() << "Could not get information for user " << domainName << "\\" << loginName + qCWarning(KCOREADDONS_DEBUG).nospace() << "Could not get information for user " << domainName << "\\" << loginName << ": error code = " << status; return sharedNull; } @@ -501,7 +501,7 @@ // must always be freed, even on error ScopedNetApiBuffer<GROUP_INFO_0> groupInfo((GROUP_INFO_0 *)groupInfoTmp); if (status != NERR_Success) { - qWarning() << "Failed to find group with name" << name << "error =" << status; + qCWarning(KCOREADDONS_DEBUG) << "Failed to find group with name" << name << "error =" << status; groupInfo.reset(); } if (!id.isValid()) { @@ -537,7 +537,7 @@ if (eUse == SidTypeGroup || eUse == SidTypeWellKnownGroup) { name = QString::fromWCharArray(buffer); } else { - qWarning() << QString::fromWCharArray(buffer) << "is not a group, SID type is" << eUse; + qCWarning(KCOREADDONS_DEBUG) << QString::fromWCharArray(buffer) << "is not a group, SID type is" << eUse; } } return name; @@ -814,7 +814,7 @@ SID_NAME_USE sidType; bool ok = LookupAccountNameW(nullptr, (LPCWSTR)name.utf16(), buffer, &sidLength, domainBuffer, &domainBufferSize, &sidType); if (!ok) { - qWarning() << "Failed to lookup account" << name << "error code =" << GetLastError(); + qCWarning(KCOREADDONS_DEBUG) << "Failed to lookup account" << name << "error code =" << GetLastError(); return T(); } return callback(buffer, sidType); @@ -825,7 +825,7 @@ return sidFromName<KUserId>(name, [&](PSID sid, SID_NAME_USE sidType) -> KUserId { if (sidType != SidTypeUser && sidType != SidTypeDeletedAccount) { - qWarning().nospace() << "Failed to lookup user name " << name + qCWarning(KCOREADDONS_DEBUG).nospace() << "Failed to lookup user name " << name << ": resulting SID " << sidToString(sid) << " is not a user." " Got SID type " << sidType << " instead."; return KUserId(); @@ -839,7 +839,7 @@ return sidFromName<KGroupId>(name, [&](PSID sid, SID_NAME_USE sidType) -> KGroupId { if (sidType != SidTypeGroup && sidType != SidTypeWellKnownGroup) { - qWarning().nospace() << "Failed to lookup user name " << name + qCWarning(KCOREADDONS_DEBUG).nospace() << "Failed to lookup user name " << name << ": resulting SID " << sidToString(sid) << " is not a group." " Got SID type " << sidType << " instead."; return KGroupId();
