Commit 1ba5024e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use explicit/nullptr/isEmpty

parent b4278a15
......@@ -51,9 +51,6 @@ using namespace KAStats;
using namespace KAStats::Terms;
Backend::Backend(QObject* parent) : QObject(parent)
, m_taskManagerItem(0)
, m_toolTipItem(0)
, m_groupDialog(0)
, m_panelWinId(0)
, m_highlightWindows(false)
, m_actionGroup(new QActionGroup(this))
......
......@@ -111,14 +111,14 @@ class Backend : public QObject
private:
void updateWindowHighlight();
QQuickItem *m_taskManagerItem;
QQuickItem *m_toolTipItem;
QQuickWindow *m_groupDialog;
QQuickItem *m_taskManagerItem = nullptr;
QQuickItem *m_toolTipItem = nullptr;
QQuickWindow *m_groupDialog = nullptr;
WId m_panelWinId;
bool m_highlightWindows;
QList<WId> m_windowsToHighlight;
QActionGroup *m_actionGroup;
KActivities::Consumer *m_activitiesConsumer;
QActionGroup *m_actionGroup = nullptr;
KActivities::Consumer *m_activitiesConsumer = nullptr;
};
#endif
......@@ -33,7 +33,7 @@ class DragHelper : public QObject
Q_PROPERTY(int dragIconSize READ dragIconSize WRITE setDragIconSize NOTIFY dragIconSizeChanged)
public:
DragHelper(QObject *parent = 0);
explicit DragHelper(QObject *parent = nullptr);
~DragHelper();
int dragIconSize() const;
......
......@@ -179,7 +179,7 @@ void DirModel::delayedPreview()
++i;
}
if (list.size() > 0) {
if (!list.isEmpty()) {
KIO::PreviewJob* job = KIO::filePreview(list, m_screenshotSize);
job->setIgnoreMaximumSize(true);
// qDebug() << "Created job" << job;
......
......@@ -55,7 +55,7 @@ public:
Thumbnail = Qt::UserRole + 3
};
DirModel(QObject* parent=0);
explicit DirModel(QObject* parent=nullptr);
virtual ~DirModel();
QHash<int, QByteArray> roleNames() const override;
......@@ -88,7 +88,7 @@ private:
QStringList m_mimeTypes;
//previews
QTimer *m_previewTimer;
QTimer *m_previewTimer = nullptr;
QHash<QUrl, QPersistentModelIndex> m_filesToPreview;
QSize m_screenshotSize;
QHash<QUrl, QPersistentModelIndex> m_previewJobs;
......
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