mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed building on Windows & shoudl fix crash in #334
This commit is contained in:
parent
47ec2b57f7
commit
31e31b703a
BIN
bin/locale/qt_hu.qm
Normal file
BIN
bin/locale/qt_hu.qm
Normal file
Binary file not shown.
@ -83,7 +83,7 @@ QNetworkReply* AdBlockNetwork::block(const QNetworkRequest &request)
|
|||||||
if (blockedRule) {
|
if (blockedRule) {
|
||||||
QVariant v = request.attribute((QNetworkRequest::Attribute)(QNetworkRequest::User + 100));
|
QVariant v = request.attribute((QNetworkRequest::Attribute)(QNetworkRequest::User + 100));
|
||||||
WebPage* webPage = static_cast<WebPage*>(v.value<void*>());
|
WebPage* webPage = static_cast<WebPage*>(v.value<void*>());
|
||||||
if (webPage) {
|
if (WebPage::isPointerSafeToUse(webPage)) {
|
||||||
webPage->addAdBlockRule(blockedRule->filter(), request.url());
|
webPage->addAdBlockRule(blockedRule->filter(), request.url());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,17 +69,20 @@ void ProfileUpdater::updateProfile(const QString ¤t, const QString &profil
|
|||||||
update100b4();
|
update100b4();
|
||||||
update100rc1();
|
update100rc1();
|
||||||
update100();
|
update100();
|
||||||
|
update118();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profileVersion == Updater::parseVersionFromString("1.0.0-rc1")) {
|
if (profileVersion == Updater::parseVersionFromString("1.0.0-rc1")) {
|
||||||
update100rc1();
|
update100rc1();
|
||||||
update100();
|
update100();
|
||||||
|
update118();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profileVersion == Updater::parseVersionFromString("1.0.0")) {
|
if (profileVersion == Updater::parseVersionFromString("1.0.0")) {
|
||||||
update100();
|
update100();
|
||||||
|
update118();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,6 +96,11 @@ void ProfileUpdater::updateProfile(const QString ¤t, const QString &profil
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (profileVersion == Updater::parseVersionFromString("1.1.8")) {
|
||||||
|
update118();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::cout << "QupZilla: Incompatible profile version detected, overwriting profile data..." << std::endl;
|
std::cout << "QupZilla: Incompatible profile version detected, overwriting profile data..." << std::endl;
|
||||||
|
|
||||||
copyDataToProfile();
|
copyDataToProfile();
|
||||||
@ -141,3 +149,12 @@ void ProfileUpdater::update100()
|
|||||||
query.exec("ALTER TABLE autofill ADD COLUMN last_used NUMERIC");
|
query.exec("ALTER TABLE autofill ADD COLUMN last_used NUMERIC");
|
||||||
query.exec("UPDATE autofill SET last_used=0");
|
query.exec("UPDATE autofill SET last_used=0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProfileUpdater::update118()
|
||||||
|
{
|
||||||
|
std::cout << "QupZilla: Upgrading profile version from 1.1.8..." << std::endl;
|
||||||
|
mApp->connectDatabase();
|
||||||
|
|
||||||
|
QSqlQuery query;
|
||||||
|
query.exec("ALTER TABLE folders ADD COLUMN parent TEXT");
|
||||||
|
}
|
||||||
|
@ -35,6 +35,7 @@ private:
|
|||||||
void update100b4();
|
void update100b4();
|
||||||
void update100rc1();
|
void update100rc1();
|
||||||
void update100();
|
void update100();
|
||||||
|
void update118();
|
||||||
|
|
||||||
QString m_profilePath;
|
QString m_profilePath;
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
/* ============================================================
|
||||||
|
* QupZilla - WebKit based browser
|
||||||
|
* Copyright (C) 2010-2012 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
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
* ============================================================ */
|
||||||
#include "proxystyle.h"
|
#include "proxystyle.h"
|
||||||
|
|
||||||
ProxyStyle::ProxyStyle()
|
ProxyStyle::ProxyStyle()
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
/* ============================================================
|
||||||
|
* QupZilla - WebKit based browser
|
||||||
|
* Copyright (C) 2010-2012 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
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
* ============================================================ */
|
||||||
#ifndef PROXYSTYLE_H
|
#ifndef PROXYSTYLE_H
|
||||||
#define PROXYSTYLE_H
|
#define PROXYSTYLE_H
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
#include "mainapplication.h"
|
#include "mainapplication.h"
|
||||||
#include "aboutdialog.h"
|
#include "aboutdialog.h"
|
||||||
#include "pluginproxy.h"
|
#include "pluginproxy.h"
|
||||||
#include "qtwin.h"
|
|
||||||
#include "checkboxdialog.h"
|
#include "checkboxdialog.h"
|
||||||
#include "adblockmanager.h"
|
#include "adblockmanager.h"
|
||||||
#include "clickablelabel.h"
|
#include "clickablelabel.h"
|
||||||
@ -63,6 +62,7 @@
|
|||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "webtab.h"
|
#include "webtab.h"
|
||||||
#include "speeddial.h"
|
#include "speeddial.h"
|
||||||
|
#include "qtwin.h"
|
||||||
|
|
||||||
#include <QSplitter>
|
#include <QSplitter>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
/* ============================================================
|
||||||
|
* QupZilla - WebKit based browser
|
||||||
|
* Copyright (C) 2010-2012 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
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
* ============================================================ */
|
||||||
#ifndef QZ_NAMESPACE_H
|
#ifndef QZ_NAMESPACE_H
|
||||||
#define QZ_NAMESPACE_H
|
#define QZ_NAMESPACE_H
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ void AutoFillModel::post(const QNetworkRequest &request, const QByteArray &outgo
|
|||||||
|
|
||||||
QVariant v = request.attribute((QNetworkRequest::Attribute)(QNetworkRequest::User + 100));
|
QVariant v = request.attribute((QNetworkRequest::Attribute)(QNetworkRequest::User + 100));
|
||||||
WebPage* webPage = static_cast<WebPage*>(v.value<void*>());
|
WebPage* webPage = static_cast<WebPage*>(v.value<void*>());
|
||||||
if (!webPage) {
|
if (!WebPage::isPointerSafeToUse(webPage)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
WebView* webView = qobject_cast<WebView*>(webPage->view());
|
WebView* webView = qobject_cast<WebView*>(webPage->view());
|
||||||
|
Binary file not shown.
@ -134,7 +134,7 @@ void NetworkManager::setSSLConfiguration(QNetworkReply* reply)
|
|||||||
QNetworkRequest request = reply->request();
|
QNetworkRequest request = reply->request();
|
||||||
QVariant v = request.attribute((QNetworkRequest::Attribute)(QNetworkRequest::User + 100));
|
QVariant v = request.attribute((QNetworkRequest::Attribute)(QNetworkRequest::User + 100));
|
||||||
WebPage* webPage = static_cast<WebPage*>(v.value<void*>());
|
WebPage* webPage = static_cast<WebPage*>(v.value<void*>());
|
||||||
if (!webPage) {
|
if (!WebPage::isPointerSafeToUse(webPage)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ void NetworkManager::sslError(QNetworkReply* reply, QList<QSslError> errors)
|
|||||||
QNetworkRequest request = reply->request();
|
QNetworkRequest request = reply->request();
|
||||||
QVariant v = request.attribute((QNetworkRequest::Attribute)(QNetworkRequest::User + 100));
|
QVariant v = request.attribute((QNetworkRequest::Attribute)(QNetworkRequest::User + 100));
|
||||||
WebPage* webPage = static_cast<WebPage*>(v.value<void*>());
|
WebPage* webPage = static_cast<WebPage*>(v.value<void*>());
|
||||||
if (!webPage) {
|
if (!WebPage::isPointerSafeToUse(webPage)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
#include <QWebHitTestResult>
|
||||||
|
|
||||||
#include "qz_namespace.h"
|
#include "qz_namespace.h"
|
||||||
|
|
||||||
|
@ -53,9 +53,10 @@
|
|||||||
#include <QWebFrame>
|
#include <QWebFrame>
|
||||||
|
|
||||||
QString WebPage::m_lastUploadLocation = QDir::homePath();
|
QString WebPage::m_lastUploadLocation = QDir::homePath();
|
||||||
QString WebPage::m_userAgent = QString();
|
QString WebPage::m_userAgent;
|
||||||
QString WebPage::m_fakeUserAgent = "Mozilla/5.0 (" + qz_buildSystem() + ") AppleWebKit/" + qWebKitVersion() + " (KHTML, like Gecko) Chrome/10.0 Safari/" + qWebKitVersion();
|
QString WebPage::m_fakeUserAgent = "Mozilla/5.0 (" + qz_buildSystem() + ") AppleWebKit/" + qWebKitVersion() + " (KHTML, like Gecko) Chrome/10.0 Safari/" + qWebKitVersion();
|
||||||
QUrl WebPage::m_lastUnsupportedUrl = QUrl();
|
QUrl WebPage::m_lastUnsupportedUrl;
|
||||||
|
QList<WebPage*> WebPage::m_deletedPages;
|
||||||
|
|
||||||
WebPage::WebPage(QupZilla* mainClass)
|
WebPage::WebPage(QupZilla* mainClass)
|
||||||
: QWebPage()
|
: QWebPage()
|
||||||
@ -758,6 +759,11 @@ QString WebPage::chooseFile(QWebFrame* originatingFrame, const QString &oldFile)
|
|||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WebPage::isPointerSafeToUse(WebPage *page)
|
||||||
|
{
|
||||||
|
return page == 0 ? false : !m_deletedPages.contains(page);
|
||||||
|
}
|
||||||
|
|
||||||
void WebPage::disconnectObjects()
|
void WebPage::disconnectObjects()
|
||||||
{
|
{
|
||||||
if (m_runningLoop) {
|
if (m_runningLoop) {
|
||||||
@ -765,6 +771,8 @@ void WebPage::disconnectObjects()
|
|||||||
m_runningLoop = 0;
|
m_runningLoop = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_deletedPages.append(this);
|
||||||
|
|
||||||
disconnect(this);
|
disconnect(this);
|
||||||
m_networkProxy->disconnectObjects();
|
m_networkProxy->disconnectObjects();
|
||||||
|
|
||||||
@ -777,4 +785,8 @@ WebPage::~WebPage()
|
|||||||
m_runningLoop->exit(1);
|
m_runningLoop->exit(1);
|
||||||
m_runningLoop = 0;
|
m_runningLoop = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_deletedPages.contains(this)) {
|
||||||
|
m_deletedPages.append(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,7 @@ public:
|
|||||||
static void setUserAgent(const QString &agent);
|
static void setUserAgent(const QString &agent);
|
||||||
QString userAgentForUrl(const QUrl &url) const;
|
QString userAgentForUrl(const QUrl &url) const;
|
||||||
|
|
||||||
|
static bool isPointerSafeToUse(WebPage* page);
|
||||||
void disconnectObjects();
|
void disconnectObjects();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@ -108,6 +109,7 @@ private:
|
|||||||
static QString m_userAgent;
|
static QString m_userAgent;
|
||||||
static QString m_fakeUserAgent;
|
static QString m_fakeUserAgent;
|
||||||
static QUrl m_lastUnsupportedUrl;
|
static QUrl m_lastUnsupportedUrl;
|
||||||
|
static QList<WebPage*> m_deletedPages;
|
||||||
|
|
||||||
QupZilla* p_QupZilla;
|
QupZilla* p_QupZilla;
|
||||||
NetworkManagerProxy* m_networkProxy;
|
NetworkManagerProxy* m_networkProxy;
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
/* ============================================================
|
||||||
|
* QupZilla - WebKit based browser
|
||||||
|
* Copyright (C) 2010-2012 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
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
* ============================================================ */
|
||||||
#include "webviewsettings.h"
|
#include "webviewsettings.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
/* ============================================================
|
||||||
|
* QupZilla - WebKit based browser
|
||||||
|
* Copyright (C) 2010-2012 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
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
* ============================================================ */
|
||||||
#ifndef WEBVIEWSETTINGS_H
|
#ifndef WEBVIEWSETTINGS_H
|
||||||
#define WEBVIEWSETTINGS_H
|
#define WEBVIEWSETTINGS_H
|
||||||
|
|
||||||
|
@ -70,6 +70,7 @@ Section !$(TITLE_SecMain) SecMain
|
|||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
File "COPYRIGHT.txt"
|
File "COPYRIGHT.txt"
|
||||||
File "qupzilla.exe"
|
File "qupzilla.exe"
|
||||||
|
File "qupzilla.dll"
|
||||||
File "libeay32.dll"
|
File "libeay32.dll"
|
||||||
File "ssleay32.dll"
|
File "ssleay32.dll"
|
||||||
File "msvcp90.dll"
|
File "msvcp90.dll"
|
||||||
@ -175,7 +176,9 @@ SectionGroup $(TITLE_SecTranslations) SecTranslations
|
|||||||
Section "Chinese"
|
Section "Chinese"
|
||||||
SetOutPath "$INSTDIR\locale"
|
SetOutPath "$INSTDIR\locale"
|
||||||
File "locale\zh_CN.qm"
|
File "locale\zh_CN.qm"
|
||||||
File "locale\qt_zh.qm"
|
File "locale\zh_TW.qm"
|
||||||
|
File "locale\qt_zh_CN.qm"
|
||||||
|
File "locale\qt_zh_TW.qm"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Polish"
|
Section "Polish"
|
||||||
@ -187,6 +190,7 @@ SectionGroup $(TITLE_SecTranslations) SecTranslations
|
|||||||
Section "Spanish"
|
Section "Spanish"
|
||||||
SetOutPath "$INSTDIR\locale"
|
SetOutPath "$INSTDIR\locale"
|
||||||
File "locale\es_ES.qm"
|
File "locale\es_ES.qm"
|
||||||
|
File "locale\es_VE.qm"
|
||||||
File "locale\qt_es.qm"
|
File "locale\qt_es.qm"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
@ -211,6 +215,7 @@ SectionGroup $(TITLE_SecTranslations) SecTranslations
|
|||||||
Section "Portuguese"
|
Section "Portuguese"
|
||||||
SetOutPath "$INSTDIR\locale"
|
SetOutPath "$INSTDIR\locale"
|
||||||
File "locale\pt_PT.qm"
|
File "locale\pt_PT.qm"
|
||||||
|
File "locale\pt_BR.qm"
|
||||||
File "locale\qt_pt.qm"
|
File "locale\qt_pt.qm"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
@ -228,6 +233,33 @@ SectionGroup $(TITLE_SecTranslations) SecTranslations
|
|||||||
File "locale\qt_ja.qm"
|
File "locale\qt_ja.qm"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Georgian"
|
||||||
|
SetOutPath "$INSTDIR\locale"
|
||||||
|
File "locale\ka_GE.qm"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Hungarian"
|
||||||
|
SetOutPath "$INSTDIR\locale"
|
||||||
|
File "locale\hu_HU.qm"
|
||||||
|
File "locale\qt_hu.qm"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Indonesian"
|
||||||
|
SetOutPath "$INSTDIR\locale"
|
||||||
|
File "locale\id_ID.qm"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Romanian"
|
||||||
|
SetOutPath "$INSTDIR\locale"
|
||||||
|
File "locale\ro_RO.qm"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Swedish"
|
||||||
|
SetOutPath "$INSTDIR\locale"
|
||||||
|
File "locale\sv_SE.qm"
|
||||||
|
File "locale\qt_sv.qm"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
SectionGroupEnd
|
SectionGroupEnd
|
||||||
|
|
||||||
Section $(TITLE_SecPlugins) SecPlugins
|
Section $(TITLE_SecPlugins) SecPlugins
|
||||||
@ -259,7 +291,6 @@ SectionEnd
|
|||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecMain} $(DESC_SecMain)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecMain} $(DESC_SecMain)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} $(DESC_SecTranslations)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} $(DESC_SecTranslations)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} $(DESC_SecPlugins)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} $(DESC_SecPlugins)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecExamplePlugin} $(DESC_SecExamplePlugin)
|
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(DESC_SecDesktop)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(DESC_SecDesktop)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecExtensions} $(DESC_SecExtensions)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecExtensions} $(DESC_SecExtensions)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecThemes} $(DESC_SecThemes)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecThemes} $(DESC_SecThemes)
|
||||||
|
Loading…
Reference in New Issue
Block a user