Commit 140fa26a authored by Luigi Toscano's avatar Luigi Toscano
Browse files

Merge remote-tracking branch 'origin/Applications/17.08'

parents 09ca004d bc0bc0f1
......@@ -98,6 +98,9 @@ kconfig_add_kcfg_files(khelpcenter_KDEINIT_SRCS prefs.kcfgc )
kf5_add_kdeinit_executable( khelpcenter ${khelpcenter_KDEINIT_SRCS})
target_compile_definitions(kdeinit_khelpcenter PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}")
target_link_libraries(kdeinit_khelpcenter KF5::KHtml KF5::Service KF5::DBusAddons KF5::ConfigGui KF5::WindowSystem KF5::Bookmarks Qt5::Xml Grantlee5::Templates)
if (${KF5_VERSION} VERSION_GREATER 5.36.0)
target_link_libraries(kdeinit_khelpcenter KF5::DocTools)
endif()
install(TARGETS kdeinit_khelpcenter ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(TARGETS khelpcenter ${INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -410,7 +410,7 @@ otherterm="gloss-kbuildsycoca"><application>KBuildSycoca</application></glosssee
And not only contributors, but users and fans of &kde; software can be found throughout the entire globe, giving help to other users,
spreading the news, or just simply enjoying the experience.
You can find more detailed information at &linkstart;"http://www.kde.org"&linkmid;www.kde.org&linkend;.&newpara;
The name changed its meaning over the time. You can discover more about its history over &linkstart;"https://www.kde.org/community/history/"&linkmid;the KDE history webpage&linkend;.
The name changed its meaning over time. You can discover more about its history over &linkstart;"https://www.kde.org/community/history/"&linkmid;the KDE history webpage&linkend;.
</para>
<glossseealso otherterm="gloss-gui">&GUI;</glossseealso>
</glossdef>
......
......@@ -37,7 +37,7 @@
<default>0</default>
</entry>
<entry type="Int" key="MaxCount">
<default>0</default>
<default>1</default>
</entry>
</group>
......
......@@ -17,6 +17,9 @@ add_executable(khc_xapianindexer ${khc_xapianindexer_SOURCES})
kde_target_enable_exceptions(khc_xapianindexer PRIVATE)
ecm_mark_nongui_executable(khc_xapianindexer)
target_link_libraries(khc_xapianindexer Qt5::Core KF5::Archive ${XAPIAN_LIBRARIES} ${LIBXML2_LIBRARIES})
if (${KF5_VERSION} VERSION_GREATER 5.36.0)
target_link_libraries(khc_xapianindexer KF5::DocTools)
endif()
install(TARGETS khc_xapianindexer DESTINATION ${LIBEXEC_INSTALL_DIR})
# Xapian search
......
......@@ -23,6 +23,11 @@
#include "htmltextdump.h"
#include "xapiancommon.h"
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 36, 0)
#include <docbookxslt.h>
#endif
#include <QCoreApplication>
#include <QCommandLineParser>
#include <QDebug>
......@@ -30,6 +35,7 @@
#include <QDirIterator>
#include <QLoggingCategory>
#include <QStandardPaths>
#include <QStringBuilder>
namespace {
......@@ -222,7 +228,22 @@ int main( int argc, char *argv[] )
QSet<Xapian::docid> handledDocuments;
const std::string std_lang = lang.toStdString();
#if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 36, 0)
const QStringList docDirs = KDocTools::documentationDirs();
QStringList localDoc;
QStringList::ConstIterator it = docDirs.constBegin();
for ( ; it != docDirs.constEnd(); ++it ) {
const QString docDirLangName = QString( ( *it ) % "/" % lang % "/" );
QFileInfo docDirLang = QFileInfo( docDirLangName );
if ( docDirLang.exists() && docDirLang.isDir() ) {
localDoc << docDirLangName;
}
}
#else
const QStringList localDoc = QStandardPaths::locateAll( QStandardPaths::GenericDataLocation, QStringLiteral("doc/HTML/") + lang + "/", QStandardPaths::LocateDirectory );
#endif
qCDebug(LOG) << "documentation directories:" << localDoc;
Q_FOREACH ( const QString &path, localDoc ) {
walkFiles( path, std_lang, db, xgen, &handledDocuments );
......
......@@ -25,6 +25,11 @@
#include <KProcess>
#include <KXmlGuiWindow>
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 36, 0)
#include <docbookxslt.h>
#endif
#include <QStatusBar>
#include <QFileInfo>
......@@ -83,7 +88,11 @@ void TOC::build( const QString &file )
{
QFileInfo fileInfo( file );
QString fileName = fileInfo.absoluteFilePath();
#if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 36, 0)
const QStringList resourceDirs = KDocTools::documentationDirs();
#else
const QStringList resourceDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/HTML", QStandardPaths::LocateDirectory);
#endif
QStringList::ConstIterator it = resourceDirs.begin();
QStringList::ConstIterator end = resourceDirs.end();
for ( ; it != end; ++it ) {
......
......@@ -14,7 +14,10 @@
#include <KHTMLView>
#include <KToolBarPopupAction>
#include <KSharedConfig>
#include <ki18n_version.h>
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 36, 0)
#include <docbookxslt.h>
#endif
#include <QFileInfo>
#include <QClipboard>
......@@ -94,8 +97,13 @@ QString View::langLookup( const QString &fname )
{
QStringList search;
#if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 36, 0)
// retrieve the local search path
const QStringList localDoc = KDocTools::documentationDirs();
#else
// assemble the local search paths
const QStringList localDoc = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("doc/HTML"), QStandardPaths::LocateDirectory);
#endif
QStringList langs = KLocalizedString::languages();
langs.append(QStringLiteral("en"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment