diff options
author | Albert Astals Cid <aacid@kde.org> | 2011-05-29 10:44:56 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2011-05-29 10:44:56 +0100 |
commit | 68ce178bc5e1028bb2440e0739ff91dc6bc79cfc (patch) | |
tree | 1ee4111d1b77207ce9873ddaed193d8a798b432f | |
parent | SVN_SILENT made messages (.desktop file) (diff) | |
download | rekonq-68ce178bc5e1028bb2440e0739ff91dc6bc79cfc.tar.xz |
Code janitoring
qDeleteAll knows how to delete values of the map in a better way than calling values
add const & to foreach "iterators"
-rw-r--r-- | src/opensearch/opensearchmanager.cpp | 2 | ||||
-rw-r--r-- | src/urlbar/listitem.cpp | 2 | ||||
-rw-r--r-- | src/webview.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/opensearch/opensearchmanager.cpp b/src/opensearch/opensearchmanager.cpp index 2b5d24ae..591a4acb 100644 --- a/src/opensearch/opensearchmanager.cpp +++ b/src/opensearch/opensearchmanager.cpp @@ -65,7 +65,7 @@ OpenSearchManager::OpenSearchManager(QObject *parent) OpenSearchManager::~OpenSearchManager() { - qDeleteAll(m_engineCache.values()); + qDeleteAll(m_engineCache); m_engineCache.clear(); m_engines.clear(); } diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp index c6f4210e..17a4585d 100644 --- a/src/urlbar/listitem.cpp +++ b/src/urlbar/listitem.cpp @@ -475,7 +475,7 @@ EngineBar::EngineBar(KService::Ptr selectedEngine, QWidget *parent) if (SearchEngine::defaultEngine().isNull()) return; m_engineGroup->addAction(newEngineAction(SearchEngine::defaultEngine(), selectedEngine)); - foreach(KService::Ptr engine, SearchEngine::favorites()) + foreach(const KService::Ptr &engine, SearchEngine::favorites()) { if (engine->desktopEntryName() != SearchEngine::defaultEngine()->desktopEntryName()) { diff --git a/src/webview.cpp b/src/webview.cpp index 7c02ee06..ca7f1b70 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -226,7 +226,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) { KActionMenu *searchMenu = new KActionMenu(KIcon("edit-find"), i18n("Search with"), this); - foreach(KService::Ptr engine, SearchEngine::favorites()) + foreach(const KService::Ptr &engine, SearchEngine::favorites()) { a = new KAction(engine->name(), this); a->setIcon(rApp->iconManager()->iconForUrl(SearchEngine::buildQuery(engine, ""))); |