mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Updated code model
This commit is contained in:
parent
c44d844c87
commit
d9d8506536
3
src/3rdparty/qtwin.cpp
vendored
3
src/3rdparty/qtwin.cpp
vendored
|
@ -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;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -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<QAction*> actions = menuBar()->actions();
|
||||
foreach (QAction *action, actions) {
|
||||
foreach (QAction* action, actions) {
|
||||
if (action->menu())
|
||||
actions += action->menu()->actions();
|
||||
addAction(action);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
};
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -192,7 +192,7 @@ void QupZilla::refreshHistory(int index)
|
|||
|
||||
void QupZilla::goAtHistoryIndex()
|
||||
{
|
||||
if (QAction *action = qobject_cast<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(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<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
||||
loadAddress(action->data().toUrl());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<QAction*>(sender()))
|
||||
if (QAction* action = qobject_cast<QAction*>(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<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
||||
m_bookmarksModel->editBookmark(item->whatsThis(1).toInt(), item->text(0), action->data().toString());
|
||||
}
|
||||
refreshTable();
|
||||
|
|
|
@ -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<QupZilla> p_QupZilla;
|
||||
BookmarksModel* m_bookmarksModel;
|
||||
};
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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<QNetworkCookie> &cookieList, const QUrl &url);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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<QNetworkCookie> m_cookies;
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<QTime> remTimes;
|
||||
QList<int> 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()){
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<QAction*>(sender()))
|
||||
if (QAction* action = qobject_cast<QAction*>(sender()))
|
||||
getQupZilla()->tabWidget()->addView(action->data().toUrl(), tr("New Tab"), TabWidget::NewNotSelectedTab);
|
||||
}
|
||||
|
||||
|
|
|
@ -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<QupZilla> p_QupZilla;
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* ============================================================ */
|
||||
#include "locationpopup.h"
|
||||
LocationPopup::LocationPopup(QWidget *parent)
|
||||
LocationPopup::LocationPopup(QWidget* parent)
|
||||
:QAbstractItemView()
|
||||
,m_parent(parent)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ class LocationPopup : public QAbstractItemView
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LocationPopup(QWidget *parent = 0);
|
||||
explicit LocationPopup(QWidget* parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
|
|
|
@ -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<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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<QSslError> errors)
|
||||
void NetworkManager::sslError(QNetworkReply* reply, QList<QSslError> 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);
|
||||
|
|
|
@ -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<QSslCertificate> getCertExceptions() { return m_certExceptions; }
|
||||
void setCertExceptions(QList<QSslCertificate> certs) { m_certExceptions = certs; }
|
||||
|
|
|
@ -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<QSslError>&)),
|
||||
manager, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)));
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "webview.h"
|
||||
#include "webpage.h"
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent) :
|
||||
AboutDialog::AboutDialog(QWidget* parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::AboutDialog)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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<QWebView*>(parent)) {
|
||||
if (QWebView* aView = qobject_cast<QWebView*>(parent)) {
|
||||
view = aView;
|
||||
break;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ void ClickToFlash::load()
|
|||
QList<QWebFrame*> frames;
|
||||
frames.append(view->page()->mainFrame());
|
||||
while (!frames.isEmpty()) {
|
||||
QWebFrame *frame = frames.takeFirst();
|
||||
QWebFrame* frame = frames.takeFirst();
|
||||
QWebElement docElement = frame->documentElement();
|
||||
|
||||
QWebElementCollection elements;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<PluginInterface *>(plugin);
|
||||
PluginInterface* iPlugin = qobject_cast<PluginInterface*>(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<PluginInterface *>(plugin);
|
||||
PluginInterface* iPlugin = qobject_cast<PluginInterface*>(plugin);
|
||||
return iPlugin;
|
||||
} else
|
||||
return 0;
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "mainapplication.h"
|
||||
#include "pluginproxy.h"
|
||||
|
||||
WebPluginFactory::WebPluginFactory(QObject *parent)
|
||||
WebPluginFactory::WebPluginFactory(QObject* parent)
|
||||
: QWebPluginFactory(parent)
|
||||
,m_loadClickToFlash(false)
|
||||
{
|
||||
|
|
|
@ -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<QWebPluginFactory::Plugin> plugins() const;
|
||||
|
||||
signals:
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "networkmanager.h"
|
||||
#include "mainapplication.h"
|
||||
|
||||
SSLManager::SSLManager(QWidget *parent) :
|
||||
SSLManager::SSLManager(QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::SSLManager)
|
||||
{
|
||||
|
|
|
@ -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<QSslCertificate> m_certs;
|
||||
};
|
||||
|
||||
|
|
|
@ -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<QAction*>(sender()))
|
||||
if (QAction* action = qobject_cast<QAction*>(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);
|
||||
}
|
||||
|
|
|
@ -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<QNetworkReply*> m_networkReplies;
|
||||
QNetworkAccessManager* m_networkManager;
|
||||
Ui::RSSManager *ui;
|
||||
Ui::RSSManager* ui;
|
||||
QPointer<QupZilla> p_QupZilla;
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "rssmanager.h"
|
||||
#include "rssnotification.h"
|
||||
|
||||
RSSWidget::RSSWidget(WebView *view, QList<QPair<QString, QString> > availableRss, QWidget *parent)
|
||||
RSSWidget::RSSWidget(WebView* view, QList<QPair<QString, QString> > 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<QPushButton*>(sender())) {
|
||||
if (QPushButton* button = qobject_cast<QPushButton*>(sender())) {
|
||||
QUrl url = QUrl(button->whatsThis());
|
||||
QString urlString = button->whatsThis();
|
||||
if(url.host().isEmpty()) {
|
||||
|
|
|
@ -33,7 +33,7 @@ class RSSWidget : public QMenu
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit RSSWidget(WebView* view, QList<QPair<QString,QString> > availableRss, QWidget *parent = 0);
|
||||
explicit RSSWidget(WebView* view, QList<QPair<QString,QString> > 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<QPair<QString,QString> > m_avRss;
|
||||
WebView* m_view;
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* ============================================================ */
|
||||
#include "sidebar.h"
|
||||
|
||||
SideBar::SideBar(QWidget *parent) :
|
||||
SideBar::SideBar(QWidget* parent) :
|
||||
QDockWidget(parent)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ class SideBar : public QDockWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SideBar(QWidget *parent = 0);
|
||||
explicit SideBar(QWidget* parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
****************************************************************************/
|
||||
#include "htmlhighlighter.h"
|
||||
|
||||
HtmlHighlighter::HtmlHighlighter(QTextDocument *parent)
|
||||
HtmlHighlighter::HtmlHighlighter(QTextDocument* parent)
|
||||
: QSyntaxHighlighter(parent)
|
||||
{
|
||||
HighlightingRule rule;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "notification.h"
|
||||
|
||||
Notification::Notification(QWidget *parent) :
|
||||
Notification::Notification(QWidget* parent) :
|
||||
QWidget(parent)
|
||||
,m_animation(0)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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()));
|
||||
|
|
|
@ -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);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -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<TabWidget*>(parentWidget());
|
||||
TabWidget* tabWidget = qobject_cast<TabWidget*>(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<TabWidget*>(parentWidget());
|
||||
TabWidget* tabWidget = qobject_cast<TabWidget*>(parentWidget());
|
||||
if (!tabWidget)
|
||||
return;
|
||||
if (event->button() == Qt::LeftButton && tabAt(event->pos()) == -1) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
||||
setCurrentIndex(action->data().toInt());
|
||||
}
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ QByteArray TabWidget::saveState()
|
|||
QStringList tabs;
|
||||
QList<QByteArray> 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;
|
||||
|
|
|
@ -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 };
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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<QLabel*>(tabWidget()->getTabBar()->tabButton(index, QTabBar::LeftSide));
|
||||
QLabel* loadingAnimation = qobject_cast<QLabel*>(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<TabWidget*>(widget))
|
||||
if (TabWidget* tw = qobject_cast<TabWidget*>(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<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
||||
tabWidget()->addView(action->data().toUrl(), tr("New tab"), TabWidget::NewNotSelectedTab);
|
||||
}
|
||||
}
|
||||
|
||||
void WebView::openUrlInNewWindow()
|
||||
{
|
||||
if (QAction *action = qobject_cast<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
||||
mApp->makeNewWindow(false, action->data().toString());
|
||||
}
|
||||
}
|
||||
|
||||
void WebView::sendLinkByMail()
|
||||
{
|
||||
if (QAction *action = qobject_cast<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
||||
QDesktopServices::openUrl(QUrl("mailto:?body="+action->data().toString()));
|
||||
}
|
||||
}
|
||||
|
||||
void WebView::copyLinkToClipboard()
|
||||
{
|
||||
if (QAction *action = qobject_cast<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
||||
QApplication::clipboard()->setText(action->data().toString());
|
||||
}
|
||||
}
|
||||
|
||||
void WebView::searchOnGoogle()
|
||||
{
|
||||
if (QAction *action = qobject_cast<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(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<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
||||
load(QUrl(action->data().toString()));
|
||||
}
|
||||
}
|
||||
|
@ -561,7 +561,7 @@ void WebView::showSource()
|
|||
|
||||
void WebView::downloadLinkToDisk()
|
||||
{
|
||||
if (QAction *action = qobject_cast<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(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<QAction*>(sender())) {
|
||||
if (QAction* action = qobject_cast<QAction*>(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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user