1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 01:32:11 +02: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)
: QLineEdit(parent)
, m_leftLayout(0)
, m_rightLayout(0)
, m_leftLayout(nullptr)
, m_rightLayout(nullptr)
, m_minHeight(0)
, m_leftMargin(-1)
, m_ignoreMousePress(false)
@ -219,7 +219,7 @@ QMenu* LineEdit::createContextMenu()
QMenu* tmp = createStandardContextMenu();
tmp->setParent(popup);
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")) {
popup->addAction(lastAction);

View File

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

View File

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

View File

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

View File

@ -73,7 +73,7 @@ const AdBlockRule* AdBlockSearchTree::find(const QWebEngineUrlRequestInfo &reque
int len = urlString.size();
if (len <= 0) {
return 0;
return nullptr;
}
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
{
if (len <= 0) {
return 0;
return nullptr;
}
QChar c = string[0];

View File

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

View File

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

View File

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

View File

@ -1565,7 +1565,7 @@ static xcb_connection_t *getXcbConnection()
{
const QNativeInterface::QX11Application *x11App = qApp->nativeInterface<QNativeInterface::QX11Application>();
if (x11App == nullptr)
return 0;
return nullptr;
return x11App->connection();
}
@ -1575,18 +1575,18 @@ int BrowserWindow::getCurrentVirtualDesktop() const
return 0;
xcb_connection_t *connection = getXcbConnection();
if (connection == 0)
if (connection == nullptr)
return 0;
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_get_property_cookie_t cookie;
xcb_get_property_reply_t *reply = 0;
xcb_get_property_reply_t *reply = nullptr;
uint32_t value;
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)
goto error;
@ -1594,7 +1594,7 @@ int BrowserWindow::getCurrentVirtualDesktop() const
atom = atom_reply->atom;
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)
goto error;
@ -1621,15 +1621,15 @@ void BrowserWindow::moveToVirtualDesktop(int desktopId)
return;
xcb_connection_t *connection = getXcbConnection();
if (connection == 0)
if (connection == nullptr)
return;
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;
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)
goto error;

View File

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

View File

@ -448,7 +448,7 @@ BrowserWindow* MainApplication::getWindow() const
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)
@ -516,7 +516,7 @@ void MainApplication::destroyRestoreManager()
}
delete m_restoreManager;
m_restoreManager = 0;
m_restoreManager = nullptr;
}
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 "
"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:
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;
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override;

View File

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

View File

@ -21,7 +21,7 @@
#include "iconprovider.h"
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)
, m_url(url)
, m_formData(formData)

View File

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

View File

