Remove additional unneeded tq method conversions

(cherry picked from commit 6b7a8ff33a)
v3.5.13-sru
Timothy Pearson 13 years ago committed by Slávek Banko
parent 1754e4db96
commit 239cc9b83c

@ -60,7 +60,7 @@ CTCron::CTCron(bool _syscron, string _login) :
writeCommand = TQString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName); writeCommand = TQString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName);
if (!initFromPasswd(getpwnam(_login.c_str()))) if (!initFromPasswd(getpwnam(_login.c_str())))
{ {
error = i18n("No password entry found for user '%1'").tqarg(_login.c_str()); error = i18n("No password entry found for user '%1'").arg(_login.c_str());
} }
} }
} }
@ -71,7 +71,7 @@ CTCron::CTCron(bool _syscron, string _login) :
writeCommand = "crontab " + KProcess::quote(tmpFileName); writeCommand = "crontab " + KProcess::quote(tmpFileName);
if (!initFromPasswd(getpwuid(uid))) if (!initFromPasswd(getpwuid(uid)))
{ {
error = i18n("No password entry found for uid '%1'").tqarg(uid); error = i18n("No password entry found for uid '%1'").arg(uid);
} }
} }

@ -70,7 +70,7 @@ bool KTApp::init()
if (cthost->isError()) if (cthost->isError())
{ {
KMessageBox::error(this, i18n("The following error occurred while initializing KCron:" KMessageBox::error(this, i18n("The following error occurred while initializing KCron:"
"\n\n%1\n\nKCron will now exit.\n").tqarg(cthost->errorMessage())); "\n\n%1\n\nKCron will now exit.\n").arg(cthost->errorMessage()));
return false; return false;
} }

@ -238,13 +238,13 @@ private:
/** /**
* Read general options again and initialize all variables like the * Read general options again and initialize all variables like the
* tqgeometry. * geometry.
*/ */
void readOptions(); void readOptions();
/** /**
* Save general options like all bar positions and status as well as the * Save general options like all bar positions and status as well as the
* tqgeometry to the configuration file. * geometry to the configuration file.
*/ */
void saveOptions(); void saveOptions();

@ -77,7 +77,7 @@ void KTListTasks::print (KTPrint& printer) const
printer.setFont(stnd); printer.setFont(stnd);
//firstChild() does not return null if there are no tqchildren, therefore //firstChild() does not return null if there are no children, therefore
//we need to check the validation of the pointer without terminating //we need to check the validation of the pointer without terminating
//the application. This maybe a bug in QT 1.44 //the application. This maybe a bug in QT 1.44

@ -73,7 +73,7 @@ void KTListVars::print(KTPrint& printer) const
printer.setFont(stnd); printer.setFont(stnd);
//firstChild() does not return null if there are no tqchildren, therefore //firstChild() does not return null if there are no children, therefore
//we need to check the validation of the pointer without terminating //we need to check the validation of the pointer without terminating
//the application. This maybe a bug in QT 1.44 //the application. This maybe a bug in QT 1.44

@ -104,7 +104,7 @@ TQFont KTPrint :: getFont () const
return paint->font(); return paint->font();
} }
void KTPrint :: print (const TQString &str, int col, int tqalignment, bool wordWrap) void KTPrint :: print (const TQString &str, int col, int alignment, bool wordWrap)
{ {
//Prints the string str into the column col using //Prints the string str into the column col using
//the remaining arguments as format flags //the remaining arguments as format flags
@ -115,8 +115,8 @@ void KTPrint :: print (const TQString &str, int col, int tqalignment, bool wordW
return; return;
//Setup the tqalignment //Setup the alignment
switch (tqalignment) { switch (alignment) {
case alignTextLeft : format = AlignLeft | AlignTop | DontClip | ExpandTabs; break; case alignTextLeft : format = AlignLeft | AlignTop | DontClip | ExpandTabs; break;
case alignTextCenter : format = AlignHCenter | AlignTop | DontClip | ExpandTabs; break; case alignTextCenter : format = AlignHCenter | AlignTop | DontClip | ExpandTabs; break;
case alignTextRight : format = AlignRight | AlignTop | DontClip | ExpandTabs; break; case alignTextRight : format = AlignRight | AlignTop | DontClip | ExpandTabs; break;

@ -87,7 +87,7 @@ public:
/** /**
* Print text * Print text
*/ */
void print (const TQString &str, int col =1, int tqalignment=KTPrint::defaultLeftMargin, bool wordWrap = true); void print (const TQString &str, int col =1, int alignment=KTPrint::defaultLeftMargin, bool wordWrap = true);
/** /**
* Constructs the columns * Constructs the columns

@ -273,9 +273,9 @@ void KTView :: pageHeading (KTListItem* user, KTPrint &printer) const
// SSA : Fix Me user name, logon name and host name musst be // SSA : Fix Me user name, logon name and host name musst be
// SSA : not only in us-ascii ?? // SSA : not only in us-ascii ??
logonInfo = i18n("user on host", "%1 <%2> on %3") logonInfo = i18n("user on host", "%1 <%2> on %3")
.tqarg(TQString::fromLocal8Bit(user->getCTCron()->name.c_str())) .arg(TQString::fromLocal8Bit(user->getCTCron()->name.c_str()))
.tqarg(TQString::fromLocal8Bit(user->getCTCron()->login.c_str())) .arg(TQString::fromLocal8Bit(user->getCTCron()->login.c_str()))
.tqarg(TQString::fromLocal8Bit(hostName)); .arg(TQString::fromLocal8Bit(hostName));
stnd = printer.getFont(); stnd = printer.getFont();
printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 14, TQFont::Bold )); printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 14, TQFont::Bold ));
@ -315,7 +315,7 @@ void KTView::resizeEvent (TQResizeEvent*)
{ {
listView->setFixedWidth(width()); listView->setFixedWidth(width());
listView->setFixedHeight(height()); listView->setFixedHeight(height());
tqrepaint(); repaint();
} }
void KTView::copy() void KTView::copy()

@ -94,7 +94,7 @@ void Archive::read( int version )
} }
} }
// Number of immediate tqchildren (4 bytes). // Number of immediate children (4 bytes).
fread( &ival, sizeof( ival ), 1, _fptr ); fread( &ival, sizeof( ival ), 1, _fptr );
//===== Read files ===== //===== Read files =====
@ -148,7 +148,7 @@ void Archive::write( FILE* fptr )
fwrite( &ival, sizeof( ival ), 1, _fptr ); fwrite( &ival, sizeof( ival ), 1, _fptr );
} }
// Number of immediate tqchildren (4 bytes). // Number of immediate children (4 bytes).
ival = getChildren().count(); ival = getChildren().count();
fwrite( &ival, sizeof( ival ), 1, _fptr ); fwrite( &ival, sizeof( ival ), 1, _fptr );
@ -202,7 +202,7 @@ const TQPtrList<File>& Archive::getChildren()
{ {
read(); read();
return _tqchildren; return _children;
} }
const TQPtrList<Range>& Archive::getRanges() const TQPtrList<Range>& Archive::getRanges()
@ -255,7 +255,7 @@ void Archive::addChild( File* file )
{ {
read(); read();
_tqchildren.append( file ); _children.append( file );
} }
File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename ) File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename )

@ -39,7 +39,7 @@ class Archive {
FILE* _fptr; FILE* _fptr;
int _offset; int _offset;
TQString _name; TQString _name;
TQPtrList<File> _tqchildren; TQPtrList<File> _children;
RangeList _ranges; RangeList _ranges;
Tape* _tape; Tape* _tape;
public: public:
@ -67,7 +67,7 @@ public:
Archive( Tape* tape, FILE* fptr, int offset ); Archive( Tape* tape, FILE* fptr, int offset );
/** /**
* Destroy the archive entry and all of its tqchildren. * Destroy the archive entry and all of its children.
*/ */
~Archive(); ~Archive();
@ -82,7 +82,7 @@ public:
/** /**
* Recursively read the instance data for this archive entry and all of its * Recursively read the instance data for this archive entry and all of its
* tqchildren. This method is used when converting from an older index format. * children. This method is used when converting from an older index format.
* *
* @param version The version of the old tape index. * @param version The version of the old tape index.
*/ */
@ -90,7 +90,7 @@ public:
/** /**
* Write out the archive entry to the open file. Entries for each of its * Write out the archive entry to the open file. Entries for each of its
* tqchildren will also be written. * children will also be written.
*/ */
void write( FILE* fptr ); void write( FILE* fptr );
@ -125,12 +125,12 @@ public:
/** /**
* Get the list of top-level files in this archive. * Get the list of top-level files in this archive.
* *
* @return A list of the immediate tqchildren of this archive. * @return A list of the immediate children of this archive.
*/ */
const TQPtrList<File>& getChildren(); const TQPtrList<File>& getChildren();
/** /**
* Get the list of ranges of this file and all of its tqchildren. * Get the list of ranges of this file and all of its children.
* *
* @return A list of ranges. * @return A list of ranges.
*/ */
@ -176,7 +176,7 @@ public:
File* addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename ); File* addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename );
/** /**
* Recursively calculate the list of ranges for all of the archive's tqchildren. * Recursively calculate the list of ranges for all of the archive's children.
*/ */
void calcRanges(); void calcRanges();
}; };

@ -426,7 +426,7 @@ void BackupDlg::updateStats()
_kbytesWritten->setText( str ); _kbytesWritten->setText( str );
if ( elapsed > 0 ) { if ( elapsed > 0 ) {
str = i18n( "%1/min" ).tqarg(Util::kbytesToString( (int)_totalKBytes *60 / elapsed ) ); str = i18n( "%1/min" ).arg(Util::kbytesToString( (int)_totalKBytes *60 / elapsed ) );
_transferRate->setText( str ); _transferRate->setText( str );
} }
} }

@ -44,9 +44,9 @@ File::File( File* parent, FILE* fptr, int offset )
File::~File() File::~File()
{ {
while ( _tqchildren.first() ) { while ( _children.first() ) {
delete _tqchildren.first(); delete _children.first();
_tqchildren.removeFirst(); _children.removeFirst();
} }
} }
@ -164,7 +164,7 @@ void File::write( FILE* fptr )
fwrite( &ival, sizeof( ival ), 1, fptr ); fwrite( &ival, sizeof( ival ), 1, fptr );
} }
// Number of immediate tqchildren (4 bytes). // Number of immediate children (4 bytes).
ival = getChildren().count(); ival = getChildren().count();
fwrite( &ival, sizeof( ival ), 1, fptr ); fwrite( &ival, sizeof( ival ), 1, fptr );
@ -175,10 +175,10 @@ void File::write( FILE* fptr )
} }
//===== Write files ===== //===== Write files =====
ival = _tqchildren.count(); ival = _children.count();
fwrite( &ival, sizeof( ival ), 1, fptr ); fwrite( &ival, sizeof( ival ), 1, fptr );
TQPtrListIterator<File> i( _tqchildren ); TQPtrListIterator<File> i( _children );
int count = 0; int count = 0;
for ( ; i.current(); ++i, count++ ) { for ( ; i.current(); ++i, count++ ) {
// Fill in the file offset. // Fill in the file offset.
@ -252,7 +252,7 @@ const TQPtrList<File>& File::getChildren()
{ {
read(); read();
return _tqchildren; return _children;
} }
const TQPtrList<Range>& File::getRanges() const TQPtrList<Range>& File::getRanges()
@ -266,7 +266,7 @@ void File::addChild( File* file )
{ {
read(); read();
_tqchildren.append( file ); _children.append( file );
} }
void File::calcRanges() void File::calcRanges()

@ -46,7 +46,7 @@ class File {
} _union; } _union;
TQString _name; TQString _name;
File* _parent; File* _parent;
TQPtrList<File> _tqchildren; TQPtrList<File> _children;
RangeList _ranges; RangeList _ranges;
public: public:
/** /**
@ -80,7 +80,7 @@ public:
File( File* parent, FILE* fptr, int offset ); File( File* parent, FILE* fptr, int offset );
/** /**
* Destroy the file entry and all of its tqchildren. * Destroy the file entry and all of its children.
*/ */
~File(); ~File();
@ -95,7 +95,7 @@ public:
/** /**
* Recursively read the instance for this file entry and all of it's * Recursively read the instance for this file entry and all of it's
* tqchildren. This method is used when converting from an older index format. * children. This method is used when converting from an older index format.
* *
* @param version The version of the old tape index. * @param version The version of the old tape index.
*/ */
@ -103,7 +103,7 @@ public:
/** /**
* Write out the file entry to the open file. Entries for each of its * Write out the file entry to the open file. Entries for each of its
* tqchildren will also be written. * children will also be written.
*/ */
void write( FILE* fptr ); void write( FILE* fptr );
@ -171,15 +171,15 @@ public:
File* getParent(); File* getParent();
/** /**
* Get the tqchildren of this file entry. A normal file will never have any * Get the children of this file entry. A normal file will never have any
* tqchildren. A directory may or may not have tqchildren. * children. A directory may or may not have children.
* *
* @return A list of the immediate tqchildren of this file entry. * @return A list of the immediate children of this file entry.
*/ */
const TQPtrList<File>& getChildren(); const TQPtrList<File>& getChildren();
/** /**
* Get the list of ranges of this file and all of its tqchildren. * Get the list of ranges of this file and all of its children.
* *
* @return A list of ranges. * @return A list of ranges.
*/ */
@ -193,7 +193,7 @@ public:
void addChild( File* file ); void addChild( File* file );
/** /**
* Recursively calculate the list of ranges for all of the file's tqchildren. * Recursively calculate the list of ranges for all of the file's children.
*/ */
void calcRanges(); void calcRanges();
}; };

@ -275,10 +275,10 @@ void IndexDlg::timerEvent( TQTimerEvent* )
_archiveCount++; _archiveCount++;
msg.setNum( _archiveCount ); msg.setNum( _archiveCount );
_archives->setText( msg ); _archives->setText( msg );
msg = i18n( "Indexing archive %1." ).tqarg( _archiveCount ); msg = i18n( "Indexing archive %1." ).arg( _archiveCount );
_log->append( msg ); _log->append( msg );
msg = i18n( "Archive %1" ).tqarg( _archiveCount ); msg = i18n( "Archive %1" ).arg( _archiveCount );
_archive = new Archive( _tape, 0, msg ); _archive = new Archive( _tape, 0, msg );
_fileName = TQString(); _fileName = TQString();
_fileSize = -1; _fileSize = -1;
@ -349,7 +349,7 @@ void IndexDlg::updateStats()
_kbytesRead->setText( str ); _kbytesRead->setText( str );
if ( elapsed > 0 ) { if ( elapsed > 0 ) {
str = i18n( "%1/min" ).tqarg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) ); str = i18n( "%1/min" ).arg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) );
_transferRate->setText( str ); _transferRate->setText( str );
} }
} }

@ -42,7 +42,7 @@ public:
~InfoShellWidget(); ~InfoShellWidget();
protected: protected:
/** /**
* Resize all tqchildren to fill all of the available space within the shell. * Resize all children to fill all of the available space within the shell.
*/ */
virtual void resizeEvent( TQResizeEvent* e ); virtual void resizeEvent( TQResizeEvent* e );
}; };

@ -12,7 +12,7 @@ Archive::startBlock=Archive.html#startBlock
Archive::endBlock=Archive.html#endBlock Archive::endBlock=Archive.html#endBlock
Archive::name=Archive.html#name Archive::name=Archive.html#name
Archive::files=Archive.html#files Archive::files=Archive.html#files
Archive::tqchildren=Archive.html#tqchildren Archive::children=Archive.html#children
Archive::setEndBlock=Archive.html#setEndBlock Archive::setEndBlock=Archive.html#setEndBlock
Archive::setName=Archive.html#setName Archive::setName=Archive.html#setName
Archive::addFile=Archive.html#addFile Archive::addFile=Archive.html#addFile
@ -94,7 +94,7 @@ File::size=File.html#size
File::mtime=File.html#mtime File::mtime=File.html#mtime
File::record=File.html#record File::record=File.html#record
File::name=File.html#name File::name=File.html#name
File::tqchildren=File.html#tqchildren File::children=File.html#children
IndexDlg=IndexDlg.html IndexDlg=IndexDlg.html
IndexDlg=IndexDlg.html IndexDlg=IndexDlg.html
IndexDlg::_tarParser=IndexDlg.html#_tarParser IndexDlg::_tarParser=IndexDlg.html#_tarParser

