1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-19 10:16:34 +01:00

Always use nullptr for zero pointer

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2023-11-21 01:12:28 +01:00
parent c23f299243
commit 883f24aeba
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B
124 changed files with 232 additions and 232 deletions

View File

@ -57,8 +57,8 @@ bool SideWidget::event(QEvent* event)
LineEdit::LineEdit(QWidget* parent) LineEdit::LineEdit(QWidget* parent)
: QLineEdit(parent) : QLineEdit(parent)
, m_leftLayout(0) , m_leftLayout(nullptr)
, m_rightLayout(0) , m_rightLayout(nullptr)
, m_minHeight(0) , m_minHeight(0)
, m_leftMargin(-1) , m_leftMargin(-1)
, m_ignoreMousePress(false) , m_ignoreMousePress(false)
@ -219,7 +219,7 @@ QMenu* LineEdit::createContextMenu()
QMenu* tmp = createStandardContextMenu(); QMenu* tmp = createStandardContextMenu();
tmp->setParent(popup); tmp->setParent(popup);
tmp->hide(); tmp->hide();
QAction* lastAction = !tmp->actions().isEmpty() ? tmp->actions().constLast() : 0; QAction* lastAction = !tmp->actions().isEmpty() ? tmp->actions().constLast() : nullptr;
if (lastAction && lastAction->menu() && lastAction->menu()->inherits("QUnicodeControlCharacterMenu")) { if (lastAction && lastAction->menu() && lastAction->menu()->inherits("QUnicodeControlCharacterMenu")) {
popup->addAction(lastAction); popup->addAction(lastAction);

View File

@ -52,7 +52,7 @@ class QtLocalPeer : public QObject
Q_OBJECT Q_OBJECT
public: public:
QtLocalPeer(QObject *parent = 0, const QString &appId = QString()); QtLocalPeer(QObject *parent = nullptr, const QString &appId = QString());
bool isClient(); bool isClient();
bool sendMessage(const QString &message, int timeout); bool sendMessage(const QString &message, int timeout);
QString applicationId() const QString applicationId() const

View File

@ -135,7 +135,7 @@
void QtSingleApplication::sysInit(const QString &appId) void QtSingleApplication::sysInit(const QString &appId)
{ {
actWin = 0; actWin = nullptr;
peer = new QtLocalPeer(this, appId); peer = new QtLocalPeer(this, appId);
connect(peer, &QtLocalPeer::messageReceived, this, &QtSingleApplication::messageReceived); connect(peer, &QtLocalPeer::messageReceived, this, &QtSingleApplication::messageReceived);
} }

View File

@ -35,13 +35,13 @@ const AdBlockRule* AdBlockMatcher::match(const QWebEngineUrlRequestInfo &request
{ {
// Exception rules // Exception rules
if (m_networkExceptionTree.find(request, urlDomain, urlString)) if (m_networkExceptionTree.find(request, urlDomain, urlString))
return 0; return nullptr;
int count = m_networkExceptionRules.count(); int count = m_networkExceptionRules.count();
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
const AdBlockRule* rule = m_networkExceptionRules.at(i); const AdBlockRule* rule = m_networkExceptionRules.at(i);
if (rule->networkMatch(request, urlDomain, urlString)) if (rule->networkMatch(request, urlDomain, urlString))
return 0; return nullptr;
} }
// Block rules // Block rules
@ -55,7 +55,7 @@ const AdBlockRule* AdBlockMatcher::match(const QWebEngineUrlRequestInfo &request
return rule; return rule;
} }
return 0; return nullptr;
} }
bool AdBlockMatcher::adBlockDisabledForUrl(const QUrl &url) const bool AdBlockMatcher::adBlockDisabledForUrl(const QUrl &url) const

View File

@ -73,7 +73,7 @@ const AdBlockRule* AdBlockSearchTree::find(const QWebEngineUrlRequestInfo &reque
int len = urlString.size(); int len = urlString.size();
if (len <= 0) { if (len <= 0) {
return 0; return nullptr;
} }
const QChar* string = urlString.constData(); const QChar* string = urlString.constData();
@ -85,13 +85,13 @@ const AdBlockRule* AdBlockSearchTree::find(const QWebEngineUrlRequestInfo &reque
} }
} }
return 0; return nullptr;
} }
const AdBlockRule* AdBlockSearchTree::prefixSearch(const QWebEngineUrlRequestInfo &request, const QString &domain, const QString &urlString, const QChar* string, int len) const const AdBlockRule* AdBlockSearchTree::prefixSearch(const QWebEngineUrlRequestInfo &request, const QString &domain, const QString &urlString, const QChar* string, int len) const
{ {
if (len <= 0) { if (len <= 0) {
return 0; return nullptr;
} }
QChar c = string[0]; QChar c = string[0];

View File

@ -44,7 +44,7 @@ private:
const AdBlockRule* rule; const AdBlockRule* rule;
QHash<QChar, Node*> children; QHash<QChar, Node*> children;
Node() : c(0) , rule(0) { } Node() : c(0) , rule(nullptr) { }
}; };
const AdBlockRule* prefixSearch(const QWebEngineUrlRequestInfo &request, const QString &domain, const AdBlockRule* prefixSearch(const QWebEngineUrlRequestInfo &request, const QString &domain,

View File

@ -167,7 +167,7 @@ void AdBlockSubscription::subscriptionDownloaded()
} }
m_reply->deleteLater(); m_reply->deleteLater();
m_reply = 0; m_reply = nullptr;
if (error) { if (error) {
Q_EMIT subscriptionError(tr("Cannot load subscription!")); Q_EMIT subscriptionError(tr("Cannot load subscription!"));
@ -412,7 +412,7 @@ bool AdBlockCustomList::removeRule(int offset)
const AdBlockRule* AdBlockCustomList::replaceRule(AdBlockRule* rule, int offset) const AdBlockRule* AdBlockCustomList::replaceRule(AdBlockRule* rule, int offset)
{ {
if (!QzTools::containsIndex(m_rules, offset)) { if (!QzTools::containsIndex(m_rules, offset)) {
return 0; return nullptr;
} }
AdBlockRule* oldRule = m_rules.at(offset); AdBlockRule* oldRule = m_rules.at(offset);

View File

@ -27,7 +27,7 @@
AdBlockTreeWidget::AdBlockTreeWidget(AdBlockSubscription* subscription, QWidget* parent) AdBlockTreeWidget::AdBlockTreeWidget(AdBlockSubscription* subscription, QWidget* parent)
: TreeWidget(parent) : TreeWidget(parent)
, m_subscription(subscription) , m_subscription(subscription)
, m_topItem(0) , m_topItem(nullptr)
, m_itemChangingBlock(false) , m_itemChangingBlock(false)
{ {
setContextMenuPolicy(Qt::CustomContextMenu); setContextMenuPolicy(Qt::CustomContextMenu);
@ -266,6 +266,6 @@ void AdBlockTreeWidget::refresh()
++index; ++index;
} }
showRule(0); showRule(nullptr);
m_itemChangingBlock = false; m_itemChangingBlock = false;
} }

View File

@ -1565,7 +1565,7 @@ static xcb_connection_t *getXcbConnection()
{ {
const QNativeInterface::QX11Application *x11App = qApp->nativeInterface<QNativeInterface::QX11Application>(); const QNativeInterface::QX11Application *x11App = qApp->nativeInterface<QNativeInterface::QX11Application>();
if (x11App == nullptr) if (x11App == nullptr)
return 0; return nullptr;
return x11App->connection(); return x11App->connection();
} }
@ -1575,18 +1575,18 @@ int BrowserWindow::getCurrentVirtualDesktop() const
return 0; return 0;
xcb_connection_t *connection = getXcbConnection(); xcb_connection_t *connection = getXcbConnection();
if (connection == 0) if (connection == nullptr)
return 0; return 0;
xcb_intern_atom_cookie_t intern_atom; xcb_intern_atom_cookie_t intern_atom;
xcb_intern_atom_reply_t *atom_reply = 0; xcb_intern_atom_reply_t *atom_reply = nullptr;
xcb_atom_t atom; xcb_atom_t atom;
xcb_get_property_cookie_t cookie; xcb_get_property_cookie_t cookie;
xcb_get_property_reply_t *reply = 0; xcb_get_property_reply_t *reply = nullptr;
uint32_t value; uint32_t value;
intern_atom = xcb_intern_atom(connection, false, qstrlen("_NET_WM_DESKTOP"), "_NET_WM_DESKTOP"); intern_atom = xcb_intern_atom(connection, false, qstrlen("_NET_WM_DESKTOP"), "_NET_WM_DESKTOP");
atom_reply = xcb_intern_atom_reply(connection, intern_atom, 0); atom_reply = xcb_intern_atom_reply(connection, intern_atom, nullptr);
if (!atom_reply) if (!atom_reply)
goto error; goto error;
@ -1594,7 +1594,7 @@ int BrowserWindow::getCurrentVirtualDesktop() const
atom = atom_reply->atom; atom = atom_reply->atom;
cookie = xcb_get_property(connection, false, winId(), atom, XCB_ATOM_CARDINAL, 0, 1); cookie = xcb_get_property(connection, false, winId(), atom, XCB_ATOM_CARDINAL, 0, 1);
reply = xcb_get_property_reply(connection, cookie, 0); reply = xcb_get_property_reply(connection, cookie, nullptr);
if (!reply || reply->type != XCB_ATOM_CARDINAL || reply->value_len != 1 || reply->format != sizeof(uint32_t) * 8) if (!reply || reply->type != XCB_ATOM_CARDINAL || reply->value_len != 1 || reply->format != sizeof(uint32_t) * 8)
goto error; goto error;
@ -1621,15 +1621,15 @@ void BrowserWindow::moveToVirtualDesktop(int desktopId)
return; return;
xcb_connection_t *connection = getXcbConnection(); xcb_connection_t *connection = getXcbConnection();
if (connection == 0) if (connection == nullptr)
return; return;
xcb_intern_atom_cookie_t intern_atom; xcb_intern_atom_cookie_t intern_atom;
xcb_intern_atom_reply_t *atom_reply = 0; xcb_intern_atom_reply_t *atom_reply = nullptr;
xcb_atom_t atom; xcb_atom_t atom;
intern_atom = xcb_intern_atom(connection, false, qstrlen("_NET_WM_DESKTOP"), "_NET_WM_DESKTOP"); intern_atom = xcb_intern_atom(connection, false, qstrlen("_NET_WM_DESKTOP"), "_NET_WM_DESKTOP");
atom_reply = xcb_intern_atom_reply(connection, intern_atom, 0); atom_reply = xcb_intern_atom_reply(connection, intern_atom, nullptr);
if (!atom_reply) if (!atom_reply)
goto error; goto error;

View File

@ -155,8 +155,8 @@ public Q_SLOTS:
void toggleFullScreen(); void toggleFullScreen();
void requestHtmlFullScreen(TabbedWebView *view, bool enable); void requestHtmlFullScreen(TabbedWebView *view, bool enable);
void loadActionUrl(QObject* obj = 0); void loadActionUrl(QObject* obj = nullptr);
void loadActionUrlInNewTab(QObject* obj = 0); void loadActionUrlInNewTab(QObject* obj = nullptr);
void bookmarkPage(); void bookmarkPage();
void bookmarkAllTabs(); void bookmarkAllTabs();

View File

@ -448,7 +448,7 @@ BrowserWindow* MainApplication::getWindow() const
return m_lastActiveWindow.data(); return m_lastActiveWindow.data();
} }
return m_windows.isEmpty() ? 0 : m_windows.at(0); return m_windows.isEmpty() ? nullptr : m_windows.at(0);
} }
BrowserWindow* MainApplication::createWindow(Qz::BrowserWindowType type, const QUrl &startUrl) BrowserWindow* MainApplication::createWindow(Qz::BrowserWindowType type, const QUrl &startUrl)
@ -516,7 +516,7 @@ void MainApplication::destroyRestoreManager()
} }
delete m_restoreManager; delete m_restoreManager;
m_restoreManager = 0; m_restoreManager = nullptr;
} }
void MainApplication::reloadSettings() void MainApplication::reloadSettings()

