From 811e583807d7f1f6654aca926f2c6830b88f21af Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 11 Jan 2016 14:54:40 +0100 Subject: 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 --- src/core/browser_context_adapter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/browser_context_adapter.cpp') 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(); }); -- cgit v1.2.3