Commit fd97a4b8 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

remove redundant error check

no point in checking for file's existence before opening it - the
errorString is verbose enough.
parent 0ebc901c
......@@ -246,11 +246,7 @@ QSharedPointer<QFile> AbstractQt4MaemoTarget::openFile(const QString &filePath,
{
const QString nativePath = QDir::toNativeSeparators(filePath);
QSharedPointer<QFile> file(new QFile(filePath));
if (mode == QIODevice::ReadOnly && !file->exists()) {
if (error)
*error = tr("File '%1' does not exist").arg(nativePath);
file.clear();
} else if (!file->open(mode)) {
if (!file->open(mode)) {
if (error) {
*error = tr("Cannot open file '%1': %2")
.arg(nativePath, file->errorString());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment