From c60344217aa81f3b59636ba81a2c2636bdc39dd8 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 17:18:48 +0100 Subject: [PATCH] Qt5 compile fix for crash report tool --- .../misc/crash_report/crash_report_socket.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.cpp b/code/nel/tools/misc/crash_report/crash_report_socket.cpp index 5f8720e05..f2a14e84b 100644 --- a/code/nel/tools/misc/crash_report/crash_report_socket.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_socket.cpp @@ -21,6 +21,9 @@ #include #include #include +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) +# include +#endif class CCrashReportSocketPvt { @@ -43,16 +46,26 @@ CCrashReportSocket::~CCrashReportSocket() void CCrashReportSocket::sendReport( const SCrashReportData &data ) { +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + QUrlQuery params; +#else QUrl params; +#endif params.addQueryItem( "report", data.report ); params.addQueryItem( "descr", data.description ); - params.addQueryItem( "email", data.email ); + params.addQueryItem("email", data.email); QUrl url( m_url ); QNetworkRequest request( url ); request.setRawHeader( "Connection", "close" ); - m_pvt->mgr.post( request, params.encodedQuery() ); +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + QByteArray postData = params.query(QUrl::FullyEncoded).toUtf8(); +#else + QByteArray postData = params.encodedQuery(); +#endif + + m_pvt->mgr.post(request, postData); } void CCrashReportSocket::onFinished( QNetworkReply *reply )