From fbc75df5d54bdda2f699c23a8f2439d9ff683905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 10 May 2012 09:08:11 +0000 Subject: [PATCH] first problem resolved: url bar is no more red if bookmarkfile is empty, and empty or duplicate bookmarks are removed from the list; refs #147 --- src/browser.hxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/browser.hxx b/src/browser.hxx index e05e994..c6f388a 100644 --- a/src/browser.hxx +++ b/src/browser.hxx @@ -878,6 +878,8 @@ class Browser: public QMainWindow, protected Ui::Browser { if (qobject_cast(_url)) for (int i(0); i(_url)->count(); ++i) urls<(_url)->itemText(i); + urls.removeAll(""); + urls.removeDuplicates(); if (_bookmarkfile.writeable()) { LOG<<"write to bookmark file"; _bookmarkfile.write(urls); @@ -915,6 +917,8 @@ class Browser: public QMainWindow, protected Ui::Browser { LOG<<"load from settings"; urls = _settings()->value("Window/Urls").toStringList(); } + urls.removeAll(""); + urls.removeDuplicates(); if (qobject_cast(_url)) { QString ci(qobject_cast(_url)->currentText()); qobject_cast(_url)->clear();