@ -152,7 +152,7 @@ KDatMainWindow::KDatMainWindow()
_menu->insertItem( i18n( "&File" ), _fileMenu ); _menu->insertItem( i18n( "&File" ), _fileMenu );
_menu->insertItem( i18n( "&Settings" ), _editMenu ); _menu->insertItem( i18n( "&Settings" ), _editMenu );
_menu->insertSeparator(); _menu->insertSeparator();
TQString about = i18n( "KDat Version %1\n\nKDat is a tar-based tape archiver.\n\nCopyright (c) 1998-2000 Sean Vyain\nCopyright (c) 2001-2002 Lawrence Widman\nkdat@cardiothink.com" ).tqarg( KDAT_VERSION ); TQString about = i18n( "KDat Version %1\n\nKDat is a tar-based tape archiver.\n\nCopyright (c) 1998-2000 Sean Vyain\nCopyright (c) 2001-2002 Lawrence Widman\nkdat@cardiothink.com" ).arg( KDAT_VERSION );
_menu->insertItem( i18n( "&Help" ), helpMenu( about ) ); _menu->insertItem( i18n( "&Help" ), helpMenu( about ) );
_toolbar = new KToolBar( this ); _toolbar = new KToolBar( this );
@ -387,7 +387,7 @@ void KDatMainWindow::localSelected( int index )
_tree->expandItem( index ); _tree->expandItem( index );
_tree->collapseItem( index ); // 2002-01-30 LEW _tree->collapseItem( index ); // 2002-01-30 LEW
} }
// tqrepaint(); // this doesn't work 2002-01-30 LEW // repaint(); // this doesn't work 2002-01-30 LEW
/* 2002-01-30 LEW: RG and I don't like this behavior */ /* 2002-01-30 LEW: RG and I don't like this behavior */
} }
@ -419,7 +419,7 @@ void KDatMainWindow::fileBackup()
TQString msg = i18n("KDat will dump your files properly to tape, but may not be able\n" TQString msg = i18n("KDat will dump your files properly to tape, but may not be able\n"
"to restore them. To restore your files by hand, you need to know\n" "to restore them. To restore your files by hand, you need to know\n"
"the name of the *non-rewinding* version of your tape device %1.\n" "the name of the *non-rewinding* version of your tape device %1.\n"
).tqarg(Options::instance()->getTapeDevice()); ).arg(Options::instance()->getTapeDevice());
TQString msg2 = i18n("For example, if your device is /dev/st0, the non-rewinding version\n" TQString msg2 = i18n("For example, if your device is /dev/st0, the non-rewinding version\n"
"is /dev/nst0. If your device name doesn't look like that, type\n" "is /dev/nst0. If your device name doesn't look like that, type\n"
"\"ls -l %2\" in a terminal window to see the real name of your\n" "\"ls -l %2\" in a terminal window to see the real name of your\n"
@ -430,7 +430,7 @@ void KDatMainWindow::fileBackup()
"The third call to \"tar\" will retrieve your data into your\n" "The third call to \"tar\" will retrieve your data into your\n"
"current directory. Please let us know if this happens to you!\n" "current directory. Please let us know if this happens to you!\n"
" - KDat Maintenance Team\n" " - KDat Maintenance Team\n"
).tqarg(Options::instance()->getTapeDevice()); ).arg(Options::instance()->getTapeDevice());
msg = msg.append(msg2); msg = msg.append(msg2);
KMessageBox::sorry( this, msg); KMessageBox::sorry( this, msg);
/* 2002-01-28 LEW */ /* 2002-01-28 LEW */
@ -446,7 +446,7 @@ void KDatMainWindow::fileBackup()
backupProfile.setRemoveSnapshot( bp->getRemoveSnapshot() ); backupProfile.setRemoveSnapshot( bp->getRemoveSnapshot() );
} else { } else {
TQString name; TQString name;
name = i18n( "Archive created on %1" ).tqarg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) ); name = i18n( "Archive created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) );
name = name.stripWhiteSpace(); name = name.stripWhiteSpace();
TQStringList files; TQStringList files;
@ -486,8 +486,8 @@ void KDatMainWindow::fileBackup()
msg = i18n( "WARNING: The estimated archive size is %1 KB but " msg = i18n( "WARNING: The estimated archive size is %1 KB but "
"the tape has only %2 KB of space!\n" "the tape has only %2 KB of space!\n"
"Back up anyway?" ) "Back up anyway?" )
.tqarg(KGlobal::locale()->formatNumber(size, 0)) .arg(KGlobal::locale()->formatNumber(size, 0))
.tqarg(KGlobal::locale()->formatNumber(TapeManager::instance()->getMountedTape()->getSize() - tapeSize, 0 )); .arg(KGlobal::locale()->formatNumber(TapeManager::instance()->getMountedTape()->getSize() - tapeSize, 0 ));
int result = KMessageBox::warningContinueCancel( this, int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Backup"), i18n("Backup") ); msg, i18n("Backup"), i18n("Backup") );
if ( result != KMessageBox::Continue) { if ( result != KMessageBox::Continue) {
@ -600,7 +600,7 @@ void KDatMainWindow::doVerify( bool restore )
ranges.addRange( it.current()->getStart(), it.current()->getEnd() ); ranges.addRange( it.current()->getStart(), it.current()->getEnd() );
} }
if ( rangeableNode->isType( Node::MountedArchiveNodeType ) ) { if ( rangeableNode->isType( Node::MountedArchiveNodeType ) ) {
// Make sure the mounted archive node has populated its tqchildren. // Make sure the mounted archive node has populated its children.
archiveNode = (MountedArchiveNode*)rangeableNode; archiveNode = (MountedArchiveNode*)rangeableNode;
if ( archiveNode->childCount() == 0 ) { if ( archiveNode->childCount() == 0 ) {
bool dummy = TRUE; bool dummy = TRUE;
@ -627,7 +627,7 @@ void KDatMainWindow::doVerify( bool restore )
// Compile a list of files to verify/restore. // Compile a list of files to verify/restore.
TQPtrStack<RangeableNode> stack; TQPtrStack<RangeableNode> stack;
// Make sure the mounted archive node has populated its tqchildren. // Make sure the mounted archive node has populated its children.
if ( archiveNode->childCount() == 0 ) { if ( archiveNode->childCount() == 0 ) {
bool dummy = TRUE; bool dummy = TRUE;
archiveNode->expanding( dummy ); archiveNode->expanding( dummy );
@ -697,7 +697,7 @@ void KDatMainWindow::fileMountTape()
"correct device is selected as the tape drive (e.g.\n" "correct device is selected as the tape drive (e.g.\n"
"/dev/st0). If you hear the tape drive moving, wait\n" "/dev/st0). If you hear the tape drive moving, wait\n"
"until it stops and then try mounting it again.") "until it stops and then try mounting it again.")
.tqarg(Options::instance()->getTapeDevice()); .arg(Options::instance()->getTapeDevice());
if ( !TapeManager::instance()->getMountedTape() ) { if ( !TapeManager::instance()->getMountedTape() ) {
if ( Options::instance()->getLoadOnMount() ) { if ( Options::instance()->getLoadOnMount() ) {
@ -727,7 +727,7 @@ void KDatMainWindow::fileIndexTape()
IndexDlg dlg( TapeManager::instance()->getMountedTape(), this ); IndexDlg dlg( TapeManager::instance()->getMountedTape(), this );
if ( dlg.exec() == TQDialog::Accepted ) { if ( dlg.exec() == TQDialog::Accepted ) {
TQString title; TQString title;
title = i18n( "KDat: %1" ).tqarg( TapeManager::instance()->getMountedTape()->getName() ); title = i18n( "KDat: %1" ).arg( TapeManager::instance()->getMountedTape()->getName() );
setCaption( title ); setCaption( title );
setIconText( title ); setIconText( title );
@ -776,7 +776,7 @@ void KDatMainWindow::fileDeleteArchive()
} }
TQString msg = TQString msg =
i18n( "An archive cannot be removed from the middle of the tape. If\nthe archive '%1' is deleted then\nthe following archives will also be deleted:\n%2\n\nDelete all listed archives?" ).tqarg(archive->getName()).tqarg(list); i18n( "An archive cannot be removed from the middle of the tape. If\nthe archive '%1' is deleted then\nthe following archives will also be deleted:\n%2\n\nDelete all listed archives?" ).arg(archive->getName()).arg(list);
int result = KMessageBox::warningContinueCancel( this, int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Archive"), i18n("Delete All")); msg, i18n("Delete Archive"), i18n("Delete All"));
if (result == KMessageBox::Continue) { if (result == KMessageBox::Continue) {
@ -790,7 +790,7 @@ void KDatMainWindow::fileDeleteArchive()
} else { } else {
// This is the last (known) archive on the tape. // This is the last (known) archive on the tape.
TQString msg = TQString msg =
i18n( "Really delete the archive '%1'?" ).tqarg(archive->getName()); i18n( "Really delete the archive '%1'?" ).arg(archive->getName());
int result = KMessageBox::warningContinueCancel( this, int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Archive"), i18n("Delete")); msg, i18n("Delete Archive"), i18n("Delete"));
if (result == KMessageBox::Continue) { if (result == KMessageBox::Continue) {
@ -824,7 +824,7 @@ void KDatMainWindow::fileDeleteIndex()
} }
TQString msg = TQString msg =
i18n( "Really delete the index for '%1'?" ).tqarg(tape->getName()); i18n( "Really delete the index for '%1'?" ).arg(tape->getName());
int result = KMessageBox::warningContinueCancel( this, int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Tape Index"), i18n("Delete")); msg, i18n("Delete Tape Index"), i18n("Delete"));
if (result == KMessageBox::Continue) { if (result == KMessageBox::Continue) {
@ -847,7 +847,7 @@ void KDatMainWindow::fileFormatTape()
"correct device is selected as the tape drive (e.g.\n" "correct device is selected as the tape drive (e.g.\n"
"/dev/st0). If you hear the tape drive moving, wait\n" "/dev/st0). If you hear the tape drive moving, wait\n"
"until it stops and then try mounting it again.") "until it stops and then try mounting it again.")
.tqarg(Options::instance()->getTapeDevice()); .arg(Options::instance()->getTapeDevice());
if ( !TapeDrive::instance()->isTapePresent() ) { if ( !TapeDrive::instance()->isTapePresent() ) {
KMessageBox::sorry( this, msg ); KMessageBox::sorry( this, msg );
@ -865,7 +865,7 @@ void KDatMainWindow::fileFormatTape()
i18n("Format Tape"), i18n("Format")); i18n("Format Tape"), i18n("Format"));
if (result == KMessageBox::Continue ) { if (result == KMessageBox::Continue ) {
TQString name; TQString name;
name = i18n( "Tape created on %1" ).tqarg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) ); name = i18n( "Tape created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) );
FormatOptDlg dlg( name.stripWhiteSpace(), this ); FormatOptDlg dlg( name.stripWhiteSpace(), this );
if ( dlg.exec() != TQDialog::Accepted ) { if ( dlg.exec() != TQDialog::Accepted ) {
return; return;
@ -898,7 +898,7 @@ void KDatMainWindow::fileNewBackupProfile()
// Pick a unique name. // Pick a unique name.
TQString name; TQString name;
for ( int i = 1; ; i++ ) { for ( int i = 1; ; i++ ) {
name = i18n( "Backup Profile %1").tqarg( i ); name = i18n( "Backup Profile %1").arg( i );
TQStringList list = BackupProfileManager::instance()->getBackupProfileNames(); TQStringList list = BackupProfileManager::instance()->getBackupProfileNames();
TQStringList::Iterator it = list.begin(); TQStringList::Iterator it = list.begin();
for ( ; it != list.end(); ++it ) { for ( ; it != list.end(); ++it ) {
@ -946,7 +946,7 @@ void KDatMainWindow::fileDeleteBackupProfile()
assert( backupProfile ); assert( backupProfile );
TQString msg = TQString msg =
i18n("Really delete backup profile '%1'?").tqarg(backupProfile->getName()); i18n("Really delete backup profile '%1'?").arg(backupProfile->getName());
int result = KMessageBox::warningContinueCancel( this, int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Backup Profile"), i18n("Delete")); msg, i18n("Delete Backup Profile"), i18n("Delete"));
if (result == KMessageBox::Continue) { if (result == KMessageBox::Continue) {
@ -1103,8 +1103,8 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons
if( stop_flag == TRUE ) break; if( stop_flag == TRUE ) break;
TQString* path = dirStack.pop(); TQString* path = dirStack.pop();
msg = i18n("Estimating backup size: %1, %2" ) msg = i18n("Estimating backup size: %1, %2" )
.tqarg(Util::kbytesToString( size / 2 )) .arg(Util::kbytesToString( size / 2 ))
.tqarg(KStringHandler::csqueeze(*path, 60)); .arg(KStringHandler::csqueeze(*path, 60));
status( msg ); status( msg );
KApplication::kApplication()->processEvents(); KApplication::kApplication()->processEvents();
dir.setPath( *path ); dir.setPath( *path );
@ -1232,7 +1232,7 @@ void KDatMainWindow::configureUI( Tape* tape )
// Title bar // Title bar
if ( tape ) { if ( tape ) {
TQString title; TQString title;
title = i18n( "KDat: %1" ).tqarg(tape->getName()); title = i18n( "KDat: %1" ).arg(tape->getName());
setCaption( title ); setCaption( title );
setIconText( title ); setIconText( title );
} else { } else {

@ -211,7 +211,7 @@ void TapeNode::expanding( bool expand )
expand = TRUE; expand = TRUE;
if ( childCount() > 0 ) { if ( childCount() > 0 ) {
// We already have the tqchildren added // We already have the children added
return; return;
} }
@ -280,7 +280,7 @@ void ArchiveNode::expanding( bool expand )
expand = TRUE; expand = TRUE;
if ( childCount() > 0 ) { if ( childCount() > 0 ) {
// We already have the tqchildren added. // We already have the children added.
return; return;
} }
@ -338,7 +338,7 @@ void TapeDirectoryNode::expanding( bool expand )
expand = TRUE; expand = TRUE;
if ( childCount() > 0 ) { if ( childCount() > 0 ) {
// We already have the tqchildren added. // We already have the children added.
return; return;
} }
@ -443,7 +443,7 @@ void SelectableNode::doUpdateState()
void SelectableNode::doSetSelected( bool select ) void SelectableNode::doSetSelected( bool select )
{ {
// All my tqchildren get the same selection state. // All my children get the same selection state.
for ( uint i = 0; i < childCount(); i++ ) { for ( uint i = 0; i < childCount(); i++ ) {
if ( select ) { if ( select ) {
if ( !((SelectableNode*)childAt( i ))->isSelected() ) { if ( !((SelectableNode*)childAt( i ))->isSelected() ) {
@ -605,7 +605,7 @@ void SelectableNode::setSelected( bool select )
((SelectableNode*)getParent())->doUpdateState(); ((SelectableNode*)getParent())->doUpdateState();
} }
owner->tqrepaint(); owner->repaint();
KDatMainWindow::getInstance()->configureUI( TapeManager::instance()->getMountedTape() ); KDatMainWindow::getInstance()->configureUI( TapeManager::instance()->getMountedTape() );
} }
@ -680,7 +680,7 @@ void MountedArchiveNode::expanding( bool expand )
expand = TRUE; expand = TRUE;
if ( childCount() > 0 ) { if ( childCount() > 0 ) {
// We already have the tqchildren added. // We already have the children added.
return; return;
} }
@ -780,7 +780,7 @@ void MountedTapeDirectoryNode::expanding( bool expand )
expand = TRUE; expand = TRUE;
if ( childCount() > 0 ) { if ( childCount() > 0 ) {
// We already have the tqchildren added. // We already have the children added.
return; return;
} }
@ -934,7 +934,7 @@ void RootNode::expanding( bool expand )
{ {
expand = TRUE; expand = TRUE;
// If we already have some tqchildren, check to see if the directory has been modified. // If we already have some children, check to see if the directory has been modified.
if ( childCount() > 0 ) { if ( childCount() > 0 ) {
struct stat statinfo; struct stat statinfo;
if ( stat( "/", &statinfo ) < 0 ) { if ( stat( "/", &statinfo ) < 0 ) {
@ -950,7 +950,7 @@ void RootNode::expanding( bool expand )
_mtime = statinfo.st_mtime; _mtime = statinfo.st_mtime;
// Remove all the tqchildren. // Remove all the children.
Node* n; Node* n;
while ( ( n = (Node*)getChild() ) ) { while ( ( n = (Node*)getChild() ) ) {
removeChild( n ); removeChild( n );
@ -975,7 +975,7 @@ void RootNode::expanding( bool expand )
return; return;
} }
// Fill in the child's tqchildren. // Fill in the child's children.
const TQFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst ); const TQFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst );
if ( list ) { if ( list ) {
TQFileInfoListIterator it( *list ); TQFileInfoListIterator it( *list );
@ -1050,7 +1050,7 @@ void DirectoryNode::expanding( bool expand )
} }
path.prepend( "/" ); path.prepend( "/" );
// If we already have some tqchildren, check to see if the directory has been modified. // If we already have some children, check to see if the directory has been modified.
if ( childCount() > 0 ) { if ( childCount() > 0 ) {
struct stat statinfo; struct stat statinfo;
if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) { if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) {
@ -1066,7 +1066,7 @@ void DirectoryNode::expanding( bool expand )
_mtime = statinfo.st_mtime; _mtime = statinfo.st_mtime;
// Remove all the tqchildren. // Remove all the children.
Node* n; Node* n;
while ( ( n = (Node*)getChild() ) ) { while ( ( n = (Node*)getChild() ) ) {
removeChild( n ); removeChild( n );
@ -1091,7 +1091,7 @@ void DirectoryNode::expanding( bool expand )
return; return;
} }
// Fill in the child's tqchildren. // Fill in the child's children.
const TQFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst ); const TQFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst );
if ( list ) { if ( list ) {
TQFileInfoListIterator it( *list ); TQFileInfoListIterator it( *list );
@ -1210,7 +1210,7 @@ void TapeDriveNode::expanding( bool expand )
expand = TRUE; expand = TRUE;
if ( childCount() > 0 ) { if ( childCount() > 0 ) {
// We already have the tqchildren added // We already have the children added
return; return;
} }
@ -1254,7 +1254,7 @@ void TapeDriveNode::slotTapeUnmounted()
setPixmap( *ImageCache::instance()->getTapeUnmounted() ); setPixmap( *ImageCache::instance()->getTapeUnmounted() );
setText( i18n( "<no tape>" ) ); setText( i18n( "<no tape>" ) );
// Remove all the tqchildren. // Remove all the children.
Node* n; Node* n;
while ( ( n = (Node*)getChild() ) ) { while ( ( n = (Node*)getChild() ) ) {
Node::removeChild( n ); Node::removeChild( n );

@ -90,7 +90,7 @@ public:
/** /**
* This method is called immediately before the node is to be expanded. * This method is called immediately before the node is to be expanded.
* This method can be used to fill in the tqchildren of this node, or * This method can be used to fill in the children of this node, or
* prevent the node from expanding. The default implementation does * prevent the node from expanding. The default implementation does
* nothing. * nothing.
* *
@ -359,7 +359,7 @@ public:
virtual bool isType( int type ); virtual bool isType( int type );
/** /**
* Determine whether the node and all of its tqchildren are selected. * Determine whether the node and all of its children are selected.
* *
* @return TRUE if the node is selected, otherwise FALSE. * @return TRUE if the node is selected, otherwise FALSE.
*/ */
@ -373,7 +373,7 @@ public:
bool hasSelectedChildren(); bool hasSelectedChildren();
/** /**
* Select/deselect this node and all of its tqchildren. * Select/deselect this node and all of its children.
* *
* @param selected TRUE means the node will be selected, FALSE means the * @param selected TRUE means the node will be selected, FALSE means the
* node will be deselected. * node will be deselected.
@ -445,7 +445,7 @@ public:
virtual const TQPtrList<Range>& getRanges(); virtual const TQPtrList<Range>& getRanges();
/** /**
* Select/deselect this node and all of its tqchildren. * Select/deselect this node and all of its children.
* *
* @param selected TRUE means the node will be selected, FALSE means the * @param selected TRUE means the node will be selected, FALSE means the
* node will be deselected. * node will be deselected.
@ -516,7 +516,7 @@ public:
virtual const TQPtrList<Range>& getRanges(); virtual const TQPtrList<Range>& getRanges();
/** /**
* Select/deselect this node and all of its tqchildren. * Select/deselect this node and all of its children.
* *
* @param selected TRUE means the node will be selected, FALSE means the * @param selected TRUE means the node will be selected, FALSE means the
* node will be deselected. * node will be deselected.
@ -596,7 +596,7 @@ public:
virtual const TQPtrList<Range>& getRanges(); virtual const TQPtrList<Range>& getRanges();
/** /**
* Select/deselect this node and all of its tqchildren. * Select/deselect this node and all of its children.
* *
* @param selected TRUE means the node will be selected, FALSE means the * @param selected TRUE means the node will be selected, FALSE means the
* node will be deselected. * node will be deselected.
@ -863,7 +863,7 @@ public slots:
/** /**
* Locate the child associated with the modified tape index, and make sure * Locate the child associated with the modified tape index, and make sure
* that the displayed information (including all tqchildren) is updated. * that the displayed information (including all children) is updated.
* *
* @param tape A pointer to the tape index that was modified. * @param tape A pointer to the tape index that was modified.
*/ */
@ -924,7 +924,7 @@ public slots:
/** /**
* Locate the child associated with the modified tape index, and make sure * Locate the child associated with the modified tape index, and make sure
* that the displayed information (including all tqchildren) is updated. * that the displayed information (including all children) is updated.
* *
* @param tape A pointer to the tape index that was modified. * @param tape A pointer to the tape index that was modified.
*/ */

@ -216,7 +216,7 @@ void Tape::read()
default: default:
{ {
KMessageBox::sorry( KDatMainWindow::getInstance(), KMessageBox::sorry( KDatMainWindow::getInstance(),
i18n( "The tape index file format is version %d. The index cannot be read by this version of KDat. Perhaps the tape index file was created by a newer version of KDat?" ).tqarg(version ), i18n( "The tape index file format is version %d. The index cannot be read by this version of KDat. Perhaps the tape index file was created by a newer version of KDat?" ).arg(version ),
i18n("Tape Index") ); i18n("Tape Index") );
} }
} }
@ -226,7 +226,7 @@ void Tape::readAll( int version )
{ {
read(); read();
TQPtrListIterator<Archive> i( _tqchildren ); TQPtrListIterator<Archive> i( _children );
for ( ; i.current(); ++i ) { for ( ; i.current(); ++i ) {
i.current()->readAll( version ); i.current()->readAll( version );
} }
@ -282,7 +282,7 @@ void Tape::write()
memset( buf, 0, 4096 ); memset( buf, 0, 4096 );
memcpy( buf, _name.ascii(), _name.length() > 4095 ? 4095 : _name.length() ); memcpy( buf, _name.ascii(), _name.length() > 4095 ? 4095 : _name.length() );
fwrite( buf, sizeof( char ), 4096, _fptr ); fwrite( buf, sizeof( char ), 4096, _fptr );
int ival = _tqchildren.count(); int ival = _children.count();
fwrite( &ival, sizeof( ival ), 1, _fptr ); fwrite( &ival, sizeof( ival ), 1, _fptr );
// Fill in the archive offsets later... // Fill in the archive offsets later...
@ -292,7 +292,7 @@ void Tape::write()
} }
//===== Write archives ===== //===== Write archives =====
TQPtrListIterator<Archive> i( _tqchildren ); TQPtrListIterator<Archive> i( _children );
int count = 0; int count = 0;
for ( ; i.current(); ++i, count++ ) { for ( ; i.current(); ++i, count++ ) {
// Fill in the file offset. // Fill in the file offset.
@ -346,7 +346,7 @@ const TQPtrList<Archive>& Tape::getChildren()
{ {
read(); read();
return _tqchildren; return _children;
} }
void Tape::setName( const TQString & name ) void Tape::setName( const TQString & name )
@ -528,7 +528,7 @@ void Tape::addChild( Archive* archive )
archive->calcRanges(); archive->calcRanges();
_tqchildren.append( archive ); _children.append( archive );
char buf[4096]; char buf[4096];
fseek( _fptr, 0, SEEK_END ); fseek( _fptr, 0, SEEK_END );
@ -537,9 +537,9 @@ void Tape::addChild( Archive* archive )
fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr );
fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr );
fseek( _fptr, 12 + 4096, SEEK_CUR ); fseek( _fptr, 12 + 4096, SEEK_CUR );
int ival = _tqchildren.count(); int ival = _children.count();
fwrite( &ival, sizeof( ival ), 1, _fptr ); fwrite( &ival, sizeof( ival ), 1, _fptr );
fseek( _fptr, ( _tqchildren.count() - 1 ) * 4, SEEK_CUR ); fseek( _fptr, ( _children.count() - 1 ) * 4, SEEK_CUR );
fwrite( &here, sizeof( here ), 1, _fptr ); fwrite( &here, sizeof( here ), 1, _fptr );
fseek( _fptr, here, SEEK_SET ); fseek( _fptr, here, SEEK_SET );
archive->write( _fptr ); archive->write( _fptr );
@ -559,21 +559,21 @@ void Tape::removeChild( Archive* archive )
{ {
read(); read();
while ( _tqchildren.last() != archive ) { while ( _children.last() != archive ) {
_tqchildren.removeLast(); _children.removeLast();
} }
_tqchildren.removeLast(); _children.removeLast();
char buf[4096]; char buf[4096];
fseek( _fptr, 0, SEEK_SET ); fseek( _fptr, 0, SEEK_SET );
fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr );
fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr );
fseek( _fptr, 12 + 4096, SEEK_CUR ); fseek( _fptr, 12 + 4096, SEEK_CUR );
int ival = _tqchildren.count(); int ival = _children.count();
fwrite( &ival, sizeof( ival ), 1, _fptr ); fwrite( &ival, sizeof( ival ), 1, _fptr );
int here; int here;
if ( ival > 0 ) { if ( ival > 0 ) {
fseek( _fptr, _tqchildren.count() * 4, SEEK_CUR ); fseek( _fptr, _children.count() * 4, SEEK_CUR );
fread( &here, sizeof( here ), 1, _fptr ); fread( &here, sizeof( here ), 1, _fptr );
} else { } else {
fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR ); fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR );
@ -593,13 +593,13 @@ void Tape::removeChild( Archive* archive )
void Tape::clear() void Tape::clear()
{ {
if ( _tqchildren.count() < 1 ) { if ( _children.count() < 1 ) {
return; return;
} }
while ( _tqchildren.first() ) { while ( _children.first() ) {
delete _tqchildren.first(); delete _children.first();
_tqchildren.removeFirst(); _children.removeFirst();
} }
char buf[4096]; char buf[4096];
@ -607,7 +607,7 @@ void Tape::clear()
fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr );
fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr );
fseek( _fptr, 12 + 4096, SEEK_CUR ); fseek( _fptr, 12 + 4096, SEEK_CUR );
int ival = _tqchildren.count(); int ival = _children.count();
fwrite( &ival, sizeof( ival ), 1, _fptr ); fwrite( &ival, sizeof( ival ), 1, _fptr );
fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR ); fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR );
int here = ftell( _fptr ); int here = ftell( _fptr );
@ -711,7 +711,7 @@ void Tape::readVersion1Index( FILE* fptr )
Archive* archive = new Archive( this, archiveTimeStamp, archiveName ); Archive* archive = new Archive( this, archiveTimeStamp, archiveName );
archive->setEndBlock( archiveEndBlock - archiveStartBlock ); archive->setEndBlock( archiveEndBlock - archiveStartBlock );
_tqchildren.append( archive ); _children.append( archive );
// Read the number of files. // Read the number of files.
if ( !fgets( buf, 4096, fptr ) ) { if ( !fgets( buf, 4096, fptr ) ) {
@ -827,7 +827,7 @@ void Tape::readVersion2Index( FILE* fptr )
int ival; int ival;
for ( ; numArchives; numArchives-- ) { for ( ; numArchives; numArchives-- ) {
fread( &ival, sizeof( ival ), 1, fptr ); fread( &ival, sizeof( ival ), 1, fptr );
_tqchildren.append( new Archive( this, fptr, ival ) ); _children.append( new Archive( this, fptr, ival ) );
} }
} }
@ -870,7 +870,7 @@ void Tape::readVersion3Index( FILE* fptr )
int ival; int ival;
for ( ; numArchives; numArchives-- ) { for ( ; numArchives; numArchives-- ) {
fread( &ival, sizeof( ival ), 1, fptr ); fread( &ival, sizeof( ival ), 1, fptr );
_tqchildren.append( new Archive( this, fptr, ival ) ); _children.append( new Archive( this, fptr, ival ) );
} }
} }
@ -913,7 +913,7 @@ void Tape::readVersion4Index( FILE* fptr )
int ival; int ival;
for ( ; numArchives; numArchives-- ) { for ( ; numArchives; numArchives-- ) {
fread( &ival, sizeof( ival ), 1, fptr ); fread( &ival, sizeof( ival ), 1, fptr );
_tqchildren.append( new Archive( this, fptr, ival ) ); _children.append( new Archive( this, fptr, ival ) );
} }
/* 2002-01-31 LEW */ /* 2002-01-31 LEW */

@ -34,7 +34,7 @@ class Tape {
int _mtime; int _mtime;
TQString _name; TQString _name;
int _size; int _size;
TQPtrList<Archive> _tqchildren; TQPtrList<Archive> _children;
FILE* _fptr; FILE* _fptr;
@ -148,7 +148,7 @@ public:
void removeChild( Archive* archive ); void removeChild( Archive* archive );
/** /**
* Recursively destroy all tqchildren of the tape index. * Recursively destroy all children of the tape index.
*/ */
void clear(); void clear();
}; };

@ -203,9 +203,9 @@ void TapeInfoWidget::setTape( Tape* tape )
} }
if ( _tape->getSize() > 0 ) { if ( _tape->getSize() > 0 ) {
tmp = TQString::fromLatin1( "%1 / %2 (%3%)") tmp = TQString::fromLatin1( "%1 / %2 (%3%)")
.tqarg(Util::kbytesToString( used )) .arg(Util::kbytesToString( used ))
.tqarg(Util::kbytesToString( _tape->getSize() )) .arg(Util::kbytesToString( _tape->getSize() ))
.tqarg(used * 100 / _tape->getSize() ); .arg(used * 100 / _tape->getSize() );
} else { } else {
tmp = Util::kbytesToString( used ); tmp = Util::kbytesToString( used );
} }

@ -409,7 +409,7 @@ void VerifyDlg::updateStats()
_kbytesRead->setText( str ); _kbytesRead->setText( str );
if ( elapsed > 0 ) { if ( elapsed > 0 ) {
str = i18n( "%1/min" ).tqarg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) ); str = i18n( "%1/min" ).arg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) );
_transferRate->setText( str ); _transferRate->setText( str );
} }
} }

@ -79,7 +79,7 @@ KTreeViewItem::KTreeViewItem(const TQString& theText,
KTreeViewItem::~KTreeViewItem() KTreeViewItem::~KTreeViewItem()
{ {
if (deleteChildren) { if (deleteChildren) {
// remove the tqchildren // remove the children
KTreeViewItem* i = child; KTreeViewItem* i = child;
while (i) { while (i) {
KTreeViewItem* d = i; KTreeViewItem* d = i;
@ -133,7 +133,7 @@ KTreeViewItem* KTreeViewItem::childAt(int index) const
return item; return item;
} }
// returns the number of tqchildren this item has // returns the number of children this item has
uint KTreeViewItem::childCount() const uint KTreeViewItem::childCount() const
{ {
return numChildren; return numChildren;
@ -193,7 +193,7 @@ const TQString& KTreeViewItem::getText() const
return text; return text;
} }
// indicates whether this item has any tqchildren // indicates whether this item has any children
bool KTreeViewItem::hasChild() const bool KTreeViewItem::hasChild() const
{ {
return child != 0; return child != 0;
@ -260,7 +260,7 @@ void KTreeViewItem::insertChild(int index, KTreeViewItem* newChild)
// indicates whether this item is displayed expanded // indicates whether this item is displayed expanded
// NOTE: a TRUE response does not necessarily indicate the item // NOTE: a TRUE response does not necessarily indicate the item
// has any tqchildren // has any children
bool KTreeViewItem::isExpanded() const bool KTreeViewItem::isExpanded() const
{ {
return expanded; return expanded;
@ -403,7 +403,7 @@ void KTreeViewItem::paintTree(TQPainter* p, int indent, int cellHeight) const
p->drawLine(parentLeaderX, cellCenterY, parentLeaderX, cellBottomY); p->drawLine(parentLeaderX, cellCenterY, parentLeaderX, cellBottomY);
/* /*
* If this item has tqchildren or siblings in the tree or is a child of * If this item has children or siblings in the tree or is a child of
* an item other than the root item then draw the little line from the * an item other than the root item then draw the little line from the
* item out to the left. * item out to the left.
*/ */
@ -411,7 +411,7 @@ void KTreeViewItem::paintTree(TQPainter* p, int indent, int cellHeight) const
parent->parent != 0 || parent->parent != 0 ||
/* /*
* The following handles the case of an item at the end of the * The following handles the case of an item at the end of the
* topmost level which doesn't have tqchildren. * topmost level which doesn't have children.
*/ */
parent->getChild() != this) parent->getChild() != this)
{ {
@ -435,7 +435,7 @@ void KTreeViewItem::paintTree(TQPainter* p, int indent, int cellHeight) const
// removes the given (direct) child from the branch // removes the given (direct) child from the branch
bool KTreeViewItem::removeChild(KTreeViewItem* theChild) bool KTreeViewItem::removeChild(KTreeViewItem* theChild)
{ {
// search item in list of tqchildren // search item in list of children
KTreeViewItem* prevItem = 0; KTreeViewItem* prevItem = 0;
KTreeViewItem* toRemove = getChild(); KTreeViewItem* toRemove = getChild();
while (toRemove && toRemove != theChild) { while (toRemove && toRemove != theChild) {
@ -646,7 +646,7 @@ void KTreeView::appendChildItem(const TQString & theText, const TQPixmap& thePix
appendChildItem(item, thePath); appendChildItem(item, thePath);
} }
// appends the given item to the tqchildren of the item at the given index // appends the given item to the children of the item at the given index
void KTreeView::appendChildItem(KTreeViewItem* newItem, int index) void KTreeView::appendChildItem(KTreeViewItem* newItem, int index)
{ {
/* find parent item and append new item to parent's sub tree */ /* find parent item and append new item to parent's sub tree */
@ -656,7 +656,7 @@ void KTreeView::appendChildItem(KTreeViewItem* newItem, int index)
appendChildItem(parentItem, newItem); appendChildItem(parentItem, newItem);
} }
// appends the given item to the tqchildren of the item at the end of the // appends the given item to the children of the item at the end of the
// given path // given path
void KTreeView::appendChildItem(KTreeViewItem* newItem, const KPath& thePath) void KTreeView::appendChildItem(KTreeViewItem* newItem, const KPath& thePath)
{ {
@ -744,7 +744,7 @@ void KTreeView::clear()
if(goingDown || TQApplication::closingDown()) if(goingDown || TQApplication::closingDown())
return; return;
if(autoU && isVisible()) if(autoU && isVisible())
tqrepaint(); repaint();
setAutoUpdate(autoU); setAutoUpdate(autoU);
} }
@ -789,7 +789,7 @@ int KTreeView::expandLevel() const
// expands or collapses the subtree rooted at the given item, // expands or collapses the subtree rooted at the given item,
// as approptiate // as approptiate
// if item has no tqchildren, does nothing // if item has no children, does nothing
void KTreeView::expandOrCollapseItem(int index) void KTreeView::expandOrCollapseItem(int index)
{ {
KTreeViewItem *item = itemAt(index); KTreeViewItem *item = itemAt(index);
@ -813,7 +813,7 @@ bool KTreeView::forEveryItem(KForEvery func, void* user, KTreeViewItem* item)
if ((*func)(item, user)) { if ((*func)(item, user)) {
return true; return true;
} }
// visit the tqchildren (recursively) // visit the children (recursively)
if (item->hasChild()) { if (item->hasChild()) {
if (forEveryItem(func, user, item)) if (forEveryItem(func, user, item))
return true; return true;
@ -833,7 +833,7 @@ bool KTreeView::forEveryVisibleItem(KForEvery func, void *user,
if (item == 0) { if (item == 0) {
item = treeRoot; item = treeRoot;
} else { } else {
// tqchildren are invisible (hence, nothing to do) // children are invisible (hence, nothing to do)
// if item is invisible or collapsed // if item is invisible or collapsed
if (!item->isVisible() || !item->isExpanded()) { if (!item->isVisible() || !item->isExpanded()) {
return false; return false;
@ -847,7 +847,7 @@ bool KTreeView::forEveryVisibleItem(KForEvery func, void *user,
if ((*func)(item, user)) { if ((*func)(item, user)) {
return true; return true;
} }
// visit the tqchildren (recursively) // visit the children (recursively)
if (item->hasChild() && item->isExpanded()) { if (item->hasChild() && item->isExpanded()) {
if (forEveryVisibleItem(func, user, item)) if (forEveryVisibleItem(func, user, item))
return true; return true;
@ -1113,7 +1113,7 @@ void KTreeView::setExpandButtonDrawing(bool enable)
drawExpandButton = enable; drawExpandButton = enable;
forEveryItem(&KTreeView::setItemExpandButtonDrawing, 0); forEveryItem(&KTreeView::setItemExpandButtonDrawing, 0);
if(autoUpdate() && isVisible()) if(autoUpdate() && isVisible())
tqrepaint(); repaint();
} }
// sets depth to which subtrees are automatically expanded, and // sets depth to which subtrees are automatically expanded, and
@ -1132,7 +1132,7 @@ void KTreeView::setExpandLevel(int level)
} }
setCurrentItem(itemRow(item)); setCurrentItem(itemRow(item));
if(autoUpdate() && isVisible()) if(autoUpdate() && isVisible())
tqrepaint(); repaint();
} }
// sets the indent margin for all branches and repaints if auto update enabled // sets the indent margin for all branches and repaints if auto update enabled
@ -1143,7 +1143,7 @@ void KTreeView::setIndentSpacing(int spacing)
itemIndent = spacing; itemIndent = spacing;
updateCellWidth(); updateCellWidth();
if (autoUpdate() && isVisible()) if (autoUpdate() && isVisible())
tqrepaint(); repaint();
} }
// enables/disables vertical scrollbar // enables/disables vertical scrollbar
@ -1160,7 +1160,7 @@ void KTreeView::setShowItemText(bool enable)
showText = enable; showText = enable;
forEveryItem(&KTreeView::setItemShowText, 0); forEveryItem(&KTreeView::setItemShowText, 0);
if(autoUpdate() && isVisible()) if(autoUpdate() && isVisible())
tqrepaint(); repaint();
} }
// indicates whether vertical scrolling is by pixel or row // indicates whether vertical scrolling is by pixel or row
@ -1177,7 +1177,7 @@ void KTreeView::setTreeDrawing(bool enable)
drawTree = enable; drawTree = enable;
forEveryItem(&KTreeView::setItemTreeDrawing, 0); forEveryItem(&KTreeView::setItemTreeDrawing, 0);
if(autoUpdate() && isVisible()) if(autoUpdate() && isVisible())
tqrepaint(); repaint();
} }
// indicates whether item text keys are displayed // indicates whether item text keys are displayed
@ -1251,18 +1251,18 @@ void KTreeView::appendChildItem(KTreeViewItem* theParent,
newItem->setExpanded(true); newItem->setExpanded(true);
} }
// fix up branch levels of any tqchildren that the new item may already have // fix up branch levels of any children that the new item may already have
if(newItem->hasChild()) { if(newItem->hasChild()) {
fixChildren(newItem); fixChildren(newItem);
} }
// if necessary, adjust cell width, number of rows and tqrepaint // if necessary, adjust cell width, number of rows and repaint
if (newItem->isVisible() || theParent->childCount() == 1) { if (newItem->isVisible() || theParent->childCount() == 1) {
bool autoU = autoUpdate(); bool autoU = autoUpdate();
setAutoUpdate(false); setAutoUpdate(false);
updateVisibleItems(); updateVisibleItems();
if(autoU && isVisible()) if(autoU && isVisible())
tqrepaint(); repaint();
setAutoUpdate(autoU); setAutoUpdate(autoU);
} }
} }
@ -1302,7 +1302,7 @@ void KTreeView::collapseSubTree(KTreeViewItem* subRoot)
} }
} }
// roland // roland
tqrepaint(); repaint();
setAutoUpdate(TRUE); setAutoUpdate(TRUE);
// roland // roland
} }
@ -1331,7 +1331,7 @@ void KTreeView::expandOrCollapse(KTreeViewItem* parent)
emit expanded(parentIndex); emit expanded(parentIndex);
} }
if (autoU && isVisible()) if (autoU && isVisible())
tqrepaint(); repaint();
setAutoUpdate(autoU); setAutoUpdate(autoU);
} }
@ -1361,7 +1361,7 @@ void KTreeView::expandSubTree(KTreeViewItem* subRoot)
} }
} }
// roland // roland
tqrepaint(); repaint();
setAutoUpdate(TRUE); setAutoUpdate(TRUE);
// roland // roland
@ -1493,7 +1493,7 @@ bool KTreeView::insertItem(KTreeViewItem* referenceItem,
} }
else { else {
// no reference item, append at end of visible tree // no reference item, append at end of visible tree
// need to tqrepaint // need to repaint
parentItem = treeRoot; parentItem = treeRoot;
parentItem->appendChild(newItem); parentItem->appendChild(newItem);
} }
@ -1502,18 +1502,18 @@ bool KTreeView::insertItem(KTreeViewItem* referenceItem,
if (level(newItem) < expansion) if (level(newItem) < expansion)
newItem->setExpanded(true); newItem->setExpanded(true);
// fix up branch levels of any tqchildren // fix up branch levels of any children
if (newItem->hasChild()) if (newItem->hasChild())
fixChildren(newItem); fixChildren(newItem);
// if tqrepaint necessary, do it if visible and auto update // if repaint necessary, do it if visible and auto update
// enabled // enabled
if (newItem->isVisible() || parentItem->childCount() == 1) { if (newItem->isVisible() || parentItem->childCount() == 1) {
bool autoU = autoUpdate(); bool autoU = autoUpdate();
setAutoUpdate(FALSE); setAutoUpdate(FALSE);
updateVisibleItems(); updateVisibleItems();
if(autoU && isVisible()) if(autoU && isVisible())
tqrepaint(); repaint();
setAutoUpdate(autoU); setAutoUpdate(autoU);
} }
return true; return true;
@ -1545,7 +1545,7 @@ void KTreeView::join(KTreeViewItem *item)
takeItem(item); takeItem(item);
insertItem(itemParent, item, FALSE); insertItem(itemParent, item, FALSE);
if(autoU && isVisible()) if(autoU && isVisible())
tqrepaint(); repaint();
setAutoUpdate(autoU); setAutoUpdate(autoU);
} }
} }
@ -1651,7 +1651,7 @@ void KTreeView::lowerItem(KTreeViewItem *item)
takeItem(item); takeItem(item);
insertItem(itemParent->childAt(itemChildIndex), item, FALSE); insertItem(itemParent->childAt(itemChildIndex), item, FALSE);
if(autoU && isVisible()) if(autoU && isVisible())
tqrepaint(); repaint();
setAutoUpdate(autoU); setAutoUpdate(autoU);
} }
} }
@ -1877,7 +1877,7 @@ void KTreeView::raiseItem(KTreeViewItem *item)
takeItem(item); takeItem(item);
insertItem(itemParent->childAt(--itemChildIndex), item, TRUE); insertItem(itemParent->childAt(--itemChildIndex), item, TRUE);
if(autoU && isVisible()) if(autoU && isVisible())
tqrepaint(); repaint();
setAutoUpdate(autoU); setAutoUpdate(autoU);
} }
} }
@ -1897,7 +1897,7 @@ KTreeViewItem* KTreeView::recursiveFind(KPath& path)
return 0; return 0;
/* /*
* Iterate through the parent's tqchildren searching for searchString. * Iterate through the parent's children searching for searchString.
*/ */
KTreeViewItem* sibling = parent->getChild(); KTreeViewItem* sibling = parent->getChild();
while (sibling != 0) { while (sibling != 0) {
@ -1963,7 +1963,7 @@ void KTreeView::split(KTreeViewItem *item)
takeItem(item); takeItem(item);
appendChildItem(itemParent->childAt(--itemChildIndex), item); appendChildItem(itemParent->childAt(--itemChildIndex), item);
if(autoU && isVisible()) if(autoU && isVisible())
tqrepaint(); repaint();
setAutoUpdate(autoU); setAutoUpdate(autoU);
} }
@ -2003,7 +2003,7 @@ void KTreeView::takeItem(KTreeViewItem* item)
updateVisibleItems(); updateVisibleItems();
if (autoU && isVisible()) if (autoU && isVisible())
tqrepaint(); repaint();
setAutoUpdate(autoU); setAutoUpdate(autoU);
} }
@ -2041,10 +2041,10 @@ void KTreeView::updateVisibleItemRec(KTreeViewItem* item, int& index, int& count
} }
/* /*
* Record the tqchildren of item in the list of visible items. * Record the children of item in the list of visible items.
* *
* Don't register item itself, it's already in the list. Also only * Don't register item itself, it's already in the list. Also only
* allocate new space for tqchildren. * allocate new space for children.
*/ */
count += item->childCount(); count += item->childCount();
if (count > itemCapacity) { if (count > itemCapacity) {
@ -2066,7 +2066,7 @@ void KTreeView::updateVisibleItemRec(KTreeViewItem* item, int& index, int& count
visibleItems = newItems; visibleItems = newItems;
itemCapacity = newCapacity; itemCapacity = newCapacity;
} }
// insert tqchildren // insert children
for (KTreeViewItem* i = item->getChild(); i != 0; i = i->getSibling()) { for (KTreeViewItem* i = item->getChild(); i != 0; i = i->getSibling()) {
visibleItems[index++] = i; visibleItems[index++] = i;
updateVisibleItemRec(i, index, count); updateVisibleItemRec(i, index, count);

@ -43,18 +43,18 @@ public:
* item can be constructed this way, the text has to be non-null when * item can be constructed this way, the text has to be non-null when
* the item is added to the tree, or it will not be inserted. * the item is added to the tree, or it will not be inserted.
* *
* The constructor sets the delete-tqchildren flag to false. This flag * The constructor sets the delete-children flag to false. This flag
* tells the item whether it shall delete the child items when it is * tells the item whether it shall delete the child items when it is
* itself deleted. By default the creator of the item is responsible to * itself deleted. By default the creator of the item is responsible to
* also delete the child items. (However, the versions of * also delete the child items. (However, the versions of
* KTreeView::appendChildItem and KTreeView::insertChildItem that do * KTreeView::appendChildItem and KTreeView::insertChildItem that do
* not take a KTreeViewItem set the delete-tqchildren flag to true.) * not take a KTreeViewItem set the delete-children flag to true.)
*/ */
KTreeViewItem(const TQString& theText = TQString()); // text can not be null when added to the list! KTreeViewItem(const TQString& theText = TQString()); // text can not be null when added to the list!
KTreeViewItem(const TQString& theText, const TQPixmap& thePixmap); KTreeViewItem(const TQString& theText, const TQPixmap& thePixmap);
/** /**
* Destructor. It destroys its tqchildren if this item has been marked * Destructor. It destroys its children if this item has been marked
* with setDeleteChildren(true). * with setDeleteChildren(true).
*/ */
virtual ~KTreeViewItem(); virtual ~KTreeViewItem();
@ -123,7 +123,7 @@ public:
const TQString& getText() const; const TQString& getText() const;
/** /**
* Indicates whether this item has any tqchildren. * Indicates whether this item has any children.
*/ */
bool hasChild() const; bool hasChild() const;
@ -152,7 +152,7 @@ public:
* items (if any) would be visible if this item were visible. * items (if any) would be visible if this item were visible.
* *
* Note: If this function returns true, it does not necessarily indicate that * Note: If this function returns true, it does not necessarily indicate that
* this item is visible or that this item has any tqchildren. * this item is visible or that this item has any children.
*/ */
bool isExpanded() const; bool isExpanded() const;
@ -174,12 +174,12 @@ public:
* Sets the delayed-expanding flag. If this flag is true, the expanding * Sets the delayed-expanding flag. If this flag is true, the expanding
* signal is emitted when the item is about to be expanded. The expand * signal is emitted when the item is about to be expanded. The expand
* button is always painted for this item, even if it doesn't have * button is always painted for this item, even if it doesn't have
* tqchildren. * children.
*/ */
void setDelayedExpanding(bool flag); void setDelayedExpanding(bool flag);
/** /**
* Tells the item whether it should delete its tqchildren when it is * Tells the item whether it should delete its children when it is
* deleted. The default is false, which means that the child items must * deleted. The default is false, which means that the child items must
* be deleted explicitly. * be deleted explicitly.
*/ */
@ -417,8 +417,8 @@ public:
/** /**
* Appends a new child item to the item at the specified row. If that * Appends a new child item to the item at the specified row. If that
* item already has tqchildren, the new item is appended below these * item already has children, the new item is appended below these
* tqchildren. A KTreeViewItem is created for which the delete-tqchildren * children. A KTreeViewItem is created for which the delete-children
* flag is set to true. * flag is set to true.
*/ */
void appendChildItem(const TQString & theText, const TQPixmap& thePixmap, void appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
@ -432,8 +432,8 @@ public:
/** /**
* Appendss the specified item as a child of the item that is at the * Appendss the specified item as a child of the item that is at the
* specified row. If that item already has tqchildren, the new item is * specified row. If that item already has children, the new item is
* appended below these tqchildren. * appended below these children.
*/ */
void appendChildItem(KTreeViewItem* newItem, int index); void appendChildItem(KTreeViewItem* newItem, int index);
@ -529,7 +529,7 @@ public:
/** /**
* Iterates every item in the tree, visible or not, and applies the * Iterates every item in the tree, visible or not, and applies the
* function func with a pointer to each item and user data supplied as * function func with a pointer to each item and user data supplied as
* parameters. The tqchildren of the specified root item are visited * parameters. The children of the specified root item are visited
* (root itself is not visited!). If root is 0 all items in the tree * (root itself is not visited!). If root is 0 all items in the tree
* are visited. KForEveryFunc is defined as: * are visited. KForEveryFunc is defined as:
* *
@ -568,7 +568,7 @@ public:
* the value of prefix. The new item is added to the same branch as the * the value of prefix. The new item is added to the same branch as the
* referenced item. If row is -1, the item is simply appended to the * referenced item. If row is -1, the item is simply appended to the
* tree at the topmost level. A KTreeViewItem is created for which the * tree at the topmost level. A KTreeViewItem is created for which the
* delete-tqchildren flag is set to true. Returns true if the item has * delete-children flag is set to true. Returns true if the item has
* been successfully inserted in the tree, otherwise false. * been successfully inserted in the tree, otherwise false.
*/ */
bool insertItem(const TQString & theText, const TQPixmap& thePixmap, bool insertItem(const TQString & theText, const TQPixmap& thePixmap,

@ -126,18 +126,18 @@ bool KRpmPlugin::readInfo( KFileMetaInfo& info, uint what)
case RPM_INT32_TYPE: uint32_t int32tag; case RPM_INT32_TYPE: uint32_t int32tag;
dstream >> int32tag; dstream >> int32tag;
if ( !tagname.isEmpty() ) appendItem(general, tagname, int(int32tag)); if ( !tagname.isEmpty() ) appendItem(general, tagname, int(int32tag));
if ( all.isValid() ) appendItem(all, TQString("%1").tqarg( tag ), TQString("%1").tqarg( int32tag )); if ( all.isValid() ) appendItem(all, TQString("%1").arg( tag ), TQString("%1").arg( int32tag ));
break; break;
case RPM_INT16_TYPE: uint16_t int16tag; case RPM_INT16_TYPE: uint16_t int16tag;
dstream >> int16tag; dstream >> int16tag;
if ( !tagname.isEmpty() ) appendItem(general, tagname, int(int16tag)); if ( !tagname.isEmpty() ) appendItem(general, tagname, int(int16tag));
if ( all.isValid() ) appendItem(all, TQString("%1").tqarg( tag ), TQString("%1").tqarg( int16tag )); if ( all.isValid() ) appendItem(all, TQString("%1").arg( tag ), TQString("%1").arg( int16tag ));
break; break;
case RPM_I18NSTRING_TYPE: // Fallthru case RPM_I18NSTRING_TYPE: // Fallthru
case RPM_STRING_TYPE: TQString strtag; char in; case RPM_STRING_TYPE: TQString strtag; char in;
while ( ( in = file.getch() ) != '\0' ) strtag += in; while ( ( in = file.getch() ) != '\0' ) strtag += in;
if ( !tagname.isEmpty() ) appendItem(general, tagname, strtag); if ( !tagname.isEmpty() ) appendItem(general, tagname, strtag);
if( all.isValid() ) appendItem(all, TQString("%1").tqarg( tag ), strtag); if( all.isValid() ) appendItem(all, TQString("%1").arg( tag ), strtag);
break; break;
} }
file.at(oldPos); // Restore old position file.at(oldPos); // Restore old position

@ -1451,12 +1451,12 @@ sub gst_parse_xml
sub gst_parse_xml_child_names sub gst_parse_xml_child_names
{ {
my ($file, $varpath) = @_; my ($file, $varpath) = @_;
my ($model, $branch, @tqchildren); my ($model, $branch, @children);
($model) = &gst_xml_model_scan ($file); ($model) = &gst_xml_model_scan ($file);
$branch = &gst_xml_model_find ($model, $varpath); $branch = &gst_xml_model_find ($model, $varpath);
if (!$branch) { return @tqchildren; } if (!$branch) { return @children; }
my @list = @$branch; my @list = @$branch;
shift @list; # Attributes shift @list; # Attributes
@ -1465,7 +1465,7 @@ sub gst_parse_xml_child_names
{ {
if ($list [0] ne "__unparsed__" && $list [0] ne "0") if ($list [0] ne "__unparsed__" && $list [0] ne "0")
{ {
push @tqchildren, shift @list; push @children, shift @list;
} }
else else
{ {
@ -1475,7 +1475,7 @@ sub gst_parse_xml_child_names
shift @list; shift @list;
} }
return @tqchildren; return @children;
} }
sub gst_parse_alchemist sub gst_parse_alchemist
@ -1505,7 +1505,7 @@ sub gst_parse_alchemist_print_option
return undef if (!$branch); return undef if (!$branch);
$options = &gst_xml_model_get_tqchildren ($branch); $options = &gst_xml_model_get_children ($branch);
foreach $o (@$options) foreach $o (@$options)
{ {

@ -1457,22 +1457,22 @@ sub gst_replace_alchemist_ensure_list_types
for $elem (@path) for $elem (@path)
{ {
next if ($elem eq ""); next if ($elem eq "");
my @tqchildren = @$branch; my @children = @$branch;
shift @tqchildren; # Attributes shift @children; # Attributes
$branch = undef; $branch = undef;
while (@tqchildren) while (@children)
{ {
if ($tqchildren [0] eq $elem) if ($children [0] eq $elem)
{ {
shift @tqchildren; shift @children;
$branch = shift @tqchildren; $branch = shift @children;
&gst_xml_model_set_attribute ($branch, "TYPE", "LIST"); &gst_xml_model_set_attribute ($branch, "TYPE", "LIST");
last; last;
} }
shift @tqchildren; shift @children;
shift @tqchildren; shift @children;
} }
last if ($branch == undef); last if ($branch == undef);
@ -1532,7 +1532,7 @@ sub gst_replace_alchemist_print_option
# See if option is already defined. # See if option is already defined.
$options = &gst_xml_model_get_tqchildren ($branch); $options = &gst_xml_model_get_children ($branch);
foreach $o (@$options) foreach $o (@$options)
{ {

@ -352,34 +352,34 @@ sub gst_xml_model_print_recurse
my ($tree, $indent) = @_; my ($tree, $indent) = @_;
my ($string); my ($string);
my @tqchildren = @$tree; my @children = @$tree;
shift @tqchildren; # Attributes shift @children; # Attributes
while (@tqchildren) while (@children)
{ {
my $branch = $tqchildren [1]; my $branch = $children [1];
if ($tqchildren [0] eq "__unparsed__") if ($children [0] eq "__unparsed__")
{ {
$string .= "<" . $tqchildren [1] . ">"; $string .= "<" . $children [1] . ">";
} }
elsif ($tqchildren [0] eq "0") elsif ($children [0] eq "0")
{ {
$string .= $tqchildren [1]; $string .= $children [1];
} }
elsif (@$branch == 1) # Empty tag. elsif (@$branch == 1) # Empty tag.
{ {
$string .= "<" . $tqchildren [0] . &gst_xml_model_print_attributes ($branch) . "/>"; $string .= "<" . $children [0] . &gst_xml_model_print_attributes ($branch) . "/>";
} }
else else
{ {
$string .= "<" . $tqchildren [0] . &gst_xml_model_print_attributes ($branch) . ">"; $string .= "<" . $children [0] . &gst_xml_model_print_attributes ($branch) . ">";
$string .= &gst_xml_model_print_recurse ($branch); $string .= &gst_xml_model_print_recurse ($branch);
$string .= "</" . $tqchildren [0] . ">"; $string .= "</" . $children [0] . ">";
} }
shift @tqchildren; shift @children;
shift @tqchildren; shift @children;
} }
# if ($branch) # if ($branch)
@ -825,21 +825,21 @@ sub gst_xml_model_find
for $elem (@path) for $elem (@path)
{ {
next if ($elem eq ""); next if ($elem eq "");
my @tqchildren = @$branch; my @children = @$branch;
shift @tqchildren; # Attributes shift @children; # Attributes
$branch = undef; $branch = undef;
while (@tqchildren) while (@children)
{ {
if ($tqchildren [0] eq $elem) if ($children [0] eq $elem)
{ {
shift @tqchildren; shift @children;
$branch = shift @tqchildren; $branch = shift @children;
last; last;
} }
shift @tqchildren; shift @children;
shift @tqchildren; shift @children;
} }
last if ($branch == undef); last if ($branch == undef);
@ -890,23 +890,23 @@ sub gst_xml_model_ensure
{ {
next if ($elem eq ""); next if ($elem eq "");
my @tqchildren = @$branch; my @children = @$branch;
my $parent_branch = $branch; my $parent_branch = $branch;
shift @tqchildren; # Attributes shift @children; # Attributes
$branch = undef; $branch = undef;
while (@tqchildren) while (@children)
{ {
if ($tqchildren [0] eq $elem) if ($children [0] eq $elem)
{ {
shift @tqchildren; shift @children;
$branch = shift @tqchildren; $branch = shift @children;
last; last;
} }
shift @tqchildren; shift @children;
shift @tqchildren; shift @children;
} }
if ($branch == undef) if ($branch == undef)
@ -950,22 +950,22 @@ sub gst_xml_model_remove
return -1; return -1;
} }
sub gst_xml_model_get_tqchildren sub gst_xml_model_get_children
{ {
my ($branch) = @_; my ($branch) = @_;
my (@tqchildren); my (@children);
if (!$branch) { return \@tqchildren; } if (!$branch) { return \@children; }
for ($i = 1; $i < @$branch; $i += 2) for ($i = 1; $i < @$branch; $i += 2)
{ {
if (@$branch [$i] ne "__unparsed__" && @$branch [$i] ne "0") if (@$branch [$i] ne "__unparsed__" && @$branch [$i] ne "0")
{ {
push @tqchildren, @$branch [$i + 1]; push @children, @$branch [$i + 1];
} }
} }
return \@tqchildren; return \@children;
} }
sub gst_xml_model_get_pcdata sub gst_xml_model_get_pcdata

@ -230,7 +230,7 @@ void KNetworkConf::configureDeviceSlot(){
if (item != NULL) if (item != NULL)
{ {
TQString currentDevice = item->text(0); TQString currentDevice = item->text(0);
configDlg.setCaption(i18n("Configure Device %1").tqarg(currentDevice)); configDlg.setCaption(i18n("Configure Device %1").arg(currentDevice));
KNetworkInterface *dev = getDeviceInfo(currentDevice); KNetworkInterface *dev = getDeviceInfo(currentDevice);
KAddDeviceDlgExtension *advancedOptions = (KAddDeviceDlgExtension *)configDlg.extension(); KAddDeviceDlgExtension *advancedOptions = (KAddDeviceDlgExtension *)configDlg.extension();
@ -677,9 +677,9 @@ void KNetworkConf::changeDeviceState(const TQString &dev, int state){
KInterfaceUpDownDlg* dialog = new KInterfaceUpDownDlg(this,"Changing device state"); KInterfaceUpDownDlg* dialog = new KInterfaceUpDownDlg(this,"Changing device state");
if (state == DEVICE_UP) if (state == DEVICE_UP)
dialog->label->setText(i18n("Enabling interface <b>%1</b>").tqarg(dev)); dialog->label->setText(i18n("Enabling interface <b>%1</b>").arg(dev));
else else
dialog->label->setText(i18n("Disabling interface <b>%1</b>").tqarg(dev)); dialog->label->setText(i18n("Disabling interface <b>%1</b>").arg(dev));
dialog->setModal(true); dialog->setModal(true);
dialog->show(); dialog->show();

@ -38,7 +38,7 @@ void KNetworkConfigParser::runDetectionScript(TQString platform){
if (pathToProgram.isEmpty()) if (pathToProgram.isEmpty())
{ {
KMessageBox::error(0, KMessageBox::error(0,
i18n("Could not find the backend script for the network configuration detection. Something is wrong with your installation.\n Please check that \n{KDE_PATH}/%1 \nfile is present.").tqarg(BACKEND_PATH), i18n("Could not find the backend script for the network configuration detection. Something is wrong with your installation.\n Please check that \n{KDE_PATH}/%1 \nfile is present.").arg(BACKEND_PATH),
i18n("Could Not Find Network Configuration Backend Script")); i18n("Could Not Find Network Configuration Backend Script"));
dialog->close(); dialog->close();
//kapp->quit(); //kapp->quit();
@ -301,7 +301,7 @@ void KNetworkConfigParser::saveNetworkInfo(KNetworkInfo *networkInfo)
// KDetectDistroDlg* dialog = new KDetectDistroDlg(0, 0, true,TQDialog::WStyle_Customize|TQDialog::WStyle_NormalBorder|TQDialog::WStyle_Title|TQDialog::WStyle_SysMenu); //made it semi-modal // KDetectDistroDlg* dialog = new KDetectDistroDlg(0, 0, true,TQDialog::WStyle_Customize|TQDialog::WStyle_NormalBorder|TQDialog::WStyle_Title|TQDialog::WStyle_SysMenu); //made it semi-modal
KDetectDistroDlg* dialog = new KDetectDistroDlg((TQWidget*)parent(), 0, true); KDetectDistroDlg* dialog = new KDetectDistroDlg((TQWidget*)parent(), 0, true);
dialog->setCaption(i18n("Reloading Network")); dialog->setCaption(i18n("Reloading Network"));
dialog->text->setText(i18n("%1Please wait while saving the network settings...%2").tqarg("<center>").tqarg("</center>")); dialog->text->setText(i18n("%1Please wait while saving the network settings...%2").arg("<center>").arg("</center>"));
dialog->show(); dialog->show();
xmlOuput = ""; xmlOuput = "";

@ -110,7 +110,7 @@ KAboutData *aboutData = new KAboutData( "knetworkconf", I18N_NOOP("KNetworkConf"
TQString KNetworkConfModule::quickHelp() const TQString KNetworkConfModule::quickHelp() const
{ {
return i18n("%1Network configuration%2This module allows you to configure your TCP/IP settings.%3").tqarg("<h1>").tqarg("</h1><p>").tqarg("</p>"); return i18n("%1Network configuration%2This module allows you to configure your TCP/IP settings.%3").arg("<h1>").arg("</h1><p>").arg("</p>");
} }
//#include "knetworkconfmodule.moc" //#include "knetworkconfmodule.moc"

@ -91,31 +91,31 @@ inline void KProfilesListViewToolTip::maybeTip( const TQPoint& p )
{ {
if (device->getType() != LOOPBACK_IFACE_TYPE) if (device->getType() != LOOPBACK_IFACE_TYPE)
{ {
tipStr.append(i18n("<p><b>Interface:</b> %1").tqarg(device->getDeviceName().latin1())); tipStr.append(i18n("<p><b>Interface:</b> %1").arg(device->getDeviceName().latin1()));
tipStr.append(i18n("<br><b>Type:</b> %1").tqarg(device->getType())); tipStr.append(i18n("<br><b>Type:</b> %1").arg(device->getType()));
TQString bootProto; TQString bootProto;
if (device->getBootProto() == "none") if (device->getBootProto() == "none")
bootProto = "Manual"; bootProto = "Manual";
else else
bootProto = device->getBootProto(); bootProto = device->getBootProto();
tipStr.append(i18n("<br><b>Boot Protocol:</b> %1").tqarg(bootProto)); tipStr.append(i18n("<br><b>Boot Protocol:</b> %1").arg(bootProto));
if (bootProto != "dhcp") if (bootProto != "dhcp")
{ {
tipStr.append(i18n("<br><b>IP Address:</b> %1").tqarg(device->getIpAddress())); tipStr.append(i18n("<br><b>IP Address:</b> %1").arg(device->getIpAddress()));
tipStr.append(i18n("<br><b>Broadcast Address:</b> %1").tqarg(device->getBroadcast())); tipStr.append(i18n("<br><b>Broadcast Address:</b> %1").arg(device->getBroadcast()));
} }
tipStr.append(i18n("<br><b>On Boot:</b> %1").tqarg(device->getOnBoot())); tipStr.append(i18n("<br><b>On Boot:</b> %1").arg(device->getOnBoot()));
} }
} }
KRoutingInfo *route = profile->getRoutingInfo(); KRoutingInfo *route = profile->getRoutingInfo();
tipStr.append(i18n("</p><p><b>Default Gateway:</b> %1").tqarg(route->getGateway())); tipStr.append(i18n("</p><p><b>Default Gateway:</b> %1").arg(route->getGateway()));
KDNSInfo *dns = profile->getDNSInfo(); KDNSInfo *dns = profile->getDNSInfo();
tipStr.append(i18n("<br><b>Domain Name:</b> %1").tqarg(dns->getDomainName())); tipStr.append(i18n("<br><b>Domain Name:</b> %1").arg(dns->getDomainName()));
tipStr.append(i18n("<br><b>Machine Name:</b> %1").tqarg(dns->getMachineName())); tipStr.append(i18n("<br><b>Machine Name:</b> %1").arg(dns->getMachineName()));
TQStringList nameServers = dns->getNameServers(); TQStringList nameServers = dns->getNameServers();
for ( TQStringList::Iterator it = nameServers.begin(); it != nameServers.end(); ++it) for ( TQStringList::Iterator it = nameServers.begin(); it != nameServers.end(); ++it)
{ {
tipStr.append(i18n("<br><b>DNS Name Server:</b> %1").tqarg((*it))); tipStr.append(i18n("<br><b>DNS Name Server:</b> %1").arg((*it)));
} }
} }
} }

@ -50,7 +50,7 @@
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>

@ -60,7 +60,7 @@ TQString cacheObj::PDir()
TQDir d(tmpd); TQDir d(tmpd);
if (!d.exists()) { if (!d.exists()) {
if (!d.mkdir(tmpd)) { if (!d.mkdir(tmpd)) {
KpMsgE(i18n("Cannot create folder %1").tqarg(tmpd),TRUE); KpMsgE(i18n("Cannot create folder %1").arg(tmpd),TRUE);
tmpd = ""; tmpd = "";
} else { } else {
chown(TQFile::encodeName(tmpd),buf.st_uid,buf.st_gid); chown(TQFile::encodeName(tmpd),buf.st_uid,buf.st_gid);
@ -81,7 +81,7 @@ TQString cacheObj::CDir()
TQDir d(tmpd); TQDir d(tmpd);
if (!d.exists()) { if (!d.exists()) {
if (!d.mkdir(tmpd)) { if (!d.mkdir(tmpd)) {
KpMsgE(i18n("Cannot create folder %1").tqarg(tmpd),TRUE); KpMsgE(i18n("Cannot create folder %1").arg(tmpd),TRUE);
tmpd = ""; tmpd = "";
} else { } else {
chown(TQFile::encodeName(tmpd),buf.st_uid,buf.st_gid); chown(TQFile::encodeName(tmpd),buf.st_uid,buf.st_gid);
@ -95,7 +95,7 @@ int cacheObj::newDCache(const TQString &url, const TQString &fn, TQString &fnam
KURL u(url); KURL u(url);
if ( !u.isValid() ) { if ( !u.isValid() ) {
KpMsgE(i18n("Malformed URL: %1").tqarg(url),TRUE); KpMsgE(i18n("Malformed URL: %1").arg(url),TRUE);
return -1; return -1;
} }

@ -156,7 +156,7 @@ void DEBAPT::fileS()
kprun->exec(); kprun->exec();
} }
} else { } else {
KpMsg("Error",i18n("The %1 program needs to be installed").tqarg("apt-file"), TRUE); KpMsg("Error",i18n("The %1 program needs to be installed").arg("apt-file"), TRUE);
} }
} }
@ -185,13 +185,13 @@ void DEBAPT::listRPack(TQPtrList<packageInfo> *pki)
packageInfo *p; packageInfo *p;
TQStringList plist; TQStringList plist;
kpackage->setStatus(i18n("Querying DEB APT remote package list: %1").tqarg(hostName)); kpackage->setStatus(i18n("Querying DEB APT remote package list: %1").arg(hostName));
kpackage->setPercent(0); kpackage->setPercent(0);
TQString cmd = "cat " STATUS; TQString cmd = "cat " STATUS;
TQStringList list = kpty->run(cmd); TQStringList list = kpty->run(cmd);
kpackage->setStatus(i18n("Processing DEB APT remote package list: %1").tqarg(hostName)); kpackage->setStatus(i18n("Processing DEB APT remote package list: %1").arg(hostName));
// kdDebug() << "P=" << list.count() <<"\n"; // kdDebug() << "P=" << list.count() <<"\n";
kpackage->setPercent(50); kpackage->setPercent(50);
@ -243,14 +243,14 @@ void DEBAPT::listAvail(TQPtrList<packageInfo> *pki)
if (hostName.isEmpty()) if (hostName.isEmpty())
kpackage->setStatus(i18n("Querying DEB APT available list")); kpackage->setStatus(i18n("Querying DEB APT available list"));
else else
kpackage->setStatus(i18n("Querying DEB APT available list: %1").tqarg(hostName)); kpackage->setStatus(i18n("Querying DEB APT available list: %1").arg(hostName));
kpackage->setPercent(0); kpackage->setPercent(0);
TQStringList list = kpty->run("apt-cache dumpavail"); TQStringList list = kpty->run("apt-cache dumpavail");
if (hostName.isEmpty()) if (hostName.isEmpty())
kpackage->setStatus(i18n("Processing DEB APT available list")); kpackage->setStatus(i18n("Processing DEB APT available list"));
else else
kpackage->setStatus(i18n("Processing DEB APT available list: %1").tqarg(hostName)); kpackage->setStatus(i18n("Processing DEB APT available list: %1").arg(hostName));
// kdDebug() << "A=" << list.count() <<"\n"; // kdDebug() << "A=" << list.count() <<"\n";
kpackage->setPercent(50); kpackage->setPercent(50);
@ -365,7 +365,7 @@ TQStringList DEBAPT::FindFile(const TQString &name, bool searchAll)
return filelist; return filelist;
} else { } else {
KpMsg("Error",i18n("The %1 program needs to be installed").tqarg("apt-file"), TRUE); KpMsg("Error",i18n("The %1 program needs to be installed").arg("apt-file"), TRUE);
TQStringList nill; TQStringList nill;
return nill; return nill;
} }

@ -527,7 +527,7 @@ int fbsdInterface::pathInfo(TQMap<TQString, TQString> &a)
// Find the last word on this line (which should be the package name) minus a trailing :. // Find the last word on this line (which should be the package name) minus a trailing :.
TQString pkg = name.section(' ',-1); TQString pkg = name.section(' ',-1);
if (pkg.isEmpty()) { if (pkg.isEmpty()) {
KpMsgE(i18n("Unexpected output from pkg_info (looking for package name): %1").tqarg(value), TRUE); KpMsgE(i18n("Unexpected output from pkg_info (looking for package name): %1").arg(value), TRUE);
kpackage->setStatus(TQString()); kpackage->setStatus(TQString());
return; return;
} else { } else {

@ -485,9 +485,9 @@ pkgInterface *KPACKAGE::pkType(const TQString &fname)
} }
} }
fclose(file); fclose(file);
KpMsgE(i18n("Unknown package type: %1").tqarg(fname),TRUE); KpMsgE(i18n("Unknown package type: %1").arg(fname),TRUE);
} else { } else {
KpMsgE(i18n("File not found: %1").tqarg(fname),TRUE); KpMsgE(i18n("File not found: %1").arg(fname),TRUE);
} }
return 0; return 0;
@ -585,7 +585,7 @@ TQString KPACKAGE::getFileName(const KURL & url, TQString &cacheName )
TQString fname = ""; TQString fname = "";
if ( !url.isValid() ) { if ( !url.isValid() ) {
KpMsgE(i18n("Malformed URL: %1").tqarg(url.url()),TRUE); KpMsgE(i18n("Malformed URL: %1").arg(url.url()),TRUE);
} else { } else {
// Just a usual file ? // Just a usual file ?

@ -181,7 +181,7 @@ private:
// This widget displays the package info / file-list // This widget displays the package info / file-list
TQBoxLayout *top, *leftbox, *rightbox, *lbuttons, *rbuttons; TQBoxLayout *top, *leftbox, *rightbox, *lbuttons, *rbuttons;
// These are the tqgeometry managers // These are the geometry managers
TQFrame *leftpanel, *rightpanel; TQFrame *leftpanel, *rightpanel;
// frame to put TQBox in // frame to put TQBox in

@ -96,8 +96,8 @@ Options::Options(TQWidget *parent)
} else { } else {
msgStr = kpinterface[i]->name; msgStr = kpinterface[i]->name;
msgStr = i18n("%1: %2 not found") msgStr = i18n("%1: %2 not found")
.tqarg(kpinterface[i]->name) .arg(kpinterface[i]->name)
.tqarg(kpinterface[i]->errExe); .arg(kpinterface[i]->errExe);
} }
packageBox[i] = new TQGroupBox(2,Qt::Horizontal,msgStr, framet, "box"); packageBox[i] = new TQGroupBox(2,Qt::Horizontal,msgStr, framet, "box");
packageHandle[i] = new TQCheckBox(i18n("Enable"), packageBox[i]); packageHandle[i] = new TQCheckBox(i18n("Enable"), packageBox[i]);

@ -197,7 +197,7 @@ void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, c
} }
} else { } else {
// directory is not readable // directory is not readable
kdDebug() << TQString("WARNING: directory '%1' not readable (will be ignored) !\n").tqarg(d.absPath() ) << endl; kdDebug() << TQString("WARNING: directory '%1' not readable (will be ignored) !\n").arg(d.absPath() ) << endl;
} }
} else { } else {
TQFile f(fname); TQFile f(fname);
@ -297,7 +297,7 @@ TQString pkgInterface::getDir(cacheObj *cp) {
cl.write(); cl.write();
return tmpDir; return tmpDir;
} else { } else {
KpMsgE(i18n("Cannot read folder %1").tqarg(url),FALSE); KpMsgE(i18n("Cannot read folder %1").arg(url),FALSE);
unlink(tmpDir.ascii()); unlink(tmpDir.ascii());
return TQString(); return TQString();
} }

@ -202,7 +202,7 @@ bool pkgOptions::setup(TQPtrList<packageInfo> *pl, const TQString &)
} }
} }
s = i18n("%1: 1 %2 Package","%1: %n %2 Packages",plist.count()).tqarg(insType,pkgInt->name); s = i18n("%1: 1 %2 Package","%1: %n %2 Packages",plist.count()).arg(insType,pkgInt->name);
title->setText(s); title->setText(s);
for (TQStringList::Iterator pit = plist.begin(); pit != plist.end(); ++pit ) { for (TQStringList::Iterator pit = plist.begin(); pit != plist.end(); ++pit ) {

@ -136,13 +136,13 @@ int procbuf::start (TQString msg, bool errorDlg,
<< " exit=" << proc->exitStatus() << endl; << " exit=" << proc->exitStatus() << endl;
if (timed) { if (timed) {
kdDebug() << "timeout..................\n"; kdDebug() << "timeout..................\n";
KpMsg("Error",i18n("Timeout: %1").tqarg(timeMsg), TRUE); KpMsg("Error",i18n("Timeout: %1").arg(timeMsg), TRUE);
delete proc; proc = 0; delete proc; proc = 0;
return 0; return 0;
} else { } else {
if (!proc->normalExit() || proc->exitStatus()) { if (!proc->normalExit() || proc->exitStatus()) {
if (errorDlg) { if (errorDlg) {
KpMsg("Error",i18n("Kprocess error:%1").tqarg(buf), TRUE); KpMsg("Error",i18n("Kprocess error:%1").arg(buf), TRUE);
} }
delete proc; proc = 0; delete proc; proc = 0;
return 0; return 0;

@ -104,7 +104,7 @@ void Search::ok_slot()
} }
if (pkg == 0) if (pkg == 0)
KpMsg(i18n("Note"), KpMsg(i18n("Note"),
i18n("%1 was not found.").tqarg(to_find),TRUE); i18n("%1 was not found.").arg(to_find),TRUE);
} }
void Search::done_slot() void Search::done_slot()

@ -49,23 +49,23 @@ void ksv::IO::removeFile (const TQFileInfo& info, TQDir& dir, TQString& rich, TQ
if (!dir.remove(info.fileName(), FALSE)) if (!dir.remove(info.fileName(), FALSE))
{ {
rich = (i18n ("<error>FAILED</error> to remove <cmd>%1</cmd> from <cmd>%2</cmd>: \"%3\"<br/>") rich = (i18n ("<error>FAILED</error> to remove <cmd>%1</cmd> from <cmd>%2</cmd>: \"%3\"<br/>")
.tqarg(info.fileName()) .arg(info.fileName())
.tqarg(dir.path()) .arg(dir.path())
.tqarg(strerror(errno))); .arg(strerror(errno)));
plain = (i18n ("FAILED to remove %1 from %2: \"%3\"\n") plain = (i18n ("FAILED to remove %1 from %2: \"%3\"\n")
.tqarg(info.fileName()) .arg(info.fileName())
.tqarg(dir.path()) .arg(dir.path())
.tqarg(strerror(errno))); .arg(strerror(errno)));
} }
else else
{ {
rich = i18n("removed <cmd>%1</cmd> from <cmd>%2</cmd><br/>") rich = i18n("removed <cmd>%1</cmd> from <cmd>%2</cmd><br/>")
.tqarg(info.fileName()) .arg(info.fileName())
.tqarg(dir.path()); .arg(dir.path());
plain = i18n("removed %1 from %2\n") plain = i18n("removed %1 from %2\n")
.tqarg(info.fileName()) .arg(info.fileName())
.tqarg(dir.path()); .arg(dir.path());
} }
} }
@ -80,8 +80,8 @@ void ksv::IO::dissectFilename (const TQString& file, TQString& base, int& nr)
void ksv::IO::makeSymlink (const KSVData& data, int runlevel, bool start, void ksv::IO::makeSymlink (const KSVData& data, int runlevel, bool start,
TQString& rich, TQString& plain) TQString& rich, TQString& plain)
{ {
const TQString symName = TQString("%1%2%3").tqarg(start ? "S" : "K").tqarg(data.numberString()).tqarg(data.label()); const TQString symName = TQString("%1%2%3").arg(start ? "S" : "K").arg(data.numberString()).arg(data.label());
const TQString symPath = TQString("%1/rc%2.d/").tqarg(KSVConfig::self()->runlevelPath()).tqarg(runlevel); const TQString symPath = TQString("%1/rc%2.d/").arg(KSVConfig::self()->runlevelPath()).arg(runlevel);
const TQString symbol = symPath + symName; const TQString symbol = symPath + symName;
TQString target = data.filename(); TQString target = data.filename();
@ -92,20 +92,20 @@ void ksv::IO::makeSymlink (const KSVData& data, int runlevel, bool start,
if (symlink(target.local8Bit(), symbol.local8Bit()) == 0) if (symlink(target.local8Bit(), symbol.local8Bit()) == 0)
{ {
rich = i18n("created <cmd>%1</cmd> in <cmd>%2</cmd><br/>").tqarg(symName).tqarg(symPath); rich = i18n("created <cmd>%1</cmd> in <cmd>%2</cmd><br/>").arg(symName).arg(symPath);
plain = i18n("created %1 in %2\n").tqarg(symName).tqarg(symPath); plain = i18n("created %1 in %2\n").arg(symName).arg(symPath);
} }
else else
{ {
rich = i18n("<error>FAILED</error> to create <cmd>%1</cmd> in <cmd>%2</cmd>: \"%3\"<br/>") rich = i18n("<error>FAILED</error> to create <cmd>%1</cmd> in <cmd>%2</cmd>: \"%3\"<br/>")
.tqarg(symName) .arg(symName)
.tqarg(symPath) .arg(symPath)
.tqarg(strerror(errno)); .arg(strerror(errno));
plain = i18n("FAILED to create %1 in %2: \"%3\"\n") plain = i18n("FAILED to create %1 in %2: \"%3\"\n")
.tqarg(symName) .arg(symName)
.tqarg(symPath) .arg(symPath)
.tqarg(strerror(errno)); .arg(strerror(errno));
} }
} }
@ -201,7 +201,7 @@ bool ksv::IO::loadSavedConfiguration (TQDataStream& s,
s >> rlMagic; s >> rlMagic;
s >> section; s >> section;
if (rlMagic != TQString::fromLatin1("RUNLEVEL %1").tqarg(i)) if (rlMagic != TQString::fromLatin1("RUNLEVEL %1").arg(i))
return false; return false;
if (section != "START") if (section != "START")

@ -251,9 +251,9 @@ void KSVContent::initLList()
mRunlevels[i]->setSpacing (KDialog::spacingHint()); mRunlevels[i]->setSpacing (KDialog::spacingHint());
// create TQString for label // create TQString for label
TQString _label (i18n("Runlevel &%1").tqarg(i)); TQString _label (i18n("Runlevel &%1").arg(i));
// and for the name // and for the name
TQString _name (i18n("Runlevel %1").tqarg(i)); TQString _name (i18n("Runlevel %1").arg(i));
TQVBox* startBox = new TQVBox (mRunlevels[i]); TQVBox* startBox = new TQVBox (mRunlevels[i]);
TQWhatsThis::add (startBox, TQWhatsThis::add (startBox,
@ -262,7 +262,7 @@ void KSVContent::initLList()
"determines the order in which the services are started. " \ "determines the order in which the services are started. " \
"You can arrange them via drag and drop, as long as a suitable " \ "You can arrange them via drag and drop, as long as a suitable " \
"<em>sorting number</em> can be generated.</p><p>If that's not possible, you have " \ "<em>sorting number</em> can be generated.</p><p>If that's not possible, you have " \
"to change the number manually via the <strong>Properties dialog box</strong>.</p>").tqarg(i)); "to change the number manually via the <strong>Properties dialog box</strong>.</p>").arg(i));
TQLabel* rlL = new TQLabel(_label, startBox); TQLabel* rlL = new TQLabel(_label, startBox);
new TQLabel(i18n("Start"), startBox); new TQLabel(i18n("Start"), startBox);
@ -280,7 +280,7 @@ void KSVContent::initLList()
"determines the order in which the services are stopped. " \ "determines the order in which the services are stopped. " \
"You can arrange them via drag and drop, as long as a suitable " \ "You can arrange them via drag and drop, as long as a suitable " \
"<em>sorting number</em> can be generated.</p><p>If that's not possible, you have " \ "<em>sorting number</em> can be generated.</p><p>If that's not possible, you have " \
"to change the number manually via the <strong>Properties dialog box</strong>.</p>").tqarg(i)); "to change the number manually via the <strong>Properties dialog box</strong>.</p>").arg(i));
// create the "STOP" list: // create the "STOP" list:
stopRL[i] = new KSVDragList(stopBox, (_name + " STOP").latin1()); stopRL[i] = new KSVDragList(stopBox, (_name + " STOP").latin1());
@ -351,9 +351,9 @@ void KSVContent::initLList()
// use this loop for setting tooltips // use this loop for setting tooltips
startRL[i]->setToolTip (i18n("Drag here to start services\n" \ startRL[i]->setToolTip (i18n("Drag here to start services\n" \
"when entering runlevel %1").tqarg(i)); "when entering runlevel %1").arg(i));
stopRL[i]->setToolTip (i18n("Drag here to stop services\n" \ stopRL[i]->setToolTip (i18n("Drag here to stop services\n" \
"when entering runlevel %1").tqarg(i)); "when entering runlevel %1").arg(i));
for (int j = 0; j < ksv::runlevelNumber; ++j) for (int j = 0; j < ksv::runlevelNumber; ++j)
{ {
@ -422,7 +422,7 @@ void KSVContent::initRunlevels()
startRL[i]->clear(); startRL[i]->clear();
stopRL[i]->clear(); stopRL[i]->clear();
const TQString _path = conf->runlevelPath() + TQString("/rc%1.d").tqarg(i); const TQString _path = conf->runlevelPath() + TQString("/rc%1.d").arg(i);
if (!TQDir(_path).exists()) if (!TQDir(_path).exists())
continue; continue;
@ -476,8 +476,8 @@ void KSVContent::slotWriteSysV()
for (int i = 0; i < ksv::runlevelNumber; ++i) for (int i = 0; i < ksv::runlevelNumber; ++i)
{ {
appendLog(i18n("<rl>RUNLEVEL %1</rl>").tqarg(i), appendLog(i18n("<rl>RUNLEVEL %1</rl>").arg(i),
i18n("** RUNLEVEL %1 **").tqarg(i)); i18n("** RUNLEVEL %1 **").arg(i));
clearRL(i); // rm changed/deleted entries clearRL(i); // rm changed/deleted entries
@ -525,7 +525,7 @@ void KSVContent::repaintRunlevels ()
void KSVContent::clearRL(int _rl) void KSVContent::clearRL(int _rl)
{ {
TQString path = conf->runlevelPath() + TQString("/rc%1.d").tqarg(_rl); TQString path = conf->runlevelPath() + TQString("/rc%1.d").arg(_rl);
TQDir dir (path); TQDir dir (path);
@ -539,7 +539,7 @@ void KSVContent::clearRL(int _rl)
if (d->newEntry() && d->originalRunlevel() != startRL[_rl]->name()) if (d->newEntry() && d->originalRunlevel() != startRL[_rl]->name())
break; break;
TQFileInfo file (path + TQString("/S%1%2").tqarg(d->numberString()).tqarg(d->label())); TQFileInfo file (path + TQString("/S%1%2").arg(d->numberString()).arg(d->label()));
TQString rich, plain; TQString rich, plain;
ksv::IO::removeFile (file, dir, rich, plain); ksv::IO::removeFile (file, dir, rich, plain);
@ -557,7 +557,7 @@ void KSVContent::clearRL(int _rl)
if (d->newEntry() && d->originalRunlevel() != stopRL[_rl]->name()) if (d->newEntry() && d->originalRunlevel() != stopRL[_rl]->name())
break; break;
TQFileInfo file (path + TQString("/K%1%2").tqarg(d->numberString()).tqarg(d->label())); TQFileInfo file (path + TQString("/K%1%2").arg(d->numberString()).arg(d->label()));
TQString rich, plain; TQString rich, plain;
ksv::IO::removeFile (file, dir, rich, plain); ksv::IO::removeFile (file, dir, rich, plain);
@ -613,8 +613,8 @@ void KSVContent::stopService (const TQString& path)
connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
// refresh textDisplay // refresh textDisplay
appendLog(i18n("** <stop>Stopping</stop> <cmd>%1</cmd> **<br/>").tqarg(path), appendLog(i18n("** <stop>Stopping</stop> <cmd>%1</cmd> **<br/>").arg(path),
i18n("** Stopping %1 **").tqarg(path)); i18n("** Stopping %1 **").arg(path));
_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput); _proc->start(KProcess::NotifyOnExit, KProcess::AllOutput);
@ -639,8 +639,8 @@ void KSVContent::startService (const TQString& path)
connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
// refresh textDisplay // refresh textDisplay
appendLog(i18n("** <start>Starting</start> <cmd>%1</cmd> **<br/>").tqarg(path), appendLog(i18n("** <start>Starting</start> <cmd>%1</cmd> **<br/>").arg(path),
i18n("** Starting %1 **").tqarg(path)); i18n("** Starting %1 **").arg(path));
_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput); _proc->start(KProcess::NotifyOnExit, KProcess::AllOutput);
@ -679,8 +679,8 @@ void KSVContent::restartService (const TQString& path)
connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
// refresh textDisplay // refresh textDisplay
appendLog(i18n("** Re-starting <cmd>%1</cmd> **</br>").tqarg(path), appendLog(i18n("** Re-starting <cmd>%1</cmd> **</br>").arg(path),
i18n("** Re-starting %1 **").tqarg(path)); i18n("** Re-starting %1 **").arg(path));
_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput); _proc->start(KProcess::NotifyOnExit, KProcess::AllOutput);

@ -44,7 +44,7 @@ RunlevelAuthIcon::RunlevelAuthIcon (const TQString& servicesPath, const TQString
for (int i = 0; i < ksv::runlevelNumber; ++i) for (int i = 0; i < ksv::runlevelNumber; ++i)
{ {
mRLInfo[i] = new TQFileInfo ((runlevelPath + "/rc%1.d").tqarg(i)); mRLInfo[i] = new TQFileInfo ((runlevelPath + "/rc%1.d").arg(i));
} }
updateStatus(); updateStatus();
@ -122,7 +122,7 @@ void RunlevelAuthIcon::setRunlevelPath (const TQString& path)
for (int i = 0; i < ksv::runlevelNumber; ++i) for (int i = 0; i < ksv::runlevelNumber; ++i)
{ {
mRLInfo[i]->setFile ((path + "/rc%1.d").tqarg(i)); mRLInfo[i]->setFile ((path + "/rc%1.d").arg(i));
} }
mTimer->start(mInterval); mTimer->start(mInterval);

@ -426,7 +426,7 @@ void KSVTopLevel::initStatusBar()
"or ask your sysadmin to install %1 <em>suid</em> or " \ "or ask your sysadmin to install %1 <em>suid</em> or " \
"<em>sgid</em>.</p><p>The latter way is <strong>not</strong> "\ "<em>sgid</em>.</p><p>The latter way is <strong>not</strong> "\
"recommended though, due to security issues.</p>") "recommended though, due to security issues.</p>")
.tqarg (kapp->aboutData()->programName()).tqarg(kapp->aboutData()->programName())); .arg (kapp->aboutData()->programName()).arg(kapp->aboutData()->programName()));
authIconBox->setMinimumSize (authIconBox->minimumSizeHint()); authIconBox->setMinimumSize (authIconBox->minimumSizeHint());
visBox->setMinimumSize (visBox->minimumSizeHint()); visBox->setMinimumSize (visBox->minimumSizeHint());
@ -659,7 +659,7 @@ void KSVTopLevel::print()
// p.setFont (TQFont("courier", 16, TQFont::Bold)); // p.setFont (TQFont("courier", 16, TQFont::Bold));
// TQFontMetrics fm = p.fontMetrics(); // TQFontMetrics fm = p.fontMetrics();
// p.drawText (10, y, i18n ("Runlevel %1").tqarg(i)); // p.drawText (10, y, i18n ("Runlevel %1").arg(i));
// y += fm.lineSpacing(); // y += fm.lineSpacing();
// checkPage // checkPage
@ -775,7 +775,7 @@ void KSVTopLevel::printLog()
y += tmp_h; y += tmp_h;
TQSimpleRichText rdate (i18n("<h3>Printed on %1</h3><br/><br/>").tqarg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())), TQSimpleRichText rdate (i18n("<h3>Printed on %1</h3><br/><br/>").arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())),
TQFont("times"), TQString(), ksv::styleSheet(), TQFont("times"), TQString(), ksv::styleSheet(),
TQMimeSourceFactory::defaultFactory()); TQMimeSourceFactory::defaultFactory());
rdate.setWidth (&p, width); rdate.setWidth (&p, width);

@ -10,7 +10,7 @@
<cstring>ConfigWizard</cstring> <cstring>ConfigWizard</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>tqgeometry</name> <name>geometry</name>
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
@ -590,7 +590,7 @@ You have finished the initial configuration of SysV-Init Editor. &lt;b&gt;Press&
<enum>RichText</enum> <enum>RichText</enum>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>tqalignment</name> <name>alignment</name>
<set>AlignTop|AlignLeft</set> <set>AlignTop|AlignLeft</set>
</property> </property>
<property> <property>

@ -39,8 +39,8 @@ void KDLToolTip::maybeTip (const TQPoint& p)
TQString text; TQString text;
TQRect rect; TQRect rect;
const TQRect vert = mParent->verticalScrollBar()->tqgeometry(); const TQRect vert = mParent->verticalScrollBar()->geometry();
const TQRect horiz = mParent->horizontalScrollBar()->tqgeometry(); const TQRect horiz = mParent->horizontalScrollBar()->geometry();
if (vert.contains(p)) if (vert.contains(p))
{ {
@ -66,7 +66,7 @@ void KDLToolTip::maybeTip (const TQPoint& p)
TQListViewItem* i = mParent->itemAt (rp); TQListViewItem* i = mParent->itemAt (rp);
KSVItem* item = static_cast<KSVItem*> (i); KSVItem* item = static_cast<KSVItem*> (i);
rect = mParent->header()->tqgeometry(); rect = mParent->header()->geometry();
if (rect.contains (p)) if (rect.contains (p))
{ {
text = mParent->tooltip(); text = mParent->tooltip();

@ -100,7 +100,7 @@ void KSVConfig::writeSettings() {
mConfig->writeEntry("Service Font", mServiceFont); mConfig->writeEntry("Service Font", mServiceFont);
mConfig->writeEntry("Number Font", mNumberFont); mConfig->writeEntry("Number Font", mNumberFont);
// save screen tqgeometry // save screen geometry
KMainWindow* mw = static_cast<KMainWindow*>(kapp->mainWidget()); KMainWindow* mw = static_cast<KMainWindow*>(kapp->mainWidget());
if (mw) if (mw)

@ -385,7 +385,7 @@ void KSVDragList::initItem (TQString file, TQString path, TQString name, TQ_INT8
tmp->setChanged (false); tmp->setChanged (false);
setUpdatesEnabled(true); setUpdatesEnabled(true);
tqrepaint(false); repaint(false);
} }
void KSVDragList::setDefaultIcon (const TQPixmap& icon) void KSVDragList::setDefaultIcon (const TQPixmap& icon)

@ -133,7 +133,7 @@
<property name="text"> <property name="text">
<string>Services:</string> <string>Services:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -149,7 +149,7 @@
<property name="text"> <property name="text">
<string>Sorting numbers:</string> <string>Sorting numbers:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -265,7 +265,7 @@
<property name="text"> <property name="text">
<string>&amp;Changed:</string> <string>&amp;Changed:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -313,7 +313,7 @@
<property name="text"> <property name="text">
<string>&amp;New:</string> <string>&amp;New:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -393,7 +393,7 @@
<property name="text"> <property name="text">
<string>New &amp;&amp; &amp;selected:</string> <string>New &amp;&amp; &amp;selected:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -409,7 +409,7 @@
<property name="text"> <property name="text">
<string>Changed &amp;&amp; s&amp;elected:</string> <string>Changed &amp;&amp; s&amp;elected:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">

@ -75,7 +75,7 @@ void KSVTrash::dropEvent (TQDropEvent* e)
if (mOpen) if (mOpen)
{ {
mLabel->tqrepaint(); mLabel->repaint();
mOpen = false; mOpen = false;
} }
} }
@ -102,7 +102,7 @@ void KSVTrash::dragLeaveEvent ( TQDragLeaveEvent* )
{ {
if (mOpen) if (mOpen)
{ {
mLabel->tqrepaint(); mLabel->repaint();
mOpen = false; mOpen = false;
} }
} }

@ -65,14 +65,14 @@ void addUser::slotOk()
if ( ( user->getCaps() & KU::KUser::Cap_POSIX ) && if ( ( user->getCaps() & KU::KUser::Cap_POSIX ) &&
kug->getUsers().lookup( user->getUID() ) ) { kug->getUsers().lookup( user->getUID() ) ) {
KMessageBox::sorry( 0, i18n("User with UID %1 already exists.").tqarg( user->getUID() ) ); KMessageBox::sorry( 0, i18n("User with UID %1 already exists.").arg( user->getUID() ) );
return; return;
} }
if ( ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) && if ( ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) &&
( user->getCaps() & KU::KUser::Cap_Samba ) ) { ( user->getCaps() & KU::KUser::Cap_Samba ) ) {
if ( kug->getUsers().lookup_sam( user->getSID().getRID() ) ) { if ( kug->getUsers().lookup_sam( user->getSID().getRID() ) ) {
KMessageBox::sorry( 0, i18n("User with RID %1 already exists.").tqarg( user->getSID().getRID() ) ); KMessageBox::sorry( 0, i18n("User with RID %1 already exists.").arg( user->getSID().getRID() ) );
return; return;
} }
} }
@ -115,15 +115,15 @@ bool addUser::checkHome()
if ( KMessageBox:: if ( KMessageBox::
warningContinueCancel ( 0, warningContinueCancel ( 0,
i18n("Folder %1 already exists!\n%2 may become owner and permissions may change.\nDo you really want to use %3?"). i18n("Folder %1 already exists!\n%2 may become owner and permissions may change.\nDo you really want to use %3?").
tqarg(h_dir).tqarg(user->getName()).tqarg(h_dir), TQString(), KStdGuiItem::cont() ) == KMessageBox::Cancel ) arg(h_dir).arg(user->getName()).arg(h_dir), TQString(), KStdGuiItem::cont() ) == KMessageBox::Cancel )
return false; return false;
else else
return true; return true;
} else } else
KMessageBox::error( 0, i18n("%1 is not a folder.").tqarg(h_dir) ); KMessageBox::error( 0, i18n("%1 is not a folder.").arg(h_dir) );
} else } else
KMessageBox::error( 0, i18n("stat() failed on %1.").tqarg(h_dir) ); KMessageBox::error( 0, i18n("stat() failed on %1.").arg(h_dir) );
return false; return false;
} }
@ -145,13 +145,13 @@ bool addUser::checkMailBox()
if (r == 0) if (r == 0)
if (S_ISREG(s.st_mode)) if (S_ISREG(s.st_mode))
KMessageBox::error( 0, i18n("Mailbox %1 already exists (uid=%2).") KMessageBox::error( 0, i18n("Mailbox %1 already exists (uid=%2).")
.tqarg(mailboxpath) .arg(mailboxpath)
.tqarg(s.st_uid) ); .arg(s.st_uid) );
else else
KMessageBox::error( 0, i18n("%1 exists but is not a regular file.") KMessageBox::error( 0, i18n("%1 exists but is not a regular file.")
.tqarg(mailboxpath) ); .arg(mailboxpath) );
else else
KMessageBox::error( 0, i18n("stat() failed on %1.").tqarg(mailboxpath) ); KMessageBox::error( 0, i18n("stat() failed on %1.").arg(mailboxpath) );
return false; return false;
} }

