summaryrefslogtreecommitdiff
path: root/src/urlbar/urlresolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/urlbar/urlresolver.h')
-rw-r--r--src/urlbar/urlresolver.h50
1 files changed, 2 insertions, 48 deletions
diff --git a/src/urlbar/urlresolver.h b/src/urlbar/urlresolver.h
index 83228140..0ba93921 100644
--- a/src/urlbar/urlresolver.h
+++ b/src/urlbar/urlresolver.h
@@ -33,14 +33,11 @@
// KDE Includes
#include <KUrl>
-#include <KCompletion>
+
// Qt Includes
#include <QString>
#include <QList>
-#include <QDateTime>
-
-class AwesomeUrlCompletion;
class UrlSearchItem
{
@@ -58,25 +55,19 @@ public:
int type;
QString url;
QString title;
- QDateTime visitDateTime;
- int visitCount;
QString description;
QString bookmarkPath;
UrlSearchItem(const UrlSearchItem &item) : type(item.type),
url(item.url),
title(item.title),
- visitDateTime(item.visitDateTime),
- visitCount(item.visitCount),
description(item.description),
bookmarkPath(item.bookmarkPath)
{};
-
+
UrlSearchItem() : type(UrlSearchItem::Undefined),
url(QString()),
title(QString()),
- visitDateTime(QDateTime()),
- visitCount(0),
description(QString()),
bookmarkPath(QString())
{};
@@ -84,16 +75,12 @@ public:
UrlSearchItem(const int &_type,
const QString &_url,
const QString &_title = QString(),
- const QDateTime &visitDateTime = QDateTime(),
- const int &visitCount = 0,
const QString &description = QString(),
const QString &bookmarkPath = QString()
)
: type(_type),
url(_url),
title(_title),
- visitDateTime(visitDateTime),
- visitCount(visitCount),
description(description),
bookmarkPath(bookmarkPath)
{};
@@ -102,16 +89,6 @@ public:
{
return i.url == url;//TODO && i.title == title;
}
-
- inline bool operator <(const UrlSearchItem &i) const
- {
- return visitDateTime < i.visitDateTime;
- }
-
- inline bool operator >(const UrlSearchItem &i) const
- {
- return visitDateTime > i.visitDateTime;
- }
};
typedef QList <UrlSearchItem> UrlSearchList;
@@ -141,27 +118,4 @@ private:
// ------------------------------------------------------------------------------
-
-/**
- * This class represents all searchable item for the awesomebar.
- */
-class AwesomeUrlCompletion// : public KCompletion
-{
-public:
- AwesomeUrlCompletion();
- ~AwesomeUrlCompletion();
- void addItem(const UrlSearchItem& item);
- void removeItem(const UrlSearchItem& item);
- void setOrder(KCompletion::CompOrder);
- void updateTitle(const UrlSearchItem& item, const QString& newTitle);
- void clear();
- UrlSearchList substringCompletion(const QString& completionString);
-
-private:
- UrlSearchList m_items;
- UrlSearchList m_filteredItems;
- bool m_resetCompletion;
- QString m_lastCompletionString;
-};
-
#endif // URL_RESOLVER_H