mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
More cleanups + remove now unusued WebHistoryInterface
This commit is contained in:
parent
226c721d57
commit
e3deb6cfd5
@ -520,11 +520,7 @@ QNetworkDiskCache* MainApplication::networkCache()
|
||||
Settings settings;
|
||||
const QString defaultBasePath = QString("%1/networkcache/").arg(DataPaths::currentProfilePath());
|
||||
const QString basePath = settings.value("Web-Browser-Settings/CachePath", defaultBasePath).toString();
|
||||
#if QTWEBENGINE_DISABLED
|
||||
const QString cachePath = QString("%1/%2-Qt%3/").arg(basePath, qWebKitVersion(), qVersion());
|
||||
#else
|
||||
const QString cachePath = QString("%1/QtWebEngine/").arg(basePath);
|
||||
#endif
|
||||
|
||||
m_networkCache = new QNetworkDiskCache(this);
|
||||
m_networkCache->setCacheDirectory(cachePath);
|
||||
@ -702,9 +698,6 @@ void MainApplication::postLaunch()
|
||||
}
|
||||
|
||||
QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, DataPaths::currentProfilePath());
|
||||
#if QTWEBENGINE_DISABLED
|
||||
QWebEngineHistoryInterface::setDefaultInterface(new WebHistoryInterface(this));
|
||||
#endif
|
||||
|
||||
connect(this, SIGNAL(messageReceived(QString)), this, SLOT(messageReceived(QString)));
|
||||
connect(this, SIGNAL(aboutToQuit()), this, SLOT(saveSettings()));
|
||||
|
@ -61,8 +61,6 @@ void BookmarksIcon::checkBookmark(const QUrl &url, bool forceCheck)
|
||||
QList<BookmarkItem*> items = mApp->bookmarks()->searchBookmarks(url);
|
||||
m_bookmark = items.isEmpty() ? 0 : items.first();
|
||||
|
||||
#if QTWEBENGINE_DISABLED
|
||||
#endif
|
||||
if (m_bookmark /*|| !mApp->plugins()->speedDial()->pageForUrl(url).url.isEmpty()*/) {
|
||||
setBookmarkSaved();
|
||||
}
|
||||
|
@ -1,39 +0,0 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2010-2014 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 "webhistoryinterface.h"
|
||||
#include "mainapplication.h"
|
||||
#include "history.h"
|
||||
|
||||
#if QTWEBENGINE_DISABLED
|
||||
|
||||
WebHistoryInterface::WebHistoryInterface(QObject* parent)
|
||||
: QWebEngineHistoryInterface(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void WebHistoryInterface::addHistoryEntry(const QString &url)
|
||||
{
|
||||
m_clickedLinks.insert(url);
|
||||
}
|
||||
|
||||
bool WebHistoryInterface::historyContains(const QString &url) const
|
||||
{
|
||||
return m_clickedLinks.find(url) != m_clickedLinks.end();
|
||||
}
|
||||
|
||||
#endif
|
@ -1,42 +0,0 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2010-2014 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 WEBHISTORYINTERFACE_H
|
||||
#define WEBHISTORYINTERFACE_H
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "qzcommon.h"
|
||||
|
||||
#if QTWEBENGINE_DISABLED
|
||||
|
||||
class QUPZILLA_EXPORT WebHistoryInterface : public QWebEngineHistoryInterface
|
||||
{
|
||||
public:
|
||||
explicit WebHistoryInterface(QObject* parent = 0);
|
||||
|
||||
void addHistoryEntry(const QString &url);
|
||||
bool historyContains(const QString &url) const;
|
||||
|
||||
private:
|
||||
std::set<QString> m_clickedLinks;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // WEBHISTORYINTERFACE_H
|
@ -36,9 +36,6 @@
|
||||
#include <QStringListModel>
|
||||
#include <QMenu>
|
||||
#include <QTimer>
|
||||
#if QTWEBENGINE_DISABLED
|
||||
#include <QWebEngineFrame>
|
||||
#endif
|
||||
#include <QClipboard>
|
||||
#include <QContextMenuEvent>
|
||||
|
||||
|
@ -33,9 +33,6 @@
|
||||
|
||||
#include <QNetworkCookie>
|
||||
#include <QMessageBox>
|
||||
#if QTWEBENGINE_DISABLED
|
||||
#include <QWebDatabase>
|
||||
#endif
|
||||
#include <QWebEngineSettings>
|
||||
#include <QNetworkDiskCache>
|
||||
#include <QDateTime>
|
||||
@ -80,9 +77,6 @@ void ClearPrivateData::clearWebDatabases()
|
||||
{
|
||||
const QString profile = DataPaths::currentProfilePath();
|
||||
|
||||
#if QTWEBENGINE_DISABLED
|
||||
QWebDatabase::removeAllDatabases();
|
||||
#endif
|
||||
QzTools::removeDir(profile + "/Databases");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user