@ -30,11 +30,11 @@ delUser::delUser(KU::KUser *AUser, TQWidget *parent, const char *name)
{ {
TQVBox *page = makeVBoxMainWidget(); TQVBox *page = makeVBoxMainWidget();
new TQLabel( i18n("<p>Deleting user <b>%1</b>" new TQLabel( i18n("<p>Deleting user <b>%1</b>"
"<p>Also perform the following actions:").tqarg(AUser->getName()), "<p>Also perform the following actions:").arg(AUser->getName()),
page); page);
m_deleteHomeDir = new TQCheckBox(i18n("Delete &home folder: %1").tqarg(AUser->getHomeDir()), page); m_deleteHomeDir = new TQCheckBox(i18n("Delete &home folder: %1").arg(AUser->getHomeDir()), page);
TQString mailboxpath = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + AUser->getName(); TQString mailboxpath = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + AUser->getName();
m_deleteMailBox = new TQCheckBox(i18n("Delete &mailbox: %1").tqarg(mailboxpath), page); m_deleteMailBox = new TQCheckBox(i18n("Delete &mailbox: %1").arg(mailboxpath), page);
setButtonGuiItem(KDialogBase::Ok, KStdGuiItem::del()); setButtonGuiItem(KDialogBase::Ok, KStdGuiItem::del());
} }

