[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-windows
Subject: Re: Review Request 126378: remove kactivities on windows
From: Albert Vaca Cintora <albertvaka () gmail ! com>
Date: 2017-03-16 10:03:43
Message-ID: 20170316100343.22544.78314 () mimi ! kde ! org
[Download RAW message or body]
--===============3173609580219377946==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
> 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
>
>
--===============3173609580219377946==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/126378/">https://git.reviewboard.kde.org/r/126378/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On març 11th, 2017, 9:53 a.m. PST, <b>Albert \
Astals Cid</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px \
solid #d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Patch doesn't apply to master.</p></pre> \
</blockquote>
<p>On març 15th, 2017, 2:48 p.m. PDT, <b>Oliver Sander</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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</pre>
</blockquote>
<p>On març 15th, 2017, 3:38 p.m. PDT, <b>Albert Astals Cid</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Oliver please open a new review request if you think this is \
worthwhile.</p></pre> </blockquote>
<p>On març 15th, 2017, 7:31 p.m. PDT, <b>Oliver Sander</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I \
have no idea whether this is worthwhile. I just wanted to do you a favour.</p></pre> \
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre> \
<br />
<p>- Albert</p>
<br />
<p>On desembre 15th, 2015, 5:16 p.m. PST, Patrick Spendrin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for kdewin and Okular.</div>
<div>By Patrick Spendrin.</div>
<p style="color: grey;"><i>Updated des. 15, 2015, 5:16 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
okular
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">KActivities is not used on Windows, so a hard dependency on it only \
brings unneeded code. This patch removes it completely under Windows.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Windows.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>CMakeLists.txt <span style="color: \
grey">(72ff3e8754a9005dd09cf49e83d67b0a4f9258db)</span></li>
<li>shell/CMakeLists.txt <span style="color: \
grey">(7a6af745464fe7bb1d6702cc02787e7e6d4c101e)</span></li>
<li>shell/shell.cpp <span style="color: \
grey">(e69ecbb5e1bde36dbd00e5ff05cdad4e3d2a5f8d)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/126378/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============3173609580219377946==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic