diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-05-06 03:09:23 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-05-06 03:09:23 +0200 |
commit | 06b2dc0ce6ec6dd4cb090c22e2f9f8521138146b (patch) | |
tree | bdbc792266fea13099eecebe4c032f97a2eb2fea /src | |
parent | updating authors.. (diff) | |
download | rekonq-06b2dc0ce6ec6dd4cb090c22e2f9f8521138146b.tar.xz |
EBN Krazy fixes. 1st round..
Diffstat (limited to 'src')
-rw-r--r-- | src/application.cpp | 5 | ||||
-rw-r--r-- | src/application.h | 4 | ||||
-rw-r--r-- | src/autosaver.cpp | 5 | ||||
-rw-r--r-- | src/autosaver.h | 20 | ||||
-rw-r--r-- | src/bookmarks.h | 4 | ||||
-rw-r--r-- | src/cookiejar.h | 14 | ||||
-rw-r--r-- | src/download.cpp | 2 | ||||
-rw-r--r-- | src/findbar.cpp | 9 | ||||
-rw-r--r-- | src/findbar.h | 12 | ||||
-rw-r--r-- | src/history.cpp | 14 | ||||
-rw-r--r-- | src/history.h | 14 | ||||
-rw-r--r-- | src/mainview.cpp | 4 | ||||
-rw-r--r-- | src/mainwindow.cpp | 4 | ||||
-rw-r--r-- | src/searchbar.cpp | 10 | ||||
-rw-r--r-- | src/settings.cpp | 3 | ||||
-rw-r--r-- | src/webview.cpp | 2 |
16 files changed, 82 insertions, 44 deletions
diff --git a/src/application.cpp b/src/application.cpp index ec24691e..32561847 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -45,8 +45,9 @@ #include <kio/jobclasses.h> // Qt Includes -#include <QtCore> -#include <QtWebKit> +#include <QtCore/QTimer> +#include <QtWebKit/QWebSettings> +#include <QtWebKit/QWebHistoryInterface> QPointer<HistoryManager> Application::s_historyManager; diff --git a/src/application.h b/src/application.h index 61f4af81..a09e008f 100644 --- a/src/application.h +++ b/src/application.h @@ -23,8 +23,6 @@ #ifndef APPLICATION_H #define APPLICATION_H -// Qt Includes -#include <QPointer> // KDE Includes #include <KUniqueApplication> @@ -35,6 +33,8 @@ #include <kio/job.h> #include <kio/jobclasses.h> +// Qt Includes +#include <QPointer> // Forward Declarations class KIcon; diff --git a/src/autosaver.cpp b/src/autosaver.cpp index 25bf9016..c7da12f3 100644 --- a/src/autosaver.cpp +++ b/src/autosaver.cpp @@ -20,14 +20,15 @@ -// Local Includes +// Self Includes #include "autosaver.h" +#include "autosaver.moc" // KDE Includes #include <KDebug> // Qt Includes -#include <QtCore> +#include <QtCore/QMetaObject> #define AUTOSAVE_IN 1000 * 3 // seconds diff --git a/src/autosaver.h b/src/autosaver.h index 8931da13..e0de8ea5 100644 --- a/src/autosaver.h +++ b/src/autosaver.h @@ -23,13 +23,21 @@ #ifndef AUTOSAVER_H #define AUTOSAVER_H -#include <QtCore> +// Qt Includes +#include <QtCore/QObject> +#include <QtCore/QBasicTimer> +#include <QtCore/QTime> + +// Forward Declarations +#include <QtCore/QTimerEvent> + +/** + * This class will call the save() slot on the parent object when the parent changes. + * It will wait several seconds after changed() to combining multiple changes and + * prevent continuous writing to disk. + * + */ -/* - This class will call the save() slot on the parent object when the parent changes. - It will wait several seconds after changed() to combining multiple changes and - prevent continuous writing to disk. - */ class AutoSaver : public QObject { Q_OBJECT diff --git a/src/bookmarks.h b/src/bookmarks.h index d7213cb7..38655133 100644 --- a/src/bookmarks.h +++ b/src/bookmarks.h @@ -209,7 +209,7 @@ signals: public slots: /** * @short Opens the context menu on given position - * @param point Point on whitch you want to open this menu + * @param point Point on which you want to open this menu */ void contextMenu(const QPoint &point); @@ -218,7 +218,7 @@ public slots: * Waits for signal that the group (or any of its children) with the address * @p groupAddress (e.g. "/4/5") has been modified by the caller @p caller. * - * @param group bookmark group adress + * @param group bookmark group address * @param caller caller that modified the bookmarks * @see KBookmarkManager::changed */ diff --git a/src/cookiejar.h b/src/cookiejar.h index 27071b6d..6cd91782 100644 --- a/src/cookiejar.h +++ b/src/cookiejar.h @@ -119,7 +119,8 @@ class CookieModel : public QAbstractTableModel Q_OBJECT public: - CookieModel(CookieJar *jar, QObject *parent = 0); + explicit CookieModel(CookieJar *jar, QObject *parent = 0); + QVariant headerData(int section, Qt::Orientation orientation, int role) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; @@ -144,19 +145,24 @@ class CookiesDialog : public QDialog, public Ui_CookiesDialog Q_OBJECT public: - CookiesDialog(CookieJar *cookieJar, QWidget *parent = 0); + explicit CookiesDialog(CookieJar *cookieJar, QWidget *parent = 0); private: QSortFilterProxyModel *m_proxyModel; }; + +// ---------------------------------------------------------------------------------------------------------------------- + + class CookieExceptionsModel : public QAbstractTableModel { Q_OBJECT friend class CookiesExceptionsDialog; public: - CookieExceptionsModel(CookieJar *cookieJar, QObject *parent = 0); + explicit CookieExceptionsModel(CookieJar *cookieJar, QObject *parent = 0); + QVariant headerData(int section, Qt::Orientation orientation, int role) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; @@ -183,7 +189,7 @@ class CookiesExceptionsDialog : public QDialog, public Ui_CookiesExceptionsDialo Q_OBJECT public: - CookiesExceptionsDialog(CookieJar *cookieJar, QWidget *parent = 0); + explicit CookiesExceptionsDialog(CookieJar *cookieJar, QWidget *parent = 0); private slots: void block(); diff --git a/src/download.cpp b/src/download.cpp index 9489b270..9a5b7a3d 100644 --- a/src/download.cpp +++ b/src/download.cpp @@ -67,7 +67,7 @@ void DownloadManager::newDownload(const KUrl &srcUrl, const KUrl &destUrl) KSharedPtr<KMimeType> mimeType = KMimeType::findByPath(srcUrl.prettyUrl()); QString typeText = KMimeType::extractKnownExtension(srcUrl.fileName()); - typeText += " (" + mimeType->name() + ")"; + typeText += " (" + mimeType->name() + ')'; int answer = KMessageBox::questionYesNoCancel(NULL, i18n("Download '%1'?\n""Type: %2", srcUrl.prettyUrl(), typeText), diff --git a/src/findbar.cpp b/src/findbar.cpp index 11d890c1..fd15546c 100644 --- a/src/findbar.cpp +++ b/src/findbar.cpp @@ -28,10 +28,15 @@ #include <KIcon> #include <KPushButton> #include <klocalizedstring.h> +#include <KXmlGuiWindow> // Qt Includes -#include <QtGui> - +#include <QtGui/QWidget> +#include <QtGui/QHBoxLayout> +#include <QtGui/QToolButton> +#include <QtGui/QLabel> +#include <QtGui/QKeyEvent> +#include <QtCore/QString> FindBar::FindBar(KXmlGuiWindow *mainwindow) : QWidget(mainwindow) diff --git a/src/findbar.h b/src/findbar.h index 15a82e1e..3fa148e1 100644 --- a/src/findbar.h +++ b/src/findbar.h @@ -22,14 +22,20 @@ #ifndef FINDBAR_H #define FINDBAR_H + // KDE Includes #include <KLineEdit> #include <KToolBar> -#include <KXmlGuiWindow> // Qt Includes -#include <QtCore> -#include <QtGui> +#include <QtGui/QWidget> +#include <QtGui/QCheckBox> +#include <QtGui/QKeyEvent> + +// Forward Declarations +class KXmlGuiWindow; +class QKeyEvent; +class QString; class FindBar : public QWidget diff --git a/src/history.cpp b/src/history.cpp index afcb477a..544b1f90 100644 --- a/src/history.cpp +++ b/src/history.cpp @@ -36,9 +36,17 @@ #include <KStandardDirs> // Qt Includes -#include <QtCore> -#include <QtGui> -#include <QtWebKit> +#include <QtCore/QList> +#include <QtCore/QUrl> +#include <QtCore/QDate> +#include <QtCore/QDateTime> +#include <QtCore/QString> +#include <QtCore/QFile> +#include <QtCore/QDataStream> +#include <QtCore/QBuffer> + +#include <QtWebKit/QWebHistoryInterface> +#include <QtWebKit/QWebSettings> #include <QtAlgorithms> diff --git a/src/history.h b/src/history.h index ecae00c3..b2af0891 100644 --- a/src/history.h +++ b/src/history.h @@ -48,8 +48,10 @@ class HistoryItem { public: HistoryItem() {} - HistoryItem(const QString &u, - const QDateTime &d = QDateTime(), const QString &t = QString()) + explicit HistoryItem(const QString &u, + const QDateTime &d = QDateTime(), + const QString &t = QString() + ) : title(t), url(u), dateTime(d) {} inline bool operator==(const HistoryItem &other) const @@ -159,7 +161,7 @@ public: UrlStringRole = Qt::UserRole + 4 }; - HistoryModel(HistoryManager *history, QObject *parent = 0); + explicit HistoryModel(HistoryManager *history, QObject *parent = 0); QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; @@ -185,7 +187,7 @@ class HistoryFilterModel : public QAbstractProxyModel Q_OBJECT public: - HistoryFilterModel(QAbstractItemModel *sourceModel, QObject *parent = 0); + explicit HistoryFilterModel(QAbstractItemModel *sourceModel, QObject *parent = 0); inline bool historyContains(const QString &url) const { @@ -236,7 +238,7 @@ class HistoryMenuModel : public QAbstractProxyModel Q_OBJECT public: - HistoryMenuModel(HistoryTreeModel *sourceModel, QObject *parent = 0); + explicit HistoryMenuModel(HistoryTreeModel *sourceModel, QObject *parent = 0); int columnCount(const QModelIndex &parent) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; QModelIndex mapFromSource(const QModelIndex & sourceIndex) const; @@ -328,7 +330,7 @@ class HistoryTreeModel : public QAbstractProxyModel Q_OBJECT public: - HistoryTreeModel(QAbstractItemModel *sourceModel, QObject *parent = 0); + explicit HistoryTreeModel(QAbstractItemModel *sourceModel, QObject *parent = 0); QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; int columnCount(const QModelIndex &parent) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; diff --git a/src/mainview.cpp b/src/mainview.cpp index d4edeb19..5432fa51 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -213,7 +213,7 @@ void MainView::clear() // clear the line edit history for (int i = 0; i < m_urlBars->count(); ++i) { - /// TODO What exacly do we need to clear here? + /// TODO What exactly do we need to clear here? urlBar(i)->clearHistory(); urlBar(i)->clear(); } @@ -713,4 +713,4 @@ void MainView::mouseDoubleClickEvent(QMouseEvent *event) return; } KTabWidget::mouseDoubleClickEvent(event); -}
\ No newline at end of file +} diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 63de9853..7af04da0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -572,7 +572,7 @@ void MainWindow::slotPrivateBrowsing(bool enable) " webpages are not added to the history," " new cookies are not stored, current cookies cannot be accessed," \ " site icons will not be stored, session will not be saved, " \ - " and searches are not addded to the pop-up menu in the Google search box." \ + " and searches are not added to the pop-up menu in the Google search box." \ " Until you close the window, you can still click the Back and Forward buttons" \ " to return to the webpages you have opened."); @@ -591,7 +591,7 @@ void MainWindow::slotPrivateBrowsing(bool enable) settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, false); MainWindow* win = Application::instance()->mainWindow(); - win->m_lastSearch = QString::null; + win->m_lastSearch.clear(); win->mainView()->clear(); } } diff --git a/src/searchbar.cpp b/src/searchbar.cpp index fad35748..685a8ec5 100644 --- a/src/searchbar.cpp +++ b/src/searchbar.cpp @@ -30,10 +30,12 @@ #include <KUrl> // Qt Includes -#include <QtCore> -#include <QtGui> -#include <QtNetwork> - +#include <QtCore/QString> +#include <QtGui/QSizePolicy> +#include <QtNetwork/QNetworkAccessManager> +#include <QtNetwork/QNetworkRequest> +#include <QtNetwork/QNetworkReply> +#include <QtXml/QXmlStreamReader> SearchBar::SearchBar(QWidget *parent) : KLineEdit(parent) diff --git a/src/settings.cpp b/src/settings.cpp index 1e42413f..990db365 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -51,8 +51,7 @@ #include <KUrl> // Qt Includes -#include <QtGui> -#include <QtWebKit> +#include <QtGui/QWidget> class Private diff --git a/src/webview.cpp b/src/webview.cpp index ae867d42..55ed4003 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -444,7 +444,7 @@ void WebView::loadFinished() { if (m_progress != 100) { - kWarning() << "Recieved finished signal while progress is still:" << progress() + kWarning() << "Received finished signal while progress is still:" << progress() << "Url:" << url(); } m_progress = 0; |