Review Request 126378: remove kactivities on windows
Oliver Sander
oliver.sander at tu-dresden.de
Thu Mar 16 10:07:56 UTC 2017
> On March 11, 2017, 5:53 p.m., Albert Astals Cid wrote:
> > Patch doesn't apply to master.
>
> Oliver Sander wrote:
> Updated patch: (sorry for posting as text; I am not allowed to do a real patch update)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 2f75a9f1..c08f1358 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -41,7 +41,6 @@ else()
> endif()
>
> find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
> - Activities
> Archive
> Bookmarks
> Completion
> @@ -58,6 +57,11 @@ find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
> Wallet
> WindowSystem
> )
> +if(NOT WIN32)
> + find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
> + Activities
> + )
> +endif()
> find_package(Phonon4Qt5 CONFIG REQUIRED)
>
> set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules)
> diff --git a/shell/CMakeLists.txt b/shell/CMakeLists.txt
> index 59a8d76d..0fd5dec2 100644
> --- a/shell/CMakeLists.txt
> +++ b/shell/CMakeLists.txt
> @@ -24,7 +24,11 @@ ecm_add_app_icon(okular_SRCS ICONS ${ICONS_SRCS})
>
> add_executable(okular ${okular_SRCS})
>
> -target_link_libraries(okular KF5::Parts KF5::WindowSystem KF5::Activities)
> +target_link_libraries(okular KF5::Parts KF5::WindowSystem)
> +
> +if(NOT WIN32)
> + target_link_libraries(okular KF5::Activities)
> +endif()
>
> install(TARGETS okular ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
>
> diff --git a/shell/shell.cpp b/shell/shell.cpp
> index 448b9ff7..966ca397 100644
> --- a/shell/shell.cpp
> +++ b/shell/shell.cpp
> @@ -46,7 +46,9 @@
> #include <KLocalizedString>
> #include <KSharedConfig>
> #include <KIO/Global>
> +#ifndef Q_OS_WIN
> #include <KActivities/ResourceInstance>
> +#endif
>
> // local includes
> #include "kdocumentviewer.h"
> @@ -276,10 +278,12 @@ void Shell::openUrl( const QUrl & url, const QString &serializedOptions )
> {
> if ( openOk )
> {
> +#ifndef Q_OS_WIN
> if ( !m_activityResource )
> m_activityResource = new KActivities::ResourceInstance( window()->winId(), this );
>
> m_activityResource->setUri( url );
> +#endif
> m_recent->addUrl( url );
> }
> else
>
> Albert Astals Cid wrote:
> Oliver please open a new review request if you think this is worthwhile.
>
> Oliver Sander wrote:
> I have no idea whether this is worthwhile. I just wanted to do you a favour.
>
> Albert Vaca Cintora wrote:
> IMO it is good to remove this dependency on Windows. Fixing the patch is also super easy.
>
> Oliver, your patch doesn't compile on Windows: shell.h also includes KActivities. Open a new review once you have a working patch and I think we can merge it.
>
> Albert Vaca Cintora wrote:
> I lied :D There is only a forward reference in shell.h. Still, I think it's still good to ifdef it out, so we get a compilation error instead of a runtime crash if new code uses m_activityResource.
To be honest, I do not actually have a windows machine. If you want I can try to extend the patch with the additional change in shell.h, but I will not be able to test it.
- Oliver
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126378/#review102801
-----------------------------------------------------------
On Dec. 16, 2015, 1:16 a.m., Patrick Spendrin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126378/
> -----------------------------------------------------------
>
> (Updated Dec. 16, 2015, 1:16 a.m.)
>
>
> Review request for kdewin and Okular.
>
>
> Repository: okular
>
>
> Description
> -------
>
> KActivities is not used on Windows, so a hard dependency on it
> only brings unneeded code.
> This patch removes it completely under Windows.
>
>
> Diffs
> -----
>
> CMakeLists.txt 72ff3e8754a9005dd09cf49e83d67b0a4f9258db
> shell/CMakeLists.txt 7a6af745464fe7bb1d6702cc02787e7e6d4c101e
> shell/shell.cpp e69ecbb5e1bde36dbd00e5ff05cdad4e3d2a5f8d
>
> Diff: https://git.reviewboard.kde.org/r/126378/diff/
>
>
> Testing
> -------
>
> Windows.
>
>
> Thanks,
>
> Patrick Spendrin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-windows/attachments/20170316/fe4f349e/attachment-0001.html>
More information about the Kde-windows
mailing list