diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 04:10:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 04:10:07 +0000 |
commit | fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf (patch) | |
tree | 9eda848e56fcb862fdfdf479adeccd95b6fe387a /khotkeys/shared | |
parent | 02f67d0e1355b79b1806746efb0f2f640e57f13d (diff) | |
download | tdebase-fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf.tar.gz tdebase-fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf.zip |
Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1212480 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khotkeys/shared')
-rw-r--r-- | khotkeys/shared/actions.cpp | 2 | ||||
-rw-r--r-- | khotkeys/shared/gestures.cpp | 8 | ||||
-rw-r--r-- | khotkeys/shared/input.cpp | 22 | ||||
-rw-r--r-- | khotkeys/shared/input.h | 2 | ||||
-rw-r--r-- | khotkeys/shared/settings.cpp | 2 | ||||
-rw-r--r-- | khotkeys/shared/sound.cpp | 62 | ||||
-rw-r--r-- | khotkeys/shared/sound.h | 4 | ||||
-rw-r--r-- | khotkeys/shared/triggers.cpp | 8 | ||||
-rw-r--r-- | khotkeys/shared/voices.cpp | 4 | ||||
-rw-r--r-- | khotkeys/shared/voicesignature.cpp | 10 | ||||
-rw-r--r-- | khotkeys/shared/windows.cpp | 4 |
11 files changed, 64 insertions, 64 deletions
diff --git a/khotkeys/shared/actions.cpp b/khotkeys/shared/actions.cpp index f58c7e308..e37ef395f 100644 --- a/khotkeys/shared/actions.cpp +++ b/khotkeys/shared/actions.cpp @@ -391,7 +391,7 @@ void Keyboard_input_action::execute() TQString Keyboard_input_action::description() const { TQString tmp = input(); - tmp.tqreplace( '\n', ' ' ); + tmp.replace( '\n', ' ' ); tmp.truncate( 30 ); return i18n( "Keyboard input : " ) + tmp; } diff --git a/khotkeys/shared/gestures.cpp b/khotkeys/shared/gestures.cpp index 28560e03d..60b1d93b4 100644 --- a/khotkeys/shared/gestures.cpp +++ b/khotkeys/shared/gestures.cpp @@ -105,7 +105,7 @@ void Gesture::active_window_changed( WId ) void Gesture::register_handler( TQObject* receiver_P, const char* slot_P ) { - if( handlers.tqcontains( receiver_P )) + if( handlers.contains( receiver_P )) return; handlers[ receiver_P ] = true; connect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )), @@ -116,7 +116,7 @@ void Gesture::register_handler( TQObject* receiver_P, const char* slot_P ) void Gesture::unregister_handler( TQObject* receiver_P, const char* slot_P ) { - if( !handlers.tqcontains( receiver_P )) + if( !handlers.contains( receiver_P )) return; handlers.remove( receiver_P ); disconnect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )), @@ -197,7 +197,7 @@ void Gesture::grab_mouse( bool grab_P ) if( grab_P ) { KXErrorHandler handler; - static int tqmask[] = { 0, Button1MotionMask, Button2MotionMask, Button3MotionMask, + static int mask[] = { 0, Button1MotionMask, Button2MotionMask, Button3MotionMask, Button4MotionMask, Button5MotionMask, ButtonMotionMask, ButtonMotionMask, ButtonMotionMask, ButtonMotionMask }; #define XCapL KKeyNative::modXLock() @@ -216,7 +216,7 @@ void Gesture::grab_mouse( bool grab_P ) i < 8; ++i ) XGrabButton( qt_xdisplay(), button, mods[ i ], qt_xrootwin(), False, - ButtonPressMask | ButtonReleaseMask | tqmask[ button ], GrabModeAsync, GrabModeAsync, + ButtonPressMask | ButtonReleaseMask | mask[ button ], GrabModeAsync, GrabModeAsync, None, None ); bool err = handler.error( true ); kdDebug( 1217 ) << "Gesture grab:" << err << endl; diff --git a/khotkeys/shared/input.cpp b/khotkeys/shared/input.cpp index 90e789282..f9bfec6d3 100644 --- a/khotkeys/shared/input.cpp +++ b/khotkeys/shared/input.cpp @@ -55,7 +55,7 @@ Kbd::~Kbd() void Kbd::insert_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ) { - Receiver_data& rcv = tqreceivers[ receiver_P ]; + Receiver_data& rcv = receivers[ receiver_P ]; rcv.shortcuts.append( shortcut_P ); if( rcv.active ) grab_shortcut( shortcut_P ); @@ -63,17 +63,17 @@ void Kbd::insert_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ) void Kbd::remove_item( const KShortcut& shortcut_P, Kbd_receiver* receiver_P ) { - Receiver_data& rcv = tqreceivers[ receiver_P ]; + Receiver_data& rcv = receivers[ receiver_P ]; rcv.shortcuts.remove( shortcut_P ); if( rcv.active ) ungrab_shortcut( shortcut_P ); if( rcv.shortcuts.count() == 0 ) - tqreceivers.remove( receiver_P ); + receivers.remove( receiver_P ); } void Kbd::activate_receiver( Kbd_receiver* receiver_P ) { - Receiver_data& rcv = tqreceivers[ receiver_P ]; + Receiver_data& rcv = receivers[ receiver_P ]; if( rcv.active ) return; rcv.active = true; @@ -85,7 +85,7 @@ void Kbd::activate_receiver( Kbd_receiver* receiver_P ) void Kbd::deactivate_receiver( Kbd_receiver* receiver_P ) { - Receiver_data& rcv = tqreceivers[ receiver_P ]; + Receiver_data& rcv = receivers[ receiver_P ]; if( !rcv.active ) return; rcv.active = false; @@ -97,7 +97,7 @@ void Kbd::deactivate_receiver( Kbd_receiver* receiver_P ) void Kbd::grab_shortcut( const KShortcut& shortcut_P ) { - if( grabs.tqcontains( shortcut_P )) + if( grabs.contains( shortcut_P )) ++grabs[ shortcut_P ]; else { @@ -117,7 +117,7 @@ void Kbd::grab_shortcut( const KShortcut& shortcut_P ) void Kbd::ungrab_shortcut( const KShortcut& shortcut_P ) { - if( !grabs.tqcontains( shortcut_P )) + if( !grabs.contains( shortcut_P )) return; if( --grabs[ shortcut_P ] == 0 ) { @@ -142,12 +142,12 @@ void Kbd::key_slot( TQString key_P ) { kdDebug( 1217 ) << "Key pressed:" << key_P << endl; KShortcut shortcut( key_P ); - if( !grabs.tqcontains( shortcut )) + if( !grabs.contains( shortcut )) return; - for( TQMap< Kbd_receiver*, Receiver_data >::ConstIterator it = tqreceivers.begin(); - it != tqreceivers.end(); + for( TQMap< Kbd_receiver*, Receiver_data >::ConstIterator it = receivers.begin(); + it != receivers.end(); ++it ) - if( ( *it ).shortcuts.tqcontains( shortcut ) && ( *it ).active + if( ( *it ).shortcuts.contains( shortcut ) && ( *it ).active && it.key()->handle_key( shortcut )) return; } diff --git a/khotkeys/shared/input.h b/khotkeys/shared/input.h index eff131c44..22df89284 100644 --- a/khotkeys/shared/input.h +++ b/khotkeys/shared/input.h @@ -58,7 +58,7 @@ class Kbd TQValueList< KShortcut > shortcuts; bool active; }; - TQMap< Kbd_receiver*, Receiver_data > tqreceivers; + TQMap< Kbd_receiver*, Receiver_data > receivers; TQMap< KShortcut, int > grabs; KGlobalAccel* kga; }; diff --git a/khotkeys/shared/settings.cpp b/khotkeys/shared/settings.cpp index a6434be06..fdab2be56 100644 --- a/khotkeys/shared/settings.cpp +++ b/khotkeys/shared/settings.cpp @@ -63,7 +63,7 @@ bool Settings::read_settings( KConfig& cfg_P, bool include_disabled_P, ImportTyp TQString import_id = cfg_P.readEntry( "ImportId" ); if( !import_id.isEmpty()) { - if( already_imported.tqcontains( import_id )) + if( already_imported.contains( import_id )) { if( import_P == ImportSilent || KMessageBox::warningContinueCancel( NULL, diff --git a/khotkeys/shared/sound.cpp b/khotkeys/shared/sound.cpp index ddaec44b8..c90eb2e02 100644 --- a/khotkeys/shared/sound.cpp +++ b/khotkeys/shared/sound.cpp @@ -50,7 +50,7 @@ Sound::~Sound() void Sound::load(const TQString& filename) { kdDebug() << k_funcinfo << filename << endl; - data=TQMemArray<TQ_INT32>(); + data=TQMemArray<Q_INT32>(); TQFile file(filename); if(!file.open(IO_ReadOnly)) { @@ -59,20 +59,20 @@ void Sound::load(const TQString& filename) } TQDataStream stream(&file); stream.setByteOrder( TQDataStream::LittleEndian ); - TQ_INT32 magic; + Q_INT32 magic; MAGIC("RIFF"); - READ_FROM_STREAM(TQ_UINT32,ChunkSize); + READ_FROM_STREAM(Q_UINT32,ChunkSize); MAGIC("WAVE"); MAGIC("fmt "); - READ_FROM_STREAM(TQ_UINT32,ChunkSize2); - READ_FROM_STREAM(TQ_INT16,AudioFormat); - READ_FROM_STREAM(TQ_UINT16,NumberOfChannels); - READ_FROM_STREAM(TQ_UINT32,SampleRate); + READ_FROM_STREAM(Q_UINT32,ChunkSize2); + READ_FROM_STREAM(Q_INT16,AudioFormat); + READ_FROM_STREAM(Q_UINT16,NumberOfChannels); + READ_FROM_STREAM(Q_UINT32,SampleRate); _fs=SampleRate; - READ_FROM_STREAM(TQ_UINT32,ByteRate); - READ_FROM_STREAM(TQ_UINT16,BlockAlign); - READ_FROM_STREAM(TQ_UINT16,BitsPerSample); + READ_FROM_STREAM(Q_UINT32,ByteRate); + READ_FROM_STREAM(Q_UINT16,BlockAlign); + READ_FROM_STREAM(Q_UINT16,BitsPerSample); MAGIC("data"); READ_FROM_STREAM(TQByteArray,SoundData); NumberOfChannels=1; //Wav i play are broken @@ -90,7 +90,7 @@ void Sound::load(const TQString& filename) max=0; for(unsigned long int f=0;f<NumberOfSamples;f++) { - TQ_INT32 nb=0; + Q_INT32 nb=0; for(uint k=0;k<BytePS;k++) { nb |= (SoundData[f*BytePS+k]&0x000000FF) << (k*8); @@ -110,7 +110,7 @@ void Sound::load(const TQString& filename) } -#define SMAGIC(CH) { stream << ( TQ_INT32) ( (CH)[0] | (CH)[1]<<8 | (CH)[2]<< 16 | (CH)[3] << 24 ) ; } +#define SMAGIC(CH) { stream << ( Q_INT32) ( (CH)[0] | (CH)[1]<<8 | (CH)[2]<< 16 | (CH)[3] << 24 ) ; } void Sound::save(const TQString& filename) const { @@ -129,35 +129,35 @@ void Sound::save(const TQString& filename) const for(unsigned long int f=0;f<data.size();f++) { - TQ_UINT16 val= (signed short int) ( (data.at(f) * ((double)(1<<13)/(signed)max) ) ); + Q_UINT16 val= (signed short int) ( (data.at(f) * ((double)(1<<13)/(signed)max) ) ); SoundData[ 2*f ]= val & 0x00FF; SoundData[2*f+1]= (val & 0xFF00) >> 8; // kdDebug( 1217 ) << k_funcinfo << data.at(f) << " / " << max << " = " << val << " | " << SoundData[ 2*f ] << " "<< SoundData[ 2*f+1 ] << endl; } - TQ_UINT16 NumberOfChannels=2; - TQ_UINT32 SampleRate=_fs; + Q_UINT16 NumberOfChannels=2; + Q_UINT32 SampleRate=_fs; SMAGIC("RIFF"); - //READ_FROM_STREAM(TQ_UINT32,ChunkSize); - stream << (TQ_UINT32)(36+ SoundData.size()); + //READ_FROM_STREAM(Q_UINT32,ChunkSize); + stream << (Q_UINT32)(36+ SoundData.size()); SMAGIC("WAVE"); SMAGIC("fmt "); - //READ_FROM_STREAM(TQ_UINT32,ChunkSize2); - stream << (TQ_UINT32)(16); - //READ_FROM_STREAM(TQ_INT16,AudioFormat); - stream << (TQ_INT16)(1); - //READ_FROM_STREAM(TQ_UINT16,NumberOfChannels); - stream << (TQ_UINT16)(NumberOfChannels); - //READ_FROM_STREAM(TQ_UINT32,SampleRate); - stream << (TQ_UINT32)(SampleRate); - //READ_FROM_STREAM(TQ_UINT32,ByteRate); - stream << (TQ_UINT32)(NumberOfChannels*SampleRate*16/8); - //READ_FROM_STREAM(TQ_UINT16,BlockAlign); - stream << (TQ_UINT16)(16/8 *NumberOfChannels); - //READ_FROM_STREAM(TQ_UINT16,BitsPerSample); - stream << (TQ_UINT16)(16); + //READ_FROM_STREAM(Q_UINT32,ChunkSize2); + stream << (Q_UINT32)(16); + //READ_FROM_STREAM(Q_INT16,AudioFormat); + stream << (Q_INT16)(1); + //READ_FROM_STREAM(Q_UINT16,NumberOfChannels); + stream << (Q_UINT16)(NumberOfChannels); + //READ_FROM_STREAM(Q_UINT32,SampleRate); + stream << (Q_UINT32)(SampleRate); + //READ_FROM_STREAM(Q_UINT32,ByteRate); + stream << (Q_UINT32)(NumberOfChannels*SampleRate*16/8); + //READ_FROM_STREAM(Q_UINT16,BlockAlign); + stream << (Q_UINT16)(16/8 *NumberOfChannels); + //READ_FROM_STREAM(Q_UINT16,BitsPerSample); + stream << (Q_UINT16)(16); SMAGIC("data"); //READ_FROM_STREAM(TQByteArray,SoundData); stream << SoundData; diff --git a/khotkeys/shared/sound.h b/khotkeys/shared/sound.h index 6453563de..2c2d97d93 100644 --- a/khotkeys/shared/sound.h +++ b/khotkeys/shared/sound.h @@ -50,8 +50,8 @@ public: return _fs; } - TQMemArray<TQ_INT32> data; - TQ_UINT32 max; + TQMemArray<Q_INT32> data; + Q_UINT32 max; uint _fs; }; diff --git a/khotkeys/shared/triggers.cpp b/khotkeys/shared/triggers.cpp index b3042f00f..7cac2b98c 100644 --- a/khotkeys/shared/triggers.cpp +++ b/khotkeys/shared/triggers.cpp @@ -225,7 +225,7 @@ void Window_trigger::window_added( WId window_P ) void Window_trigger::window_removed( WId window_P ) { - if( existing_windows.tqcontains( window_P )) + if( existing_windows.contains( window_P )) { bool matches = existing_windows[ window_P ]; kdDebug( 1217 ) << "Window_trigger::w_removed() : " << matches << endl; @@ -244,7 +244,7 @@ void Window_trigger::window_removed( WId window_P ) void Window_trigger::active_window_changed( WId window_P ) { bool was_match = false; - if( existing_windows.tqcontains( last_active_window )) + if( existing_windows.contains( last_active_window )) was_match = existing_windows[ last_active_window ]; if( active && was_match && ( window_actions & WINDOW_DEACTIVATES )) { @@ -253,7 +253,7 @@ void Window_trigger::active_window_changed( WId window_P ) } /* bool matches = windows()->match( Window_data( window_P )); existing_windows[ window_P ] = matches;*/ - bool matches = existing_windows.tqcontains( window_P ) + bool matches = existing_windows.contains( window_P ) ? existing_windows[ window_P ] : false; if( active && matches && ( window_actions & WINDOW_ACTIVATES )) { @@ -272,7 +272,7 @@ void Window_trigger::window_changed( WId window_P, unsigned int dirty_P ) return; kdDebug( 1217 ) << "Window_trigger::w_changed()" << endl; bool was_match = false; - if( existing_windows.tqcontains( window_P )) + if( existing_windows.contains( window_P )) was_match = existing_windows[ window_P ]; bool matches = windows()->match( Window_data( window_P )); existing_windows[ window_P ] = matches; diff --git a/khotkeys/shared/voices.cpp b/khotkeys/shared/voices.cpp index e19f66eec..a6515fecf 100644 --- a/khotkeys/shared/voices.cpp +++ b/khotkeys/shared/voices.cpp @@ -79,7 +79,7 @@ void Voice::enable( bool enabled_P ) void Voice::register_handler( Voice_trigger *trigger_P ) { - if( !_references.tqcontains( trigger_P )) + if( !_references.contains( trigger_P )) _references.append(trigger_P); } @@ -179,7 +179,7 @@ void Voice::slot_sound_recorded(const Sound &sound_P) //kdDebug(1217) << k_funcinfo << keyNative.key().toString() << endl; - if(_shortcut.tqcontains(keyNative)) + if(_shortcut.contains(keyNative)) { if(pEvent->type == XKeyPress && !_recording ) { diff --git a/khotkeys/shared/voicesignature.cpp b/khotkeys/shared/voicesignature.cpp index 4f4266b7e..773f28731 100644 --- a/khotkeys/shared/voicesignature.cpp +++ b/khotkeys/shared/voicesignature.cpp @@ -154,14 +154,14 @@ static TQMemArray<double> fft(const Sound& sound, unsigned int start, unsigned i { samples[f]=sound.at(start2+rev_carry)* hamming(rev_carry, size); // KDEBUG(rev_carry); - int tqmask = size>>1; // N / 2 + int mask = size>>1; // N / 2 // add 1 backwards - while (rev_carry >= tqmask) + while (rev_carry >= mask) { - rev_carry -= tqmask; // turn off this bit - tqmask >>= 1; + rev_carry -= mask; // turn off this bit + mask >>= 1; } - rev_carry += tqmask; + rev_carry += mask; } samples[size-1]=sound.at(start2+size-1)*hamming(size-1, size); diff --git a/khotkeys/shared/windows.cpp b/khotkeys/shared/windows.cpp index a1394b731..b8e86f694 100644 --- a/khotkeys/shared/windows.cpp +++ b/khotkeys/shared/windows.cpp @@ -339,7 +339,7 @@ bool Windowdef_simple::is_substr_match( const TQString& str1_P, const TQString& case NOT_IMPORTANT : return true; case CONTAINS : - return str1_P.tqcontains( str2_P ) > 0; + return str1_P.contains( str2_P ) > 0; case IS : return str1_P == str2_P; case REGEXP : @@ -348,7 +348,7 @@ bool Windowdef_simple::is_substr_match( const TQString& str1_P, const TQString& return rg.search( str1_P ) >= 0; } case CONTAINS_NOT : - return str1_P.tqcontains( str2_P ) == 0; + return str1_P.contains( str2_P ) == 0; case IS_NOT : return str1_P != str2_P; case REGEXP_NOT : |