Skip to content

Commit

Permalink
Fix 'zero as null pointer constant' warning (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
gerlachs authored Jan 16, 2024
1 parent 9bdefd6 commit 1a543e9
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/DockAreaTitleBar_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CSpacerWidget : public QWidget
Q_OBJECT
public:
using Super = QWidget;
CSpacerWidget(QWidget* Parent = 0);
CSpacerWidget(QWidget* Parent = nullptr);
virtual QSize sizeHint() const override {return QSize(0, 0);}
virtual QSize minimumSizeHint() const override {return QSize(0, 0);}
};
Expand Down
2 changes: 1 addition & 1 deletion src/DockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ QAction* CDockManager::addToggleViewActionToMenu(QAction* ToggleViewAction,
bool AlphabeticallySorted = (MenuAlphabeticallySorted == d->MenuInsertionOrder);
if (!Group.isEmpty())
{
QMenu* GroupMenu = d->ViewMenuGroups.value(Group, 0);
QMenu* GroupMenu = d->ViewMenuGroups.value(Group, nullptr);
if (!GroupMenu)
{
GroupMenu = new QMenu(Group, this);
Expand Down
2 changes: 1 addition & 1 deletion src/DockWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ CDockContainerWidget* CDockWidget::dockContainer() const
}
else
{
return 0;
return nullptr;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/DockWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private Q_SLOTS:
* by calling setObjectName() after construction.
* Use the layoutFlags to configure the layout of the dock widget.
*/
CDockWidget(const QString &title, QWidget* parent = 0);
CDockWidget(const QString &title, QWidget* parent = nullptr);

/**
* Virtual Destructor
Expand Down
2 changes: 1 addition & 1 deletion src/DockWidgetTab.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private Q_SLOTS:
* param[in] DockWidget The dock widget this title bar belongs to
* param[in] parent The parent widget of this title bar
*/
CDockWidgetTab(CDockWidget* DockWidget, QWidget* parent = 0);
CDockWidgetTab(CDockWidget* DockWidget, QWidget* parent = nullptr);

/**
* Virtual Destructor
Expand Down
4 changes: 2 additions & 2 deletions src/ElidingLabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class ADS_EXPORT CElidingLabel : public QLabel
public:
using Super = QLabel;

CElidingLabel(QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags ());
CElidingLabel(const QString& text, QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags ());
CElidingLabel(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags ());
CElidingLabel(const QString& text, QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags ());
virtual ~CElidingLabel();

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ads_globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ xcb_atom_t xcb_get_atom(const char *name)
}
xcb_connection_t *connection = x11_connection();
xcb_intern_atom_cookie_t request = xcb_intern_atom(connection, 1, strlen(name), name);
xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(connection, request, NULL);
xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(connection, request, nullptr);
if (!reply)
{
return XCB_ATOM_NONE;
Expand Down
4 changes: 2 additions & 2 deletions src/linux/FloatingWidgetTitleBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ CFloatingWidgetTitleBar::CFloatingWidgetTitleBar(CFloatingDockContainer *parent)
d->FloatingWidget = parent;
d->createLayout();

auto normalPixmap = this->style()->standardPixmap(QStyle::SP_TitleBarNormalButton, 0, d->MaximizeButton);
auto normalPixmap = this->style()->standardPixmap(QStyle::SP_TitleBarNormalButton, nullptr, d->MaximizeButton);
d->NormalIcon.addPixmap(normalPixmap, QIcon::Normal);
d->NormalIcon.addPixmap(internal::createTransparentPixmap(normalPixmap, 0.25), QIcon::Disabled);

auto maxPixmap = this->style()->standardPixmap(QStyle::SP_TitleBarMaxButton, 0, d->MaximizeButton);
auto maxPixmap = this->style()->standardPixmap(QStyle::SP_TitleBarMaxButton, nullptr, d->MaximizeButton);
d->MaximizeIcon.addPixmap(maxPixmap, QIcon::Normal);
d->MaximizeIcon.addPixmap(internal::createTransparentPixmap(maxPixmap, 0.25), QIcon::Disabled);
setMaximizedIcon(d->Maximized);
Expand Down

0 comments on commit 1a543e9

Please sign in to comment.