Browse Source

rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpowersave@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19
tpearson 7 years ago
parent
commit
fe9b5d95c9

+ 2
- 2
COPYING View File

@@ -59,7 +59,7 @@ modification follow.
59 59
 		    GNU GENERAL PUBLIC LICENSE
60 60
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 61
 
62
-  0. This License applies to any program or other work which tqcontains
62
+  0. This License applies to any program or other work which contains
63 63
 a notice placed by the copyright holder saying it may be distributed
64 64
 under the terms of this General Public License.  The "Program", below,
65 65
 refers to any such program or work, and a "work based on the Program"
@@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following:
154 154
 
155 155
 The source code for a work means the preferred form of the work for
156 156
 making modifications to it.  For an executable work, complete source
157
-code means all the source code for all modules it tqcontains, plus any
157
+code means all the source code for all modules it contains, plus any
158 158
 associated interface definition files, plus the scripts used to
159 159
 control compilation and installation of the executable.  However, as a
160 160
 special exception, the source code distributed need not include

+ 1
- 1
ChangeLog View File

@@ -3787,7 +3787,7 @@
3787 3787
 2006-03-13  Danny Kukawka  <danny.kukawka@web.de>
3788 3788
 
3789 3789
 	* src/detaileddialog.cpp: added slightly adopted patch from Timo 
