diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-08-20 18:32:52 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-08-20 18:32:52 +0200 |
commit | 78047f4e1024d0d4fd27b53c8b2ec29ff04afba6 (patch) | |
tree | af684203e2959c8f71bc2c2ad0a88a5d22b5f80b /src | |
parent | Add a "show main toolbar" action in the empty tabbar contextual menu (diff) | |
download | rekonq-78047f4e1024d0d4fd27b53c8b2ec29ff04afba6.tar.xz |
Krazy fixes, first bunch
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks/bookmarkowner.cpp | 2 | ||||
-rw-r--r-- | src/bookmarks/bookmarkscontextmenu.h | 6 | ||||
-rw-r--r-- | src/bookmarks/bookmarkstoolbar.h | 10 | ||||
-rw-r--r-- | src/mainwindow.h | 1 | ||||
-rw-r--r-- | src/settings/appearancewidget.cpp | 2 | ||||
-rw-r--r-- | src/urlbar/bookmarkwidget.h | 2 | ||||
-rw-r--r-- | src/urlbar/urlresolver.cpp | 12 | ||||
-rw-r--r-- | src/webpage.cpp | 20 |
8 files changed, 30 insertions, 25 deletions
diff --git a/src/bookmarks/bookmarkowner.cpp b/src/bookmarks/bookmarkowner.cpp index fb7c737e..09d615d1 100644 --- a/src/bookmarks/bookmarkowner.cpp +++ b/src/bookmarks/bookmarkowner.cpp @@ -161,7 +161,7 @@ void BookmarkOwner::openBookmarkFolder() 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/bookmarkstoolbar.h b/src/bookmarks/bookmarkstoolbar.h index cf7b62cc..92a56749 100644 --- a/src/bookmarks/bookmarkstoolbar.h +++ b/src/bookmarks/bookmarkstoolbar.h @@ -27,16 +27,9 @@ #ifndef BOOKMARKSTOOLBAR_H #define BOOKMARKSTOOLBAR_H -// Local Includes - - -// Qt Includes - // KDE Includes #include <KBookmarkMenu> -#include <KToolBar> - /** @@ -75,8 +68,11 @@ private: // ------------------------------------------------------------------------------ + +// KDE Includes #include <KToolBar> + class BookmarkToolBar : public KToolBar { Q_OBJECT diff --git a/src/mainwindow.h b/src/mainwindow.h index 50c73b4b..52a51549 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -187,4 +187,3 @@ private: }; #endif // MAINWINDOW_H -
\ No newline at end of file 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/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; } } } |