summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Ander Peñalba <jonan88@gmail.com>2010-08-20 16:12:39 +0200
committerJon Ander Peñalba <jonan88@gmail.com>2010-08-20 21:48:05 +0200
commitdd413ce2d00d4f484402384529161194605f7e5a (patch)
tree6ebce88d32ca799a26db7a09ebb64e2818ecf8ec
parentChanged the name of the files src/bookmarks/bookmarksmanager.* to src/bookmar... (diff)
downloadrekonq-dd413ce2d00d4f484402384529161194605f7e5a.tar.xz
Removed unused includes in src/bookmarks/bookmarkprovider.h
-rw-r--r--src/bookmarks/bookmarkowner.cpp2
-rw-r--r--src/bookmarks/bookmarkprovider.cpp14
-rw-r--r--src/bookmarks/bookmarkprovider.h56
-rw-r--r--src/bookmarks/bookmarkstreemodel.cpp23
-rw-r--r--src/newtabpage.cpp2
-rw-r--r--src/urlbar/urlbar.cpp1
-rw-r--r--src/urlbar/urlresolver.cpp1
-rw-r--r--src/zoombar.cpp3
8 files changed, 58 insertions, 44 deletions
diff --git a/src/bookmarks/bookmarkowner.cpp b/src/bookmarks/bookmarkowner.cpp
index 7861f0ac..862a7de4 100644
--- a/src/bookmarks/bookmarkowner.cpp
+++ b/src/bookmarks/bookmarkowner.cpp
@@ -38,7 +38,9 @@
#include "mainview.h"
// KDE Includes
+#include <KAction>
#include <KBookmarkDialog>
+#include <KLocalizedString>
#include <KMessageBox>
// Qt Includes
diff --git a/src/bookmarks/bookmarkprovider.cpp b/src/bookmarks/bookmarkprovider.cpp
index 03a3cc70..133cd4b8 100644
--- a/src/bookmarks/bookmarkprovider.cpp
+++ b/src/bookmarks/bookmarkprovider.cpp
@@ -50,7 +50,7 @@ BookmarkProvider::BookmarkProvider(QObject *parent)
, m_manager(0)
, m_owner(0)
, m_actionCollection(new KActionCollection(this))
- , _bookmarkActionMenu(0)
+ , m_bookmarkActionMenu(0)
{
kDebug() << "Loading Bookmarks Manager...";
@@ -164,13 +164,13 @@ KActionMenu* BookmarkProvider::bookmarkActionMenu(QWidget *parent)
kDebug() << "new Bookmarks Menu...";
KMenu *menu = new KMenu(parent);
- _bookmarkActionMenu = new KActionMenu(parent);
- _bookmarkActionMenu->setMenu(menu);
- _bookmarkActionMenu->setText(i18n("&Bookmarks"));
+ m_bookmarkActionMenu = new KActionMenu(parent);
+ m_bookmarkActionMenu->setMenu(menu);
+ m_bookmarkActionMenu->setText(i18n("&Bookmarks"));
new BookmarkMenu(m_manager, m_owner, menu, m_actionCollection);
kDebug() << "new Bookmarks Menu...DONE";
- return _bookmarkActionMenu;
+ return m_bookmarkActionMenu;
}
@@ -215,7 +215,7 @@ KBookmarkGroup BookmarkProvider::rootGroup()
}
-QList<KBookmark> BookmarkProvider::find(QString text)
+QList<KBookmark> BookmarkProvider::find(const QString &text)
{
QList<KBookmark> list;
KBookmarkGroup bookGroup = Application::bookmarkProvider()->rootGroup();
@@ -235,7 +235,7 @@ QList<KBookmark> BookmarkProvider::find(QString text)
}
-QList<KBookmark> BookmarkProvider::find(QList<KBookmark> list, const KBookmark &bookmark, QString text)
+QList<KBookmark> BookmarkProvider::find(QList<KBookmark> list, const KBookmark &bookmark, const QString &text)
{
if (bookmark.isGroup())
{
diff --git a/src/bookmarks/bookmarkprovider.h b/src/bookmarks/bookmarkprovider.h
index 0c2b9ee2..2630910c 100644
--- a/src/bookmarks/bookmarkprovider.h
+++ b/src/bookmarks/bookmarkprovider.h
@@ -27,30 +27,38 @@
* ============================================================ */
-#ifndef BOOKMARKS_H
-#define BOOKMARKS_H
+#ifndef BOOKMARKPROVIDER_H
+#define BOOKMARKPROVIDER_H
// Rekonq Includes
#include "rekonq_defines.h"
-// KDE Includes
-#include <KBookmarkMenu>
-#include <KToolBar>
+// Qt Includes
+#include <QObject>
// Forward Declarations
class BookmarksPanel;
class BookmarkToolBar;
class BookmarkOwner;
+class KAction;
+class KActionCollection;
+class KActionMenu;
+class KBookmark;
+class KBookmarkGroup;
+class KBookmarkManager;
+class KToolBar;
+class KUrl;
+
+class QAction;
+class QPoint;
/**
* This class represent the interface to rekonq bookmarks system.
* All rekonq needs (Bookmarks Menu, Bookmarks Toolbar) is provided
* from this class.
- * So it implements code to have each one
- *
- *
+ * So it implements code to have each one.
*/
class BookmarkProvider : public QObject
{
@@ -60,11 +68,10 @@ public:
/**
* @short Class constructor.
* Connect BookmarksProvider with bookmarks source
- * (actually konqueror's bookmarks)
- * @param parent The MainWindow to provide bookmarks objects
- *
+ * (actually konqueror's bookmarks).
+ * @param parent The MainWindow to provide bookmarks objects.
*/
- BookmarkProvider(QObject* parent = 0);
+ BookmarkProvider(QObject *parent = 0);
~BookmarkProvider();
/**
@@ -72,14 +79,13 @@ public:
* @param the parent widget
* @return the Bookmarks Menu
*/
- KActionMenu *bookmarkActionMenu(QWidget *parent);
+ KActionMenu* bookmarkActionMenu(QWidget *parent);
/**
* @short set the Bookmarks Toolbar Action
*/
- void registerBookmarkBar(BookmarkToolBar *);
-
- void removeToolBar(BookmarkToolBar *);
+ void registerBookmarkBar(BookmarkToolBar *toolbar);
+ void removeToolBar(BookmarkToolBar *toolbar);
/**
* @short Get action by name
@@ -88,7 +94,7 @@ public:
* @param name Name of action you want to get
* @return It returns actions if one exists or empty object
*/
- QAction *actionByName(const QString &name);
+ QAction* actionByName(const QString &name);
/**
* returns Bookmark Manager root group
@@ -97,11 +103,11 @@ public:
*/
KBookmarkGroup rootGroup();
- inline KBookmarkManager *bookmarkManager() { return m_manager; }
+ inline KBookmarkManager* bookmarkManager() { return m_manager; }
- inline BookmarkOwner *bookmarkOwner() { return m_owner; }
+ inline BookmarkOwner* bookmarkOwner() { return m_owner; }
- QList<KBookmark> find(QString text);
+ QList<KBookmark> find(const QString &text);
void registerBookmarkPanel(BookmarksPanel *panel);
void removeBookmarkPanel(BookmarksPanel *panel);
@@ -111,8 +117,6 @@ public:
signals:
/**
* @short This signal is emitted when an url has to be loaded
- *
- * @param url the URL to load
*/
void openUrl(const KUrl &, const Rekonq::OpenType &);
@@ -140,7 +144,7 @@ private slots:
void slotPanelChanged();
private:
- QList<KBookmark> find(QList<KBookmark> list, const KBookmark &bookmark, QString text);
+ QList<KBookmark> find(QList<KBookmark> list, const KBookmark &bookmark, const QString &text);
QString titleForBookmarkUrl(const KBookmark &bookmark, const QString &url);
KBookmark bookmarkForUrl(const KBookmark &bookmark, const KUrl &url);
@@ -148,11 +152,11 @@ private:
KBookmarkManager *m_manager;
BookmarkOwner *m_owner;
KActionCollection *m_actionCollection;
- QList<BookmarkToolBar *> m_bookmarkToolBars;
+ QList<BookmarkToolBar*> m_bookmarkToolBars;
QList<BookmarksPanel*> m_bookmarkPanels;
- KActionMenu *_bookmarkActionMenu;
+ KActionMenu *m_bookmarkActionMenu;
};
-#endif
+#endif // BOOKMARKPROVIDER_H
diff --git a/src/bookmarks/bookmarkstreemodel.cpp b/src/bookmarks/bookmarkstreemodel.cpp
index 14b9c734..ee19daf1 100644
--- a/src/bookmarks/bookmarkstreemodel.cpp
+++ b/src/bookmarks/bookmarkstreemodel.cpp
@@ -32,6 +32,10 @@
#include "application.h"
#include "bookmarkprovider.h"
+// KDE Includes
+#include <KBookmarkManager>
+#include <KLocalizedString>
+
// Qt Includes
#include <QtCore/QMimeData>
@@ -56,28 +60,27 @@ QVariant BtmItem::data(int role) const
if (role == Qt::DisplayRole)
return m_kbm.text();
+
if (role == Qt::DecorationRole)
return KIcon(m_kbm.icon());
+
if (role == Qt::UserRole)
return m_kbm.url();
+
if (role == Qt::ToolTipRole)
{
- QString tooltip = "";
-
- if (!m_kbm.fullText().isEmpty())
- {
- tooltip += m_kbm.fullText();
- }
+ QString tooltip = m_kbm.fullText();
if (m_kbm.isGroup())
- {
tooltip += i18ncp("%1=Number of items in bookmark folder", " (1 item)", " (%1 items)", childCount());
- }
- if (!m_kbm.url().url().isEmpty())
+
+ QString url = m_kbm.url().url();
+ if (!url.isEmpty())
{
if (!tooltip.isEmpty())
tooltip += '\n';
- tooltip += m_kbm.url().url();
+ tooltip += url;
}
+
return tooltip;
}
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index 0f2a0bc7..44b76e11 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -47,9 +47,11 @@
#include <KConfig>
#include <KDialog>
#include <KCalendarSystem>
+#include <KBookmarkManager>
// Qt Includes
#include <QtCore/QFile>
+#include <QtGui/QAction>
NewTabPage::NewTabPage(QWebFrame *frame)
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index 6a5599cd..c272d819 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -45,6 +45,7 @@
#include "bookmarkwidget.h"
// KDE Includes
+#include <KBookmarkManager>
#include <KCompletionBox>
#include <KStandardDirs>
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index db1276dc..d60dc563 100644
--- a/src/urlbar/urlresolver.cpp
+++ b/src/urlbar/urlresolver.cpp
@@ -34,6 +34,7 @@
#include "searchengine.h"
// KDE Includes
+#include <KBookmark>
#include <KUriFilter>
#include <KCompletion>
#include <KService>
diff --git a/src/zoombar.cpp b/src/zoombar.cpp
index b07aee03..041e6118 100644
--- a/src/zoombar.cpp
+++ b/src/zoombar.cpp
@@ -36,6 +36,7 @@
#include <KIcon>
#include <KStandardAction>
#include <KAction>
+#include <KLocalizedString>
// Qt Includes
#include <QtGui/QHBoxLayout>
@@ -57,7 +58,7 @@ ZoomBar::ZoomBar(QWidget *parent)
QToolButton *hideButton = new QToolButton(this);
hideButton->setAutoRaise(true);
- hideButton->setIcon(KIcon("dialog-close"));
+ hideButton->setIcon(KIcon("dialog-close"));
connect(hideButton, SIGNAL(clicked()), this, SLOT(hide()));
layout->addWidget(hideButton);