3790
-	Hoenig <thoenig@suse.de> to tqreplace 'Mhz' with correct 'MHz'
3790
+	Hoenig <thoenig@suse.de> to replace 'Mhz' with correct 'MHz'
3791 3791
 	* po/*.po, po/kpowersave.pot: updated translation files for this
3792 3792
 	changes.
3793 3793
 

+ 1
- 1
ChangeLog.package View File

@@ -158,7 +158,7 @@ Tue Apr 24 16:53:13 CEST 2007 - dkukawka@suse.de
158 158
 -  updated to current SVN HEAD v0.7.2_SVN20070424:
159 159
    - changed set CPU Freq governor to reuse code and integrated
160 160
      patch for b.n.c #229234
161
-   - fixed b.n.c #266243: check if info.capability tqcontains
161
+   - fixed b.n.c #266243: check if info.capability contains
162 162
      laptop_panel instead for info.category
163 163
 
164 164
 -------------------------------------------------------------------

+ 1
- 1
Doxyfile View File

@@ -17,7 +17,7 @@ ABBREVIATE_BRIEF       = "The $name class" \
17 17
                          is \
18 18
                          provides \
19 19
                          specifies \
20
-                         tqcontains \
20
+                         contains \
21 21
                          represents \
22 22
                          a \
23 23
                          an \

+ 1
- 1
src/Makefile.am View File

@@ -93,7 +93,7 @@ shellrc_DATA = eventsrc
93 93
 SUBDIRS = pics
94 94
 messages:
95 95
 	$(EXTRACTRC) *ui eventsrc >> rc.cpp
96
-	$(XGETTEXT) `tqfind . -name \*.h -o -name \*.H -o -name \*.cpp -o -name \*.C` -o $(podir)/kpowersave.pot
96
+	$(XGETTEXT) `find . -name \*.h -o -name \*.H -o -name \*.cpp -o -name \*.C` -o $(podir)/kpowersave.pot
97 97
 	rm -f rc.cpp
98 98
 
99 99
 install-data-local:

+ 1
- 1
src/blacklisteditdialog.cpp View File

@@ -129,7 +129,7 @@ void blacklistEditDialog::pB_add_released(){
129 129
 	// remove the whitespaces and check if text is empty
130 130
 	if(text.stripWhiteSpace() != "") {
131 131
 		// check if the entry is already present
132
-		if(!lB_blacklist->tqfindItem(text, TQt::ExactMatch)) {
132
+		if(!lB_blacklist->findItem(text, TQt::ExactMatch)) {
133 133
 			lB_blacklist->insertItem(text);
134 134
 			lB_blacklist->sort();
135 135
 			blacklist.append(text);

+ 8
- 8
src/configuredialog.cpp View File

@@ -205,7 +205,7 @@ void ConfigureDialog::selectScheme (TQString _scheme){
205 205
 
206 206
 	// select the current scheme in the listbox
207 207
 	if(!_scheme.isEmpty()) {
208
-		int pos = schemes.tqfindIndex(_scheme);
208
+		int pos = schemes.findIndex(_scheme);
209 209
 		if(pos > -1) {
210 210
 			listBox_schemes->setCurrentItem(pos);
211 211
 			currentScheme = pos;
@@ -451,7 +451,7 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
451 451
 	// set autosuspend related settings
452 452
 	TQString _action = kconfig->readEntry("autoInactiveAction", "NULL");
453 453
 	if( _action != "NULL") {
454
-		int _index = actions.tqfindIndex(_action);
454
+		int _index = actions.findIndex(_action);
455 455
 		if( _index != -1) { 
456 456
 			cB_autoInactivity->setCurrentItem( _index );
457 457
 			cB_autoInactivity_activated( _index );
@@ -473,7 +473,7 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
473 473
 			kconfig->setGroup("default-scheme");
474 474
 			 _action = kconfig->readEntry("autoInactiveAction", "NULL");
475 475
 			if(_action != "NULL") {
476
-				int _index = actions.tqfindIndex(_action);
476
+				int _index = actions.findIndex(_action);
477 477
 				if( _index != -1) { 
478 478
 					cB_autoInactivity->setCurrentItem( _index );
479 479
 					tL_autoInactivity_After->setEnabled(true);
@@ -734,8 +734,8 @@ void ConfigureDialog::setGeneralSettings() {
734 734
 	// default scheme tab:
735 735
 	TQString _ac_scheme = kconfig->readEntry( "ac_scheme", "Performance");
736 736
 	TQString _bat_scheme = kconfig->readEntry( "battery_scheme", "Powersave");
737
-	cB_acScheme->setCurrentItem(schemes.tqfindIndex(_ac_scheme));
738
-	cB_batteryScheme->setCurrentItem(schemes.tqfindIndex(_bat_scheme));
737
+	cB_acScheme->setCurrentItem(schemes.findIndex(_ac_scheme));
738
+	cB_batteryScheme->setCurrentItem(schemes.findIndex(_bat_scheme));
739 739
 
740 740
 	kdDebugFuncOut(trace);
741 741
 }
@@ -1042,7 +1042,7 @@ void ConfigureDialog::pB_newScheme_clicked(){
1042 1042
 		} else {
1043 1043
 			_error = TQString();
1044 1044
 			if (!_new.isEmpty()) {
1045
-				if ( schemes.tqcontains(_new))
1045
+				if ( schemes.contains(_new))
1046 1046
 					_error = i18n("Error: A scheme with this name already exist.\n");
1047 1047
 				else 
1048 1048
 					_end = true;
@@ -1780,10 +1780,10 @@ TQString ConfigureDialog::mapActionToDescription( TQString action ) {
1780 1780
 	} else if (action.startsWith("LOGOUT_DIALOG")) {
1781 1781
 		ret = i18n("Logout Dialog");
1782 1782
 	} else if (action.startsWith("SUSPEND2DISK")) {
1783
-		if (actions.tqcontains("Suspend to Disk"))
1783
+		if (actions.contains("Suspend to Disk"))
1784 1784
 			ret = i18n("Suspend to Disk");
1785 1785
 	} else if (action.startsWith("SUSPEND2RAM")) {
1786
-		if (actions.tqcontains("Suspend to RAM"))
1786
+		if (actions.contains("Suspend to RAM"))
1787 1787
 			ret = i18n("Suspend to RAM");
1788 1788
 	} else if (action.startsWith("CPUFRETQ_POWERSAVE")) {
1789 1789
 		if (hwinfo->supportCPUFreq())

+ 14
- 14
src/hardware.cpp View File

@@ -250,7 +250,7 @@ void HardwareInfo::processMessage (msg_type type, TQString message, TQString val
250 250
 					}
251 251
 				}
252 252
 			} else if (message.startsWith("DeviceRemoved")) {
253
-				if (allUDIs.tqcontains(value)) {
253
+				if (allUDIs.contains(value)) {
254 254
 					if (checkIfHandleDevice(value, &_type)) {
255 255
 						switch (_type) {
256 256
 							case BATTERY:
@@ -276,7 +276,7 @@ void HardwareInfo::processMessage (msg_type type, TQString message, TQString val
276 276
 			}
277 277
 			break;
278 278
 		case HAL_PROPERTY_CHANGED:
279
-			if (!message.isEmpty() && allUDIs.tqcontains( message )) {
279
+			if (!message.isEmpty() && allUDIs.contains( message )) {
280 280
 				if (value.startsWith( "ac_adapter.present" )) {
281 281
 					TQTimer::singleShot(50, this, TQT_SLOT(checkACAdapterState()));
282 282
 				} else if (value.startsWith( "battery." )) {
@@ -442,9 +442,9 @@ bool HardwareInfo::checkIfHandleDevice ( TQString _udi, int *type) {
442 442
 	bool ret = true;
443 443
 	
444 444
 	if (dbus_HAL->halGetPropertyStringList( _udi, "info.capabilities", &_cap) && !_cap.isEmpty()) {
445
-		if (_cap.tqcontains("ac_adapter")) {
445
+		if (_cap.contains("ac_adapter")) {
446 446
 			*type = BATTERY;
447
-		} else if (_cap.tqcontains("button")) {
447
+		} else if (_cap.contains("button")) {
448 448
 			TQString _val;
449 449
 			if (dbus_HAL->halGetPropertyString( _udi, "button.type", &_val)) {
450 450
 				if (_val.startsWith("lid")) {
@@ -459,9 +459,9 @@ bool HardwareInfo::checkIfHandleDevice ( TQString _udi, int *type) {
459 459
 			} else {
460 460
 				ret = false;
461 461
 			}
462
-		} else if (_cap.tqcontains("battery")) {
462
+		} else if (_cap.contains("battery")) {
463 463
 			*type = BATTERY;
464
-		} else if (_cap.tqcontains("laptop_panel")) {
464
+		} else if (_cap.contains("laptop_panel")) {
465 465
 			*type = LAPTOP_PANEL;
466 466
 		} else {
467 467
 			ret = false;
@@ -579,7 +579,7 @@ void HardwareInfo::checkSuspend() {
579 579
 						  &_ret_b )) {
580 580
 			suspend_states.suspend2ram_can = _ret_b;
581 581
 			if (_ret_b) {
582
-				if (ret.tqcontains( "Suspend" )) {
582
+				if (ret.contains( "Suspend" )) {
583 583
 					suspend_states.suspend2ram = true;
584 584
 					suspend_states.suspend2ram_allowed = dbus_HAL->isUserPrivileged(PRIV_SUSPEND,
585 585
 													HAL_COMPUTER_UDI);
@@ -600,7 +600,7 @@ void HardwareInfo::checkSuspend() {
600 600
 						  &_ret_b )) {
601 601
 			suspend_states.suspend2disk_can = _ret_b;
602 602
 			if (_ret_b) {
603
-				if (ret.tqcontains( "Hibernate" )) {
603
+				if (ret.contains( "Hibernate" )) {
604 604
 					suspend_states.suspend2disk = true;
605 605
 					suspend_states.suspend2disk_allowed =
606 606
 								 dbus_HAL->isUserPrivileged(PRIV_HIBERNATE,
@@ -620,7 +620,7 @@ void HardwareInfo::checkSuspend() {
620 620
 		if (dbus_HAL->halGetPropertyBool( HAL_COMPUTER_UDI, "power_management.can_standby", &_ret_b )) {
621 621
 			suspend_states.standby_can = _ret_b;
622 622
 			if (_ret_b) {
623
-				if (ret.tqcontains( "Standby" )) {
623
+				if (ret.contains( "Standby" )) {
624 624
 					suspend_states.standby = true;
625 625
 					suspend_states.standby_allowed = dbus_HAL->isUserPrivileged(PRIV_STANDBY,
626 626
 												    HAL_COMPUTER_UDI);
@@ -740,7 +740,7 @@ void HardwareInfo::checkBrightness() {
740 740
 			// we should asume there is only one laptop panel device in the system
741 741
 			if (dbus_HAL->halGetPropertyInt(devices.first(), "laptop_panel.num_levels", &retval )) {
742 742
 				udis.insert("laptop_panel", new TQString( devices.first() ));
743
-				if (!allUDIs.tqcontains( devices.first() ))
743
+				if (!allUDIs.contains( devices.first() ))
744 744
 					allUDIs.append( devices.first() );
745 745
 				
746 746
 				if (retval > 1) {
@@ -808,7 +808,7 @@ bool HardwareInfo::intialiseHWInfo() {
808 808
 		for ( TQStringList::iterator it = ret.begin(); it != ret.end(); ++it ) {
809 809
 			// we need a deep copy
810 810
 			udis.insert("acadapter", new TQString( *it ));
811
-			if (!allUDIs.tqcontains( *it ))
811
+			if (!allUDIs.contains( *it ))
812 812
 				allUDIs.append( *it );
813 813
 			checkACAdapterState();
814 814
 		}
@@ -821,7 +821,7 @@ bool HardwareInfo::intialiseHWInfo() {
821 821
 		for ( TQStringList::iterator it = ret.begin(); it != ret.end(); ++it ) {
822 822
 			// we need a deep copy
823 823
 			udis.insert("lidclose", new TQString( *it ));
824
-			if (!allUDIs.tqcontains( *it ))
824
+			if (!allUDIs.contains( *it ))
825 825
 				allUDIs.append( *it );
826 826
 			checkLidcloseState();
827 827
 		}
@@ -834,7 +834,7 @@ bool HardwareInfo::intialiseHWInfo() {
834 834
 		if (!ret.isEmpty()) {
835 835
 			// there should be normaly only one device, but let be sure
836 836
 			for ( TQStringList::iterator it = ret.begin(); it != ret.end(); ++it ) {
837
-				if (!allUDIs.tqcontains( *it ))
837
+				if (!allUDIs.contains( *it ))
838 838
 					allUDIs.append( *it );
839 839
 				BatteryList.append( new Battery(dbus_HAL, *it) );
840 840
 			}
@@ -910,7 +910,7 @@ void HardwareInfo::checkLidcloseState() {
910 910
 void HardwareInfo::updateBatteryValues (TQString udi, TQString property) {
911 911
 	kdDebugFuncIn(trace);
912 912
 
913
-	if (!udi.isEmpty() && allUDIs.tqcontains( udi )) {
913
+	if (!udi.isEmpty() && allUDIs.contains( udi )) {
914 914
 		// find effected battery object
915 915
 		Battery *bat;
916 916
 		for (bat = BatteryList.first(); bat; bat = BatteryList.next() ) {

+ 1
- 1
src/hardware_batteryCollection.cpp View File

@@ -204,7 +204,7 @@ bool BatteryCollection::refreshInfo(TQPtrList<Battery> BatteryList, bool force_l
204 204
 
205 205
 //! check if the given udi is already handled by this collection
206 206
 bool BatteryCollection::isBatteryHandled( TQString udi ) {
207
-	return udis.tqcontains( udi );
207
+	return udis.contains( udi );
208 208
 }
209 209
 
210 210
 // ---> write private members SECTION : START <----

+ 3
- 3
src/hardware_cpu.cpp View File

@@ -82,7 +82,7 @@ int CPUInfo::getCPUNum() {
82 82
 		int tmp = cpu_id;
83 83
 
84 84
 		cpu_id++;
85
-                cpu_path.tqreplace(TQString::number(tmp), TQString::number(cpu_id));
85
+                cpu_path.replace(TQString::number(tmp), TQString::number(cpu_id));
86 86
 		tmp_path = tmp_dir.absFilePath(cpu_path, true);
87 87
         }
88 88
 
@@ -141,7 +141,7 @@ int CPUInfo::checkCPUSpeed(){
141 141
 			cpufreq_speed.append(new_value);
142 142
 		}
143 143
 
144
-		cpu_device.tqreplace(TQString::number(cpu_id), TQString::number(cpu_id+1));
144
+		cpu_device.replace(TQString::number(cpu_id), TQString::number(cpu_id+1));
145 145
 	}
146 146
 	
147 147
 	if (speed_changed) {
@@ -306,7 +306,7 @@ void CPUInfo::getCPUMaxSpeed() {
306 306
 			close(fd);
307 307
 		}
308 308
 
309
-		cpu_device_max.tqreplace(TQString::number(cpu_id), TQString::number(cpu_id+1));
309
+		cpu_device_max.replace(TQString::number(cpu_id), TQString::number(cpu_id+1));
310 310
 	}
311 311
 
312 312
 	kdDebugFuncOut(trace);

+ 1
- 1
src/inactivity.cpp View File

@@ -325,7 +325,7 @@ void inactivity::getPIDs(KProcess */*proc*/, char *buffer, int /*lenght*/) {
325 325
 		blacklisted_running = false;
326 326
 	} 
