Commit 539ac88c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Don't check null pointer. Use explicit/nullptr

parent 1d024b7b
......@@ -48,9 +48,7 @@ void InfoNotification::setEnabled(bool enabled)
void InfoNotification::show()
{
if (m_enabled) {
if (m_notification) {
delete m_notification;
}
delete m_notification;
m_notification = new KNotification(QStringLiteral("notification"));
m_notification->setFlags(KNotification::DefaultEvent);
......
......@@ -36,7 +36,7 @@ class InfoNotification : public QObject
Q_PROPERTY(QString acknowledgeActionText READ acknowledgeActionText WRITE setAcknowledgeActionText NOTIFY acknowledgeActionTextChanged)
public:
InfoNotification(QObject *parent = 0);
explicit InfoNotification(QObject *parent = nullptr);
~InfoNotification();
bool enabled() const;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment