1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Updated translations + some modifications in icon provider

This commit is contained in:
nowrep 2011-04-26 10:03:17 +02:00
parent 036cb1c30b
commit 48fa91159f
9 changed files with 811 additions and 707 deletions

Binary file not shown.

Binary file not shown.

View File

@ -315,7 +315,6 @@ void MainApplication::quitApplication()
if (m_mainWindows.count() > 0)
saveStateSlot();
qDebug() << "Quitting application...";
QSettings settings(m_activeProfil+"settings.ini", QSettings::IniFormat);
settings.beginGroup("SessionRestore");
settings.setValue("isRunning",false);
@ -327,19 +326,16 @@ void MainApplication::quitApplication()
if (deleteCookies)
QFile::remove(m_activeProfil+"cookies.dat");
if (deleteHistory) {
QSqlQuery query;
query.exec("DELETE FROM history");
query.exec("VACUUM");
}
if (deleteHistory)
m_historymodel->clearHistory();
cookieJar()->saveCookies();
m_networkmanager->saveCertExceptions();
m_iconProvider->saveIconsToDatabase();
m_plugins->c2f_saveSettings();
AdBlockManager::instance()->save();
QFile::remove(getActiveProfil() + "WebpageIcons.db");
qDebug() << "Quitting application...";
quit();
}

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string notr="true"/>
</property>
<property name="styleSheet">
<string notr="true"/>

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">

View File

@ -5,7 +5,7 @@ IconProvider::IconProvider(QObject *parent) :
QObject(parent)
{
m_timer = new QTimer(this);
m_timer->setInterval(30*1000);
m_timer->setInterval(10*1000);
m_timer->start();
connect(m_timer, SIGNAL(timeout()), this, SLOT(saveIconsToDatabase()));
}
@ -36,7 +36,7 @@ QIcon IconProvider::iconForUrl(const QUrl &url)
QSqlQuery query;
query.prepare("SELECT icon FROM icons WHERE url = ?");
query.bindValue(0, url.toEncoded());
query.bindValue(0, url.toEncoded(QUrl::RemoveFragment));
query.exec();
if (query.next()) {
QIcon image;
@ -70,7 +70,7 @@ void IconProvider::saveIconsToDatabase()
QSqlQuery query;
query.prepare("SELECT id FROM icons WHERE url = ?");
query.bindValue(0, ic.url.toEncoded());
query.bindValue(0, ic.url.toEncoded(QUrl::RemoveFragment));
query.exec();
if (query.next())
@ -79,7 +79,7 @@ void IconProvider::saveIconsToDatabase()
query.prepare("INSERT INTO icons (icon, url) VALUES (?,?)");
query.bindValue(0, bArray.toBase64());
query.bindValue(1, ic.url.toEncoded());
query.bindValue(1, ic.url.toEncoded(QUrl::RemoveFragment));
query.exec();
}

View File

@ -81,8 +81,12 @@ WebView::WebView(QupZilla* mainClass, QWidget* parent)
void WebView::slotIconChanged()
{
mApp->iconProvider()->saveIcon(this);
m_siteIcon = icon();
if (url().toString().contains("file://") || title().contains(tr("Failed loading page")))
return;
mApp->iconProvider()->saveIcon(this);
}
WebPage* WebView::webPage() const

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff