forked from qt-creator/qt-creator
Tests: Simplify return statements
Change-Id: I9609609f0f880654b73e8930cd05818ddf9b7152 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ QByteArray loadSource(const QString &fileName)
|
||||
QFile inf(QLatin1String(SRCDIR) + QLatin1Char('/') + fileName);
|
||||
if (!inf.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
qDebug("Cannot open \"%s\"", fileName.toUtf8().constData());
|
||||
return QByteArray();
|
||||
return {};
|
||||
}
|
||||
|
||||
QTextStream ins(&inf);
|
||||
@@ -194,11 +194,7 @@ public:
|
||||
else
|
||||
dir = QFileInfo(currentFileName).dir();
|
||||
const QFileInfo inc(dir, includedFileName);
|
||||
if (inc.exists()) {
|
||||
return inc.filePath();
|
||||
} else {
|
||||
return QString();
|
||||
}
|
||||
return inc.exists() ? inc.filePath() : QString();
|
||||
}
|
||||
|
||||
QString resolveGlobally(const QString ¤tFileName) const
|
||||
@@ -208,8 +204,7 @@ public:
|
||||
if (f.exists())
|
||||
return f.filePath();
|
||||
}
|
||||
|
||||
return QString();
|
||||
return {};
|
||||
}
|
||||
|
||||
void setIncludePaths(const QStringList &includePaths)
|
||||
|
Reference in New Issue
Block a user