summaryrefslogtreecommitdiff
path: root/src/history
diff options
context:
space:
mode:
Diffstat (limited to 'src/history')
-rw-r--r--src/history/historymanager.cpp56
-rw-r--r--src/history/historymanager.h28
2 files changed, 0 insertions, 84 deletions
diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp
index d531c189..b1c5e7cc 100644
--- a/src/history/historymanager.cpp
+++ b/src/history/historymanager.cpp
@@ -464,62 +464,6 @@ AwesomeUrlCompletion * HistoryManager::completionObject() const
}
-void HistoryManager::addDownload(const QString &srcUrl, const QString &destUrl)
-{
- QWebSettings *globalSettings = QWebSettings::globalSettings();
- if (globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled))
- return;
- QString downloadFilePath = KStandardDirs::locateLocal("appdata" , "downloads");
- QFile downloadFile(downloadFilePath);
- if (!downloadFile.open(QFile::WriteOnly | QFile::Append))
- {
- kDebug() << "Unable to open download file (WRITE mode)..";
- return;
- }
- QDataStream out(&downloadFile);
- out << srcUrl;
- out << destUrl;
- out << QDateTime::currentDateTime();
- downloadFile.close();
-}
-
-
-DownloadList HistoryManager::downloads()
-{
- DownloadList list;
-
- QString downloadFilePath = KStandardDirs::locateLocal("appdata" , "downloads");
- QFile downloadFile(downloadFilePath);
- if (!downloadFile.open(QFile::ReadOnly))
- {
- kDebug() << "Unable to open download file (READ mode)..";
- return list;
- }
-
- QDataStream in(&downloadFile);
- while (!in.atEnd())
- {
- QString srcUrl;
- in >> srcUrl;
- QString destUrl;
- in >> destUrl;
- QDateTime dt;
- in >> dt;
- DownloadItem item(srcUrl, destUrl, dt);
- list << item;
- }
- return list;
-}
-
-
-bool HistoryManager::clearDownloadsHistory()
-{
- QString downloadFilePath = KStandardDirs::locateLocal("appdata" , "downloads");
- QFile downloadFile(downloadFilePath);
- return downloadFile.remove();
-}
-
-
QString HistoryManager::titleForHistoryUrl(QString url)
{
return history().at(m_historyFilterModel->historyLocation(url)).title;
diff --git a/src/history/historymanager.h b/src/history/historymanager.h
index 7b82579d..6b73cac0 100644
--- a/src/history/historymanager.h
+++ b/src/history/historymanager.h
@@ -84,30 +84,6 @@ public:
// ---------------------------------------------------------------------------------------------------------------
-class DownloadItem
-{
-public:
- DownloadItem() {}
- explicit DownloadItem(const QString &srcUrl,
- const QString &destUrl,
- const QDateTime &d
- )
- : srcUrlString(srcUrl)
- , destUrlString(destUrl)
- , dateTime(d)
- {}
-
- QString srcUrlString;
- QString destUrlString;
- QDateTime dateTime;
-};
-
-
-typedef QList<DownloadItem> DownloadList;
-
-// ---------------------------------------------------------------------------------------------------------------
-
-
// Forward Declarations
class AutoSaver;
class HistoryModel;
@@ -157,10 +133,6 @@ public:
*/
AwesomeUrlCompletion *completionObject() const;
- void addDownload(const QString &srcUrl, const QString &destUrl);
- DownloadList downloads();
- bool clearDownloadsHistory();
-
public slots:
void clear();
void loadSettings();