diff options
author | kh <karsten.heimrich@theqtcompany.com> | 2014-11-24 13:03:17 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2014-11-24 17:44:58 +0100 |
commit | 68b3092d32a285850bd55ed4ac4f66a335c02ba0 (patch) | |
tree | cab771ecef1cfffc55bf40604c0f36585775247d /src/libs/installer/copyfiletask.cpp | |
parent | bdb0247bea51ed296ae31ea2efaff3380607a00e (diff) |
Rename the exceptions class to be more generic.
Change-Id: Ia96477920055ee6a6f15be1334516746ddf3573b
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/copyfiletask.cpp')
-rw-r--r-- | src/libs/installer/copyfiletask.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/installer/copyfiletask.cpp b/src/libs/installer/copyfiletask.cpp index 979cdeeb5..37fd3cb1f 100644 --- a/src/libs/installer/copyfiletask.cpp +++ b/src/libs/installer/copyfiletask.cpp @@ -60,7 +60,7 @@ void CopyFileTask::doTask(QFutureInterface<FileTaskResult> &fi) fi.setExpectedResultCount(1); if (taskItems().isEmpty()) { - fi.reportException(FileTaskException(QLatin1String("Invalid task item count."))); + fi.reportException(TaskException(QLatin1String("Invalid task item count."))); fi.reportFinished(); return; // error } @@ -69,7 +69,7 @@ void CopyFileTask::doTask(QFutureInterface<FileTaskResult> &fi) QFile source(item.source()); if (!source.open(QIODevice::ReadOnly)) { - fi.reportException(FileTaskException(QString::fromLatin1("Could not open source '%1' " + fi.reportException(TaskException(QString::fromLatin1("Could not open source '%1' " "for read. Error: %2.").arg(source.fileName(), source.errorString()))); fi.reportFinished(); return; // error } @@ -85,7 +85,7 @@ void CopyFileTask::doTask(QFutureInterface<FileTaskResult> &fi) file.reset(new QFile(target)); } if (!file->open(QIODevice::WriteOnly | QIODevice::Truncate)) { - fi.reportException(FileTaskException(QString::fromLatin1("Could not open target '%1' " + fi.reportException(TaskException(QString::fromLatin1("Could not open target '%1' " "for write. Error: %2.").arg(file->fileName(), file->errorString()))); fi.reportFinished(); return; // error } @@ -102,7 +102,7 @@ void CopyFileTask::doTask(QFutureInterface<FileTaskResult> &fi) while (written < read) { const qint64 toWrite = file->write(buffer.constData() + written, read - written); if (toWrite < 0) { - fi.reportException(FileTaskException(QString::fromLatin1("Writing to target " + fi.reportException(TaskException(QString::fromLatin1("Writing to target " "'%1' failed. Error: %2.").arg(file->fileName(), file->errorString()))); } written += toWrite; |