summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@theqtcompany.com>2016-01-11 14:54:40 +0100
committerAlexandru Croitor <alexandru.croitor@theqtcompany.com>2016-01-12 15:18:11 +0000
commit811e583807d7f1f6654aca926f2c6830b88f21af (patch)
tree5cb853c81dac65ddecb6c0b25a7f145cdfd93084
parent12dd6ff845656eb625e2ee3d0e73392bc2c61983 (diff)
Fix access violation error because of access to an invalid QString.
Commit 6ed125c0073288f46e544b9d415d1f9a9968cb2d introduced the usage of QT_USE_QSTRINGBUILDER, which caused an issue in BrowserContextAdapter::httpAcceptLanguageWithoutQualities, incorrectly deducing the return type of the lambda. Fix consists in explicitly setting the return type of the lambda to QString. Change-Id: If3f8992e031838e899d35bcd2f962d051976a8f7 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r--src/core/browser_context_adapter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index 0bbb13857..b9d439596 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -406,7 +406,7 @@ QString BrowserContextAdapter::httpAcceptLanguageWithoutQualities() const
{
const QStringList list = m_httpAcceptLanguage.split(QLatin1Char(','));
return std::accumulate(list.constBegin(), list.constEnd(), QString(),
- [](const QString &r, const QString &e) {
+ [](const QString &r, const QString &e) -> QString {
return (r.isEmpty() ? r : r + QString(QLatin1Char(',')))
+ e.split(QLatin1Char(';')).first();
});