summaryrefslogtreecommitdiff
path: root/src/history/historymanager.cpp
diff options
context:
space:
mode:
authorlionelc <lionelc@lionelc.(none)>2010-03-30 11:37:25 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-02 22:01:06 +0200
commita2cb9efc54c78c47e41196f0121ca00255a4a7ab (patch)
treeb091956d703ef49ae2e6e1a36cdb2e28fd732d7f /src/history/historymanager.cpp
parentdisplay bookmark and history item only if string typed is longer than 3 chars (diff)
downloadrekonq-a2cb9efc54c78c47e41196f0121ca00255a4a7ab.tar.xz
add title for history items
Diffstat (limited to 'src/history/historymanager.cpp')
-rw-r--r--src/history/historymanager.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp
index 39c128f4..7aded714 100644
--- a/src/history/historymanager.cpp
+++ b/src/history/historymanager.cpp
@@ -362,7 +362,7 @@ void HistoryManager::load()
// Add item to completion object
QString _url = item.url;
- _url.remove(QRegExp("^http://|/$"));
+ //_url.remove(QRegExp("^http://|/$"));
m_completion->addItem(_url);
}
if (needToSort)
@@ -504,3 +504,27 @@ bool HistoryManager::clearDownloadsHistory()
QFile downloadFile(downloadFilePath);
return downloadFile.remove();
}
+
+
+QString HistoryManager::titleForHistoryUrl(QString url)
+{
+ QString title = "";
+
+ int i = 0;
+ while (i< history().count() && title.isEmpty())
+ {
+ if (history().at(i).url == url)
+ {
+ title = history().at(i).title;
+ }
+ i++;
+ }
+
+ if (title.isEmpty())
+ {
+ title = url;
+ }
+
+ return title;
+}
+