mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
refact
This commit is contained in:
@@ -107,12 +107,12 @@ bool Tools::checkNonStaticData(QString path)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool Tools::loadXMLtoDOM(QString nameFile, QDomDocument *commonDOM)
|
bool Tools::loadXMLtoDOM(QString pathNameFile, QDomDocument *commonDOM)
|
||||||
{
|
{
|
||||||
QFile xmlInFile(nameFile);
|
QFile xmlInFile(pathNameFile);
|
||||||
|
|
||||||
if (! xmlInFile.open(QFile::ReadOnly | QFile::Text)) {
|
if (! xmlInFile.open(QFile::ReadOnly | QFile::Text)) {
|
||||||
qDebug() << "loadXMLtoDOM: Couldn't read the file: " + nameFile;
|
qDebug() << "loadXMLtoDOM: Couldn't read the file: " + pathNameFile;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,12 +122,12 @@ bool Tools::loadXMLtoDOM(QString nameFile, QDomDocument *commonDOM)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Tools::saveDOMtoXML(QString nameFile, QDomDocument *commonDOM)
|
bool Tools::saveDOMtoXML(QString pathNameFile, QDomDocument *commonDOM)
|
||||||
{
|
{
|
||||||
QFile xmlOutFile(nameFile);
|
QFile xmlOutFile(pathNameFile);
|
||||||
if (!xmlOutFile.open(QFile::WriteOnly | QFile::Text))
|
if (!xmlOutFile.open(QFile::WriteOnly | QFile::Text))
|
||||||
{
|
{
|
||||||
qDebug() << "saveDOMtoXML: Failed to write a file: " + nameFile;
|
qDebug() << "saveDOMtoXML: Failed to write a file: " + pathNameFile;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ public:
|
|||||||
static QString createFullPath(QString path);
|
static QString createFullPath(QString path);
|
||||||
static bool checkNonStaticData(QString path);
|
static bool checkNonStaticData(QString path);
|
||||||
|
|
||||||
static bool loadXMLtoDOM(QString nameFile, QDomDocument* commonDOM);
|
static bool loadXMLtoDOM(QString pathNameFile, QDomDocument* commonDOM);
|
||||||
static bool saveDOMtoXML(QString nameFile, QDomDocument* commonDOM);
|
static bool saveDOMtoXML(QString pathNameFile, QDomDocument* commonDOM);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user