From d9d8506536bbe02d4c6a64feb7c921dc520b2d8b Mon Sep 17 00:00:00 2001 From: nowrep Date: Thu, 17 Mar 2011 17:03:04 +0100 Subject: [PATCH] Updated code model --- src/3rdparty/qtwin.cpp | 3 ++ src/app/appui.cpp | 4 ++- src/app/autosaver.cpp | 4 +-- src/app/autosaver.h | 4 +-- src/app/mainapplication.cpp | 4 +-- src/app/qupzilla.cpp | 4 +-- src/app/qupzilla.h | 1 + src/autofill/autofillmodel.cpp | 2 +- src/autofill/autofillmodel.h | 2 +- src/autofill/autofillnotification.cpp | 2 +- src/autofill/autofillnotification.h | 4 +-- src/bookmarks/bookmarksmanager.cpp | 14 ++++----- src/bookmarks/bookmarksmanager.h | 4 +-- src/bookmarks/bookmarksmodel.cpp | 4 +-- src/bookmarks/bookmarkstoolbar.cpp | 2 +- src/bookmarks/bookmarkstoolbar.h | 2 +- src/bookmarks/bookmarkswidget.cpp | 2 +- src/bookmarks/bookmarkswidget.h | 2 +- src/cookies/cookiejar.cpp | 2 +- src/cookies/cookiejar.h | 2 +- src/cookies/cookiemanager.cpp | 4 +-- src/cookies/cookiemanager.h | 4 +-- src/downloads/downloaditem.cpp | 6 ++-- src/downloads/downloaditem.h | 8 ++--- src/downloads/downloadmanager.cpp | 14 ++++----- src/downloads/downloadmanager.h | 10 +++---- src/downloads/downloadoptionsdialog.cpp | 2 +- src/downloads/downloadoptionsdialog.h | 4 +-- src/history/historymanager.cpp | 10 +++---- src/history/historymanager.h | 6 ++-- src/history/historymodel.cpp | 4 +-- src/navigation/locationbar.cpp | 8 ++--- src/navigation/locationbar.h | 8 ++--- src/navigation/locationcompleter.cpp | 6 ++-- src/navigation/locationcompleter.h | 2 +- src/navigation/locationpopup.cpp | 2 +- src/navigation/locationpopup.h | 2 +- src/navigation/websearchbar.cpp | 8 ++--- src/navigation/websearchbar.h | 2 +- src/network/networkmanager.cpp | 6 ++-- src/network/networkmanager.h | 4 +-- src/network/networkmanagerproxy.cpp | 10 +++---- src/network/networkmanagerproxy.h | 8 ++--- src/other/aboutdialog.cpp | 2 +- src/other/aboutdialog.h | 4 +-- src/other/clearprivatedata.cpp | 2 +- src/other/clearprivatedata.h | 2 +- src/other/sourceviewer.cpp | 3 +- src/other/sourceviewer.h | 2 +- src/other/updater.cpp | 4 +-- src/other/updater.h | 2 +- src/plugins/clicktoflash.cpp | 18 +++++------ src/plugins/clicktoflash.h | 2 +- src/plugins/pluginproxy.cpp | 6 ++-- src/plugins/plugins.cpp | 10 +++---- src/plugins/plugins.h | 2 +- src/plugins/webpluginfactory.cpp | 2 +- src/plugins/webpluginfactory.h | 4 +-- src/preferences/autofillmanager.cpp | 2 +- src/preferences/autofillmanager.h | 4 +-- src/preferences/pluginslist.cpp | 4 +-- src/preferences/pluginslist.h | 4 +-- src/preferences/preferences.cpp | 6 ++-- src/preferences/preferences.h | 4 +-- src/preferences/sslmanager.cpp | 2 +- src/preferences/sslmanager.h | 4 +-- src/rss/rssmanager.cpp | 18 +++++------ src/rss/rssmanager.h | 4 +-- src/rss/rssnotification.cpp | 2 +- src/rss/rssnotification.h | 4 +-- src/rss/rsswidget.cpp | 4 +-- src/rss/rsswidget.h | 4 +-- src/sidebar/sidebar.cpp | 2 +- src/sidebar/sidebar.h | 2 +- src/tools/clickablelabel.cpp | 6 ++-- src/tools/clickablelabel.h | 6 ++-- src/tools/frame.cpp | 4 +-- src/tools/frame.h | 4 +-- src/tools/htmlhighlighter.cpp | 2 +- src/tools/htmlhighlighter.h | 2 +- src/tools/notification.cpp | 2 +- src/tools/notification.h | 2 +- src/tools/treewidget.cpp | 4 +-- src/tools/treewidget.h | 6 ++-- src/webview/searchtoolbar.cpp | 2 +- src/webview/searchtoolbar.h | 2 +- src/webview/siteinfo.cpp | 2 +- src/webview/siteinfo.h | 4 +-- src/webview/siteinfowidget.cpp | 2 +- src/webview/siteinfowidget.h | 4 +-- src/webview/tabbar.cpp | 8 ++--- src/webview/tabbar.h | 4 +-- src/webview/tabwidget.cpp | 6 ++-- src/webview/tabwidget.h | 2 +- src/webview/webpage.cpp | 6 ++-- src/webview/webpage.h | 6 ++-- src/webview/webtab.cpp | 4 +-- src/webview/webtab.h | 2 +- src/webview/webview.cpp | 40 ++++++++++++------------- src/webview/webview.h | 12 ++++---- 100 files changed, 246 insertions(+), 239 deletions(-) diff --git a/src/3rdparty/qtwin.cpp b/src/3rdparty/qtwin.cpp index 8424ac6df..d08d2e339 100644 --- a/src/3rdparty/qtwin.cpp +++ b/src/3rdparty/qtwin.cpp @@ -109,6 +109,7 @@ static bool resolveLibs() */ bool QtWin::isRunningWindows7() { +#ifdef Q_WS_WIN OSVERSIONINFO osvi; ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); @@ -117,6 +118,8 @@ bool QtWin::isRunningWindows7() GetVersionEx(&osvi); return ( (osvi.dwMajorVersion > 6) || ( (osvi.dwMajorVersion == 6) && (osvi.dwMinorVersion >= 1) )); +#endif + return false; } /*! diff --git a/src/app/appui.cpp b/src/app/appui.cpp index 8aa3cc7cb..110b53d48 100644 --- a/src/app/appui.cpp +++ b/src/app/appui.cpp @@ -256,6 +256,8 @@ void QupZilla::setupMenu() m_menuView->addAction(QIcon::fromTheme("zoom-in"), tr("Zoom In"), this, SLOT(zoomIn()))->setShortcut(QKeySequence("Ctrl++")); m_menuView->addAction(QIcon::fromTheme("zoom-out"), tr("Zoom Out"), this, SLOT(zoomOut()))->setShortcut(QKeySequence("Ctrl+-")); m_menuView->addAction(QIcon::fromTheme("zoom-original"), tr("Reset"), this, SLOT(zoomReset()))->setShortcut(QKeySequence("Ctrl+0")); + m_menuView->addSeparator(); + m_menuView->addSeparator(); m_menuView->addAction(QIcon::fromTheme("text-html"), tr("Page Source"), this, SLOT(showSource()))->setShortcut(QKeySequence("Ctrl+U")); m_menuView->addAction(m_actionShowFullScreen); @@ -282,7 +284,7 @@ void QupZilla::setupMenu() //Make shortcuts available even in fullscreen (menu hidden) QList actions = menuBar()->actions(); - foreach (QAction *action, actions) { + foreach (QAction* action, actions) { if (action->menu()) actions += action->menu()->actions(); addAction(action); diff --git a/src/app/autosaver.cpp b/src/app/autosaver.cpp index 4e594672b..e8b42013f 100644 --- a/src/app/autosaver.cpp +++ b/src/app/autosaver.cpp @@ -18,13 +18,13 @@ #include "autosaver.h" #include "mainapplication.h" -AutoSaver::AutoSaver(QObject *parent) : +AutoSaver::AutoSaver(QObject* parent) : QObject(parent) { m_timer.start(1000*5, this); } -void AutoSaver::timerEvent(QTimerEvent *event) +void AutoSaver::timerEvent(QTimerEvent* event) { if (event->timerId() == m_timer.timerId() && mApp->isChanged()) emit saveApp(); diff --git a/src/app/autosaver.h b/src/app/autosaver.h index da9231812..0dc3567d1 100644 --- a/src/app/autosaver.h +++ b/src/app/autosaver.h @@ -36,7 +36,7 @@ class AutoSaver : public QObject { Q_OBJECT public: - explicit AutoSaver(QObject *parent = 0); + explicit AutoSaver(QObject* parent = 0); signals: void saveApp(); @@ -44,7 +44,7 @@ signals: public slots: private: - void timerEvent(QTimerEvent *); + void timerEvent(QTimerEvent* event); QBasicTimer m_timer; }; diff --git a/src/app/mainapplication.cpp b/src/app/mainapplication.cpp index 604d4e3ba..0cc93b02e 100644 --- a/src/app/mainapplication.cpp +++ b/src/app/mainapplication.cpp @@ -403,7 +403,7 @@ AutoFillModel* MainApplication::autoFill() return m_autofill; } -void MainApplication::aboutToCloseWindow(QupZilla *window) +void MainApplication::aboutToCloseWindow(QupZilla* window) { if (!window) return; @@ -452,7 +452,7 @@ bool MainApplication::saveStateSlot() return true; } -bool MainApplication::restoreStateSlot(QupZilla *window) +bool MainApplication::restoreStateSlot(QupZilla* window) { QSettings settings(m_activeProfil+"settings.ini", QSettings::IniFormat); settings.beginGroup("SessionRestore"); diff --git a/src/app/qupzilla.cpp b/src/app/qupzilla.cpp index ed337f7b1..7642817f2 100644 --- a/src/app/qupzilla.cpp +++ b/src/app/qupzilla.cpp @@ -192,7 +192,7 @@ void QupZilla::refreshHistory(int index) void QupZilla::goAtHistoryIndex() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { weView()->page()->history()->goToItem(weView()->page()->history()->itemAt(action->data().toInt())); } refreshHistory(); @@ -407,7 +407,7 @@ void QupZilla::bookmarkAllTabs() void QupZilla::loadActionUrl() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { loadAddress(action->data().toUrl()); } } diff --git a/src/app/qupzilla.h b/src/app/qupzilla.h index 45d8cb0e0..ebe257970 100644 --- a/src/app/qupzilla.h +++ b/src/app/qupzilla.h @@ -204,6 +204,7 @@ private: QMenu* m_menuHistory; QMenu* m_menuBack; QMenu* m_menuForward; + QMenu* m_menuEncoding; QAction* m_actionShowToolbar; QAction* m_actionShowBookmarksToolbar; QAction* m_actionShowStatusbar; diff --git a/src/autofill/autofillmodel.cpp b/src/autofill/autofillmodel.cpp index cf1f8801f..2e6a31bb5 100644 --- a/src/autofill/autofillmodel.cpp +++ b/src/autofill/autofillmodel.cpp @@ -21,7 +21,7 @@ #include "mainapplication.h" #include "autofillnotification.h" -AutoFillModel::AutoFillModel(QupZilla* mainClass, QObject *parent) : +AutoFillModel::AutoFillModel(QupZilla* mainClass, QObject* parent) : QObject(parent) ,p_QupZilla(mainClass) ,m_isStoring(false) diff --git a/src/autofill/autofillmodel.h b/src/autofill/autofillmodel.h index 7c8194425..4bbe73dc6 100644 --- a/src/autofill/autofillmodel.h +++ b/src/autofill/autofillmodel.h @@ -32,7 +32,7 @@ class AutoFillModel : public QObject { Q_OBJECT public: - explicit AutoFillModel(QupZilla* mainClass, QObject *parent = 0); + explicit AutoFillModel(QupZilla* mainClass, QObject* parent = 0); void completePage(WebView* view); bool isStored(const QUrl &url); diff --git a/src/autofill/autofillnotification.cpp b/src/autofill/autofillnotification.cpp index 3e9c4969c..59843715f 100644 --- a/src/autofill/autofillnotification.cpp +++ b/src/autofill/autofillnotification.cpp @@ -21,7 +21,7 @@ #include "mainapplication.h" #include "notification.h" -AutoFillNotification::AutoFillNotification(QUrl url, QByteArray data, QString pass, QWidget *parent) +AutoFillNotification::AutoFillNotification(QUrl url, QByteArray data, QString pass, QWidget* parent) :Notification(parent) ,ui(new Ui::AutoFillWidget) ,m_url(url) diff --git a/src/autofill/autofillnotification.h b/src/autofill/autofillnotification.h index e35d2bb9d..e1b75c9ce 100644 --- a/src/autofill/autofillnotification.h +++ b/src/autofill/autofillnotification.h @@ -34,7 +34,7 @@ class AutoFillNotification : public Notification Q_OBJECT public: - explicit AutoFillNotification(QUrl url, QByteArray data, QString pass, QWidget *parent = 0); + explicit AutoFillNotification(QUrl url, QByteArray data, QString pass, QWidget* parent = 0); ~AutoFillNotification(); private slots: @@ -42,7 +42,7 @@ private slots: void never(); private: - Ui::AutoFillWidget *ui; + Ui::AutoFillWidget* ui; QUrl m_url; QByteArray m_data; QString m_pass; diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp index a81caf0b5..edbdc8979 100644 --- a/src/bookmarks/bookmarksmanager.cpp +++ b/src/bookmarks/bookmarksmanager.cpp @@ -27,7 +27,7 @@ //Won't be bad idea to rewrite bookmarks access via bookmarksmodel -BookmarksManager::BookmarksManager(QupZilla* mainClass, QWidget *parent) : +BookmarksManager::BookmarksManager(QupZilla* mainClass, QWidget* parent) : QWidget(parent) ,m_isRefreshing(false) ,ui(new Ui::BookmarksManager) @@ -56,7 +56,7 @@ QupZilla* BookmarksManager::getQupZilla() return p_QupZilla; } -void BookmarksManager::setMainWindow(QupZilla *window) +void BookmarksManager::setMainWindow(QupZilla* window) { if (window) p_QupZilla = window; @@ -72,7 +72,7 @@ void BookmarksManager::addFolder() refreshTable(); } -void BookmarksManager::itemChanged(QTreeWidgetItem *item) +void BookmarksManager::itemChanged(QTreeWidgetItem* item) { if (!item || m_isRefreshing) return; @@ -84,7 +84,7 @@ void BookmarksManager::itemChanged(QTreeWidgetItem *item) m_bookmarksModel->editBookmark(id, url, name); } -void BookmarksManager::itemControlClicked(QTreeWidgetItem *item) +void BookmarksManager::itemControlClicked(QTreeWidgetItem* item) { if (!item || item->text(1).isEmpty()) return; @@ -93,7 +93,7 @@ void BookmarksManager::itemControlClicked(QTreeWidgetItem *item) void BookmarksManager::loadInNewTab() { - if (QAction *action = qobject_cast(sender())) + if (QAction* action = qobject_cast(sender())) getQupZilla()->tabWidget()->addView(action->data().toUrl(), tr("New Tab"), TabWidget::NewNotSelectedTab); } @@ -122,7 +122,7 @@ void BookmarksManager::deleteItem() getQupZilla()->bookmarksToolbar()->refreshBookmarks(); } -void BookmarksManager::addBookmark(WebView *view) +void BookmarksManager::addBookmark(WebView* view) { insertBookmark(view->url(), view->title()); } @@ -132,7 +132,7 @@ void BookmarksManager::moveBookmark() QTreeWidgetItem* item = ui->bookmarksTree->currentItem(); if (!item) return; - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { m_bookmarksModel->editBookmark(item->whatsThis(1).toInt(), item->text(0), action->data().toString()); } refreshTable(); diff --git a/src/bookmarks/bookmarksmanager.h b/src/bookmarks/bookmarksmanager.h index 6c05dfe2a..cd3cd96ed 100644 --- a/src/bookmarks/bookmarksmanager.h +++ b/src/bookmarks/bookmarksmanager.h @@ -39,7 +39,7 @@ class BookmarksManager : public QWidget Q_OBJECT public: - explicit BookmarksManager(QupZilla* mainClass, QWidget *parent = 0); + explicit BookmarksManager(QupZilla* mainClass, QWidget* parent = 0); ~BookmarksManager(); void addBookmark(WebView* view); void insertBookmark(const QUrl &url, const QString &title); @@ -62,7 +62,7 @@ private: QupZilla* getQupZilla(); bool m_isRefreshing; - Ui::BookmarksManager *ui; + Ui::BookmarksManager* ui; QPointer p_QupZilla; BookmarksModel* m_bookmarksModel; }; diff --git a/src/bookmarks/bookmarksmodel.cpp b/src/bookmarks/bookmarksmodel.cpp index aa9dfd022..2a01a9b31 100644 --- a/src/bookmarks/bookmarksmodel.cpp +++ b/src/bookmarks/bookmarksmodel.cpp @@ -123,7 +123,7 @@ bool BookmarksModel::saveBookmark(QUrl url, QString title, QString folder) return query.exec(); } -bool BookmarksModel::saveBookmark(WebView *view, QString folder) +bool BookmarksModel::saveBookmark(WebView* view, QString folder) { return saveBookmark(view->url(), view->title(), folder); } @@ -141,7 +141,7 @@ bool BookmarksModel::removeBookmark(QUrl url) return removeBookmark(bookmarkId(url)); } -bool BookmarksModel::removeBookmark(WebView *view) +bool BookmarksModel::removeBookmark(WebView* view) { return removeBookmark(bookmarkId(view->url())); } diff --git a/src/bookmarks/bookmarkstoolbar.cpp b/src/bookmarks/bookmarkstoolbar.cpp index 818e2af27..7c20e2f03 100644 --- a/src/bookmarks/bookmarkstoolbar.cpp +++ b/src/bookmarks/bookmarkstoolbar.cpp @@ -20,7 +20,7 @@ #include "locationbar.h" #include "bookmarksmodel.h" -BookmarksToolbar::BookmarksToolbar(QupZilla* mainClass, QWidget *parent) : +BookmarksToolbar::BookmarksToolbar(QupZilla* mainClass, QWidget* parent) : QToolBar(parent) ,p_QupZilla(mainClass) ,m_bookmarksModel(0) diff --git a/src/bookmarks/bookmarkstoolbar.h b/src/bookmarks/bookmarkstoolbar.h index 8193a3740..959e43275 100644 --- a/src/bookmarks/bookmarkstoolbar.h +++ b/src/bookmarks/bookmarkstoolbar.h @@ -33,7 +33,7 @@ class BookmarksToolbar : public QToolBar { Q_OBJECT public: - explicit BookmarksToolbar(QupZilla* mainClass, QWidget *parent = 0); + explicit BookmarksToolbar(QupZilla* mainClass, QWidget* parent = 0); void setColor(QColor color); signals: diff --git a/src/bookmarks/bookmarkswidget.cpp b/src/bookmarks/bookmarkswidget.cpp index e7d949e66..8ee449c55 100644 --- a/src/bookmarks/bookmarkswidget.cpp +++ b/src/bookmarks/bookmarkswidget.cpp @@ -20,7 +20,7 @@ #include "bookmarksmodel.h" #include "mainapplication.h" -BookmarksWidget::BookmarksWidget(int bookmarkId, QWidget *parent) : +BookmarksWidget::BookmarksWidget(int bookmarkId, QWidget* parent) : QMenu(parent) ,ui(new Ui::BookmarksWidget) ,m_bookmarkId(bookmarkId) diff --git a/src/bookmarks/bookmarkswidget.h b/src/bookmarks/bookmarkswidget.h index 10b073325..861e28f57 100644 --- a/src/bookmarks/bookmarkswidget.h +++ b/src/bookmarks/bookmarkswidget.h @@ -41,7 +41,7 @@ class BookmarksWidget : public QMenu { Q_OBJECT public: - explicit BookmarksWidget(int bookmarkId, QWidget *parent = 0); + explicit BookmarksWidget(int bookmarkId, QWidget* parent = 0); ~BookmarksWidget(); void showAt(QWidget* _parent); diff --git a/src/cookies/cookiejar.cpp b/src/cookies/cookiejar.cpp index 1e607d0f9..c905e4163 100644 --- a/src/cookies/cookiejar.cpp +++ b/src/cookies/cookiejar.cpp @@ -20,7 +20,7 @@ #define COOKIE_DEBUG //TODO: black/white listing -CookieJar::CookieJar(QupZilla* mainClass, QObject *parent) : +CookieJar::CookieJar(QupZilla* mainClass, QObject* parent) : QNetworkCookieJar(parent) ,p_QupZilla(mainClass) { diff --git a/src/cookies/cookiejar.h b/src/cookies/cookiejar.h index 1f945a8c2..5ce34bd40 100644 --- a/src/cookies/cookiejar.h +++ b/src/cookies/cookiejar.h @@ -33,7 +33,7 @@ class CookieJar : public QNetworkCookieJar { Q_OBJECT public: - explicit CookieJar(QupZilla* mainClass, QObject *parent = 0); + explicit CookieJar(QupZilla* mainClass, QObject* parent = 0); void loadSettings(); bool setCookiesFromUrl(const QList &cookieList, const QUrl &url); diff --git a/src/cookies/cookiemanager.cpp b/src/cookies/cookiemanager.cpp index 330c2c343..46d75b1a4 100644 --- a/src/cookies/cookiemanager.cpp +++ b/src/cookies/cookiemanager.cpp @@ -21,7 +21,7 @@ #include "cookiejar.h" #include "mainapplication.h" -CookieManager::CookieManager(QWidget *parent) : +CookieManager::CookieManager(QWidget* parent) : QWidget(parent) ,ui(new Ui::CookieManager) { @@ -83,7 +83,7 @@ void CookieManager::removeCookie() search(); } -void CookieManager::currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *parent) +void CookieManager::currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* parent) { Q_UNUSED(parent); if (!current) diff --git a/src/cookies/cookiemanager.h b/src/cookies/cookiemanager.h index 2c7b6d717..6ae8cec7a 100644 --- a/src/cookies/cookiemanager.h +++ b/src/cookies/cookiemanager.h @@ -37,7 +37,7 @@ class CookieManager : public QWidget Q_OBJECT public: - explicit CookieManager(QWidget *parent = 0); + explicit CookieManager(QWidget* parent = 0); ~CookieManager(); public slots: @@ -50,7 +50,7 @@ private slots: void search(); private: - Ui::CookieManager *ui; + Ui::CookieManager* ui; QList m_cookies; }; diff --git a/src/downloads/downloaditem.cpp b/src/downloads/downloaditem.cpp index 2cdbe02cc..e4b189a6e 100644 --- a/src/downloads/downloaditem.cpp +++ b/src/downloads/downloaditem.cpp @@ -18,7 +18,7 @@ #include "downloaditem.h" #include "ui_downloaditem.h" -DownloadItem::DownloadItem(QListWidgetItem *item, QNetworkReply *reply, QString path, QString fileName, QPixmap fileIcon, QWidget *parent) +DownloadItem::DownloadItem(QListWidgetItem* item, QNetworkReply* reply, QString path, QString fileName, QPixmap fileIcon, QWidget* parent) : QWidget(parent) ,ui(new Ui::DownloadItem) ,m_item(item) @@ -98,7 +98,7 @@ void DownloadItem::downloadProgress(qint64 received, qint64 total) m_total = total; } -void DownloadItem::timerEvent(QTimerEvent *event) +void DownloadItem::timerEvent(QTimerEvent* event) { if (event->timerId() == m_timer.timerId()) { updateDownloadInfo(m_currSpeed, m_received, m_total); @@ -189,7 +189,7 @@ void DownloadItem::stop() m_downloading = false; } -void DownloadItem::mouseDoubleClickEvent(QMouseEvent *e) +void DownloadItem::mouseDoubleClickEvent(QMouseEvent* e) { openFile(); e->accept(); diff --git a/src/downloads/downloaditem.h b/src/downloads/downloaditem.h index acf13c96b..5b2c650a0 100644 --- a/src/downloads/downloaditem.h +++ b/src/downloads/downloaditem.h @@ -42,7 +42,7 @@ class DownloadItem : public QWidget Q_OBJECT public: - explicit DownloadItem(QListWidgetItem* item, QNetworkReply* reply ,QString path, QString fileName, QPixmap fileIcon, QWidget *parent = 0); + explicit DownloadItem(QListWidgetItem* item, QNetworkReply* reply ,QString path, QString fileName, QPixmap fileIcon, QWidget* parent = 0); bool isDownloading() { return m_downloading; } bool isCancelled(); QTime remainingTime() { return m_remTime; } @@ -70,10 +70,10 @@ private slots: void clear(); private: - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent* event); void updateDownloadInfo(double currSpeed, qint64 received, qint64 total); - void mouseDoubleClickEvent(QMouseEvent *e); - Ui::DownloadItem *ui; + void mouseDoubleClickEvent(QMouseEvent* e); + Ui::DownloadItem* ui; QListWidgetItem* m_item; QNetworkReply* m_reply; diff --git a/src/downloads/downloadmanager.cpp b/src/downloads/downloadmanager.cpp index 11171f266..dbd0d5a5e 100644 --- a/src/downloads/downloadmanager.cpp +++ b/src/downloads/downloadmanager.cpp @@ -22,7 +22,7 @@ #include "downloaditem.h" #include "ecwin7.h" -DownloadManager::DownloadManager(QWidget *parent) : +DownloadManager::DownloadManager(QWidget* parent) : QWidget(parent) ,ui(new Ui::DownloadManager) ,m_isClosing(false) @@ -51,13 +51,13 @@ DownloadManager::DownloadManager(QWidget *parent) : } #ifdef W7TASKBAR -bool DownloadManager::winEvent(MSG *message, long *result) +bool DownloadManager::winEvent(MSG* message, long* result) { return win7.winEvent(message, result); } #endif -void DownloadManager::timerEvent(QTimerEvent *event) +void DownloadManager::timerEvent(QTimerEvent* event) { QList remTimes; QList progresses; @@ -133,7 +133,7 @@ void DownloadManager::download(const QNetworkRequest &request) handleUnsupportedContent(m_networkManager->get(request)); } -void DownloadManager::handleUnsupportedContent(QNetworkReply *reply) +void DownloadManager::handleUnsupportedContent(QNetworkReply* reply) { // DownloadOptionsDialog* dialog = new DownloadOptionsDialog(); // dialog->show(); @@ -184,13 +184,13 @@ void DownloadManager::handleUnsupportedContent(QNetworkReply *reply) activateWindow(); } -void DownloadManager::deleteItem(DownloadItem *item) +void DownloadManager::deleteItem(DownloadItem* item) { if (item && !item->isDownloading()) delete item; } -QString DownloadManager::getFileName(QNetworkReply *reply) +QString DownloadManager::getFileName(QNetworkReply* reply) { QString path; if (reply->hasRawHeader("Content-Disposition")) { @@ -239,7 +239,7 @@ bool DownloadManager::canClose() return !isDownloading; } -void DownloadManager::closeEvent(QCloseEvent *e) +void DownloadManager::closeEvent(QCloseEvent* e) { if (mApp->windowCount() == 0) { // No main windows -> we are going to quit if (!canClose()){ diff --git a/src/downloads/downloadmanager.h b/src/downloads/downloadmanager.h index ec03e3271..44ae17fe4 100644 --- a/src/downloads/downloadmanager.h +++ b/src/downloads/downloadmanager.h @@ -53,7 +53,7 @@ class DownloadManager : public QWidget Q_OBJECT public: - explicit DownloadManager(QWidget *parent = 0); + explicit DownloadManager(QWidget* parent = 0); ~DownloadManager(); void download(const QNetworkRequest &request); @@ -64,7 +64,7 @@ public: #ifdef W7TASKBAR protected: - virtual bool winEvent(MSG *message, long *result); + virtual bool winEvent(MSG* message, long* result); #endif private slots: @@ -75,11 +75,11 @@ private: #ifdef W7TASKBAR EcWin7 win7; #endif - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent* event); QString getFileName(QNetworkReply* reply); - void closeEvent(QCloseEvent *e); + void closeEvent(QCloseEvent* e); - Ui::DownloadManager *ui; + Ui::DownloadManager* ui; QNetworkAccessManager* m_networkManager; QFileIconProvider* m_iconProvider; diff --git a/src/downloads/downloadoptionsdialog.cpp b/src/downloads/downloadoptionsdialog.cpp index 86eed2226..1618b364b 100644 --- a/src/downloads/downloadoptionsdialog.cpp +++ b/src/downloads/downloadoptionsdialog.cpp @@ -18,7 +18,7 @@ #include "downloadoptionsdialog.h" #include "ui_downloadoptionsdialog.h" -DownloadOptionsDialog::DownloadOptionsDialog(QWidget *parent) : +DownloadOptionsDialog::DownloadOptionsDialog(QWidget* parent) : QDialog(parent), ui(new Ui::DownloadOptionsDialog) { diff --git a/src/downloads/downloadoptionsdialog.h b/src/downloads/downloadoptionsdialog.h index fa082b284..83af36a23 100644 --- a/src/downloads/downloadoptionsdialog.h +++ b/src/downloads/downloadoptionsdialog.h @@ -29,11 +29,11 @@ class DownloadOptionsDialog : public QDialog Q_OBJECT public: - explicit DownloadOptionsDialog(QWidget *parent = 0); + explicit DownloadOptionsDialog(QWidget* parent = 0); ~DownloadOptionsDialog(); private: - Ui::DownloadOptionsDialog *ui; + Ui::DownloadOptionsDialog* ui; }; #endif // DOWNLOADOPTIONSDIALOG_H diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp index 96804123b..d57148074 100644 --- a/src/history/historymanager.cpp +++ b/src/history/historymanager.cpp @@ -20,7 +20,7 @@ #include "qupzilla.h" #include "locationbar.h" -HistoryManager::HistoryManager(QupZilla* mainClass, QWidget *parent) : +HistoryManager::HistoryManager(QupZilla* mainClass, QWidget* parent) : QWidget(parent) ,ui(new Ui::HistoryManager) ,p_QupZilla(mainClass) @@ -51,20 +51,20 @@ QupZilla* HistoryManager::getQupZilla() return p_QupZilla; } -void HistoryManager::setMainWindow(QupZilla *window) +void HistoryManager::setMainWindow(QupZilla* window) { if (window) p_QupZilla = window; } -void HistoryManager::itemDoubleClicked(QTreeWidgetItem *item) +void HistoryManager::itemDoubleClicked(QTreeWidgetItem* item) { if (!item || item->text(1).isEmpty()) return; getQupZilla()->loadAddress(QUrl(item->text(1))); } -void HistoryManager::itemControlClicked(QTreeWidgetItem *item) +void HistoryManager::itemControlClicked(QTreeWidgetItem* item) { if (!item || item->text(1).isEmpty()) return; @@ -73,7 +73,7 @@ void HistoryManager::itemControlClicked(QTreeWidgetItem *item) void HistoryManager::loadInNewTab() { - if (QAction *action = qobject_cast(sender())) + if (QAction* action = qobject_cast(sender())) getQupZilla()->tabWidget()->addView(action->data().toUrl(), tr("New Tab"), TabWidget::NewNotSelectedTab); } diff --git a/src/history/historymanager.h b/src/history/historymanager.h index ecfe21c24..a6e7cfb2a 100644 --- a/src/history/historymanager.h +++ b/src/history/historymanager.h @@ -36,10 +36,10 @@ class HistoryManager : public QWidget Q_OBJECT public: - explicit HistoryManager(QupZilla* mainClass, QWidget *parent = 0); + explicit HistoryManager(QupZilla* mainClass, QWidget* parent = 0); ~HistoryManager(); - void setMainWindow(QupZilla *window); + void setMainWindow(QupZilla* window); public slots: void refreshTable(); @@ -55,7 +55,7 @@ private slots: private: QupZilla* getQupZilla(); - Ui::HistoryManager *ui; + Ui::HistoryManager* ui; QPointer p_QupZilla; }; diff --git a/src/history/historymodel.cpp b/src/history/historymodel.cpp index 175c3836c..cccfadfee 100644 --- a/src/history/historymodel.cpp +++ b/src/history/historymodel.cpp @@ -19,7 +19,7 @@ #include "webview.h" #include "qupzilla.h" -HistoryModel::HistoryModel(QupZilla *mainClass, QObject *parent) +HistoryModel::HistoryModel(QupZilla* mainClass, QObject* parent) : QObject(parent) ,m_isSaving(true) ,p_QupZilla(mainClass) @@ -66,7 +66,7 @@ int HistoryModel::addHistoryEntry(const QString &url, QString &title) return query.lastInsertId().toInt(); } -int HistoryModel::addHistoryEntry(WebView *view) +int HistoryModel::addHistoryEntry(WebView* view) { if (!m_isSaving) return -2; diff --git a/src/navigation/locationbar.cpp b/src/navigation/locationbar.cpp index 0ce68bd0e..8587daee1 100644 --- a/src/navigation/locationbar.cpp +++ b/src/navigation/locationbar.cpp @@ -27,7 +27,7 @@ #include "siteinfowidget.h" #include "rsswidget.h" -LocationBar::LocationBar(QupZilla* mainClass, QWidget *parent) +LocationBar::LocationBar(QupZilla* mainClass, QWidget* parent) : LineEdit(parent) ,m_selectAllOnDoubleClick(false) ,m_addComWithCtrl(false) @@ -267,7 +267,7 @@ void LocationBar::setPrivacy(bool state) m_siteIcon->setStyleSheet("QToolButton{border-image: url(:/icons/locationbar/searchchoose.png); margin-left:2px;}"); } -void LocationBar::focusOutEvent(QFocusEvent *e) +void LocationBar::focusOutEvent(QFocusEvent* e) { QLineEdit::focusOutEvent(e); if (!selectedText().isEmpty() && e->reason() != Qt::TabFocusReason) @@ -276,7 +276,7 @@ void LocationBar::focusOutEvent(QFocusEvent *e) hideGoButton(); } -void LocationBar::dropEvent(QDropEvent *event) +void LocationBar::dropEvent(QDropEvent* event) { if (event->mimeData()->hasUrls()) { QUrl dropUrl = event->mimeData()->urls().at(0); @@ -300,7 +300,7 @@ void LocationBar::dropEvent(QDropEvent *event) QLineEdit::dropEvent(event); } -void LocationBar::mouseDoubleClickEvent(QMouseEvent *event) +void LocationBar::mouseDoubleClickEvent(QMouseEvent* event) { if (event->button() == Qt::LeftButton && m_selectAllOnDoubleClick) selectAll(); diff --git a/src/navigation/locationbar.h b/src/navigation/locationbar.h index 670eb6662..e1c4a0f1b 100644 --- a/src/navigation/locationbar.h +++ b/src/navigation/locationbar.h @@ -46,7 +46,7 @@ class LocationBar : public LineEdit { Q_OBJECT; public: - explicit LocationBar(QupZilla* mainClass, QWidget *parent = 0); + explicit LocationBar(QupZilla* mainClass, QWidget* parent = 0); ~LocationBar(); static QIcon icon(const QUrl &url); @@ -67,9 +67,9 @@ private slots: private: void focusOutEvent(QFocusEvent* e); - void mouseDoubleClickEvent(QMouseEvent *event); - void keyPressEvent(QKeyEvent *event); - void dropEvent(QDropEvent *event); + void mouseDoubleClickEvent(QMouseEvent* event); + void keyPressEvent(QKeyEvent* event); + void dropEvent(QDropEvent* event); void showGoButton(); void hideGoButton(); diff --git a/src/navigation/locationcompleter.cpp b/src/navigation/locationcompleter.cpp index 4451fd8ed..8f984eeed 100644 --- a/src/navigation/locationcompleter.cpp +++ b/src/navigation/locationcompleter.cpp @@ -18,14 +18,14 @@ #include "locationcompleter.h" #include "locationbar.h" -LocationCompleter::LocationCompleter(QObject *parent) : +LocationCompleter::LocationCompleter(QObject* parent) : QCompleter(parent) { setMaxVisibleItems(6); QStandardItemModel* completeModel = new QStandardItemModel(); setModel(completeModel); - QTreeView *treeView = new QTreeView; + QTreeView* treeView = new QTreeView; setPopup(treeView); treeView->setRootIsDecorated(false); @@ -113,7 +113,7 @@ void LocationCompleter::refreshCompleter(QString string) query.exec("SELECT title, url FROM history WHERE title LIKE '%"+string+"%' OR url LIKE '%"+string+"%' ORDER BY count DESC LIMIT "+QString::number(limit)); int i = 0; QStandardItemModel* cModel = (QStandardItemModel*)model(); - QTreeView *treeView = (QTreeView*)popup(); + QTreeView* treeView = (QTreeView*)popup(); cModel->clear(); while(query.next()) { diff --git a/src/navigation/locationcompleter.h b/src/navigation/locationcompleter.h index 503817d32..0c7f4a0ea 100644 --- a/src/navigation/locationcompleter.h +++ b/src/navigation/locationcompleter.h @@ -36,7 +36,7 @@ class LocationCompleter : public QCompleter { Q_OBJECT public: - explicit LocationCompleter(QObject *parent = 0); + explicit LocationCompleter(QObject* parent = 0); //virtual QString pathFromIndex(const QModelIndex &index) const; virtual QStringList splitPath(const QString &path) const; diff --git a/src/navigation/locationpopup.cpp b/src/navigation/locationpopup.cpp index 3814fed49..5bec11108 100644 --- a/src/navigation/locationpopup.cpp +++ b/src/navigation/locationpopup.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . * ============================================================ */ #include "locationpopup.h" -LocationPopup::LocationPopup(QWidget *parent) +LocationPopup::LocationPopup(QWidget* parent) :QAbstractItemView() ,m_parent(parent) { diff --git a/src/navigation/locationpopup.h b/src/navigation/locationpopup.h index 62d4671ad..ba2a09a58 100644 --- a/src/navigation/locationpopup.h +++ b/src/navigation/locationpopup.h @@ -25,7 +25,7 @@ class LocationPopup : public QAbstractItemView { Q_OBJECT public: - explicit LocationPopup(QWidget *parent = 0); + explicit LocationPopup(QWidget* parent = 0); signals: diff --git a/src/navigation/websearchbar.cpp b/src/navigation/websearchbar.cpp index 14eecae8b..6f382fa4e 100644 --- a/src/navigation/websearchbar.cpp +++ b/src/navigation/websearchbar.cpp @@ -20,7 +20,7 @@ #include "webview.h" #include "clickablelabel.h" -WebSearchBar::WebSearchBar(QupZilla* mainClass, QWidget *parent) +WebSearchBar::WebSearchBar(QupZilla* mainClass, QWidget* parent) :LineEdit(parent) ,p_QupZilla(mainClass) { @@ -74,7 +74,7 @@ void WebSearchBar::setupSearchTypes() void WebSearchBar::searchChanged() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { if (action->data().toString() == "Google") m_boxSearchType->setIcon(QIcon(":/icons/menu/google.png")); else if (action->data().toString() == "Seznam") @@ -114,7 +114,7 @@ void WebSearchBar::search() p_QupZilla->weView()->setFocus(); } -void WebSearchBar::focusOutEvent(QFocusEvent *e) +void WebSearchBar::focusOutEvent(QFocusEvent* e) { if (text().isEmpty()) { QString search = m_boxSearchType->toolTip(); @@ -124,7 +124,7 @@ void WebSearchBar::focusOutEvent(QFocusEvent *e) QLineEdit::focusOutEvent(e); } -void WebSearchBar::focusInEvent(QFocusEvent *e) +void WebSearchBar::focusInEvent(QFocusEvent* e) { QString search = m_boxSearchType->toolTip(); diff --git a/src/navigation/websearchbar.h b/src/navigation/websearchbar.h index 14beaa4da..e0bf8f674 100644 --- a/src/navigation/websearchbar.h +++ b/src/navigation/websearchbar.h @@ -35,7 +35,7 @@ class WebSearchBar : public LineEdit { Q_OBJECT; public: - explicit WebSearchBar(QupZilla* mainClass, QWidget *parent = 0); + explicit WebSearchBar(QupZilla* mainClass, QWidget* parent = 0); private slots: void searchChanged(); diff --git a/src/network/networkmanager.cpp b/src/network/networkmanager.cpp index 132322806..c59720fb1 100644 --- a/src/network/networkmanager.cpp +++ b/src/network/networkmanager.cpp @@ -21,7 +21,7 @@ #include "networkmanagerproxy.h" #include "mainapplication.h" -NetworkManager::NetworkManager(QupZilla* mainClass, QObject *parent) : +NetworkManager::NetworkManager(QupZilla* mainClass, QObject* parent) : NetworkManagerProxy(mainClass, parent) ,p_QupZilla(mainClass) ,m_ignoreAllWarnings(false) @@ -47,7 +47,7 @@ void NetworkManager::loadSettings() settings.endGroup(); } -void NetworkManager::sslError(QNetworkReply *reply, QList errors) +void NetworkManager::sslError(QNetworkReply* reply, QList errors) { if (m_ignoreAllWarnings) { reply->ignoreSslErrors(errors); @@ -145,7 +145,7 @@ void NetworkManager::authentication(QNetworkReply* reply, QAuthenticator* auth) fill->addEntry(reply->url(), user->text(), pass->text()); } -QNetworkReply *NetworkManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData) +QNetworkReply* NetworkManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice* outgoingData) { if (op == PostOperation && outgoingData) { QByteArray outgoingDataByteArray = outgoingData->peek(1024 * 1024); diff --git a/src/network/networkmanager.h b/src/network/networkmanager.h index 930e674d1..8a10da234 100644 --- a/src/network/networkmanager.h +++ b/src/network/networkmanager.h @@ -40,8 +40,8 @@ class NetworkManager : public NetworkManagerProxy { Q_OBJECT public: - explicit NetworkManager(QupZilla* mainClass, QObject *parent = 0); - QNetworkReply *createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData); + explicit NetworkManager(QupZilla* mainClass, QObject* parent = 0); + QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice* outgoingData); QList getCertExceptions() { return m_certExceptions; } void setCertExceptions(QList certs) { m_certExceptions = certs; } diff --git a/src/network/networkmanagerproxy.cpp b/src/network/networkmanagerproxy.cpp index 36e3fe5b8..3501b1bd3 100644 --- a/src/network/networkmanagerproxy.cpp +++ b/src/network/networkmanagerproxy.cpp @@ -22,7 +22,7 @@ #include "cookiejar.h" #include "mainapplication.h" -NetworkManagerProxy::NetworkManagerProxy(QupZilla* mainClass, QObject *parent) : +NetworkManagerProxy::NetworkManagerProxy(QupZilla* mainClass, QObject* parent) : QNetworkAccessManager(parent) ,p_QupZilla(mainClass) ,m_view(0) @@ -38,21 +38,21 @@ void NetworkManagerProxy::populateNetworkRequest(QNetworkRequest &request) request.setAttribute((QNetworkRequest::Attribute)(QNetworkRequest::User + 100), variant); } -void NetworkManagerProxy::setPrimaryNetworkAccessManager(NetworkManagerProxy *manager) +void NetworkManagerProxy::setPrimaryNetworkAccessManager(NetworkManagerProxy* manager) { Q_ASSERT(manager); m_manager = manager; connect(this, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)), manager, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*))); - connect(this, SIGNAL(finished(QNetworkReply *)), - manager, SIGNAL(finished(QNetworkReply *))); + connect(this, SIGNAL(finished(QNetworkReply*)), + manager, SIGNAL(finished(QNetworkReply*))); connect(this, SIGNAL(sslErrors(QNetworkReply*, const QList&)), manager, SIGNAL(sslErrors(QNetworkReply*, const QList&))); } -QNetworkReply *NetworkManagerProxy::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData) +QNetworkReply* NetworkManagerProxy::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice* outgoingData) { if (m_manager && m_page) { QNetworkRequest pageRequest = request; diff --git a/src/network/networkmanagerproxy.h b/src/network/networkmanagerproxy.h index 50b928b77..671431943 100644 --- a/src/network/networkmanagerproxy.h +++ b/src/network/networkmanagerproxy.h @@ -34,12 +34,12 @@ class NetworkManagerProxy : public QNetworkAccessManager { Q_OBJECT public: - explicit NetworkManagerProxy(QupZilla* mainClass, QObject *parent = 0); + explicit NetworkManagerProxy(QupZilla* mainClass, QObject* parent = 0); void setView(WebView* view) { m_view = view; } void setPage(WebPage* page) { m_page = page; } - void setPrimaryNetworkAccessManager(NetworkManagerProxy *manager); - QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData); + void setPrimaryNetworkAccessManager(NetworkManagerProxy* manager); + QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice* outgoingData); protected: virtual void populateNetworkRequest(QNetworkRequest &request); @@ -48,7 +48,7 @@ private: QupZilla* p_QupZilla; WebView* m_view; WebPage* m_page; - NetworkManagerProxy *m_manager; + NetworkManagerProxy* m_manager; }; #endif // NETWORKMANAGERPROXY_H diff --git a/src/other/aboutdialog.cpp b/src/other/aboutdialog.cpp index a84fe2daf..68c3f9667 100644 --- a/src/other/aboutdialog.cpp +++ b/src/other/aboutdialog.cpp @@ -21,7 +21,7 @@ #include "webview.h" #include "webpage.h" -AboutDialog::AboutDialog(QWidget *parent) : +AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDialog) { diff --git a/src/other/aboutdialog.h b/src/other/aboutdialog.h index 599b4b012..6c21fc8ce 100644 --- a/src/other/aboutdialog.h +++ b/src/other/aboutdialog.h @@ -33,7 +33,7 @@ class AboutDialog : public QDialog Q_OBJECT public: - explicit AboutDialog(QWidget *parent = 0); + explicit AboutDialog(QWidget* parent = 0); ~AboutDialog(); private slots: @@ -42,7 +42,7 @@ private slots: void buttonClicked(); private: - Ui::AboutDialog *ui; + Ui::AboutDialog* ui; QString m_aboutHtml; QString m_authorsHtml; diff --git a/src/other/clearprivatedata.cpp b/src/other/clearprivatedata.cpp index a81e1cb3b..9d916e040 100644 --- a/src/other/clearprivatedata.cpp +++ b/src/other/clearprivatedata.cpp @@ -22,7 +22,7 @@ #include "networkmanager.h" #include "clickablelabel.h" -ClearPrivateData::ClearPrivateData(QupZilla* mainClass, QWidget *parent) : +ClearPrivateData::ClearPrivateData(QupZilla* mainClass, QWidget* parent) : QDialog(parent) ,p_QupZilla(mainClass) { diff --git a/src/other/clearprivatedata.h b/src/other/clearprivatedata.h index f770bbf76..2da88397d 100644 --- a/src/other/clearprivatedata.h +++ b/src/other/clearprivatedata.h @@ -34,7 +34,7 @@ class ClearPrivateData : public QDialog { Q_OBJECT public: - explicit ClearPrivateData(QupZilla* mainClass, QWidget *parent = 0); + explicit ClearPrivateData(QupZilla* mainClass, QWidget* parent = 0); signals: diff --git a/src/other/sourceviewer.cpp b/src/other/sourceviewer.cpp index 532267bfb..ef39e0869 100644 --- a/src/other/sourceviewer.cpp +++ b/src/other/sourceviewer.cpp @@ -19,7 +19,7 @@ #include "webview.h" #include "htmlhighlighter.h" -SourceViewer::SourceViewer(QWebPage* page, QWidget *parent) : +SourceViewer::SourceViewer(QWebPage* page, QWidget* parent) : QWidget(parent) ,m_page(page) { @@ -104,6 +104,7 @@ void SourceViewer::save() QFile file(filePath); if (!file.open(QFile::WriteOnly)) { QMessageBox::critical(this, tr("Error!"), tr("Cannot write to file!")); + m_statusBar->showMessage(tr("Error writing to file")); return; } file.write(m_sourceEdit->toPlainText().toAscii()); diff --git a/src/other/sourceviewer.h b/src/other/sourceviewer.h index cc93944be..28f1dc40c 100644 --- a/src/other/sourceviewer.h +++ b/src/other/sourceviewer.h @@ -42,7 +42,7 @@ class SourceViewer : public QWidget { Q_OBJECT public: - explicit SourceViewer(QWebPage* page, QWidget *parent = 0); + explicit SourceViewer(QWebPage* page, QWidget* parent = 0); signals: diff --git a/src/other/updater.cpp b/src/other/updater.cpp index 0e5e7a329..1284db0ac 100644 --- a/src/other/updater.cpp +++ b/src/other/updater.cpp @@ -19,7 +19,7 @@ #include "qupzilla.h" #include "tabwidget.h" -Updater::Updater(QupZilla* mainClass, QObject *parent) : +Updater::Updater(QupZilla* mainClass, QObject* parent) : QObject(parent) ,p_QupZilla(mainClass) { @@ -55,7 +55,7 @@ void Updater::startDownloadingUpdateInfo(const QUrl &url) QNetworkReply* reply; reply=manager->get(QNetworkRequest(QUrl(url))); - connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(downCompleted(QNetworkReply *))); + connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(downCompleted(QNetworkReply*))); } void Updater::downCompleted(QNetworkReply* reply) diff --git a/src/other/updater.h b/src/other/updater.h index 6261714ab..9db1fbf91 100644 --- a/src/other/updater.h +++ b/src/other/updater.h @@ -32,7 +32,7 @@ class Updater : public QObject { Q_OBJECT public: - explicit Updater(QupZilla* mainClass, QObject *parent = 0); + explicit Updater(QupZilla* mainClass, QObject* parent = 0); ~Updater(); signals: diff --git a/src/plugins/clicktoflash.cpp b/src/plugins/clicktoflash.cpp index 84e6d0c69..82fa89d24 100644 --- a/src/plugins/clicktoflash.cpp +++ b/src/plugins/clicktoflash.cpp @@ -43,14 +43,14 @@ #include "mainapplication.h" #include "pluginproxy.h" -ClickToFlash::ClickToFlash(const QUrl &pluginUrl, QWidget *parent) +ClickToFlash::ClickToFlash(const QUrl &pluginUrl, QWidget* parent) : QWidget(parent) , m_url(pluginUrl) { - QHBoxLayout *horizontalLayout; - QFrame *frame; - QHBoxLayout *horizontalLayout_2; - QToolButton *toolButton; + QHBoxLayout* horizontalLayout; + QFrame* frame; + QHBoxLayout* horizontalLayout_2; + QToolButton* toolButton; horizontalLayout = new QHBoxLayout(this); frame = new QFrame(this); @@ -94,10 +94,10 @@ void ClickToFlash::toWhitelist() void ClickToFlash::load() { - QWidget *parent = parentWidget(); - QWebView *view = 0; + QWidget* parent = parentWidget(); + QWebView* view = 0; while (parent) { - if (QWebView *aView = qobject_cast(parent)) { + if (QWebView* aView = qobject_cast(parent)) { view = aView; break; } @@ -112,7 +112,7 @@ void ClickToFlash::load() QList frames; frames.append(view->page()->mainFrame()); while (!frames.isEmpty()) { - QWebFrame *frame = frames.takeFirst(); + QWebFrame* frame = frames.takeFirst(); QWebElement docElement = frame->documentElement(); QWebElementCollection elements; diff --git a/src/plugins/clicktoflash.h b/src/plugins/clicktoflash.h index 11d32b5e2..91aa5aba0 100644 --- a/src/plugins/clicktoflash.h +++ b/src/plugins/clicktoflash.h @@ -61,7 +61,7 @@ class ClickToFlash : public QWidget Q_OBJECT public: - explicit ClickToFlash(const QUrl &pluginUrl, QWidget *parent = 0); + explicit ClickToFlash(const QUrl &pluginUrl, QWidget* parent = 0); signals: void signalLoadClickToFlash(bool); diff --git a/src/plugins/pluginproxy.cpp b/src/plugins/pluginproxy.cpp index a38a50244..280e30b76 100644 --- a/src/plugins/pluginproxy.cpp +++ b/src/plugins/pluginproxy.cpp @@ -25,7 +25,7 @@ PluginProxy::PluginProxy() : c2f_loadSettings(); } -void PluginProxy::populateWebViewMenu(QMenu *menu, QWebView *view, QWebHitTestResult r) +void PluginProxy::populateWebViewMenu(QMenu* menu, QWebView* view, QWebHitTestResult r) { if (!menu || !view || loadedPlugins.count() == 0) return; @@ -40,7 +40,7 @@ void PluginProxy::populateWebViewMenu(QMenu *menu, QWebView *view, QWebHitTestRe menu->removeAction(menu->actions().at(count)); } -void PluginProxy::populateToolsMenu(QMenu *menu) +void PluginProxy::populateToolsMenu(QMenu* menu) { if (!menu || loadedPlugins.count() == 0) return; @@ -54,7 +54,7 @@ void PluginProxy::populateToolsMenu(QMenu *menu) menu->addSeparator(); } -void PluginProxy::populateHelpMenu(QMenu *menu) +void PluginProxy::populateHelpMenu(QMenu* menu) { if (!menu || loadedPlugins.count() == 0) return; diff --git a/src/plugins/plugins.cpp b/src/plugins/plugins.cpp index a01221540..4a7862e15 100644 --- a/src/plugins/plugins.cpp +++ b/src/plugins/plugins.cpp @@ -19,7 +19,7 @@ #include "plugininterface.h" #include "mainapplication.h" -Plugins::Plugins(QObject *parent) : +Plugins::Plugins(QObject* parent) : QObject(parent) { loadSettings(); @@ -53,9 +53,9 @@ void Plugins::loadPlugins() continue; QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); - QObject *plugin = loader.instance(); + QObject* plugin = loader.instance(); if (plugin) { - PluginInterface *iPlugin = qobject_cast(plugin); + PluginInterface* iPlugin = qobject_cast(plugin); iPlugin->init(mApp->getActiveProfil()+"plugins.ini"); if (!iPlugin->testPlugin()) { loader.unload(); @@ -76,9 +76,9 @@ PluginInterface* Plugins::getPlugin(QString pluginFileName) if (!QFile::exists(path)) return 0; QPluginLoader loader(path); - QObject *plugin = loader.instance(); + QObject* plugin = loader.instance(); if (plugin) { - PluginInterface *iPlugin = qobject_cast(plugin); + PluginInterface* iPlugin = qobject_cast(plugin); return iPlugin; } else return 0; diff --git a/src/plugins/plugins.h b/src/plugins/plugins.h index 98da0fe2f..5f3dd779e 100644 --- a/src/plugins/plugins.h +++ b/src/plugins/plugins.h @@ -34,7 +34,7 @@ class Plugins : public QObject { Q_OBJECT public: - explicit Plugins(QObject *parent = 0); + explicit Plugins(QObject* parent = 0); QStringList getAvailablePlugins() { return m_availablePluginFileNames; } QStringList getAllowedPlugins () { return m_allowedPluginFileNames; } diff --git a/src/plugins/webpluginfactory.cpp b/src/plugins/webpluginfactory.cpp index 4f3d99232..409202bfa 100644 --- a/src/plugins/webpluginfactory.cpp +++ b/src/plugins/webpluginfactory.cpp @@ -20,7 +20,7 @@ #include "mainapplication.h" #include "pluginproxy.h" -WebPluginFactory::WebPluginFactory(QObject *parent) +WebPluginFactory::WebPluginFactory(QObject* parent) : QWebPluginFactory(parent) ,m_loadClickToFlash(false) { diff --git a/src/plugins/webpluginfactory.h b/src/plugins/webpluginfactory.h index ce508b1e1..48a2f72d2 100644 --- a/src/plugins/webpluginfactory.h +++ b/src/plugins/webpluginfactory.h @@ -26,8 +26,8 @@ class WebPluginFactory : public QWebPluginFactory Q_OBJECT public: - WebPluginFactory(QObject *parent); - virtual QObject*create (const QString &mimeType, const QUrl &url, const QStringList &argumentNames, const QStringList &argumentValues) const; + WebPluginFactory(QObject* parent); + virtual QObject* create (const QString &mimeType, const QUrl &url, const QStringList &argumentNames, const QStringList &argumentValues) const; QList plugins() const; signals: diff --git a/src/preferences/autofillmanager.cpp b/src/preferences/autofillmanager.cpp index a66703d80..fdf41dfdc 100644 --- a/src/preferences/autofillmanager.cpp +++ b/src/preferences/autofillmanager.cpp @@ -18,7 +18,7 @@ #include "autofillmanager.h" #include "ui_autofillmanager.h" -AutoFillManager::AutoFillManager(QWidget *parent) : +AutoFillManager::AutoFillManager(QWidget* parent) : QDialog(parent), ui(new Ui::AutoFillManager) { diff --git a/src/preferences/autofillmanager.h b/src/preferences/autofillmanager.h index 6cffb3870..55249ba44 100644 --- a/src/preferences/autofillmanager.h +++ b/src/preferences/autofillmanager.h @@ -40,7 +40,7 @@ class AutoFillManager : public QDialog Q_OBJECT public: - explicit AutoFillManager(QWidget *parent = 0); + explicit AutoFillManager(QWidget* parent = 0); ~AutoFillManager(); void showExceptions(); @@ -56,7 +56,7 @@ private slots: void removeAllExcept(); private: - Ui::AutoFillManager *ui; + Ui::AutoFillManager* ui; }; #endif // AUTOFILLMANAGER_H diff --git a/src/preferences/pluginslist.cpp b/src/preferences/pluginslist.cpp index ccdf1952d..bc5dbe07f 100644 --- a/src/preferences/pluginslist.cpp +++ b/src/preferences/pluginslist.cpp @@ -21,7 +21,7 @@ #include "mainapplication.h" #include "plugininterface.h" -PluginsList::PluginsList(QWidget *parent) : +PluginsList::PluginsList(QWidget* parent) : QWidget(parent), ui(new Ui::PluginsList) { @@ -140,7 +140,7 @@ void PluginsList::refresh() } } -void PluginsList::currentChanged(QListWidgetItem *item) +void PluginsList::currentChanged(QListWidgetItem* item) { if (!item) return; diff --git a/src/preferences/pluginslist.h b/src/preferences/pluginslist.h index d6bc4ecc9..447ec1525 100644 --- a/src/preferences/pluginslist.h +++ b/src/preferences/pluginslist.h @@ -34,7 +34,7 @@ class PluginsList : public QWidget Q_OBJECT public: - explicit PluginsList(QWidget *parent = 0); + explicit PluginsList(QWidget* parent = 0); ~PluginsList(); void save(); @@ -53,7 +53,7 @@ private slots: private: void refresh(); - Ui::PluginsList *ui; + Ui::PluginsList* ui; }; #endif // PLUGINSLIST_H diff --git a/src/preferences/preferences.cpp b/src/preferences/preferences.cpp index 11015f4b4..01b3a3800 100644 --- a/src/preferences/preferences.cpp +++ b/src/preferences/preferences.cpp @@ -31,7 +31,7 @@ #include "pluginproxy.h" #include "sslmanager.h" -Preferences::Preferences(QupZilla* mainClass, QWidget *parent) : +Preferences::Preferences(QupZilla* mainClass, QWidget* parent) : QDialog(parent) ,ui(new Ui::Preferences) ,p_QupZilla(mainClass) @@ -229,7 +229,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget *parent) : ui->version->setText(" QupZilla v"+QupZilla::VERSION); } -void Preferences::showStackedPage(QListWidgetItem *item) +void Preferences::showStackedPage(QListWidgetItem* item) { if (!item) return; @@ -367,7 +367,7 @@ void Preferences::showPassManager(bool state) m_autoFillManager->setVisible(state); } -void Preferences::buttonClicked(QAbstractButton *button) +void Preferences::buttonClicked(QAbstractButton* button) { switch (ui->buttonBox->buttonRole(button)) { case QDialogButtonBox::ApplyRole: diff --git a/src/preferences/preferences.h b/src/preferences/preferences.h index f2e686c7d..f45d68ca4 100644 --- a/src/preferences/preferences.h +++ b/src/preferences/preferences.h @@ -41,7 +41,7 @@ class Preferences : public QDialog Q_OBJECT public: - explicit Preferences(QupZilla* mainClass, QWidget *parent = 0); + explicit Preferences(QupZilla* mainClass, QWidget* parent = 0); ~Preferences(); private slots: @@ -71,7 +71,7 @@ private slots: private: void updateBgLabel(); - Ui::Preferences *ui; + Ui::Preferences* ui; QupZilla* p_QupZilla; AutoFillManager* m_autoFillManager; PluginsList* m_pluginsList; diff --git a/src/preferences/sslmanager.cpp b/src/preferences/sslmanager.cpp index f226db523..a4d18c44c 100644 --- a/src/preferences/sslmanager.cpp +++ b/src/preferences/sslmanager.cpp @@ -20,7 +20,7 @@ #include "networkmanager.h" #include "mainapplication.h" -SSLManager::SSLManager(QWidget *parent) : +SSLManager::SSLManager(QWidget* parent) : QWidget(parent), ui(new Ui::SSLManager) { diff --git a/src/preferences/sslmanager.h b/src/preferences/sslmanager.h index 8d780a61d..70d275c2e 100644 --- a/src/preferences/sslmanager.h +++ b/src/preferences/sslmanager.h @@ -34,7 +34,7 @@ class SSLManager : public QWidget Q_OBJECT public: - explicit SSLManager(QWidget *parent = 0); + explicit SSLManager(QWidget* parent = 0); ~SSLManager(); private slots: @@ -43,7 +43,7 @@ private slots: void ignoreAll(bool state); private: - Ui::SSLManager *ui; + Ui::SSLManager* ui; QList m_certs; }; diff --git a/src/rss/rssmanager.cpp b/src/rss/rssmanager.cpp index fe657fb93..8c36a2901 100644 --- a/src/rss/rssmanager.cpp +++ b/src/rss/rssmanager.cpp @@ -23,7 +23,7 @@ #include "mainapplication.h" #include "treewidget.h" -RSSManager::RSSManager(QupZilla* mainClass, QWidget *parent) : +RSSManager::RSSManager(QupZilla* mainClass, QWidget* parent) : QWidget(parent) ,ui(new Ui::RSSManager) ,p_QupZilla(mainClass) @@ -49,7 +49,7 @@ QupZilla* RSSManager::getQupZilla() return p_QupZilla; } -void RSSManager::setMainWindow(QupZilla *window) +void RSSManager::setMainWindow(QupZilla* window) { if (window) p_QupZilla = window; @@ -202,7 +202,7 @@ void RSSManager::customContextMenuRequested(const QPoint &position) menu.exec(p); } -void RSSManager::loadFeed(QTreeWidgetItem *item) +void RSSManager::loadFeed(QTreeWidgetItem* item) { if (!item) return; @@ -211,7 +211,7 @@ void RSSManager::loadFeed(QTreeWidgetItem *item) getQupZilla()->loadAddress(QUrl(item->whatsThis(0))); } -void RSSManager::controlLoadFeed(QTreeWidgetItem *item) +void RSSManager::controlLoadFeed(QTreeWidgetItem* item) { if (!item) return; @@ -222,7 +222,7 @@ void RSSManager::controlLoadFeed(QTreeWidgetItem *item) void RSSManager::loadFeedInNewTab() { - if (QAction *action = qobject_cast(sender())) + if (QAction* action = qobject_cast(sender())) getQupZilla()->tabWidget()->addView(action->data().toUrl(), tr("New Tab"), TabWidget::NewNotSelectedTab); } @@ -231,10 +231,10 @@ void RSSManager::beginToLoadSlot(const QUrl &url) QNetworkReply* reply; reply=m_networkManager->get(QNetworkRequest(QUrl(url))); - connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(finished(QNetworkReply *))); + connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(finished(QNetworkReply*))); } -void RSSManager::finished(QNetworkReply *reply) +void RSSManager::finished(QNetworkReply* reply) { if (m_networkReplies.contains(reply)) return; @@ -270,7 +270,7 @@ void RSSManager::finished(QNetworkReply *reply) currentTag = xml.name().toString(); } else if (xml.isEndElement()) { if (xml.name() == "item") { - QTreeWidgetItem *item = new QTreeWidgetItem; + QTreeWidgetItem* item = new QTreeWidgetItem; item->setText(0, titleString); item->setWhatsThis(0, linkString); item->setIcon(0, QIcon(":/icons/other/feed.png")); @@ -289,7 +289,7 @@ void RSSManager::finished(QNetworkReply *reply) } if (treeWidget->topLevelItemCount() == 0) { - QTreeWidgetItem *item = new QTreeWidgetItem; + QTreeWidgetItem* item = new QTreeWidgetItem; item->setText(0, tr("Error in fetching feed")); treeWidget->addTopLevelItem(item); } diff --git a/src/rss/rssmanager.h b/src/rss/rssmanager.h index 1042b9959..05e6f4746 100644 --- a/src/rss/rssmanager.h +++ b/src/rss/rssmanager.h @@ -39,7 +39,7 @@ class RSSManager : public QWidget Q_OBJECT public: - explicit RSSManager(QupZilla* mainClass, QWidget *parent = 0); + explicit RSSManager(QupZilla* mainClass, QWidget* parent = 0); ~RSSManager(); bool addRssFeed(const QString &address, const QString &title); @@ -63,7 +63,7 @@ private: QupZilla* getQupZilla(); QList m_networkReplies; QNetworkAccessManager* m_networkManager; - Ui::RSSManager *ui; + Ui::RSSManager* ui; QPointer p_QupZilla; }; diff --git a/src/rss/rssnotification.cpp b/src/rss/rssnotification.cpp index 7911ee9b4..74b58dda8 100644 --- a/src/rss/rssnotification.cpp +++ b/src/rss/rssnotification.cpp @@ -20,7 +20,7 @@ #include "mainapplication.h" #include "qupzilla.h" -RSSNotification::RSSNotification(QString host, QWidget *parent) : +RSSNotification::RSSNotification(QString host, QWidget* parent) : Notification(parent), ui(new Ui::RSSNotification) { diff --git a/src/rss/rssnotification.h b/src/rss/rssnotification.h index 8af54a7ad..8c9903e0a 100644 --- a/src/rss/rssnotification.h +++ b/src/rss/rssnotification.h @@ -32,11 +32,11 @@ class RSSNotification : public Notification Q_OBJECT public: - explicit RSSNotification(QString host, QWidget *parent = 0); + explicit RSSNotification(QString host, QWidget* parent = 0); ~RSSNotification(); private: - Ui::RSSNotification *ui; + Ui::RSSNotification* ui; QTimeLine* m_animation; }; diff --git a/src/rss/rsswidget.cpp b/src/rss/rsswidget.cpp index 67e501afc..307e1df9b 100644 --- a/src/rss/rsswidget.cpp +++ b/src/rss/rsswidget.cpp @@ -22,7 +22,7 @@ #include "rssmanager.h" #include "rssnotification.h" -RSSWidget::RSSWidget(WebView *view, QList > availableRss, QWidget *parent) +RSSWidget::RSSWidget(WebView* view, QList > availableRss, QWidget* parent) :QMenu(parent) ,ui(new Ui::RSSWidget) ,m_avRss(availableRss) @@ -54,7 +54,7 @@ void RSSWidget::addRss() { if(!m_view) return; - if (QPushButton *button = qobject_cast(sender())) { + if (QPushButton* button = qobject_cast(sender())) { QUrl url = QUrl(button->whatsThis()); QString urlString = button->whatsThis(); if(url.host().isEmpty()) { diff --git a/src/rss/rsswidget.h b/src/rss/rsswidget.h index df8b9f47b..44f10c538 100644 --- a/src/rss/rsswidget.h +++ b/src/rss/rsswidget.h @@ -33,7 +33,7 @@ class RSSWidget : public QMenu Q_OBJECT public: - explicit RSSWidget(WebView* view, QList > availableRss, QWidget *parent = 0); + explicit RSSWidget(WebView* view, QList > availableRss, QWidget* parent = 0); ~RSSWidget(); void showAt(QWidget* _parent); @@ -42,7 +42,7 @@ private slots: void addRss(); private: - Ui::RSSWidget *ui; + Ui::RSSWidget* ui; QList > m_avRss; WebView* m_view; }; diff --git a/src/sidebar/sidebar.cpp b/src/sidebar/sidebar.cpp index 624054790..5f5c37185 100644 --- a/src/sidebar/sidebar.cpp +++ b/src/sidebar/sidebar.cpp @@ -17,7 +17,7 @@ * ============================================================ */ #include "sidebar.h" -SideBar::SideBar(QWidget *parent) : +SideBar::SideBar(QWidget* parent) : QDockWidget(parent) { } diff --git a/src/sidebar/sidebar.h b/src/sidebar/sidebar.h index 724c38611..a8f700280 100644 --- a/src/sidebar/sidebar.h +++ b/src/sidebar/sidebar.h @@ -24,7 +24,7 @@ class SideBar : public QDockWidget { Q_OBJECT public: - explicit SideBar(QWidget *parent = 0); + explicit SideBar(QWidget* parent = 0); signals: diff --git a/src/tools/clickablelabel.cpp b/src/tools/clickablelabel.cpp index 96436d2ec..a05518325 100644 --- a/src/tools/clickablelabel.cpp +++ b/src/tools/clickablelabel.cpp @@ -17,18 +17,18 @@ * ============================================================ */ #include "clickablelabel.h" -ClickableLabel::ClickableLabel(QWidget *parent) : +ClickableLabel::ClickableLabel(QWidget* parent) : QLabel(parent) { } -void ClickableLabel::mousePressEvent(QMouseEvent *ev) +void ClickableLabel::mousePressEvent(QMouseEvent* ev) { if (ev->button() == Qt::LeftButton) emit clicked(ev->globalPos()); } -void ClickableLabel::mouseDoubleClickEvent(QMouseEvent *ev) +void ClickableLabel::mouseDoubleClickEvent(QMouseEvent* ev) { if (ev->button() == Qt::LeftButton) emit clicked(ev->globalPos()); diff --git a/src/tools/clickablelabel.h b/src/tools/clickablelabel.h index 71d0a3356..79fe02052 100644 --- a/src/tools/clickablelabel.h +++ b/src/tools/clickablelabel.h @@ -25,14 +25,14 @@ class ClickableLabel : public QLabel { Q_OBJECT public: - explicit ClickableLabel(QWidget *parent = 0); + explicit ClickableLabel(QWidget* parent = 0); signals: void clicked(QPoint); private: - void mousePressEvent(QMouseEvent *ev); - void mouseDoubleClickEvent(QMouseEvent *ev); + void mousePressEvent(QMouseEvent* ev); + void mouseDoubleClickEvent(QMouseEvent* ev); }; diff --git a/src/tools/frame.cpp b/src/tools/frame.cpp index 2db29c52c..2af70270a 100644 --- a/src/tools/frame.cpp +++ b/src/tools/frame.cpp @@ -17,12 +17,12 @@ * ============================================================ */ #include "frame.h" -Frame::Frame(QWidget *parent) : +Frame::Frame(QWidget* parent) : QFrame(parent) { } -void Frame::mousePressEvent(QMouseEvent *event) +void Frame::mousePressEvent(QMouseEvent* event) { //If we proccess mouse events, then menu from bookmarkswidget //is going to close() with clicking in free space diff --git a/src/tools/frame.h b/src/tools/frame.h index 5bfb3def9..2960746a7 100644 --- a/src/tools/frame.h +++ b/src/tools/frame.h @@ -25,14 +25,14 @@ class Frame : public QFrame { Q_OBJECT public: - explicit Frame(QWidget *parent = 0); + explicit Frame(QWidget* parent = 0); signals: public slots: private: - void mousePressEvent(QMouseEvent *event); + void mousePressEvent(QMouseEvent* event); }; diff --git a/src/tools/htmlhighlighter.cpp b/src/tools/htmlhighlighter.cpp index 46517fa86..acb2e5930 100644 --- a/src/tools/htmlhighlighter.cpp +++ b/src/tools/htmlhighlighter.cpp @@ -56,7 +56,7 @@ ****************************************************************************/ #include "htmlhighlighter.h" - HtmlHighlighter::HtmlHighlighter(QTextDocument *parent) + HtmlHighlighter::HtmlHighlighter(QTextDocument* parent) : QSyntaxHighlighter(parent) { HighlightingRule rule; diff --git a/src/tools/htmlhighlighter.h b/src/tools/htmlhighlighter.h index 67bbb98f8..fe17e439e 100644 --- a/src/tools/htmlhighlighter.h +++ b/src/tools/htmlhighlighter.h @@ -69,7 +69,7 @@ class HtmlHighlighter : public QSyntaxHighlighter Q_OBJECT public: - HtmlHighlighter(QTextDocument *parent = 0); + HtmlHighlighter(QTextDocument* parent = 0); protected: void highlightBlock(const QString &text); diff --git a/src/tools/notification.cpp b/src/tools/notification.cpp index 67f87382c..4fdc3217a 100644 --- a/src/tools/notification.cpp +++ b/src/tools/notification.cpp @@ -1,6 +1,6 @@ #include "notification.h" -Notification::Notification(QWidget *parent) : +Notification::Notification(QWidget* parent) : QWidget(parent) ,m_animation(0) { diff --git a/src/tools/notification.h b/src/tools/notification.h index 9606b1c82..42a38e0c4 100644 --- a/src/tools/notification.h +++ b/src/tools/notification.h @@ -9,7 +9,7 @@ class Notification : public QWidget { Q_OBJECT public: - explicit Notification(QWidget *parent = 0); + explicit Notification(QWidget* parent = 0); public slots: void hide(); diff --git a/src/tools/treewidget.cpp b/src/tools/treewidget.cpp index dd18b1164..6842d11d6 100644 --- a/src/tools/treewidget.cpp +++ b/src/tools/treewidget.cpp @@ -17,12 +17,12 @@ * ============================================================ */ #include "treewidget.h" -TreeWidget::TreeWidget(QWidget *parent) : +TreeWidget::TreeWidget(QWidget* parent) : QTreeWidget(parent) { } -void TreeWidget::mousePressEvent(QMouseEvent *event) +void TreeWidget::mousePressEvent(QMouseEvent* event) { if (event->modifiers() == Qt::ControlModifier) emit itemControlClicked(itemAt(event->pos())); diff --git a/src/tools/treewidget.h b/src/tools/treewidget.h index 4dabda3db..856a812ad 100644 --- a/src/tools/treewidget.h +++ b/src/tools/treewidget.h @@ -26,15 +26,15 @@ class TreeWidget : public QTreeWidget { Q_OBJECT public: - explicit TreeWidget(QWidget *parent = 0); + explicit TreeWidget(QWidget* parent = 0); signals: - void itemControlClicked(QTreeWidgetItem *item); + void itemControlClicked(QTreeWidgetItem* item); public slots: private: - void mousePressEvent(QMouseEvent *event); + void mousePressEvent(QMouseEvent* event); }; diff --git a/src/webview/searchtoolbar.cpp b/src/webview/searchtoolbar.cpp index b752f3979..0cb8f4823 100644 --- a/src/webview/searchtoolbar.cpp +++ b/src/webview/searchtoolbar.cpp @@ -20,7 +20,7 @@ #include "webview.h" #include "lineedit.h" -SearchToolBar::SearchToolBar(QupZilla* mainClass, QWidget *parent) : +SearchToolBar::SearchToolBar(QupZilla* mainClass, QWidget* parent) : QToolBar(parent) ,p_QupZilla(mainClass) ,m_findFlags(0) diff --git a/src/webview/searchtoolbar.h b/src/webview/searchtoolbar.h index 3caeb4c77..ba2a2f622 100644 --- a/src/webview/searchtoolbar.h +++ b/src/webview/searchtoolbar.h @@ -36,7 +36,7 @@ class SearchToolBar : public QToolBar { Q_OBJECT public: - explicit SearchToolBar(QupZilla* mainClass, QWidget *parent = 0); + explicit SearchToolBar(QupZilla* mainClass, QWidget* parent = 0); LineEdit* searchLine(){ return m_searchLine; } signals: diff --git a/src/webview/siteinfo.cpp b/src/webview/siteinfo.cpp index 2b567fe72..379e7fb3f 100644 --- a/src/webview/siteinfo.cpp +++ b/src/webview/siteinfo.cpp @@ -20,7 +20,7 @@ #include "qupzilla.h" #include "webview.h" -SiteInfo::SiteInfo(QupZilla* mainClass, QWidget *parent) : +SiteInfo::SiteInfo(QupZilla* mainClass, QWidget* parent) : QDialog(parent) ,ui(new Ui::SiteInfo) ,p_QupZilla(mainClass) diff --git a/src/webview/siteinfo.h b/src/webview/siteinfo.h index b39b15a73..663cb9065 100644 --- a/src/webview/siteinfo.h +++ b/src/webview/siteinfo.h @@ -34,11 +34,11 @@ class SiteInfo : public QDialog Q_OBJECT public: - explicit SiteInfo(QupZilla* mainClass, QWidget *parent = 0); + explicit SiteInfo(QupZilla* mainClass, QWidget* parent = 0); ~SiteInfo(); private: - Ui::SiteInfo *ui; + Ui::SiteInfo* ui; QupZilla* p_QupZilla; }; diff --git a/src/webview/siteinfowidget.cpp b/src/webview/siteinfowidget.cpp index 43a9400cf..79adb05f6 100644 --- a/src/webview/siteinfowidget.cpp +++ b/src/webview/siteinfowidget.cpp @@ -19,7 +19,7 @@ #include "ui_siteinfowidget.h" #include "qupzilla.h" -SiteInfoWidget::SiteInfoWidget(QupZilla* mainClass, QWidget *parent) : +SiteInfoWidget::SiteInfoWidget(QupZilla* mainClass, QWidget* parent) : QMenu(parent) ,ui(new Ui::SiteInfoWidget) ,p_QupZilla(mainClass) diff --git a/src/webview/siteinfowidget.h b/src/webview/siteinfowidget.h index 42b64ffb4..7ae046823 100644 --- a/src/webview/siteinfowidget.h +++ b/src/webview/siteinfowidget.h @@ -31,13 +31,13 @@ class SiteInfoWidget : public QMenu Q_OBJECT public: - explicit SiteInfoWidget(QupZilla* mainClass, QWidget *parent = 0); + explicit SiteInfoWidget(QupZilla* mainClass, QWidget* parent = 0); ~SiteInfoWidget(); void showAt(QWidget* _parent); private: - Ui::SiteInfoWidget *ui; + Ui::SiteInfoWidget* ui; QupZilla* p_QupZilla; }; diff --git a/src/webview/tabbar.cpp b/src/webview/tabbar.cpp index 010d3f7e1..bb530eb78 100644 --- a/src/webview/tabbar.cpp +++ b/src/webview/tabbar.cpp @@ -19,7 +19,7 @@ #include "tabwidget.h" #include "qupzilla.h" -TabBar::TabBar(QupZilla* mainClass, QWidget *parent) : +TabBar::TabBar(QupZilla* mainClass, QWidget* parent) : QTabBar(parent) ,p_QupZilla(mainClass) ,m_clickedTab(0) @@ -49,7 +49,7 @@ void TabBar::loadSettings() void TabBar::contextMenuRequested(const QPoint &position) { - TabWidget *tabWidget = qobject_cast(parentWidget()); + TabWidget* tabWidget = qobject_cast(parentWidget()); if (!tabWidget) return; int index = tabAt(position); @@ -126,9 +126,9 @@ void TabBar::bookmarkTab() p_QupZilla->addBookmark(p_QupZilla->weView(m_clickedTab)->url(), p_QupZilla->weView(m_clickedTab)->title()); } -void TabBar::mouseDoubleClickEvent(QMouseEvent *event) +void TabBar::mouseDoubleClickEvent(QMouseEvent* event) { - TabWidget *tabWidget = qobject_cast(parentWidget()); + TabWidget* tabWidget = qobject_cast(parentWidget()); if (!tabWidget) return; if (event->button() == Qt::LeftButton && tabAt(event->pos()) == -1) { diff --git a/src/webview/tabbar.h b/src/webview/tabbar.h index ba7d4b4e0..492fa4aa8 100644 --- a/src/webview/tabbar.h +++ b/src/webview/tabbar.h @@ -35,7 +35,7 @@ class TabBar : public QTabBar { Q_OBJECT public: - explicit TabBar(QupZilla* mainClass, QWidget *parent = 0); + explicit TabBar(QupZilla* mainClass, QWidget* parent = 0); signals: void reloadTab(int index); @@ -60,7 +60,7 @@ private slots: void closeTab() { emit closeTab(m_clickedTab); } void bookmarkTab(); private: - void mouseDoubleClickEvent(QMouseEvent *event); + void mouseDoubleClickEvent(QMouseEvent* event); QupZilla* p_QupZilla; bool m_showCloseButtonWithOneTab; diff --git a/src/webview/tabwidget.cpp b/src/webview/tabwidget.cpp index bfc00c0d7..f0099cde2 100644 --- a/src/webview/tabwidget.cpp +++ b/src/webview/tabwidget.cpp @@ -24,7 +24,7 @@ #include "mainapplication.h" #include "webtab.h" -TabWidget::TabWidget(QupZilla* mainClass, QWidget *parent) : +TabWidget::TabWidget(QupZilla* mainClass, QWidget* parent) : QTabWidget(parent) ,p_QupZilla(mainClass) ,m_canRestoreTab(false) @@ -124,7 +124,7 @@ void TabWidget::aboutToShowTabsMenu() void TabWidget::actionChangeIndex() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { setCurrentIndex(action->data().toInt()); } } @@ -275,7 +275,7 @@ QByteArray TabWidget::saveState() QStringList tabs; QList tabsHistory; for (int i = 0; i < count(); ++i) { - if (WebView *tab = weView(i)) { + if (WebView* tab = weView(i)) { tabs.append(QString::fromUtf8(tab->url().toEncoded())); if (tab->history()->count() != 0) { QByteArray tabHistory; diff --git a/src/webview/tabwidget.h b/src/webview/tabwidget.h index 1372f205d..8a21f1394 100644 --- a/src/webview/tabwidget.h +++ b/src/webview/tabwidget.h @@ -38,7 +38,7 @@ class TabWidget : public QTabWidget { Q_OBJECT public: - explicit TabWidget(QupZilla* mainclass, QWidget *parent = 0); + explicit TabWidget(QupZilla* mainclass, QWidget* parent = 0); ~TabWidget(); enum OpenUrlIn{ CurrentTab, NewSelectedTab, NewNotSelectedTab, NewTab = NewSelectedTab }; diff --git a/src/webview/webpage.cpp b/src/webview/webpage.cpp index 0f223ae0b..96ce2428c 100644 --- a/src/webview/webpage.cpp +++ b/src/webview/webpage.cpp @@ -23,7 +23,7 @@ #include "webpluginfactory.h" #include "mainapplication.h" -WebPage::WebPage(WebView *parent, QupZilla* mainClass) +WebPage::WebPage(WebView* parent, QupZilla* mainClass) : QWebPage(parent) ,p_QupZilla(mainClass) ,m_view(parent) @@ -59,7 +59,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply* reply) qDebug() << "error" << reply->errorString(); } -bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type) +bool WebPage::acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest &request, NavigationType type) { m_lastRequest = request; m_lastRequestType = type; @@ -108,7 +108,7 @@ QWebPage* WebPage::createWindow(QWebPage::WebWindowType type) return p_QupZilla->weView(index)->page(); } -bool WebPage::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output) +bool WebPage::extension(Extension extension, const ExtensionOption* option, ExtensionReturn* output) { if (extension == ChooseMultipleFilesExtension) return QWebPage::extension(extension, option, output); diff --git a/src/webview/webpage.h b/src/webview/webpage.h index 787b38a30..bd3d963a4 100644 --- a/src/webview/webpage.h +++ b/src/webview/webpage.h @@ -40,20 +40,20 @@ class WebPage : public QWebPage { Q_OBJECT public: - WebPage(WebView *parent, QupZilla* mainClass); + WebPage(WebView* parent, QupZilla* mainClass); void populateNetworkRequest(QNetworkRequest &request); ~WebPage(); QString userAgentForUrl(const QUrl &url) const; bool supportsExtension(Extension extension) const { return (extension == ErrorPageExtension); } - bool extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output); + bool extension(Extension extension, const ExtensionOption* option, ExtensionReturn* output); protected slots: QWebPage* createWindow(QWebPage::WebWindowType type); void handleUnsupportedContent(QNetworkReply* url); protected: - bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); + bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest &request, NavigationType type); QupZilla* p_QupZilla; QNetworkRequest m_lastRequest; diff --git a/src/webview/webtab.cpp b/src/webview/webtab.cpp index f222f0e46..a4b1d00c1 100644 --- a/src/webview/webtab.cpp +++ b/src/webview/webtab.cpp @@ -19,7 +19,7 @@ #include "qupzilla.h" #include "webview.h" -WebTab::WebTab(QupZilla* mainClass, QWidget *parent) +WebTab::WebTab(QupZilla* mainClass, QWidget* parent) :QWidget(parent) ,p_QupZilla(mainClass) ,m_view(0) @@ -36,7 +36,7 @@ WebTab::WebTab(QupZilla* mainClass, QWidget *parent) connect(m_view, SIGNAL(showNotification(QWidget*)), this, SLOT(showNotification(QWidget*))); } -void WebTab::showNotification(QWidget *notif) +void WebTab::showNotification(QWidget* notif) { if (m_layout->count() > 1) delete m_layout->itemAt(0)->widget(); diff --git a/src/webview/webtab.h b/src/webview/webtab.h index 7d1f074d9..8a1dc9a53 100644 --- a/src/webview/webtab.h +++ b/src/webview/webtab.h @@ -28,7 +28,7 @@ class WebTab : public QWidget { Q_OBJECT public: - explicit WebTab(QupZilla* mainClass, QWidget *parent = 0); + explicit WebTab(QupZilla* mainClass, QWidget* parent = 0); ~WebTab(); WebView* view() { return m_view; } diff --git a/src/webview/webview.cpp b/src/webview/webview.cpp index a4ddb12db..82da70088 100644 --- a/src/webview/webview.cpp +++ b/src/webview/webview.cpp @@ -30,7 +30,7 @@ #include "pluginproxy.h" #include "webtab.h" -WebView::WebView(QupZilla* mainClass, QWidget *parent) +WebView::WebView(QupZilla* mainClass, QWidget* parent) : QWebView(parent) ,p_QupZilla(mainClass) ,m_progress(0) @@ -135,17 +135,17 @@ void WebView::loadStarted() // m_loadingTimer->start(1000*20); //20 seconds timeout to automatically "stop" loading animation } -QLabel *WebView::animationLoading(int index, bool addMovie) +QLabel* WebView::animationLoading(int index, bool addMovie) { if (-1 == index) return 0; - QLabel *loadingAnimation = qobject_cast(tabWidget()->getTabBar()->tabButton(index, QTabBar::LeftSide)); + QLabel* loadingAnimation = qobject_cast(tabWidget()->getTabBar()->tabButton(index, QTabBar::LeftSide)); if (!loadingAnimation) { loadingAnimation = new QLabel(this); } if (addMovie && !loadingAnimation->movie()) { - QMovie *movie = new QMovie(":icons/other/progress.gif", QByteArray(), loadingAnimation); + QMovie* movie = new QMovie(":icons/other/progress.gif", QByteArray(), loadingAnimation); movie->setSpeed(70); loadingAnimation->setMovie(movie); movie->start(); @@ -250,9 +250,9 @@ void WebView::linkHovered(const QString &link, const QString &title, const QStri TabWidget* WebView::tabWidget() const { - QObject *widget = this->parent(); + QObject* widget = this->parent(); while (widget) { - if (TabWidget *tw = qobject_cast(widget)) + if (TabWidget* tw = qobject_cast(widget)) return tw; widget = widget->parent(); } @@ -323,7 +323,7 @@ void WebView::checkRss() } } -void WebView::mousePressEvent(QMouseEvent *event) +void WebView::mousePressEvent(QMouseEvent* event) { switch (event->button()) { case Qt::XButton1: @@ -354,7 +354,7 @@ void WebView::mouseReleaseEvent(QMouseEvent* event) QWebView::mouseReleaseEvent(event); } -void WebView::keyPressEvent(QKeyEvent *event) +void WebView::keyPressEvent(QKeyEvent* event) { switch (event->key()) { case Qt::Key_Back: @@ -379,9 +379,9 @@ void WebView::keyPressEvent(QKeyEvent *event) } } -void WebView::contextMenuEvent(QContextMenuEvent *event) +void WebView::contextMenuEvent(QContextMenuEvent* event) { - QMenu *menu = new QMenu(this); + QMenu* menu = new QMenu(this); QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos()); @@ -492,42 +492,42 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) QWebView::contextMenuEvent(event); } -void WebView::addNotification(QWidget *notif) +void WebView::addNotification(QWidget* notif) { emit showNotification(notif); } void WebView::openUrlInNewTab() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { tabWidget()->addView(action->data().toUrl(), tr("New tab"), TabWidget::NewNotSelectedTab); } } void WebView::openUrlInNewWindow() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { mApp->makeNewWindow(false, action->data().toString()); } } void WebView::sendLinkByMail() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { QDesktopServices::openUrl(QUrl("mailto:?body="+action->data().toString())); } } void WebView::copyLinkToClipboard() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { QApplication::clipboard()->setText(action->data().toString()); } } void WebView::searchOnGoogle() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { load(QUrl("http://www.google.com/search?client=qupzilla&q="+action->data().toString())); } } @@ -549,7 +549,7 @@ void WebView::copyImageToClipboard() void WebView::showImage() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { load(QUrl(action->data().toString())); } } @@ -561,7 +561,7 @@ void WebView::showSource() void WebView::downloadLinkToDisk() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { QNetworkRequest request(action->data().toUrl()); DownloadManager* dManager = mApp->downManager(); dManager->download(request); @@ -576,7 +576,7 @@ void WebView::downloadRequested(const QNetworkRequest &request) void WebView::bookmarkLink() { - if (QAction *action = qobject_cast(sender())) { + if (QAction* action = qobject_cast(sender())) { if (action->data().isNull()) p_QupZilla->bookmarkPage(); else @@ -623,7 +623,7 @@ void WebView::zoomReset() applyZoom(); } -void WebView::wheelEvent(QWheelEvent *event) +void WebView::wheelEvent(QWheelEvent* event) { if (event->modifiers() & Qt::ControlModifier) { int numDegrees = event->delta() / 8; diff --git a/src/webview/webview.h b/src/webview/webview.h index 3277e8585..f49609af9 100644 --- a/src/webview/webview.h +++ b/src/webview/webview.h @@ -44,7 +44,7 @@ class WebView : public QWebView { Q_OBJECT public: - explicit WebView(QupZilla* mainClass, QWidget *parent = 0); + explicit WebView(QupZilla* mainClass, QWidget* parent = 0); ~WebView(); bool isLoading() { return m_isLoading;} int getLoading() { return m_progress; } @@ -104,11 +104,11 @@ private slots: void checkRss(); private: - void keyPressEvent(QKeyEvent *event); - void mousePressEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); - void contextMenuEvent(QContextMenuEvent *event); - void wheelEvent(QWheelEvent *event); + void keyPressEvent(QKeyEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void wheelEvent(QWheelEvent* event); TabWidget* tabWidget() const; int tabIndex() const; bool isCurrent();