1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

[Fix] searching bookmarks in bookmarks sidebar.

- now it properly search also unsorted bookmarks
- improved performance when searching in all treeviews
- updated italian translation
This commit is contained in:
nowrep 2011-12-28 16:31:18 +01:00
parent e5f6478439
commit 6259577d8b
6 changed files with 31 additions and 22 deletions

Binary file not shown.

BIN
bin/locale/qt_ru.qm Normal file

Binary file not shown.

View File

@ -64,7 +64,7 @@ void DownloadFileHelper::handleUnsupportedContent(QNetworkReply* reply, bool ask
// Close Empty Tab
if (m_webPage) {
if (!m_webPage->mainFrame()->url().isEmpty()) {
if (!m_webPage->mainFrame()->url().isEmpty() && m_webPage->mainFrame()->url().toString() != "about:blank") {
m_downloadPage = m_webPage->mainFrame()->url();
}
else if (m_webPage->history()->canGoBack()) {

View File

@ -97,6 +97,8 @@ QList<QTreeWidgetItem*> TreeWidget::allItems()
}
return m_allTreeItems;
}
#include <QDebug>
void TreeWidget::filterString(QString string)
{
expandAll();
@ -123,8 +125,13 @@ void TreeWidget::filterString(QString string)
QTreeWidgetItem* firstItem = topLevelItem(0);
QTreeWidgetItem* belowItem = itemBelow(firstItem);
int topLvlIndex = 0;
while (firstItem) {
if (!firstItem->parent() && !belowItem) {
if (firstItem->text(0).contains(string, Qt::CaseInsensitive)) {
firstItem->setHidden(false);
}
else if (!firstItem->parent() && !belowItem) {
firstItem->setHidden(true);
}
else if (!belowItem) {
@ -133,7 +140,9 @@ void TreeWidget::filterString(QString string)
else if (!firstItem->parent() && !belowItem->parent()) {
firstItem->setHidden(true);
}
firstItem = belowItem;
topLvlIndex++;
firstItem = topLevelItem(topLvlIndex);
belowItem = itemBelow(firstItem);
}
}

View File

@ -672,7 +672,7 @@ void WebView::bookmarkLink()
p_QupZilla->bookmarkPage();
}
else {
p_QupZilla->addBookmark(action->data().toUrl(), action->data().toString(), siteIcon());
p_QupZilla->addBookmark(action->data().toUrl(), title(), siteIcon());
}
}
}

View File

@ -173,7 +173,7 @@
<message>
<location filename="../src/adblock/adblockicon.cpp" line="29"/>
<source>AdBlock lets you block unwanted content on web-pages</source>
<translation type="unfinished"></translation>
<translation>AdBlock permette di bloccare ogni contenuto indesiderato nelle pagine</translation>
</message>
<message>
<location filename="../src/adblock/adblockicon.cpp" line="39"/>
@ -316,7 +316,7 @@
<message>
<location filename="../src/autofill/autofillnotification.cpp" line="35"/>
<source>Do you want QupZilla to remember the password for &lt;b&gt;%1&lt;/b&gt; on %2?</source>
<translation type="unfinished"></translation>
<translation>Vuoi che QupZilla ricordi la password per &lt;b&gt;%1&lt;/b&gt; on %2?</translation>
</message>
</context>
<context>
@ -570,12 +570,12 @@
<message>
<location filename="../src/bookmarks/bookmarksmanager.cpp" line="550"/>
<source>&lt;b&gt;Warning: &lt;/b&gt;You already have bookmarked this page!</source>
<translation type="unfinished"></translation>
<translation>&lt;b&gt;Attenzione: &lt;/b&gt;Hai già aggiunto questa pagina ai segnalibri!</translation>
</message>
<message>
<location filename="../src/bookmarks/bookmarksmanager.cpp" line="563"/>
<source>Choose name and location of this bookmark.</source>
<translation type="unfinished"></translation>
<translation>Scegli nome e posizione di questo segnalibro.</translation>
</message>
<message>
<source>Unsorted Bookmarks</source>
@ -1506,7 +1506,7 @@
<message>
<location filename="../src/history/historymanager.cpp" line="102"/>
<source>Copy address</source>
<translation type="unfinished">Copia indirizzo</translation>
<translation>Copia indirizzo</translation>
</message>
<message>
<location filename="../src/history/historymanager.cpp" line="154"/>
@ -1707,7 +1707,7 @@
<message>
<location filename="../src/app/mainapplication.cpp" line="681"/>
<source>&lt;b&gt;QupZilla crashed :-(&lt;/b&gt;&lt;br/&gt;Oops, the last session of QupZilla was interrupted unexpectedly. We apologize for this. Would you like to try restoring the last saved state?</source>
<translation type="unfinished"></translation>
<translation>&lt;b&gt;QupZilla si è chiuso inaspettatamente :-(&lt;/b&gt;&lt;br/&gt;Oops, l&apos;ultima sessione di QupZilla si è chiusa inaspettatamente. Ci dispiace molto. Vuoi provare a ripristinare l&apos;ultima sessione salvata?</translation>
</message>
<message>
<source>&lt;b&gt;QupZilla crashed :-(&lt;/b&gt;&lt;br/&gt;Oops, last session of QupZilla ends with its crash. We are very sorry. Would you try to restore saved state?</source>
@ -1719,7 +1719,7 @@
<message>
<location filename="../src/navigation/navigationbar.cpp" line="33"/>
<source>No Named Page</source>
<translation type="unfinished">Pagina senza nome</translation>
<translation>Pagina senza nome</translation>
</message>
<message>
<location filename="../src/navigation/navigationbar.cpp" line="54"/>
@ -2261,7 +2261,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="450"/>
<source>Active profile:</source>
<translation type="unfinished"></translation>
<translation>Profilo attivo:</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="658"/>
@ -2296,7 +2296,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="942"/>
<source>Ask when entering Private Browsing mode</source>
<translation type="unfinished"></translation>
<translation>Chiedi quando entri in modalità Navigazione Anonima</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="950"/>
@ -2965,7 +2965,7 @@
<message>
<location filename="../src/app/qupzilla.cpp" line="1459"/>
<source>There are still %1 open tabs and your session won&apos;t be stored. Are you sure to quit QupZilla?</source>
<translation type="unfinished"></translation>
<translation>Ci sono ancora %1 delle schede aperte e la sessione non sarà salvata. Sei sicuro di voler uscire da QupZilla?</translation>
</message>
<message>
<source>Bookmarks In ToolBar</source>
@ -3319,12 +3319,12 @@
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="242"/>
<source>Apply</source>
<translation type="unfinished"></translation>
<translation>Applica</translation>
</message>
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="245"/>
<source>Load title from page</source>
<translation type="unfinished"></translation>
<translation>Carica titolo dalla pagina</translation>
</message>
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="251"/>
@ -3339,7 +3339,7 @@
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="136"/>
<source>E-mail is optional&lt;br/&gt;&lt;b&gt;Note: &lt;/b&gt;Please use English language only.</source>
<translation type="unfinished"></translation>
<translation>L&apos;e-mail è facoltativa&lt;br/&gt;&lt;b&gt;Nota:&lt;/b&gt;Per favore, scrivi solo in Inglese.</translation>
</message>
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="244"/>
@ -3488,7 +3488,7 @@ Si prega di aggiungere l&apos;icona RSS nella barra di navigazione su un sito ch
<message>
<location filename="../src/rss/rsswidget.cpp" line="49"/>
<source>Untitled feed</source>
<translation type="unfinished"></translation>
<translation>Fonte senza titolo</translation>
</message>
<message>
<location filename="../src/rss/rsswidget.cpp" line="53"/>
@ -3616,12 +3616,12 @@ Dopo l&apos;aggiunta o la rimozione dei percorsi di certificazione, è necessari
<message>
<location filename="../src/opensearch/searchenginesdialog.ui" line="56"/>
<source>Up</source>
<translation type="unfinished">Su</translation>
<translation>Su</translation>
</message>
<message>
<location filename="../src/opensearch/searchenginesdialog.ui" line="63"/>
<source>Down</source>
<translation type="unfinished">Giu</translation>
<translation>Giu</translation>
</message>
<message>
<location filename="../src/opensearch/searchenginesdialog.ui" line="91"/>
@ -3726,7 +3726,7 @@ Dopo l&apos;aggiunta o la rimozione dei percorsi di certificazione, è necessari
<message>
<location filename="../src/navigation/siteicon.cpp" line="29"/>
<source>Show informations about this page</source>
<translation type="unfinished">Mostra informazioni sulla pagina</translation>
<translation>Mostra informazioni su questa pagina</translation>
</message>
</context>
<context>
@ -4074,7 +4074,7 @@ Dopo l&apos;aggiunta o la rimozione dei percorsi di certificazione, è necessari
<message>
<location filename="../src/plugins/speeddial.cpp" line="186"/>
<source>Unable to load</source>
<translation type="unfinished"></translation>
<translation>Caricamento impossibile</translation>
</message>
</context>
<context>