Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package baloo5 for openSUSE:Factory checked in at 2021-04-12 12:34:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/baloo5 (Old) and /work/SRC/openSUSE:Factory/.baloo5.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "baloo5" Mon Apr 12 12:34:06 2021 rev:88 rq:884224 version:5.81.0 Changes: -------- --- /work/SRC/openSUSE:Factory/baloo5/baloo5.changes 2021-03-16 15:39:50.148598491 +0100 +++ /work/SRC/openSUSE:Factory/.baloo5.new.2401/baloo5.changes 2021-04-12 12:34:19.193105603 +0200 @@ -1,0 +2,19 @@ +Mon Apr 5 07:12:02 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 5.81.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.81.0 +- Changes since 5.80.0: + * [SearchStore] Explicitly narrow timestamps for range query + * Add now mandatory args parameter to QProcess::startDetached() + * Port away from deprecated QDateTime(QDate) constructor + * Remove long defunct, xapian based filesearchstoretest + * Remove unused fileinfo.cpp/.h + * [MetadataMover] Update filename terms when moving/renaming file (kde#433116) + * [MetadataMover] Extend renaming test cases + * [MetadataMover] Use categorized logging for all debug statements + * [MetadataMover] Make some temporaries const + * Add trailing commas to enums + +------------------------------------------------------------------- Old: ---- baloo-5.80.0.tar.xz baloo-5.80.0.tar.xz.sig New: ---- baloo-5.81.0.tar.xz baloo-5.81.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ baloo5.spec ++++++ --- /var/tmp/diff_new_pack.RiQcJk/_old 2021-04-12 12:34:19.921106730 +0200 +++ /var/tmp/diff_new_pack.RiQcJk/_new 2021-04-12 12:34:19.925106736 +0200 @@ -16,14 +16,14 @@ # -%define _tar_path 5.80 +%define _tar_path 5.81 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} %bcond_without lang Name: baloo5 -Version: 5.80.0 +Version: 5.81.0 Release: 0 Summary: Framework for searching and managing metadata License: GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-only ++++++ baloo-5.80.0.tar.xz -> baloo-5.81.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/CMakeLists.txt new/baloo-5.81.0/CMakeLists.txt --- old/baloo-5.80.0/CMakeLists.txt 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/CMakeLists.txt 2021-04-04 13:36:07.000000000 +0200 @@ -1,8 +1,8 @@ # set minimum version requirements cmake_minimum_required(VERSION 3.5) set(REQUIRED_QT_VERSION 5.14.0) -set(KF_VERSION "5.80.0") # handled by release scripts -set(KF_DEP_VERSION "5.80.0") # handled by release scripts +set(KF_VERSION "5.81.0") # handled by release scripts +set(KF_DEP_VERSION "5.81.0") # handled by release scripts # set up project project(Baloo VERSION ${KF_VERSION}) @@ -74,7 +74,7 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII) add_definitions(-DQT_NO_FOREACH) add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050e00) -add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054F00) +add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055000) find_package(Inotify) set_package_properties(Inotify PROPERTIES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/autotests/integration/filesearchstoretest.cpp new/baloo-5.81.0/autotests/integration/filesearchstoretest.cpp --- old/baloo-5.80.0/autotests/integration/filesearchstoretest.cpp 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/autotests/integration/filesearchstoretest.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,411 +0,0 @@ -/* - This file is part of the KDE Baloo Project - SPDX-FileCopyrightText: 2013 Vishesh Handa <[email protected]> - - SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL -*/ - -#include "filesearchstoretest.h" -#include "filesearchstore.h" -#include "../../file/database.h" -#include "filemapping.h" -#include "query.h" -#include "term.h" - -#include <QTest> - -#include <xapian.h> -#include <kfilemetadata/properties.h> -#include <kfilemetadata/propertyinfo.h> - - -using namespace Baloo; - -void FileSearchStoreTest::testSimpleSearchString() -{ - QBENCHMARK { - QString url1(QLatin1String("/home/t/a")); - quint64 id1 = insertUrl(url1); - insertText(id1, QLatin1String("This is sample text")); - - QString url2(QLatin1String("/home/t/b")); - quint64 id2 = insertUrl(url2); - insertText(id2, QLatin1String("sample sample more sample text")); - - Query q; - q.addType(QLatin1String("File")); - q.setSearchString(QLatin1String("Sample")); - - int qid = m_store->exec(q); - //QCOMPARE(qid, 1); - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", id2)); - QCOMPARE(m_store->filePath(qid), url2); - - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", id1)); - QCOMPARE(m_store->filePath(qid), url1); - - QVERIFY(!m_store->next(qid)); - QVERIFY(m_store->id(qid).isEmpty()); - QVERIFY(m_store->filePath(qid).isEmpty()); - - m_store->close(qid); - cleanupTestCase(); - init(); - } -} - -void FileSearchStoreTest::testPropertyValueEqual() -{ - QString url1(QLatin1String("/home/t/a")); - quint64 id1 = insertUrl(url1); - insertText(id1, QLatin1String("This is sample text")); - - QString url2(QLatin1String("/home/t/b")); - quint64 id2 = insertUrl(url2); - insertText(id2, QLatin1String("sample sample more sample but not text")); - - Query q; - q.setTerm(Term(QString(), "Sample text", Baloo::Term::Equal)); - q.addType(QLatin1String("File")); - - int qid = m_store->exec(q); - QCOMPARE(qid, 1); - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", id1)); - QCOMPARE(m_store->filePath(qid), url1); - - QVERIFY(!m_store->next(qid)); - QVERIFY(m_store->id(qid).isEmpty()); - QVERIFY(m_store->filePath(qid).isEmpty()); - - m_store->close(qid); -} - -void FileSearchStoreTest::testIncludeDir() -{ - QString url1(QLatin1String("/home/t/a")); - quint64 id1 = insertUrl(url1); - insertText(id1, QLatin1String("This is sample text")); - - QString url2(QLatin1String("/home/t/b")); - quint64 id2 = insertUrl(url2); - insertText(id2, QLatin1String("sample sample more sample text")); - - QString url3(QLatin1String("/home/garden/b")); - quint64 id3 = insertUrl(url3); - insertText(id3, QLatin1String("The grass is green in the garden.")); - - QString url4(QLatin1String("/home/tt/b")); - quint64 id4 = insertUrl(url4); - insertText(id4, QLatin1String("Let's see if this works.")); - - QString url5(QLatin1String("/home/t/c")); - quint64 id5 = insertUrl(url5); - insertText(id5, QLatin1String("sample sample more sample text")); - - Query q; - q.addType(QLatin1String("File")); - q.setIncludeFolder(QStringLiteral("/home/t")); - - int qid = m_store->exec(q); - QCOMPARE(qid, 1); - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", id1)); - QCOMPARE(m_store->filePath(qid), url1); - - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", id2)); - QCOMPARE(m_store->filePath(qid), url2); - - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", id5)); - QCOMPARE(m_store->filePath(qid), url5); - - QVERIFY(!m_store->next(qid)); - QVERIFY(m_store->id(qid).isEmpty()); - QVERIFY(m_store->filePath(qid).isEmpty()); - - m_store->close(qid); -} - -void FileSearchStoreTest::testRatings() -{ - QString url1(QLatin1String("/home/t/a")); - quint64 id1 = insertUrl(url1); - insertRating(id1, 2); - - QString url2(QLatin1String("/home/t/b")); - quint64 id2 = insertUrl(url2); - insertRating(id2, 4); - - QString url3(QLatin1String("/home/garden/b")); - quint64 id3 = insertUrl(url3); - insertRating(id3, 6); - - QString url4(QLatin1String("/home/tt/b")); - quint64 id4 = insertUrl(url4); - insertRating(id4, 10); - - QString url5(QLatin1String("/home/tt/c")); - quint64 id5 = insertUrl(url5); - insertText(id5, QLatin1String("Test text")); - - // - // Less than 5 - // - Query q; - q.addType(QLatin1String("File")); - q.setTerm(Term(QLatin1String("rating"), 5, Term::Less)); - - int qid1 = m_store->exec(q); - QCOMPARE(qid1, 1); - - QVERIFY(m_store->next(qid1)); - QCOMPARE(m_store->id(qid1), serialize("file", id1)); - QVERIFY(m_store->next(qid1)); - QCOMPARE(m_store->id(qid1), serialize("file", id2)); - QVERIFY(!m_store->next(qid1)); - - // - // Greater than 6 - // - q.setTerm(Term(QLatin1String("rating"), 6, Term::Greater)); - - int qid2 = m_store->exec(q); - QCOMPARE(qid2, 2); - - QVERIFY(m_store->next(qid2)); - QCOMPARE(m_store->id(qid2), serialize("file", id4)); - QVERIFY(!m_store->next(qid2)); -} - -void FileSearchStoreTest::testEmptySearchString() -{ - QString url1(QLatin1String("/home/t/a")); - quint64 id1 = insertUrl(url1); - insertText(id1, QLatin1String("File A")); - - QString url2(QLatin1String("/home/t/b")); - quint64 id2 = insertUrl(url2); - insertText(id2, QLatin1String("File B")); - - QString url3(QLatin1String("/home/garden/b")); - quint64 id3 = insertUrl(url3); - insertText(id3, QLatin1String("Garden B")); - - QString url4(QLatin1String("/home/tt/b")); - quint64 id4 = insertUrl(url4); - insertText(id4, QLatin1String("TT B")); - - QString url5(QLatin1String("/home/tt/c")); - quint64 id5 = insertUrl(url5); - insertText(id5, QLatin1String("TT C")); - - Query q; - q.addType(QLatin1String("File")); - - int qid1 = m_store->exec(q); - QCOMPARE(qid1, 1); - - QVERIFY(m_store->next(qid1)); - QCOMPARE(m_store->id(qid1), serialize("file", id1)); - QVERIFY(m_store->next(qid1)); - QCOMPARE(m_store->id(qid1), serialize("file", id2)); - QVERIFY(m_store->next(qid1)); - QCOMPARE(m_store->id(qid1), serialize("file", id3)); - QVERIFY(m_store->next(qid1)); - QCOMPARE(m_store->id(qid1), serialize("file", id4)); - QVERIFY(m_store->next(qid1)); - QCOMPARE(m_store->id(qid1), serialize("file", id5)); - QVERIFY(!m_store->next(qid1)); -} - -void FileSearchStoreTest::testAllVideos() -{ - QString url1(QLatin1String("/home/t/a")); - quint64 id1 = insertUrl(url1); - insertType(id1, QLatin1String("Video")); - - QString url2(QLatin1String("/home/t/b")); - quint64 id2 = insertUrl(url2); - insertType(id2, QLatin1String("Image")); - - QString url3(QLatin1String("/home/garden/b")); - quint64 id3 = insertUrl(url3); - insertType(id3, QLatin1String("Video")); - - Query q; - q.addType(QLatin1String("Video")); - - int qid1 = m_store->exec(q); - QCOMPARE(qid1, 1); - - QVERIFY(m_store->next(qid1)); - QCOMPARE(m_store->id(qid1), serialize("file", id1)); - QVERIFY(m_store->next(qid1)); - QCOMPARE(m_store->id(qid1), serialize("file", id3)); - QVERIFY(!m_store->next(qid1)); -} - -void FileSearchStoreTest::testFileNameSearch() -{ - QString url1(QLatin1String("/home/t/a")); - quint64 id1 = insertUrl(url1); - insertExactText(id1, QLatin1String("flowering"), "F"); - insertExactText(id1, QLatin1String("dork"), "F"); - insertExactText(id1, QLatin1String("dork"), "A"); - insertExactText(id1, QLatin1String("dork"), "G"); - - QString url2(QLatin1String("/home/t/b")); - quint64 id2 = insertUrl(url2); - insertExactText(id2, QLatin1String("powering"), "F"); - insertExactText(id2, QLatin1String("fire"), "F"); - insertExactText(id2, QLatin1String("dork"), "A"); - insertExactText(id2, QLatin1String("dork"), "G"); - - QString url3(QLatin1String("/home/garden/b")); - quint64 id3 = insertUrl(url3); - insertExactText(id3, QLatin1String("does"), "F"); - insertExactText(id3, QLatin1String("not"), "F"); - insertExactText(id3, QLatin1String("dork"), "A"); - insertExactText(id3, QLatin1String("dork"), "G"); - - Query q; - q.addType(QLatin1String("File")); - q.setTerm(Term("filename", "dork")); - - int qid1 = m_store->exec(q); - QCOMPARE(qid1, 1); - QVERIFY(m_store->next(qid1)); - QCOMPARE(m_store->id(qid1), serialize("file", id1)); - QVERIFY(!m_store->next(qid1)); - - q.setTerm(Term("filename", "do*")); - - int qid2 = m_store->exec(q); - QCOMPARE(qid2, 2); - QVERIFY(m_store->next(qid2)); - QCOMPARE(m_store->id(qid2), serialize("file", id1)); - QVERIFY(m_store->next(qid2)); - QCOMPARE(m_store->id(qid2), serialize("file", id3)); - QVERIFY(!m_store->next(qid2)); - - q.setTerm(Term("filename", "*ing")); - - int qid3 = m_store->exec(q); - QCOMPARE(qid3, 3); - QVERIFY(m_store->next(qid3)); - QCOMPARE(m_store->id(qid3), serialize("file", id1)); - QVERIFY(m_store->next(qid3)); - QCOMPARE(m_store->id(qid3), serialize("file", id2)); - QVERIFY(!m_store->next(qid3)); - - // Exact match - q.setTerm(Term("filename", "dork", Term::Equal)); - - int qid4 = m_store->exec(q); - QCOMPARE(qid4, 4); - QVERIFY(m_store->next(qid4)); - QCOMPARE(m_store->id(qid4), serialize("file", id1)); - QVERIFY(!m_store->next(qid4)); -} - -void FileSearchStoreTest::testSortingNone() -{ - insertText(1, QLatin1String("Power A")); - insertText(2, QLatin1String("Power Power B")); - - Query q; - q.addType(QLatin1String("File")); - q.setSearchString("Power"); - - int qid; - - // Auto sort - Based on frequency - qid = m_store->exec(q); - QCOMPARE(qid, 1); - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", 2)); - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", 1)); - QVERIFY(!m_store->next(qid)); - - // no sort - q.setSortingOption(Query::SortNone); - - qid = m_store->exec(q); - QCOMPARE(qid, 2); - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", 1)); - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", 2)); - QVERIFY(!m_store->next(qid)); -} - -void FileSearchStoreTest::testInvalidProperties() -{ - Query q; - q.addType(QLatin1String("File")); - q.setTerm(Term("NoNExistingProperty", QVariant(1))); - - int qid = m_store->exec(q); - QCOMPARE(qid, 0); - QVERIFY(!m_store->next(qid)); -} - -void FileSearchStoreTest::testModifiedProperty() -{ - QDateTime dt(QDate(2013, 12, 02), QTime(12, 2, 2)); - insertExactText(1, dt.toString(Qt::ISODate), "DT_M"); - insertExactText(2, QDateTime::currentDateTime().toString(Qt::ISODate), "DT_M"); - - Query q; - q.addType(QLatin1String("File")); - q.setTerm(Term(("modified"), dt.date(), Term::Equal)); - - int qid = m_store->exec(q); - - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", 1)); - QVERIFY(!m_store->next(qid)); - - q.setTerm(Term(("modified"), dt, Term::Equal)); - - qid = m_store->exec(q); - - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", 1)); - QVERIFY(!m_store->next(qid)); -} - -void FileSearchStoreTest::testDateTimeProperty() -{ - KFileMetaData::PropertyInfo propInfo(KFileMetaData::Property::CreationDate); - QString prefix = "X" + QString::number((int)propInfo.property()); - - QDateTime dt(QDate(2013, 12, 02), QTime(12, 2, 2)); - insertExactText(1, dt.toString(Qt::ISODate), prefix); - insertExactText(2, QDateTime::currentDateTime().toString(Qt::ISODate), prefix); - - Query q; - q.addType(QLatin1String("File")); - q.setTerm(Term(propInfo.name(), dt.date(), Term::Equal)); - - int qid = m_store->exec(q); - - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", 1)); - QVERIFY(!m_store->next(qid)); - - q.setTerm(Term((propInfo.name()), dt, Term::Equal)); - - qid = m_store->exec(q); - - QVERIFY(m_store->next(qid)); - QCOMPARE(m_store->id(qid), serialize("file", 1)); - QVERIFY(!m_store->next(qid)); -} - -QTEST_MAIN(Baloo::FileSearchStoreTest) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/autotests/unit/file/CMakeLists.txt new/baloo-5.81.0/autotests/unit/file/CMakeLists.txt --- old/baloo-5.80.0/autotests/unit/file/CMakeLists.txt 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/autotests/unit/file/CMakeLists.txt 2021-04-04 13:36:07.000000000 +0200 @@ -18,7 +18,6 @@ filtereddiriteratortest unindexedfileiteratortest metadatamovertest - fileinfotest ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/autotests/unit/file/fileinfotest.cpp new/baloo-5.81.0/autotests/unit/file/fileinfotest.cpp --- old/baloo-5.80.0/autotests/unit/file/fileinfotest.cpp 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/autotests/unit/file/fileinfotest.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,121 +0,0 @@ -/* - This file is part of the KDE Baloo project. - SPDX-FileCopyrightText: 2015 Vishesh Handa <[email protected]> - - SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL -*/ - -#include "fileinfo.h" - -#include <QFileInfo> -#include <QTemporaryFile> -#include <QTemporaryDir> -#include <QTest> - -using namespace Baloo; - -class FileInfoTest : public QObject -{ - Q_OBJECT - - static void touchFile(const QString& path) - { - QFile file(path); - file.open(QIODevice::WriteOnly); - file.write("data"); - file.close(); - } - -private Q_SLOTS: - void init() - { - file.setFileTemplate(QStringLiteral("baloo-fileinfo-test")); - file.open(); - } - - void test_mtime() - { - FileInfo info(file.fileName().toUtf8()); - QFileInfo qinfo(file.fileName()); - QCOMPARE(info.mtime(), qinfo.lastModified().toSecsSinceEpoch()); - } - - void test_mtime_invalid() - { - FileInfo info("/bah/tmp/does-no-exist"); - QCOMPARE(info.mtime(), static_cast<quint32>(0)); - } - - void test_ctime() - { - FileInfo info(file.fileName().toUtf8()); - QFileInfo qinfo(file.fileName()); - QCOMPARE(info.ctime(), qinfo.metadataChangeTime().toSecsSinceEpoch()); - } - - void test_exists_true() - { - FileInfo info(file.fileName().toUtf8()); - QCOMPARE(info.exists(), true); - } - - void test_exists_false() - { - FileInfo info("/bah/tmp/does-no-exist"); - QCOMPARE(info.exists(), false); - } - - void test_fileName() - { - QString path = dir.path() + "/test"; - touchFile(path); - FileInfo info(path.toUtf8()); - QCOMPARE(info.fileName(), QByteArray("test")); - } - - void test_hidden_false() - { - FileInfo info(file.fileName().toUtf8()); - QCOMPARE(info.isHidden(), false); - } - - void test_hidden_true() - { - QString path = dir.path() + "/.test"; - touchFile(path); - FileInfo info(path.toUtf8()); - QCOMPARE(info.isHidden(), true); - } - - void test_isDir_true() - { - FileInfo info(dir.path().toUtf8()); - QCOMPARE(info.isDir(), true); - } - - void test_isDir_false() - { - FileInfo info(file.fileName().toUtf8()); - QCOMPARE(info.isDir(), false); - } - - void test_isFile_true() - { - FileInfo info(file.fileName().toUtf8()); - QCOMPARE(info.isFile(), true); - } - - void test_isFile_false() - { - FileInfo info(dir.path().toUtf8()); - QCOMPARE(info.isFile(), false); - } -private: - QTemporaryFile file; - QTemporaryDir dir; -}; - - -QTEST_GUILESS_MAIN(FileInfoTest) - -#include "fileinfotest.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/autotests/unit/file/metadatamovertest.cpp new/baloo-5.81.0/autotests/unit/file/metadatamovertest.cpp --- old/baloo-5.80.0/autotests/unit/file/metadatamovertest.cpp 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/autotests/unit/file/metadatamovertest.cpp 2021-04-04 13:36:07.000000000 +0200 @@ -34,6 +34,7 @@ void testRemoveFile(); void testRenameFile(); void testMoveFile(); + void testMoveRenameFile(); void testMoveFolder(); void testMoveTwiceSequential(); void testMoveTwiceCombined(); @@ -47,6 +48,14 @@ Database* m_db; QTemporaryDir* m_tempDir; + + struct DocumentInfo { + QString url; + DocumentTimeDB::TimeInfo timeInfo; + QVector<QByteArray> docTerms; + QVector<QByteArray> filenameTerms; + }; + DocumentInfo documentInfo(quint64 docId); }; MetadataMoverTest::MetadataMoverTest(QObject* parent) @@ -83,6 +92,22 @@ return job.document().id(); } +MetadataMoverTest::DocumentInfo MetadataMoverTest::documentInfo(quint64 id) +{ + Transaction tr(m_db, Transaction::ReadOnly); + if (!tr.hasDocument(id)) { + return DocumentInfo(); + } + + DocumentInfo docInfo; + docInfo.url = tr.documentUrl(id); + docInfo.timeInfo = tr.documentTimeInfo(id); + docInfo.docTerms = tr.documentTerms(id); + docInfo.filenameTerms = tr.documentFileNameTerms(id); + + return docInfo; +} + void MetadataMoverTest::testRemoveFile() { QTemporaryFile file; @@ -126,21 +151,20 @@ touchFile(url); quint64 fid = insertUrl(url); - { - Transaction tr(m_db, Transaction::ReadOnly); - QVERIFY(tr.hasDocument(fid)); - } + DocumentInfo oldInfo = documentInfo(fid); + QVERIFY(!oldInfo.url.isEmpty()); + QCOMPARE(oldInfo.url, QFile::encodeName(url)); MetadataMover mover(m_db, this); QString url2 = dir.path() + "/file2"; QFile::rename(url, url2); mover.moveFileMetadata(QFile::encodeName(url), QFile::encodeName(url2)); - { - Transaction tr(m_db, Transaction::ReadOnly); - QVERIFY(tr.hasDocument(fid)); - QCOMPARE(tr.documentUrl(fid), QFile::encodeName(url2)); - } + DocumentInfo newInfo = documentInfo(fid); + QCOMPARE(newInfo.url, QFile::encodeName(url2)); + QCOMPARE(newInfo.docTerms, oldInfo.docTerms); + QVERIFY(newInfo.filenameTerms != oldInfo.filenameTerms); + QVERIFY(!newInfo.filenameTerms.empty()); } void MetadataMoverTest::testMoveFile() @@ -152,21 +176,44 @@ touchFile(url); quint64 fid = insertUrl(url); - { - Transaction tr(m_db, Transaction::ReadOnly); - QVERIFY(tr.hasDocument(fid)); - } + DocumentInfo oldInfo = documentInfo(fid); + QVERIFY(!oldInfo.url.isEmpty()); + QCOMPARE(oldInfo.url, QFile::encodeName(url)); + + MetadataMover mover(m_db, this); + QString url2 = dir.path() + "/file"; + QFile::rename(url, url2); + mover.moveFileMetadata(QFile::encodeName(url), QFile::encodeName(url2)); + + DocumentInfo newInfo = documentInfo(fid); + QCOMPARE(newInfo.url, QFile::encodeName(url2)); + QCOMPARE(newInfo.docTerms, oldInfo.docTerms); + QCOMPARE(newInfo.filenameTerms, oldInfo.filenameTerms); +} + +void MetadataMoverTest::testMoveRenameFile() +{ + QTemporaryDir dir; + QDir().mkpath(dir.path() + "/a/b/c"); + + QString url = dir.path() + "/a/b/c/file"; + touchFile(url); + quint64 fid = insertUrl(url); + + DocumentInfo oldInfo = documentInfo(fid); + QVERIFY(!oldInfo.url.isEmpty()); + QCOMPARE(oldInfo.url, QFile::encodeName(url)); MetadataMover mover(m_db, this); QString url2 = dir.path() + "/file2"; QFile::rename(url, url2); mover.moveFileMetadata(QFile::encodeName(url), QFile::encodeName(url2)); - { - Transaction tr(m_db, Transaction::ReadOnly); - QVERIFY(tr.hasDocument(fid)); - QCOMPARE(tr.documentUrl(fid), QFile::encodeName(url2)); - } + DocumentInfo newInfo = documentInfo(fid); + QCOMPARE(newInfo.url, QFile::encodeName(url2)); + QCOMPARE(newInfo.docTerms, oldInfo.docTerms); + QVERIFY(newInfo.filenameTerms != oldInfo.filenameTerms); + QVERIFY(!newInfo.filenameTerms.empty()); } void MetadataMoverTest::testMoveFolder() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/cs/baloosearch5.po new/baloo-5.81.0/po/cs/baloosearch5.po --- old/baloo-5.80.0/po/cs/baloosearch5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/cs/baloosearch5.po 2021-04-04 13:36:07.000000000 +0200 @@ -1,21 +1,22 @@ # Copyright (C) YEAR This_file_is_part_of_KDE # This file is distributed under the same license as the PACKAGE package. # V??t Pel????k <[email protected]>, 2014, 2015, 2017, 2018, 2020. +# Vit Pelcak <[email protected]>, 2021. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-02-27 02:18+0100\n" -"PO-Revision-Date: 2020-05-18 20:56+0200\n" -"Last-Translator: Vit Pelcak <[email protected]>\n" +"PO-Revision-Date: 2021-03-22 15:54+0100\n" +"Last-Translator: Vit Pelcak <[email protected]>\n" "Language-Team: Czech <[email protected]>\n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Lokalize 20.04.0\n" +"X-Generator: Lokalize 20.12.3\n" "X-Language: cs_CZ\n" "X-Source-Language: en_US\n" @@ -92,7 +93,7 @@ #: main.cpp:49 #, kde-format msgid "Show document IDs" -msgstr "" +msgstr "Zobrazit ID dokument??" #: main.cpp:50 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/en_GB/baloosearch5.po new/baloo-5.81.0/po/en_GB/baloosearch5.po --- old/baloo-5.80.0/po/en_GB/baloosearch5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/en_GB/baloosearch5.po 2021-04-04 13:36:07.000000000 +0200 @@ -1,13 +1,13 @@ # Copyright (C) YEAR This_file_is_part_of_KDE # This file is distributed under the same license as the PACKAGE package. # -# Steve Allewell <[email protected]>, 2014, 2015, 2018, 2020. +# Steve Allewell <[email protected]>, 2014, 2015, 2018, 2020, 2021. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-02-27 02:18+0100\n" -"PO-Revision-Date: 2020-04-09 16:55+0100\n" +"PO-Revision-Date: 2021-04-03 15:04+0100\n" "Last-Translator: Steve Allewell <[email protected]>\n" "Language-Team: British English <[email protected]>\n" "Language: en_GB\n" @@ -15,7 +15,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 20.07.70\n" +"X-Generator: Lokalize 20.12.3\n" #, kde-format msgctxt "NAME OF TRANSLATORS" @@ -90,7 +90,7 @@ #: main.cpp:49 #, kde-format msgid "Show document IDs" -msgstr "" +msgstr "Show document IDs" #: main.cpp:50 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/eu/baloosearch5.po new/baloo-5.81.0/po/eu/baloosearch5.po --- old/baloo-5.80.0/po/eu/baloosearch5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/eu/baloosearch5.po 2021-04-04 13:36:07.000000000 +0200 @@ -1,26 +1,26 @@ # Translation of baloosearch5.po to Euskara/Basque (eu). # Copyright (C) 2017-2018, Free Software Foundation, Inc. -# Copyright (C) 2019-2020, This file is copyright: +# Copyright (C) 2019-2021, This file is copyright: # This file is distributed under the same license as the baloo package. # KDE Euskaratzeko proiektuko arduraduna <[email protected]>. # # Translators: # Ander Elortondo <[email protected]>, 2017. -# I??igo Salvador Azurmendi <[email protected]>, 2017, 2018, 2020. +# I??igo Salvador Azurmendi <[email protected]>, 2017, 2018, 2020, 2021. msgid "" msgstr "" "Project-Id-Version: baloo\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-02-27 02:18+0100\n" -"PO-Revision-Date: 2020-04-04 01:31+0200\n" -"Last-Translator: I??igo Salvador Azurmendi <[email protected]>\n" +"PO-Revision-Date: 2021-03-30 17:03+0200\n" +"Last-Translator: I??igo Salvador Azurmendi <[email protected]>\n" "Language-Team: Basque <[email protected]>\n" "Language: eu\n" "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" -"X-Generator: Lokalize 19.12.3\n" +"X-Generator: Lokalize 20.12.3\n" #, kde-format msgctxt "NAME OF TRANSLATORS" @@ -95,7 +95,7 @@ #: main.cpp:49 #, kde-format msgid "Show document IDs" -msgstr "" +msgstr "Erakutsi dokumentuen IDak" #: main.cpp:50 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/ia/baloosearch5.po new/baloo-5.81.0/po/ia/baloosearch5.po --- old/baloo-5.80.0/po/ia/baloosearch5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/ia/baloosearch5.po 2021-04-04 13:36:07.000000000 +0200 @@ -2,13 +2,13 @@ # This file is distributed under the same license as the PACKAGE package. # # Giovanni Sora <[email protected]>, 2014. -# G.Sora <[email protected]>, 2014, 2016, 2017, 2019, 2020. +# G.Sora <[email protected]>, 2014, 2016, 2017, 2019, 2020, 2021. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-02-27 02:18+0100\n" -"PO-Revision-Date: 2020-04-22 23:14+0100\n" +"PO-Revision-Date: 2021-03-23 22:00+0100\n" "Last-Translator: Giovanni Sora <[email protected]>\n" "Language-Team: Interlingua <[email protected]>\n" "Language: ia\n" @@ -91,7 +91,7 @@ #: main.cpp:49 #, kde-format msgid "Show document IDs" -msgstr "" +msgstr "Monstra IDs de documento" #: main.cpp:50 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/it/baloosearch5.po new/baloo-5.81.0/po/it/baloosearch5.po --- old/baloo-5.80.0/po/it/baloosearch5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/it/baloosearch5.po 2021-04-04 13:36:07.000000000 +0200 @@ -1,14 +1,14 @@ # Copyright (C) YEAR This_file_is_part_of_KDE # This file is distributed under the same license as the baloo package. # Luigi Toscano <[email protected]>, 2014, 2015. -# Paolo Zamponi <[email protected]>, 2018, 2020. +# Paolo Zamponi <[email protected]>, 2018, 2020, 2021. # msgid "" msgstr "" "Project-Id-Version: baloosearch\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-02-27 02:18+0100\n" -"PO-Revision-Date: 2020-05-01 15:17+0200\n" +"PO-Revision-Date: 2021-03-01 08:35+0100\n" "Last-Translator: Paolo Zamponi <[email protected]>\n" "Language-Team: Italian <[email protected]>\n" "Language: it\n" @@ -16,7 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Lokalize 19.12.3\n" +"X-Generator: Lokalize 20.12.2\n" #, kde-format msgctxt "NAME OF TRANSLATORS" @@ -91,7 +91,7 @@ #: main.cpp:49 #, kde-format msgid "Show document IDs" -msgstr "" +msgstr "Mostra identificativi del documento" #: main.cpp:50 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/it/kio5_baloosearch.po new/baloo-5.81.0/po/it/kio5_baloosearch.po --- old/baloo-5.80.0/po/it/kio5_baloosearch.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/it/kio5_baloosearch.po 2021-04-04 13:36:07.000000000 +0200 @@ -1,7 +1,7 @@ # translation of kio_nepomuksearch.po to Italian # Copyright (C) 2008 Free Software Foundation, Inc. +# Vincenzo Reale <[email protected]>, 2008, 2009, 2010, 2011. # -# Vincenzo Reale <[email protected]>, 2008, 2009, 2010, 2011. msgid "" msgstr "" "Project-Id-Version: kio_nepomuksearch\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/pt_BR/baloosearch5.po new/baloo-5.81.0/po/pt_BR/baloosearch5.po --- old/baloo-5.80.0/po/pt_BR/baloosearch5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/pt_BR/baloosearch5.po 2021-04-04 13:36:07.000000000 +0200 @@ -3,21 +3,21 @@ # This file is distributed under the same license as the baloo package. # # Andr?? Marcelo Alvarenga <[email protected]>, 2014, 2015, 2020. -# Luiz Fernando Ranghetti <[email protected]>, 2018. +# Luiz Fernando Ranghetti <[email protected]>, 2018, 2021. msgid "" msgstr "" "Project-Id-Version: baloo\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-02-27 02:18+0100\n" -"PO-Revision-Date: 2020-04-04 16:44-0300\n" -"Last-Translator: Andr?? Marcelo Alvarenga <[email protected]>\n" +"PO-Revision-Date: 2021-03-19 10:36-0300\n" +"Last-Translator: Luiz Fernando Ranghetti <[email protected]>\n" "Language-Team: Brazilian Portuguese <[email protected]>\n" "Language: pt_BR\n" "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" -"X-Generator: Lokalize 19.12.3\n" +"X-Generator: Lokalize 20.04.2\n" #, kde-format msgctxt "NAME OF TRANSLATORS" @@ -92,7 +92,7 @@ #: main.cpp:49 #, kde-format msgid "Show document IDs" -msgstr "" +msgstr "Mostrar IDs dos documentos" #: main.cpp:50 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/sl/baloosearch5.po new/baloo-5.81.0/po/sl/baloosearch5.po --- old/baloo-5.80.0/po/sl/baloosearch5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/sl/baloosearch5.po 2021-04-04 13:36:07.000000000 +0200 @@ -3,13 +3,13 @@ # This file is distributed under the same license as the PACKAGE package. # # Andrej Mernik <[email protected]>, 2014, 2015. -# Matja?? Jeran <[email protected]>, 2019. +# Matja?? Jeran <[email protected]>, 2019, 2021. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-02-27 02:18+0100\n" -"PO-Revision-Date: 2020-05-19 08:37+0200\n" +"PO-Revision-Date: 2021-03-15 08:47+0100\n" "Last-Translator: Matja?? Jeran <[email protected]>\n" "Language-Team: Slovenian <[email protected]>\n" "Language: sl\n" @@ -19,7 +19,7 @@ "Translator: Andrej Mernik <[email protected]>\n" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n" "%100==4 ? 3 : 0);\n" -"X-Generator: Poedit 2.3\n" +"X-Generator: Lokalize 20.08.1\n" #, kde-format msgctxt "NAME OF TRANSLATORS" @@ -94,7 +94,7 @@ #: main.cpp:49 #, kde-format msgid "Show document IDs" -msgstr "" +msgstr "Prika??i identifikacije dokumenta" #: main.cpp:50 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/zh_CN/baloo_file5.po new/baloo-5.81.0/po/zh_CN/baloo_file5.po --- old/baloo-5.80.0/po/zh_CN/baloo_file5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/zh_CN/baloo_file5.po 2021-04-04 13:36:07.000000000 +0200 @@ -8,7 +8,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2020-08-07 02:06+0200\n" -"PO-Revision-Date: 2021-03-02 16:16\n" +"PO-Revision-Date: 2021-03-27 17:28\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/zh_CN/balooctl5.po new/baloo-5.81.0/po/zh_CN/balooctl5.po --- old/baloo-5.80.0/po/zh_CN/balooctl5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/zh_CN/balooctl5.po 2021-04-04 13:36:07.000000000 +0200 @@ -10,7 +10,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2020-09-06 02:08+0200\n" -"PO-Revision-Date: 2021-03-02 16:16\n" +"PO-Revision-Date: 2021-03-27 17:28\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/zh_CN/baloodb5.po new/baloo-5.81.0/po/zh_CN/baloodb5.po --- old/baloo-5.80.0/po/zh_CN/baloodb5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/zh_CN/baloodb5.po 2021-04-04 13:36:07.000000000 +0200 @@ -8,7 +8,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2020-08-03 02:05+0200\n" -"PO-Revision-Date: 2021-03-02 16:16\n" +"PO-Revision-Date: 2021-03-27 17:28\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/zh_CN/balooengine5.po new/baloo-5.81.0/po/zh_CN/balooengine5.po --- old/baloo-5.80.0/po/zh_CN/balooengine5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/zh_CN/balooengine5.po 2021-04-04 13:36:07.000000000 +0200 @@ -8,7 +8,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2020-08-03 02:05+0200\n" -"PO-Revision-Date: 2021-03-02 16:16\n" +"PO-Revision-Date: 2021-03-27 17:28\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/zh_CN/baloomonitorplugin.po new/baloo-5.81.0/po/zh_CN/baloomonitorplugin.po --- old/baloo-5.80.0/po/zh_CN/baloomonitorplugin.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/zh_CN/baloomonitorplugin.po 2021-04-04 13:36:07.000000000 +0200 @@ -7,7 +7,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2020-08-03 02:05+0200\n" -"PO-Revision-Date: 2021-03-02 16:16\n" +"PO-Revision-Date: 2021-03-27 17:28\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/zh_CN/baloosearch5.po new/baloo-5.81.0/po/zh_CN/baloosearch5.po --- old/baloo-5.80.0/po/zh_CN/baloosearch5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/zh_CN/baloosearch5.po 2021-04-04 13:36:07.000000000 +0200 @@ -8,7 +8,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-02-27 02:18+0100\n" -"PO-Revision-Date: 2021-03-02 16:16\n" +"PO-Revision-Date: 2021-03-27 17:28\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" @@ -95,7 +95,7 @@ #: main.cpp:49 #, kde-format msgid "Show document IDs" -msgstr "" +msgstr "???????????? ID" #: main.cpp:50 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/zh_CN/balooshow5.po new/baloo-5.81.0/po/zh_CN/balooshow5.po --- old/baloo-5.80.0/po/zh_CN/balooshow5.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/zh_CN/balooshow5.po 2021-04-04 13:36:07.000000000 +0200 @@ -8,7 +8,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-02-27 02:18+0100\n" -"PO-Revision-Date: 2021-03-02 16:16\n" +"PO-Revision-Date: 2021-03-27 17:28\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/zh_CN/kio5_baloosearch.po new/baloo-5.81.0/po/zh_CN/kio5_baloosearch.po --- old/baloo-5.80.0/po/zh_CN/kio5_baloosearch.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/zh_CN/kio5_baloosearch.po 2021-04-04 13:36:07.000000000 +0200 @@ -8,7 +8,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-01-02 02:13+0100\n" -"PO-Revision-Date: 2021-03-02 16:16\n" +"PO-Revision-Date: 2021-03-27 17:28\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/zh_CN/kio5_tags.po new/baloo-5.81.0/po/zh_CN/kio5_tags.po --- old/baloo-5.80.0/po/zh_CN/kio5_tags.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/zh_CN/kio5_tags.po 2021-04-04 13:36:07.000000000 +0200 @@ -7,7 +7,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2020-10-24 02:11+0200\n" -"PO-Revision-Date: 2021-03-02 16:16\n" +"PO-Revision-Date: 2021-03-27 17:28\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/po/zh_CN/kio5_timeline.po new/baloo-5.81.0/po/zh_CN/kio5_timeline.po --- old/baloo-5.80.0/po/zh_CN/kio5_timeline.po 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/po/zh_CN/kio5_timeline.po 2021-04-04 13:36:07.000000000 +0200 @@ -8,7 +8,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-01-02 02:13+0100\n" -"PO-Revision-Date: 2021-03-02 16:16\n" +"PO-Revision-Date: 2021-03-27 17:28\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/engine/database.h new/baloo-5.81.0/src/engine/database.h --- old/baloo-5.80.0/src/engine/database.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/engine/database.h 2021-04-04 13:36:07.000000000 +0200 @@ -49,7 +49,7 @@ /** * Read-Only Database, only works if database exists. */ - ReadOnlyDatabase + ReadOnlyDatabase, }; /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/engine/documentoperations.h new/baloo-5.81.0/src/engine/documentoperations.h --- old/baloo-5.80.0/src/engine/documentoperations.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/engine/documentoperations.h 2021-04-04 13:36:07.000000000 +0200 @@ -18,7 +18,7 @@ DocumentData = 0x8, DocumentTime = 0x10, DocumentUrl = 0x20, - Everything = DocumentTerms | FileNameTerms | XAttrTerms | DocumentData | DocumentTime | DocumentUrl + Everything = DocumentTerms | FileNameTerms | XAttrTerms | DocumentData | DocumentTime | DocumentUrl, }; Q_DECLARE_FLAGS(DocumentOperations, DocumentOperation) Q_DECLARE_OPERATORS_FOR_FLAGS(DocumentOperations) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/engine/enginequery.h new/baloo-5.81.0/src/engine/enginequery.h --- old/baloo-5.80.0/src/engine/enginequery.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/engine/enginequery.h 2021-04-04 13:36:07.000000000 +0200 @@ -24,7 +24,7 @@ StartsWith, And, Or, - Phrase + Phrase, }; EngineQuery(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/engine/postingdb.h new/baloo-5.81.0/src/engine/postingdb.h --- old/baloo-5.80.0/src/engine/postingdb.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/engine/postingdb.h 2021-04-04 13:36:07.000000000 +0200 @@ -43,7 +43,7 @@ enum Comparator { LessEqual, - GreaterEqual + GreaterEqual, }; // For integral types only: template<typename T> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/engine/transaction.h new/baloo-5.81.0/src/engine/transaction.h --- old/baloo-5.80.0/src/engine/transaction.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/engine/transaction.h 2021-04-04 13:36:07.000000000 +0200 @@ -31,7 +31,7 @@ public: enum TransactionType { ReadOnly, - ReadWrite + ReadWrite, }; Transaction(const Database& db, TransactionType type); Transaction(Database* db, TransactionType type); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/engine/valgrind.h new/baloo-5.81.0/src/engine/valgrind.h --- old/baloo-5.80.0/src/engine/valgrind.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/engine/valgrind.h 2021-04-04 13:36:07.000000000 +0200 @@ -6154,7 +6154,7 @@ VG_USERREQ__VEX_INIT_FOR_IRI = 0x1901, /* Used by Inner Valgrind to inform Outer Valgrind where to find the list of inner guest threads */ - VG_USERREQ__INNER_THREADS = 0x1902 + VG_USERREQ__INNER_THREADS = 0x1902, } Vg_ClientRequest; #if !defined(__GNUC__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/engine/writetransaction.h new/baloo-5.81.0/src/engine/writetransaction.h --- old/baloo-5.80.0/src/engine/writetransaction.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/engine/writetransaction.h 2021-04-04 13:36:07.000000000 +0200 @@ -51,7 +51,7 @@ enum OperationType { AddId, - RemoveId + RemoveId, }; struct Operation { OperationType type; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/file/CMakeLists.txt new/baloo-5.81.0/src/file/CMakeLists.txt --- old/baloo-5.80.0/src/file/CMakeLists.txt 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/file/CMakeLists.txt 2021-04-04 13:36:07.000000000 +0200 @@ -32,7 +32,6 @@ filtereddiriterator.cpp unindexedfileiterator.cpp migrator.cpp - fileinfo.cpp # File Watcher filewatch.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/file/basicindexingjob.h new/baloo-5.81.0/src/file/basicindexingjob.h --- old/baloo-5.80.0/src/file/basicindexingjob.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/file/basicindexingjob.h 2021-04-04 13:36:07.000000000 +0200 @@ -17,7 +17,7 @@ public: enum IndexingLevel { NoLevel, - MarkForContentIndexing + MarkForContentIndexing, }; BasicIndexingJob(const QString& filePath, const QString& mimetype, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/file/fileinfo.cpp new/baloo-5.81.0/src/file/fileinfo.cpp --- old/baloo-5.80.0/src/file/fileinfo.cpp 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/file/fileinfo.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ -/* - This file is part of the KDE Baloo Project - SPDX-FileCopyrightText: 2015 Vishesh Handa <[email protected]> - - SPDX-License-Identifier: LGPL-2.1-or-later -*/ - -#include "fileinfo.h" -#include "idutils.h" - -using namespace Baloo; - -FileInfo::FileInfo(const QByteArray& filePath) - : m_filePath(filePath) - , m_exists(true) -{ - Q_ASSERT(!filePath.endsWith('/')); - if (filePathToStat(filePath, m_statBuf) != 0) { - m_exists = false; - memset(&m_statBuf, 0, sizeof(m_statBuf)); - } -} - -bool FileInfo::isHidden() const -{ - int pos = m_filePath.lastIndexOf('/'); - return m_filePath[pos + 1] == '.'; -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/file/fileinfo.h new/baloo-5.81.0/src/file/fileinfo.h --- old/baloo-5.80.0/src/file/fileinfo.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/file/fileinfo.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,40 +0,0 @@ -/* - This file is part of the KDE Baloo Project - SPDX-FileCopyrightText: 2015 Vishesh Handa <[email protected]> - - SPDX-License-Identifier: LGPL-2.1-or-later -*/ - -#ifndef BALOO_FILEINFO_H -#define BALOO_FILEINFO_H - -#include <QByteArray> -#include <qplatformdefs.h> - -namespace Baloo { - -class FileInfo -{ -public: - explicit FileInfo(const QByteArray& filePath); - - QByteArray filePath() const { return m_filePath; } - QByteArray fileName() const { return m_filePath.mid(m_filePath.lastIndexOf('/') + 1); } - - quint32 mtime() const { return m_statBuf.st_mtime; } - quint32 ctime() const { return m_statBuf.st_ctime; } - - bool isDir() const { return S_ISDIR(m_statBuf.st_mode); } - bool isFile() const { return S_ISREG(m_statBuf.st_mode); } - bool exists() const { return m_exists; } - bool isHidden() const; - -private: - QT_STATBUF m_statBuf; - QByteArray m_filePath; - bool m_exists; -}; - -} - -#endif // BALOO_FILEINFO_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/file/filtereddiriterator.h new/baloo-5.81.0/src/file/filtereddiriterator.h --- old/baloo-5.80.0/src/file/filtereddiriterator.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/file/filtereddiriterator.h 2021-04-04 13:36:07.000000000 +0200 @@ -20,7 +20,7 @@ public: enum Filter { FilesAndDirs, - DirsOnly + DirsOnly, }; FilteredDirIterator(const FileIndexerConfig* config, const QString& folder, Filter filter = FilesAndDirs); ~FilteredDirIterator(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/file/kinotify.h new/baloo-5.81.0/src/file/kinotify.h --- old/baloo-5.80.0/src/file/kinotify.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/file/kinotify.h 2021-04-04 13:36:07.000000000 +0200 @@ -63,7 +63,7 @@ EventMoveSelf | EventMoveFrom | EventMoveTo | - EventOpen) + EventOpen), }; Q_DECLARE_FLAGS(WatchEvents, WatchEvent) @@ -76,7 +76,7 @@ FlagOnlyDir = 0x01000000, /**< Only watch the path if it is a directory (IN_ONLYDIR) */ FlagDoNotFollow = 0x02000000, /**< Don't follow a sym link (IN_DONT_FOLLOW) */ FlagOneShot = 0x80000000, /**< Only send event once (IN_ONESHOT) */ - FlagExclUnlink = 0x04000000 /**< Do not generate events for unlinked files (IN_EXCL_UNLINK) */ + FlagExclUnlink = 0x04000000, /**< Do not generate events for unlinked files (IN_EXCL_UNLINK) */ }; Q_DECLARE_FLAGS(WatchFlags, WatchFlag) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/file/metadatamover.cpp new/baloo-5.81.0/src/file/metadatamover.cpp --- old/baloo-5.80.0/src/file/metadatamover.cpp 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/file/metadatamover.cpp 2021-04-04 13:36:07.000000000 +0200 @@ -8,6 +8,7 @@ #include "metadatamover.h" #include "database.h" +#include "termgenerator.h" #include "transaction.h" #include "baloodebug.h" @@ -82,23 +83,28 @@ const QByteArray fromPath = QFile::encodeName(from); quint64 id = tr->documentId(fromPath); if (!id) { - qDebug() << "Document not (yet) known, signaling newFile" << to; + qCDebug(BALOO) << "Document not (yet) known, signaling newFile" << to; Q_EMIT movedWithoutData(to); return; } - QByteArray toPath = QFile::encodeName(to); + const QByteArray toPath = QFile::encodeName(to); auto lastSlash = toPath.lastIndexOf('/'); - QByteArray parentPath = toPath.left(lastSlash + 1); + const QByteArray parentPath = toPath.left(lastSlash + 1); quint64 parentId = tr->documentId(parentPath); if (!parentId) { - qDebug() << "Parent directory not (yet) known, signaling newFile" << to; + qCDebug(BALOO) << "Parent directory not (yet) known, signaling newFile" << to; Q_EMIT movedWithoutData(parentPath); return; } Document doc; + + const QByteArray fileName = toPath.mid(lastSlash + 1); + TermGenerator tg(doc); + tg.indexFileNameText(QFile::decodeName(fileName)); + doc.setId(id); doc.setParentId(parentId); doc.setUrl(toPath); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/file/priority.cpp new/baloo-5.81.0/src/file/priority.cpp --- old/baloo-5.80.0/src/file/priority.cpp 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/file/priority.cpp 2021-04-04 13:36:07.000000000 +0200 @@ -34,7 +34,7 @@ IOPRIO_CLASS_NONE, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, - IOPRIO_CLASS_IDLE + IOPRIO_CLASS_IDLE, }; #endif @@ -42,7 +42,7 @@ enum { IOPRIO_WHO_PROCESS = 1, IOPRIO_WHO_PGRP, - IOPRIO_WHO_USER + IOPRIO_WHO_USER, }; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/kioslaves/tags/kio_tags.h new/baloo-5.81.0/src/kioslaves/tags/kio_tags.h --- old/baloo-5.80.0/src/kioslaves/tags/kio_tags.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/kioslaves/tags/kio_tags.h 2021-04-04 13:36:07.000000000 +0200 @@ -26,7 +26,7 @@ enum UrlType { InvalidUrl, FileUrl, - TagUrl + TagUrl, }; Q_ENUM(UrlType) @@ -81,7 +81,7 @@ private: enum ParseFlags { ChopLastSection, - LazyValidation + LazyValidation, }; struct ParseResult { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/kioslaves/timeline/timelinetools.h new/baloo-5.81.0/src/kioslaves/timeline/timelinetools.h --- old/baloo-5.80.0/src/kioslaves/timeline/timelinetools.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/kioslaves/timeline/timelinetools.h 2021-04-04 13:36:07.000000000 +0200 @@ -38,7 +38,7 @@ RootFolder, /// the root folder CalendarFolder, /// the calendar folder listing all months MonthFolder, /// a folder listing a month's days (m_date contains the month) - DayFolder /// a folder listing a day (m_date); optionally m_filename is set + DayFolder, /// a folder listing a day (m_date); optionally m_filename is set }; /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/lib/query.h new/baloo-5.81.0/src/lib/query.h --- old/baloo-5.80.0/src/lib/query.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/lib/query.h 2021-04-04 13:36:07.000000000 +0200 @@ -113,7 +113,7 @@ * * This is the default sorting mechanism. */ - SortAuto + SortAuto, }; void setSortingOption(SortingOption option); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/lib/searchstore.cpp new/baloo-5.81.0/src/lib/searchstore.cpp --- old/baloo-5.80.0/src/lib/searchstore.cpp 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/lib/searchstore.cpp 2021-04-04 13:36:07.000000000 +0200 @@ -34,8 +34,15 @@ QPair<quint32, quint32> calculateTimeRange(const QDateTime& dt, Term::Comparator com) { Q_ASSERT(dt.isValid()); - quint32 timet = dt.toSecsSinceEpoch(); + if (com == Term::Equal) { + // Timestamps in DB are quint32 relative to Epoch (1970...2106) + auto start = static_cast<quint32>(dt.date().startOfDay().toSecsSinceEpoch()); + auto end = static_cast<quint32>(dt.date().endOfDay().toSecsSinceEpoch()); + return {start, end}; + } + + quint32 timet = dt.toSecsSinceEpoch(); if (com == Term::LessEqual) { return {0, timet}; } @@ -48,10 +55,6 @@ if (com == Term::Greater) { return {timet + 1, std::numeric_limits<quint32>::max()}; } - if (com == Term::Equal) { - timet = QDateTime(dt.date()).toSecsSinceEpoch(); - return {timet, timet + 24 * 60 * 60 - 1}; - } Q_ASSERT_X(0, __func__, "mtime query must contain a valid comparator"); return {0, 0}; @@ -264,7 +267,7 @@ endDate.setDate(endDate.year(), endDate.month(), endDate.daysInMonth()); } - return tr->mTimeRangeIter(QDateTime(startDate).toSecsSinceEpoch(), QDateTime(endDate, QTime(23, 59, 59)).toSecsSinceEpoch()); + return tr->mTimeRangeIter(startDate.startOfDay().toSecsSinceEpoch(), endDate.endOfDay().toSecsSinceEpoch()); } else if (value.type() == QVariant::String) { const QDateTime dt = value.toDateTime(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/lib/term.h new/baloo-5.81.0/src/lib/term.h --- old/baloo-5.80.0/src/lib/term.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/lib/term.h 2021-04-04 13:36:07.000000000 +0200 @@ -24,13 +24,13 @@ Greater, GreaterEqual, Less, - LessEqual + LessEqual, }; enum Operation { None, And, - Or + Or, }; Term(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/qml/experimental/monitor.cpp new/baloo-5.81.0/src/qml/experimental/monitor.cpp --- old/baloo-5.80.0/src/qml/experimental/monitor.cpp 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/qml/experimental/monitor.cpp 2021-04-04 13:36:07.000000000 +0200 @@ -115,7 +115,7 @@ void Monitor::startBaloo() { const QString exe = QStandardPaths::findExecutable(QStringLiteral("baloo_file")); - QProcess::startDetached(exe); + QProcess::startDetached(exe, QStringList()); } void Monitor::updateRemainingTime() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/baloo-5.80.0/src/qml/queryresultsmodel.h new/baloo-5.81.0/src/qml/queryresultsmodel.h --- old/baloo-5.80.0/src/qml/queryresultsmodel.h 2021-03-06 17:17:01.000000000 +0100 +++ new/baloo-5.81.0/src/qml/queryresultsmodel.h 2021-04-04 13:36:07.000000000 +0200 @@ -51,7 +51,7 @@ QHash<int, QByteArray> roleNames() const override; enum Roles { - UrlRole = Qt::UserRole + 1 + UrlRole = Qt::UserRole + 1, }; void setQuery(Query *query);
