summaryrefslogtreecommitdiffstats
path: root/kbabel/catalogmanager/libcvs/cvshandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/catalogmanager/libcvs/cvshandler.cpp')
-rw-r--r--kbabel/catalogmanager/libcvs/cvshandler.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kbabel/catalogmanager/libcvs/cvshandler.cpp b/kbabel/catalogmanager/libcvs/cvshandler.cpp
index 66eeac0a..73d149d3 100644
--- a/kbabel/catalogmanager/libcvs/cvshandler.cpp
+++ b/kbabel/catalogmanager/libcvs/cvshandler.cpp
@@ -20,11 +20,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this program with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -36,7 +36,7 @@
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
-// Qt include files
+// TQt include files
#include <tqdir.h>
#include <tqfile.h>
#include <tqfileinfo.h>
@@ -81,7 +81,7 @@ void CVSHandler::setPOTBaseDir( const TQString& dir )
emit signalIsPOTRepository( _isPOTRepository );
}
-TQString CVSHandler::fileStatus( const FileStatus status ) const
+TQString CVSHandler::filetqStatus( const FiletqStatus status ) const
{
switch ( status ) {
case NO_REPOSITORY:
@@ -111,7 +111,7 @@ TQString CVSHandler::fileStatus( const FileStatus status ) const
}
}
-CVSHandler::FileStatus CVSHandler::fstatus( const TQString& filename ) const
+CVSHandler::FiletqStatus CVSHandler::fstatus( const TQString& filename ) const
{
// no valid repository
if ( !_isPORepository )
@@ -130,7 +130,7 @@ CVSHandler::FileStatus 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/" ).arg( info.fileName( ) ) );
+ TQRegExp rx( TQString( "^D?/%1/" ).tqarg( info.fileName( ) ) );
TQString temp;
TQTextStream stream( &entries );
@@ -138,7 +138,7 @@ CVSHandler::FileStatus CVSHandler::fstatus( const TQString& filename ) const
bool isInRepository = false;
while ( !stream.atEnd() ) {
temp = stream.readLine( );
- if ( temp.find( rx ) == 0 ) {
+ if ( temp.tqfind( rx ) == 0 ) {
isInRepository = true;
break;
}
@@ -162,7 +162,7 @@ CVSHandler::FileStatus CVSHandler::fstatus( const TQString& filename ) const
return LOCALLY_REMOVED;
// check for conflicts
- if ( timestamp.find( '+' ) >= 0 )
+ if ( timestamp.tqfind( '+' ) >= 0 )
return CONFLICT;
// calculate the UTC time from the file's last modified date
@@ -177,23 +177,23 @@ CVSHandler::FileStatus CVSHandler::fstatus( const TQString& filename ) const
return UP_TO_DATE;
}
-TQString CVSHandler::cvsStatus( const TQString& filename ) const
+TQString CVSHandler::cvstqStatus( const TQString& filename ) const
{
return map[filename];
}
-void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQString& filename, bool templates, KSharedConfig* config )
+void CVSHandler::execCVSCommand( TQWidget* tqparent, CVS::Command cmd, const TQString& filename, bool templates, KSharedConfig* config )
{
if ( !_isPORepository ) {
// This message box should never be visible but who knows... ;-)
- KMessageBox::sorry( parent, i18n( "This is not a valid CVS repository. "
+ KMessageBox::sorry( tqparent, i18n( "This is not a valid CVS repository. "
"The CVS commands cannot be executed." ) );
return;
}
TQFileInfo info( filename );
if ( !info.isDir( ) ) {
- execCVSCommand( parent, cmd, TQStringList( filename ), templates, config );
+ execCVSCommand( tqparent, cmd, TQStringList( filename ), templates, config );
return;
}
@@ -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::Status:
+ case CVS::tqStatus:
command += "status";
break;
case CVS::Diff:
@@ -218,14 +218,14 @@ void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStr
break;
}
- showDialog( parent, cmd, TQStringList( filename ), command, config );
+ showDialog( tqparent, cmd, TQStringList( filename ), command, config );
}
-void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config )
+void CVSHandler::execCVSCommand( TQWidget* tqparent, CVS::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config )
{
if ( !_isPORepository ) {
// This message box should never be visible but who knows... ;-)
- KMessageBox::sorry( parent, i18n( "This is not a valid CVS repository. "
+ KMessageBox::sorry( tqparent, i18n( "This is not a valid CVS repository. "
"The CVS commands cannot be executed." ) );
return;
}
@@ -241,7 +241,7 @@ void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStr
command += "commit -F @LOG@FILE@";
checkToAdd( files );
break;
- case CVS::Status:
+ case CVS::tqStatus:
command += "status";
break;
case CVS::Diff:
@@ -262,7 +262,7 @@ void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStr
command += " \'" + temp + "\'";
}
- showDialog( parent, cmd, files, command, config );
+ showDialog( tqparent, cmd, files, command, config );
}
void CVSHandler::setAutoUpdateTemplates( bool update )
@@ -270,9 +270,9 @@ void CVSHandler::setAutoUpdateTemplates( bool update )
_autoUpdateTemplates = update;
}
-void CVSHandler::showDialog( TQWidget* parent, CVS::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config )
+void CVSHandler::showDialog( TQWidget* tqparent, CVS::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config )
{
- CVSDialog * dia = new CVSDialog( cmd, parent, config );
+ CVSDialog * dia = new CVSDialog( cmd, tqparent, config );
dia->setFiles( files );
dia->setCommandLine( commandLine );
if ( cmd == CVS::Commit ) {
@@ -280,7 +280,7 @@ void CVSHandler::showDialog( TQWidget* parent, CVS::Command cmd, const TQStringL
}
if ( dia->exec( ) == KDialog::Accepted ) {
- if ( cmd == CVS::Status )
+ if ( cmd == CVS::tqStatus )
processStatusOutput( dia->statusOutput( ) );
if ( cmd == CVS::Diff )
processDiff( dia->statusOutput( ) );
@@ -313,7 +313,7 @@ void CVSHandler::checkToAdd( const TQStringList& files )
toBeAdded << *it;
temp = TQFileInfo( *it ).dirPath( true );
}
- // check recursivlely if parent dirs have to be added as well
+ // check recursivlely if tqparent dirs have to be added as well
while ( fstatus( temp ) == NOT_IN_CVS && toBeAdded.findIndex( temp ) == -1 ) {
toBeAdded << temp;
temp = TQFileInfo( temp ).dirPath( true );
@@ -357,7 +357,7 @@ void CVSHandler::processStatusOutput( const TQString& status )
TQString entr = *it;
// translate the filename from repository to local
TQRegExp rx( basedir + ".*,v" );
- int pos = entr.find( rx );
+ int pos = entr.tqfind( rx );
TQString file = _poBaseDir + entr.mid( pos + basedir.length( ),
rx.matchedLength( ) - basedir.length( ) - 2 );
@@ -365,14 +365,14 @@ void CVSHandler::processStatusOutput( const TQString& status )
// TODO: do some markup
- map.replace( file, entr );
+ map.tqreplace( file, entr );
}
}
void CVSHandler::processDiff( TQString output )
{
output.remove( TQRegExp( "\\[ .* \\]$" ));
- output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
+ output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).tqreplace("[","\\[").tqreplace("]","\\]")));
KTempFile tmpFile;
*(tmpFile.textStream()) << output;
@@ -383,7 +383,7 @@ void CVSHandler::processDiff( TQString output )
KMessageBox::error( 0, error );
}
-bool CVSHandler::isConsideredModified( const FileStatus status ) const
+bool CVSHandler::isConsideredModified( const FiletqStatus status ) const
{
/*
* A file is modified if it is either: