summaryrefslogtreecommitdiff
path: root/src
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
parentHome page translations (diff)
downloadrekonq-df884995df935d128f1809512a24cd436e5f985f.tar.xz
Removing thumbs files on tableWidget changes && removing some
unuseful kWarning..
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks.cpp6
-rw-r--r--src/homepage.cpp3
-rw-r--r--src/settings.cpp19
-rw-r--r--src/settings.h2
4 files changed, 19 insertions, 11 deletions
diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp
index a92cb2bb..c542701c 100644
--- a/src/bookmarks.cpp
+++ b/src/bookmarks.cpp
@@ -170,7 +170,6 @@ BookmarkProvider::BookmarkProvider(QObject *parent)
if (!QFile::exists(bookfile.path()))
{
QString bookmarksDefaultPath = KStandardDirs::locate("appdata" , "defaultbookmarks.xbel");
- kWarning() << bookmarksDefaultPath;
QFile bkms(bookmarksDefaultPath);
QString bookmarksPath = KStandardDirs::locateLocal("appdata", "bookmarks.xml", true);
bookmarksPath.replace("rekonq", "konqueror");
@@ -214,10 +213,7 @@ void BookmarkProvider::slotBookmarksChanged(const QString &group, const QString
Q_UNUSED(caller)
if (!m_bookmarkToolBar)
- {
- kWarning() << "There is no bookmark toolbar";
return;
- }
KBookmarkGroup toolBarGroup = m_manager->toolbar();
if (toolBarGroup.isNull())
@@ -239,8 +235,6 @@ QAction *BookmarkProvider::actionByName(const QString &name)
QAction *action = m_actionCollection->action(name);
if (action)
return action;
- /* else */
- kWarning() << "Action named: " << name << " not found, returning empty action.";
return new QAction(this); // return empty object instead of NULL pointer
}
diff --git a/src/homepage.cpp b/src/homepage.cpp
index 54a89129..e1a31dd3 100644
--- a/src/homepage.cpp
+++ b/src/homepage.cpp
@@ -92,7 +92,8 @@ QString HomePage::speedDial()
{
QStringList names = ReKonfig::previewNames();
QStringList urls = ReKonfig::previewUrls();
-
+
+ kDebug() << urls;
QString speed = QString();
for(int i = 0; i< urls.count(); ++i)
{
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);
+}
+
diff --git a/src/settings.h b/src/settings.h
index 0be89173..8f61ad25 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -55,6 +55,8 @@ private slots:
void saveSettings();
void setHomeToCurrentPage();
+
+ void deleteThumb(int,int);
};
#endif // SETTINGS_H