@ -29,8 +29,8 @@
BookmarksIcon::BookmarksIcon(QWidget* parent)
: ClickableLabel(parent)
, m_view(0)
, m_bookmark(0)
, m_view(nullptr)
, m_bookmark(nullptr)
{
setObjectName("locationbar-bookmarkicon");
setCursor(Qt::PointingHandCursor);
@ -60,7 +60,7 @@ void BookmarksIcon::checkBookmark(const QUrl &url, bool forceCheck)
}
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()) {
setBookmarkSaved();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -78,7 +78,7 @@ void BookmarksTreeView::setViewType(BookmarksTreeView::ViewType type)
BookmarkItem* BookmarksTreeView::selectedBookmark() const
{
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

View File

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

View File

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

View File

@ -73,7 +73,7 @@ void HistoryMenu::showHistoryManager()
void HistoryMenu::aboutToShow()
{
// 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) {
actions().at(0)->setEnabled(view->history()->canGoBack());

View File

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

View File

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

View File

@ -219,7 +219,7 @@ QSize LocationCompleterDelegate::sizeHint(const QStyleOptionViewItem &option, co
const QWidget* w = opt.widget;
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_rowHeight = 4 * m_padding + qMax(16, opt.fontMetrics.height());

View File

@ -26,7 +26,7 @@ class FALKON_EXPORT LocationCompleterDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
explicit LocationCompleterDelegate(QObject *parent = 0);
explicit LocationCompleterDelegate(QObject *parent = nullptr);
void paint(QPainter* painter, 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)
: LineEdit(parent)
, m_window(nullptr)
, m_webView(0)
, m_webView(nullptr)
, m_holdingAlt(false)
, m_oldTextLength(0)
, m_currentTextLength(0)

View File

@ -66,10 +66,10 @@ NavigationBar::NavigationBar(BrowserWindow* window)
setObjectName(QSL("navigationbar"));
m_layout = new QHBoxLayout(this);
auto contentsMargin = style()->pixelMetric(QStyle::PM_ToolBarItemMargin, 0, this)
+ style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, 0, this);
auto contentsMargin = style()->pixelMetric(QStyle::PM_ToolBarItemMargin, nullptr, this)
+ style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, nullptr, this);
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);
m_buttonBack = new ToolButton(this);

View File

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

View File

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

View File

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

View File

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

View File

@ -398,7 +398,7 @@ void SearchEnginesManager::replyFinished()
if (checkEngine(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()) {
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;
}

View File

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

View File

@ -29,9 +29,9 @@ class FALKON_EXPORT RegisterQAppAssociation : public QObject
{
Q_OBJECT
public:
explicit RegisterQAppAssociation(QObject* parent = 0);
explicit RegisterQAppAssociation(QObject* parent = nullptr);
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();
enum AssociationType {

View File

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

View File

@ -47,7 +47,7 @@ public:
virtual void unload() = 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 populateExtensionsMenu(QMenu *menu) { Q_UNUSED(menu) }

View File

@ -283,7 +283,7 @@ void SpeedDial::removeImageForUrl(const QString &url)
QStringList SpeedDial::getOpenFileName()
{
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())
return {};

View File

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

View File

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

View File

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

View File

@ -111,7 +111,7 @@ QSize PluginListDelegate::sizeHint(const QStyleOptionViewItem &option, const QMo
const QWidget* w = opt.widget;
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;
titleFont.setBold(true);

View File

@ -98,8 +98,8 @@ Preferences::Preferences(BrowserWindow* window)
: QDialog(window)
, ui(new Ui::Preferences)
, m_window(window)
, m_autoFillManager(0)
, m_pluginsList(0)
, m_autoFillManager(nullptr)
, m_pluginsList(nullptr)
{
setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(this);
@ -225,7 +225,7 @@ Preferences::Preferences(BrowserWindow* window)
connect(ui->instantBookmarksToolbar, &QAbstractButton::toggled, ui->showBookmarksToolbar, &QWidget::setDisabled);
connect(ui->showBookmarksToolbar, &QAbstractButton::toggled, ui->instantBookmarksToolbar, &QWidget::setDisabled);
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();
//TABS

View File

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

View File

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

View File

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

View File

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

View File

@ -129,7 +129,7 @@ void TabBar::loadSettings()
settings.beginGroup(QSL("Browser-Tabs-Settings"));
m_hideTabBarWithOneTab = settings.value(QSL("hideTabsWithOneTab"), 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();
setSelectionBehaviorOnRemove(activateLastTab ? QTabBar::SelectPreviousTab : QTabBar::SelectRightTab);
@ -367,7 +367,7 @@ void TabBar::hideCloseButton(int index)
return;
}
setTabButton(index, closeButtonPosition(), 0);
setTabButton(index, closeButtonPosition(), nullptr);
button->deleteLater();
}

View File

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

View File

@ -31,8 +31,8 @@
TabStackedWidget::TabStackedWidget(QWidget* parent)
: QWidget(parent)
, m_stack(0)
, m_tabBar(0)
, m_stack(nullptr)
, m_tabBar(nullptr)
, m_currentIndex(-1)
, m_previousIndex(-1)
{
@ -265,7 +265,7 @@ int TabStackedWidget::pinUnPinTab(int index, const QString &title)
QString toolTip = tabToolTip(index);
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);
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 loadTab(int index);
void unloadTab(int index);
void restoreClosedTab(QObject* obj = 0);
void restoreClosedTab(QObject* obj = nullptr);
void restoreAllClosedTabs();
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
// key material. nrounds is the number of times that we hash the material.
// 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) {
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) {
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."));
return {};
}

View File

@ -28,7 +28,7 @@
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)
, m_origin(origin)
, m_page(page)

View File

@ -102,7 +102,7 @@ QSize ListItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QMode
const QWidget* w = opt.widget;
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;
@ -111,7 +111,7 @@ QSize ListItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QMode
// Update height of parent widget
QWidget* p = qobject_cast<QWidget*>(parent());
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);
}
}

