From 00f29bf3ed96fc4e734fb68e8e920b2b28bb6ba4 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Wed, 10 Aug 2022 13:34:38 +0200 Subject: [PATCH] deb package: fix the buster webengine dep --- packaging/debian/buildppa.sh | 17 ++++---- packaging/debian/debian/control-bionic | 2 +- src/kde/kioslave/kio_recoll/data/help.html | 45 ++++++++++++---------- src/kde/kioslave/kio_recoll/dirif.cpp | 15 ++++---- src/kde/kioslave/kio_recoll/htmlif.cpp | 6 +-- src/kde/kioslave/kio_recoll/kio_recoll.cpp | 32 +++++---------- 6 files changed, 52 insertions(+), 65 deletions(-) diff --git a/packaging/debian/buildppa.sh b/packaging/debian/buildppa.sh index ff7997d5..8bb2ca81 100644 --- a/packaging/debian/buildppa.sh +++ b/packaging/debian/buildppa.sh @@ -7,14 +7,15 @@ # Active series: # 18.04LTS bionic 2023-04 # 20.04LTS focal 2025-04 -# 21.10 impish +# 22.04LTS jammy 2027-04 +SERIES="bionic focal jammy" PPA_KEYID=7808CE96D38B9201 RCLVERS=1.32.7 SCOPEVERS=1.20.2.4 GSSPVERS=1.1.1 -PPAVERS=1 +PPAVERS=2 # #Y=/y @@ -28,7 +29,7 @@ case $RCLVERS in [23]*) PPANAME=recollexp-ppa;; *) PPANAME=recoll15-ppa;; esac -PPANAME=recollexp2-ppa +#PPANAME=recollexp2-ppa echo "PPA: $PPANAME. Type CR if Ok, else ^C" read rep @@ -49,8 +50,8 @@ check_recoll_orig() ####### QT debdir=debian -series="bionic focal impish jammy" -series= +series=$SERIES +series=bionic if test "X$series" != X ; then check_recoll_orig @@ -85,8 +86,8 @@ done ### KIO. -series="bionic focal impish jammy" -series=jammy +series=$SERIES +series= debdir=debiankio topdir=kio-recoll-${RCLVERS} @@ -125,7 +126,7 @@ for svers in $series ; do done ### GSSP -series="bionic focal groovy hirsute impish" +series=$SERIES series= debdir=debiangssp diff --git a/packaging/debian/debian/control-bionic b/packaging/debian/debian/control-bionic index 25d2255d..0dac9335 100644 --- a/packaging/debian/debian/control-bionic +++ b/packaging/debian/debian/control-bionic @@ -8,7 +8,7 @@ Build-Depends: bison, dpkg-dev (>= 1.16.1~), libaspell-dev, libchm-dev, - libqt5webkit5-dev, + qtwebengine5-dev, libx11-dev, libxapian-dev (>= 1.2.0), libxslt1-dev, diff --git a/src/kde/kioslave/kio_recoll/data/help.html b/src/kde/kioslave/kio_recoll/data/help.html index 27624372..2db64f80 100644 --- a/src/kde/kioslave/kio_recoll/data/help.html +++ b/src/kde/kioslave/kio_recoll/data/help.html @@ -31,27 +31,7 @@ email folders, which Konqueror or Dolphin have no way to access.

-

HTML interface

- -

This works more or less like the Recoll QT GUI, much simplified. The - - Recoll manual describes the queries that can be performed.

- -

Most pages in the interface should quite self-explanatory.

- -

You normally enter this interface by entering "recoll:" or - "recoll:/" in the Konqueror URL entry, and following the "search" - link. You can also directly enter "recoll:/search.html".
- - In most circumstances, entering a link like - recoll:/john smith will also - yield an HTML result list.

- -

Compared to QT Recoll, the nice point is that you can click or - drag/drop the icons to access the results in the standard desktop - way.

- -

File manager interface

+

File manager (e.g. Dolphin) interface

The path part of the URI is taken as a Recoll query language string and executed. The results are displayed as @@ -98,5 +78,28 @@

Recoll Search

+

(Obsolete) HTML interface

+ +

This used to work in konqueror, but appears to be broken in recent konqueror versions. Doc + kept for nostalgy.

