Hello community, here is the log from the commit of package khelpcenter5 for openSUSE:Factory checked in at 2015-05-11 19:29:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/khelpcenter5 (Old) and /work/SRC/openSUSE:Factory/.khelpcenter5.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "khelpcenter5" Changes: -------- New Changes file: --- /dev/null 2015-04-29 01:05:10.436023256 +0200 +++ /work/SRC/openSUSE:Factory/.khelpcenter5.new/khelpcenter5.changes 2015-05-11 19:29:33.000000000 +0200 @@ -0,0 +1,12 @@ +------------------------------------------------------------------- +Thu Apr 23 13:27:21 UTC 2015 - [email protected] + +- Update to 5.3 Final: + * For more details please see: + https://www.kde.org/announcements/plasma-5.3.0.php + +------------------------------------------------------------------- +Sun Apr 12 10:03:30 UTC 2015 - [email protected] + +- Initial package + New: ---- coinstall.patch khelpcenter-5.3.0.tar.xz khelpcenter-fallback-to-kde4-docs.patch khelpcenter-use-susehelp.patch khelpcenter5.changes khelpcenter5.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ khelpcenter5.spec ++++++ # # spec file for package khelpcenter5 # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %bcond_without lang Name: khelpcenter5 BuildRequires: extra-cmake-modules BuildRequires: kcmutils-devel BuildRequires: kconfig-devel BuildRequires: kdelibs4support-devel BuildRequires: kf5-filesystem BuildRequires: khtml-devel BuildRequires: kinit-devel BuildRequires: update-desktop-files BuildRequires: pkgconfig(Qt5DBus) >= 5.4.0 BuildRequires: pkgconfig(Qt5Widgets) >= 5.4.0 %if %{with lang} Recommends: %{name}-lang %endif Provides: suse_help_viewer Url: http://www.kde.org Summary: KDE Documentation Application License: GPL-2.0+ Group: Productivity/Other Version: 5.3.0 Release: 0 Source: khelpcenter-%{version}.tar.xz # PATCH-FIX-OPENSUSE khelpcenter-use-susehelp.patch -- use susehelp wrapper instead of directly starting khelpcenter Patch0: khelpcenter-use-susehelp.patch # PATCH-FIX-OPENSUSE coinstall.patch -- allow to have khelpcenter5 installed with kdebase4-runtime Patch1: coinstall.patch # PATCH-FIX-OPENSUSE khelpcenter-fallback-to-kde4-docs.patch -- allow khelpcenter to see into kde4 documentation Patch2: khelpcenter-fallback-to-kde4-docs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Application to show KDE Applications' documentation. %lang_package %prep %setup -q -n khelpcenter-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %build %cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5 %make_jobs %install %kf5_makeinstall -C build %suse_update_desktop_file org.kde.Help Documentation Viewer rm -rfv %{buildroot}%{_kf5_sharedir}/dbus-1/interfaces/org.kde.khelpcenter.kcmhelpcenter.xml %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc COPYING* README* %{_kf5_libdir}/libkdeinit5_khelpcenter5.so %{_kf5_bindir}/khelpcenter5 %{_kf5_applicationsdir}/org.kde.Help.desktop %{_kf5_configkcfgdir}/ %{_kf5_servicesdir}/ %exclude %{_kf5_sharedir}/kde4/services/khelpcenter.desktop %{_kf5_sharedir}/kde4/ %{_kf5_sharedir}/kxmlgui5/ %{_kf5_sharedir}/khelpcenter/ %{_kf5_libdir}/libexec/ %dir %{_kf5_htmldir}/en %dir %{_kf5_htmldir} %doc %lang(en) %{_kf5_htmldir}/en/*/ %if %{with lang} %files lang %defattr(-,root,root) %{_kf5_localedir}/ %doc %lang(de) %{_kf5_htmldir}/de/ %doc %lang(it) %{_kf5_htmldir}/it/ %doc %lang(nl) %{_kf5_htmldir}/nl/ %doc %lang(sv) %{_kf5_htmldir}/sv/ %doc %lang(uk) %{_kf5_htmldir}/uk/ %doc %lang(pt_BR) %{_kf5_htmldir}/pt_BR/ %endif %changelog ++++++ coinstall.patch ++++++ diff --git a/CMakeLists.txt b/CMakeLists.txt index 207dc0d..f208bae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,11 +81,11 @@ qt5_add_dbus_adaptor( khelpcenter_KDEINIT_SRCS org.kde.khelpcenter.kcmhelpcenter kconfig_add_kcfg_files(khelpcenter_KDEINIT_SRCS prefs.kcfgc ) # kf5_add_app_icon(khelpcenter_KDEINIT_SRCS "${KDE4_INSTALL_DIR}/share/icons/oxygen/*/apps/help-browser.png") -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::KCMUtils KF5::Service KF5::DBusAddons KF5::KDELibs4Support Qt5::Xml) -install(TARGETS kdeinit_khelpcenter ${INSTALL_TARGETS_DEFAULT_ARGS} ) -install(TARGETS khelpcenter ${INSTALL_TARGETS_DEFAULT_ARGS}) +kf5_add_kdeinit_executable( khelpcenter5 ${khelpcenter_KDEINIT_SRCS}) +target_compile_definitions(kdeinit_khelpcenter5 PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}") +target_link_libraries(kdeinit_khelpcenter5 KF5::KHtml KF5::KCMUtils KF5::Service KF5::DBusAddons KF5::KDELibs4Support Qt5::Xml) +install(TARGETS kdeinit_khelpcenter5 ${INSTALL_TARGETS_DEFAULT_ARGS} ) +install(TARGETS khelpcenter5 ${INSTALL_TARGETS_DEFAULT_ARGS}) ########### install files ############### ++++++ khelpcenter-fallback-to-kde4-docs.patch ++++++ diff --git a/toc.cpp b/toc.cpp index e293ae8..42653d1 100644 --- a/toc.cpp +++ b/toc.cpp @@ -84,7 +84,9 @@ void TOC::build( const QString &file ) { QFileInfo fileInfo( file ); QString fileName = fileInfo.absoluteFilePath(); - const QStringList resourceDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/HTML"); + QStringList resourceDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/HTML"); + QStringList fallbackresourceDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/kde/HTML"); + resourceDirs.append(fallbackresourceDirs); QStringList::ConstIterator it = resourceDirs.begin(); QStringList::ConstIterator end = resourceDirs.end(); for ( ; it != end; ++it ) { diff --git a/view.cpp b/view.cpp index c419bb0..853129b 100644 --- a/view.cpp +++ b/view.cpp @@ -105,6 +105,19 @@ QString View::langLookup( const QString &fname ) } } + // assemble the local KDE4 search paths + const QStringList localkde4Doc = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); + + // look up the different languages + for (int id=localkde4Doc.count()-1; id >= 0; --id) + { + QDir kde4d(QStringLiteral("%1/doc/KDE/HTML/").arg(localkde4Doc[id])); + + foreach(const QString& entry, kde4d.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { + search.append(kde4d.absoluteFilePath(entry+'/'+fname)); + } + } + // try to locate the file QStringList::Iterator it; for (it = search.begin(); it != search.end(); ++it) ++++++ khelpcenter-use-susehelp.patch ++++++ diff --git a/khelpcenter.desktop b/khelpcenter.desktop index 79738ef..80144b4 100644 --- a/khelpcenter.desktop +++ b/khelpcenter.desktop @@ -186,5 +186,5 @@ Icon=help-browser X-DocPath=khelpcenter/index.html Type=Service Terminal=false -Exec=khelpcenter %u +Exec=susehelp %u X-KDE-StartupNotify=true diff --git a/org.kde.Help.desktop b/org.kde.Help.desktop index f878903..db16cb2 100755 --- a/org.kde.Help.desktop +++ b/org.kde.Help.desktop @@ -1,6 +1,6 @@ [Desktop Entry] -Exec=khelpcenter +Exec=khelpcenter5 Icon=help-browser X-DocPath=khelpcenter/index.html Type=Application
