summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-07 20:38:10 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-24 00:08:35 +0300
commitd1590377de1141144d59ca1160de2822177f6f2a (patch)
treea368b251dedc7164cadbfe459de4cf5c983acf98 /src/gui
parent65422e722cfe0616c65498c71aa0651857dcc49a (diff)
downloadplus-d1590377de1141144d59ca1160de2822177f6f2a.tar.gz
plus-d1590377de1141144d59ca1160de2822177f6f2a.tar.bz2
plus-d1590377de1141144d59ca1160de2822177f6f2a.tar.xz
plus-d1590377de1141144d59ca1160de2822177f6f2a.zip
Add support for tinyxml2 for reading / writing xml files.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/theme.cpp6
-rw-r--r--src/gui/windows/equipmentwindow.cpp10
-rw-r--r--src/gui/windows/equipmentwindow.h8
-rw-r--r--src/gui/windows/serverdialog.cpp4
-rw-r--r--src/gui/windows/skilldialog.cpp4
-rw-r--r--src/gui/windows/skilldialog.h4
-rw-r--r--src/gui/windows/updaterwindow.cpp2
7 files changed, 19 insertions, 19 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 2d33d36e7..94826e537 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -406,7 +406,7 @@ Skin *Theme::readSkin(const std::string &filename, const bool full)
SkipError_true);
if (!doc)
return nullptr;
- const XmlNodePtr rootNode = doc->rootNode();
+ XmlNodeConstPtr rootNode = doc->rootNode();
if (!rootNode || !xmlNameEqual(rootNode, "skinset"))
{
doc->decRef();
@@ -1011,7 +1011,7 @@ void Theme::loadColors(std::string file)
SkipError_false);
if (!doc)
return;
- const XmlNodePtrConst root = doc->rootNode();
+ XmlNodeConstPtrConst root = doc->rootNode();
if (!root || !xmlNameEqual(root, "colors"))
{
@@ -1220,7 +1220,7 @@ ThemeInfo *Theme::loadInfo(const std::string &themeName)
SkipError_false);
if (!doc)
return nullptr;
- const XmlNodePtrConst rootNode = doc->rootNode();
+ XmlNodeConstPtrConst rootNode = doc->rootNode();
if (!rootNode || !xmlNameEqual(rootNode, "info"))
{
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 1910bb8e1..c0ed8b5d4 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -630,7 +630,7 @@ void EquipmentWindow::fillBoxes()
paths.getStringValue("equipmentWindowFile"),
UseVirtFs_true,
SkipError_false);
- const XmlNodePtr root = doc->rootNode();
+ XmlNodeConstPtr root = doc->rootNode();
if (!root)
{
delete doc;
@@ -666,7 +666,7 @@ void EquipmentWindow::addDefaultPage()
}
}
-void EquipmentWindow::loadPage(const XmlNodePtr node)
+void EquipmentWindow::loadPage(XmlNodeConstPtr node)
{
if (!node)
return;
@@ -682,7 +682,7 @@ void EquipmentWindow::loadPage(const XmlNodePtr node)
}
}
-void EquipmentWindow::loadPlayerBox(const XmlNodePtr playerBoxNode,
+void EquipmentWindow::loadPlayerBox(XmlNodeConstPtr playerBoxNode,
const int page)
{
EquipmentPage *const data = mPages[page];
@@ -692,7 +692,7 @@ void EquipmentWindow::loadPlayerBox(const XmlNodePtr playerBoxNode,
data->height = XML::getProperty(playerBoxNode, "height", 168);
}
-void EquipmentWindow::loadSlot(const XmlNodePtr slotNode,
+void EquipmentWindow::loadSlot(XmlNodeConstPtr slotNode,
const ImageSet *const imageset,
const int page)
{
@@ -739,7 +739,7 @@ void EquipmentWindow::prepareSlotNames()
XML::Document doc(paths.getStringValue("equipmentSlotsFile"),
UseVirtFs_true,
SkipError_false);
- const XmlNodePtrConst root = doc.rootNode();
+ XmlNodeConstPtrConst root = doc.rootNode();
if (!root)
return;
diff --git a/src/gui/windows/equipmentwindow.h b/src/gui/windows/equipmentwindow.h
index d45dc6a41..00db41fd8 100644
--- a/src/gui/windows/equipmentwindow.h
+++ b/src/gui/windows/equipmentwindow.h
@@ -114,13 +114,13 @@ class EquipmentWindow final : public Window,
void addBox(const int idx, int x, int y, const int imageIndex);
- void loadWindow(const XmlNodePtrConst windowNode);
+ void loadWindow(XmlNodeConstPtrConst windowNode);
- void loadPage(const XmlNodePtr node);
+ void loadPage(XmlNodeConstPtr node);
- void loadPlayerBox(const XmlNodePtr playerBoxNode, const int page);
+ void loadPlayerBox(XmlNodeConstPtr playerBoxNode, const int page);
- void loadSlot(const XmlNodePtr slotNode,
+ void loadSlot(XmlNodeConstPtr slotNode,
const ImageSet *const imageset,
const int page);
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index e1fe669ee..d04deb0fb 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -449,7 +449,7 @@ void ServerDialog::downloadServerList()
config.setValue("serverslistupdate", getDateString());
}
-static void loadHostsGroup(const XmlNodePtr node,
+static void loadHostsGroup(XmlNodeConstPtr node,
ServerInfo &server)
{
HostsGroup group;
@@ -482,7 +482,7 @@ void ServerDialog::loadServers(const bool addNew)
branding.getStringValue("onlineServerFile")),
UseVirtFs_false,
SkipError_false);
- const XmlNodePtr rootNode = doc.rootNode();
+ XmlNodeConstPtr rootNode = doc.rootNode();
if (!rootNode || !xmlNameEqual(rootNode, "serverlist"))
{
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index eec6a2ac5..992ec3a1f 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -436,7 +436,7 @@ void SkillDialog::loadXmlFile(const std::string &fileName,
}
}
-SkillInfo *SkillDialog::loadSkill(XmlNodePtr node,
+SkillInfo *SkillDialog::loadSkill(XmlNodeConstPtr node,
SkillModel *const model)
{
int id = XML::getIntProperty(node, "id", -1, -1, 1000000);
@@ -492,7 +492,7 @@ SkillInfo *SkillDialog::loadSkill(XmlNodePtr node,
return skill;
}
-void SkillDialog::loadSkillData(XmlNodePtr node,
+void SkillDialog::loadSkillData(XmlNodeConstPtr node,
SkillInfo *const skill)
{
if (!skill)
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 80e848f41..0c19f9308 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -209,10 +209,10 @@ class SkillDialog final : public Window,
void addSkillDuration(SkillInfo *const skill);
- SkillInfo *loadSkill(XmlNodePtr node,
+ SkillInfo *loadSkill(XmlNodeConstPtr node,
SkillModel *const model);
- void loadSkillData(XmlNodePtr node,
+ void loadSkillData(XmlNodeConstPtr node,
SkillInfo *const skill);
void addDefaultTab();
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 2bff2e8cd..783b36635 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -79,7 +79,7 @@ static std::vector<UpdateFile> loadXMLFile(const std::string &fileName,
{
std::vector<UpdateFile> files;
XML::Document doc(fileName, UseVirtFs_false, SkipError_false);
- const XmlNodePtrConst rootNode = doc.rootNode();
+ XmlNodeConstPtrConst rootNode = doc.rootNode();
if (!rootNode || !xmlNameEqual(rootNode, "updates"))
{