summaryrefslogtreecommitdiffstats
path: root/plugins/apps/qbittorrent-1-fixes.patch
blob: 08534e48674b4ec427b3dca05c91c16b957c3ee5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
This file is part of MXE.
See index.html for further information.

Contains ad hoc patches for cross building.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 30 Aug 2015 00:28:50 +0200
Subject: [PATCH] do not check qmake existance

Fix ./configure error:

checking for mxe/usr/i686-w64-mingw32.static/qt/bin/qmake...
configure: error: cannot check for file existence when
cross compiling

diff --git a/configure b/configure
index 1111111..2222222 100755
--- a/configure
+++ b/configure
@@ -4540,7 +4540,7 @@ if eval \${$as_ac_File+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
-  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+  echo "cannot check for file existence when cross compiling" "$LINENO" 5
 if test -r "$QT_QMAKE/qmake"; then
   eval "$as_ac_File=yes"
 else

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 30 Aug 2015 01:58:17 +0200
Subject: [PATCH] convert includes like <Windows.h> to lowercase


diff --git a/src/app/application.cpp b/src/app/application.cpp
index 1111111..2222222 100644
--- a/src/app/application.cpp
+++ b/src/app/application.cpp
@@ -35,7 +35,7 @@
 
 #ifndef DISABLE_GUI
 #ifdef Q_OS_WIN
-#include <Windows.h>
+#include <windows.h>
 #include <QSharedMemory>
 #include <QSessionManager>
 #endif // Q_OS_WIN
diff --git a/src/core/misc.cpp b/src/core/misc.cpp
index 1111111..2222222 100644
--- a/src/core/misc.cpp
+++ b/src/core/misc.cpp
@@ -54,7 +54,7 @@
 
 #ifdef Q_OS_WIN
 #include <windows.h>
-#include <PowrProf.h>
+#include <powrprof.h>
 const int UNLEN = 256;
 #else
 #include <unistd.h>
diff --git a/src/core/preferences.cpp b/src/core/preferences.cpp
index 1111111..2222222 100644
--- a/src/core/preferences.cpp
+++ b/src/core/preferences.cpp
@@ -46,7 +46,7 @@
 #endif
 
 #ifdef Q_OS_WIN
-#include <ShlObj.h>
+#include <shlobj.h>
 #include <winreg.h>
 #endif
 
diff --git a/src/core/qtlibtorrent/filterparserthread.h b/src/core/qtlibtorrent/filterparserthread.h
index 1111111..2222222 100644
--- a/src/core/qtlibtorrent/filterparserthread.h
+++ b/src/core/qtlibtorrent/filterparserthread.h
@@ -45,7 +45,7 @@ using namespace std;
 // P2B Stuff
 #include <string.h>
 #ifdef Q_OS_WIN
-#include <Winsock2.h>
+#include <winsock2.h>
 #else
 #include <arpa/inet.h>
 #endif
diff --git a/src/core/qtlibtorrent/qtorrenthandle.cpp b/src/core/qtlibtorrent/qtorrenthandle.cpp
index 1111111..2222222 100644
--- a/src/core/qtlibtorrent/qtorrenthandle.cpp
+++ b/src/core/qtlibtorrent/qtorrenthandle.cpp
@@ -48,7 +48,7 @@
 #include <libtorrent/entry.hpp>
 
 #ifdef Q_OS_WIN
-#include <Windows.h>
+#include <windows.h>
 #endif
 
 using namespace libtorrent;
diff --git a/src/gui/powermanagement/powermanagement.cpp b/src/gui/powermanagement/powermanagement.cpp
index 1111111..2222222 100644
--- a/src/gui/powermanagement/powermanagement.cpp
+++ b/src/gui/powermanagement/powermanagement.cpp
@@ -40,7 +40,7 @@
 #endif
 
 #ifdef Q_OS_WIN
-#include <Windows.h>
+#include <windows.h>
 #endif
 
 PowerManagement::PowerManagement(QObject *parent) : QObject(parent), m_busy(false)

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 30 Aug 2015 01:59:15 +0200
Subject: [PATCH] remove unused members of peerlistwidget

They were still generated by MOC and caused compilation errors

diff --git a/src/gui/properties/peerlistwidget.h b/src/gui/properties/peerlistwidget.h
index 1111111..2222222 100644
--- a/src/gui/properties/peerlistwidget.h
+++ b/src/gui/properties/peerlistwidget.h
@@ -83,11 +83,6 @@ protected slots:
   void saveSettings() const;
   void showPeerListMenu(const QPoint&);
 
-#if LIBTORRENT_VERSION_NUM < 10000
-  void limitUpRateSelectedPeers(const QStringList& peer_ips);
-  void limitDlRateSelectedPeers(const QStringList& peer_ips);
-#endif
-
   void banSelectedPeers(const QStringList& peer_ips);
   void handleSortColumnChanged(int col);
 

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 30 Aug 2015 02:02:39 +0200
Subject: [PATCH] fix library list

Replace library list hardcoded in qmake files with
libraries found by autotools.

diff --git a/configure b/configure
index 1111111..2222222 100755
--- a/configure
+++ b/configure
@@ -8469,7 +8469,7 @@ fi
 $as_echo "$as_me: Running qmake to generate the makefile..." >&6;}
 CONFDIR="$( cd "$( dirname "$0" )" && pwd )"
 