@ -274,19 +274,19 @@ void editGroup::slotOk()
kug->getGroups().lookup( legrpname->text() ) ) { kug->getGroups().lookup( legrpname->text() ) ) {
KMessageBox::sorry( 0, KMessageBox::sorry( 0,
i18n("Group with name %1 already exists.").tqarg(legrpname->text()) ); i18n("Group with name %1 already exists.").arg(legrpname->text()) );
return; return;
} }
if ( mAdd ) { if ( mAdd ) {
if ( mSamba && !cbsamba->isChecked() && kug->getGroups().lookup_sam( sid ) ) { if ( mSamba && !cbsamba->isChecked() && kug->getGroups().lookup_sam( sid ) ) {
KMessageBox::sorry( 0, KMessageBox::sorry( 0,
i18n("Group with SID %1 already exists.").tqarg( sid.getSID() ) ); i18n("Group with SID %1 already exists.").arg( sid.getSID() ) );
return; return;
} }
if (kug->getGroups().lookup(s.toInt())) { if (kug->getGroups().lookup(s.toInt())) {
KMessageBox::sorry( 0, KMessageBox::sorry( 0,
i18n("Group with gid %1 already exists.").tqarg(s.toInt()) ); i18n("Group with gid %1 already exists.").arg(s.toInt()) );
return; return;
} }
} }

