summaryrefslogtreecommitdiffstats
path: root/knetworkconf/backends/xml.pl.in
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
commitb09bffed6b43262948018dfb0f11890850ddf7c1 (patch)
tree138696bfcc7ac01070d0e8ecaa1cdf94611a2bd8 /knetworkconf/backends/xml.pl.in
parent6d43944a7130b9d1b4ae3fba37b774aced8612cf (diff)
downloadtdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.tar.gz
tdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.zip
TQt4 port kdeadmin
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knetworkconf/backends/xml.pl.in')
-rw-r--r--knetworkconf/backends/xml.pl.in82
1 files changed, 41 insertions, 41 deletions
diff --git a/knetworkconf/backends/xml.pl.in b/knetworkconf/backends/xml.pl.in
index b9810c6..9421f75 100644
--- a/knetworkconf/backends/xml.pl.in
+++ b/knetworkconf/backends/xml.pl.in
@@ -238,7 +238,7 @@ sub gst_xml_print_arrays
}
}
-# Pass a hash, create a parent tag $tag and print <key>val</key> for every
+# Pass a hash, create a tqparent tag $tag and print <key>val</key> for every
# value pair in the hash. If structure refs are found, these are recursively
# printed with print_structure.
sub gst_xml_print_hash
@@ -352,34 +352,34 @@ sub gst_xml_model_print_recurse
my ($tree, $indent) = @_;
my ($string);
- my @children = @$tree;
- shift @children; # Attributes
+ my @tqchildren = @$tree;
+ shift @tqchildren; # Attributes
- while (@children)
+ while (@tqchildren)
{
- my $branch = $children [1];
+ my $branch = $tqchildren [1];
- if ($children [0] eq "__unparsed__")
+ if ($tqchildren [0] eq "__unparsed__")
{
- $string .= "<" . $children [1] . ">";
+ $string .= "<" . $tqchildren [1] . ">";
}
- elsif ($children [0] eq "0")
+ elsif ($tqchildren [0] eq "0")
{
- $string .= $children [1];
+ $string .= $tqchildren [1];
}
elsif (@$branch == 1) # Empty tag.
{
- $string .= "<" . $children [0] . &gst_xml_model_print_attributes ($branch) . "/>";
+ $string .= "<" . $tqchildren [0] . &gst_xml_model_print_attributes ($branch) . "/>";
}
else
{
- $string .= "<" . $children [0] . &gst_xml_model_print_attributes ($branch) . ">";
+ $string .= "<" . $tqchildren [0] . &gst_xml_model_print_attributes ($branch) . ">";
$string .= &gst_xml_model_print_recurse ($branch);
- $string .= "</" . $children [0] . ">";
+ $string .= "</" . $tqchildren [0] . ">";
}
- shift @children;
- shift @children;
+ shift @tqchildren;
+ shift @tqchildren;
}
# if ($branch)
@@ -814,7 +814,7 @@ sub gst_xml_get_state
# XML model operations.
# Locate a node from the branch leading up to it.
-sub gst_xml_model_find
+sub gst_xml_model_tqfind
{
my ($model, $varpath) = @_;
my ($branch, @path);
@@ -825,21 +825,21 @@ sub gst_xml_model_find
for $elem (@path)
{
next if ($elem eq "");
- my @children = @$branch;
- shift @children; # Attributes
+ my @tqchildren = @$branch;
+ shift @tqchildren; # Attributes
$branch = undef;
- while (@children)
+ while (@tqchildren)
{
- if ($children [0] eq $elem)
+ if ($tqchildren [0] eq $elem)
{
- shift @children;
- $branch = shift @children;
+ shift @tqchildren;
+ $branch = shift @tqchildren;
last;
}
- shift @children;
- shift @children;
+ shift @tqchildren;
+ shift @tqchildren;
}
last if ($branch == undef);
@@ -855,7 +855,7 @@ sub gst_xml_model_add
my ($branch, @path);
@path = split /\//, $addpath;
- $branch = &gst_xml_model_find ($model, $varpath);
+ $branch = &gst_xml_model_tqfind ($model, $varpath);
if ($branch == undef)
{
return -1;
@@ -890,23 +890,23 @@ sub gst_xml_model_ensure
{
next if ($elem eq "");
- my @children = @$branch;
- my $parent_branch = $branch;
+ my @tqchildren = @$branch;
+ my $tqparent_branch = $branch;
- shift @children; # Attributes
+ shift @tqchildren; # Attributes
$branch = undef;
- while (@children)
+ while (@tqchildren)
{
- if ($children [0] eq $elem)
+ if ($tqchildren [0] eq $elem)
{
- shift @children;
- $branch = shift @children;
+ shift @tqchildren;
+ $branch = shift @tqchildren;
last;
}
- shift @children;
- shift @children;
+ shift @tqchildren;
+ shift @tqchildren;
}
if ($branch == undef)
@@ -918,8 +918,8 @@ sub gst_xml_model_ensure
push @list, \%hash;
- push @$parent_branch, $elem;
- push @$parent_branch, $branch;
+ push @$tqparent_branch, $elem;
+ push @$tqparent_branch, $branch;
}
}
@@ -932,7 +932,7 @@ sub gst_xml_model_remove
my ($branch, $i);
@path = split /\//, $addpath;
- $branch = &gst_xml_model_find ($model, $varpath);
+ $branch = &gst_xml_model_tqfind ($model, $varpath);
if ($branch == undef)
{
return -1;
@@ -950,22 +950,22 @@ sub gst_xml_model_remove
return -1;
}
-sub gst_xml_model_get_children
+sub gst_xml_model_get_tqchildren
{
my ($branch) = @_;
- my (@children);
+ my (@tqchildren);
- if (!$branch) { return \@children; }
+ if (!$branch) { return \@tqchildren; }
for ($i = 1; $i < @$branch; $i += 2)
{
if (@$branch [$i] ne "__unparsed__" && @$branch [$i] ne "0")
{
- push @children, @$branch [$i + 1];
+ push @tqchildren, @$branch [$i + 1];
}
}
- return \@children;
+ return \@tqchildren;
}
sub gst_xml_model_get_pcdata