View File

@ -851,7 +851,7 @@ bool QzTools::startExternalProcess(const QString &executable, const QString &arg
info = info.arg(QObject::tr("Executable: "), executable,
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));
}
@ -863,7 +863,7 @@ static xcb_connection_t *getXcbConnection()
{
const QNativeInterface::QX11Application *x11App = qApp->nativeInterface<QNativeInterface::QX11Application>();
if (x11App == nullptr)
return 0;
return nullptr;
return x11App->connection();
}
#endif
@ -875,7 +875,7 @@ void QzTools::setWmClass(const QString &name, const QWidget* widget)
return;
xcb_connection_t *connection = getXcbConnection();
if (connection == 0)
if (connection == nullptr)
return;
const QByteArray nameData = name.toUtf8();

View File

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

View File

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

View File

@ -72,8 +72,8 @@ static const bool kEnableJsNonBlockDialogs = qEnvironmentVariableIsSet("FALKON_E
WebPage::WebPage(QObject* parent)
: QWebEnginePage(mApp->webProfile(), parent)
, m_fileWatcher(0)
, m_runningLoop(0)
, m_fileWatcher(nullptr)
, m_runningLoop(nullptr)
, m_loadProgress(100)
, m_blockAlerts(false)
, m_secureStatus(false)
@ -132,7 +132,7 @@ WebPage::~WebPage()
if (m_runningLoop) {
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) {
return result;
}
m_runningLoop = 0;
m_runningLoop = nullptr;
QString x = ui->lineEdit->text();
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) {
return false;
}
m_runningLoop = 0;
m_runningLoop = nullptr;
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) {
return;
}
m_runningLoop = 0;
m_runningLoop = nullptr;
m_blockAlerts = ui->preventAlerts->isChecked();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -25,7 +25,7 @@
#include <QFile>
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)
, m_manager(manager)
, m_tmpFileName(tmpfileName)
@ -47,7 +47,7 @@ void GM_Notification::installScript()
{
bool success = false;
GM_Script* script = 0;
GM_Script* script = nullptr;
QString message = tr("Cannot install script");
if (QFile::copy(m_tmpFileName, m_fileName)) {

View File

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

View File

@ -34,7 +34,7 @@ public:
void init(InitState state, const QString &settingsPath) override;
void unload() 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;

View File

@ -195,7 +195,7 @@ void GM_Settings::loadScripts()
GM_Script* GM_Settings::getScript(QListWidgetItem* item)
{
if (!item) {
return 0;
return nullptr;
}
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
public:
explicit GM_Settings(GM_Manager* manager, QWidget* parent = 0);
explicit GM_Settings(GM_Manager* manager, QWidget* parent = nullptr);
~GM_Settings();
private Q_SLOTS:

View File

@ -157,7 +157,7 @@ QSize GM_SettingsListDelegate::sizeHint(const QStyleOptionViewItem &option, cons
const QWidget* w = opt.widget;
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;
titleFont.setBold(true);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -62,7 +62,7 @@ public:
* Notice that this all events for this button are
* 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;
/*
@ -77,9 +77,9 @@ public:
*/
void clearGestures(bool deleteGestures = false);
bool mouseButtonPressEvent(QMouseEvent* event, QObject* obj = 0);
bool mouseButtonReleaseEvent(QMouseEvent* event, QObject* obj = 0);
bool mouseMoveEvent(QMouseEvent* event, QObject* obj = 0);
bool mouseButtonPressEvent(QMouseEvent* event, QObject* obj = nullptr);
bool mouseButtonReleaseEvent(QMouseEvent* event, QObject* obj = nullptr);
bool mouseMoveEvent(QMouseEvent* event, QObject* obj = nullptr);
protected:
bool eventFilter(QObject* obj, QEvent* event) override;

View File

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

View File

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

View File

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

View File

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

View File

@ -35,7 +35,7 @@ class PIM_Handler : public QObject
{
Q_OBJECT
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);
bool keyPress(WebView* view, QKeyEvent* event);
@ -44,7 +44,7 @@ public:
public Q_SLOTS:
void webPageCreated(WebPage* page);
void showSettings(QWidget* parent = 0);
void showSettings(QWidget* parent = nullptr);
private Q_SLOTS:
void loadSettings();

View File

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

View File

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

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