summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-25 00:12:10 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-25 00:12:10 +0200
commitdf884995df935d128f1809512a24cd436e5f985f (patch)
tree1ac954f38b6dd341934362f3336784c7a54ddfca /src/settings.cpp
parentHome page translations (diff)
downloadrekonq-df884995df935d128f1809512a24cd436e5f985f.tar.xz
Removing thumbs files on tableWidget changes && removing some
unuseful kWarning..
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index de15708a..3264ba05 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -115,7 +115,6 @@ Private::Private(SettingsDialog *parent)
widget->layout()->setMargin(0);
pageItem = parent->addPage(widget , i18n("WebKit"));
QString webkitIconPath = KStandardDirs::locate("appdata", "pics/webkit-icon.png");
- kWarning() << webkitIconPath;
KIcon webkitIcon = KIcon(QIcon(webkitIconPath));
pageItem->setIcon(webkitIcon);
@@ -149,6 +148,8 @@ SettingsDialog::SettingsDialog(QWidget *parent)
connect(d->generalUi.setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
+ connect(d->newtabpageUi.tableWidget, SIGNAL(cellChanged(int, int)), this, SLOT(deleteThumb(int,int)));
+
connect(d->ebrowsingModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
connect(d->cookiesModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
@@ -232,11 +233,10 @@ void SettingsDialog::saveSettings()
QStringList names, urls;
for(int i=0; i<9; ++i)
{
- if(t->item(i,0))
- {
+ if(t->item(i,0) && !t->item(i,0)->text().isEmpty())
names << t->item(i,0)->text();
+ if(t->item(i,1)&& !t->item(i,1)->text().isEmpty())
urls << t->item(i,1)->text();
- }
}
ReKonfig::setPreviewNames(names);
@@ -268,3 +268,14 @@ void SettingsDialog::setHomeToCurrentPage()
d->generalUi.kcfg_homePage->setText(webView->url().prettyUrl());
}
}
+
+
+void SettingsDialog::deleteThumb(int row ,int col)
+{
+ if(col!=1)
+ return;
+
+ QString path = KStandardDirs::locateLocal("cache", QString("thumbs/rek") + QString::number(row) + ".png", true);
+ QFile::remove(path);
+}
+