summaryrefslogtreecommitdiff
path: root/client/macrowindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r--client/macrowindow.cc42
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);
}