mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-21 21:20:45 +00:00
Minor improvements to some file open and copy error messages
This commit is contained in:
parent
d68afd69c4
commit
7c350068e0
@ -419,7 +419,7 @@ void copyPath(QString src, QString dst)
|
|||||||
|
|
||||||
if (!QFile::exists(destFile)) {
|
if (!QFile::exists(destFile)) {
|
||||||
if (!QFile::copy(srcFile, destFile)) {
|
if (!QFile::copy(srcFile, destFile)) {
|
||||||
qWarning() << "Could not copy" << srcFile << "to" << destFile;
|
qWarning() << "copyPath: could not copy" << srcFile << "to" << destFile;
|
||||||
}
|
}
|
||||||
// TODO: Since copyPath is only used by loaders, it should
|
// TODO: Since copyPath is only used by loaders, it should
|
||||||
// build the list of files first, and then update the progress bar
|
// build the list of files first, and then update the progress bar
|
||||||
|
@ -178,7 +178,7 @@ bool Preferences::Open(QString filename)
|
|||||||
|
|
||||||
if (!file.open(QIODevice::ReadOnly)) {
|
if (!file.open(QIODevice::ReadOnly)) {
|
||||||
// qWarning() << "Could not open" << p_filename.toLocal8Bit().data() << " Error: " << file.error();
|
// qWarning() << "Could not open" << p_filename.toLocal8Bit().data() << " Error: " << file.error();
|
||||||
qWarning() << "Could not open preferences file" << filename << "for reading, error code" << file.error() << file.errorString();
|
qWarning() << "Could not open preferences file for reading, error code" << file.error() << file.errorString();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,8 +89,10 @@ bool copyRecursively(QString sourceFolder, QString destFolder, QProgressDialog&
|
|||||||
progress.setValue(numFilesCopied);
|
progress.setValue(numFilesCopied);
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
}
|
}
|
||||||
if(!success)
|
if(!success) {
|
||||||
|
qWarning() << "copyRecursively: Unable to copy" << srcName << "to" << destName;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
files.clear();
|
files.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user