mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
be verbose with a warning if reading of a file fails
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2097 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
8e3813327c
commit
a9ba6464d1
@ -239,7 +239,12 @@ bool UAVObjectGenerator::processAll()
|
||||
QString UAVObjectGenerator::readFile(QString name)
|
||||
{
|
||||
QFile file(name);
|
||||
if (!file.open(QFile::ReadOnly)) return QString();
|
||||
if (!file.open(QFile::ReadOnly))
|
||||
{
|
||||
sout << "Warning: Could not open " << name << endl;
|
||||
return QString();
|
||||
}
|
||||
|
||||
QTextStream fileStr(&file);
|
||||
QString str = fileStr.readAll();
|
||||
file.close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user