diff --git a/krename/ProgressDialog.cpp b/krename/ProgressDialog.cpp index 99b601f..1a07d72 100644 --- a/krename/ProgressDialog.cpp +++ b/krename/ProgressDialog.cpp @@ -157,7 +157,7 @@ void ProgressDialog::error( TQString text ) } //TODO: simplify this (breaks i18n) - KListViewItem* item = new KListViewItem( display, TQString( i18n("Error: %1") ).tqarg( TQString() ) + simplify( text ), count() ); + KListViewItem* item = new KListViewItem( display, TQString( i18n("Error: %1") ).arg( TQString() ) + simplify( text ), count() ); item->setPixmap( 0, SmallIcon("cancel") ); display->insertItem( item ); } @@ -170,7 +170,7 @@ void ProgressDialog::warning( TQString text ) m_timer->start( TIMER_INTERVAL ); } - KListViewItem* item = new KListViewItem( display, TQString( i18n("Warning: %1") ).tqarg( TQString() ) + simplify( text ), count() ); + KListViewItem* item = new KListViewItem( display, TQString( i18n("Warning: %1") ).arg( TQString() ) + simplify( text ), count() ); item->setPixmap( 0, SmallIcon("idea") ); display->insertItem( item ); } diff --git a/krename/batchrenamer.cpp b/krename/batchrenamer.cpp index 5eed8d3..880b3cf 100644 --- a/krename/batchrenamer.cpp +++ b/krename/batchrenamer.cpp @@ -125,7 +125,7 @@ void BatchRenamer::processFiles( ProgressDialog* p, TQObject* object ) } } - p->print( TQString( i18n("Filenames Processed after %1 seconds.")).tqarg(t.elapsed()/1000) ); + p->print( TQString( i18n("Filenames Processed after %1 seconds.")).arg(t.elapsed()/1000) ); work( p ); } @@ -258,11 +258,11 @@ void BatchRenamer::work( ProgressDialog* p ) * Give the user some information... */ if( m_mode == COPY) - p->print( TQString( i18n("Files will be copied to: %1") ).tqarg(m_files[0].dst.directory) ); + p->print( TQString( i18n("Files will be copied to: %1") ).arg(m_files[0].dst.directory) ); else if( m_mode == MOVE ) - p->print( TQString( i18n("Files will be moved to: %1") ).tqarg(m_files[0].dst.directory) ); + p->print( TQString( i18n("Files will be moved to: %1") ).arg(m_files[0].dst.directory) ); else if( m_mode == LINK ) - p->print( TQString( i18n("Symbolic links will be created in: %1") ).tqarg(m_files[0].dst.directory) ); + p->print( TQString( i18n("Symbolic links will be created in: %1") ).arg(m_files[0].dst.directory) ); else if( m_mode == RENAME ) p->print( i18n("Input files will be renamed.") ); @@ -317,7 +317,7 @@ void BatchRenamer::work( ProgressDialog* p ) (*tundo) << "mv --force -b --suffix=.krename_ \"" << m_files[i].dst.name << "\" \"" << m_files[i].src.name << "\"" << endl; } else - p->warning( TQString( i18n("Undo is not possible for remote file: %1") ).tqarg( dst.prettyURL() ) ); + p->warning( TQString( i18n("Undo is not possible for remote file: %1") ).arg( dst.prettyURL() ) ); } @@ -329,13 +329,13 @@ void BatchRenamer::work( ProgressDialog* p ) } } - const TQString m = TQString( i18n("Renamed %1 files successfully.") ).tqarg(i-error); + const TQString m = TQString( i18n("Renamed %1 files successfully.") ).arg(i-error); ( i - error ) ? p->print( m ) : p->warning( m ); if( error > 0 ) - p->warning( TQString( i18n("%2 errors occurred!") ).tqarg(error)); + p->warning( TQString( i18n("%2 errors occurred!") ).arg(error)); - p->print( TQString( i18n("Elapsed time: %1 seconds") ).tqarg( t.elapsed()/1000 ), "kalarm" ); + p->print( TQString( i18n("Elapsed time: %1 seconds") ).arg( t.elapsed()/1000 ), "kalarm" ); p->print( i18n("KRename finished the renaming process."), "krename" ); p->print( i18n("Press close to quit!") ); p->setRenamedFiles( renamedFiles, m_files.count() ); diff --git a/krename/commandplugin.cpp b/krename/commandplugin.cpp index a626c99..46bd554 100644 --- a/krename/commandplugin.cpp +++ b/krename/commandplugin.cpp @@ -137,7 +137,7 @@ TQString CommandPlugin::processFile( BatchRenamer* b, int i, TQString, int ) proc.resume(); if( !noblock && proc.exitStatus() ) - return command.tqarg( filename ) + TQString( i18n(" exited with error: %1") ).tqarg( proc.exitStatus() ); + return command.arg( filename ) + TQString( i18n(" exited with error: %1") ).arg( proc.exitStatus() ); return TQString(); } diff --git a/krename/coorddialog.cpp b/krename/coorddialog.cpp index f76996e..d25addc 100644 --- a/krename/coorddialog.cpp +++ b/krename/coorddialog.cpp @@ -102,26 +102,26 @@ void CoordDialog::updateCommand() start++; end++; if( start > 1 ) - m_command = TQString("[$1;%1]").tqarg(start-1); + m_command = TQString("[$1;%1]").arg(start-1); if( end <= (signed int)filename->text().length() ) - m_command.append( TQString("[$%1-[length]]").tqarg(end) ); + m_command.append( TQString("[$%1-[length]]").arg(end) ); } } else if( checkInvert->isChecked() && !filename->hasSelectedText() ) { int p = filename->cursorPosition(); - m_command = TQString("[$1;%1][$%2-[length]]").tqarg(p).tqarg(p+1); + m_command = TQString("[$1;%1][$%2-[length]]").arg(p).arg(p+1); } else if( !checkInvert->isChecked() && filename->hasSelectedText() ){ if( end ) { start++; end++; if( end <= (signed int)filename->text().length() ) - m_command = TQString("[$%1;%2]").tqarg(start).tqarg(end-start); + m_command = TQString("[$%1;%2]").arg(start).arg(end-start); else - m_command = TQString("[$%1-[length]]").tqarg(start); + m_command = TQString("[$%1-[length]]").arg(start); } } else if( !checkInvert->isChecked() && !filename->hasSelectedText() ) { int p = filename->cursorPosition(); - m_command = TQString("[$%1-[length]]").tqarg( p ); + m_command = TQString("[$%1-[length]]").arg( p ); } } diff --git a/krename/dateplugin.cpp b/krename/dateplugin.cpp index eb4b702..2e51b6d 100644 --- a/krename/dateplugin.cpp +++ b/krename/dateplugin.cpp @@ -73,13 +73,13 @@ TQString DatePlugin::processFile(BatchRenamer* b, int i, TQString token, int ) if( token == "date" ) { return TQDateTime::currentDateTime().toString( format ); } else if( token == "year" ) - return TQString( "%1" ).tqarg( d.year() ); + return TQString( "%1" ).arg( d.year() ); else if( token == "month" ) return tmp.sprintf("%0*i", 2, d.month() ); else if( token == "day" ) return tmp.sprintf("%0*i", 2, d.day() ); else if( token == "time" ) - return TQString( "%1-%2-%3" ).tqarg( t.hour() ).tqarg( TQString().sprintf("%0*i", 2, t.minute() ) ).tqarg( TQString().sprintf("%0*i", 2, t.second() ) ); + return TQString( "%1-%2-%3" ).arg( t.hour() ).arg( TQString().sprintf("%0*i", 2, t.minute() ) ).arg( TQString().sprintf("%0*i", 2, t.second() ) ); else if( token == "hour" ) return tmp.sprintf("%0*i", 2, t.hour() ); else if( token == "minute" ) diff --git a/krename/datetime.cpp b/krename/datetime.cpp index 077e82d..7c9319f 100644 --- a/krename/datetime.cpp +++ b/krename/datetime.cpp @@ -149,7 +149,7 @@ TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int ) f = fopen((const char *)filename, "r"); if( f == NULL ) - return TQString( i18n("Can't change date of file %1.") ).tqarg(filename); + return TQString( i18n("Can't change date of file %1.") ).arg(filename); fclose( f ); @@ -165,16 +165,16 @@ TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int ) ti = mktime( &tmp ); if( ti == -1 ) - return TQString( i18n("Can't change date of file %1.") ).tqarg(filename); + return TQString( i18n("Can't change date of file %1.") ).arg(filename); if( stat( (const char *)filename, &st ) == -1 ) - return TQString( i18n("Can't change date of file %1.") ).tqarg(filename); + return TQString( i18n("Can't change date of file %1.") ).arg(filename); t->actime = st.st_atime; t->modtime = ti; if(utime( (const char *)filename, t ) != 0) - return TQString( i18n("Can't change date of file %1.") ).tqarg(filename); + return TQString( i18n("Can't change date of file %1.") ).arg(filename); return TQString(); #else @@ -189,7 +189,7 @@ TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int ) f = fopen((const char *)filename, "r"); if( f == NULL ) - return TQString( i18n("Can't change date of file %1.") ).tqarg(filename); + return TQString( i18n("Can't change date of file %1.") ).arg(filename); fclose( f ); @@ -204,10 +204,10 @@ TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int ) ti = mktime( &tmp ); if( ti == -1 ) - return TQString( i18n("Can't change date of file %1.") ).tqarg(filename); + return TQString( i18n("Can't change date of file %1.") ).arg(filename); if( stat( (const char *)filename, &st ) == -1 ) - return TQString( i18n("Can't change date of file %1.") ).tqarg(filename); + return TQString( i18n("Can't change date of file %1.") ).arg(filename); if(dvals.changeAccess) t->actime = ti; @@ -220,7 +220,7 @@ TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int ) t->modtime = st.st_mtime; if(utime( (const char *)filename, t ) != 0) - return TQString( i18n("Can't change date of file %1.") ).tqarg(filename); + return TQString( i18n("Can't change date of file %1.") ).arg(filename); return TQString(); #endif diff --git a/krename/encodingplugin.cpp b/krename/encodingplugin.cpp index 0b160bb..6c421d7 100644 --- a/krename/encodingplugin.cpp +++ b/krename/encodingplugin.cpp @@ -67,12 +67,12 @@ void EncodingPlugin::drawInterface( TQWidget* w, TQVBoxLayout* l ) l->addWidget( label ); TQVGroupBox* groupInput = new TQVGroupBox( i18n("Encoding of Input Files:"), w ); - checkInput = new TQCheckBox( i18n("&Use local encoding: %1").tqarg( m_locale_codec), groupInput ); + checkInput = new TQCheckBox( i18n("&Use local encoding: %1").arg( m_locale_codec), groupInput ); comboInput = new KComboBox( false, groupInput ); comboInput->insertStringList( codecs ); TQVGroupBox* groupOutput = new TQVGroupBox( i18n("Encoding of Output Files:"), w ); - checkOutput = new TQCheckBox( i18n("&Use local encoding: %1").tqarg( m_locale_codec), groupOutput ); + checkOutput = new TQCheckBox( i18n("&Use local encoding: %1").arg( m_locale_codec), groupOutput ); checkOutput->setChecked( true ); comboOutput = new KComboBox( false, groupOutput ); comboOutput->insertStringList( codecs ); diff --git a/krename/fileoperation.cpp b/krename/fileoperation.cpp index cfc558b..b25cdcb 100644 --- a/krename/fileoperation.cpp +++ b/krename/fileoperation.cpp @@ -50,7 +50,7 @@ bool FileOperation::start( const KURL & src, const KURL & dest, int mode, bool o result = 0; if( src == dest && !overwrite ) { - m_error = TQString( i18n( "File %1 exists already!") ).tqarg( dest.prettyURL() ); + m_error = TQString( i18n( "File %1 exists already!") ).arg( dest.prettyURL() ); return false; } @@ -72,7 +72,7 @@ bool FileOperation::start( const KURL & src, const KURL & dest, int mode, bool o } else { - m_error = i18n("Can't create symlinks on different hosts for file %1.").tqarg( src.prettyURL() ); + m_error = i18n("Can't create symlinks on different hosts for file %1.").arg( src.prettyURL() ); result = true; return !result; } diff --git a/krename/kmylistview.cpp b/krename/kmylistview.cpp index 976e8d3..62865c0 100644 --- a/krename/kmylistview.cpp +++ b/krename/kmylistview.cpp @@ -164,14 +164,14 @@ KMyListViewItem::~KMyListViewItem() { } void KMyListViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int tqalignment ) + int column, int width, int alignment ) { TQColorGroup _cg( cg ); TQColor c = _cg.text(); if( modified ) _cg.setColor( TQColorGroup::Text, TQt::red ); - KListViewItem::paintCell( p, _cg, column, width, tqalignment ); + KListViewItem::paintCell( p, _cg, column, width, alignment ); _cg.setColor( TQColorGroup::Text, c ); } diff --git a/krename/kmylistview.h b/krename/kmylistview.h index f694589..66b2852 100644 --- a/krename/kmylistview.h +++ b/krename/kmylistview.h @@ -85,7 +85,7 @@ class KMyListViewItem : public KListViewItem { virtual ~KMyListViewItem(); - void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment ); + void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ); private: bool modified; diff --git a/krename/krenameimpl.cpp b/krename/krenameimpl.cpp index f150847..d4aa5f8 100644 --- a/krename/krenameimpl.cpp +++ b/krename/krenameimpl.cpp @@ -1004,7 +1004,7 @@ void KRenameImpl::start() } ProgressDialog* p = new ProgressDialog( 0, "p" ); - p->print(TQString( i18n("Starting conversion of %1 files.") ).tqarg(fileList->count())); + p->print(TQString( i18n("Starting conversion of %1 files.") ).arg(fileList->count())); // Save History dirname->saveSettings(); @@ -1065,7 +1065,7 @@ bool KRenameImpl::checkErrors() void KRenameImpl::updateCount() { - labelCount->setText( TQString( i18n("Files: %1") ).tqarg(fileList->count())); + labelCount->setText( TQString( i18n("Files: %1") ).arg(fileList->count())); buttonCoord->setEnabled( (bool)fileList->count() ); buttonReplace->setEnabled( (bool)fileList->count() ); @@ -1165,7 +1165,7 @@ bool KRenameImpl::setupBatchRenamer( BatchRenamer* b, bool preview ) if( !KIO::NetAccess::exists( KURL( url ) ) ) { int m = KMessageBox::warningContinueCancel( parent, i18n("The directory %1 does not exist. " - "KRename will create it for you.").tqarg( url ) ); + "KRename will create it for you.").arg( url ) ); if( m == KMessageBox::Cancel ) return false; diff --git a/krename/mydirplugin.cpp b/krename/mydirplugin.cpp index e92a39d..e6119a7 100644 --- a/krename/mydirplugin.cpp +++ b/krename/mydirplugin.cpp @@ -131,7 +131,7 @@ void MyDirPlugin::fillStructure() filecounter = 0; dircounter = spinStart->value(); - curdir = dir + TQString("/%1/").tqarg( dircounter ); + curdir = dir + TQString("/%1/").arg( dircounter ); d = new TQDir( dir ); d->mkdir( curdir ); @@ -144,7 +144,7 @@ TQString MyDirPlugin::processFile( BatchRenamer*, int, TQString token, int ) if( filecounter == fpd ) { filecounter = 0; dircounter++; - curdir = dir + TQString("/%1/").tqarg( dircounter ); + curdir = dir + TQString("/%1/").arg( dircounter ); d->mkdir( curdir ); } diff --git a/krename/numberdialog.cpp b/krename/numberdialog.cpp index 114b00e..e219dd6 100644 --- a/krename/numberdialog.cpp +++ b/krename/numberdialog.cpp @@ -113,7 +113,7 @@ NumberDialog::NumberDialog(TQValueList & n,TQWidget *parent ) connect( spinNumber, TQT_SIGNAL( returnPressed()), this, TQT_SLOT( addNumber() ) ); for( unsigned int i = 0; i < n.count(); i++ ) - listNumbers->insertItem( TQString("%1").tqarg(n[i]), -1 ); + listNumbers->insertItem( TQString("%1").arg(n[i]), -1 ); update(); } @@ -124,7 +124,7 @@ NumberDialog::~NumberDialog() void NumberDialog::addNumber() { - TQString tmp = TQString("%1").tqarg(spinNumber->value()); + TQString tmp = TQString("%1").arg(spinNumber->value()); for( unsigned int i = 0; i < listNumbers->count(); i++ ) if( listNumbers->text(i) == tmp ) return; diff --git a/krename/permission.cpp b/krename/permission.cpp index 83d79b9..b35894a 100644 --- a/krename/permission.cpp +++ b/krename/permission.cpp @@ -245,11 +245,11 @@ TQString MyPermPlugin::processFile( BatchRenamer* b, int i, TQString, int ) TQString filename = b->files()[i].dst.name; if( perm.changePermissions ) if( chmod( (const char *)filename, (mode_t)perm.newPermission ) == -1 ) - return TQString( i18n("Can't chmod %1.") ).tqarg(filename); + return TQString( i18n("Can't chmod %1.") ).arg(filename); if( perm.changeOwner ) if( chown( (const char*)filename, getUid( perm.owner), getGid( perm.group ))) - return TQString( i18n("Can't chown %1.") ).tqarg(filename); + return TQString( i18n("Can't chown %1.") ).arg(filename); return TQString(); } diff --git a/krename/pictureplugin.cpp b/krename/pictureplugin.cpp index 58ce8cd..e619b49 100644 --- a/krename/pictureplugin.cpp +++ b/krename/pictureplugin.cpp @@ -72,7 +72,7 @@ TQString PicturePlugin::processFile( BatchRenamer* b, int i, TQString token, int if( img.isNull() ) return TQString(); - resolution = TQString( "%1x%2" ).tqarg(img.width()).tqarg(img.height()); + resolution = TQString( "%1x%2" ).arg(img.width()).arg(img.height()); xres = TQString::number( img.width() ); yres = TQString::number( img.height() ); bitdepth = TQString::number( img.depth() ); diff --git a/krename/profiledlg.cpp b/krename/profiledlg.cpp index c6aef81..eee32fd 100644 --- a/krename/profiledlg.cpp +++ b/krename/profiledlg.cpp @@ -113,7 +113,7 @@ const TQString ProfileManager::getProfilePath( const TQString & name ) else if( name == PROFILE_TABBED_NAME ) return locate( "data", "krename/krename_system_default_tabbed.xml" ); - TQString path = locateLocal( "data", TQString( "krename/%1.xml" ).tqarg( name ) ); + TQString path = locateLocal( "data", TQString( "krename/%1.xml" ).arg( name ) ); KConfig* conf = kapp->config(); @@ -232,7 +232,7 @@ bool ProfileManager::loadXML( const TQString & path ) { bool wiz, plug; wiz = (bool)e.attribute( "wizard", - TQString( "%1" ).tqarg( m_krename->m_wizard ) ).toInt(); + TQString( "%1" ).arg( m_krename->m_wizard ) ).toInt(); m_krename->setWizardMode( wiz ); // if( wiz != m_krename->m_wizard ) @@ -242,7 +242,7 @@ bool ProfileManager::loadXML( const TQString & path ) } plug = (bool)e.attribute( "fileplugins", - TQString( "%1" ).tqarg( m_krename->plugin->filePluginsLoaded() ) ).toInt(); + TQString( "%1" ).arg( m_krename->plugin->filePluginsLoaded() ) ).toInt(); if( plug && !m_krename->plugin->filePluginsLoaded() ) m_krename->plugin->loadPlugins( true ); } @@ -252,7 +252,7 @@ bool ProfileManager::loadXML( const TQString & path ) m_krename->extemplate->setText( e.attribute("extension", m_krename->extemplate->text() ) ); m_krename->checkExtension->setChecked( (bool)e.attribute("extension_enabled", - TQString("%1").tqarg(m_krename->checkExtension->isChecked() ) ).toInt() ); + TQString("%1").arg(m_krename->checkExtension->isChecked() ) ).toInt() ); m_krename->comboExtension->setCurrentItem( e.attribute("extension_start", TQString::number( m_krename->comboExtension->currentItem() ) ).toInt() ); @@ -344,7 +344,7 @@ const TQString ProfileManager::listToString( TQValueList & list ) { TQString data; for( unsigned int i = 0; i < list.count(); i++ ) - data += TQString( "%1;" ).tqarg( list[i] ); + data += TQString( "%1;" ).arg( list[i] ); return data; } @@ -500,13 +500,13 @@ void ProfileDlg::slotSetDefault() void ProfileDlg::slotLoadProfile() { TQString profile = profiles->currentText(); - TQString msg = TQString( i18n("Do you really want to load the profile and overwrite the current settings: %1") ).tqarg( profile ); + TQString msg = TQString( i18n("Do you really want to load the profile and overwrite the current settings: %1") ).arg( profile ); TQString path = getProfilePath( profile ); if( path.isEmpty() ) { - KMessageBox::error( this, i18n("The profile \"%1\" could not be found.").tqarg( profile ) ); + KMessageBox::error( this, i18n("The profile \"%1\" could not be found.").arg( profile ) ); return; } @@ -554,7 +554,7 @@ void ProfileDlg::slotDeleteProfile() } TQString profile = profiles->currentText(); - TQString msg = TQString( i18n("Do you really want to delete the profile: %1") ).tqarg( profile ); + TQString msg = TQString( i18n("Do you really want to delete the profile: %1") ).arg( profile ); if( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) { diff --git a/krename/wizard.cpp b/krename/wizard.cpp index 09a9d09..c44ca71 100644 --- a/krename/wizard.cpp +++ b/krename/wizard.cpp @@ -75,7 +75,7 @@ void wizard::slotAddPage( TQWidget* page, const TQString & title ) return; } - TQString t = title + i18n(" - Step %1 of %2").tqarg( pageCount()+1 ).tqarg( 3 ); + TQString t = title + i18n(" - Step %1 of %2").arg( pageCount()+1 ).arg( 3 ); TQVBox* tqlayout = new TQVBox( this );