@ -95,7 +95,7 @@ bool KGroupFiles::reload()
rc = stat(TQFile::encodeName(filename), &st); rc = stat(TQFile::encodeName(filename), &st);
if(rc != 0) { if(rc != 0) {
KMessageBox::error( 0, i18n("stat call on file %1 failed: %2\nCheck KUser settings."). KMessageBox::error( 0, i18n("stat call on file %1 failed: %2\nCheck KUser settings.").
tqarg(filename).tqarg(TQString::fromLatin1(strerror(errno))) ); arg(filename).arg(TQString::fromLatin1(strerror(errno))) );
if( (processing_file & GROUP) != 0 ) { if( (processing_file & GROUP) != 0 ) {
group_errno = errno; group_errno = errno;
if(!nisgroup_filename.isEmpty()) { if(!nisgroup_filename.isEmpty()) {
@ -121,7 +121,7 @@ bool KGroupFiles::reload()
FILE *fgrp = fopen(TQFile::encodeName(filename), "r"); FILE *fgrp = fopen(TQFile::encodeName(filename), "r");
TQString tmp; TQString tmp;
if (fgrp == NULL) { if (fgrp == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for reading.").tqarg(filename) ); KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) );
return FALSE; return FALSE;
} }
@ -233,14 +233,14 @@ bool KGroupFiles::save()
if(!group_filename.isEmpty()) { if(!group_filename.isEmpty()) {
if((group_fd = fopen(TQFile::encodeName(new_group_filename), "w")) == NULL) { if((group_fd = fopen(TQFile::encodeName(new_group_filename), "w")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(new_group_filename) ); KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_group_filename) );
return false; return false;
} }
} }
if(!gshadow_filename.isEmpty()) { if(!gshadow_filename.isEmpty()) {
if((gshadow_fd = fopen(TQFile::encodeName(new_gshadow_filename), "w")) == NULL) { if((gshadow_fd = fopen(TQFile::encodeName(new_gshadow_filename), "w")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(new_gshadow_filename) ); KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_gshadow_filename) );
if ( group_fd ) fclose ( group_fd ); if ( group_fd ) fclose ( group_fd );
return false; return false;
} }
@ -248,7 +248,7 @@ bool KGroupFiles::save()
if(!nisgroup_filename.isEmpty() && (nisgroup_filename != group_filename)) { if(!nisgroup_filename.isEmpty() && (nisgroup_filename != group_filename)) {
if((nisgroup_fd = fopen(TQFile::encodeName(new_nisgroup_filename), "w")) == NULL) { if((nisgroup_fd = fopen(TQFile::encodeName(new_nisgroup_filename), "w")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(new_nisgroup_filename) ); KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_nisgroup_filename) );
if ( group_fd ) fclose ( group_fd ); if ( group_fd ) fclose ( group_fd );
if ( gshadow_fd ) fclose ( gshadow_fd ); if ( gshadow_fd ) fclose ( gshadow_fd );
return false; return false;

@ -548,24 +548,24 @@ int KU::KUser::createHome()
{ {
if(p_dir.isNull() || p_dir.isEmpty()) { if(p_dir.isNull() || p_dir.isEmpty()) {
KMessageBox::sorry( 0, i18n("Cannot create home folder for %1: it is null or empty.").tqarg(p_name) ); KMessageBox::sorry( 0, i18n("Cannot create home folder for %1: it is null or empty.").arg(p_name) );
return(0); return(0);
} }
if (mkdir(TQFile::encodeName(p_dir), 0700) != 0) { if (mkdir(TQFile::encodeName(p_dir), 0700) != 0) {
if (errno != EEXIST) if (errno != EEXIST)
{ {
KMessageBox::error( 0, i18n("Cannot create home folder %1.\nError: %2").tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); KMessageBox::error( 0, i18n("Cannot create home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
return(0); return(0);
} }
} }
if (chown(TQFile::encodeName(p_dir), p_uid, p_gid) != 0) { if (chown(TQFile::encodeName(p_dir), p_uid, p_gid) != 0) {
KMessageBox::error( 0, i18n("Cannot change owner of home folder %1.\nError: %2").tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); KMessageBox::error( 0, i18n("Cannot change owner of home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
return(1); return(1);
} }
if (chmod(TQFile::encodeName(p_dir), KU_HOMEDIR_PERM) != 0) { if (chmod(TQFile::encodeName(p_dir), KU_HOMEDIR_PERM) != 0) {
KMessageBox::error( 0, i18n("Cannot change permissions on home folder %1.\nError: %2").tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); KMessageBox::error( 0, i18n("Cannot change permissions on home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
return(1); return(1);
} }
return(1); return(1);
@ -580,33 +580,33 @@ int KU::KUser::tryCreate(const TQString &dir)
if (rc == 0) { if (rc == 0) {
if (S_ISDIR(sb.st_mode)) { if (S_ISDIR(sb.st_mode)) {
if (KMessageBox::warningContinueCancel( 0, if (KMessageBox::warningContinueCancel( 0,
i18n("Folder %1 already exists!\nWill make %2 owner and change permissions.\nDo you want to continue?").tqarg(dir).tqarg(p_name), i18n("Folder %1 already exists!\nWill make %2 owner and change permissions.\nDo you want to continue?").arg(dir).arg(p_name),
TQString(), KStdGuiItem::cont() ) == KMessageBox::Continue) { TQString(), KStdGuiItem::cont() ) == KMessageBox::Continue) {
if (chown(TQFile::encodeName(dir), p_uid, p_gid) != 0) { if (chown(TQFile::encodeName(dir), p_uid, p_gid) != 0) {
KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2") .tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2") .arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
} }
return(0); return(0);
} else { } else {
KMessageBox::information( 0, i18n("Folder %1 left 'as is'.\nVerify ownership and permissions for user %2 who may not be able to log in!").tqarg(dir).tqarg(p_name) ); KMessageBox::information( 0, i18n("Folder %1 left 'as is'.\nVerify ownership and permissions for user %2 who may not be able to log in!").arg(dir).arg(p_name) );
return(-1); return(-1);
} }
} else { } else {
KMessageBox::information( 0, i18n("%1 exists and is not a folder. User %2 will not be able to log in!").tqarg(dir).tqarg(p_name) ); KMessageBox::information( 0, i18n("%1 exists and is not a folder. User %2 will not be able to log in!").arg(dir).arg(p_name) );
return(-1); return(-1);
} }
} else { } else {
if (errno == ENOENT) { if (errno == ENOENT) {
if (mkdir(TQFile::encodeName(dir), 0700) != 0) { if (mkdir(TQFile::encodeName(dir), 0700) != 0) {
KMessageBox::error( 0, i18n("Cannot create %1 folder.\nError: %2").tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno)))); KMessageBox::error( 0, i18n("Cannot create %1 folder.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))));
return(-1); return(-1);
} }
if (chown(TQFile::encodeName(dir), p_uid, p_gid) != 0) { if (chown(TQFile::encodeName(dir), p_uid, p_gid) != 0) {
KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2").tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
} }
return(0); return(0);
} else { } else {
KMessageBox::error( 0, i18n("stat call on %1 failed.\nError: %2").tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); KMessageBox::error( 0, i18n("stat call on %1 failed.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
return(-1); return(-1);
} }
} }
@ -622,8 +622,8 @@ int KU::KUser::createMailBox()
if (errno != EEXIST) if (errno != EEXIST)
{ {
KMessageBox::error( 0, i18n("Cannot create %1: %2") KMessageBox::error( 0, i18n("Cannot create %1: %2")
.tqarg(mailboxpath) .arg(mailboxpath)
.tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(TQString::fromLocal8Bit(strerror(errno))) );
return -1; return -1;
} }
} }
@ -632,13 +632,13 @@ int KU::KUser::createMailBox()
if (chown(TQFile::encodeName(mailboxpath), p_uid, KU_MAILBOX_GID) != 0) { if (chown(TQFile::encodeName(mailboxpath), p_uid, KU_MAILBOX_GID) != 0) {
KMessageBox::error( 0, i18n("Cannot change owner on mailbox: %1\nError: %2") KMessageBox::error( 0, i18n("Cannot change owner on mailbox: %1\nError: %2")
.tqarg(mailboxpath).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(mailboxpath).arg(TQString::fromLocal8Bit(strerror(errno))) );
return -1; return -1;
} }
if (chmod(TQFile::encodeName(mailboxpath), KU_MAILBOX_PERM) != 0) { if (chmod(TQFile::encodeName(mailboxpath), KU_MAILBOX_PERM) != 0) {
KMessageBox::error( 0, i18n("Cannot change permissions on mailbox: %1\nError: %2") KMessageBox::error( 0, i18n("Cannot change permissions on mailbox: %1\nError: %2")
.tqarg(mailboxpath).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(mailboxpath).arg(TQString::fromLocal8Bit(strerror(errno))) );
return -1; return -1;
} }
@ -683,7 +683,7 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath)
if (symlink(TQFile::encodeName(link),TQFile::encodeName(d.filePath(name))) != 0) { if (symlink(TQFile::encodeName(link),TQFile::encodeName(d.filePath(name))) != 0) {
KMessageBox::error( 0, i18n("Error creating symlink %1.\nError: %2") KMessageBox::error( 0, i18n("Error creating symlink %1.\nError: %2")
.tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
} }
} else if ( info.isDir() ) { } else if ( info.isDir() ) {
TQDir dir(filename); TQDir dir(filename);
@ -693,12 +693,12 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath)
if (chown(TQFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) { if (chown(TQFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) {
KMessageBox::error( 0, i18n("Cannot change owner of folder %1.\nError: %2") KMessageBox::error( 0, i18n("Cannot change owner of folder %1.\nError: %2")
.tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
} }
if (chmod(TQFile::encodeName(d.filePath(name)), mode) != 0) { if (chmod(TQFile::encodeName(d.filePath(name)), mode) != 0) {
KMessageBox::error( 0, i18n("Cannot change permissions on folder %1.\nError: %2") KMessageBox::error( 0, i18n("Cannot change permissions on folder %1.\nError: %2")
.tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
} }
} else { } else {
@ -708,12 +708,12 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath)
if (chown(TQFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) { if (chown(TQFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) {
KMessageBox::error( 0, i18n("Cannot change owner of file %1.\nError: %2") KMessageBox::error( 0, i18n("Cannot change owner of file %1.\nError: %2")
.tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
} }
if (chmod(TQFile::encodeName(d.filePath(name)), mode) != 0) { if (chmod(TQFile::encodeName(d.filePath(name)), mode) != 0) {
KMessageBox::error( 0, i18n("Cannot change permissions on file %1.\nError: %2") KMessageBox::error( 0, i18n("Cannot change permissions on file %1.\nError: %2")
.tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
} }
} }
} }
@ -726,12 +726,12 @@ int KU::KUser::copySkel()
mode_t mode; mode_t mode;
if (!s.exists()) { if (!s.exists()) {
KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton for %2.").tqarg(s.absPath()).tqarg(p_name) ); KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton for %2.").arg(s.absPath()).arg(p_name) );
return (-1); return (-1);
} }
if (!d.exists()) { if (!d.exists()) {
KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton.").tqarg(d.absPath()) ); KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton.").arg(d.absPath()) );
return (-1); return (-1);
} }
@ -750,14 +750,14 @@ int KU::KUser::removeHome()
if (S_ISDIR(sb.st_mode) && sb.st_uid == p_uid) { if (S_ISDIR(sb.st_mode) && sb.st_uid == p_uid) {
if (!KIO::NetAccess::del(KURL::fromPathOrURL(p_dir))) { if (!KIO::NetAccess::del(KURL::fromPathOrURL(p_dir))) {
KMessageBox::error( 0, i18n("Cannot remove home folder %1.\nError: %2") KMessageBox::error( 0, i18n("Cannot remove home folder %1.\nError: %2")
.tqarg(p_dir).tqarg(KIO::NetAccess::lastErrorString()) ); .arg(p_dir).arg(KIO::NetAccess::lastErrorString()) );
} }
} else { } else {
KMessageBox::error( 0, i18n("Removal of home folder %1 failed (uid = %2, gid = %3).").tqarg(p_dir).tqarg(sb.st_uid).tqarg(sb.st_gid) ); KMessageBox::error( 0, i18n("Removal of home folder %1 failed (uid = %2, gid = %3).").arg(p_dir).arg(sb.st_uid).arg(sb.st_gid) );
} }
else { else {
KMessageBox::error( 0, i18n("stat call on file %1 failed.\nError: %2") KMessageBox::error( 0, i18n("stat call on file %1 failed.\nError: %2")
.tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
} }
return 0; return 0;
@ -772,10 +772,10 @@ int KU::KUser::removeCrontabs()
file = TQFile::decodeName(CRONTAB_DIR) + "/" + p_name; file = TQFile::decodeName(CRONTAB_DIR) + "/" + p_name;
if ( access(TQFile::encodeName(file), F_OK) == 0 ) { if ( access(TQFile::encodeName(file), F_OK) == 0 ) {
command = TQString::fromLatin1("crontab -u %1 -r").tqarg(KProcess::quote(p_name)); command = TQString::fromLatin1("crontab -u %1 -r").arg(KProcess::quote(p_name));
if ( system(TQFile::encodeName(command)) != 0 ) { if ( system(TQFile::encodeName(command)) != 0 ) {
KMessageBox::error( 0, i18n("Cannot remove crontab %1.\nError: %2") KMessageBox::error( 0, i18n("Cannot remove crontab %1.\nError: %2")
.tqarg(command).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(command).arg(TQString::fromLocal8Bit(strerror(errno))) );
} }
} }
@ -789,7 +789,7 @@ int KU::KUser::removeMailBox()
file = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + p_name; file = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + p_name;
if (remove(TQFile::encodeName(file)) != 0) { if (remove(TQFile::encodeName(file)) != 0) {
KMessageBox::error( 0, i18n("Cannot remove mailbox %1.\nError: %2") KMessageBox::error( 0, i18n("Cannot remove mailbox %1.\nError: %2")
.tqarg(file).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); .arg(file).arg(TQString::fromLocal8Bit(strerror(errno))) );
} }
return 0; return 0;
@ -808,7 +808,7 @@ int KU::KUser::removeProcesses()
break; break;
case -1: case -1:
KMessageBox::error( 0, KMessageBox::error( 0,
i18n("Cannot fork while trying to kill processes for uid %1.").tqarg(p_uid) ); i18n("Cannot fork while trying to kill processes for uid %1.").arg(p_uid) );
break; break;
} }

@ -115,7 +115,7 @@ bool KUserFiles::loadpwd()
mCfg->setPasswdsrc( PASSWORD_FILE ); mCfg->setPasswdsrc( PASSWORD_FILE );
mCfg->setGroupsrc( GROUP_FILE ); mCfg->setGroupsrc( GROUP_FILE );
passwd_filename = mCfg->passwdsrc(); passwd_filename = mCfg->passwdsrc();
KMessageBox::error( 0, i18n("KUser sources were not configured.\nLocal passwd source set to %1\nLocal group source set to %2.").tqarg(mCfg->passwdsrc().tqarg(mCfg->groupsrc())) ); KMessageBox::error( 0, i18n("KUser sources were not configured.\nLocal passwd source set to %1\nLocal group source set to %2.").arg(mCfg->passwdsrc().arg(mCfg->groupsrc())) );
} }
if(!passwd_filename.isEmpty()) { if(!passwd_filename.isEmpty()) {
@ -128,7 +128,7 @@ bool KUserFiles::loadpwd()
for(int i = 0; i < MAXFILES; i++) { for(int i = 0; i < MAXFILES; i++) {
rc = stat(TQFile::encodeName(filename), &st); rc = stat(TQFile::encodeName(filename), &st);
if(rc != 0) { if(rc != 0) {
KMessageBox::error( 0, i18n("Stat call on file %1 failed: %2\nCheck KUser settings.").tqarg(filename).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); KMessageBox::error( 0, i18n("Stat call on file %1 failed: %2\nCheck KUser settings.").arg(filename).arg(TQString::fromLocal8Bit(strerror(errno))) );
if( (processing_file & P_PASSWD) != 0 ) { if( (processing_file & P_PASSWD) != 0 ) {
passwd_errno = errno; passwd_errno = errno;
if(!nispasswd_filename.isEmpty()) { if(!nispasswd_filename.isEmpty()) {
@ -155,7 +155,7 @@ bool KUserFiles::loadpwd()
#ifdef HAVE_FGETPWENT #ifdef HAVE_FGETPWENT
FILE *fpwd = fopen(TQFile::encodeName(filename), "r"); FILE *fpwd = fopen(TQFile::encodeName(filename), "r");
if(fpwd == NULL) { if(fpwd == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for reading.").tqarg(filename) ); KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) );
return FALSE; return FALSE;
} }
@ -238,7 +238,7 @@ bool KUserFiles::loadsdw()
FILE *f; FILE *f;
kdDebug() << "open shadow file: " << shadow_file << endl; kdDebug() << "open shadow file: " << shadow_file << endl;
if ((f = fopen( TQFile::encodeName(shadow_file), "r")) == NULL) { if ((f = fopen( TQFile::encodeName(shadow_file), "r")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for reading.").tqarg(shadow_file) ); KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(shadow_file) );
caps &= ~Cap_Shadow; caps &= ~Cap_Shadow;
return TRUE; return TRUE;
} }
@ -250,7 +250,7 @@ bool KUserFiles::loadsdw()
kdDebug() << "shadow entry: " << spw->sp_namp << endl; kdDebug() << "shadow entry: " << spw->sp_namp << endl;
if ((up = lookup(TQString::fromLocal8Bit(spw->sp_namp))) == NULL) { if ((up = lookup(TQString::fromLocal8Bit(spw->sp_namp))) == NULL) {
KMessageBox::error( 0, i18n("No /etc/passwd entry for %1.\nEntry will be removed at the next `Save'-operation.").tqarg(TQString::fromLocal8Bit(spw->sp_namp)) ); KMessageBox::error( 0, i18n("No /etc/passwd entry for %1.\nEntry will be removed at the next `Save'-operation.").arg(TQString::fromLocal8Bit(spw->sp_namp)) );
continue; continue;
} }
@ -343,13 +343,13 @@ bool KUserFiles::savepwd()
if(!passwd_filename.isEmpty()) { if(!passwd_filename.isEmpty()) {
if ((passwd_fd = if ((passwd_fd =
fopen(TQFile::encodeName(new_passwd_filename),"w")) == NULL) fopen(TQFile::encodeName(new_passwd_filename),"w")) == NULL)
KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(passwd_filename) ); KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(passwd_filename) );
} }
if(!nispasswd_filename.isEmpty() && (nispasswd_filename != passwd_filename)){ if(!nispasswd_filename.isEmpty() && (nispasswd_filename != passwd_filename)){
if ((nispasswd_fd = if ((nispasswd_fd =
fopen(TQFile::encodeName(new_nispasswd_filename),"w")) == NULL) fopen(TQFile::encodeName(new_nispasswd_filename),"w")) == NULL)
KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(nispasswd_filename) ); KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(nispasswd_filename) );
} }
TQPtrListIterator<KU::KUser> it( mUsers ); TQPtrListIterator<KU::KUser> it( mUsers );
@ -523,7 +523,7 @@ bool KUserFiles::savesdw()
} }
if ((f = fopen(TQFile::encodeName(new_shadow_file), "w")) == NULL) { if ((f = fopen(TQFile::encodeName(new_shadow_file), "w")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(new_shadow_file) ); KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_shadow_file) );
return FALSE; return FALSE;
} }

@ -373,10 +373,10 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
if ( cn.isEmpty() ) cn = user->getName(); if ( cn.isEmpty() ) cn = user->getName();
gecos = TQString::fromLatin1("%1,%2,%3,%4") gecos = TQString::fromLatin1("%1,%2,%3,%4")
.tqarg(user->getFullName()) .arg(user->getFullName())
.tqarg(user->getOffice1()) .arg(user->getOffice1())
.tqarg(user->getOffice2()) .arg(user->getOffice2())
.tqarg(user->getAddress()); .arg(user->getAddress());
samflags = "[U"; samflags = "[U";
samflags += user->getDisabled() ? 'D' : ' '; samflags += user->getDisabled() ? 'D' : ' ';

@ -45,7 +45,7 @@ int KUserViewItem::compare( TQListViewItem *i, int col, bool ascending ) const
} }
void KUserViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, void KUserViewItem::paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int tqalignment ) int column, int width, int alignment )
{ {
TQColorGroup _cg( cg ); TQColorGroup _cg( cg );
TQColor c = _cg.text(); TQColor c = _cg.text();
@ -53,7 +53,7 @@ void KUserViewItem::paintCell( TQPainter *p, const TQColorGroup &cg,
if ( mUser->getDisabled() ) if ( mUser->getDisabled() )
_cg.setColor( TQColorGroup::Text, KGlobalSettings::visitedLinkColor() ); _cg.setColor( TQColorGroup::Text, KGlobalSettings::visitedLinkColor() );
KListViewItem::paintCell( p, _cg, column, width, tqalignment ); KListViewItem::paintCell( p, _cg, column, width, alignment );
_cg.setColor( TQColorGroup::Text, c ); _cg.setColor( TQColorGroup::Text, c );
} }

@ -35,7 +35,7 @@ public:
private: private:
virtual TQString text ( int ) const; virtual TQString text ( int ) const;
virtual void paintCell( TQPainter *p, const TQColorGroup &cg, virtual void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int tqalignment ); int column, int width, int alignment );
virtual int compare( TQListViewItem *i, int col, bool ascending ) const; virtual int compare( TQListViewItem *i, int col, bool ascending ) const;
KU::KUser *mUser; KU::KUser *mUser;
}; };

@ -165,7 +165,7 @@ void mainView::userdel()
if ( group && if ( group &&
KMessageBox::questionYesNo( 0, i18n("You are using private groups.\n" KMessageBox::questionYesNo( 0, i18n("You are using private groups.\n"
"Do you want to delete the user's private group '%1'?") "Do you want to delete the user's private group '%1'?")
.tqarg(group->getName()), TQString(), .arg(group->getName()), TQString(),
KStdGuiItem::del(), i18n("Do Not Delete")) == KMessageBox::Yes) { KStdGuiItem::del(), i18n("Do Not Delete")) == KMessageBox::Yes) {
kdDebug() << "del private group" << endl; kdDebug() << "del private group" << endl;
kug->getGroups().del( group ); kug->getGroups().del( group );
@ -203,7 +203,7 @@ void mainView::useradd()
if ( !ok ) return; if ( !ok ) return;
if ( kug->getUsers().lookup( name ) ) { if ( kug->getUsers().lookup( name ) ) {
KMessageBox::sorry( 0, i18n("User with name %1 already exists.").tqarg( name ) ); KMessageBox::sorry( 0, i18n("User with name %1 already exists.").arg( name ) );
return; return;
} }
@ -305,7 +305,7 @@ void mainView::setpwd()
if ( count > 1 ) { if ( count > 1 ) {
if ( KMessageBox::questionYesNo( 0, if ( KMessageBox::questionYesNo( 0,
i18n("You have selected %1 users. Do you really want to change the password for all the selected users?") i18n("You have selected %1 users. Do you really want to change the password for all the selected users?")
.tqarg( count ), TQString(), i18n("Change"), i18n("Do Not Change") ) == KMessageBox::No ) return; .arg( count ), TQString(), i18n("Change"), i18n("Do Not Change") ) == KMessageBox::No ) return;
} }
pwddlg d( this ); pwddlg d( this );
if ( d.exec() != TQDialog::Accepted ) return; if ( d.exec() != TQDialog::Accepted ) return;
@ -444,7 +444,7 @@ void mainView::grpdel()
KU::KUser *user = kug->getUsers().first(); KU::KUser *user = kug->getUsers().first();
while ( user ) { while ( user ) {
if ( user->getGID() == group->getGID() ) { if ( user->getGID() == group->getGID() ) {
KMessageBox::error( 0, i18n( "The group '%1' is the primary group of one or more users (such as '%2'); it cannot be deleted." ).tqarg( group->getName() ).tqarg( user->getName() ) ); KMessageBox::error( 0, i18n( "The group '%1' is the primary group of one or more users (such as '%2'); it cannot be deleted." ).arg( group->getName() ).arg( user->getName() ) );
return; return;
} }
user = kug->getUsers().next(); user = kug->getUsers().next();
@ -457,12 +457,12 @@ void mainView::grpdel()
case 0: return; case 0: return;
case 1: case 1:
if (KMessageBox::warningContinueCancel( 0, if (KMessageBox::warningContinueCancel( 0,
i18n("Do you really want to delete the group '%1'?").tqarg(group->getName()), i18n("Do you really want to delete the group '%1'?").arg(group->getName()),
TQString(), KStdGuiItem::del()) != KMessageBox::Continue) return; TQString(), KStdGuiItem::del()) != KMessageBox::Continue) return;
break; break;
default: default:
if (KMessageBox::warningContinueCancel( 0, if (KMessageBox::warningContinueCancel( 0,
i18n("Do you really want to delete the %1 selected groups?").tqarg(selected), i18n("Do you really want to delete the %1 selected groups?").arg(selected),
TQString(), KStdGuiItem::del()) != KMessageBox::Continue) return; TQString(), KStdGuiItem::del()) != KMessageBox::Continue) return;
} }

@ -43,7 +43,7 @@ bool backup(const TQString & name)
if (copyFile(TQFile::encodeName(name), TQFile::encodeName(tmp)) == -1) if (copyFile(TQFile::encodeName(name), TQFile::encodeName(tmp)) == -1)
{ {
TQString str; TQString str;
KMessageBox::error( 0, i18n("Can't create backup file for %1").tqarg(name) ); KMessageBox::error( 0, i18n("Can't create backup file for %1").arg(name) );
return false; return false;
} }
return true; return true;
@ -68,17 +68,17 @@ int copyFile(const TQString & from, const TQString & to)
fo.setName(to); fo.setName(to);
if (!fi.exists()) { if (!fi.exists()) {
KMessageBox::error( 0, i18n("File %1 does not exist.").tqarg(from) ); KMessageBox::error( 0, i18n("File %1 does not exist.").arg(from) );
return (-1); return (-1);
} }
if (!fi.open(IO_ReadOnly)) { if (!fi.open(IO_ReadOnly)) {
KMessageBox::error( 0, i18n("Cannot open file %1 for reading.").tqarg(from) ); KMessageBox::error( 0, i18n("Cannot open file %1 for reading.").arg(from) );
return (-1); return (-1);
} }
if (!fo.open(IO_Raw | IO_WriteOnly | IO_Truncate)) { if (!fo.open(IO_Raw | IO_WriteOnly | IO_Truncate)) {
KMessageBox::error( 0, i18n("Cannot open file %1 for writing.").tqarg(to) ); KMessageBox::error( 0, i18n("Cannot open file %1 for writing.").arg(to) );
return (-1); return (-1);
} }

@ -39,7 +39,7 @@
<property name="text"> <property name="text">
<string>Time before password expires to issue an expire warning:</string> <string>Time before password expires to issue an expire warning:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -53,7 +53,7 @@
<property name="text"> <property name="text">
<string>Time when password expires after last password change:</string> <string>Time when password expires after last password change:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -67,7 +67,7 @@
<property name="text"> <property name="text">
<string>Time when account will be disabled after expiration of password:</string> <string>Time when account will be disabled after expiration of password:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -115,7 +115,7 @@
<property name="text"> <property name="text">
<string>Time before password may not be changed after last password change:</string> <string>Time before password may not be changed after last password change:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">

@ -346,7 +346,7 @@ propdlg::propdlg( const TQPtrList<KU::KUser> &users,
{ {
mUsers = users; mUsers = users;
if ( mUsers.getFirst() != mUsers.getLast() ) if ( mUsers.getFirst() != mUsers.getLast() )
setCaption( i18n("User Properties - %1 Selected Users").tqarg( mUsers.count() ) ); setCaption( i18n("User Properties - %1 Selected Users").arg( mUsers.count() ) );
initDlg(); initDlg();
loadgroups( false ); loadgroups( false );
selectuser(); selectuser();
@ -658,14 +658,14 @@ void propdlg::setpgroup()
{ {
item->setEnabled(true); item->setEnabled(true);
item->setOn(prevPrimaryGroupWasOn); item->setOn(prevPrimaryGroupWasOn);
item->tqrepaint(); item->repaint();
} }
if ( groupName == primaryGroup ) if ( groupName == primaryGroup )
{ {
primaryGroupWasOn = item->isOn(); primaryGroupWasOn = item->isOn();
item->setEnabled(false); item->setEnabled(false);
item->setOn(true); item->setOn(true);
item->tqrepaint(); item->repaint();
} }
item = (TQCheckListItem *) item->nextSibling(); item = (TQCheckListItem *) item->nextSibling();
@ -941,7 +941,7 @@ void propdlg::slotOk()
{ {
if (kug->getUsers().lookup(newuid)) { if (kug->getUsers().lookup(newuid)) {
KMessageBox::sorry( 0, KMessageBox::sorry( 0,
i18n("User with UID %1 already exists").tqarg(newuid) ); i18n("User with UID %1 already exists").arg(newuid) );
return; return;
} }
} }
@ -951,7 +951,7 @@ void propdlg::slotOk()
if ( oldrid != newrid ) { if ( oldrid != newrid ) {
if (kug->getUsers().lookup_sam(newrid)) { if (kug->getUsers().lookup_sam(newrid)) {
KMessageBox::sorry( 0, KMessageBox::sorry( 0,
i18n("User with RID %1 already exists").tqarg(newrid) ); i18n("User with RID %1 already exists").arg(newrid) );
return; return;
} }
} }
@ -968,7 +968,7 @@ void propdlg::slotOk()
i18n("<p>The shell %1 is not yet listed in the file %2. " i18n("<p>The shell %1 is not yet listed in the file %2. "
"In order to use this shell you must add it to " "In order to use this shell you must add it to "
"this file first." "this file first."
"<p>Do you want to add it now?").tqarg(newshell).tqarg(TQFile::decodeName(SHELL_FILE)), "<p>Do you want to add it now?").arg(newshell).arg(TQFile::decodeName(SHELL_FILE)),
i18n("Unlisted Shell"), i18n("Unlisted Shell"),
i18n("&Add Shell"), i18n("&Add Shell"),
i18n("Do &Not Add")); i18n("Do &Not Add"));

@ -59,7 +59,7 @@ public:
void copy() const { line->copy(); }; void copy() const { line->copy(); };
void paste() { line->paste(); }; void paste() { line->paste(); };
void setAlignment(int flag) { line->setAlignment(flag); }; void setAlignment(int flag) { line->setAlignment(flag); };
int tqalignment() const { return line->tqalignment(); }; int alignment() const { return line->alignment(); };
void cursorLeft(bool mark, int steps=1) { line->cursorLeft(mark, steps); }; void cursorLeft(bool mark, int steps=1) { line->cursorLeft(mark, steps); };
void cursorRight(bool mark, int steps=1) { line->cursorRight(mark, steps); }; void cursorRight(bool mark, int steps=1) { line->cursorRight(mark, steps); };
void cursorWordForward(bool mark) { line->cursorWordForward(mark); }; void cursorWordForward(bool mark) { line->cursorWordForward(mark); };

Loading…
Cancel
Save