Files
haikuports/www-client/qupzilla/patches/qupzilla-1.8.9.patchset
Gerasim Troeglazov f3e5cacd65 QupZilla: Fix build for qtwebkit v5.212.x
* Fix default theme
* Remove round rects for OSD windows
* Add haiku  notification support
* Add new application icon
2017-08-03 00:06:02 +10:00

516 lines
20 KiB
Plaintext

From 3e8510d353d0989a09eea4afeaf88f96406acc4c Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 5 Apr 2015 20:51:42 +1000
Subject: Turn on system certificates
diff --git a/src/lib/network/networkmanager.cpp b/src/lib/network/networkmanager.cpp
index a0f55df..c31de81 100644
--- a/src/lib/network/networkmanager.cpp
+++ b/src/lib/network/networkmanager.cpp
@@ -107,7 +107,7 @@ void NetworkManager::loadSettings()
m_acceptLanguage = AcceptLanguage::generateHeader(settings.value("Language/acceptLanguage", AcceptLanguage::defaultLanguage()).toStringList());
-#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU) || defined(Q_OS_OS2)
+#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
QString certDir = DataPaths::currentProfilePath() + "/certificates";
QString bundlePath = certDir + "/ca-bundle.crt";
QString bundleVersionPath = certDir + "/bundle_version";
--
2.13.1
From 70d867d457ebbfdffafb4cc7ffc195fe1645243d Mon Sep 17 00:00:00 2001
From: Zoltan Mizsei <miqlas@gmail.com>
Date: Mon, 14 Mar 2016 21:13:13 +0000
Subject: Haiku config paths
diff --git a/src/lib/app/datapaths.cpp b/src/lib/app/datapaths.cpp
index fa6fe66..51e16ba 100644
--- a/src/lib/app/datapaths.cpp
+++ b/src/lib/app/datapaths.cpp
@@ -123,6 +123,9 @@ void DataPaths::init()
#elif defined(Q_OS_MAC)
QDir confPath = QDir(QDir::homePath() + QLatin1String("/Library/Application Support/QupZilla"));
QDir oldConfPath = QDir(QDir::homePath() + QLatin1String("/.config/qupzilla"));
+#elif defined(__HAIKU__)
+ QDir confPath = QDir(QDir::homePath() + QLatin1String("/config/settings/Qt/.config/qupzilla"));
+ QDir oldConfPath = QDir(QDir::homePath() + QLatin1String("/config/settings/Qt/.config/qupzilla"));
#else // Unix
QDir confPath = QDir(QDir::homePath() + QLatin1String("/.config/qupzilla"));
QDir oldConfPath = QDir(QDir::homePath() + QLatin1String("/.qupzilla"));
--
2.13.1
From 3c760189c8f97bb1c1f0adec0aca3f4b08d17192 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Sat, 17 Jun 2017 09:43:22 +0300
Subject: Fix adblock subscription urls
diff --git a/src/lib/adblock/adblockaddsubscriptiondialog.cpp b/src/lib/adblock/adblockaddsubscriptiondialog.cpp
index fc68237..7571eb7 100644
--- a/src/lib/adblock/adblockaddsubscriptiondialog.cpp
+++ b/src/lib/adblock/adblockaddsubscriptiondialog.cpp
@@ -1,6 +1,6 @@
/* ============================================================
-* QupZilla - WebKit based browser
-* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
+* QupZilla - Qt web browser
+* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
*
* 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
@@ -25,23 +25,19 @@ AdBlockAddSubscriptionDialog::AdBlockAddSubscriptionDialog(QWidget* parent)
ui->setupUi(this);
m_knownSubscriptions << Subscription("EasyList (English)", ADBLOCK_EASYLIST_URL)
- << Subscription("Adversity (English)", "http://adversity.googlecode.com/hg/Adversity.txt")
<< Subscription("BSI Lista Polska (Polish)", "http://www.bsi.info.pl/filtrABP.txt")
<< Subscription("Czech List (Czech)", "http://adblock.dajbych.net/adblock.txt")
<< Subscription("dutchblock (Dutch)", "http://groenewoudt.net/dutchblock/list.txt")
<< Subscription("Filtros Nauscopicos (Spanish)", "http://abp.mozilla-hispano.org/nauscopio/filtros.txt")
- << Subscription("hufilter (Hungarian)", "http://www.hufilter.hu/hufilter.txt")
<< Subscription("IsraelList (Hebrew)", "http://secure.fanboy.co.nz/israelilist/IsraelList.txt")
- << Subscription("Lista Basa (Polish)", "http://plok.studentlive.pl/abp.txt")
<< Subscription("NLBlock (Dutch)", "http://www.verzijlbergh.com/adblock/nlblock.txt")
<< Subscription("Peter Lowe's list (English)", "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=adblockplus&mimetype=plaintext")
<< Subscription("PLgeneral (Polish)", "http://www.niecko.pl/adblock/adblock.txt")
<< Subscription("Schacks Adblock Plus liste (Danish)", "http://adblock.schack.dk/block.txt")
<< Subscription("Xfiles (Italian)", "http://mozilla.gfsolone.com/filtri.txt")
<< Subscription("EasyPrivacy (English)", "http://easylist-downloads.adblockplus.org/easyprivacy.txt")
- << Subscription("Antisocial (English)", "http://adversity.googlecode.com/hg/Antisocial.txt")
- << Subscription("RU Adlist (Russian)", "https://ruadlist.googlecode.com/hg/advblock.txt")
- << Subscription("ABPindo (Indonesian)", "https://indonesianadblockrules.googlecode.com/hg/subscriptions/abpindo.txt")
+ << Subscription("RU Adlist (Russian)", "https://easylist-downloads.adblockplus.org/advblock.txt")
+ << Subscription("ABPindo (Indonesian)", "https://raw.githubusercontent.com/heradhis/indonesianadblockrules/master/subscriptions/abpindo.txt")
<< Subscription("Easylist China (Chinese)", "https://easylist-downloads.adblockplus.org/easylistchina.txt")
<< Subscription("Anti-Adblock Killer", "https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-filters.txt")
<< Subscription(tr("Other..."), QString());
--
2.13.1
From 1a973dc987166605fe44709a16f055b68b704771 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Wed, 5 Jul 2017 14:59:35 +0300
Subject: Use Haiku theme by default
diff --git a/src/lib/app/qzcommon.h b/src/lib/app/qzcommon.h
index a1ce10d..b61c59c 100644
--- a/src/lib/app/qzcommon.h
+++ b/src/lib/app/qzcommon.h
@@ -125,6 +125,8 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Qz::NewTabPositionFlags)
#define DEFAULT_THEME_NAME "windows"
#elif defined(Q_OS_MAC)
#define DEFAULT_THEME_NAME "mac"
+#elif defined(Q_OS_HAIKU)
+#define DEFAULT_THEME_NAME "haiku"
#elif defined(Q_OS_UNIX)
#define DEFAULT_THEME_NAME "linux"
#else
--
2.13.1
From 8f841f924f9d85a9d873a948651a258dfcf79d37 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Wed, 26 Jul 2017 15:25:00 +0300
Subject: Add Haiku bookmarks
diff --git a/src/lib/data/data/bookmarks.json b/src/lib/data/data/bookmarks.json
index a90338d..652abbe 100644
--- a/src/lib/data/data/bookmarks.json
+++ b/src/lib/data/data/bookmarks.json
@@ -3,6 +3,63 @@
"bookmark_bar": {
"children": [
{
+ "children": [
+ {
+ "description": "",
+ "keyword": "",
+ "name": "Haiku Project",
+ "type": "url",
+ "url": "https://www.haiku-os.org/",
+ "visit_count": 0
+ },
+ {
+ "description": "",
+ "keyword": "",
+ "name": "Haiku Trac",
+ "type": "url",
+ "url": "https://dev.haiku-os.org/timeline",
+ "visit_count": 0
+ },
+ {
+ "description": "",
+ "keyword": "",
+ "name": "Haiku Depot Web",
+ "type": "url",
+ "url": "https://depot.haiku-os.org/",
+ "visit_count": 2
+ },
+ {
+ "description": "",
+ "keyword": "",
+ "name": "Haiku's main repository",
+ "type": "url",
+ "url": "http://cgit.haiku-os.org/haiku/log/",
+ "visit_count": 0
+ },
+ {
+ "description": "",
+ "keyword": "",
+ "name": "Haikuports",
+ "type": "url",
+ "url": "https://github.com/haikuports/haikuports/commits/master",
+ "visit_count": 0
+ },
+ {
+ "description": "",
+ "keyword": "",
+ "name": "Haiku Software Archives",
+ "type": "url",
+ "url": "https://github.com/HaikuArchives",
+ "visit_count": 0
+ }
+ ],
+ "description": "",
+ "expanded": true,
+ "expanded_sidebar": false,
+ "name": "Haiku",
+ "type": "folder"
+ },
+ {
"description": "Source code of QupZilla",
"keyword": "qz-git",
"name": "QupZilla Git",
@@ -70,4 +127,4 @@
}
},
"version": 1
-}
\ No newline at end of file
+}
--
2.13.1
From 06c2423a8dc865848a60acaac1fcbf0ae62efc17 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 2 Aug 2017 22:16:30 +1000
Subject: Fix build for WebKit >= 2.2 version
diff --git a/src/lib/tools/html5permissions/html5permissionsmanager.cpp b/src/lib/tools/html5permissions/html5permissionsmanager.cpp
index fa991c6..16f0507 100644
--- a/src/lib/tools/html5permissions/html5permissionsmanager.cpp
+++ b/src/lib/tools/html5permissions/html5permissionsmanager.cpp
@@ -28,7 +28,7 @@ HTML5PermissionsManager::HTML5PermissionsManager(QObject* parent)
loadSettings();
}
-#if QTWEBKIT_FROM_2_2
+#ifdef QTWEBKIT_FROM_2_2
void HTML5PermissionsManager::requestPermissions(WebPage* page, QWebFrame* frame, const QWebPage::Feature &feature)
{
if (!frame || !page) {
@@ -49,12 +49,12 @@ void HTML5PermissionsManager::requestPermissions(WebPage* page, QWebFrame* frame
page->setFeaturePermission(frame, feature, QWebPage::PermissionDeniedByUser);
return;
}
-
+#ifdef USE_QTWEBKIT_2_2
if (view) {
HTML5PermissionsNotification* notif = new HTML5PermissionsNotification(host, frame, feature);
view->addNotification(notif);
}
-
+#endif
break;
case QWebPage::Geolocation:
@@ -68,10 +68,12 @@ void HTML5PermissionsManager::requestPermissions(WebPage* page, QWebFrame* frame
return;
}
+#ifdef USE_QTWEBKIT_2_2
if (view) {
HTML5PermissionsNotification* notif = new HTML5PermissionsNotification(host, frame, feature);
view->addNotification(notif);
}
+#endif
break;
diff --git a/src/lib/tools/html5permissions/html5permissionsmanager.h b/src/lib/tools/html5permissions/html5permissionsmanager.h
index 074113d..8da6573 100644
--- a/src/lib/tools/html5permissions/html5permissionsmanager.h
+++ b/src/lib/tools/html5permissions/html5permissionsmanager.h
@@ -32,7 +32,7 @@ class QUPZILLA_EXPORT HTML5PermissionsManager : public QObject
public:
explicit HTML5PermissionsManager(QObject* parent);
-#if QTWEBKIT_FROM_2_2
+#ifdef QTWEBKIT_FROM_2_2
void requestPermissions(WebPage* page, QWebFrame* frame, const QWebPage::Feature &feature);
void rememberPermissions(const QString &host, const QWebPage::Feature &feature,
const QWebPage::PermissionPolicy &policy);
diff --git a/src/lib/webkit/webpage.cpp b/src/lib/webkit/webpage.cpp
index 9483ad4..9ce976f 100644
--- a/src/lib/webkit/webpage.cpp
+++ b/src/lib/webkit/webpage.cpp
@@ -102,15 +102,15 @@ WebPage::WebPage(QObject* parent)
connect(mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(addJavaScriptObject()));
-#if QTWEBKIT_FROM_2_2
+#if defined(QTWEBKIT_FROM_2_2)
connect(this, SIGNAL(featurePermissionRequested(QWebFrame*,QWebPage::Feature)),
this, SLOT(featurePermissionRequested(QWebFrame*,QWebPage::Feature)));
#endif
-#if QTWEBKIT_FROM_2_3
+#if defined(QTWEBKIT_FROM_2_3)
connect(this, SIGNAL(applicationCacheQuotaExceeded(QWebSecurityOrigin*,quint64,quint64)),
this, SLOT(appCacheQuotaExceeded(QWebSecurityOrigin*,quint64)));
-#elif QTWEBKIT_FROM_2_2
+#elif defined(QTWEBKIT_FROM_2_2)
connect(this, SIGNAL(applicationCacheQuotaExceeded(QWebSecurityOrigin*,quint64)),
this, SLOT(appCacheQuotaExceeded(QWebSecurityOrigin*,quint64)));
#endif
--
2.13.1
From fd051dd53fec94166b9ac0b25b0a51cb3c5054d0 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 2 Aug 2017 22:40:27 +1000
Subject: Enable webkit notifications
diff --git a/src/lib/notifications/desktopnotificationsfactory.cpp b/src/lib/notifications/desktopnotificationsfactory.cpp
index 54d42b2..5612c39 100644
--- a/src/lib/notifications/desktopnotificationsfactory.cpp
+++ b/src/lib/notifications/desktopnotificationsfactory.cpp
@@ -23,6 +23,18 @@
#include <QFile>
#include <QDir>
+#if defined(Q_OS_HAIKU)
+#include <QCoreApplication>
+#include <OS.h>
+#include <Application.h>
+#include <Notification.h>
+#include <Resources.h>
+#include <Bitmap.h>
+#include <File.h>
+#include <Node.h>
+#include <NodeInfo.h>
+#endif
+
#if defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)
#include <QDBusInterface>
#endif
@@ -40,7 +52,7 @@ void DesktopNotificationsFactory::loadSettings()
settings.beginGroup("Notifications");
m_enabled = settings.value("Enabled", true).toBool();
m_timeout = settings.value("Timeout", 6000).toInt();
-#if defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)
+#if (defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)) || defined(Q_OS_HAIKU)
m_notifType = settings.value("UseNativeDesktop", true).toBool() ? DesktopNative : PopupWidget;
#else
m_notifType = PopupWidget;
@@ -51,7 +63,7 @@ void DesktopNotificationsFactory::loadSettings()
bool DesktopNotificationsFactory::supportsNativeNotifications() const
{
-#if defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)
+#if (defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)) || defined(Q_OS_HAIKU)
return true;
#else
return false;
@@ -77,7 +89,28 @@ void DesktopNotificationsFactory::showNotification(const QPixmap &icon, const QS
m_desktopNotif.data()->show();
break;
case DesktopNative:
-#if defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)
+#if defined(Q_OS_HAIKU)
+ QFileInfo appFileInfo(QCoreApplication::applicationFilePath());
+ BString stitle((const char *)(heading.toUtf8()));
+ BString smessage((const char *)(text.toUtf8()));
+ BString smessageId((const char *)(appFileInfo.fileName().toUtf8()));
+ BString group((const char*)(appFileInfo.baseName().toUtf8()));
+
+ notification_type ntype = B_INFORMATION_NOTIFICATION;
+ BNotification notification(ntype);
+ notification.SetGroup(group);
+ notification.SetTitle(stitle);
+ notification.SetMessageID(smessageId);
+ notification.SetContent(smessage);
+
+ QImage image = icon.toImage();
+ BRect rect(0, 0, image.width() - 1, image.height() - 1);
+ BBitmap bitmap(rect, B_RGBA32);
+ memcpy(bitmap.Bits(), image.bits(), image.byteCount());
+ notification.SetIcon(&bitmap);
+
+ notification.Send(m_timeout * 1000);
+#elif defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)
QFile tmp(DataPaths::path(DataPaths::Temp) + QLatin1String("/qupzilla_notif.png"));
tmp.open(QFile::WriteOnly);
icon.save(tmp.fileName());
@@ -100,7 +133,31 @@ void DesktopNotificationsFactory::showNotification(const QPixmap &icon, const QS
void DesktopNotificationsFactory::nativeNotificationPreview()
{
-#if defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)
+#if defined(Q_OS_HAIKU)
+ QFileInfo appFileInfo(QCoreApplication::applicationFilePath());
+ QString title = QObject::tr("Native System Notification");
+ BString stitle((const char *)(title.toUtf8()));
+ BString smessage((const char *)(""));
+ BString smessageId((const char *)(appFileInfo.fileName().toUtf8()));
+ BString group((const char*)(appFileInfo.baseName().toUtf8()));
+
+ BRect rect(0, 0, B_LARGE_ICON - 1, B_LARGE_ICON -1);
+ BBitmap bitmap(rect, B_RGBA32);
+
+ notification_type ntype = B_INFORMATION_NOTIFICATION;
+ BNotification notification(ntype);
+ notification.SetGroup(group);
+ notification.SetTitle(stitle);
+ notification.SetMessageID(smessageId);
+ notification.SetContent(smessage);
+
+ QPixmap pixmap = QPixmap(":icons/preferences/dialog-question.png").scaled(B_LARGE_ICON, B_LARGE_ICON);
+ QImage image = pixmap.toImage();
+ memcpy(bitmap.Bits(), image.bits(), image.byteCount());
+ notification.SetIcon(&bitmap);
+
+ notification.Send(m_timeout * 1000);
+#elif defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)
QFile tmp(DataPaths::path(DataPaths::Temp) + "/qupzilla_notif.png");
tmp.open(QFile::WriteOnly);
QPixmap(":icons/preferences/dialog-question.png").save(tmp.fileName());
diff --git a/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri b/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri
index 1591433..034d1ca 100644
--- a/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri
+++ b/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri
@@ -36,6 +36,11 @@ win32 {
}
}
+# Haiku
+haiku {
+ buildPlugin = false
+}
+
!equals(buildPlugin, false) {
HEADERS += $$PWD/qtwebkitplugin.h \
$$[QT_INSTALL_HEADERS]/QtWebKit/qwebkitplatformplugin.h
diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp
index 2f13d27..f4a80e5 100644
--- a/src/lib/preferences/preferences.cpp
+++ b/src/lib/preferences/preferences.cpp
@@ -395,7 +395,7 @@ Preferences::Preferences(BrowserWindow* window, QWidget* parent)
DesktopNotificationsFactory::Type notifyType;
settings.beginGroup("Notifications");
ui->notificationTimeout->setValue(settings.value("Timeout", 6000).toInt() / 1000);
-#if defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)
+#if (defined(Q_OS_UNIX) && !defined(DISABLE_DBUS)) || defined(Q_OS_HAIKU)
notifyType = settings.value("UseNativeDesktop", true).toBool() ? DesktopNotificationsFactory::DesktopNative : DesktopNotificationsFactory::PopupWidget;
#else
notifyType = DesktopNotificationsFactory::PopupWidget;
--
2.13.1
From 04127654b1a411f28ac0ad3552798191f8cd10b6 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 2 Aug 2017 22:41:29 +1000
Subject: Remove round rect for OSD windows
diff --git a/bin/themes/breathe/main.css b/bin/themes/breathe/main.css
index 2592506..d971040 100644
--- a/bin/themes/breathe/main.css
+++ b/bin/themes/breathe/main.css
@@ -294,7 +294,6 @@ DesktopNotification
DesktopNotification #frame
{
border: 2px solid darkblue;
- border-radius: 20px;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #e4ecf1, stop:1 #d3e5f1);
}
diff --git a/bin/themes/chrome/main.css b/bin/themes/chrome/main.css
index ab3765f..348d550 100644
--- a/bin/themes/chrome/main.css
+++ b/bin/themes/chrome/main.css
@@ -329,7 +329,6 @@ DesktopNotification
DesktopNotification #frame
{
border: 2px solid darkblue;
- border-radius: 20px;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #e4ecf1, stop:1 #d3e5f1);
}
diff --git a/bin/themes/default/main.css b/bin/themes/default/main.css
index b96601e..61a726a 100644
--- a/bin/themes/default/main.css
+++ b/bin/themes/default/main.css
@@ -324,7 +324,6 @@ DesktopNotification
DesktopNotification #frame
{
border: 2px solid darkblue;
- border-radius: 20px;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #e4ecf1, stop:1 #d3e5f1);
}
diff --git a/bin/themes/linux/main.css b/bin/themes/linux/main.css
index aa48b63..bb77e4e 100644
--- a/bin/themes/linux/main.css
+++ b/bin/themes/linux/main.css
@@ -257,7 +257,6 @@ DesktopNotification
DesktopNotification #frame
{
border: 2px solid darkblue;
- border-radius: 20px;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #e4ecf1, stop:1 #d3e5f1);
}
diff --git a/bin/themes/mac/main.css b/bin/themes/mac/main.css
index 0df4017..6e15c94 100644
--- a/bin/themes/mac/main.css
+++ b/bin/themes/mac/main.css
@@ -314,7 +314,6 @@ DesktopNotification
DesktopNotification #frame
{
border: 2px solid darkblue;
- border-radius: 20px;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #e4ecf1, stop:1 #d3e5f1);
}
diff --git a/bin/themes/windows/main.css b/bin/themes/windows/main.css
index 9e41d49..111cbbf 100644
--- a/bin/themes/windows/main.css
+++ b/bin/themes/windows/main.css
@@ -329,7 +329,6 @@ DesktopNotification
DesktopNotification #frame
{
border: 2px solid darkblue;
- border-radius: 20px;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #e4ecf1, stop:1 #d3e5f1);
}
--
2.13.1