+ +

This works more or less like the Recoll QT GUI, much simplified. The + + Recoll manual describes the queries that can be performed.

+ +

Most pages in the interface should quite self-explanatory.

+ +

You normally enter this interface by entering "recoll:" or + "recoll:/" in the Konqueror URL entry, and following the "search" + link. You can also directly enter "recoll:/search.html".
+ + In most circumstances, entering a link like + recoll:/john smith will also + yield an HTML result list.

+ +

Compared to QT Recoll, the nice point is that you can click or + drag/drop the icons to access the results in the standard desktop + way.

+ diff --git a/src/kde/kioslave/kio_recoll/dirif.cpp b/src/kde/kioslave/kio_recoll/dirif.cpp index 48284ece..f0c4dd9c 100644 --- a/src/kde/kioslave/kio_recoll/dirif.cpp +++ b/src/kde/kioslave/kio_recoll/dirif.cpp @@ -189,14 +189,12 @@ static void createGoHomeEntry(KIO::UDSEntry& entry) static void createGoHelpEntry(KIO::UDSEntry& entry) { QString location = - QStandardPaths::locate(QStandardPaths::GenericDataLocation, - "kio_recoll/help.html"); + QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kio_recoll/help.html"); entry.clear(); entry.fastInsert(KIO::UDSEntry::UDS_NAME, "help"); entry.fastInsert(KIO::UDSEntry::UDS_DISPLAY_NAME, "Recoll help (click me first)"); entry.fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFREG); - entry.fastInsert(KIO::UDSEntry::UDS_TARGET_URL, QString("file://") + - location); + entry.fastInsert(KIO::UDSEntry::UDS_TARGET_URL, QString("file://") + location); entry.fastInsert(KIO::UDSEntry::UDS_ACCESS, 0500); entry.fastInsert(KIO::UDSEntry::UDS_MIME_TYPE, "text/html"); entry.fastInsert(KIO::UDSEntry::UDS_ICON_NAME, "help"); @@ -292,8 +290,10 @@ void RecollProtocol::listDir(const QUrl& url) KIO::UDSEntry entry; createRootEntry(entry); entries.append(entry); - createGoHomeEntry(entry); - entries.append(entry); + if (!m_alwaysdir) { + createGoHomeEntry(entry); + entries.append(entry); + } createGoHelpEntry(entry); entries.append(entry); listEntries(entries); @@ -310,8 +310,7 @@ void RecollProtocol::listDir(const QUrl& url) // which offers an opportunity to not perform it. if (ingest.endSlashQuery()) { qDebug() << "RecollProtocol::listDir: Ends With /"; - error(ERR_SLAVE_DEFINED, - QString::fromUtf8("Autocompletion search aborted")); + error(ERR_SLAVE_DEFINED, QString::fromUtf8("Autocompletion search aborted")); return; } if (!syncSearch(qd)) { diff --git a/src/kde/kioslave/kio_recoll/htmlif.cpp b/src/kde/kioslave/kio_recoll/htmlif.cpp index 83a9e9bd..06c2fdb2 100644 --- a/src/kde/kioslave/kio_recoll/htmlif.cpp +++ b/src/kde/kioslave/kio_recoll/htmlif.cpp @@ -146,12 +146,10 @@ void RecollProtocol::searchPage() mimeType("text/html"); if (welcomedata.empty()) { QString location = - QStandardPaths::locate(QStandardPaths::GenericDataLocation, - "kio_recoll/welcome.html"); + QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kio_recoll/welcome.html"); string reason; if (location.isEmpty() || - !file_to_string((const char *)location.toUtf8(), - welcomedata, &reason)) { + !file_to_string((const char *)location.toUtf8(), welcomedata, &reason)) { welcomedata = "Recoll Error" "

Could not locate Recoll welcome.html file: "; welcomedata += reason; diff --git a/src/kde/kioslave/kio_recoll/kio_recoll.cpp b/src/kde/kioslave/kio_recoll/kio_recoll.cpp index d83f99f3..e46aeb87 100644 --- a/src/kde/kioslave/kio_recoll/kio_recoll.cpp +++ b/src/kde/kioslave/kio_recoll/kio_recoll.cpp @@ -54,7 +54,7 @@ class KIOPluginForMetaData : public QObject RclConfig *RecollProtocol::o_rclconfig; RecollProtocol::RecollProtocol(const QByteArray& pool, const QByteArray& app) - : SlaveBase("recoll", pool, app), m_initok(false), m_alwaysdir(false) + : SlaveBase("recoll", pool, app), m_initok(false), m_alwaysdir(true) { qDebug() << "RecollProtocol::RecollProtocol()"; if (o_rclconfig == 0) { @@ -86,7 +86,9 @@ RecollProtocol::RecollProtocol(const QByteArray& pool, const QByteArray& app) if (cp) { m_alwaysdir = stringToBool(cp); } else { - o_rclconfig->getConfParam("kio_always_dir", &m_alwaysdir); + bool cfval; + if (o_rclconfig->getConfParam("kio_always_dir", &cfval)) + m_alwaysdir = cfval; } cp = getenv("RECOLL_KIO_STEMLANG"); @@ -129,11 +131,10 @@ void RecollProtocol::mimetype(const QUrl& url) } UrlIngester::UrlIngester(RecollProtocol *p, const QUrl& url) - : m_parent(p), m_slashend(false), m_alwaysdir(false), + : m_parent(p), m_slashend(false), m_alwaysdir(!url.scheme().compare("recollf")), m_retType(UIRET_NONE), m_resnum(0), m_type(UIMT_NONE) { qDebug() << "UrlIngester::UrlIngester: Url: " << url; - m_alwaysdir = !url.scheme().compare("recollf"); QString path = url.path(); if (url.host().isEmpty()) { if (path.isEmpty() || !path.compare("/")) { @@ -165,8 +166,7 @@ UrlIngester::UrlIngester(RecollProtocol *p, const QUrl& url) } else { // Non empty host, url must be something like : // //search/query?q=query¶m=value... - qDebug() << "UrlIngester::UrlIngester: host " << - url.host() << " path " << url.path(); + qDebug() << "UrlIngester::UrlIngester: host " << url.host() << " path " << url.path(); if (url.host().compare("search") || url.path().compare("/query")) { return; } @@ -250,8 +250,7 @@ void RecollProtocol::get(const QUrl& url) switch (rettp) { case UrlIngester::UIRET_HELP: { QString location = - QStandardPaths::locate(QStandardPaths::GenericDataLocation, - "kio_recoll/help.html"); + QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kio_recoll/help.html"); redirection(QUrl::fromLocalFile(location)); } goto out; @@ -289,17 +288,6 @@ void RecollProtocol::get(const QUrl& url) goto out; } } else if (ingest.isQuery(&qd)) { -#if 0 -// Do we need this ? - if (host.isEmpty()) { - char cpage[20]; - sprintf(cpage, "%d", page); - QString nurl = QString::fromAscii("recoll://search/query?q=") + - query + "&qtp=" + opt + "&p=" + cpage; - redirection(QUrl(nurl)); - goto out; - } -#endif // htmlDoSearch does the search syncing (needs to know about changes). htmlDoSearch(qd); goto out; @@ -324,8 +312,7 @@ bool RecollProtocol::doSearch(const QueryDesc& qd) if (opt == 'f') { clp = new Rcl::SearchDataClauseFilename(qs); } else { - clp = new Rcl::SearchDataClauseSimple(opt == 'o' ? Rcl::SCLT_OR : - Rcl::SCLT_AND, qs); + clp = new Rcl::SearchDataClauseSimple(opt == 'o' ? Rcl::SCLT_OR : Rcl::SCLT_AND, qs); } sdata = std::make_shared(Rcl::SCLT_OR, m_stemlang); if (sdata && clp) { @@ -349,8 +336,7 @@ bool RecollProtocol::doSearch(const QueryDesc& qd) } DocSequenceDb *src = - new DocSequenceDb(m_rcldb, std::shared_ptr(query), - "Query results", sdata); + new DocSequenceDb(m_rcldb, std::shared_ptr(query), "Query results", sdata); if (src == 0) { error(KIO::ERR_SLAVE_DEFINED, u8s2qs("Can't build result sequence")); return false;