diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-11-10 19:04:42 +0100 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-11-12 20:28:30 +0100 |
commit | fe94c3609ef875166b71b9f6c540c45eff97a5ab (patch) | |
tree | 4d84b18c8639233c47e6fc37bfc673489abdbf03 /launcher/DataMigrationTask.cpp | |
parent | 173aed7fd8e73b9e6a6055981ce284ea9cf5d33a (diff) | |
download | PrismLauncher-fe94c3609ef875166b71b9f6c540c45eff97a5ab.tar.gz PrismLauncher-fe94c3609ef875166b71b9f6c540c45eff97a5ab.tar.bz2 PrismLauncher-fe94c3609ef875166b71b9f6c540c45eff97a5ab.zip |
fix: implement code review suggestions
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/DataMigrationTask.cpp')
-rw-r--r-- | launcher/DataMigrationTask.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/launcher/DataMigrationTask.cpp b/launcher/DataMigrationTask.cpp index 8de3158e..27ce5f01 100644 --- a/launcher/DataMigrationTask.cpp +++ b/launcher/DataMigrationTask.cpp @@ -40,8 +40,12 @@ void DataMigrationTask::dryRunFinished() disconnect(&m_copyFutureWatcher, &QFutureWatcher<bool>::finished, this, &DataMigrationTask::dryRunFinished); disconnect(&m_copyFutureWatcher, &QFutureWatcher<bool>::canceled, this, &DataMigrationTask::dryRunAborted); +#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) + if (!m_copyFuture.isValid() || !m_copyFuture.result()) { +#else if (!m_copyFuture.result()) { - emitFailed("Some error"); // FIXME +#endif + emitFailed(tr("Failed to scan source path.")); return; } @@ -74,8 +78,12 @@ void DataMigrationTask::copyFinished() disconnect(&m_copyFutureWatcher, &QFutureWatcher<bool>::finished, this, &DataMigrationTask::copyFinished); disconnect(&m_copyFutureWatcher, &QFutureWatcher<bool>::canceled, this, &DataMigrationTask::copyAborted); +#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) + if (!m_copyFuture.isValid() || !m_copyFuture.result()) { +#else if (!m_copyFuture.result()) { - emitFailed("Some paths could not be copied!"); +#endif + emitFailed(tr("Some paths could not be copied!")); return; } |