View File

@ -249,7 +249,7 @@ void ProfileManager::copyDataToProfile()
const QString text = QSL("Incompatible profile version has been detected. To avoid losing your profile data, they were " const QString text = QSL("Incompatible profile version has been detected. To avoid losing your profile data, they were "
"backed up in following file:<br/><br/><b>") + browseDataBackup + QSL("<br/></b>"); "backed up in following file:<br/><br/><b>") + browseDataBackup + QSL("<br/></b>");
QMessageBox::warning(0, QStringLiteral("Falkon: Incompatible profile version"), text); QMessageBox::warning(nullptr, QStringLiteral("Falkon: Incompatible profile version"), text);
} }
} }

View File

@ -27,7 +27,7 @@ class FALKON_EXPORT ProxyStyle : public QProxyStyle
public: public:
explicit ProxyStyle(); explicit ProxyStyle();
int styleHint(StyleHint hint, const QStyleOption* option = 0, const QWidget* widget = 0, QStyleHintReturn* returnData = 0) const override; int styleHint(StyleHint hint, const QStyleOption* option = nullptr, const QWidget* widget = nullptr, QStyleHintReturn* returnData = nullptr) const override;
int pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const override; int pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const override;
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override; void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override;

View File

@ -20,8 +20,8 @@
#include <QSettings> #include <QSettings>
QSettings* Settings::s_settings = 0; QSettings* Settings::s_settings = nullptr;
QzSettings* Settings::s_qzSettings = 0; QzSettings* Settings::s_qzSettings = nullptr;
Settings::Settings() Settings::Settings()
{ {

View File

@ -21,7 +21,7 @@
#include "iconprovider.h" #include "iconprovider.h"
AutoFillNotification::AutoFillNotification(const QUrl &url, const PageFormData &formData, const PasswordEntry &updateData) AutoFillNotification::AutoFillNotification(const QUrl &url, const PageFormData &formData, const PasswordEntry &updateData)
: AnimatedWidget(AnimatedWidget::Down, 300, 0) : AnimatedWidget(AnimatedWidget::Down, 300, nullptr)
, ui(new Ui::AutoFillNotification) , ui(new Ui::AutoFillNotification)
, m_url(url) , m_url(url)
, m_formData(formData) , m_formData(formData)

View File

@ -26,7 +26,7 @@
BookmarksExportDialog::BookmarksExportDialog(QWidget* parent) BookmarksExportDialog::BookmarksExportDialog(QWidget* parent)
: QDialog(parent) : QDialog(parent)
, ui(new Ui::BookmarksExportDialog) , ui(new Ui::BookmarksExportDialog)
, m_currentExporter(0) , m_currentExporter(nullptr)
{ {
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(this); ui->setupUi(this);

View File

@ -29,8 +29,8 @@
BookmarksIcon::BookmarksIcon(QWidget* parent) BookmarksIcon::BookmarksIcon(QWidget* parent)
: ClickableLabel(parent) : ClickableLabel(parent)
, m_view(0) , m_view(nullptr)
, m_bookmark(0) , m_bookmark(nullptr)
{ {
setObjectName("locationbar-bookmarkicon"); setObjectName("locationbar-bookmarkicon");
setCursor(Qt::PointingHandCursor); setCursor(Qt::PointingHandCursor);
@ -60,7 +60,7 @@ void BookmarksIcon::checkBookmark(const QUrl &url, bool forceCheck)
} }
QList<BookmarkItem*> items = mApp->bookmarks()->searchBookmarks(url); QList<BookmarkItem*> items = mApp->bookmarks()->searchBookmarks(url);
m_bookmark = items.isEmpty() ? 0 : items.at(0); m_bookmark = items.isEmpty() ? nullptr : items.at(0);
if (m_bookmark || mApp->plugins()->speedDial()->pageForUrl(url).isValid()) { if (m_bookmark || mApp->plugins()->speedDial()->pageForUrl(url).isValid()) {
setBookmarkSaved(); setBookmarkSaved();

View File

@ -81,7 +81,7 @@ BookmarkItem* OperaImporter::importBookmarks()
QList<BookmarkItem*> folders; QList<BookmarkItem*> folders;
folders.append(root); folders.append(root);
BookmarkItem* item = 0; BookmarkItem* item = nullptr;
#define PARENT folders.isEmpty() ? root : folders.last() #define PARENT folders.isEmpty() ? root : folders.last()

View File

@ -55,10 +55,10 @@ private Q_SLOTS:
void bookmarksSelected(const QList<BookmarkItem*> &items); void bookmarksSelected(const QList<BookmarkItem*> &items);
void createContextMenu(const QPoint &pos); void createContextMenu(const QPoint &pos);
void openBookmark(BookmarkItem* item = 0); void openBookmark(BookmarkItem* item = nullptr);
void openBookmarkInNewTab(BookmarkItem* item = 0); void openBookmarkInNewTab(BookmarkItem* item = nullptr);
void openBookmarkInNewWindow(BookmarkItem* item = 0); void openBookmarkInNewWindow(BookmarkItem* item = nullptr);
void openBookmarkInNewPrivateWindow(BookmarkItem* item = 0); void openBookmarkInNewPrivateWindow(BookmarkItem* item = nullptr);
void addBookmark(); void addBookmark();
void addFolder(); void addFolder();

View File

@ -28,7 +28,7 @@
BookmarksMenu::BookmarksMenu(QWidget* parent) BookmarksMenu::BookmarksMenu(QWidget* parent)
: Menu(parent) : Menu(parent)
, m_window(0) , m_window(nullptr)
, m_changed(true) , m_changed(true)
{ {
init(); init();

View File

@ -36,7 +36,7 @@ BookmarksToolbar::BookmarksToolbar(BrowserWindow* window, QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_window(window) , m_window(window)
, m_bookmarks(mApp->bookmarks()) , m_bookmarks(mApp->bookmarks())
, m_clickedBookmark(0) , m_clickedBookmark(nullptr)
, m_dropRow(-1) , m_dropRow(-1)
{ {
setObjectName("bookmarksbar"); setObjectName("bookmarksbar");
@ -44,10 +44,10 @@ BookmarksToolbar::BookmarksToolbar(BrowserWindow* window, QWidget* parent)
setContextMenuPolicy(Qt::CustomContextMenu); setContextMenuPolicy(Qt::CustomContextMenu);
m_layout = new QHBoxLayout(this); m_layout = new QHBoxLayout(this);
auto contentsMargin = style()->pixelMetric(QStyle::PM_ToolBarItemMargin, 0, this) auto contentsMargin = style()->pixelMetric(QStyle::PM_ToolBarItemMargin, nullptr, this)
+ style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, 0, this); + style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, nullptr, this);
m_layout->setContentsMargins(contentsMargin, contentsMargin, contentsMargin, contentsMargin); m_layout->setContentsMargins(contentsMargin, contentsMargin, contentsMargin, contentsMargin);
m_layout->setSpacing(style()->pixelMetric(QStyle::PM_ToolBarItemSpacing, 0, this)); m_layout->setSpacing(style()->pixelMetric(QStyle::PM_ToolBarItemSpacing, nullptr, this));
setLayout(m_layout); setLayout(m_layout);
m_updateTimer = new QTimer(this); m_updateTimer = new QTimer(this);
@ -68,7 +68,7 @@ BookmarksToolbar::BookmarksToolbar(BrowserWindow* window, QWidget* parent)
void BookmarksToolbar::contextMenuRequested(const QPoint &pos) void BookmarksToolbar::contextMenuRequested(const QPoint &pos)
{ {
BookmarksToolbarButton* button = buttonAt(pos); BookmarksToolbarButton* button = buttonAt(pos);
m_clickedBookmark = button ? button->bookmark() : 0; m_clickedBookmark = button ? button->bookmark() : nullptr;
QMenu menu; QMenu menu;
QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), tr("Open in new tab")); QAction* actNewTab = menu.addAction(IconProvider::newTabIcon(), tr("Open in new tab"));

View File

@ -38,7 +38,7 @@
BookmarksToolbarButton::BookmarksToolbarButton(BookmarkItem* bookmark, QWidget* parent) BookmarksToolbarButton::BookmarksToolbarButton(BookmarkItem* bookmark, QWidget* parent)
: QPushButton(parent) : QPushButton(parent)
, m_bookmark(bookmark) , m_bookmark(bookmark)
, m_window(0) , m_window(nullptr)
, m_showOnlyIcon(false) , m_showOnlyIcon(false)
{ {
init(); init();

View File

@ -50,9 +50,9 @@ private Q_SLOTS:
void menuAboutToShow(); void menuAboutToShow();
void menuMiddleClicked(Menu* menu); void menuMiddleClicked(Menu* menu);
void bookmarkActivated(BookmarkItem* item = 0); void bookmarkActivated(BookmarkItem* item = nullptr);
void bookmarkCtrlActivated(BookmarkItem* item = 0); void bookmarkCtrlActivated(BookmarkItem* item = nullptr);
void bookmarkShiftActivated(BookmarkItem* item = 0); void bookmarkShiftActivated(BookmarkItem* item = nullptr);
void openFolder(BookmarkItem* item); void openFolder(BookmarkItem* item);
void openBookmark(BookmarkItem* item); void openBookmark(BookmarkItem* item);

View File

@ -40,7 +40,7 @@
// BookmarksFoldersMenu // BookmarksFoldersMenu
BookmarksFoldersMenu::BookmarksFoldersMenu(QWidget* parent) BookmarksFoldersMenu::BookmarksFoldersMenu(QWidget* parent)
: QMenu(parent) : QMenu(parent)
, m_selectedFolder(0) , m_selectedFolder(nullptr)
{ {
init(); init();
} }

View File

@ -53,7 +53,7 @@ class FALKON_EXPORT BookmarksFoldersButton : public QPushButton
Q_OBJECT Q_OBJECT
public: public:
explicit BookmarksFoldersButton(QWidget* parent, BookmarkItem* folder = 0); explicit BookmarksFoldersButton(QWidget* parent, BookmarkItem* folder = nullptr);
BookmarkItem* selectedFolder() const; BookmarkItem* selectedFolder() const;
@ -79,8 +79,8 @@ class FALKON_EXPORT BookmarksTools
{ {
public: public:
// Add Bookmark Dialogs // Add Bookmark Dialogs
static bool addBookmarkDialog(QWidget* parent, const QUrl &url, const QString &title, BookmarkItem* folder = 0); static bool addBookmarkDialog(QWidget* parent, const QUrl &url, const QString &title, BookmarkItem* folder = nullptr);
static bool bookmarkAllTabsDialog(QWidget* parent, TabWidget* tabWidget, BookmarkItem* folder = 0); static bool bookmarkAllTabsDialog(QWidget* parent, TabWidget* tabWidget, BookmarkItem* folder = nullptr);
// Edit Bookmark Dialog // Edit Bookmark Dialog
static bool editBookmarkDialog(QWidget* parent, BookmarkItem* item); static bool editBookmarkDialog(QWidget* parent, BookmarkItem* item);

View File

@ -78,7 +78,7 @@ void BookmarksTreeView::setViewType(BookmarksTreeView::ViewType type)
BookmarkItem* BookmarksTreeView::selectedBookmark() const BookmarkItem* BookmarksTreeView::selectedBookmark() const
{ {
QList<BookmarkItem*> items = selectedBookmarks(); QList<BookmarkItem*> items = selectedBookmarks();
return items.count() == 1 ? items.at(0) : 0; return items.count() == 1 ? items.at(0) : nullptr;
} }
QList<BookmarkItem*> BookmarksTreeView::selectedBookmarks() const QList<BookmarkItem*> BookmarksTreeView::selectedBookmarks() const

View File

@ -29,7 +29,7 @@
History::History(QObject* parent) History::History(QObject* parent)
: QObject(parent) : QObject(parent)
, m_isSaving(true) , m_isSaving(true)
, m_model(0) , m_model(nullptr)
{ {
loadSettings(); loadSettings();
} }

View File

@ -97,7 +97,7 @@ HistoryItem* HistoryItem::child(int row) const
return m_children.at(row); return m_children.at(row);
} }
return 0; return nullptr;
} }
int HistoryItem::childCount() const int HistoryItem::childCount() const

View File

@ -73,7 +73,7 @@ void HistoryMenu::showHistoryManager()
void HistoryMenu::aboutToShow() void HistoryMenu::aboutToShow()
{ {
// Set enabled states for Back/Forward actions according to current WebView // Set enabled states for Back/Forward actions according to current WebView
TabbedWebView* view = m_window ? m_window->weView() : 0; TabbedWebView* view = m_window ? m_window->weView() : nullptr;
if (view) { if (view) {
actions().at(0)->setEnabled(view->history()->canGoBack()); actions().at(0)->setEnabled(view->history()->canGoBack());

View File

@ -37,8 +37,8 @@ static QString dateTimeToString(const QDateTime &dateTime)
HistoryModel::HistoryModel(History* history) HistoryModel::HistoryModel(History* history)
: QAbstractItemModel(history) : QAbstractItemModel(history)
, m_rootItem(new HistoryItem(0)) , m_rootItem(new HistoryItem(nullptr))
, m_todayItem(0) , m_todayItem(nullptr)
, m_history(history) , m_history(history)
{ {
init(); init();
@ -254,7 +254,7 @@ void HistoryModel::removeTopLevelIndexes(const QList<QPersistentModelIndex> &ind
endRemoveRows(); endRemoveRows();
if (item == m_todayItem) { if (item == m_todayItem) {
m_todayItem = 0; m_todayItem = nullptr;
} }
} }
} }
@ -264,8 +264,8 @@ void HistoryModel::resetHistory()
beginResetModel(); beginResetModel();
delete m_rootItem; delete m_rootItem;
m_todayItem = 0; m_todayItem = nullptr;
m_rootItem = new HistoryItem(0); m_rootItem = new HistoryItem(nullptr);
init(); init();
@ -335,7 +335,7 @@ void HistoryModel::historyEntryAdded(const HistoryEntry &entry)
if (!m_todayItem) { if (!m_todayItem) {
beginInsertRows(QModelIndex(), 0, 0); beginInsertRows(QModelIndex(), 0, 0);
m_todayItem = new HistoryItem(0); m_todayItem = new HistoryItem(nullptr);
m_todayItem->setStartTimestamp(-1); m_todayItem->setStartTimestamp(-1);
m_todayItem->setEndTimestamp(QDateTime(QDate::currentDate(), QTime(), QTimeZone::systemTimeZone()).toMSecsSinceEpoch()); m_todayItem->setEndTimestamp(QDateTime(QDate::currentDate(), QTime(), QTimeZone::systemTimeZone()).toMSecsSinceEpoch());
m_todayItem->title = tr("Today"); m_todayItem->title = tr("Today");
@ -401,7 +401,7 @@ void HistoryModel::historyEntryEdited(const HistoryEntry &before, const HistoryE
HistoryItem* HistoryModel::findHistoryItem(const HistoryEntry &entry) HistoryItem* HistoryModel::findHistoryItem(const HistoryEntry &entry)
{ {
HistoryItem* parentItem = 0; HistoryItem* parentItem = nullptr;
qint64 timestamp = entry.date.toMSecsSinceEpoch(); qint64 timestamp = entry.date.toMSecsSinceEpoch();
for (int i = 0; i < m_rootItem->childCount(); ++i) { for (int i = 0; i < m_rootItem->childCount(); ++i) {
@ -414,7 +414,7 @@ HistoryItem* HistoryModel::findHistoryItem(const HistoryEntry &entry)
} }
if (!parentItem) { if (!parentItem) {
return 0; return nullptr;
} }
for (int i = 0; i < parentItem->childCount(); ++i) { for (int i = 0; i < parentItem->childCount(); ++i) {
@ -424,7 +424,7 @@ HistoryItem* HistoryModel::findHistoryItem(const HistoryEntry &entry)
} }
} }
return 0; return nullptr;
} }
void HistoryModel::checkEmptyParentItem(HistoryItem* item) void HistoryModel::checkEmptyParentItem(HistoryItem* item)
@ -437,7 +437,7 @@ void HistoryModel::checkEmptyParentItem(HistoryItem* item)
endRemoveRows(); endRemoveRows();
if (item == m_todayItem) { if (item == m_todayItem) {
m_todayItem = 0; m_todayItem = nullptr;
} }
} }
} }

View File

@ -34,13 +34,13 @@
#include <QWindow> #include <QWindow>
LocationCompleterView* LocationCompleter::s_view = 0; LocationCompleterView* LocationCompleter::s_view = nullptr;
LocationCompleterModel* LocationCompleter::s_model = 0; LocationCompleterModel* LocationCompleter::s_model = nullptr;
LocationCompleter::LocationCompleter(QObject* parent) LocationCompleter::LocationCompleter(QObject* parent)
: QObject(parent) : QObject(parent)
, m_window(0) , m_window(nullptr)
, m_locationBar(0) , m_locationBar(nullptr)
, m_lastRefreshTimestamp(0) , m_lastRefreshTimestamp(0)
, m_popupClosed(false) , m_popupClosed(false)
{ {

View File

@ -219,7 +219,7 @@ QSize LocationCompleterDelegate::sizeHint(const QStyleOptionViewItem &option, co
const QWidget* w = opt.widget; const QWidget* w = opt.widget;
const QStyle* style = w ? w->style() : QApplication::style(); const QStyle* style = w ? w->style() : QApplication::style();
const int padding = style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0) + 1; const int padding = style->pixelMetric(QStyle::PM_FocusFrameHMargin, nullptr) + 1;
m_padding = padding > 3 ? padding : 3; m_padding = padding > 3 ? padding : 3;
m_rowHeight = 4 * m_padding + qMax(16, opt.fontMetrics.height()); m_rowHeight = 4 * m_padding + qMax(16, opt.fontMetrics.height());

View File

@ -26,7 +26,7 @@ class FALKON_EXPORT LocationCompleterDelegate : public QStyledItemDelegate
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit LocationCompleterDelegate(QObject *parent = 0); explicit LocationCompleterDelegate(QObject *parent = nullptr);
void paint(QPainter* painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; void paint(QPainter* painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;

View File

@ -46,7 +46,7 @@
LocationBar::LocationBar(QWidget *parent) LocationBar::LocationBar(QWidget *parent)
: LineEdit(parent) : LineEdit(parent)
, m_window(nullptr) , m_window(nullptr)
, m_webView(0) , m_webView(nullptr)
, m_holdingAlt(false) , m_holdingAlt(false)
, m_oldTextLength(0) , m_oldTextLength(0)
, m_currentTextLength(0) , m_currentTextLength(0)

View File

@ -66,10 +66,10 @@ NavigationBar::NavigationBar(BrowserWindow* window)
setObjectName(QSL("navigationbar")); setObjectName(QSL("navigationbar"));
m_layout = new QHBoxLayout(this); m_layout = new QHBoxLayout(this);
auto contentsMargin = style()->pixelMetric(QStyle::PM_ToolBarItemMargin, 0, this) auto contentsMargin = style()->pixelMetric(QStyle::PM_ToolBarItemMargin, nullptr, this)
+ style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, 0, this); + style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, nullptr, this);
m_layout->setContentsMargins(contentsMargin, contentsMargin, contentsMargin, contentsMargin); m_layout->setContentsMargins(contentsMargin, contentsMargin, contentsMargin, contentsMargin);
m_layout->setSpacing(style()->pixelMetric(QStyle::PM_ToolBarItemSpacing, 0, this)); m_layout->setSpacing(style()->pixelMetric(QStyle::PM_ToolBarItemSpacing, nullptr, this));
setLayout(m_layout); setLayout(m_layout);
m_buttonBack = new ToolButton(this); m_buttonBack = new ToolButton(this);

View File

@ -24,7 +24,7 @@
NavigationContainer::NavigationContainer(QWidget* parent) NavigationContainer::NavigationContainer(QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_tabBar(0) , m_tabBar(nullptr)
{ {
m_layout = new QVBoxLayout(this); m_layout = new QVBoxLayout(this);
m_layout->setContentsMargins(0, 0, 0, 0); m_layout->setContentsMargins(0, 0, 0, 0);

View File

@ -32,7 +32,7 @@ SiteIcon::SiteIcon(LocationBar *parent)
: ToolButton(parent) : ToolButton(parent)
, m_window(nullptr) , m_window(nullptr)
, m_locationBar(parent) , m_locationBar(parent)
, m_view(0) , m_view(nullptr)
{ {
setObjectName("locationbar-siteicon"); setObjectName("locationbar-siteicon");
setToolButtonStyle(Qt::ToolButtonIconOnly); setToolButtonStyle(Qt::ToolButtonIconOnly);

View File

@ -22,7 +22,7 @@
#include <QMouseEvent> #include <QMouseEvent>
DesktopNotification::DesktopNotification(bool setPosition) DesktopNotification::DesktopNotification(bool setPosition)
: QWidget(0) : QWidget(nullptr)
, ui(new Ui::DesktopNotification) , ui(new Ui::DesktopNotification)
, m_settingPosition(setPosition) , m_settingPosition(setPosition)
, m_timeout(6000) , m_timeout(6000)

View File

@ -103,9 +103,9 @@ OpenSearchEngine::OpenSearchEngine(QObject* parent)
: QObject(parent) : QObject(parent)
, m_searchMethod(QLatin1String("get")) , m_searchMethod(QLatin1String("get"))
, m_suggestionsMethod(QLatin1String("get")) , m_suggestionsMethod(QLatin1String("get"))
, m_networkAccessManager(0) , m_networkAccessManager(nullptr)
, m_suggestionsReply(0) , m_suggestionsReply(nullptr)
, m_delegate(0) , m_delegate(nullptr)
{ {
m_requestMethods.insert(QLatin1String("get"), QNetworkAccessManager::GetOperation); m_requestMethods.insert(QLatin1String("get"), QNetworkAccessManager::GetOperation);
m_requestMethods.insert(QLatin1String("post"), QNetworkAccessManager::PostOperation); m_requestMethods.insert(QLatin1String("post"), QNetworkAccessManager::PostOperation);
@ -563,7 +563,7 @@ void OpenSearchEngine::requestSuggestions(const QString &searchTerm)
m_suggestionsReply->disconnect(this); m_suggestionsReply->disconnect(this);
m_suggestionsReply->abort(); m_suggestionsReply->abort();
m_suggestionsReply->deleteLater(); m_suggestionsReply->deleteLater();
m_suggestionsReply = 0; m_suggestionsReply = nullptr;
} }
Q_ASSERT(m_requestMethods.contains(m_suggestionsMethod)); Q_ASSERT(m_requestMethods.contains(m_suggestionsMethod));
@ -627,7 +627,7 @@ void OpenSearchEngine::suggestionsObtained()
m_suggestionsReply->close(); m_suggestionsReply->close();
m_suggestionsReply->deleteLater(); m_suggestionsReply->deleteLater();
m_suggestionsReply = 0; m_suggestionsReply = nullptr;
QJsonParseError err; QJsonParseError err;
QJsonDocument json = QJsonDocument::fromJson(response, &err); QJsonDocument json = QJsonDocument::fromJson(response, &err);

View File

@ -398,7 +398,7 @@ void SearchEnginesManager::replyFinished()
if (checkEngine(engine)) { if (checkEngine(engine)) {
addEngine(engine); addEngine(engine);
QMessageBox::information(0, tr("Search Engine Added"), tr("Search Engine \"%1\" has been successfully added.").arg(engine->name())); QMessageBox::information(nullptr, tr("Search Engine Added"), tr("Search Engine \"%1\" has been successfully added.").arg(engine->name()));
} }
} }
@ -406,7 +406,7 @@ bool SearchEnginesManager::checkEngine(OpenSearchEngine* engine)
{ {
if (!engine->isValid()) { if (!engine->isValid()) {
QString errorString = tr("Search Engine is not valid!"); QString errorString = tr("Search Engine is not valid!");
QMessageBox::warning(0, tr("Error"), tr("Error while adding Search Engine <br><b>Error Message: </b> %1").arg(errorString)); QMessageBox::warning(nullptr, tr("Error"), tr("Error while adding Search Engine <br><b>Error Message: </b> %1").arg(errorString));
return false; return false;
} }

View File

@ -29,7 +29,7 @@ class ProtocolHandlerDialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit ProtocolHandlerDialog(QWidget *parent = 0); explicit ProtocolHandlerDialog(QWidget *parent = nullptr);
~ProtocolHandlerDialog(); ~ProtocolHandlerDialog();
private: private:

View File

@ -29,9 +29,9 @@ class FALKON_EXPORT RegisterQAppAssociation : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit RegisterQAppAssociation(QObject* parent = 0); explicit RegisterQAppAssociation(QObject* parent = nullptr);
explicit RegisterQAppAssociation(const QString &appRegisteredName, const QString &appPath, explicit RegisterQAppAssociation(const QString &appRegisteredName, const QString &appPath,
const QString &appIcon = QString(), const QString &appDesc = QString(), QObject* parent = 0); const QString &appIcon = QString(), const QString &appDesc = QString(), QObject* parent = nullptr);
~RegisterQAppAssociation(); ~RegisterQAppAssociation();
enum AssociationType { enum AssociationType {

View File

@ -41,7 +41,7 @@
SiteInfo::SiteInfo(WebView *view) SiteInfo::SiteInfo(WebView *view)
: QDialog(view) : QDialog(view)
, ui(new Ui::SiteInfo) , ui(new Ui::SiteInfo)
, m_certWidget(0) , m_certWidget(nullptr)
, m_view(view) , m_view(view)
, m_imageReply(nullptr) , m_imageReply(nullptr)
, m_baseUrl(view->url()) , m_baseUrl(view->url())

View File

@ -47,7 +47,7 @@ public:
virtual void unload() = 0; virtual void unload() = 0;
virtual bool testPlugin() = 0; virtual bool testPlugin() = 0;
virtual void showSettings(QWidget* parent = 0) { Q_UNUSED(parent) } virtual void showSettings(QWidget* parent = nullptr) { Q_UNUSED(parent) }
virtual void populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTestResult &r) { Q_UNUSED(menu) Q_UNUSED(view) Q_UNUSED(r) } virtual void populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTestResult &r) { Q_UNUSED(menu) Q_UNUSED(view) Q_UNUSED(r) }
virtual void populateExtensionsMenu(QMenu *menu) { Q_UNUSED(menu) } virtual void populateExtensionsMenu(QMenu *menu) { Q_UNUSED(menu) }

View File

@ -283,7 +283,7 @@ void SpeedDial::removeImageForUrl(const QString &url)
QStringList SpeedDial::getOpenFileName() QStringList SpeedDial::getOpenFileName()
{ {
const QString fileTypes = QSL("%3(*.png *.jpg *.jpeg *.bmp *.gif *.svg *.tiff)").arg(tr("Image files")); const QString fileTypes = QSL("%3(*.png *.jpg *.jpeg *.bmp *.gif *.svg *.tiff)").arg(tr("Image files"));
const QString image = QzTools::getOpenFileName(QSL("SpeedDial-GetOpenFileName"), 0, tr("Click to select image..."), QDir::homePath(), fileTypes); const QString image = QzTools::getOpenFileName(QSL("SpeedDial-GetOpenFileName"), nullptr, tr("Click to select image..."), QDir::homePath(), fileTypes);
if (image.isEmpty()) if (image.isEmpty())
return {}; return {};

View File

@ -44,7 +44,7 @@ private:
PopupLocationBar::PopupLocationBar(QWidget* parent) PopupLocationBar::PopupLocationBar(QWidget* parent)
: LineEdit(parent) : LineEdit(parent)
, m_view(0) , m_view(nullptr)
{ {
m_siteIcon = new PopupSiteIcon(this); m_siteIcon = new PopupSiteIcon(this);
m_siteIcon->setIcon(IconProvider::emptyWebIcon()); m_siteIcon->setIcon(IconProvider::emptyWebIcon());

View File

@ -35,7 +35,7 @@
PopupWindow::PopupWindow(PopupWebView* view) PopupWindow::PopupWindow(PopupWebView* view)
: QWidget() : QWidget()
, m_view(view) , m_view(view)
, m_search(0) , m_search(nullptr)
{ {
m_layout = new QVBoxLayout(this); m_layout = new QVBoxLayout(this);
m_layout->setContentsMargins(0, 0, 0, 0); m_layout->setContentsMargins(0, 0, 0, 0);

View File

@ -131,7 +131,7 @@ void AutoFillManager::changePasswordBackend()
// Switch backends // Switch backends
if (!item.isEmpty()) { if (!item.isEmpty()) {
PasswordBackend* backend = 0; PasswordBackend* backend = nullptr;
QHashIterator<QString, PasswordBackend*> i(backends); QHashIterator<QString, PasswordBackend*> i(backends);
while (i.hasNext()) { while (i.hasNext()) {

View File

@ -111,7 +111,7 @@ QSize PluginListDelegate::sizeHint(const QStyleOptionViewItem &option, const QMo
const QWidget* w = opt.widget; const QWidget* w = opt.widget;
const QStyle* style = w ? w->style() : QApplication::style(); const QStyle* style = w ? w->style() : QApplication::style();
const int padding = style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0) + 1; const int padding = style->pixelMetric(QStyle::PM_FocusFrameHMargin, nullptr) + 1;
QFont titleFont = opt.font; QFont titleFont = opt.font;
titleFont.setBold(true); titleFont.setBold(true);

View File

@ -98,8 +98,8 @@ Preferences::Preferences(BrowserWindow* window)
: QDialog(window) : QDialog(window)
, ui(new Ui::Preferences) , ui(new Ui::Preferences)
, m_window(window) , m_window(window)
, m_autoFillManager(0) , m_autoFillManager(nullptr)
, m_pluginsList(0) , m_pluginsList(nullptr)
{ {
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(this); ui->setupUi(this);
@ -225,7 +225,7 @@ Preferences::Preferences(BrowserWindow* window)
connect(ui->instantBookmarksToolbar, &QAbstractButton::toggled, ui->showBookmarksToolbar, &QWidget::setDisabled); connect(ui->instantBookmarksToolbar, &QAbstractButton::toggled, ui->showBookmarksToolbar, &QWidget::setDisabled);
connect(ui->showBookmarksToolbar, &QAbstractButton::toggled, ui->instantBookmarksToolbar, &QWidget::setDisabled); connect(ui->showBookmarksToolbar, &QAbstractButton::toggled, ui->instantBookmarksToolbar, &QWidget::setDisabled);
ui->showNavigationToolbar->setChecked(settings.value(QSL("showNavigationToolbar"), true).toBool()); ui->showNavigationToolbar->setChecked(settings.value(QSL("showNavigationToolbar"), true).toBool());
int currentSettingsPage = settings.value(QSL("settingsDialogPage"), 0).toInt(0); int currentSettingsPage = settings.value(QSL("settingsDialogPage"), 0).toInt(nullptr);
settings.endGroup(); settings.endGroup();
//TABS //TABS

View File

@ -31,7 +31,7 @@ class SessionManagerDialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit SessionManagerDialog(QWidget *parent = 0); explicit SessionManagerDialog(QWidget *parent = nullptr);
~SessionManagerDialog() override; ~SessionManagerDialog() override;
private: private:

View File

@ -44,10 +44,10 @@ private Q_SLOTS:
void bookmarkCtrlActivated(BookmarkItem* item); void bookmarkCtrlActivated(BookmarkItem* item);
void bookmarkShiftActivated(BookmarkItem* item); void bookmarkShiftActivated(BookmarkItem* item);
void openBookmark(BookmarkItem* item = 0); void openBookmark(BookmarkItem* item = nullptr);
void openBookmarkInNewTab(BookmarkItem* item = 0); void openBookmarkInNewTab(BookmarkItem* item = nullptr);
void openBookmarkInNewWindow(BookmarkItem* item = 0); void openBookmarkInNewWindow(BookmarkItem* item = nullptr);
void openBookmarkInNewPrivateWindow(BookmarkItem* item = 0); void openBookmarkInNewPrivateWindow(BookmarkItem* item = nullptr);
void deleteBookmarks(); void deleteBookmarks();
void createContextMenu(const QPoint &pos); void createContextMenu(const QPoint &pos);

View File

@ -29,7 +29,7 @@ class BrowserWindow;
class FALKON_EXPORT SideBarInterface : public QObject class FALKON_EXPORT SideBarInterface : public QObject
{ {
public: public:
explicit SideBarInterface(QObject* parent = 0) : QObject(parent) { } explicit SideBarInterface(QObject* parent = nullptr) : QObject(parent) { }
virtual QString title() const = 0; virtual QString title() const = 0;

View File

@ -45,8 +45,8 @@ public:
ComboTabBar::ComboTabBar(QWidget* parent) ComboTabBar::ComboTabBar(QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_mainTabBar(0) , m_mainTabBar(nullptr)
, m_pinnedTabBar(0) , m_pinnedTabBar(nullptr)
, m_mainBarOverFlowed(false) , m_mainBarOverFlowed(false)
, m_lastAppliedOverflow(false) , m_lastAppliedOverflow(false)
, m_usesScrollButtons(false) , m_usesScrollButtons(false)
@ -755,7 +755,7 @@ QTabBar::ButtonPosition ComboTabBar::iconButtonPosition() const
QTabBar::ButtonPosition ComboTabBar::closeButtonPosition() const QTabBar::ButtonPosition ComboTabBar::closeButtonPosition() const
{ {
return (QTabBar::ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, 0, m_mainTabBar); return (QTabBar::ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, nullptr, m_mainTabBar);
} }
QSize ComboTabBar::iconButtonSize() const QSize ComboTabBar::iconButtonSize() const
@ -768,8 +768,8 @@ QSize ComboTabBar::iconButtonSize() const
QSize ComboTabBar::closeButtonSize() const QSize ComboTabBar::closeButtonSize() const
{ {
int width = style()->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, 0, this); int width = style()->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, nullptr, this);
int height = style()->pixelMetric(QStyle::PM_TabCloseIndicatorHeight, 0, this); int height = style()->pixelMetric(QStyle::PM_TabCloseIndicatorHeight, nullptr, this);
return QSize(width, height); return QSize(width, height);
} }
@ -1000,7 +1000,7 @@ void ComboTabBar::setMinimumWidths()
TabBarHelper::TabBarHelper(bool isPinnedTabBar, ComboTabBar* comboTabBar) TabBarHelper::TabBarHelper(bool isPinnedTabBar, ComboTabBar* comboTabBar)
: QTabBar(comboTabBar) : QTabBar(comboTabBar)
, m_comboTabBar(comboTabBar) , m_comboTabBar(comboTabBar)
, m_scrollArea(0) , m_scrollArea(nullptr)
, m_pressedIndex(-1) , m_pressedIndex(-1)
, m_dragInProgress(false) , m_dragInProgress(false)
, m_activeTabBar(false) , m_activeTabBar(false)
@ -1851,7 +1851,7 @@ void CloseButton::paintEvent(QPaintEvent*)
if (auto* tb = qobject_cast<TabBarHelper*>(parent())) { if (auto* tb = qobject_cast<TabBarHelper*>(parent())) {
int index = tb->currentIndex(); int index = tb->currentIndex();
auto closeSide = (QTabBar::ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, 0, tb); auto closeSide = (QTabBar::ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, nullptr, tb);
if (tb->tabButton(index, closeSide) == this && tb->isActiveTabBar()) { if (tb->tabButton(index, closeSide) == this && tb->isActiveTabBar()) {
opt.state |= QStyle::State_Selected; opt.state |= QStyle::State_Selected;
} }

View File

@ -129,7 +129,7 @@ void TabBar::loadSettings()
settings.beginGroup(QSL("Browser-Tabs-Settings")); settings.beginGroup(QSL("Browser-Tabs-Settings"));
m_hideTabBarWithOneTab = settings.value(QSL("hideTabsWithOneTab"), false).toBool(); m_hideTabBarWithOneTab = settings.value(QSL("hideTabsWithOneTab"), false).toBool();
bool activateLastTab = settings.value(QSL("ActivateLastTabWhenClosingActual"), false).toBool(); bool activateLastTab = settings.value(QSL("ActivateLastTabWhenClosingActual"), false).toBool();
m_showCloseOnInactive = settings.value(QSL("showCloseOnInactiveTabs"), 0).toInt(0); m_showCloseOnInactive = settings.value(QSL("showCloseOnInactiveTabs"), 0).toInt(nullptr);
settings.endGroup(); settings.endGroup();
setSelectionBehaviorOnRemove(activateLastTab ? QTabBar::SelectPreviousTab : QTabBar::SelectRightTab); setSelectionBehaviorOnRemove(activateLastTab ? QTabBar::SelectPreviousTab : QTabBar::SelectRightTab);
@ -367,7 +367,7 @@ void TabBar::hideCloseButton(int index)
return; return;
} }
setTabButton(index, closeButtonPosition(), 0); setTabButton(index, closeButtonPosition(), nullptr);
button->deleteLater(); button->deleteLater();
} }

View File

@ -28,7 +28,7 @@
TabIcon::TabIcon(QWidget* parent) TabIcon::TabIcon(QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_tab(0) , m_tab(nullptr)
, m_currentFrame(0) , m_currentFrame(0)
, m_animationRunning(false) , m_animationRunning(false)
, m_audioIconDisplayed(false) , m_audioIconDisplayed(false)

View File

@ -31,8 +31,8 @@
TabStackedWidget::TabStackedWidget(QWidget* parent) TabStackedWidget::TabStackedWidget(QWidget* parent)
: QWidget(parent) : QWidget(parent)
, m_stack(0) , m_stack(nullptr)
, m_tabBar(0) , m_tabBar(nullptr)
, m_currentIndex(-1) , m_currentIndex(-1)
, m_previousIndex(-1) , m_previousIndex(-1)
{ {
@ -265,7 +265,7 @@ int TabStackedWidget::pinUnPinTab(int index, const QString &title)
QString toolTip = tabToolTip(index); QString toolTip = tabToolTip(index);
m_tabBar->m_blockCurrentChangedSignal = true; m_tabBar->m_blockCurrentChangedSignal = true;
m_tabBar->setTabButton(index, m_tabBar->iconButtonPosition(), 0); m_tabBar->setTabButton(index, m_tabBar->iconButtonPosition(), nullptr);
m_stack->removeWidget(widget); m_stack->removeWidget(widget);
int newIndex = insertTab(makePinned ? 0 : m_tabBar->pinnedTabsCount(), widget, title, makePinned); int newIndex = insertTab(makePinned ? 0 : m_tabBar->pinnedTabsCount(), widget, title, makePinned);

View File

@ -124,7 +124,7 @@ public Q_SLOTS:
void detachTab(int index); void detachTab(int index);
void loadTab(int index); void loadTab(int index);
void unloadTab(int index); void unloadTab(int index);
void restoreClosedTab(QObject* obj = 0); void restoreClosedTab(QObject* obj = nullptr);
void restoreAllClosedTabs(); void restoreAllClosedTabs();
void clearClosedTabsList(); void clearClosedTabsList();

View File

@ -71,7 +71,7 @@ bool AesInterface::init(int evpMode, const QByteArray &password, const QByteArra
// Gen "key" for AES 256 CBC mode. A SHA1 digest is used to hash the supplied // Gen "key" for AES 256 CBC mode. A SHA1 digest is used to hash the supplied
// key material. nrounds is the number of times that we hash the material. // key material. nrounds is the number of times that we hash the material.
// More rounds are more secure but slower. // More rounds are more secure but slower.
i = EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha256(), 0, (uchar*)password.data(), password.size(), nrounds, key, 0); i = EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha256(), nullptr, (uchar*)password.data(), password.size(), nrounds, key, nullptr);
if (i != 32) { if (i != 32) {
qWarning("Key size is %d bits - should be 256 bits", i * 8); qWarning("Key size is %d bits - should be 256 bits", i * 8);
@ -143,7 +143,7 @@ QByteArray AesInterface::decrypt(const QByteArray &cipherData, const QByteArray
} }
if (cipherSections.at(0).toInt() > AesInterface::VERSION) { if (cipherSections.at(0).toInt() > AesInterface::VERSION) {
QMessageBox::information(0, tr("Warning!"), tr("Data has been encrypted with a newer version of Falkon." QMessageBox::information(nullptr, tr("Warning!"), tr("Data has been encrypted with a newer version of Falkon."
"\nPlease install latest version of Falkon.")); "\nPlease install latest version of Falkon."));
return {}; return {};
} }

View File

@ -28,7 +28,7 @@
HTML5PermissionsNotification::HTML5PermissionsNotification(const QUrl &origin, QWebEnginePage* page, const QWebEnginePage::Feature &feature) HTML5PermissionsNotification::HTML5PermissionsNotification(const QUrl &origin, QWebEnginePage* page, const QWebEnginePage::Feature &feature)
: AnimatedWidget(AnimatedWidget::Down, 300, 0) : AnimatedWidget(AnimatedWidget::Down, 300, nullptr)
, ui(new Ui::HTML5PermissionsNotification) , ui(new Ui::HTML5PermissionsNotification)
, m_origin(origin) , m_origin(origin)
, m_page(page) , m_page(page)

View File

@ -102,7 +102,7 @@ QSize ListItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QMode
const QWidget* w = opt.widget; const QWidget* w = opt.widget;
const QStyle* style = w ? w->style() : QApplication::style(); const QStyle* style = w ? w->style() : QApplication::style();
const int padding = style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0) + 1; const int padding = style->pixelMetric(QStyle::PM_FocusFrameHMargin, nullptr) + 1;
m_padding = padding > 5 ? padding : 5; m_padding = padding > 5 ? padding : 5;
@ -111,7 +111,7 @@ QSize ListItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QMode
// Update height of parent widget // Update height of parent widget
QWidget* p = qobject_cast<QWidget*>(parent()); QWidget* p = qobject_cast<QWidget*>(parent());
if (p && m_updateParentHeight) { if (p && m_updateParentHeight) {
int frameWidth = p->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, p); int frameWidth = p->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, nullptr, p);
p->setFixedHeight(m_itemHeight + 2 * frameWidth); p->setFixedHeight(m_itemHeight + 2 * frameWidth);
} }
} }

View File

@ -851,7 +851,7 @@ bool QzTools::startExternalProcess(const QString &executable, const QString &arg
info = info.arg(QObject::tr("Executable: "), executable, info = info.arg(QObject::tr("Executable: "), executable,
QObject::tr("Arguments: "), arguments.join(QLatin1Char(' '))); QObject::tr("Arguments: "), arguments.join(QLatin1Char(' ')));
QMessageBox::critical(0, QObject::tr("Cannot start external program"), QMessageBox::critical(nullptr, QObject::tr("Cannot start external program"),
QObject::tr("Cannot start external program! %1").arg(info)); QObject::tr("Cannot start external program! %1").arg(info));
} }
@ -863,7 +863,7 @@ static xcb_connection_t *getXcbConnection()
{ {
const QNativeInterface::QX11Application *x11App = qApp->nativeInterface<QNativeInterface::QX11Application>(); const QNativeInterface::QX11Application *x11App = qApp->nativeInterface<QNativeInterface::QX11Application>();
if (x11App == nullptr) if (x11App == nullptr)
return 0; return nullptr;
return x11App->connection(); return x11App->connection();
} }
#endif #endif
@ -875,7 +875,7 @@ void QzTools::setWmClass(const QString &name, const QWidget* widget)
return; return;
xcb_connection_t *connection = getXcbConnection(); xcb_connection_t *connection = getXcbConnection();
if (connection == 0) if (connection == nullptr)
return; return;
const QByteArray nameData = name.toUtf8(); const QByteArray nameData = name.toUtf8();

View File

@ -26,7 +26,7 @@
ToolButton::ToolButton(QWidget* parent) ToolButton::ToolButton(QWidget* parent)
: QToolButton(parent) : QToolButton(parent)
, m_menu(0) , m_menu(nullptr)
{ {
setMinimumWidth(16); setMinimumWidth(16);

View File

@ -94,7 +94,7 @@ QList<QTreeWidgetItem*> TreeWidget::allItems()
{ {
if (m_refreshAllItemsNeeded) { if (m_refreshAllItemsNeeded) {
m_allTreeItems.clear(); m_allTreeItems.clear();
iterateAllItems(0); iterateAllItems(nullptr);
m_refreshAllItemsNeeded = false; m_refreshAllItemsNeeded = false;
} }

View File

@ -72,8 +72,8 @@ static const bool kEnableJsNonBlockDialogs = qEnvironmentVariableIsSet("FALKON_E
WebPage::WebPage(QObject* parent) WebPage::WebPage(QObject* parent)
: QWebEnginePage(mApp->webProfile(), parent) : QWebEnginePage(mApp->webProfile(), parent)
, m_fileWatcher(0) , m_fileWatcher(nullptr)
, m_runningLoop(0) , m_runningLoop(nullptr)
, m_loadProgress(100) , m_loadProgress(100)
, m_blockAlerts(false) , m_blockAlerts(false)
, m_secureStatus(false) , m_secureStatus(false)
@ -132,7 +132,7 @@ WebPage::~WebPage()
if (m_runningLoop) { if (m_runningLoop) {
m_runningLoop->exit(1); m_runningLoop->exit(1);
m_runningLoop = 0; m_runningLoop = nullptr;
} }
} }
@ -555,7 +555,7 @@ bool WebPage::javaScriptPrompt(const QUrl &securityOrigin, const QString &msg, c
if (eLoop.exec() == 1) { if (eLoop.exec() == 1) {
return result; return result;
} }
m_runningLoop = 0; m_runningLoop = nullptr;
QString x = ui->lineEdit->text(); QString x = ui->lineEdit->text();
bool _result = ui->buttonBox->buttonRole(clicked) == QDialogButtonBox::AcceptRole; bool _result = ui->buttonBox->buttonRole(clicked) == QDialogButtonBox::AcceptRole;
@ -601,7 +601,7 @@ bool WebPage::javaScriptConfirm(const QUrl &securityOrigin, const QString &msg)
if (eLoop.exec() == 1) { if (eLoop.exec() == 1) {
return false; return false;
} }
m_runningLoop = 0; m_runningLoop = nullptr;
bool result = ui->buttonBox->buttonRole(clicked) == QDialogButtonBox::AcceptRole; bool result = ui->buttonBox->buttonRole(clicked) == QDialogButtonBox::AcceptRole;
@ -656,7 +656,7 @@ void WebPage::javaScriptAlert(const QUrl &securityOrigin, const QString &msg)
if (eLoop.exec() == 1) { if (eLoop.exec() == 1) {
return; return;
} }
m_runningLoop = 0; m_runningLoop = nullptr;
m_blockAlerts = ui->preventAlerts->isChecked(); m_blockAlerts = ui->preventAlerts->isChecked();

View File

@ -31,7 +31,7 @@ class WebScrollBarManager : public QObject
Q_OBJECT Q_OBJECT
public: public:
explicit WebScrollBarManager(QObject *parent = 0); explicit WebScrollBarManager(QObject *parent = nullptr);
void loadSettings(); void loadSettings();

View File

@ -58,7 +58,7 @@ WebView::WebView(QWidget* parent)
: QWebEngineView(parent) : QWebEngineView(parent)
, m_progress(100) , m_progress(100)
, m_backgroundActivity(false) , m_backgroundActivity(false)
, m_page(0) , m_page(nullptr)
, m_firstLoad(false) , m_firstLoad(false)
{ {
connect(this, &QWebEngineView::loadStarted, this, &WebView::slotLoadStarted); connect(this, &QWebEngineView::loadStarted, this, &WebView::slotLoadStarted);

View File

@ -37,7 +37,7 @@
TabbedWebView::TabbedWebView(WebTab* webTab) TabbedWebView::TabbedWebView(WebTab* webTab)
: WebView(webTab) : WebView(webTab)
, m_window(0) , m_window(nullptr)
, m_webTab(webTab) , m_webTab(webTab)
, m_menu(new Menu(this)) , m_menu(new Menu(this))
{ {

View File

@ -81,7 +81,7 @@ void ScrollIndicator::paintEvent(QPaintEvent *event)
AutoScroller::AutoScroller(const QString &settingsFile, QObject* parent) AutoScroller::AutoScroller(const QString &settingsFile, QObject* parent)
: QObject(parent) : QObject(parent)
, m_view(0) , m_view(nullptr)
, m_settingsFile(settingsFile) , m_settingsFile(settingsFile)
{ {
m_indicator = new ScrollIndicator; m_indicator = new ScrollIndicator;
@ -272,7 +272,7 @@ void AutoScroller::stopScrolling()
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
m_indicator->hide(); m_indicator->hide();
m_indicator->setParent(0); m_indicator->setParent(nullptr);
m_frameScroller->stopScrolling(); m_frameScroller->stopScrolling();
} }

View File

@ -46,7 +46,7 @@ class AutoScroller : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit AutoScroller(const QString &settingsFile, QObject* parent = 0); explicit AutoScroller(const QString &settingsFile, QObject* parent = nullptr);
~AutoScroller() override; ~AutoScroller() override;
bool mouseMove(QObject* obj, QMouseEvent* event); bool mouseMove(QObject* obj, QMouseEvent* event);

View File

@ -25,7 +25,7 @@
AutoScrollPlugin::AutoScrollPlugin() AutoScrollPlugin::AutoScrollPlugin()
: QObject() : QObject()
, m_scroller(0) , m_scroller(nullptr)
{ {
} }

View File

@ -32,7 +32,7 @@ class AutoScrollSettings : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit AutoScrollSettings(AutoScroller* scroller, QWidget* parent = 0); explicit AutoScrollSettings(AutoScroller* scroller, QWidget* parent = nullptr);
~AutoScrollSettings(); ~AutoScrollSettings();
private Q_SLOTS: private Q_SLOTS:

View File

@ -23,7 +23,7 @@
FrameScroller::FrameScroller(QObject* parent) FrameScroller::FrameScroller(QObject* parent)
: QObject(parent) : QObject(parent)
, m_page(0) , m_page(nullptr)
, m_lengthX(0) , m_lengthX(0)
, m_lengthY(0) , m_lengthY(0)
, m_divider(8.0) , m_divider(8.0)

View File

@ -29,7 +29,7 @@ class FrameScroller : public QObject
Q_OBJECT Q_OBJECT
public: public:
explicit FrameScroller(QObject* parent = 0); explicit FrameScroller(QObject* parent = nullptr);
void setPage(WebPage *page); void setPage(WebPage *page);

View File

@ -39,7 +39,7 @@ class FCM_Dialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit FCM_Dialog(FCM_Plugin* manager, QWidget* parent = 0); explicit FCM_Dialog(FCM_Plugin* manager, QWidget* parent = nullptr);
~FCM_Dialog() override; ~FCM_Dialog() override;
void refreshView(bool forceReload = false); void refreshView(bool forceReload = false);

View File

@ -21,7 +21,7 @@
#include "fcm_plugin.h" #include "fcm_plugin.h"
FCM_Notification::FCM_Notification(FCM_Plugin* manager, int newOriginsCount) FCM_Notification::FCM_Notification(FCM_Plugin* manager, int newOriginsCount)
: AnimatedWidget(AnimatedWidget::Down, 300, 0) : AnimatedWidget(AnimatedWidget::Down, 300, nullptr)
, ui(new Ui::FCM_Notification) , ui(new Ui::FCM_Notification)
, m_manager(manager) , m_manager(manager)
{ {

View File

@ -322,7 +322,7 @@ void FCM_Plugin::mainWindowDeleted(BrowserWindow *window)
} }
if (m_fcmDialog && m_fcmDialog->parent() == window) { if (m_fcmDialog && m_fcmDialog->parent() == window) {
m_fcmDialog->setParent(0); m_fcmDialog->setParent(nullptr);
} }
window->statusBar()->removeButton(m_statusBarIcons.value(window)); window->statusBar()->removeButton(m_statusBarIcons.value(window));

View File

@ -26,7 +26,7 @@
GnomeKeyringPlugin::GnomeKeyringPlugin() GnomeKeyringPlugin::GnomeKeyringPlugin()
: QObject() : QObject()
, m_backend(0) , m_backend(nullptr)
{ {
} }

View File

@ -24,7 +24,7 @@
GM_JSObject::GM_JSObject(QObject* parent) GM_JSObject::GM_JSObject(QObject* parent)
: QObject(parent) : QObject(parent)
, m_settings(0) , m_settings(nullptr)
{ {
} }

View File

@ -27,7 +27,7 @@ class GM_JSObject : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit GM_JSObject(QObject* parent = 0); explicit GM_JSObject(QObject* parent = nullptr);
~GM_JSObject(); ~GM_JSObject();
void setSettingsFile(const QString &name); void setSettingsFile(const QString &name);

View File

@ -36,7 +36,7 @@ class GM_Manager : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit GM_Manager(const QString &sPath, QObject* parent = 0); explicit GM_Manager(const QString &sPath, QObject* parent = nullptr);
~GM_Manager(); ~GM_Manager();
void showSettings(QWidget* parent); void showSettings(QWidget* parent);

View File

@ -25,7 +25,7 @@
#include <QFile> #include <QFile>
GM_Notification::GM_Notification(GM_Manager* manager, const QString &tmpfileName, const QString &fileName) GM_Notification::GM_Notification(GM_Manager* manager, const QString &tmpfileName, const QString &fileName)
: AnimatedWidget(AnimatedWidget::Down, 300, 0) : AnimatedWidget(AnimatedWidget::Down, 300, nullptr)
, ui(new Ui::GM_Notification) , ui(new Ui::GM_Notification)
, m_manager(manager) , m_manager(manager)
, m_tmpFileName(tmpfileName) , m_tmpFileName(tmpfileName)
@ -47,7 +47,7 @@ void GM_Notification::installScript()
{ {
bool success = false; bool success = false;
GM_Script* script = 0; GM_Script* script = nullptr;
QString message = tr("Cannot install script"); QString message = tr("Cannot install script");
if (QFile::copy(m_tmpFileName, m_fileName)) { if (QFile::copy(m_tmpFileName, m_fileName)) {

View File

@ -29,7 +29,7 @@
GM_Plugin::GM_Plugin() GM_Plugin::GM_Plugin()
: QObject() : QObject()
, m_manager(0) , m_manager(nullptr)
{ {
} }

View File

@ -34,7 +34,7 @@ public:
void init(InitState state, const QString &settingsPath) override; void init(InitState state, const QString &settingsPath) override;
void unload() override; void unload() override;
bool testPlugin() override; bool testPlugin() override;
void showSettings(QWidget* parent = 0) override; void showSettings(QWidget* parent = nullptr) override;
bool acceptNavigationRequest(WebPage *page, const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame) override; bool acceptNavigationRequest(WebPage *page, const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame) override;

View File

@ -195,7 +195,7 @@ void GM_Settings::loadScripts()
GM_Script* GM_Settings::getScript(QListWidgetItem* item) GM_Script* GM_Settings::getScript(QListWidgetItem* item)
{ {
if (!item) { if (!item) {
return 0; return nullptr;
} }
GM_Script* script = static_cast<GM_Script*>(item->data(Qt::UserRole + 10).value<void*>()); GM_Script* script = static_cast<GM_Script*>(item->data(Qt::UserRole + 10).value<void*>());

View File

@ -35,7 +35,7 @@ class GM_Settings : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit GM_Settings(GM_Manager* manager, QWidget* parent = 0); explicit GM_Settings(GM_Manager* manager, QWidget* parent = nullptr);
~GM_Settings(); ~GM_Settings();
private Q_SLOTS: private Q_SLOTS:

View File

@ -157,7 +157,7 @@ QSize GM_SettingsListDelegate::sizeHint(const QStyleOptionViewItem &option, cons
const QWidget* w = opt.widget; const QWidget* w = opt.widget;
const QStyle* style = w ? w->style() : QApplication::style(); const QStyle* style = w ? w->style() : QApplication::style();
const int padding = style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0) + 1; const int padding = style->pixelMetric(QStyle::PM_FocusFrameHMargin, nullptr) + 1;
QFont titleFont = opt.font; QFont titleFont = opt.font;
titleFont.setBold(true); titleFont.setBold(true);

View File

@ -23,7 +23,7 @@
class GM_SettingsListDelegate : public QStyledItemDelegate class GM_SettingsListDelegate : public QStyledItemDelegate
{ {
public: public:
explicit GM_SettingsListDelegate(QObject* parent = 0); explicit GM_SettingsListDelegate(QObject* parent = nullptr);
int padding() const; int padding() const;

View File

@ -26,7 +26,7 @@ class GM_SettingsListWidget : public QListWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit GM_SettingsListWidget(QWidget* parent = 0); explicit GM_SettingsListWidget(QWidget* parent = nullptr);
Q_SIGNALS: Q_SIGNALS:
void removeItemRequested(QListWidgetItem* item); void removeItemRequested(QListWidgetItem* item);

View File

@ -32,7 +32,7 @@ class GM_SettingsScriptInfo : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit GM_SettingsScriptInfo(GM_Script* script, QWidget* parent = 0); explicit GM_SettingsScriptInfo(GM_Script* script, QWidget* parent = nullptr);
~GM_SettingsScriptInfo(); ~GM_SettingsScriptInfo();
private Q_SLOTS: private Q_SLOTS:

View File

@ -48,7 +48,7 @@ static QMap<QString, QString> encodeEntry(const PasswordEntry &entry)
KWalletPasswordBackend::KWalletPasswordBackend() KWalletPasswordBackend::KWalletPasswordBackend()
: PasswordBackend() : PasswordBackend()
, m_wallet(0) , m_wallet(nullptr)
{ {
} }

View File

@ -92,7 +92,7 @@ class QjtMouseGesture : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
QjtMouseGesture(const DirectionList &directions, QObject* parent = 0); QjtMouseGesture(const DirectionList &directions, QObject* parent = nullptr);
~QjtMouseGesture(); ~QjtMouseGesture();
const DirectionList directions() const; const DirectionList directions() const;

View File

@ -62,7 +62,7 @@ public:
* Notice that this all events for this button are * Notice that this all events for this button are
* swallowed by the filter. * swallowed by the filter.
*/ */
QjtMouseGestureFilter(bool allowDiagonals = false, Qt::MouseButton gestureButton = Qt::RightButton, int minimumMovement = 5, double minimumMatch = 0.9, QObject* parent = 0); QjtMouseGestureFilter(bool allowDiagonals = false, Qt::MouseButton gestureButton = Qt::RightButton, int minimumMovement = 5, double minimumMatch = 0.9, QObject* parent = nullptr);
~QjtMouseGestureFilter() override; ~QjtMouseGestureFilter() override;
/* /*
@ -77,9 +77,9 @@ public:
*/ */
void clearGestures(bool deleteGestures = false); void clearGestures(bool deleteGestures = false);
bool mouseButtonPressEvent(QMouseEvent* event, QObject* obj = 0); bool mouseButtonPressEvent(QMouseEvent* event, QObject* obj = nullptr);
bool mouseButtonReleaseEvent(QMouseEvent* event, QObject* obj = 0); bool mouseButtonReleaseEvent(QMouseEvent* event, QObject* obj = nullptr);
bool mouseMoveEvent(QMouseEvent* event, QObject* obj = 0); bool mouseMoveEvent(QMouseEvent* event, QObject* obj = nullptr);
protected: protected:
bool eventFilter(QObject* obj, QEvent* event) override; bool eventFilter(QObject* obj, QEvent* event) override;

View File

@ -51,7 +51,7 @@ public:
typedef const T* const_iterator; typedef const T* const_iterator;
RingBuffer() { RingBuffer() {
array = 0; array = nullptr;
size = 0; size = 0;
read = 0; read = 0;
write = 0; write = 0;

View File

@ -33,7 +33,7 @@
MouseGestures::MouseGestures(const QString &settingsPath, QObject* parent) MouseGestures::MouseGestures(const QString &settingsPath, QObject* parent)
: QObject(parent) : QObject(parent)
, m_filter(0) , m_filter(nullptr)
, m_settingsFile(settingsPath + QL1S("/extensions.ini")) , m_settingsFile(settingsPath + QL1S("/extensions.ini"))
, m_button(Qt::MiddleButton) , m_button(Qt::MiddleButton)
{ {

View File

@ -31,7 +31,7 @@ class MouseGestures : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit MouseGestures(const QString &settingsPath, QObject* parent = 0); explicit MouseGestures(const QString &settingsPath, QObject* parent = nullptr);
~MouseGestures(); ~MouseGestures();
bool mousePress(QObject* obj, QMouseEvent* event); bool mousePress(QObject* obj, QMouseEvent* event);

View File

@ -33,7 +33,7 @@ class MouseGesturesSettingsDialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit MouseGesturesSettingsDialog(MouseGestures* gestures, QWidget* parent = 0); explicit MouseGesturesSettingsDialog(MouseGestures* gestures, QWidget* parent = nullptr);
~MouseGesturesSettingsDialog(); ~MouseGesturesSettingsDialog();
private Q_SLOTS: private Q_SLOTS:

View File

@ -35,7 +35,7 @@ class PIM_Handler : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit PIM_Handler(const QString &sPath, QObject* parent = 0); explicit PIM_Handler(const QString &sPath, QObject* parent = nullptr);
void populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTestResult &hitTest); void populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTestResult &hitTest);
bool keyPress(WebView* view, QKeyEvent* event); bool keyPress(WebView* view, QKeyEvent* event);
@ -44,7 +44,7 @@ public:
public Q_SLOTS: public Q_SLOTS:
void webPageCreated(WebPage* page); void webPageCreated(WebPage* page);
void showSettings(QWidget* parent = 0); void showSettings(QWidget* parent = nullptr);
private Q_SLOTS: private Q_SLOTS:
void loadSettings(); void loadSettings();

View File

@ -27,7 +27,7 @@
PIM_Plugin::PIM_Plugin() PIM_Plugin::PIM_Plugin()
: QObject() : QObject()
, m_handler(0) , m_handler(nullptr)
{ {
} }

View File

@ -33,7 +33,7 @@ class PIM_Settings : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit PIM_Settings(const QString &settingsFile, QWidget* parent = 0); explicit PIM_Settings(const QString &settingsFile, QWidget* parent = nullptr);
~PIM_Settings(); ~PIM_Settings();
private Q_SLOTS: private Q_SLOTS:

Some files were not shown because too many files have changed in this diff Show More