diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 4a25ca5c80d9b88fdc1a0d44d1db47da47206899 (patch) | |
tree | 8a1d1e893a80df8ad5233802c2b0e39220b86168 /knetworkconf | |
parent | 441266d591a9064dd619da0e1bd49b871d6a9c70 (diff) | |
download | tdeadmin-4a25ca5c80d9b88fdc1a0d44d1db47da47206899.tar.gz tdeadmin-4a25ca5c80d9b88fdc1a0d44d1db47da47206899.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knetworkconf')
-rw-r--r-- | knetworkconf/backends/file.pl.in | 2 | ||||
-rw-r--r-- | knetworkconf/backends/network.pl.in | 2 | ||||
-rw-r--r-- | knetworkconf/backends/parse.pl.in | 10 | ||||
-rw-r--r-- | knetworkconf/backends/replace.pl.in | 24 | ||||
-rw-r--r-- | knetworkconf/backends/report.pl.in | 4 | ||||
-rwxr-xr-x | knetworkconf/backends/type1inst | 2 | ||||
-rw-r--r-- | knetworkconf/backends/xml.pl.in | 6 | ||||
-rw-r--r-- | knetworkconf/knetworkconf-mdk.spec | 2 | ||||
-rw-r--r-- | knetworkconf/knetworkconf/kaddressvalidator.cpp | 2 | ||||
-rw-r--r-- | knetworkconf/knetworkconf/knetworkconf.cpp | 4 | ||||
-rw-r--r-- | knetworkconf/knetworkconf/knetworkconfigparser.cpp | 38 | ||||
-rwxr-xr-x | knetworkconf/update_backends.sh | 2 |
12 files changed, 49 insertions, 49 deletions
diff --git a/knetworkconf/backends/file.pl.in b/knetworkconf/backends/file.pl.in index 35d17cb..f147474 100644 --- a/knetworkconf/backends/file.pl.in +++ b/knetworkconf/backends/file.pl.in @@ -81,7 +81,7 @@ sub gst_file_get_data_path } -# Give a command, and it will put in C locale, some sane PATH values and tqfind +# Give a command, and it will put in C locale, some sane PATH values and find # the program to run in the path. Redirects stderr to null. sub get_cmd_path { diff --git a/knetworkconf/backends/network.pl.in b/knetworkconf/backends/network.pl.in index 42d1629..ed36e40 100644 --- a/knetworkconf/backends/network.pl.in +++ b/knetworkconf/backends/network.pl.in @@ -37,7 +37,7 @@ if ($SCRIPTSDIR =~ /^@scriptsdir[@]/) require "$SCRIPTSDIR/general.pl$DOTIN"; require "$SCRIPTSDIR/file.pl$DOTIN"; require "$SCRIPTSDIR/parse.pl$DOTIN"; -require "$SCRIPTSDIR/tqreplace.pl$DOTIN"; +require "$SCRIPTSDIR/replace.pl$DOTIN"; require "$SCRIPTSDIR/service.pl$DOTIN"; require "$SCRIPTSDIR/util.pl$DOTIN"; require "$SCRIPTSDIR/xml.pl$DOTIN"; diff --git a/knetworkconf/backends/parse.pl.in b/knetworkconf/backends/parse.pl.in index 7064536..0a02012 100644 --- a/knetworkconf/backends/parse.pl.in +++ b/knetworkconf/backends/parse.pl.in @@ -1437,7 +1437,7 @@ sub gst_parse_xml my ($model, $branch); ($model) = &gst_xml_model_scan ($file); - $branch = &gst_xml_model_tqfind ($model, $varpath); + $branch = &gst_xml_model_find ($model, $varpath); if ($branch) { @@ -1454,7 +1454,7 @@ sub gst_parse_xml_child_names my ($model, $branch, @tqchildren); ($model) = &gst_xml_model_scan ($file); - $branch = &gst_xml_model_tqfind ($model, $varpath); + $branch = &gst_xml_model_find ($model, $varpath); if (!$branch) { return @tqchildren; } @@ -1500,7 +1500,7 @@ sub gst_parse_alchemist_print_option my ($varpath, $model, $branch, $fd, $options, $option); ($model) = &gst_xml_model_scan ($file); - $branch = &gst_xml_model_tqfind ($model, "/adm_context/datatree/printconf/print_queues/" . $printer . + $branch = &gst_xml_model_find ($model, "/adm_context/datatree/printconf/print_queues/" . $printer . "/filter_data/foomatic_defaults"); return undef if (!$branch); @@ -1509,7 +1509,7 @@ sub gst_parse_alchemist_print_option foreach $o (@$options) { - my $opt_node = &gst_xml_model_tqfind ($o, "name"); + my $opt_node = &gst_xml_model_find ($o, "name"); next if (!$opt_node); if (&gst_xml_model_get_attribute ($opt_node, "VALUE") eq $name) @@ -1521,7 +1521,7 @@ sub gst_parse_alchemist_print_option return undef if (!$option); - my $node = &gst_xml_model_tqfind ($option, "default"); + my $node = &gst_xml_model_find ($option, "default"); return undef if (!$node); return &gst_xml_model_get_attribute ($node, "VALUE"); diff --git a/knetworkconf/backends/replace.pl.in b/knetworkconf/backends/replace.pl.in index bac1f9a..8114f19 100644 --- a/knetworkconf/backends/replace.pl.in +++ b/knetworkconf/backends/replace.pl.in @@ -1,7 +1,7 @@ #!/usr/bin/env perl #-*- Mode: perl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -# tqreplace.pl: Common in-line replacing stuff for the ximian-setup-tools backends. +# replace.pl: Common in-line replacing stuff for the ximian-setup-tools backends. # # Copyright (C) 2000-2001 Ximian, Inc. # @@ -59,7 +59,7 @@ require "$SCRIPTSDIR/parse.pl$DOTIN"; # Additional abstraction: replace table entries can have # arrays inside. The replace proc will be ran with every # combination that the arrays provide. Ex: -# ["user", \&gst_replace_foo, [0, 1], [2, 3] ] will tqreplace +# ["user", \&gst_replace_foo, [0, 1], [2, 3] ] will replace # using all possibilities in the combinatory of [0, 1]x[2, 3]. # Check RedHat 7.2's network replace table for further # enlightenment. @@ -264,7 +264,7 @@ sub gst_replace_join_first_array return &gst_replace_split ($file, $key, $re1, join (&gst_replace_regexp_to_separator ($re2), @$value)); } -# Escape $value in /bin/sh way, tqfind/append key and set escaped value. +# Escape $value in /bin/sh way, find/append key and set escaped value. sub gst_replace_sh { my ($file, $key, $value) = @_; @@ -289,7 +289,7 @@ sub gst_replace_sh return $ret; } -# Escape $value in /bin/sh way, tqfind/append key and set escaped value, make sure line har +# Escape $value in /bin/sh way, find/append key and set escaped value, make sure line har sub gst_replace_sh_export { my ($file, $key, $value) = @_; @@ -443,7 +443,7 @@ sub gst_replace_line_first return 0; } -# For every key in %$value, tqreplace/append the corresponding key/value pair. +# For every key in %$value, replace/append the corresponding key/value pair. # The separator for $re1 sub gst_replace_join_hash { @@ -550,7 +550,7 @@ sub gst_replace_chat return $ret; } -# Find/append $section in ini $file and tqreplace/append +# Find/append $section in ini $file and replace/append # $var = $value pair. FIXME: should reimplement with # interfaces style. This is too large. sub gst_replace_ini @@ -1149,7 +1149,7 @@ sub gst_replace_interfaces_iface_stanza_delete return &gst_file_buffer_save ($buff, $file); } -# Find $iface stanza line and tqreplace $pos value (ie the method). +# Find $iface stanza line and replace $pos value (ie the method). sub gst_replace_interfaces_stanza_value { my ($file, $iface, $pos, $value) = @_; @@ -1323,7 +1323,7 @@ sub gst_replace_pump_add_device } # Find a "device" section for $iface and -# tqreplace/add/delete the $key option inside the section. +# replace/add/delete the $key option inside the section. sub gst_replace_pump_iface_option_str { my ($file, $iface, $key, $value) = @_; @@ -1448,11 +1448,11 @@ sub gst_replace_alchemist_ensure_list_types my ($model, $varpath, $setpath) = @_; my ($branch, @path); - $branch = &gst_xml_model_tqfind ($model, $varpath); + $branch = &gst_xml_model_find ($model, $varpath); @path = split /\//, $setpath; # NOTE: The following could be done with a depth-iterator callback from a func - # similar to gst_xml_model_tqfind (). + # similar to gst_xml_model_find (). for $elem (@path) { @@ -1511,7 +1511,7 @@ sub gst_replace_alchemist_print &gst_xml_model_set_attribute ($branch, "VALUE", $value); &gst_xml_model_set_attribute ($branch, "TYPE", $type); - $branch = &gst_xml_model_tqfind ($model, "/adm_context/datatree/printconf/print_queues/" . $printer); + $branch = &gst_xml_model_find ($model, "/adm_context/datatree/printconf/print_queues/" . $printer); &gst_xml_model_set_attribute ($branch, "ATOMIC", "TRUE"); return &gst_xml_model_save ($model, $file, $compressed); @@ -1536,7 +1536,7 @@ sub gst_replace_alchemist_print_option foreach $o (@$options) { - my $opt_node = &gst_xml_model_tqfind ($o, "name"); + my $opt_node = &gst_xml_model_find ($o, "name"); next if (!$opt_node); if (&gst_xml_model_get_attribute ($opt_node, "VALUE") eq $name) diff --git a/knetworkconf/backends/report.pl.in b/knetworkconf/backends/report.pl.in index ceaadd6..68326dd 100644 --- a/knetworkconf/backends/report.pl.in +++ b/knetworkconf/backends/report.pl.in @@ -260,7 +260,7 @@ sub gst_report "file_open_read_failed" => ["warn", "Could not open [%s] for reading."], "file_open_read_success" => ["info", "Reading options from [%s]."], "file_open_write_failed" => ["error", "Failed to write to [%s]."], - "file_open_write_create" => ["warn", "Could not tqfind [%s] for writing. Creating [%s]."], + "file_open_write_create" => ["warn", "Could not find [%s] for writing. Creating [%s]."], "file_open_write_success" => ["info", "Writing to [%s]."], "file_run_pipe_failed" => ["warn", "Failed to pipe command [%s] for reading."], "file_run_pipe_success" => ["info", "Piping command [%s] for reading."], @@ -269,7 +269,7 @@ sub gst_report "file_backup_rotate" => ["info", "Backup directory [%s] was rotated."], "file_backup_success" => ["info", "Saved backup for [%s]."], "file_open_filter_failed" => ["warn", "No file to patch: [%s]."], - "file_open_filter_create" => ["warn", "Could not tqfind [%s] for patching. Creating [%s]."], + "file_open_filter_create" => ["warn", "Could not find [%s] for patching. Creating [%s]."], "file_open_filter_success" => ["info", "Found [%s]. Patching [%s]."], "file_buffer_load" => ["info", "Loading file [%s] to buffer."], "file_buffer_save" => ["info", "Saving buffer to file [%s]."], diff --git a/knetworkconf/backends/type1inst b/knetworkconf/backends/type1inst index bb624be..86d6425 100755 --- a/knetworkconf/backends/type1inst +++ b/knetworkconf/backends/type1inst @@ -876,7 +876,7 @@ sub font_sample { die_bug("Bad argument(s) to font_sample()!\n"); } -# Here we create a full page sample for the current font. It tqcontains +# Here we create a full page sample for the current font. It contains # a large point-size version, a normal sized version, and a small version. $text = <<"TEXT"; diff --git a/knetworkconf/backends/xml.pl.in b/knetworkconf/backends/xml.pl.in index dfd41cd..eed6b88 100644 --- a/knetworkconf/backends/xml.pl.in +++ b/knetworkconf/backends/xml.pl.in @@ -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_tqfind +sub gst_xml_model_find { my ($model, $varpath) = @_; my ($branch, @path); @@ -855,7 +855,7 @@ sub gst_xml_model_add my ($branch, @path); @path = split /\//, $addpath; - $branch = &gst_xml_model_tqfind ($model, $varpath); + $branch = &gst_xml_model_find ($model, $varpath); if ($branch == undef) { return -1; @@ -932,7 +932,7 @@ sub gst_xml_model_remove my ($branch, $i); @path = split /\//, $addpath; - $branch = &gst_xml_model_tqfind ($model, $varpath); + $branch = &gst_xml_model_find ($model, $varpath); if ($branch == undef) { return -1; diff --git a/knetworkconf/knetworkconf-mdk.spec b/knetworkconf/knetworkconf-mdk.spec index 4267f34..ce65b36 100644 --- a/knetworkconf/knetworkconf-mdk.spec +++ b/knetworkconf/knetworkconf-mdk.spec @@ -80,7 +80,7 @@ rm -rf $RPM_BUILD_ROOT/* %files -f %name.lang -#Quick Hack: for some reason the %find_lang command doesn't tqfind +#Quick Hack: for some reason the %find_lang command doesn't find #the translations files, it outputs a knetworkconf.lang file full #of empty lines instead of the following ones: %lang(de) /usr/share/locale/de/LC_MESSAGES/knetworkconfmodule.mo diff --git a/knetworkconf/knetworkconf/kaddressvalidator.cpp b/knetworkconf/knetworkconf/kaddressvalidator.cpp index f3fabe7..c1f086a 100644 --- a/knetworkconf/knetworkconf/kaddressvalidator.cpp +++ b/knetworkconf/knetworkconf/kaddressvalidator.cpp @@ -33,7 +33,7 @@ bool KAddressValidator::isValidIPAddress(TQString addr){ int i; int number; bool ok; - if ((addr.tqcontains('.') > 3) || (addr.length() > 15)) + if ((addr.contains('.') > 3) || (addr.length() > 15)) return false; for (i = 0; i < 4; i++) { diff --git a/knetworkconf/knetworkconf/knetworkconf.cpp b/knetworkconf/knetworkconf/knetworkconf.cpp index 11dbad0..c03b762 100644 --- a/knetworkconf/knetworkconf/knetworkconf.cpp +++ b/knetworkconf/knetworkconf/knetworkconf.cpp @@ -104,7 +104,7 @@ void KNetworkConf::loadNetworkDevicesInfo() { if ( device->getType() != "loopback" ) { - if (klvCardList->tqfindItem(device->getDeviceName(),0,CaseSensitive|ExactMatch) == 0) + if (klvCardList->findItem(device->getDeviceName(),0,CaseSensitive|ExactMatch) == 0) { TQListViewItem * item = new TQListViewItem( klvCardList, 0 ); @@ -740,7 +740,7 @@ void KNetworkConf::verifyDeviceStateChanged(){ } else if (commandOutput == "\n<!-- GST: end of request -->") { - TQListViewItem *item = klvCardList->tqfindItem(currentDevice,0,ExactMatch); + TQListViewItem *item = klvCardList->findItem(currentDevice,0,ExactMatch); if (item != NULL) { dev = getDeviceInfo(currentDevice); diff --git a/knetworkconf/knetworkconf/knetworkconfigparser.cpp b/knetworkconf/knetworkconf/knetworkconfigparser.cpp index 093ab9f..1bba25c 100644 --- a/knetworkconf/knetworkconf/knetworkconfigparser.cpp +++ b/knetworkconf/knetworkconf/knetworkconfigparser.cpp @@ -820,7 +820,7 @@ void KNetworkConfigParser::readNetworkInfo() //If the platform where knetworkconf is running isn't supported, show the //user a dialog with all the supported platforms to choose. - if (xmlErr.tqcontains("platform_unsup::")) + if (xmlErr.contains("platform_unsup::")) { connect( this, TQT_SIGNAL(readyLoadingSupportedPlatforms()), this, TQT_SLOT(showSupportedPlatformsDialogSlot()) ); loadSupportedPlatforms(); @@ -1081,92 +1081,92 @@ void KNetworkConfigParser::showSupportedPlatformsDialogSlot(){ key = key.section(":",0,0); TQString name = (*it); name = name.section(":",1,1); - if (key.tqcontains("debian")) + if (key.contains("debian")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/debian.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("mandriva")) + else if (key.contains("mandriva")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/mandriva.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("conectiva")) + else if (key.contains("conectiva")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/conectiva.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("pld")) + else if (key.contains("pld")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/pld.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("redhat")) + else if (key.contains("redhat")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/redhat.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("suse")) + else if (key.contains("suse")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/suse.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("turbolinux")) + else if (key.contains("turbolinux")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/turbolinux.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("fedora")) + else if (key.contains("fedora")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/fedora.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("openna")) + else if (key.contains("openna")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/openna.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("slackware")) + else if (key.contains("slackware")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/slackware.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("freebsd")) + else if (key.contains("freebsd")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/freebsd.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("gentoo")) + else if (key.contains("gentoo")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/gentoo.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("blackpanther")) + else if (key.contains("blackpanther")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/blackpanther.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("rpath")) + else if (key.contains("rpath")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/rpath.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("vine")) + else if (key.contains("vine")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/vine.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("ubuntu")) + else if (key.contains("ubuntu")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/kubuntu.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("yoper")) + else if (key.contains("yoper")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/yoper.png")); dialog->klbDistroList->insertItem(distroImg, name); } - else if (key.tqcontains("ark")) + else if (key.contains("ark")) { TQPixmap distroImg(locate("data","knetworkconf/pixmaps/ark.png")); dialog->klbDistroList->insertItem(distroImg, name); diff --git a/knetworkconf/update_backends.sh b/knetworkconf/update_backends.sh index d6a5e0c..9b77d13 100755 --- a/knetworkconf/update_backends.sh +++ b/knetworkconf/update_backends.sh @@ -35,7 +35,7 @@ fi diractual=`pwd` cd $1; -cp -f AUTHORS debug.pl.in file.pl.in general.pl.in guess_system.sh mkinstalldirs network-conf.in network.pl.in NEWS parse.pl.in platform.pl.in README tqreplace.pl.in report.pl.in service-list.pl.in service.pl.in system-tools-backends.pc.in type1inst util.pl.in xml.pl.in process.pl.in $2 +cp -f AUTHORS debug.pl.in file.pl.in general.pl.in guess_system.sh mkinstalldirs network-conf.in network.pl.in NEWS parse.pl.in platform.pl.in README replace.pl.in report.pl.in service-list.pl.in service.pl.in system-tools-backends.pc.in type1inst util.pl.in xml.pl.in process.pl.in $2 echo echo 'Ready, dont forget to check configure.in.in or Makefile.am to see if they need further updating.' |