Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Update
qbittorrent.6522
qbittorrent-fix_qt4_build.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qbittorrent-fix_qt4_build.patch of Package qbittorrent.6522
From 3b5e7eb0eac107ad9b1795e7b355443cf9532d18 Mon Sep 17 00:00:00 2001 From: Chocobo1 <Chocobo1@users.noreply.github.com> Date: Sat, 4 Mar 2017 15:48:37 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20compile=20error:=20=E2=80=98escape?= =?UTF-8?q?=E2=80=99=20is=20not=20a=20member=20of=20=E2=80=98Qt=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/utils/string.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/base/utils/string.cpp b/src/base/utils/string.cpp index 7d76d9a..6c713b1 100644 --- a/src/base/utils/string.cpp +++ b/src/base/utils/string.cpp @@ -34,6 +34,7 @@ #include <QByteArray> #include <QtGlobal> #include <QLocale> + #ifdef QBT_USES_QT5 #include <QCollator> #endif @@ -217,6 +218,23 @@ QString Utils::String::toHtmlEscaped(const QString &str) #ifdef QBT_USES_QT5 return str.toHtmlEscaped(); #else - return Qt::escape(str); + // code from Qt + QString rich; + const int len = str.length(); + rich.reserve(int(len * 1.1)); + for (int i = 0; i < len; ++i) { + if (str.at(i) == QLatin1Char('<')) + rich += QLatin1String("<"); + else if (str.at(i) == QLatin1Char('>')) + rich += QLatin1String(">"); + else if (str.at(i) == QLatin1Char('&')) + rich += QLatin1String("&"); + else if (str.at(i) == QLatin1Char('"')) + rich += QLatin1String("""); + else + rich += str.at(i); + } + rich.squeeze(); + return rich; #endif } From ea9d65f377c3f7111679e627e10532e5eabea1cb Mon Sep 17 00:00:00 2001 From: Chocobo1 <Chocobo1@users.noreply.github.com> Date: Sat, 4 Mar 2017 15:03:39 +0800 Subject: [PATCH] Fix incomplete type compile error with Qt4 --- src/base/http/server.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/base/http/server.cpp b/src/base/http/server.cpp index 1cc51ee..dd57594 100644 --- a/src/base/http/server.cpp +++ b/src/base/http/server.cpp @@ -28,14 +28,18 @@ * exception statement from your version. */ +#include "server.h" + +#include <QNetworkProxy> +#include <QStringList> + #ifndef QT_NO_OPENSSL #include <QSslSocket> #else #include <QTcpSocket> #endif -#include <QNetworkProxy> + #include "connection.h" -#include "server.h" using namespace Http;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor