From a97ef7d6276696ee64990074376bca421bd5a3a4 Mon Sep 17 00:00:00 2001 From: nowrep Date: Thu, 31 Jan 2013 11:54:42 +0100 Subject: [PATCH] Properly fixed page background color with dark themes. Also fixed building with Qt 4.7 --- src/lib/webview/webpage.cpp | 5 ++--- src/lib/webview/webpage.h | 3 ++- src/lib/webview/webtab.cpp | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lib/webview/webpage.cpp b/src/lib/webview/webpage.cpp index 54af93b22..9aef28f1e 100644 --- a/src/lib/webview/webpage.cpp +++ b/src/lib/webview/webpage.cpp @@ -106,10 +106,9 @@ WebPage::WebPage(QupZilla* mainClass) #if QTWEBKIT_FROM_2_3 connect(this, SIGNAL(applicationCacheQuotaExceeded(QWebSecurityOrigin*, quint64, quint64)), this, SLOT(appCacheQuotaExceeded(QWebSecurityOrigin*, quint64))); -#else +#elif QTWEBKIT_FROM_2_2 connect(this, SIGNAL(applicationCacheQuotaExceeded(QWebSecurityOrigin*, quint64)), this, SLOT(appCacheQuotaExceeded(QWebSecurityOrigin*, quint64))); - #endif @@ -419,6 +418,7 @@ void WebPage::dbQuotaExceeded(QWebFrame* frame) frame->securityOrigin().setDatabaseQuota(oldQuota * 2); } +#if QTWEBKIT_FROM_2_2 void WebPage::appCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 originalQuota) { if (!origin) { @@ -428,7 +428,6 @@ void WebPage::appCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 original origin->setApplicationCacheQuota(originalQuota * 2); } -#if QTWEBKIT_FROM_2_2 void WebPage::featurePermissionRequested(QWebFrame* frame, const QWebPage::Feature &feature) { mApp->html5permissions()->requestPermissions(this, frame, feature); diff --git a/src/lib/webview/webpage.h b/src/lib/webview/webpage.h index 9e6892d21..bcf9cd8e0 100644 --- a/src/lib/webview/webpage.h +++ b/src/lib/webview/webpage.h @@ -23,6 +23,7 @@ #include "qz_namespace.h" +class QWebSecurityOrigin; class QFileSystemWatcher; class QEventLoop; @@ -97,9 +98,9 @@ private slots: void windowCloseRequested(); void dbQuotaExceeded(QWebFrame* frame); - void appCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 originalQuota); #ifdef USE_QTWEBKIT_2_2 + void appCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 originalQuota); void featurePermissionRequested(QWebFrame* frame, const QWebPage::Feature &feature); #endif diff --git a/src/lib/webview/webtab.cpp b/src/lib/webview/webtab.cpp index 3e540f0ea..bbf91ecce 100644 --- a/src/lib/webview/webtab.cpp +++ b/src/lib/webview/webtab.cpp @@ -1,6 +1,6 @@ /* ============================================================ * QupZilla - WebKit based browser -* Copyright (C) 2010-2012 David Rosca +* Copyright (C) 2010-2013 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -84,7 +84,6 @@ WebTab::WebTab(QupZilla* mainClass, LocationBar* locationBar) m_layout->addWidget(m_view); setLayout(m_layout); - setAutoFillBackground(true); // We don't want this transparent connect(m_view, SIGNAL(showNotification(QWidget*)), this, SLOT(showNotification(QWidget*))); connect(m_view, SIGNAL(iconChanged()), m_locationBar.data(), SLOT(siteIconChanged()));