1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

More cleanups + remove now unusued WebHistoryInterface

This commit is contained in:
David Rosca 2015-02-08 11:51:19 +01:00
parent 226c721d57
commit e3deb6cfd5
6 changed files with 0 additions and 99 deletions

View File

@ -520,11 +520,7 @@ QNetworkDiskCache* MainApplication::networkCache()
Settings settings; Settings settings;
const QString defaultBasePath = QString("%1/networkcache/").arg(DataPaths::currentProfilePath()); const QString defaultBasePath = QString("%1/networkcache/").arg(DataPaths::currentProfilePath());
const QString basePath = settings.value("Web-Browser-Settings/CachePath", defaultBasePath).toString(); 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); const QString cachePath = QString("%1/QtWebEngine/").arg(basePath);
#endif
m_networkCache = new QNetworkDiskCache(this); m_networkCache = new QNetworkDiskCache(this);
m_networkCache->setCacheDirectory(cachePath); m_networkCache->setCacheDirectory(cachePath);
@ -702,9 +698,6 @@ void MainApplication::postLaunch()
} }
QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, DataPaths::currentProfilePath()); 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(messageReceived(QString)), this, SLOT(messageReceived(QString)));
connect(this, SIGNAL(aboutToQuit()), this, SLOT(saveSettings())); connect(this, SIGNAL(aboutToQuit()), this, SLOT(saveSettings()));

View File

@ -61,8 +61,6 @@ void BookmarksIcon::checkBookmark(const QUrl &url, bool forceCheck)
QList<BookmarkItem*> items = mApp->bookmarks()->searchBookmarks(url); QList<BookmarkItem*> items = mApp->bookmarks()->searchBookmarks(url);
m_bookmark = items.isEmpty() ? 0 : items.first(); m_bookmark = items.isEmpty() ? 0 : items.first();
#if QTWEBENGINE_DISABLED
#endif
if (m_bookmark /*|| !mApp->plugins()->speedDial()->pageForUrl(url).url.isEmpty()*/) { if (m_bookmark /*|| !mApp->plugins()->speedDial()->pageForUrl(url).url.isEmpty()*/) {
setBookmarkSaved(); setBookmarkSaved();
} }

View File

@ -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

View File

@ -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

View File

@ -36,9 +36,6 @@
#include <QStringListModel> #include <QStringListModel>
#include <QMenu> #include <QMenu>
#include <QTimer> #include <QTimer>
#if QTWEBENGINE_DISABLED
#include <QWebEngineFrame>
#endif
#include <QClipboard> #include <QClipboard>
#include <QContextMenuEvent> #include <QContextMenuEvent>

View File

@ -33,9 +33,6 @@
#include <QNetworkCookie> #include <QNetworkCookie>
#include <QMessageBox> #include <QMessageBox>
#if QTWEBENGINE_DISABLED
#include <QWebDatabase>
#endif
#include <QWebEngineSettings> #include <QWebEngineSettings>
#include <QNetworkDiskCache> #include <QNetworkDiskCache>
#include <QDateTime> #include <QDateTime>
@ -80,9 +77,6 @@ void ClearPrivateData::clearWebDatabases()
{ {
const QString profile = DataPaths::currentProfilePath(); const QString profile = DataPaths::currentProfilePath();
#if QTWEBENGINE_DISABLED
QWebDatabase::removeAllDatabases();
#endif
QzTools::removeDir(profile + "/Databases"); QzTools::removeDir(profile + "/Databases");
} }