mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-28 04:54:13 +02:00
Fix warning about reading XML without explicit file opening. This was implicit up to now and will go away in future Qt versions.
This commit is contained in:
@@ -653,9 +653,16 @@ QDomElement ElementsLocation::xml() const
|
||||
if (!m_project)
|
||||
{
|
||||
QFile file (m_file_system_path);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
return QDomElement();
|
||||
|
||||
QDomDocument docu;
|
||||
if (docu.setContent(&file))
|
||||
{
|
||||
file.close();
|
||||
return docu.documentElement();
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user