summaryrefslogtreecommitdiffstats
path: root/kmrml/kmrml/kcontrol/indexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmrml/kmrml/kcontrol/indexer.cpp')
-rw-r--r--kmrml/kmrml/kcontrol/indexer.cpp46
1 files changed, 23 insertions, 23 deletions
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 <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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( "<qt>Processing folder %1 of %2: <br><b>%3</b><br>File %4 of %5.</qt>").arg( m_dirCount - dirsLeft ).arg( m_dirCount).arg( m_currentDir ).arg( currentFile ).arg( numFiles );
+ TQString message = i18n( "<qt>Processing folder %1 of %2: <br><b>%3</b><br>File %4 of %5.</qt>").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 );
}