327 327
 	else {
328
-		if (pids.tqcontains(TQRegExp("[0-9]"))) {
328
+		if (pids.contains(TQRegExp("[0-9]"))) {
329 329
 			kdDebug() << "BLACKLISTED IS RUNNING" << endl;
330 330
 			blacklisted_running = true;
331 331
 			blacklisted_running_last = idleTime;

+ 4
- 4
src/kpowersave.cpp View File

@@ -388,7 +388,7 @@ void kpowersave::drawIcon(){
388 388
 	int x, y;
389 389
 	countWhiteIconPixel = 0;
390 390
 
391
-	if((pixmap_name.tqcontains("laptopbattery") || pixmap_name.tqcontains("charge")) &&
391
+	if((pixmap_name.contains("laptopbattery") || pixmap_name.contains("charge")) &&
392 392
 	    countWhiteIconPixel == 0) {
393 393
 		for (x = 0; x < w; x++)
394 394
 			for (y = 0; y < h; y++)
@@ -2148,9 +2148,9 @@ void kpowersave::handleACStatusChange ( bool acstate , bool notifyEvent ) {
2148 2148
 
2149 2149
 		// handle switch to AC/battery default scheme
2150 2150
 		if (acstate) {
2151
-			index = settings->schemes.tqfindIndex(settings->ac_scheme);
2151
+			index = settings->schemes.findIndex(settings->ac_scheme);
2152 2152
 		} else {
2153
-			index = settings->schemes.tqfindIndex(settings->battery_scheme);
2153
+			index = settings->schemes.findIndex(settings->battery_scheme);
2154 2154
 		}
2155 2155
 
2156 2156
 		if (index != -1)
@@ -2580,7 +2580,7 @@ bool kpowersave::do_setScheme( TQString /*_scheme*/ ) {
2580 2580
 	kdDebugFuncIn(trace);
2581 2581
 
2582 2582
 /*	int index;
2583
-	index = settings->schemes.tqfindIndex(_scheme);
2583
+	index = settings->schemes.findIndex(_scheme);
2584 2584
 
2585 2585
 	if (index != -1) {
2586 2586
 		do_setActiveScheme(index);

+ 1
- 1
src/screen.cpp View File

@@ -120,7 +120,7 @@ static int got_badwindow;
120 120
 /*! Errorhandler for all X-Server related operations */
121 121
 static XErrorHandler defaultHandler;
122 122
 
123
-//! to tqfind/handle bad XWindows / XSetErrorHandler
123
+//! to find/handle bad XWindows / XSetErrorHandler
124 124
 /*!
125 125
 * This function is involved by the search for the window of the Xscreensaver. By this 
126 126
 * function we seperate the BadWindow-error and set \ref got_badwindow if we get a BadWindow.

Loading…
Cancel
Save