From eba47f8f0637f451e21348187591e1f1fd58ac74 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 2 Aug 2010 19:23:46 +0000 Subject: TQt conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmrml/kmrml/kcontrol/indexer.cpp | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'kmrml/kmrml/kcontrol/indexer.cpp') diff --git a/kmrml/kmrml/kcontrol/indexer.cpp b/kmrml/kmrml/kcontrol/indexer.cpp index a3bb6b7d..f4c4b108 100644 --- a/kmrml/kmrml/kcontrol/indexer.cpp +++ b/kmrml/kmrml/kcontrol/indexer.cpp @@ -16,8 +16,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -36,8 +36,8 @@ using namespace KMrmlConfig; Indexer::Indexer( const KMrml::Config* config, - QObject *parent, const char *name ) - : QObject( parent, name ), + TQObject *parent, const char *name ) + : TQObject( parent, name ), m_config( config ), m_dirCount( 0 ) { @@ -46,10 +46,10 @@ Indexer::Indexer( const KMrml::Config* config, m_process->setUseShell( true ); #endif m_process->setEnvironment( "LC_ALL", "C" ); - connect( m_process, SIGNAL( processExited( KProcess * )), - SLOT( processFinished( KProcess * ))); - connect( m_process, SIGNAL( readReady( KProcIO * )), - SLOT( slotCanRead( KProcIO * )) ); + connect( m_process, TQT_SIGNAL( processExited( KProcess * )), + TQT_SLOT( processFinished( KProcess * ))); + connect( m_process, TQT_SIGNAL( readReady( KProcIO * )), + TQT_SLOT( slotCanRead( KProcIO * )) ); } Indexer::~Indexer() @@ -57,7 +57,7 @@ Indexer::~Indexer() delete m_process; } -void Indexer::startIndexing( const QStringList& dirs ) +void Indexer::startIndexing( const TQStringList& dirs ) { if ( m_process->isRunning() ) return; @@ -91,11 +91,11 @@ void Indexer::processNext() m_process->resetAll(); - QString cmd = m_config->addCollectionCommandLine().simplifyWhiteSpace().stripWhiteSpace(); + TQString cmd = m_config->addCollectionCommandLine().simplifyWhiteSpace().stripWhiteSpace(); // in the commandline, replace %d with the directory to process and // %t with the thumbnail dir - int index = cmd.find( "%d" ); // ### QFile::encodeName()? + int index = cmd.find( "%d" ); // ### TQFile::encodeName()? if ( index != -1 ) cmd.replace( index, 2, QUOTE( m_currentDir ) ); index = cmd.find( "%t" ); @@ -106,8 +106,8 @@ void Indexer::processNext() #if KDE_VERSION >= 306 *m_process << cmd; #else - QStringList params = QStringList::split( ' ', cmd ); - QStringList::Iterator it = params.begin(); + TQStringList params = TQStringList::split( ' ', cmd ); + TQStringList::Iterator it = params.begin(); for ( ; it != params.end(); ++it ) *m_process << *it; #endif @@ -118,11 +118,11 @@ void Indexer::processNext() void Indexer::slotCanRead( KProcIO *proc ) { - static const QString& sprogress = KGlobal::staticQString("PROGRESS: "); - static const QString& r1 = /* PROGRESS: 1 of 6 done (15%) */ + static const TQString& sprogress = KGlobal::staticQString("PROGRESS: "); + static const TQString& r1 = /* PROGRESS: 1 of 6 done (15%) */ KGlobal::staticQString( "(\\d+) of (\\d+) done \\((\\d+)%\\)" ); - QString line; + TQString line; int bytes = -1; while ( (bytes = proc->readln( line )) != -1 ) { @@ -146,13 +146,13 @@ void Indexer::slotCanRead( KProcIO *proc ) // case 1: image processing, below 99% if ( line.at( line.length() -1 ) == ')' ) { - QRegExp regxp( r1 ); + TQRegExp regxp( r1 ); int pos = regxp.search( line ); if ( pos > -1 ) { - QString currentFile = regxp.cap( 1 ); - QString numFiles = regxp.cap( 2 ); - QString percent = regxp.cap( 3 ); + TQString currentFile = regxp.cap( 1 ); + TQString numFiles = regxp.cap( 2 ); + TQString percent = regxp.cap( 3 ); // qDebug( "current: %s, number: %s, percent: %s", currentFile.latin1(), numFiles.latin1(), percent.latin1()); bool ok = false; @@ -160,7 +160,7 @@ void Indexer::slotCanRead( KProcIO *proc ) if ( ok ) { uint dirsLeft = m_dirs.count(); - QString message = i18n( "Processing folder %1 of %2:
%3
File %4 of %5.
").arg( m_dirCount - dirsLeft ).arg( m_dirCount).arg( m_currentDir ).arg( currentFile ).arg( numFiles ); + TQString message = i18n( "Processing folder %1 of %2:
%3
File %4 of %5.
").arg( m_dirCount - dirsLeft ).arg( m_dirCount).arg( m_currentDir ).arg( currentFile ).arg( numFiles ); emit progress( perc, message ); } } @@ -170,13 +170,13 @@ void Indexer::slotCanRead( KProcIO *proc ) // case 2: file writing, 99% or done, 100% else { - QString percent = line.left( line.length() - 1 ); + TQString percent = line.left( line.length() - 1 ); bool ok = false; int number = percent.toInt( &ok ); if ( ok ) { - QString message = (number == 100) ? + TQString message = (number == 100) ? i18n("Finished.") : i18n("Writing data..."); emit progress( number, message ); } -- cgit v1.2.3