Hi,

What version of Qt are you using?

I think this might be a Qt bug that you are encountering. 

https://www.mail-archive.com/[email protected]/msg07290.html

There was a patch for KIO to workaround the problem, but it was rejected 
because the proper fix 
is in Qt 5.8.

For building Kate on windows I check the Qt version and apply the attached 
patch if the Qt 
version is less than 5.8


/Kåre



On fredag 31 mars 2017 kl. 13:01:22 EEST Harald Sitter wrote:
> Hola,
> 
> I am tyring to run filelight on windows and encountered a really
> strange behavior in KIO. I am building KIO with KIO_FORK_SLAVES=ON as
> that seems to make the most sense on Windows. That will fork the
> kioslave helper binary to run the slaves rather than going through
> kdeinit. The problem is that the kioslave binary is built with
> ecm_mark_nongui_executable which sets `WIN32_EXECUTABLE FALSE`.
> 
> Maybe I am being daft, but the way I understand it WIN32_EXECUTABLE
> being set to false means that the program will always run in a
> terminal. i.e. it is a cmdline  program. It is like when one sets
> `Terminal=true` in a freedesktop desktop file.
> 
> Long story short: this is what I get due to ecm_mark_nongui_executable
> http://i.imgur.com/sHeyyIp.png
> 
> I am not sure about the OSX implication of ecm_mark_nongui_executable,
> but at least from a Windows point of view it seems to make no sense as
> it brings up this utterly useless command window. I've confirmed that
> not calling ecm_mark_nongui_executable in fact gets rid of the window.
> 
> I guess I am asking for confirmation that we can drop the call
> entirely and if not if we there is any downside to dropping it for
> windows.
> 
> Cheers,
> HS


diff --git a/src/ioslaves/http/CMakeLists.txt b/src/ioslaves/http/CMakeLists.txt
index 76a8e2800b84c312431cc1996ac81d1ef6fb5cfc..144119d0b306d974e1c6f40745575104d8a74d48 100644
--- a/src/ioslaves/http/CMakeLists.txt
+++ b/src/ioslaves/http/CMakeLists.txt
@@ -38,7 +38,7 @@ set(kio_http_cache_cleaner_SRCS
    )
 
 
-add_executable(kio_http_cache_cleaner ${kio_http_cache_cleaner_SRCS})
+add_executable(kio_http_cache_cleaner WIN32 ${kio_http_cache_cleaner_SRCS})
 
 target_link_libraries(kio_http_cache_cleaner
    Qt5::DBus
diff --git a/src/ioslaves/http/kcookiejar/CMakeLists.txt b/src/ioslaves/http/kcookiejar/CMakeLists.txt
index 7b4778d1f67c1ad9f9edcaa4692b39ee6fe3f365..7d33c52a34619be8667e43baaabbeae99559bb99 100644
--- a/src/ioslaves/http/kcookiejar/CMakeLists.txt
+++ b/src/ioslaves/http/kcookiejar/CMakeLists.txt
@@ -5,8 +5,7 @@ set_source_files_properties(${kcookieserver_xml} PROPERTIES INCLUDE "kcookiejar_
 qt5_add_dbus_interfaces(kcookiejar_SRCS ${kcookieserver_xml})
 
 set(kcookiejar_SRCS ${kcookiejar_SRCS} main.cpp)
-add_executable( kcookiejar5 ${kcookiejar_SRCS})
-ecm_mark_nongui_executable(kcookiejar5)
+add_executable(kcookiejar5 WIN32 ${kcookiejar_SRCS})
 
 target_link_libraries( kcookiejar5
    Qt5::DBus
diff --git a/src/kioexec/CMakeLists.txt b/src/kioexec/CMakeLists.txt
index 91284a3a61b86770b4d1939da52d256840803608..ef63d39eca1cf7132c4b8896276bb68cbb29c5cc 100644
--- a/src/kioexec/CMakeLists.txt
+++ b/src/kioexec/CMakeLists.txt
@@ -1,9 +1,7 @@
-add_executable(kioexec main.cpp)
+add_executable(kioexec WIN32 main.cpp)
 
 configure_file(config-kioexec.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kioexec.h)
 
-ecm_mark_nongui_executable(kioexec)
-
 target_link_libraries(kioexec
     Qt5::Widgets
     KF5::I18n
diff --git a/src/kioslave/CMakeLists.txt b/src/kioslave/CMakeLists.txt
index e02febd380b268c596e8ecc3b745b6f50993ab4e..89c10c0c9c800b605a835182af4ffa11f6e7803b 100644
--- a/src/kioslave/CMakeLists.txt
+++ b/src/kioslave/CMakeLists.txt
@@ -1,5 +1,4 @@
-add_executable(kioslave kioslave.cpp)
-ecm_mark_nongui_executable(kioslave)
+add_executable(kioslave WIN32 kioslave.cpp)
 
 target_link_libraries(kioslave
    KF5::KIOCore
diff --git a/src/kpac/CMakeLists.txt b/src/kpac/CMakeLists.txt
index fc5989714480ca49b5bd72e1c7b458b26bd0d9bc..b8f5e17dd0878e03ccd9a3fa6f076368d1689972 100644
--- a/src/kpac/CMakeLists.txt
+++ b/src/kpac/CMakeLists.txt
@@ -44,8 +44,7 @@ endif()
 
 ########### next target ###############
 
-add_executable(kpac_dhcp_helper kpac_dhcp_helper.c)
-ecm_mark_nongui_executable(kpac_dhcp_helper)
+add_executable(kpac_dhcp_helper WIN32 kpac_dhcp_helper.c)
 
 if (HAVE_NSL_LIBRARY)
   # Assume Solaris

Reply via email to