Remove additional unneeded tq method conversions

pull/1/head
Timothy Pearson 13 years ago
parent ac76541384
commit 82f7d41a2e

@ -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 );
}

@ -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() );

@ -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();
}

@ -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 );
}
}

@ -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" )

@ -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

@ -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 );

@ -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;
}

@ -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 );
}

@ -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;

@ -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: <b>%1</b>") ).tqarg(fileList->count()));
labelCount->setText( TQString( i18n("Files: <b>%1</b>") ).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;

@ -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 );
}

@ -113,7 +113,7 @@ NumberDialog::NumberDialog(TQValueList<int> & 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;

@ -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();
}

@ -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() );

@ -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<int> & 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 )
{

@ -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 );

Loading…
Cancel
Save