Review Request 126378: remove kactivities on windows

Albert Vaca Cintora albertvaka at gmail.com
Thu Mar 16 10:03:43 UTC 2017



> On mar. 11, 2017, 9:53 a.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.

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


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126378/#review102801
-----------------------------------------------------------


On des. 15, 2015, 5:16 p.m., Patrick Spendrin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126378/
> -----------------------------------------------------------
> 
> (Updated des. 15, 2015, 5:16 p.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/okular-devel/attachments/20170316/25601988/attachment.html>


More information about the Okular-devel mailing list