Fixing the crash from #367 (hopefully) now.

remotes/origin/falkon
nowrep 14 years ago
parent 88f7086325
commit 8f6979e06e
  1. 3
      src/defines.pri
  2. 6
      src/lib/webview/webpage.cpp

@ -16,8 +16,7 @@ win32 {
}
DEFINES *= QT_NO_URL_CAST_FROM_STRING
# Apparently, it may cause crashes on some machines
#DEFINES *= QT_USE_QSTRINGBUILDER
DEFINES *= QT_USE_QSTRINGBUILDER
##It won't compile on windows with this define. Some bug in qtsingleapp / qvector template
!win32: !CONFIG(debug, debug|release): DEFINES *= QT_NO_DEBUG_OUTPUT

@ -54,7 +54,7 @@
QString WebPage::m_lastUploadLocation = QDir::homePath();
QString WebPage::m_userAgent;
QString WebPage::m_fakeUserAgent = "Mozilla/5.0 (" + qz_buildSystem() + ") AppleWebKit/" + QupZilla::WEBKITVERSION + " (KHTML, like Gecko) Chrome/10.0 Safari/" + QupZilla::WEBKITVERSION;
QString WebPage::m_fakeUserAgent;
QUrl WebPage::m_lastUnsupportedUrl;
QList<WebPage*> WebPage::m_livingPages;
@ -434,6 +434,10 @@ QString WebPage::userAgentForUrl(const QUrl &url) const
{
// Let Google services play nice with us
if (url.host().contains("google")) {
if (m_fakeUserAgent.isEmpty()) {
m_fakeUserAgent = "Mozilla/5.0 (" + qz_buildSystem() + ") AppleWebKit/" + QupZilla::WEBKITVERSION + " (KHTML, like Gecko) Chrome/10.0 Safari/" + QupZilla::WEBKITVERSION;
}
return m_fakeUserAgent;
}

Loading…
Cancel
Save