diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:38 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:38 -0600 |
commit | d6331f1b56eb6dca7a1950658b2932f208015da0 (patch) | |
tree | f99bf8d1571f93304bdb4a46fb199a1bde60e6ee /kbabel/catalogmanager/libcvs | |
parent | e738fee8847c1f606df7b338a589cc8c0539a521 (diff) | |
download | tdesdk-d6331f1b56eb6dca7a1950658b2932f208015da0.tar.gz tdesdk-d6331f1b56eb6dca7a1950658b2932f208015da0.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kbabel/catalogmanager/libcvs')
-rw-r--r-- | kbabel/catalogmanager/libcvs/cvsdialog.cpp | 58 | ||||
-rw-r--r-- | kbabel/catalogmanager/libcvs/cvshandler.cpp | 16 | ||||
-rw-r--r-- | kbabel/catalogmanager/libcvs/cvshandler.h | 10 | ||||
-rw-r--r-- | kbabel/catalogmanager/libcvs/cvsresources.h | 2 |
4 files changed, 43 insertions, 43 deletions
diff --git a/kbabel/catalogmanager/libcvs/cvsdialog.cpp b/kbabel/catalogmanager/libcvs/cvsdialog.cpp index 1cfd6ab7..04ecd906 100644 --- a/kbabel/catalogmanager/libcvs/cvsdialog.cpp +++ b/kbabel/catalogmanager/libcvs/cvsdialog.cpp @@ -38,13 +38,13 @@ #include <tqfileinfo.h> #include <tqframe.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlistbox.h> #include <tqpushbutton.h> #include <tqstring.h> #include <tqstringlist.h> -#include <tqtextedit.h> -#include <tqtextcodec.h> +#include <textedit.h> +#include <textcodec.h> // KDE include files #include <kconfig.h> #include <kdebug.h> @@ -69,7 +69,7 @@ CVSDialog::CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config TQString temp; - TQVBoxLayout * tqlayout = new TQVBoxLayout( this, 6, 6, "MAIN LAYOUT" ); + TQVBoxLayout * layout = new TQVBoxLayout( this, 6, 6, "MAIN LAYOUT" ); // Set the label's text depending on the CVS command. switch ( cmd ) { @@ -79,18 +79,18 @@ CVSDialog::CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config case CVS::Commit: temp = i18n( "Commit the following files:" ); break; - case CVS::tqStatus: + case CVS::Status: temp = i18n( "Get status for the following files:" ); break; case CVS::Diff: temp = i18n( "Get diff for the following files:" ); break; } - tqlayout->addWidget( new TQLabel( temp, this ) ); + layout->addWidget( new TQLabel( temp, this ) ); // Widget for showing the list of files. filebox = new TQListBox( this ); - tqlayout->addWidget( filebox ); + layout->addWidget( filebox ); // Add special widgets for 'cvs commit'. if ( cmd == CVS::Commit ) { @@ -101,25 +101,25 @@ CVSDialog::CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config oldMessages = new TQComboBox( this ); oldMessages->setDuplicatesEnabled( false ); label->setBuddy( oldMessages ); - tqlayout->addWidget( label ); - tqlayout->addWidget( oldMessages ); + layout->addWidget( label ); + layout->addWidget( oldMessages ); // Textfield for entering a log message. label = new TQLabel( i18n( "&Log message:" ), this ); logedit = new TQTextEdit( this ); label->setBuddy( logedit ); - tqlayout->addWidget( label ); - tqlayout->addWidget( logedit ); + layout->addWidget( label ); + layout->addWidget( logedit ); label = new TQLabel( i18n( "E&ncoding:" ), this ); m_encodingComboBox = new KComboBox( this ); label->setBuddy( m_encodingComboBox ); - tqlayout->addWidget( label ); - tqlayout->addWidget( m_encodingComboBox ); + layout->addWidget( label ); + layout->addWidget( m_encodingComboBox ); TQStringList encodingList; // The last encoding will be added at the top of the list, when the seetings will be read. - encodingList << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).tqarg( "UTF-8" ); - encodingList << i18n( "Descriptive encoding name", "Locale ( %1 )" ).tqarg( TQTextCodec::codecForLocale()->mimeName() ); + encodingList << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); + encodingList << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->mimeName() ); encodingList += KGlobal::charsets()->descriptiveEncodingNames(); m_encodingComboBox->insertStringList( encodingList ); @@ -143,7 +143,7 @@ CVSDialog::CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config case CVS::Commit: temp = i18n( "&Commit" ); break; - case CVS::tqStatus: + case CVS::Status: temp = i18n( "&Get Status" ); break; case CVS::Diff: @@ -156,19 +156,19 @@ CVSDialog::CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config cancelBtn = new TQPushButton( i18n( "C&ancel" ), this ); buttons->addWidget( cancelBtn ); - tqlayout->addLayout( buttons ); + layout->addLayout( buttons ); TQFrame * line = new TQFrame( this ); line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); - tqlayout->addWidget( line ); + layout->addWidget( line ); - tqlayout->addWidget( new TQLabel( i18n( "Command output:" ), this ) ); + layout->addWidget( new TQLabel( i18n( "Command output:" ), this ) ); output = new TQTextEdit( this ); output->setReadOnly( true ); - tqlayout->addWidget( output ); + layout->addWidget( output ); - resize( TQSize( 600, 450 ).expandedTo( tqminimumSizeHint( ) ) ); + resize( TQSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) ); if ( cmd == CVS::Commit ) logedit->setFocus( ); @@ -244,14 +244,14 @@ void CVSDialog::slotExecuteCommand( ) if ( !codec ) { - KMessageBox::error( this, i18n( "Cannot find encoding: %1" ).tqarg( m_encoding ) ); + KMessageBox::error( this, i18n( "Cannot find encoding: %1" ).arg( m_encoding ) ); return; } else if ( !codec->canEncode( msg ) ) { const int res = KMessageBox::warningContinueCancel( this, i18n( "The commit log message cannot be encoded in the selected encoding: %1.\n" - "Do you want to continue?" ).tqarg( m_encoding ) ); + "Do you want to continue?" ).arg( m_encoding ) ); if ( res != KMessageBox::Continue ) return; } @@ -330,7 +330,7 @@ void CVSDialog::slotProcessStdout( KProcess*, char * buffer, int len ) output->setCursorPosition( output->lines( ), 0 ); // If the command is 'cvs status' or 'cvs diff' collect the output of stdout. - if ( (_cmd == CVS::tqStatus) || (_cmd == CVS::Diff) ) + if ( (_cmd == CVS::Status) || (_cmd == CVS::Diff) ) _statusOutput += TQString::fromLocal8Bit( buffer, len ); } @@ -348,7 +348,7 @@ void CVSDialog::slotProcessStderr( KProcess*, char * buffer, int len ) void CVSDialog::slotProcessExited( KProcess * p ) { if ( p->exitStatus( ) ) - output->append( i18n( "[ Exited with status %1 ]" ).tqarg( p->exitStatus( ) ) ); + output->append( i18n( "[ Exited with status %1 ]" ).arg( p->exitStatus( ) ) ); else output->append( i18n( "[ Finished ]" ) ); @@ -383,9 +383,9 @@ void CVSDialog::readSettings( ) m_logMessages.clear(); m_squeezedLogMessages.clear(); for ( int cnt = 0; cnt < 10; cnt++ ) - if ( config->hasKey( TQString( "CommitLogMessage%1" ).tqarg( cnt ) ) ) + if ( config->hasKey( TQString( "CommitLogMessage%1" ).arg( cnt ) ) ) { - const TQString logMessage = config->readEntry( TQString( "CommitLogMessage%1" ).tqarg( cnt ) ); + const TQString logMessage = config->readEntry( TQString( "CommitLogMessage%1" ).arg( cnt ) ); if ( !logMessage.isEmpty() ) { // If the message is too long, cut it to 80 characters (or the combo box becomes too wide) @@ -398,7 +398,7 @@ void CVSDialog::readSettings( ) } m_encoding = config->readEntry( "CVSEncoding", "UTF-8" ); - m_encodingComboBox->insertItem( i18n( "Descriptive encoding name", "Last choice ( %1 )" ).tqarg( m_encoding ), 0); + m_encodingComboBox->insertItem( i18n( "Descriptive encoding name", "Last choice ( %1 )" ).arg( m_encoding ), 0); } } @@ -413,7 +413,7 @@ void CVSDialog::saveSettings( ) int cnt = 0; TQStringList::const_iterator it; for ( it = m_logMessages.constBegin( ); it != m_logMessages.constEnd( ) && cnt < 10 ; ++it, ++cnt ) - config->writeEntry( TQString( "CommitLogMessage%1" ).tqarg( cnt ), *it ); + config->writeEntry( TQString( "CommitLogMessage%1" ).arg( cnt ), *it ); config->writeEntry( "CVSEncoding", m_encoding ); } diff --git a/kbabel/catalogmanager/libcvs/cvshandler.cpp b/kbabel/catalogmanager/libcvs/cvshandler.cpp index b0764af8..b0be0345 100644 --- a/kbabel/catalogmanager/libcvs/cvshandler.cpp +++ b/kbabel/catalogmanager/libcvs/cvshandler.cpp @@ -81,7 +81,7 @@ void CVSHandler::setPOTBaseDir( const TQString& dir ) emit signalIsPOTRepository( _isPOTRepository ); } -TQString CVSHandler::filetqStatus( const FiletqStatus status ) const +TQString CVSHandler::fileStatus( const FileStatus status ) const { switch ( status ) { case NO_REPOSITORY: @@ -111,7 +111,7 @@ TQString CVSHandler::filetqStatus( const FiletqStatus status ) const } } -CVSHandler::FiletqStatus CVSHandler::fstatus( const TQString& filename ) const +CVSHandler::FileStatus CVSHandler::fstatus( const TQString& filename ) const { // no valid repository if ( !_isPORepository ) @@ -130,7 +130,7 @@ CVSHandler::FiletqStatus CVSHandler::fstatus( const TQString& filename ) const // ### FIXME: it does not take care of CVS/Entries.Log // a line in CVS/Entries has the following format: // [D]/NAME/REVISION/[CONFLICT+]TIMESTAMP/OPTIONS/TAGDATE - TQRegExp rx( TQString( "^D?/%1/" ).tqarg( info.fileName( ) ) ); + TQRegExp rx( TQString( "^D?/%1/" ).arg( info.fileName( ) ) ); TQString temp; TQTextStream stream( &entries ); @@ -177,7 +177,7 @@ CVSHandler::FiletqStatus CVSHandler::fstatus( const TQString& filename ) const return UP_TO_DATE; } -TQString CVSHandler::cvstqStatus( const TQString& filename ) const +TQString CVSHandler::cvsStatus( const TQString& filename ) const { return map[filename]; } @@ -210,7 +210,7 @@ void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStr command += "commit -F @LOG@FILE@"; checkToAdd( TQStringList( filename ) ); break; - case CVS::tqStatus: + case CVS::Status: command += "status"; break; case CVS::Diff: @@ -241,7 +241,7 @@ void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStr command += "commit -F @LOG@FILE@"; checkToAdd( files ); break; - case CVS::tqStatus: + case CVS::Status: command += "status"; break; case CVS::Diff: @@ -280,7 +280,7 @@ void CVSHandler::showDialog( TQWidget* parent, CVS::Command cmd, const TQStringL } if ( dia->exec( ) == KDialog::Accepted ) { - if ( cmd == CVS::tqStatus ) + if ( cmd == CVS::Status ) processStatusOutput( dia->statusOutput( ) ); if ( cmd == CVS::Diff ) processDiff( dia->statusOutput( ) ); @@ -383,7 +383,7 @@ void CVSHandler::processDiff( TQString output ) KMessageBox::error( 0, error ); } -bool CVSHandler::isConsideredModified( const FiletqStatus status ) const +bool CVSHandler::isConsideredModified( const FileStatus status ) const { /* * A file is modified if it is either: diff --git a/kbabel/catalogmanager/libcvs/cvshandler.h b/kbabel/catalogmanager/libcvs/cvshandler.h index 1c08af92..5aeba57b 100644 --- a/kbabel/catalogmanager/libcvs/cvshandler.h +++ b/kbabel/catalogmanager/libcvs/cvshandler.h @@ -60,7 +60,7 @@ class CVSHandler : public TQObject TQ_OBJECT public: - enum FiletqStatus { + enum FileStatus { NO_REPOSITORY, NOT_IN_CVS, LOCALLY_ADDED, @@ -75,9 +75,9 @@ class CVSHandler : public TQObject void setPOBaseDir( const TQString& dir ); void setPOTBaseDir( const TQString& dir ); - FiletqStatus fstatus( const TQString& filename ) const; - TQString filetqStatus( const FiletqStatus status ) const; - TQString cvstqStatus( const TQString& filename ) const; + FileStatus fstatus( const TQString& filename ) const; + TQString fileStatus( const FileStatus status ) const; + TQString cvsStatus( const TQString& filename ) const; void execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQString& filename, bool templates, KSharedConfig* config ); void execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config ); @@ -87,7 +87,7 @@ class CVSHandler : public TQObject /** * True if the file was modified or has another status considered as a modification */ - bool isConsideredModified( const FiletqStatus status ) const; + bool isConsideredModified( const FileStatus status ) const; signals: void signalIsPORepository( bool ); diff --git a/kbabel/catalogmanager/libcvs/cvsresources.h b/kbabel/catalogmanager/libcvs/cvsresources.h index 4c2bc144..9cac64db 100644 --- a/kbabel/catalogmanager/libcvs/cvsresources.h +++ b/kbabel/catalogmanager/libcvs/cvsresources.h @@ -35,7 +35,7 @@ #define CVSRESOURCES_H namespace CVS { - enum Command { Update, Commit, tqStatus, Diff }; + enum Command { Update, Commit, Status, Diff }; } #endif // CVSRESOURCES_H |