summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/debugqt.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-12-11 18:15:41 +1100
committer Vas Crabb <vas@vastheman.com>2016-12-11 18:15:41 +1100
commitc8f19544676e2954bf2bb4ca03aa90d1d1148fc8 (patch)
treedd802a7f701c5ef7d3a5270a19f5a295a8ed8e7f /src/osd/modules/debugger/debugqt.cpp
parentf38bc880f0fe3eb73740f8b5c00c359402afb3c4 (diff)
XML refactoring:
* move stuff to namespace util::xml * scope down some enums * split config load/save delegate types * make config load take const so it can't mangle data
Diffstat (limited to 'src/osd/modules/debugger/debugqt.cpp')
-rw-r--r--src/osd/modules/debugger/debugqt.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/osd/modules/debugger/debugqt.cpp b/src/osd/modules/debugger/debugqt.cpp
index ff53278d3a6..c138aa074aa 100644
--- a/src/osd/modules/debugger/debugqt.cpp
+++ b/src/osd/modules/debugger/debugqt.cpp
@@ -77,10 +77,10 @@ static MainWindow* mainQtWindow = nullptr;
std::vector<WindowQtConfig*> xmlConfigurations;
-static void xml_configuration_load(running_machine &machine, config_type cfg_type, xml_data_node *parentnode)
+static void xml_configuration_load(running_machine &machine, config_type cfg_type, util::xml::data_node const *parentnode)
{
// We only care about game files
- if (cfg_type != config_type::CONFIG_TYPE_GAME)
+ if (cfg_type != config_type::GAME)
return;
// Might not have any data
@@ -92,7 +92,7 @@ static void xml_configuration_load(running_machine &machine, config_type cfg_typ
xmlConfigurations.clear();
// Configuration load
- xml_data_node const * wnode = nullptr;
+ util::xml::data_node const * wnode = nullptr;
for (wnode = parentnode->get_child("window"); wnode != nullptr; wnode = wnode->get_next_sibling("window"))
{
WindowQtConfig::WindowType type = (WindowQtConfig::WindowType)wnode->get_attribute_int("type", WindowQtConfig::WIN_TYPE_UNKNOWN);
@@ -112,10 +112,10 @@ static void xml_configuration_load(running_machine &machine, config_type cfg_typ
}
-static void xml_configuration_save(running_machine &machine, config_type cfg_type, xml_data_node *parentnode)
+static void xml_configuration_save(running_machine &machine, config_type cfg_type, util::xml::data_node *parentnode)
{
// We only write to game configurations
- if (cfg_type != config_type::CONFIG_TYPE_GAME)
+ if (cfg_type != config_type::GAME)
return;
for (int i = 0; i < xmlConfigurations.size(); i++)
@@ -123,7 +123,7 @@ static void xml_configuration_save(running_machine &machine, config_type cfg_typ
WindowQtConfig* config = xmlConfigurations[i];
// Create an xml node
- xml_data_node *const debugger_node = parentnode->add_child("window", nullptr);
+ util::xml::data_node *const debugger_node = parentnode->add_child("window", nullptr);
if (debugger_node == nullptr)
continue;
@@ -268,8 +268,8 @@ void debug_qt::init_debugger(running_machine &machine)
m_machine = &machine;
// Setup the configuration XML saving and loading
machine.configuration().config_register("debugger",
- config_saveload_delegate(&xml_configuration_load, &machine),
- config_saveload_delegate(&xml_configuration_save, &machine));
+ config_load_delegate(&xml_configuration_load, &machine),
+ config_save_delegate(&xml_configuration_save, &machine));
}