summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/bookmarkowner.cpp2
-rw-r--r--src/bookmarks/bookmarkscontextmenu.h6
-rw-r--r--src/bookmarks/bookmarksmanager.cpp3
-rw-r--r--src/bookmarks/bookmarkstoolbar.h7
-rw-r--r--src/settings/appearancewidget.cpp2
-rw-r--r--src/tabbar.cpp6
-rw-r--r--src/urlbar/bookmarkwidget.h2
-rw-r--r--src/urlbar/urlresolver.cpp12
-rw-r--r--src/webpage.cpp20
9 files changed, 39 insertions, 21 deletions
diff --git a/src/bookmarks/bookmarkowner.cpp b/src/bookmarks/bookmarkowner.cpp
index f47b978d..d9df6e82 100644
--- a/src/bookmarks/bookmarkowner.cpp
+++ b/src/bookmarks/bookmarkowner.cpp
@@ -163,7 +163,7 @@ void BookmarkOwner::openBookmarkFolder(const KBookmark &bookmark)
return;
}
- foreach (KUrl url, urlList)
+ Q_FOREACH(const KUrl &url, urlList)
{
emit openUrl(url, Rekonq::NewFocusedTab);
}
diff --git a/src/bookmarks/bookmarkscontextmenu.h b/src/bookmarks/bookmarkscontextmenu.h
index 424f8da4..a6691fdd 100644
--- a/src/bookmarks/bookmarkscontextmenu.h
+++ b/src/bookmarks/bookmarkscontextmenu.h
@@ -24,8 +24,8 @@
* ============================================================ */
-#ifndef BOOKMARKCONTEXTMENU_H
-#define BOOKMARKCONTEXTMENU_H
+#ifndef BOOKMARKS_CONTEXT_MENU_H
+#define BOOKMARKS_CONTEXT_MENU_H
// KDE Includes
#include <KBookmarkMenu>
@@ -50,4 +50,4 @@ private:
BookmarkOwner *bmOwner;
};
-#endif // BOOKMARKCONTEXTMENU_H
+#endif // BOOKMARKS_CONTEXT_MENU_H
diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp
index dc545698..ea7b313d 100644
--- a/src/bookmarks/bookmarksmanager.cpp
+++ b/src/bookmarks/bookmarksmanager.cpp
@@ -297,11 +297,10 @@ void BookmarkProvider::slotPanelChanged()
KBookmark BookmarkProvider::bookmarkForUrl(const KUrl &url)
{
- KBookmark found;
-
KBookmarkGroup root = rootGroup();
if (root.isNull())
{
+ KBookmark found;
return found;
}
diff --git a/src/bookmarks/bookmarkstoolbar.h b/src/bookmarks/bookmarkstoolbar.h
index 5991a032..54a430e3 100644
--- a/src/bookmarks/bookmarkstoolbar.h
+++ b/src/bookmarks/bookmarkstoolbar.h
@@ -30,8 +30,6 @@
// KDE Includes
#include <KBookmarkMenu>
-#include <KToolBar>
-
/**
* This class represent the rekonq bookmarks menu.
@@ -69,6 +67,11 @@ private:
// ------------------------------------------------------------------------------
+
+// KDE Includes
+#include <KToolBar>
+
+
/**
* This class manage the bookmark toolbar.
* Some events from the toolbar are handled to allow the drag and drop
diff --git a/src/settings/appearancewidget.cpp b/src/settings/appearancewidget.cpp
index 03d81808..c444f724 100644
--- a/src/settings/appearancewidget.cpp
+++ b/src/settings/appearancewidget.cpp
@@ -87,4 +87,4 @@ bool AppearanceWidget::isDefault()
// TODO: implement me!!
return def;
-} \ No newline at end of file
+}
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 2d29032f..98243e71 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -322,6 +322,12 @@ void TabBar::emptyAreaContextMenu(const QPoint &pos)
menu.addSeparator();
menu.addAction(mainWindow->actionByName( QL1S("reload_all_tabs") ));
+ KToolBar *mainBar = mainWindow->toolBar("mainToolBar");
+ if(!mainBar->isVisible())
+ {
+ menu.addAction( mainBar->toggleViewAction() );
+ }
+
menu.exec(pos);
}
diff --git a/src/urlbar/bookmarkwidget.h b/src/urlbar/bookmarkwidget.h
index cdab328e..c3c15e18 100644
--- a/src/urlbar/bookmarkwidget.h
+++ b/src/urlbar/bookmarkwidget.h
@@ -44,7 +44,7 @@ class BookmarkWidget : public QFrame
Q_OBJECT
public:
- BookmarkWidget(const KBookmark &bookmark, QWidget *parent = 0);
+ explicit BookmarkWidget(const KBookmark &bookmark, QWidget *parent = 0);
~BookmarkWidget();
void showAt(const QPoint &pos);
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index b762716a..ed4dcb4e 100644
--- a/src/urlbar/urlresolver.cpp
+++ b/src/urlbar/urlresolver.cpp
@@ -95,11 +95,13 @@ UrlResolver::UrlResolver(const QString &typedUrl)
{
QString reg;
QString engineUrl;
- foreach(KService::Ptr s, SearchEngine::favorites())
+ Q_FOREACH(KService::Ptr s, SearchEngine::favorites())
{
engineUrl = QRegExp::escape(s->property("Query").toString()).replace("\\\\\\{@\\}","[\\d\\w-.]+");
- if (reg.isEmpty()) reg = "(" + engineUrl + ")";
- else reg = reg + "|(" + engineUrl + ")";
+ if (reg.isEmpty())
+ reg = '(' + engineUrl + ')';
+ else
+ reg = reg + "|(" + engineUrl + ')';
}
_searchEnginesRegexp = QRegExp(reg);
}
@@ -317,7 +319,7 @@ UrlSearchList UrlResolver::historyResolution()
qSort(found);
UrlSearchList list;
- foreach (HistoryItem i, found)
+ Q_FOREACH(const HistoryItem &i, found)
{
if (_searchEnginesRegexp.indexIn(i.url) == -1) //filter all urls that are search engine results
{
@@ -334,7 +336,7 @@ UrlSearchList UrlResolver::bookmarksResolution()
{
UrlSearchList list;
QList<KBookmark> found = Application::bookmarkProvider()->find(_typedString);
- foreach (KBookmark b, found)
+ Q_FOREACH(const KBookmark &b, found)
{
UrlSearchItem gItem(UrlSearchItem::Bookmark, b.url().url(), b.fullText());
list << gItem;
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 8221626e..9167c96d 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -125,12 +125,20 @@ static bool downloadResource (const KUrl& srcUrl, const KIO::MetaData& metaData
if (finfo.exists())
{
QDateTime now = QDateTime::currentDateTime();
- KIO::RenameDialog dlg (parent, i18n("Overwrite File?"), srcUrl, destUrl,
- KIO::RenameDialog_Mode(KIO::M_OVERWRITE | KIO::M_SKIP),
- -1, finfo.size(),
- now.toTime_t(), finfo.created().toTime_t(),
- now.toTime_t(), finfo.lastModified().toTime_t());
- result = dlg.exec();
+ QPointer<KIO::RenameDialog> dlg = new KIO::RenameDialog( parent,
+ i18n("Overwrite File?"),
+ srcUrl,
+ destUrl,
+ KIO::RenameDialog_Mode(KIO::M_OVERWRITE | KIO::M_SKIP),
+ -1,
+ finfo.size(),
+ now.toTime_t(),
+ finfo.created().toTime_t(),
+ now.toTime_t(),
+ finfo.lastModified().toTime_t()
+ );
+ result = dlg->exec();
+ delete dlg;
}
}
}