diff options
author | deva <deva> | 2010-08-13 12:18:14 +0000 |
---|---|---|
committer | deva <deva> | 2010-08-13 12:18:14 +0000 |
commit | 37cd747953facf8c4ffed40dcef175391d15c388 (patch) | |
tree | c18d65b3159f92b998673c8499b82cdd2e1277a7 /client/macrowindow.cc | |
parent | 6031ee9c32023fe1202c7e8160dbb04fe4bd0429 (diff) |
Child recursion setValue fix. Missing initialisation of hideChildren and missing check on valid().
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r-- | client/macrowindow.cc | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc index f8c9af6..6588416 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -87,41 +87,41 @@ void MacroWindow::update(QDomNode &node) void MacroWindow::initMacro(QDomNode &node) { - QDomElement xml_elem = node.toElement(); + QDomElement elem = node.toElement(); - if(xml_elem.tagName() == "macro") { + if(elem.tagName() == "macro") { // Assign the macro name and version to QStrings for use when comitting - macro = xml_elem.attribute("name", ""); - version = xml_elem.attribute("version", ""); + macro = elem.attribute("name", ""); + version = elem.attribute("version", ""); - } else if(xml_elem.tagName() == "scripts") { + } else if(elem.tagName() == "scripts") { // Nothing to do here - } else if(xml_elem.tagName() == "resume") { - QString resume = xml_elem.text(); + } else if(elem.tagName() == "resume") { + QString resume = elem.text(); ResumeWidget::state_t state = ResumeWidget::OLD; - if(xml_elem.hasAttribute("state")) { - if(xml_elem.attribute("state") == "old") state = ResumeWidget::OLD; - if(xml_elem.attribute("state") == "new") state = ResumeWidget::NEW; - if(xml_elem.attribute("state") == "dirty") state = ResumeWidget::DIRTY; + if(elem.hasAttribute("state")) { + if(elem.attribute("state") == "old") state = ResumeWidget::OLD; + if(elem.attribute("state") == "new") state = ResumeWidget::NEW; + if(elem.attribute("state") == "dirty") state = ResumeWidget::DIRTY; } ((ResumeWidget*)collapsedWidget())->setText(resume, state); - } else if(xml_elem.tagName() == "script") { + } else if(elem.tagName() == "script") { - if(xml_elem.attribute("language", "lua") == "lua") { - lua->runScript(xml_elem.text(), NULL, "preload"); + if(elem.attribute("language", "lua") == "lua") { + lua->runScript(elem.text(), NULL, "preload"); } - } else if(xml_elem.tagName() == "widgets") { + } else if(elem.tagName() == "widgets") { if(mainwidget) { DEBUG("ERROR!!!!!!\n\tmainwidget already exists!\n"); } - Window *window = new Window(xml_elem, this); + Window *window = new Window(elem, this); connect(window, SIGNAL(wasChanged()), this, SLOT(macroChanged())); - macrotitle = xml_elem.attribute("caption"); + macrotitle = elem.attribute("caption"); clear(); mainwidget = window; @@ -204,14 +204,14 @@ void MacroWindow::expandWrapper() if(true || macronode.childNodes().count()) { // macrowindows.push_back( new MacroWindow( netcom, macronode ) ); - QDomElement xml_elem = macronode.toElement(); + QDomElement elem = macronode.toElement(); - if(xml_elem.tagName() == "macro") { + if(elem.tagName() == "macro") { // Assign the macro name and version to QStrings for use when comitting QString macroname; - if(xml_elem.hasAttribute("name")) { - if(xml_elem.attribute("name") == macro) { + if(elem.hasAttribute("name")) { + if(elem.attribute("name") == macro) { // update me! initMacro(macronode); } |