diff options
author | Arno <arno@disconnect.de> | 2018-09-29 19:50:21 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-09-29 19:51:57 +0200 |
commit | 12cfae5b914aef3fdd62a152aacf60532216f1e8 (patch) | |
tree | 28d12a141c2cbcc9aed1d454e38b51a87cf7b979 | |
parent | 24757060a89ca914036bc83c597136fae9732b20 (diff) | |
download | SheMov-12cfae5b914aef3fdd62a152aacf60532216f1e8.tar.gz SheMov-12cfae5b914aef3fdd62a152aacf60532216f1e8.tar.bz2 SheMov-12cfae5b914aef3fdd62a152aacf60532216f1e8.zip |
Fix 0 -> nullptr and implicit conversions
-rw-r--r-- | archivebrowser.cpp | 6 | ||||
-rw-r--r-- | archivebrowser.h | 2 | ||||
-rw-r--r-- | copyworker.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/archivebrowser.cpp b/archivebrowser.cpp index 27418fd..3341d7c 100644 --- a/archivebrowser.cpp +++ b/archivebrowser.cpp @@ -131,7 +131,7 @@ ArchiveBrowser::ArchiveBrowser(QWidget *parent) : QWidget(parent), mSelectedSize mTree->setSortingEnabled(true); //copyworker - mUSBProgress = 0; + mUSBProgress = nullptr; mCopyWorker = new CopyWorker(this); connect(mCopyWorker, &CopyWorker::error, this, &ArchiveBrowser::copyError); connect(mCopyWorker, &CopyWorker::success, this, &ArchiveBrowser::copySuccess); @@ -341,7 +341,7 @@ void ArchiveBrowser::copyError(QString error){ mCopyWorker->disconnect(mUSBProgress); QProgressDialog *old = mUSBProgress; old->deleteLater(); - mUSBProgress = 0; + mUSBProgress = nullptr; } void ArchiveBrowser::copySuccess(QString success){ @@ -350,7 +350,7 @@ void ArchiveBrowser::copySuccess(QString success){ mCopyWorker->disconnect(mUSBProgress); QProgressDialog *old = mUSBProgress; old->deleteLater(); - mUSBProgress = 0; + mUSBProgress = nullptr; QString msg = QString(tr("Delete source files and update database?")); int q = QMessageBox::question(this, tr("Question"), msg); if(q == QMessageBox::Yes){ diff --git a/archivebrowser.h b/archivebrowser.h index 6f648a5..d681578 100644 --- a/archivebrowser.h +++ b/archivebrowser.h @@ -27,7 +27,7 @@ class QProgressDialog; class ArchiveBrowser : public QWidget { Q_OBJECT public: - explicit ArchiveBrowser(QWidget *parent = 0); + explicit ArchiveBrowser(QWidget *parent = nullptr); SmTreeView *archiveTree() { return mTree; } public slots: diff --git a/copyworker.h b/copyworker.h index 7413f49..165f59b 100644 --- a/copyworker.h +++ b/copyworker.h @@ -18,12 +18,12 @@ class CopyWorker : public QThread { Q_OBJECT public: - CopyWorker(QObject *parent = 0); + CopyWorker(QObject *parent = nullptr); void enqueue(const QString &source, const QString &destination); void appendData(const QString &source, const QVariant &data); const QHash<QString, QList<QVariant> > data() const { return mData; } void clear(); - qint64 max() const { return mMax; } + int max() const { return mMax; } virtual void run(); signals: |