summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-06-28 17:27:15 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2017-06-28 17:10:39 +0000
commitbe972db0f9ef12ace1aeaac5010e0bf44717e300 (patch)
treec6692bb0c6718ae6aff57150055a87ccc21cf9e7
parent91bc2d2f217507f20933b7caf65dc33701d2e9cd (diff)
Fix favicon.ico load
The ico file was loaded using QIODevice::Text causing a corruption of the data. Change-Id: I954116d1693a63ba25f2f71daf72acef33a887b2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r--src/plugins/platforms/webgl/qwebglhttpserver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/webgl/qwebglhttpserver.cpp b/src/plugins/platforms/webgl/qwebglhttpserver.cpp
index e9945a2..cad4431 100644
--- a/src/plugins/platforms/webgl/qwebglhttpserver.cpp
+++ b/src/plugins/platforms/webgl/qwebglhttpserver.cpp
@@ -256,7 +256,7 @@ void QWebGLHttpServer::answerClient(QTcpSocket *socket, const QUrl &url)
} else if (path == "/favicon.ico") {
QFile file(QStringLiteral(":/webgl/favicon.ico"));
Q_ASSERT(file.exists());
- file.open(QIODevice::ReadOnly | QIODevice::Text);
+ file.open(QIODevice::ReadOnly);
Q_ASSERT(file.isOpen());
auto data = file.readAll();
addData(QByteArrayLiteral("image/x-icon"), data);