From 856119c5a43b4781b051b93a0713c152cfd99f85 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 15 Apr 2022 13:27:34 +0200 Subject: Make it run with Qt6 This is a huge commit. Changes: * Obviously, make it compile * Make it run (only scarcely tested) * get rid of most of clang's warnings Let's see what surprises are in store... --- copyworker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'copyworker.cpp') diff --git a/copyworker.cpp b/copyworker.cpp index 0fbc802..22e62f4 100644 --- a/copyworker.cpp +++ b/copyworker.cpp @@ -15,7 +15,7 @@ CopyWorker::CopyWorker(QObject *parent) : QThread(parent), mMax(0) {} void CopyWorker::enqueue(const QString &source, const QString &destination){ QMutexLocker l(&mSourceMx); - QPair x = qMakePair(source, destination); + std::pair x(source, destination); if(!mFiles.contains(x)){ QFileInfo fi(source); mFiles.append(x); @@ -74,7 +74,7 @@ void CopyWorker::run(){ qint64 cur = total / 1024 / 1024; emit bytesRead(cur); } - delete buf; + delete[] buf; } QString s = QString(tr("Done copying %1 file(s)")).arg(QString::number(mFiles.size())); emit success(s); -- cgit v1.2.3-70-g09d2