summaryrefslogtreecommitdiffstats
path: root/kbabel/catalogmanager/libsvn/svndialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/catalogmanager/libsvn/svndialog.cpp')
-rw-r--r--kbabel/catalogmanager/libsvn/svndialog.cpp120
1 files changed, 60 insertions, 60 deletions
diff --git a/kbabel/catalogmanager/libsvn/svndialog.cpp b/kbabel/catalogmanager/libsvn/svndialog.cpp
index 69653591..a6f7d229 100644
--- a/kbabel/catalogmanager/libsvn/svndialog.cpp
+++ b/kbabel/catalogmanager/libsvn/svndialog.cpp
@@ -33,17 +33,17 @@
// Qt include files
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextedit.h>
// KDE include files
#include <kconfig.h>
#include <kdebug.h>
@@ -57,16 +57,16 @@
#include "svndialog.h"
-SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config )
+SVNDialog::SVNDialog( SVN::Command cmd, TQWidget * parent, KSharedConfig* config )
: KDialog( parent, "SVN DIALOG", true ), m_tempFile( 0 ), m_config( config )
{
_cmd = cmd;
p=0L;
setCaption( i18n( "SVN Dialog" ) );
- QString temp;
+ TQString temp;
- QVBoxLayout * layout = new QVBoxLayout( this, 6, 6, "MAIN LAYOUT" );
+ TQVBoxLayout * layout = new TQVBoxLayout( this, 6, 6, "MAIN LAYOUT" );
// Set the label's text depending on the SVN command.
switch ( cmd ) {
@@ -89,42 +89,42 @@ SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config
temp = i18n( "Get information for the following files:" );
break;
}
- layout->addWidget( new QLabel( temp, this ) );
+ layout->addWidget( new TQLabel( temp, this ) );
// Widget for showing the list of files.
- filebox = new QListBox( this );
+ filebox = new TQListBox( this );
layout->addWidget( filebox );
// Add special widgets for 'svn commit'.
if ( cmd == SVN::Commit ) {
- QLabel * label;
+ TQLabel * label;
// Combobox for displaying old log messages.
- label = new QLabel( i18n( "&Old messages:" ), this );
- oldMessages = new QComboBox( this );
+ label = new TQLabel( i18n( "&Old messages:" ), this );
+ oldMessages = new TQComboBox( this );
oldMessages->setDuplicatesEnabled( false );
label->setBuddy( oldMessages );
layout->addWidget( label );
layout->addWidget( oldMessages );
// Textfield for entering a log message.
- label = new QLabel( i18n( "&Log message:" ), this );
- logedit = new QTextEdit( this );
+ label = new TQLabel( i18n( "&Log message:" ), this );
+ logedit = new TQTextEdit( this );
label->setBuddy( logedit );
layout->addWidget( label );
layout->addWidget( logedit );
- connect( oldMessages, SIGNAL( activated( int ) ),
- this, SLOT( slotComboActivated( int ) ) );
+ connect( oldMessages, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotComboActivated( int ) ) );
}
- QHBoxLayout * buttons = new QHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" );
+ TQHBoxLayout * buttons = new TQHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" );
// Add special buttons for 'svn commit'.
if ( cmd == SVN::Commit ) {
- autoAddBox = new QCheckBox( i18n( "Auto&matically add files if necessary" ), this );
+ autoAddBox = new TQCheckBox( i18n( "Auto&matically add files if necessary" ), this );
buttons->addWidget( autoAddBox );
}
- buttons->addItem( new QSpacerItem( 1, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+ buttons->addItem( new TQSpacerItem( 1, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
// Set the main button's text depending on the SVN comand.
switch ( cmd ) {
@@ -145,33 +145,33 @@ SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config
temp = i18n( "&Get Information" );
break;
}
- mainBtn = new QPushButton( temp, this );
+ mainBtn = new TQPushButton( temp, this );
mainBtn->setDefault( true );
buttons->addWidget( mainBtn );
- cancelBtn = new QPushButton( i18n( "C&ancel" ), this );
+ cancelBtn = new TQPushButton( i18n( "C&ancel" ), this );
buttons->addWidget( cancelBtn );
layout->addLayout( buttons );
- QFrame * line = new QFrame( this );
- line->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame * line = new TQFrame( this );
+ line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
layout->addWidget( line );
- layout->addWidget( new QLabel( i18n( "Command output:" ), this ) );
+ layout->addWidget( new TQLabel( i18n( "Command output:" ), this ) );
- output = new QTextEdit( this );
+ output = new TQTextEdit( this );
output->setReadOnly( true );
layout->addWidget( output );
- resize( QSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) );
+ resize( TQSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) );
if ( cmd == SVN::Commit )
logedit->setFocus( );
readSettings( );
- connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( slotExecuteCommand( ) ) );
- connect( cancelBtn, SIGNAL( clicked( ) ), this, SLOT( reject( ) ) );
+ connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotExecuteCommand( ) ) );
+ connect( cancelBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( reject( ) ) );
}
void SVNDialog::slotComboActivated( int index )
@@ -193,17 +193,17 @@ void SVNDialog::accept( )
KDialog::accept( );
}
-void SVNDialog::setFiles( const QStringList& files )
+void SVNDialog::setFiles( const TQStringList& files )
{
filebox->insertStringList( files );
}
-void SVNDialog::setCommandLine( const QString& command )
+void SVNDialog::setCommandLine( const TQString& command )
{
_commandLine = command;
}
-void SVNDialog::setAddCommand( const QString& command )
+void SVNDialog::setAddCommand( const TQString& command )
{
_addCommand = command;
}
@@ -224,7 +224,7 @@ void SVNDialog::slotExecuteCommand( )
if ( autoAddBox->isChecked( ) && !_addCommand.isEmpty( ) )
_commandLine.prepend( _addCommand );
- const QString msg( logedit->text() );
+ const TQString msg( logedit->text() );
if ( msg.isEmpty() )
{
@@ -238,16 +238,16 @@ void SVNDialog::slotExecuteCommand( )
// Write the commit log message from the input field to a temporary file
m_tempFile = new KTempFile;
m_tempFile->setAutoDelete( true );
- QTextStream* stream = m_tempFile->textStream();
+ TQTextStream* stream = m_tempFile->textStream();
if ( !stream )
{
- kdError() << "Could not create QTextStream for file " << m_tempFile->name();
+ kdError() << "Could not create TQTextStream for file " << m_tempFile->name();
delete m_tempFile;
m_tempFile = 0;
KMessageBox::error( this, i18n( "Cannot open temporary file for writing. Aborting.") );
return;
}
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
*stream << msg;
m_tempFile->close();
@@ -265,7 +265,7 @@ void SVNDialog::slotExecuteCommand( )
// Update the list of log messages
if ( !msg.isEmpty() ) {
- const QString shortLog = KStringHandler::csqueeze( msg, 80 );
+ const TQString shortLog = KStringHandler::csqueeze( msg, 80 );
// Remove the message from the list if it already exists
@@ -280,12 +280,12 @@ void SVNDialog::slotExecuteCommand( )
// Set the KProcess' command line.
*p << _commandLine;
- connect( p, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT ( slotProcessStdout( KProcess*, char*, int ) ) );
- connect( p, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- this, SLOT ( slotProcessStderr( KProcess*, char*, int ) ) );
- connect( p, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( slotProcessExited( KProcess* ) ) );
+ connect( p, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ this, TQT_SLOT ( slotProcessStdout( KProcess*, char*, int ) ) );
+ connect( p, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ this, TQT_SLOT ( slotProcessStderr( KProcess*, char*, int ) ) );
+ connect( p, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
output->append( i18n( "[ Starting command ]" ) );
@@ -304,22 +304,22 @@ void SVNDialog::slotExecuteCommand( )
void SVNDialog::slotProcessStdout( KProcess*, char * buffer, int len )
{
- output->append( QString::fromLocal8Bit( buffer, len ) );
+ output->append( TQString::fromLocal8Bit( buffer, len ) );
// Set the cursor's position at the end of the output.
output->setCursorPosition( output->lines( ), 0 );
// If the command is 'svn status' or 'svn diff' collect the output of stdout.
if ( ( _cmd == SVN::StatusLocal ) || ( _cmd == SVN::StatusRemote ) || ( _cmd == SVN::Diff ) )
- _statusOutput += QString::fromLocal8Bit( buffer, len );
+ _statusOutput += TQString::fromLocal8Bit( buffer, len );
}
void SVNDialog::slotProcessStderr( KProcess*, char * buffer, int len )
{
// If an error occurs while executing the command display stderr in
// another color.
- QColor oldColor( output->color( ) );
+ TQColor oldColor( output->color( ) );
output->setColor( Qt::red );
- output->append( QString::fromLocal8Bit( buffer, len ) );
+ output->append( TQString::fromLocal8Bit( buffer, len ) );
output->setColor( oldColor );
output->setCursorPosition( output->lines( ), 0 );
}
@@ -337,7 +337,7 @@ void SVNDialog::slotProcessExited( KProcess * p )
mainBtn->setText( i18n( "&Show Diff" ) );
else
mainBtn->setText( i18n( "&Close" ) );
- connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( accept( ) ) );
+ connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( accept( ) ) );
// Reenable the button and the log edit now that the process is finished.
mainBtn->setEnabled( true );
@@ -345,7 +345,7 @@ void SVNDialog::slotProcessExited( KProcess * p )
logedit->setEnabled( true );
}
-QString SVNDialog::statusOutput( )
+TQString SVNDialog::statusOutput( )
{
return _statusOutput;
}
@@ -362,14 +362,14 @@ void SVNDialog::readSettings( )
m_logMessages.clear();
m_squeezedLogMessages.clear();
for ( int cnt = 0; cnt < 10; cnt++ )
- if ( config->hasKey( QString( "CommitLogMessage%1" ).arg( cnt ) ) )
+ if ( config->hasKey( TQString( "CommitLogMessage%1" ).arg( cnt ) ) )
{
- const QString logMessage = config->readEntry( QString( "CommitLogMessage%1" ).arg( 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)
// ### FIXME: if the string matches the squeezed 80 chars, it might overwrite another entry
- const QString shortLog = KStringHandler::csqueeze( logMessage );
+ const TQString shortLog = KStringHandler::csqueeze( logMessage );
m_logMessages.append( logMessage );
m_squeezedLogMessages.append( shortLog );
oldMessages->insertItem( shortLog );
@@ -388,9 +388,9 @@ void SVNDialog::saveSettings( )
// Write the log messages to the config file.
int cnt = 0;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for ( it = m_logMessages.constBegin( ); it != m_logMessages.constEnd( ) && cnt < 10 ; ++it, ++cnt )
- config->writeEntry( QString( "CommitLogMessage%1" ).arg( cnt ), *it );
+ config->writeEntry( TQString( "CommitLogMessage%1" ).arg( cnt ), *it );
}
m_config->sync();
}