[SCM] rekonq packaging branch, master, updated. ff1779f3df919e326d908879f3ba18b1b63b103f

José Manuel Santamaría Lema santa-guest at alioth.debian.org
Fri May 27 12:14:35 UTC 2011


The following commit has been merged in the master branch:
commit ff1779f3df919e326d908879f3ba18b1b63b103f
Author: José Manuel Santamaría Lema <panfaust at gmail.com>
Date:   Fri May 27 14:16:33 2011 +0200

    Add fix_history_ordering.diff.
---
 debian/changelog                         |    2 +
 debian/patches/fix_history_ordering.diff |  126 ++++++++++++++++++++++++++++++
 debian/patches/series                    |    1 +
 3 files changed, 129 insertions(+), 0 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4d44874..32fefe5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ rekonq (0.7.0-1) UNRELEASED; urgency=low
   [ José Manuel Santamaría Lema ]
   * Add libqtwebkit4-dbg to Recommends.
   * Add dont_set_app_as_parent.diff; fixes a crash on exit.
+  * Add fix_history_ordering.diff in order to make history browsing work
+    properly.
 
  -- Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org>  Fri, 27 May 2011 10:14:22 +0200
 
diff --git a/debian/patches/fix_history_ordering.diff b/debian/patches/fix_history_ordering.diff
new file mode 100644
index 0000000..6f7103a
--- /dev/null
+++ b/debian/patches/fix_history_ordering.diff
@@ -0,0 +1,126 @@
+From 4e956fe2423d963a60b249707c22d731585f403d Mon Sep 17 00:00:00 2001
+From: Andrea Diamantini <adjam7 at gmail.com>
+Date: Sun, 10 Apr 2011 00:52:06 +0200
+Subject: [PATCH] Fix History ordering (check about:history page before and
+ after this patch) and remove the "provileged" item in the
+ urlbar suggestions as it was NOT really working. Reduce min
+ suggestion list from 3 to 2 to enable more history
+ suggestions. .
+
+---
+ src/history/historymanager.h |    2 +-
+ src/urlbar/urlresolver.cpp   |   57 ++++++++++++++---------------------------
+ src/urlbar/urlresolver.h     |    2 +-
+ 3 files changed, 22 insertions(+), 39 deletions(-)
+
+diff --git a/src/history/historymanager.h b/src/history/historymanager.h
+index eb8d78d..8650bd1 100644
+--- a/src/history/historymanager.h
++++ b/src/history/historymanager.h
+@@ -84,7 +84,7 @@ public:
+     // history is sorted in reverse
+     inline bool operator <(const HistoryItem &other) const
+     {
+-        return relevance() > other.relevance();
++        return dateTime > other.dateTime;
+     }
+ 
+     QString title;
+diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
+index ee01599..d89f27d 100644
+--- a/src/urlbar/urlresolver.cpp
++++ b/src/urlbar/urlresolver.cpp
+@@ -47,7 +47,7 @@
+ 
+ // defines
+ #define MAX_ELEMENTS 8
+-#define MIN_SUGGESTIONS 3
++#define MIN_SUGGESTIONS 2
+ 
+ // NOTE
+ // default kurifilter plugin list (at least in my box):
+@@ -173,26 +173,9 @@ UrlSearchList UrlResolver::orderLists()
+         list << _qurlFromUserInput;
+     }
+ 
+-    //find the history items that match the typed string
+-    UrlSearchItem privileged = privilegedItem(&_history);
+     int historyCount = _history.count();
+-
+-    //find the bookmarks items that match the typed string
+-    if (privileged.type == UrlSearchItem::Undefined)
+-    {
+-        privileged = privilegedItem(&_bookmarks);
+-    }
+-    else if (privileged.type == UrlSearchItem::History && _bookmarks.removeOne(privileged))
+-    {
+-        privileged.type |= UrlSearchItem::Bookmark;
+-    }
+     int bookmarksCount = _bookmarks.count();
+ 
+-    if (privileged.type != UrlSearchItem::Undefined)
+-    {
+-        list.prepend(privileged);
+-    }
+-
+     int availableEntries = MAX_ELEMENTS - list.count() - MIN_SUGGESTIONS;
+ 
+     UrlSearchList common;
+@@ -436,22 +419,22 @@ void UrlResolver::suggestionsReceived(const QString &text, const ResponseList &s
+ }
+ 
+ 
+-UrlSearchItem UrlResolver::privilegedItem(UrlSearchList* list)
+-{
+-    UrlSearchItem item;
+-    QString dot = QString(QL1C('.'));
+-    QString test1 = QString(QL1C('/')) + _typedString + dot;
+-    QString test2 = dot + _typedString + dot;
+-
+-    for (int i = 0; i < list->count(); i++)
+-    {
+-        item = list->at(i);
+-        //TODO: move this to AwesomeUrlCompletion::substringCompletion and add a priviledged flag to UrlSearchItem
+-        if (item.url.contains(test1) || item.url.contains(test2))
+-        {
+-            list->removeAt(i);
+-            return item;
+-        }
+-    }
+-    return UrlSearchItem();
+-}
++// UrlSearchItem UrlResolver::privilegedItem(UrlSearchList* list)
++// {
++//     UrlSearchItem item;
++//     QString dot = QString(QL1C('.'));
++//     QString test1 = QString(QL1C('/')) + _typedString + dot;
++//     QString test2 = dot + _typedString + dot;
++// 
++//     for (int i = 0; i < list->count(); i++)
++//     {
++//         item = list->at(i);
++//         //TODO: move this to AwesomeUrlCompletion::substringCompletion and add a priviledged flag to UrlSearchItem
++//         if (item.url.contains(test1) || item.url.contains(test2))
++//         {
++//             list->removeAt(i);
++//             return item;
++//         }
++//     }
++//     return UrlSearchItem();
++// }
+diff --git a/src/urlbar/urlresolver.h b/src/urlbar/urlresolver.h
+index 7054909..030d1de 100644
+--- a/src/urlbar/urlresolver.h
++++ b/src/urlbar/urlresolver.h
+@@ -150,7 +150,7 @@ private:
+     void computeQurlFromUserInput();
+     void computeBookmarks();
+ 
+-    UrlSearchItem privilegedItem(UrlSearchList* list);
++//     UrlSearchItem privilegedItem(UrlSearchList* list);
+     UrlSearchList orderLists();
+ 
+     QString _typedString;
+-- 
+1.7.5.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 65ca936..093c144 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 dont_set_app_as_parent.diff
+fix_history_ordering.diff

-- 
rekonq packaging



More information about the pkg-kde-commits mailing list