Support Qt5 #357

Closed
opened 2026-02-21 15:02:53 -05:00 by deekerman · 9 comments
Owner

Originally created by @Gelmir on GitHub (Feb 11, 2013).

It might be a little early, but still worth opening an issue.

I'm currently compiling necessary fixes to be able to compile at least.

https://github.com/Gelmir/qBittorrent/commits/Qt5

Currently required:

  1. Guarding boost/libtorrent includes with Q_MOC_RUN - fails at configure time otherwise. Haven't tried 5.0.1, but I'd bet bug still exists (was present since 5.0 beta1)
  2. Replacing Q_WS_ macros with Q_OS_ macros
  3. Replacing QString toAscii and fromAscii calls to [to|from]Latin1 calls
  4. Updating qsingleapplication class
  5. Going away from obsolete QHttp[Response|Request] classes.
  6. Removing plastique style when building with Qt5
  7. Make pro/pri files compatible with Qt5
Originally created by @Gelmir on GitHub (Feb 11, 2013). It might be a little early, but still worth opening an issue. I'm currently compiling necessary fixes to be able to **compile** at least. https://github.com/Gelmir/qBittorrent/commits/Qt5 Currently required: 1. Guarding boost/libtorrent includes with `Q_MOC_RUN` - fails at configure time otherwise. Haven't tried 5.0.1, but I'd bet bug still exists (was present since 5.0 beta1) 2. Replacing `Q_WS_` macros with `Q_OS_` macros 3. Replacing QString `toAscii` and `fromAscii` calls to `[to|from]Latin1` calls 4. Updating qsingleapplication class 5. Going away from obsolete `QHttp[Response|Request]` classes. 6. Removing plastique style when building with Qt5 7. Make pro/pri files compatible with Qt5
Author
Owner

@sledgehammer999 commented on GitHub (May 4, 2014):

Qt5 support is merged into master now.

@sledgehammer999 commented on GitHub (May 4, 2014): Qt5 support is merged into master now.
Author
Owner

@john-peterson commented on GitHub (Mar 8, 2015):

fails again

D:\repo\qbittorrent\win>qmake -spec win32-msvc2013 ../qbittorrent.pro
Project MESSAGE: GeoIP database will not be embedded in qBittorrent executable.
Project MESSAGE: Building translations
Project MESSAGE: Processing lang/qbittorrent_fr
'lrelease' is not recognized as an internal or external command,
operable program or batch file.
Project ERROR: Building translations failed, cannot continue
@john-peterson commented on GitHub (Mar 8, 2015): fails again ``` D:\repo\qbittorrent\win>qmake -spec win32-msvc2013 ../qbittorrent.pro Project MESSAGE: GeoIP database will not be embedded in qBittorrent executable. Project MESSAGE: Building translations Project MESSAGE: Processing lang/qbittorrent_fr 'lrelease' is not recognized as an internal or external command, operable program or batch file. Project ERROR: Building translations failed, cannot continue ```
Author
Owner

@sledgehammer999 commented on GitHub (Mar 8, 2015):

@john-peterson you have not build lrelease exucutable from qt5. Did you do a half-build? It is normally from the default tools that gets build.

@sledgehammer999 commented on GitHub (Mar 8, 2015): @john-peterson you have not build lrelease exucutable from qt5. Did you do a half-build? It is normally from the default tools that gets build.
Author
Owner

@john-peterson commented on GitHub (Mar 8, 2015):

k i copied the file from the package C:\Qt\5.4\msvc2013_64

still fail

d:\repo\qbittorrent\src\app\stacktrace_win.h(147) : error C3861: 'RtlCaptureContext': identifier not found
@john-peterson commented on GitHub (Mar 8, 2015): k i copied the file from the package C:\Qt\5.4\msvc2013_64 still fail ``` d:\repo\qbittorrent\src\app\stacktrace_win.h(147) : error C3861: 'RtlCaptureContext': identifier not found ```
Author
Owner

