diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:59:52 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-04 03:15:15 +0200 |
commit | 632b7d40cf87562965abb5c7dffc1bae509bad2c (patch) | |
tree | 65cd81a82890e9be95bf2ad49d1174a36369ff4d /klaptopdaemon | |
parent | 7ee38ebc22d177c8f0f4805d0e8479736ec94f79 (diff) | |
download | tdeutils-632b7d40cf87562965abb5c7dffc1bae509bad2c.tar.gz tdeutils-632b7d40cf87562965abb5c7dffc1bae509bad2c.zip |
Remove additional unneeded tq method conversions
(cherry picked from commit 7ea89afa119615e547323a7a482ea7fef8e67029)
Diffstat (limited to 'klaptopdaemon')
-rw-r--r-- | klaptopdaemon/acpi.cpp | 2 | ||||
-rw-r--r-- | klaptopdaemon/apm.cpp | 8 | ||||
-rw-r--r-- | klaptopdaemon/buttons.cpp | 2 | ||||
-rw-r--r-- | klaptopdaemon/daemondock.cpp | 18 | ||||
-rw-r--r-- | klaptopdaemon/kpcmcia.cpp | 6 | ||||
-rw-r--r-- | klaptopdaemon/kpcmciainfo.cpp | 24 | ||||
-rw-r--r-- | klaptopdaemon/laptop_daemon.cpp | 4 | ||||
-rw-r--r-- | klaptopdaemon/portable.cpp | 12 | ||||
-rw-r--r-- | klaptopdaemon/power.cpp | 2 | ||||
-rw-r--r-- | klaptopdaemon/profile.cpp | 2 | ||||
-rw-r--r-- | klaptopdaemon/sony.cpp | 2 | ||||
-rw-r--r-- | klaptopdaemon/warning.cpp | 2 | ||||
-rw-r--r-- | klaptopdaemon/xautolock_diy.c | 18 |
13 files changed, 51 insertions, 51 deletions
diff --git a/klaptopdaemon/acpi.cpp b/klaptopdaemon/acpi.cpp index f2df8d1..caab4ab 100644 --- a/klaptopdaemon/acpi.cpp +++ b/klaptopdaemon/acpi.cpp @@ -145,7 +145,7 @@ AcpiConfig::AcpiConfig (TQWidget * parent, const char *name) top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); load(); diff --git a/klaptopdaemon/apm.cpp b/klaptopdaemon/apm.cpp index 39d287d..b31efc7 100644 --- a/klaptopdaemon/apm.cpp +++ b/klaptopdaemon/apm.cpp @@ -100,7 +100,7 @@ ApmConfig::ApmConfig (TQWidget * parent, const char *name) "ways you can enable this application, either make the file " "/proc/apm writeable by anyone every time your system boots " "or use the button below to make the %1 application " - "set-uid root").tqarg(apm_name), this ); + "set-uid root").arg(apm_name), this ); tmp_label->setAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); TQHBoxLayout *ll = new TQHBoxLayout(top_layout); @@ -141,7 +141,7 @@ ApmConfig::ApmConfig (TQWidget * parent, const char *name) top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); load(); @@ -158,7 +158,7 @@ void ApmConfig::setupHelper() if (!kdesu.isEmpty()) { int rc = KMessageBox::warningContinueCancel(0, i18n("You will need to supply a root password " - "to allow the privileges of the %1 application to change.").tqarg(apm_name), + "to allow the privileges of the %1 application to change.").arg(apm_name), "KLaptopDaemon", KStdGuiItem::cont(), ""); if (rc == KMessageBox::Continue) { @@ -170,7 +170,7 @@ void ApmConfig::setupHelper() proc.start(KProcess::Block); // run it sync so has_apm below sees the results } } else { - KMessageBox::sorry(0, i18n("%1 cannot be enabled because kdesu cannot be found. Please make sure that it is installed correctly.").tqarg(TQString(apm_name)), + KMessageBox::sorry(0, i18n("%1 cannot be enabled because kdesu cannot be found. Please make sure that it is installed correctly.").arg(TQString(apm_name)), i18n("KLaptopDaemon")); } laptop_portable::apm_set_mask(enablestandby, enablesuspend); diff --git a/klaptopdaemon/buttons.cpp b/klaptopdaemon/buttons.cpp index 79d5de6..cec7c60 100644 --- a/klaptopdaemon/buttons.cpp +++ b/klaptopdaemon/buttons.cpp @@ -278,7 +278,7 @@ ButtonsConfig::ButtonsConfig (TQWidget * parent, const char *name) top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this ), 0, TQt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this ), 0, TQt::AlignRight ); } } diff --git a/klaptopdaemon/daemondock.cpp b/klaptopdaemon/daemondock.cpp index 33ee702..bf7d4f8 100644 --- a/klaptopdaemon/daemondock.cpp +++ b/klaptopdaemon/daemondock.cpp @@ -215,7 +215,7 @@ laptop_dock::invokeBrightness() TQPoint pos = TQCursor::pos(); int x = pos.x(); int y = pos.y(); - y -= brightness_widget->tqgeometry().height(); + y -= brightness_widget->geometry().height(); int w = brightness_widget->width(); int h = brightness_widget->height(); if (x+w > sw) @@ -375,10 +375,10 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event ) TQString num3; num3.setNum(pdaemon->left%60); num3 = num3.rightJustify(2, '0'); - tmp = i18n("%1:%2 hours left").tqarg(pdaemon->left/60).tqarg(num3); + tmp = i18n("%1:%2 hours left").arg(pdaemon->left/60).arg(num3); } else { // no remaining time available - tmp = i18n("%1% charged").tqarg(pdaemon->val); + tmp = i18n("%1% charged").arg(pdaemon->val); } } else { tmp = i18n("No Battery"); @@ -402,7 +402,7 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event ) TQString speed = laptop_portable::cpu_frequency(); if (!speed.isEmpty()) { popup->insertSeparator(); - popup->insertItem(i18n("CPU: %1").tqarg(speed)); + popup->insertItem(i18n("CPU: %1").arg(speed)); } } @@ -449,7 +449,7 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event ) // add a few bits of information thisSub->insertSeparator(); - thisSub->insertItem(slotname.tqarg(thiscard->num()+1)); + thisSub->insertItem(slotname.arg(thiscard->num()+1)); if (thiscard->status() & CARD_STATUS_READY) thisSub->insertItem(i18n("Ready")); if (thiscard->status() & CARD_STATUS_BUSY) @@ -641,10 +641,10 @@ quit: num3.setNum(pdaemon->left%60); num3 = num3.rightJustify(2, '0'); tmp = i18n("Plugged in - %1% charged (%2:%3 hours left)") - .tqarg(pdaemon->val).tqarg(pdaemon->left/60).tqarg(num3); + .arg(pdaemon->val).arg(pdaemon->left/60).arg(num3); } else { // no remaining time available - tmp = i18n("Plugged in - %1% charged").tqarg(pdaemon->val); + tmp = i18n("Plugged in - %1% charged").arg(pdaemon->val); } } else { tmp = i18n("Plugged in - no battery"); @@ -658,9 +658,9 @@ quit: num3.setNum(pdaemon->left%60); num3 = num3.rightJustify(2, '0'); tmp = i18n("Running on batteries - %1% charged (%2:%3 hours left)") - .tqarg(pdaemon->val).tqarg(pdaemon->left/60).tqarg(num3); + .arg(pdaemon->val).arg(pdaemon->left/60).arg(num3); } else { - tmp = i18n("Running on batteries - %1% charged").tqarg(pdaemon->val); + tmp = i18n("Running on batteries - %1% charged").arg(pdaemon->val); } } else { // running without any power source... diff --git a/klaptopdaemon/kpcmcia.cpp b/klaptopdaemon/kpcmcia.cpp index 83e4971..50d7b4c 100644 --- a/klaptopdaemon/kpcmcia.cpp +++ b/klaptopdaemon/kpcmcia.cpp @@ -175,7 +175,7 @@ tv.tv_sec = 0; tv.tv_usec = 0; TQTextStream ts(&f); bool foundit = false; TQString _thisreg = "^Socket %1: "; - TQRegExp thisreg ( _thisreg.tqarg(_num) ); + TQRegExp thisreg ( _thisreg.arg(_num) ); if (flock(f.handle(), LOCK_SH)) return updated; @@ -500,7 +500,7 @@ TQFile df("/proc/devices"); TQString thisreg; thisreg = "^[0-9]+ %1$"; - thisreg = thisreg.tqarg(x); + thisreg = thisreg.arg(x); if (df.open(IO_ReadOnly)) { TQTextStream t(&df); @@ -523,7 +523,7 @@ static int openDevice(dev_t dev) { TQString tmp_path = locateLocal("tmp", KGlobal::instance()->instanceName()); TQString ext = "_socket%1"; - tmp_path += ext.tqarg((int)dev); + tmp_path += ext.arg((int)dev); int rc = mknod(tmp_path.latin1(), (S_IFCHR | S_IREAD), dev); if (rc < 0) return -1; diff --git a/klaptopdaemon/kpcmciainfo.cpp b/klaptopdaemon/kpcmciainfo.cpp index bb18a53..3e91f2d 100644 --- a/klaptopdaemon/kpcmciainfo.cpp +++ b/klaptopdaemon/kpcmciainfo.cpp @@ -136,7 +136,7 @@ void KPCMCIAInfo::prepareCards() { connect(this, TQT_SIGNAL(updateNow()), tp, TQT_SLOT(update())); connect(tp, TQT_SIGNAL(setStatusBar(const TQString&)), this, TQT_SLOT(slotTabSetStatus(const TQString&))); tp->resize(_mainTab->sizeHint()); - _mainTab->addTab(tp, tabname.tqarg(i+1)); + _mainTab->addTab(tp, tabname.arg(i+1)); _pages.insert(i, tp); } } @@ -235,10 +235,10 @@ void KPCMCIAInfoPage::update() { _card_name->setText(_card->name()); _card_name->resize(_card_name->sizeHint()); tmp = i18n("Card type: %1 "); - _card_type->setText(tmp.tqarg(_card->type())); + _card_type->setText(tmp.arg(_card->type())); _card_type->resize(_card_type->sizeHint()); tmp = i18n("Driver: %1"); - _card_driver->setText(tmp.tqarg(_card->driver())); + _card_driver->setText(tmp.arg(_card->driver())); _card_driver->resize(_card_driver->sizeHint()); tmp = i18n("IRQ: %1%2"); TQString tmp2; @@ -256,32 +256,32 @@ void KPCMCIAInfoPage::update() { tmp2 = ""; }; if (_card->irq() <= 0) - _card_irq->setText(tmp.tqarg(i18n("none")).tqarg("")); - else _card_irq->setText(tmp.tqarg(_card->irq()).tqarg(tmp2)); + _card_irq->setText(tmp.arg(i18n("none")).arg("")); + else _card_irq->setText(tmp.arg(_card->irq()).arg(tmp2)); _card_irq->resize(_card_irq->sizeHint()); tmp = i18n("I/O port(s): %1"); if (_card->ports().isEmpty()) - _card_io->setText(tmp.tqarg(i18n("none"))); - else _card_io->setText(tmp.tqarg(_card->ports())); + _card_io->setText(tmp.arg(i18n("none"))); + else _card_io->setText(tmp.arg(_card->ports())); _card_io->resize(_card_io->sizeHint()); tmp = i18n("Bus: %1 bit %2"); if (_card->busWidth() == 0) _card_bus->setText(i18n("Bus: unknown")); - else _card_bus->setText(tmp.tqarg(_card->busWidth()).tqarg(_card->busWidth() == 16 ? i18n("PC Card") : i18n("Cardbus"))); + else _card_bus->setText(tmp.arg(_card->busWidth()).arg(_card->busWidth() == 16 ? i18n("PC Card") : i18n("Cardbus"))); _card_bus->resize(_card_bus->sizeHint()); tmp = i18n("Device: %1"); - _card_dev->setText(tmp.tqarg(_card->device())); + _card_dev->setText(tmp.arg(_card->device())); _card_dev->resize(_card_dev->sizeHint()); tmp = i18n("Power: +%1V"); - _card_vcc->setText(tmp.tqarg(_card->vcc()/10)); + _card_vcc->setText(tmp.arg(_card->vcc()/10)); _card_vcc->resize(_card_vcc->sizeHint()); tmp = i18n("Programming power: +%1V, +%2V"); - _card_vpp->setText(tmp.tqarg(_card->vpp()/10).tqarg(_card->vpp2()/10)); + _card_vpp->setText(tmp.arg(_card->vpp()/10).arg(_card->vpp2()/10)); _card_vpp->resize(_card_vpp->sizeHint()); tmp = i18n("Configuration base: 0x%1"); if (_card->configBase() == 0) _card_cfgbase->setText(i18n("Configuration base: none")); - else _card_cfgbase->setText(tmp.tqarg(_card->configBase(), -1, 16)); + else _card_cfgbase->setText(tmp.arg(_card->configBase(), -1, 16)); _card_cfgbase->resize(_card_cfgbase->sizeHint()); if (!(_card->status() & (CARD_STATUS_READY|CARD_STATUS_SUSPEND))) { diff --git a/klaptopdaemon/laptop_daemon.cpp b/klaptopdaemon/laptop_daemon.cpp index 2f774d0..5b710c5 100644 --- a/klaptopdaemon/laptop_daemon.cpp +++ b/klaptopdaemon/laptop_daemon.cpp @@ -537,13 +537,13 @@ void laptop_daemon::haveBatteryLow(int t, const int num, const int type) if (type) { if (s.time_based_action_critical) { KPassivePopup::message(i18n("Battery power is running out."), - i18n("%1 % charge left.").tqarg(num), + i18n("%1 % charge left.").arg(num), BarIcon("laptop_battery"), dock_widget, 0, 20000); } else { // Will this ever be reached? KPassivePopup::message(i18n("Battery power is running out."), - i18n("%1 % charge left.").tqarg(num), + i18n("%1 % charge left.").arg(num), BarIcon("laptop_battery"), dock_widget, 0, 20000); } diff --git a/klaptopdaemon/portable.cpp b/klaptopdaemon/portable.cpp index dbcb57c..0ac3568 100644 --- a/klaptopdaemon/portable.cpp +++ b/klaptopdaemon/portable.cpp @@ -199,7 +199,7 @@ pmu_read(apm_info *ap) int timerem = 0; int maxcharge = 0; for (int i = 0; i < bcnt; i++) { - TQFile bf(TQString("/proc/pmu/battery_%1").tqarg(i)); + TQFile bf(TQString("/proc/pmu/battery_%1").arg(i)); if (!bf.exists() || !bf.open(IO_ReadOnly)) continue; @@ -1226,7 +1226,7 @@ laptop_portable::get_battery_status(int &num_batteries, TQStringList &names, TQS for(unsigned int i = 0; i < acpi_batteries.count(); ++i) { acpi_battery_info& bat = acpi_batteries[i]; names.append(bat.name); - values.append(TQString("%1").tqarg(bat.percentage)); + values.append(TQString("%1").arg(bat.percentage)); state.append(bat.present ? "yes" : "no"); } return; @@ -1330,11 +1330,11 @@ TQString laptop_portable::cpu_frequency() { continue; if (ll.first().stripWhiteSpace() == "cpu MHz") { - rc = i18n("%1 MHz (%2)").tqarg(ll.last().stripWhiteSpace()).tqarg(rc); + rc = i18n("%1 MHz (%2)").arg(ll.last().stripWhiteSpace()).arg(rc); break; } else if (ll.first().stripWhiteSpace() == "clock") { - rc = TQString("%1 (%2)").tqarg(ll.last().stripWhiteSpace()).tqarg(rc); + rc = TQString("%1 (%2)").arg(ll.last().stripWhiteSpace()).arg(rc); break; } } @@ -1581,7 +1581,7 @@ get_acpi_list(char p, int *map, const char *dev, TQStringList &list, int &index, TQString l; f.readLine(l, 500); if (l.contains("active limit", false)) { - TQRegExp rx(TQString("%1(\\d+)").tqarg(p)); + TQRegExp rx(TQString("%1(\\d+)").arg(p)); if (rx.search(l) >= 0) { bool ok; int min = rx.cap(1).toInt(&ok); @@ -1706,7 +1706,7 @@ static int get_cpufreq_24_state(TQStringList &states, int ¤t, const TQStri f.close(); cpufreq_minmax_frequency[i] = buffer; unsigned int val = buffer.toUInt() / 1000; - states.append(i18n("%1 MHz").tqarg(val)); + states.append(i18n("%1 MHz").arg(val)); if(buffer.stripWhiteSpace() == cur) current = i; } diff --git a/klaptopdaemon/power.cpp b/klaptopdaemon/power.cpp index 6c131dc..56ba373 100644 --- a/klaptopdaemon/power.cpp +++ b/klaptopdaemon/power.cpp @@ -317,7 +317,7 @@ PowerConfig::PowerConfig (TQWidget * parent, const char *name) top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this ), 0, TQt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this ), 0, TQt::AlignRight ); } } diff --git a/klaptopdaemon/profile.cpp b/klaptopdaemon/profile.cpp index 4b0d9c5..f71325f 100644 --- a/klaptopdaemon/profile.cpp +++ b/klaptopdaemon/profile.cpp @@ -213,7 +213,7 @@ ProfileConfig::ProfileConfig(TQWidget * parent, const char *name) tmp_label->setAlignment( TQt::WordBreak ); top_layout->addWidget( tmp_label ); top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); load(); diff --git a/klaptopdaemon/sony.cpp b/klaptopdaemon/sony.cpp index 497a566..398476b 100644 --- a/klaptopdaemon/sony.cpp +++ b/klaptopdaemon/sony.cpp @@ -99,7 +99,7 @@ SonyConfig::SonyConfig(TQWidget * parent, const char *name) top_layout->addStretch(1); - top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); + top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); load(); diff --git a/klaptopdaemon/warning.cpp b/klaptopdaemon/warning.cpp index 7fb7ddc..935e47d 100644 --- a/klaptopdaemon/warning.cpp +++ b/klaptopdaemon/warning.cpp @@ -288,7 +288,7 @@ WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name) } grid->setRowStretch(curRow++, 1); - grid->addWidget(new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), + grid->addWidget(new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), curRow, 1, TQt::AlignRight); } diff --git a/klaptopdaemon/xautolock_diy.c b/klaptopdaemon/xautolock_diy.c index c816ae9..b9df2f8 100644 --- a/klaptopdaemon/xautolock_diy.c +++ b/klaptopdaemon/xautolock_diy.c @@ -96,8 +96,8 @@ selectEvents (Window window, Bool substructureOnly) { Window root; /* root window of the window */ Window parent; /* parent of the window */ - Window* tqchildren; /* tqchildren of the window */ - unsigned nofChildren = 0; /* number of tqchildren */ + Window* children; /* children of the window */ + unsigned nofChildren = 0; /* number of children */ unsigned i; /* loop counter */ XWindowAttributes attribs; /* attributes of the window */ @@ -107,12 +107,12 @@ selectEvents (Window window, Bool substructureOnly) * Start by querying the server about the root and parent windows. */ if (!XQueryTree (queue.display, window, &root, &parent, - &tqchildren, &nofChildren)) + &children, &nofChildren)) { return; } - if (nofChildren) (void) XFree ((char*) tqchildren); + if (nofChildren) (void) XFree ((char*) children); /* * Build the appropriate event mask. The basic idea is that we don't @@ -168,7 +168,7 @@ selectEvents (Window window, Bool substructureOnly) } /* - * Now ask for the list of tqchildren again, since it might have changed + * Now ask for the list of children again, since it might have changed * in between the last time and us selecting SubstructureNotifyMask. * * There is a (very small) chance that we might process a subtree twice: @@ -179,20 +179,20 @@ selectEvents (Window window, Bool substructureOnly) * isn't required... */ if (!XQueryTree (queue.display, window, &root, &parent, - &tqchildren, &nofChildren)) + &children, &nofChildren)) { return; } /* - * Now do the same thing for all tqchildren. + * Now do the same thing for all children. */ for (i = 0; i < nofChildren; ++i) { - selectEvents (tqchildren[i], substructureOnly); + selectEvents (children[i], substructureOnly); } - if (nofChildren) (void) XFree ((char*) tqchildren); + if (nofChildren) (void) XFree ((char*) children); } #if 0 |