-$QT_QMAKE -r $CONFDIR/qbittorrent.pro
+$QT_QMAKE -r $CONFDIR/qbittorrent.pro "QMAKE_LRELEASE=$QMAKE_LRELEASE" "CONF_LIBS=$LIBS"
 
 ret="$?"
 
diff --git a/winconf-mingw.pri b/winconf-mingw.pri
index 1111111..2222222 100644
--- a/winconf-mingw.pri
+++ b/winconf-mingw.pri
@@ -17,19 +17,8 @@ CONFIG(debug, debug|release) {
 
 RC_FILE = qbittorrent_mingw.rc
 
-# Adapt the lib names/versions accordingly
-CONFIG(debug, debug|release) {
-  LIBS += libtorrent \
-          libboost_system-mgw45-mt-d-1_47 \
-          libboost_filesystem-mgw45-mt-d-1_47 \
-          libboost_thread-mgw45-mt-d-1_47
-} else {
-  LIBS += libtorrent \
-          libboost_system-mgw45-mt-1_47 \
-          libboost_filesystem-mgw45-mt-1_47 \
-          libboost_thread-mgw45-mt-1_47
-}
+LIBS += $$CONF_LIBS
 
 LIBS += libadvapi32 libshell32 libuser32
-LIBS += libcrypto.dll libssl.dll libwsock32 libws2_32 libz libiconv.dll
+LIBS += libcrypto libssl libwsock32 libws2_32 libz libiconv
 LIBS += libpowrprof
diff --git a/winconf.pri b/winconf.pri
index 1111111..2222222 100644
--- a/winconf.pri
+++ b/winconf.pri
@@ -9,15 +9,6 @@ INCLUDEPATH += $$quote(C:/qBittorrent/Zlib/include)
 # Point this to the openssl include folder
 INCLUDEPATH += $$quote(C:/qBittorrent/openssl/include)
 
-# Point this to the boost lib folder
-LIBS += $$quote(-LC:/qBittorrent/boost_1_51_0/stage/lib)
-# Point this to the libtorrent lib folder
-LIBS += $$quote(-LC:/qBittorrent/RC_0_16/bin/<path-according-to-the-build-options-chosen>)
-# Point this to the zlib lib folder
-LIBS += $$quote(-LC:/qBittorrent/Zlib/lib)
-# Point this to the openssl lib folder
-LIBS += $$quote(-LC:/qBittorrent/openssl/lib)
-
 # LIBTORRENT DEFINES
 DEFINES += BOOST_ALL_NO_LIB
 DEFINES += BOOST_ASIO_HASH_MAP_BUCKETS=1021
@@ -47,12 +38,7 @@ CONFIG(debug, debug|release) {
 # Enable backtrace support
 CONFIG += strace_win
 
-win32-g++ {
-    include(winconf-mingw.pri)
-}
-else {
-    include(winconf-msvc.pri)
-}
+include(winconf-mingw.pri)
 
 DEFINES += WITH_GEOIP_EMBEDDED
 message("On Windows, GeoIP database must be embedded.")