@sledgehammer999 commented on GitHub (Mar 8, 2015):

Are you doing a 64bit build? Does the qt4 64bit build work?

@sledgehammer999 commented on GitHub (Mar 8, 2015): Are you doing a 64bit build? Does the qt4 64bit build work?
Author
Owner

@john-peterson commented on GitHub (Mar 8, 2015):

yes it's the same problem with qt4. but it goes away after i increase _WIN32_WINNT

diff --git a/winconf.pri b/winconf.pri
index 267ef95..ec6bbf5 100644
--- a/winconf.pri
+++ b/winconf.pri
@@ -26,7 +26,7 @@ DEFINES += _UNICODE
 DEFINES += WIN32
 DEFINES += _WIN32
 DEFINES += WIN32_LEAN_AND_MEAN
-DEFINES += _WIN32_WINNT=0x0500
+DEFINES += _WIN32_WINNT=0x0501
 DEFINES += _WIN32_IE=0x0500
 DEFINES += _CRT_SECURE_NO_DEPRECATE
 DEFINES += _SCL_SECURE_NO_DEPRECATE
@john-peterson commented on GitHub (Mar 8, 2015): yes it's the same problem with qt4. but it goes away after i increase _WIN32_WINNT ``` diff diff --git a/winconf.pri b/winconf.pri index 267ef95..ec6bbf5 100644 --- a/winconf.pri +++ b/winconf.pri @@ -26,7 +26,7 @@ DEFINES += _UNICODE DEFINES += WIN32 DEFINES += _WIN32 DEFINES += WIN32_LEAN_AND_MEAN -DEFINES += _WIN32_WINNT=0x0500 +DEFINES += _WIN32_WINNT=0x0501 DEFINES += _WIN32_IE=0x0500 DEFINES += _CRT_SECURE_NO_DEPRECATE DEFINES += _SCL_SECURE_NO_DEPRECATE ```
Author
Owner

@john-peterson commented on GitHub (Mar 8, 2015):

stacktrace_win.h was still complaining about RtlCaptureContext because it wasn't rebuilt with the changed _WIN32_WINNT

it wants qnativewifibearer.lib which isn't in C:\Qt\5.4\msvc2013_64

LINK : fatal error LNK1181: cannot open input file 'D:\file\code\lib\qt\qtbase\plugins\bearer\qnativewifibearer.lib'
@john-peterson commented on GitHub (Mar 8, 2015): stacktrace_win.h was still complaining about RtlCaptureContext because it wasn't rebuilt with the changed _WIN32_WINNT it wants qnativewifibearer.lib which isn't in C:\Qt\5.4\msvc2013_64 ``` LINK : fatal error LNK1181: cannot open input file 'D:\file\code\lib\qt\qtbase\plugins\bearer\qnativewifibearer.lib' ```
Author
Owner

@sledgehammer999 commented on GitHub (Mar 8, 2015):

Someone has posted inscutrions for 32bit and 64bit with msvc2013 here: https://github.com/qbittorrent/qBittorrent/wiki/Compiling-with-MSVC-2013-%28static-linkage%29
Take a look there. Did you build qt5 or was it pre-packaged?

@sledgehammer999 commented on GitHub (Mar 8, 2015): Someone has posted inscutrions for 32bit and 64bit with msvc2013 here: https://github.com/qbittorrent/qBittorrent/wiki/Compiling-with-MSVC-2013-%28static-linkage%29 Take a look there. Did you build qt5 or was it pre-packaged?
Author
Owner

@john-peterson commented on GitHub (Mar 8, 2015):

k it works when i use the package 👍

it wanted qnativewifibearer.lib because i was building against a failed qt5 build which i had copied the package over

@john-peterson commented on GitHub (Mar 8, 2015): k it works when i use the package :+1: it wanted qnativewifibearer.lib because i was building against a failed qt5 build which i had copied the package over
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#357
No description provided.