rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 9b8c9f1f9e
commit 6335dc5580

@ -297,7 +297,7 @@ void Arch::slotReceivedTOC( KProcess*, char* data, int length )
{
processLine( m_buffer );
}
else if ( m_buffer.tqfind( m_headerString.data() ) == -1 )
else if ( m_buffer.find( m_headerString.data() ) == -1 )
{
if ( m_header_removed && !m_finished )
{

@ -56,7 +56,7 @@ ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * tqparent, const TQString & defaul
TQStringList list = ArchiveFormatInfo::self()->allDescriptions();
list.sort();
m_combo->insertStringList( list );
m_combo->setCurrentItem( list.tqfindIndex( defaultDescription ) );
m_combo->setCurrentItem( list.findIndex( defaultDescription ) );
}
TQString ArchiveFormatDlg::mimeType()

@ -72,7 +72,7 @@ void ArchiveFormatInfo::buildFormatInfos()
addFormatInfo( COMPRESSED_FORMAT, "application/x-xz", ".xz" );
addFormatInfo( COMPRESSED_FORMAT, "application/x-lzop", ".lzo" );
addFormatInfo( COMPRESSED_FORMAT, "application/x-compress", ".Z" );
tqfind( COMPRESSED_FORMAT ).description = i18n( "Compressed File" );
find( COMPRESSED_FORMAT ).description = i18n( "Compressed File" );
addFormatInfo( ZOO_FORMAT, "application/x-zoo", ".zoo" );
@ -90,7 +90,7 @@ void ArchiveFormatInfo::buildFormatInfos()
void ArchiveFormatInfo::addFormatInfo( ArchType type, TQString mime, TQString stdExt )
{
FormatInfo & info = tqfind( type );
FormatInfo & info = find( type );
KDesktopFile * desktopFile = new KDesktopFile( mime + ".desktop", true, "mime" );
if( !desktopFile )
@ -146,7 +146,7 @@ TQStringList ArchiveFormatInfo::allDescriptions()
return descriptions;
}
ArchiveFormatInfo::FormatInfo & ArchiveFormatInfo::tqfind( ArchType type )
ArchiveFormatInfo::FormatInfo & ArchiveFormatInfo::find( ArchType type )
{
InfoList::Iterator it = m_formatInfos.begin();
for( ; it != m_formatInfos.end(); ++it )
@ -177,7 +177,7 @@ ArchType ArchiveFormatInfo::archTypeForMimeType( const TQString & mimeType )
InfoList::Iterator it = m_formatInfos.begin();
for( ; it != m_formatInfos.end(); ++it )
{
int index = (*it).mimeTypes.tqfindIndex( mimeType );
int index = (*it).mimeTypes.findIndex( mimeType );
if( index != -1 )
return (*it).type;
}
@ -243,7 +243,7 @@ TQString ArchiveFormatInfo::mimeTypeForDescription( const TQString & description
int index;
for( ; it != m_formatInfos.end(); ++it )
{
index = (*it).allDescriptions.tqfindIndex( description );
index = (*it).allDescriptions.findIndex( description );
if ( index != -1 )
return (* (*it).mimeTypes.at( index ) );
}
@ -256,7 +256,7 @@ TQString ArchiveFormatInfo::descriptionForMimeType( const TQString & mimeType )
int index;
for( ; it != m_formatInfos.end(); ++it )
{
index = (*it).mimeTypes.tqfindIndex( mimeType );
index = (*it).mimeTypes.findIndex( mimeType );
if ( index != -1 )
return (* (*it).allDescriptions.at( index ) );
}
@ -269,7 +269,7 @@ TQString ArchiveFormatInfo::defaultExtension( const TQString & mimeType )
int index;
for( ; it != m_formatInfos.end(); ++it )
{
index = (*it).mimeTypes.tqfindIndex( mimeType );
index = (*it).mimeTypes.findIndex( mimeType );
if ( index != -1 )
return (* (*it).defaultExtensions.at( index ) );
}

@ -59,7 +59,7 @@ private:
enum ArchType type;
};
FormatInfo & tqfind ( ArchType type );
FormatInfo & find ( ArchType type );
typedef TQValueList<FormatInfo> InfoList;
InfoList m_formatInfos;

@ -85,7 +85,7 @@ static TQString resolveFilename(const TQString & _arkname)
if (name.at(0) != '/')
{
// copy the path from _arkname
int index = _arkname.tqfindRev('/');
int index = _arkname.findRev('/');
name = _arkname.left(index + 1) + name;
}
kdDebug(1601) << "Now resolve " << name << endl;
@ -243,7 +243,7 @@ ArkApplication::addOpenArk(const KURL & _arkname, MainWindow *_ptr)
else
realName = _arkname.prettyURL();
openArksList.append(realName);
m_windowsHash.tqreplace(realName, _ptr);
m_windowsHash.replace(realName, _ptr);
kdDebug(1601) << "Saved ptr " << _ptr << " added open ark: " << realName << endl;
}
@ -287,7 +287,7 @@ ArkApplication::isArkOpenAlready(const KURL & _arkname)
realName = resolveFilename(_arkname.path()); // follow symlink
else
realName = _arkname.prettyURL();
return ( openArksList.tqfindIndex(realName) != -1 );
return ( openArksList.findIndex(realName) != -1 );
}
#include "arkapp.moc"

@ -101,7 +101,7 @@ TQString ArkUtils::getTimeStamp(const TQString &_month,
TQString year, timestamp;
if (_yearOrTime.tqcontains(":"))
if (_yearOrTime.contains(":"))
// it has a timestamp so we have to figure out the year
{
year.sprintf("%d", ArkUtils::getYear(nMonth, thisYear, thisMonth));

@ -453,7 +453,7 @@ ArkWidget::guessName( const KURL &archive )
ext = (*it).remove( '*' );
if ( fileName.endsWith( ext ) )
{
fileName = fileName.left( fileName.tqfindRev( ext ) );
fileName = fileName.left( fileName.findRev( ext ) );
break;
}
}
@ -1204,7 +1204,7 @@ ArkWidget::toLocalFile( const KURL& url )
TQString strURL = url.prettyURL();
TQString tempfile = tmpDir();
tempfile += strURL.right(strURL.length() - strURL.tqfindRev("/") - 1);
tempfile += strURL.right(strURL.length() - strURL.findRev("/") - 1);
deleteAfterUse(tempfile); // remember for deletion
KURL tempurl; tempurl.setPath( tempfile );
if( !KIO::NetAccess::dircopy(url, tempurl, this) )
@ -1643,10 +1643,10 @@ ArkWidget::slotEditFinished(KProcess *kp)
TQStringList::Iterator it = list.begin();
TQString filename = *it;
TQString path;
if (filename.tqcontains('/') > 3)
if (filename.contains('/') > 3)
{
kdDebug(1601) << "Filename is originally: " << filename << endl;
int i = filename.tqfind('/', 5);
int i = filename.find('/', 5);
path = filename.left(1+i);
kdDebug(1601) << "Changing to dir: " << path << endl;
TQDir::setCurrent(path);
@ -1734,7 +1734,7 @@ ArkWidget::showCurrentFile()
TQString fullname = tmpDir();
fullname += name;
if(fullname.tqcontains("../"))
if(fullname.contains("../"))
fullname.remove("../");
//Convert the TQString filename to KURL to escape the bad characters

@ -289,7 +289,7 @@ void CompressedFile::addFile( const TQStringList &urls )
proc.start(KProcess::Block);
m_tmpfile = file.right(file.length()
- file.tqfindRev("/")-1);
- file.findRev("/")-1);
m_tmpfile = m_tmpdir + '/' + m_tmpfile;
kdDebug(1601) << "Temp file name is " << m_tmpfile << endl;

@ -129,7 +129,7 @@ void FileLVI::setText( int column, const TQString &text )
name = name.left( name.length() - 1 );
if ( name.startsWith( "/" ) )
name = name.mid( 1 );
int pos = name.tqfindRev( '/' );
int pos = name.findRev( '/' );
if ( pos != -1 )
name = name.right( name.length() - pos - 1 );
TQListViewItem::setText( column, name );
@ -242,7 +242,7 @@ void FileListView::removeColumn( int index )
{
for ( unsigned int i = index; i < m_columnMap.count() - 2; i++ )
{
m_columnMap.tqreplace( i, m_columnMap[ i + 1 ] );
m_columnMap.replace( i, m_columnMap[ i + 1 ] );
}
m_columnMap.remove( m_columnMap[ m_columnMap.count() - 1 ] );
@ -509,11 +509,11 @@ FileLVI* FileListView::findParent( const TQString& fullname )
if ( name.startsWith( "/" ) )
name = name.mid( 1 );
// Checks if this entry needs a tqparent
if ( !name.tqcontains( '/' ) )
if ( !name.contains( '/' ) )
return static_cast< FileLVI* >( 0 );
// Get a list of ancestors
TQString parentFullname = name.left( name.tqfindRev( '/' ) );
TQString parentFullname = name.left( name.findRev( '/' ) );
TQStringList ancestorList = TQStringList::split( '/', parentFullname );
// Checks if the listview contains the first item in the list of ancestors

@ -67,7 +67,7 @@ bool LhaArch::processLine( const TQCString &line )
char columns[13][80];
char filename[4096];
if ( line.tqcontains( "[generic]" ) )
if ( line.contains( "[generic]" ) )
{
sscanf( _line,
" %79[]\\[generic] %79[0-9] %79[0-9] %79[0-9.%*] %10[-a-z0-9 ] %3[A-Za-z]%1[ ]%2[0-9 ]%1[ ]%5[ 0-9:]%1[ ]%4095[^\n]",
@ -76,7 +76,7 @@ bool LhaArch::processLine( const TQCString &line )
columns[9], filename );
strcpy( columns[1], " " );
}
else if ( line.tqcontains( "[MS-DOS]" ) )
else if ( line.contains( "[MS-DOS]" ) )
{
sscanf( _line,
" %79[]\\[MS-DOS] %79[0-9] %79[0-9] %79[0-9.%*] %10[-a-z0-9 ] %3[A-Za-z]%1[ ]%2[0-9 ]%1[ ]%5[ 0-9:]%1[ ]%4095[^\n]",
@ -103,7 +103,7 @@ bool LhaArch::processLine( const TQCString &line )
TQString file = filename;
TQString name, link;
bool bLink = false;
int pos = file.tqfind( " -> " );
int pos = file.find( " -> " );
if ( pos != -1 )
{
bLink = true;

@ -263,7 +263,7 @@ MainWindow::getOpenURL( bool addOnly, const TQString & caption,
if ( !suggestedName.isEmpty() )
{
filter = TQString();
combo->setCurrentItem( list.tqfindIndex( ArchiveFormatInfo::self()->descriptionForMimeType(
combo->setCurrentItem( list.findIndex( ArchiveFormatInfo::self()->descriptionForMimeType(
KMimeType::findByPath( suggestedName, 0, true )->name() ) ) );
}

@ -291,7 +291,7 @@ void RarArch::unarchFileInternal()
bool RarArch::passwordRequired()
{
return m_lastShellOutput.tqfindRev("password incorrect ?)")+1;
return m_lastShellOutput.findRev("password incorrect ?)")+1;
}
void RarArch::remove( TQStringList *list )

@ -330,11 +330,11 @@ void SevenZipArch::slotReceivedTOC( KProcess*, char* data, int length )
startChar = lfChar + 1;
// Check if the header was found
if ( m_buffer.tqfind( m_headerString.data() ) != -1 )
if ( m_buffer.find( m_headerString.data() ) != -1 )
{
if ( !m_header_removed )
{
m_nameColumnPos = m_buffer.tqfindRev( ' ' ) + 1;
m_nameColumnPos = m_buffer.findRev( ' ' ) + 1;
m_header_removed = true;
}
else

@ -322,14 +322,14 @@ void TarArch::slotListingDone(KProcess *_kp)
if (flv!=NULL && flv->totalFiles()>0)
{
const TQString firstfile = ((FileLVI *) flv->firstChild())->fileName();
if (list.tqfind(TQRegExp(TQString("\\s\\./%1[/\\n]").tqarg(firstfile)))>=0)
if (list.find(TQRegExp(TQString("\\s\\./%1[/\\n]").tqarg(firstfile)))>=0)
{
m_dotslash = true;
kdDebug(1601) << k_funcinfo << "archive has dot-slash" << endl;
}
else
{
if (list.tqfind(TQRegExp(TQString("\\s%1[/\\n]").tqarg(firstfile)))>=0)
if (list.find(TQRegExp(TQString("\\s%1[/\\n]").tqarg(firstfile)))>=0)
{
// archive doesn't have dot-slash
m_dotslash = false;

@ -240,7 +240,7 @@ void ZipArch::unarchFileInternal()
bool ZipArch::passwordRequired()
{
return m_lastShellOutput.tqfindRev("unable to get password\n")!=-1 || m_lastShellOutput.endsWith("password inflating\n") || m_lastShellOutput.tqfindRev("password incorrect--reenter:")!=-1 || m_lastShellOutput.endsWith("incorrect password\n");
return m_lastShellOutput.findRev("unable to get password\n")!=-1 || m_lastShellOutput.endsWith("password inflating\n") || m_lastShellOutput.findRev("password incorrect--reenter:")!=-1 || m_lastShellOutput.endsWith("incorrect password\n");
}
void ZipArch::remove( TQStringList *list )

@ -287,7 +287,7 @@ TQString fixTime( const TQString &_strTime )
// +3 or -3 etc.
TQString strTime = _strTime;
if ( strTime.tqcontains("+") || strTime.tqcontains("-") )
if ( strTime.contains("+") || strTime.contains("-") )
{
TQCharRef c = strTime.tqat( 8 );
int offset = strTime.right( strTime.length() - 9 ).toInt();

@ -258,42 +258,42 @@ KCalculator::KCalculator(TQWidget *tqparent, const char *name)
smallBtnLayout->addWidget(pbScientific["HypMode"], 0, 1);
smallBtnLayout->addWidget(pbLogic["AND"], 0, 2);
smallBtnLayout->addWidget(pbMod, 0, 3);
smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xA), 0, 4);
smallBtnLayout->addWidget(NumButtonGroup->find(0xA), 0, 4);
smallBtnLayout->addWidget(pbConstant[0], 0, 5);
smallBtnLayout->addWidget(pbStat["Mean"], 1, 0);
smallBtnLayout->addWidget(pbScientific["Sine"], 1, 1);
smallBtnLayout->addWidget(pbLogic["OR"], 1, 2);
smallBtnLayout->addWidget(pbReci, 1, 3);
smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xB), 1, 4);
smallBtnLayout->addWidget(NumButtonGroup->find(0xB), 1, 4);
smallBtnLayout->addWidget(pbConstant[1], 1, 5);
smallBtnLayout->addWidget(pbStat["StandardDeviation"], 2, 0);
smallBtnLayout->addWidget(pbScientific["Cosine"], 2, 1);
smallBtnLayout->addWidget(pbLogic["XOR"], 2, 2);
smallBtnLayout->addWidget(pbFactorial, 2, 3);
smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xC), 2, 4);
smallBtnLayout->addWidget(NumButtonGroup->find(0xC), 2, 4);
smallBtnLayout->addWidget(pbConstant[2], 2, 5);
smallBtnLayout->addWidget(pbStat["Median"], 3, 0);
smallBtnLayout->addWidget(pbScientific["Tangent"], 3, 1);
smallBtnLayout->addWidget(pbLogic["LeftShift"], 3, 2);
smallBtnLayout->addWidget(pbSquare, 3, 3);
smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xD), 3, 4);
smallBtnLayout->addWidget(NumButtonGroup->find(0xD), 3, 4);
smallBtnLayout->addWidget(pbConstant[3], 3, 5);
smallBtnLayout->addWidget(pbStat["InputData"], 4, 0);
smallBtnLayout->addWidget(pbScientific["Log10"], 4, 1);
smallBtnLayout->addWidget(pbLogic["RightShift"], 4, 2);
smallBtnLayout->addWidget(pbRoot, 4, 3);
smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xE), 4, 4);
smallBtnLayout->addWidget(NumButtonGroup->find(0xE), 4, 4);
smallBtnLayout->addWidget(pbConstant[4], 4, 5);
smallBtnLayout->addWidget(pbStat["ClearData"], 5, 0);
smallBtnLayout->addWidget(pbScientific["LogNatural"], 5, 1);
smallBtnLayout->addWidget(pbLogic["One-Complement"], 5, 2);
smallBtnLayout->addWidget(pbPower, 5, 3);
smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xF), 5, 4);
smallBtnLayout->addWidget(NumButtonGroup->find(0xF), 5, 4);
smallBtnLayout->addWidget(pbConstant[5], 5, 5);
smallBtnLayout->setRowStretch(0, 0);
@ -614,22 +614,22 @@ TQWidget* KCalculator::setupNumericKeys(TQWidget *tqparent)
thisLayout->addWidget(pbX, 0, 2);
thisLayout->addWidget(pbMinus, 0, 3);
thisLayout->addWidget(NumButtonGroup->tqfind(7), 1, 0);
thisLayout->addWidget(NumButtonGroup->tqfind(8), 1, 1);
thisLayout->addWidget(NumButtonGroup->tqfind(9), 1, 2);
thisLayout->addWidget(NumButtonGroup->find(7), 1, 0);
thisLayout->addWidget(NumButtonGroup->find(8), 1, 1);
thisLayout->addWidget(NumButtonGroup->find(9), 1, 2);
thisLayout->addMultiCellWidget(pbPlus, 1, 2, 3, 3);
thisLayout->addWidget(NumButtonGroup->tqfind(4), 2, 0);
thisLayout->addWidget(NumButtonGroup->tqfind(5), 2, 1);
thisLayout->addWidget(NumButtonGroup->tqfind(6), 2, 2);
thisLayout->addWidget(NumButtonGroup->find(4), 2, 0);
thisLayout->addWidget(NumButtonGroup->find(5), 2, 1);
thisLayout->addWidget(NumButtonGroup->find(6), 2, 2);
//thisLayout->addMultiCellWidget(pbPlus, 1, 2, 3, 3);
thisLayout->addWidget(NumButtonGroup->tqfind(1), 3, 0);
thisLayout->addWidget(NumButtonGroup->tqfind(2), 3, 1);
thisLayout->addWidget(NumButtonGroup->tqfind(3), 3, 2);
thisLayout->addWidget(NumButtonGroup->find(1), 3, 0);
thisLayout->addWidget(NumButtonGroup->find(2), 3, 1);
thisLayout->addWidget(NumButtonGroup->find(3), 3, 2);
thisLayout->addMultiCellWidget(pbEqual, 3, 4, 3, 3);
thisLayout->addMultiCellWidget(NumButtonGroup->tqfind(0), 4, 4, 0, 1);
thisLayout->addMultiCellWidget(NumButtonGroup->find(0), 4, 4, 0, 1);
thisLayout->addWidget(pbPeriod, 4, 2);
//thisLayout->addMultiCellWidget(pbEqual, 3, 4, 3, 3);
@ -1060,11 +1060,11 @@ void KCalculator::updateGeometry(void)
l = mLargePage->childrenListObject();
int h1 = (NumButtonGroup->tqfind(0x0F))->tqminimumSize().height();
int h1 = (NumButtonGroup->find(0x0F))->tqminimumSize().height();
int h2 = static_cast<int>( (static_cast<float>(h1) + 4.0) / 5.0 );
s.setWidth(mLargePage->fontMetrics().width("MMM") +
TQApplication::tqstyle().
tqpixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->tqfind(0x0F))*2);
tqpixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->find(0x0F))*2);
s.setHeight(h1 + h2);
for(uint i = 0; i < l.count(); i++)
@ -1087,11 +1087,11 @@ void KCalculator::updateGeometry(void)
l = mNumericPage->childrenListObject(); // silence please
h1 = (NumButtonGroup->tqfind(0x0F))->tqminimumSize().height();
h1 = (NumButtonGroup->find(0x0F))->tqminimumSize().height();
h2 = (int)((((float)h1 + 4.0) / 5.0));
s.setWidth(mLargePage->fontMetrics().width("MMM") +
TQApplication::tqstyle().
tqpixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->tqfind(0x0F))*2);
tqpixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->find(0x0F))*2);
s.setHeight(h1 + h2);
for(uint i = 0; i < l.count(); i++)
@ -1109,7 +1109,7 @@ void KCalculator::updateGeometry(void)
// Set Buttons of double size
TQSize t(s);
t.setWidth(2*s.width());
NumButtonGroup->tqfind(0x00)->setFixedSize(t);
NumButtonGroup->find(0x00)->setFixedSize(t);
t = s;
t.setHeight(2*s.height());
pbEqual->setFixedSize(t);
@ -1151,11 +1151,11 @@ void KCalculator::slotBaseSelected(int base)
// Enable the buttons not available in this base
for (int i=0; i<current_base; i++)
NumButtonGroup->tqfind(i)->setEnabled (true);
NumButtonGroup->find(i)->setEnabled (true);
// Disable the buttons not available in this base
for (int i=current_base; i<16; i++)
NumButtonGroup->tqfind(i)->setEnabled (false);
NumButtonGroup->find(i)->setEnabled (false);
// Only enable the decimal point in decimal
pbPeriod->setEnabled(current_base == NB_DECIMAL);
@ -2006,7 +2006,7 @@ void KCalculator::slotLogicshow(bool toggled)
resetBase();
BaseChooseGroup->show();
for (int i=10; i<16; i++)
(NumButtonGroup->tqfind(i))->show();
(NumButtonGroup->find(i))->show();
}
else
{
@ -2023,7 +2023,7 @@ void KCalculator::slotLogicshow(bool toggled)
statusBar()->removeItem(1);
calc_display->setStatusText(1, TQString());
for (int i=10; i<16; i++)
(NumButtonGroup->tqfind(i))->hide();
(NumButtonGroup->find(i))->hide();
}
adjustSize();
setFixedSize(tqsizeHint());
@ -2144,7 +2144,7 @@ void KCalculator::set_colors()
TQPalette numPal(KCalcSettings::numberButtonsColor(), bg);
for(int i=0; i<10; i++)
{
(NumButtonGroup->tqfind(i))->setPalette(numPal);
(NumButtonGroup->find(i))->setPalette(numPal);
}
TQPalette funcPal(KCalcSettings::functionButtonsColor(), bg);
@ -2163,7 +2163,7 @@ void KCalculator::set_colors()
TQPalette hexPal(KCalcSettings::hexButtonsColor(), bg);
for(int i=10; i<16; i++)
{
(NumButtonGroup->tqfind(i))->setPalette(hexPal);
(NumButtonGroup->find(i))->setPalette(hexPal);
}
TQPalette memPal(KCalcSettings::memoryButtonsColor(), bg);
@ -2217,26 +2217,26 @@ bool KCalculator::eventFilter(TQObject *o, TQEvent *e)
// Was it hex-button or normal digit??
if (num_but <10)
for(int i=0; i<10; i++)
(NumButtonGroup->tqfind(i))->setPalette(pal);
(NumButtonGroup->find(i))->setPalette(pal);
else
for(int i=10; i<16; i++)
(NumButtonGroup->tqfind(i))->setPalette(pal);
(NumButtonGroup->find(i))->setPalette(pal);
return true;
}
else if( mFunctionButtonList.tqfindRef((KCalcButton*)o) != -1)
else if( mFunctionButtonList.findRef((KCalcButton*)o) != -1)
{
list = &mFunctionButtonList;
}
else if( mStatButtonList.tqfindRef((KCalcButton*)o) != -1)
else if( mStatButtonList.findRef((KCalcButton*)o) != -1)
{
list = &mStatButtonList;
}
else if( mMemButtonList.tqfindRef((KCalcButton*)o) != -1)
else if( mMemButtonList.findRef((KCalcButton*)o) != -1)
{
list = &mMemButtonList;
}
else if( mOperationButtonList.tqfindRef((KCalcButton*)o) != -1)
else if( mOperationButtonList.findRef((KCalcButton*)o) != -1)
{
list = &mOperationButtonList;
}

@ -86,7 +86,7 @@ private:
void keyReleaseEvent(TQKeyEvent *e);
void set_precision();
void set_style();
void resetBase(void) { (BaseChooseGroup->tqfind(1))->animateClick();};
void resetBase(void) { (BaseChooseGroup->find(1))->animateClick();};
void UpdateDisplay(bool get_amount_from_core = false,
bool store_result_in_history = false);

@ -47,7 +47,7 @@ KCalcButton::KCalcButton(const TQString &label, TQWidget * tqparent,
void KCalcButton::addMode(ButtonModeFlags mode, TQString label, TQString tooltip, bool is_label_richtext)
{
if (_mode.tqcontains(mode)) _mode.remove(mode);
if (_mode.contains(mode)) _mode.remove(mode);
_mode[mode] = ButtonMode(label, tooltip, is_label_richtext);
@ -67,7 +67,7 @@ void KCalcButton::slotSetMode(ButtonModeFlags mode, bool flag)
return; // nothing to do
}
if (_mode.tqcontains(new_mode)) {
if (_mode.contains(new_mode)) {
// save accel, because setting label erases accel
TQKeySequence _accel = accel();
@ -92,7 +92,7 @@ void KCalcButton::slotSetMode(ButtonModeFlags mode, bool flag)
static TQString escape(TQString str)
{
str.tqreplace('&', "&&");
str.replace('&', "&&");
return str;
}
@ -128,7 +128,7 @@ void KCalcButton::drawButtonLabel(TQPainter *paint)
{
if (_show_accel_mode) {
KPushButton::drawButtonLabel(paint);
} else if (_mode.tqcontains(_mode_flags)) {
} else if (_mode.contains(_mode_flags)) {
paintLabel(paint);
}
}
@ -159,7 +159,7 @@ void KSquareButton::drawButtonLabel(TQPainter *paint)
{
if (_show_accel_mode) {
KPushButton::drawButtonLabel(paint);
} else if (_mode.tqcontains(_mode_flags)) {
} else if (_mode.contains(_mode_flags)) {
paintLabel(paint);
}
}

@ -276,7 +276,7 @@ static void _inc_by_one(TQString &str, int position)
// Cut off if more digits in fractional part than 'precision'
static void _round(TQString &str, int precision)
{
int decimalSymbolPos = str.tqfind('.');
int decimalSymbolPos = str.find('.');
if (decimalSymbolPos == -1)
if (precision == 0) return;
@ -312,7 +312,7 @@ static void _round(TQString &str, int precision)
break;
}
decimalSymbolPos = str.tqfind('.');
decimalSymbolPos = str.find('.');
str.truncate(decimalSymbolPos + precision + 1);
// if precision == 0 delete also '.'

@ -195,7 +195,7 @@ bool IRKick::getPrograms(const IRAction &action, TQStringList &programs)
for(QCStringList::iterator i = buf.begin(); i != buf.end(); ++i)
{
TQString program = TQString::fromUtf8(*i);
if(program.tqcontains(r))
if(program.contains(r))
programs += program;
}
if(programs.size() > 1 && action.ifMulti() == IM_DONTSEND)
@ -206,7 +206,7 @@ bool IRKick::getPrograms(const IRAction &action, TQStringList &programs)
for(TQValueList<WId>::iterator i = s.fromLast(); i != s.end(); i--)
{ int p = KWin::info(*i).pid;
TQString id = action.program() + "-" + TQString().setNum(p);
if(programs.tqcontains(id))
if(programs.contains(id))
{ programs.clear();
programs += id;
break;
@ -220,7 +220,7 @@ bool IRKick::getPrograms(const IRAction &action, TQStringList &programs)
for(TQValueList<WId>::iterator i = s.begin(); i != s.end(); ++i)
{ int p = KWin::info(*i).pid;
TQString id = action.program() + "-" + TQString().setNum(p);
if(programs.tqcontains(id))
if(programs.contains(id))
{ programs.clear();
programs += id;
break;

@ -177,14 +177,14 @@ void KLircClient::slotRead()
{
// <code> <repeat> <button name> <remote control name>
line.remove(0, 17); // strip code
int pos = line.tqfind(' ');
int pos = line.find(' ');
if (pos < 0) return;
bool ok;
int repeat = line.left(pos).toInt(&ok, 16);
if (!ok) return;
line.remove(0, pos + 1);
pos = line.tqfind(' ');
pos = line.find(' ');
if (pos < 0) return;
TQString btn = line.left(pos);
if(btn.startsWith("'") && btn.endsWith("'"))

@ -92,8 +92,8 @@ void AddAction::updateButton(const TQString &remote, const TQString &button)
{
if(theMode.remote() == remote)
{ // note this isn't the "correct" way of doing it; really i should iterate throughg the items and try to find the item which when put through buttonMap[item] returns the current button name. but i cant be arsed.
theButtons->setCurrentItem(theButtons->tqfindItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0));
theButtons->ensureItemVisible(theButtons->tqfindItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0));
theButtons->setCurrentItem(theButtons->findItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0));
theButtons->ensureItemVisible(theButtons->findItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0));
}
else
KMessageBox::error(this, i18n( "You did not select a mode of that remote control. Please use %1, "
@ -149,7 +149,7 @@ const TQStringList AddAction::getFunctions(const TQString app, const TQString ob
if( *i != "QCStringList interfaces()" &&
*i != "QCStringList functions()" &&
*i != "QCStringList objects()" &&
*i != "QCStringList tqfind(TQCString)" )
*i != "QCStringList find(TQCString)" )
ret += TQString::fromUtf8(*i);
return ret;
}
@ -262,19 +262,19 @@ void AddAction::updateParameter()
if(theParameters->currentItem())
{ TQString type = theParameters->currentItem()->text(2);
int index = theParameters->currentItem()->text(3).toInt() - 1;
if(type.tqfind("int") != -1 || type.tqfind("short") != -1 || type.tqfind("long") != -1)
if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1)
{ theValue->raiseWidget(2);
theValueIntNumInput->setValue(theArguments[index].toInt());
}
else if(type.tqfind("double") != -1 || type.tqfind("float") != -1)
else if(type.find("double") != -1 || type.find("float") != -1)
{ theValue->raiseWidget(3);
theValueDoubleNumInput->setValue(theArguments[index].toDouble());
}
else if(type.tqfind("bool") != -1)
else if(type.find("bool") != -1)
{ theValue->raiseWidget(1);
theValueCheckBox->setChecked(theArguments[index].toBool());
}
else if(type.tqfind(TQSTRINGLIST_OBJECT_NAME_STRING) != -1)
else if(type.find(TQSTRINGLIST_OBJECT_NAME_STRING) != -1)
{ theValue->raiseWidget(4);
TQStringList backup = theArguments[index].toStringList();
// backup needed because calling clear will kill what ever has been saved.
@ -307,13 +307,13 @@ void AddAction::slotParameterChanged()
if(!theParameters->currentItem()) return;
int index = theParameters->currentItem()->text(3).toInt() - 1;
TQString type = theParameters->currentItem()->text(2);
if(type.tqfind("int") != -1 || type.tqfind("short") != -1 || type.tqfind("long") != -1)
if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1)
theArguments[index].asInt() = theValueIntNumInput->value();
else if(type.tqfind("double") != -1 || type.tqfind("float") != -1)
else if(type.find("double") != -1 || type.find("float") != -1)
theArguments[index].asDouble() = theValueDoubleNumInput->value();
else if(type.tqfind("bool") != -1)
else if(type.find("bool") != -1)
theArguments[index].asBool() = theValueCheckBox->isChecked();
else if(type.tqfind(TQSTRINGLIST_OBJECT_NAME_STRING) != -1)
else if(type.find(TQSTRINGLIST_OBJECT_NAME_STRING) != -1)
theArguments[index].asStringList() = theValueEditListBox->items();
else
theArguments[index].asString() = theValueLineEdit->text();
@ -339,11 +339,11 @@ void AddAction::updateObjects()
QCStringList theApps = theClient->registeredApplications();
for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i)
{
if(!TQString(*i).tqfind("anonymous")) continue;
if(!TQString(*i).tqfind(i18n( "anonymous" ))) continue;
if(!TQString(*i).find("anonymous")) continue;
if(!TQString(*i).find(i18n( "anonymous" ))) continue;
TQRegExp r("(.*)-[0-9]+");
TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i;
if(names.tqcontains(name)) continue;
if(names.contains(name)) continue;
names += name;
KListViewItem *a = new KListViewItem(theObjects, name);

@ -319,10 +319,10 @@ void EditAction::updateDCOPApplications()
QCStringList theApps = theClient->registeredApplications();
for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i)
{
if(!TQString(*i).tqfind("anonymous")) continue;
if(!TQString(*i).find("anonymous")) continue;
TQRegExp r("(.*)-[0-9]+");
TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i;
if(names.tqcontains(name)) continue;
if(names.contains(name)) continue;
names += name;
theDCOPApplications->insertItem(name);

@ -41,8 +41,8 @@ void Modes::loadFromConfig(KConfig &theConfig)
void Modes::generateNulls(const TQStringList &theRemotes)
{
for(TQStringList::const_iterator i = theRemotes.begin(); i != theRemotes.end(); ++i)
{ if(!tqcontains(*i) || !operator[](*i).tqcontains("")) operator[](*i)[""] = Mode(*i, "");
if(!theDefaults.tqcontains(*i)) theDefaults[*i].isEmpty();
{ if(!contains(*i) || !operator[](*i).contains("")) operator[](*i)[""] = Mode(*i, "");
if(!theDefaults.contains(*i)) theDefaults[*i].isEmpty();
}
}
@ -59,8 +59,8 @@ const Mode Modes::getDefault(const TQString &remote) const
{
// if(theDefaults[remote] == TQString())
// return Mode(remote, "");
if(tqcontains(remote))
if(operator[](remote).tqcontains(theDefaults[remote]))
if(contains(remote))
if(operator[](remote).contains(theDefaults[remote]))
return operator[](remote)[theDefaults[remote]];
else return Mode(remote, "");
else return Mode(remote, "");

@ -26,7 +26,7 @@ KDEsshDialog::KDEsshDialog(TQCString host, TQCString user, TQCString stub,
// Make the prompt a little more polite :-)
if (prompt.lower().left(6) == TQString::tqfromLatin1("enter "))
prompt.remove(0, 6);
int pos = prompt.tqfind(':');
int pos = prompt.find(':');
if (pos != -1)
prompt.remove(pos, 10);
prompt += '.';

@ -183,27 +183,27 @@ TQFile f(FSTAB);
while (! t.eof()) {
s=t.readLine();
s=s.simplifyWhiteSpace();
if ( (!s.isEmpty() ) && (s.tqfind(DELIMITER)!=0) ) {
if ( (!s.isEmpty() ) && (s.find(DELIMITER)!=0) ) {
// not empty or commented out by '#'
// kdDebug() << "GOT: [" << s << "]" << endl;
disk = new DiskEntry();// Q_CHECK_PTR(disk);
disk->setMounted(FALSE);
disk->setDeviceName(expandEscapes(s.left(s.tqfind(BLANK))));
s=s.remove(0,s.tqfind(BLANK)+1 );
disk->setDeviceName(expandEscapes(s.left(s.find(BLANK))));
s=s.remove(0,s.find(BLANK)+1 );
// kdDebug() << " deviceName: [" << disk->deviceName() << "]" << endl;
#ifdef _OS_SOLARIS_
//device to fsck
s=s.remove(0,s.tqfind(BLANK)+1 );
s=s.remove(0,s.find(BLANK)+1 );
#endif
disk->setMountPoint(expandEscapes(s.left(s.tqfind(BLANK))));
s=s.remove(0,s.tqfind(BLANK)+1 );
disk->setMountPoint(expandEscapes(s.left(s.find(BLANK))));
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " MountPoint: [" << disk->mountPoint() << "]" << endl;
//kdDebug() << " Icon: [" << disk->iconName() << "]" << endl;
disk->setFsType(s.left(s.tqfind(BLANK)) );
s=s.remove(0,s.tqfind(BLANK)+1 );
disk->setFsType(s.left(s.find(BLANK)) );
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " FS-Type: [" << disk->fsType() << "]" << endl;
disk->setMountOptions(s.left(s.tqfind(BLANK)) );
s=s.remove(0,s.tqfind(BLANK)+1 );
disk->setMountOptions(s.left(s.find(BLANK)) );
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " Mount-Options: [" << disk->mountOptions() << "]" << endl;
if ( (disk->deviceName() != "none")
&& (disk->fsType() != "swap")
@ -211,7 +211,7 @@ TQFile f(FSTAB);
&& (disk->mountPoint() != "/dev/swap")
&& (disk->mountPoint() != "/dev/pts")
&& (disk->mountPoint() != "/dev/shm")
&& (disk->mountPoint().tqfind("/proc") == -1 ) )
&& (disk->mountPoint().find("/proc") == -1 ) )
replaceDeviceEntry(disk);
else
delete disk;
@ -295,7 +295,7 @@ void DiskList::dfDone()
if ( !s.isEmpty() ) {
disk = new DiskEntry(); Q_CHECK_PTR(disk);
if (s.tqfind(BLANK)<0) // devicename was too long, rest in next line
if (s.find(BLANK)<0) // devicename was too long, rest in next line
if ( !t.eof() ) { // just appends the next line
v=t.readLine();
s=s.append(v.latin1() );
@ -305,37 +305,37 @@ void DiskList::dfDone()
//kdDebug() << "EFFECTIVELY GOT " << s.length() << " chars: [" << s << "]" << endl;
disk->setDeviceName(s.left(s.tqfind(BLANK)) );
s=s.remove(0,s.tqfind(BLANK)+1 );
disk->setDeviceName(s.left(s.find(BLANK)) );
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " DeviceName: [" << disk->deviceName() << "]" << endl;
if (NO_FS_TYPE) {
//kdDebug() << "THERE IS NO FS_TYPE_FIELD!" << endl;
disk->setFsType("?");
} else {
disk->setFsType(s.left(s.tqfind(BLANK)) );
s=s.remove(0,s.tqfind(BLANK)+1 );
disk->setFsType(s.left(s.find(BLANK)) );
s=s.remove(0,s.find(BLANK)+1 );
};
//kdDebug() << " FS-Type: [" << disk->fsType() << "]" << endl;
//kdDebug() << " Icon: [" << disk->iconName() << "]" << endl;
u=s.left(s.tqfind(BLANK));
u=s.left(s.find(BLANK));
disk->setKBSize(u.toInt() );
s=s.remove(0,s.tqfind(BLANK)+1 );
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " Size: [" << disk->kBSize() << "]" << endl;
u=s.left(s.tqfind(BLANK));
u=s.left(s.find(BLANK));
disk->setKBUsed(u.toInt() );
s=s.remove(0,s.tqfind(BLANK)+1 );
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " Used: [" << disk->kBUsed() << "]" << endl;
u=s.left(s.tqfind(BLANK));
u=s.left(s.find(BLANK));
disk->setKBAvail(u.toInt() );
s=s.remove(0,s.tqfind(BLANK)+1 );
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " Avail: [" << disk->kBAvail() << "]" << endl;
s=s.remove(0,s.tqfind(BLANK)+1 ); // delete the capacity 94%
s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94%
disk->setMountPoint(s);
//kdDebug() << " MountPoint: [" << disk->mountPoint() << "]" << endl;
@ -346,7 +346,7 @@ void DiskList::dfDone()
&& (disk->mountPoint() != "/dev/swap")
&& (disk->mountPoint() != "/dev/pts")
&& (disk->mountPoint() != "/dev/shm")
&& (disk->mountPoint().tqfind("/proc") == -1 ) ) {
&& (disk->mountPoint().find("/proc") == -1 ) ) {
disk->setMounted(TRUE); // its now mounted (df lists only mounted)
replaceDeviceEntry(disk);
} else
@ -391,10 +391,10 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk)
//
// 1999-27-11 Espen Sand:
// I can't get tqfind() to work. The Disks::compareItems(..) is
// I can't get find() to work. The Disks::compareItems(..) is
// never called.
//
//int pos=disks->tqfind(disk);
//int pos=disks->find(disk);
TQString deviceRealName = disk->deviceRealName();
TQString realMountPoint = disk->realMountPoint();
@ -426,13 +426,13 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk)
// eg. /cache/cache/.cfs_mnt_points/srv:_home_jesus
// ^ ^
TQString odiskName = olddisk->deviceName();
int ci=odiskName.tqfind(':'); // goto host-column
while ((ci =odiskName.tqfind('/',ci)) > 0) {
odiskName.tqreplace(ci,1,"_");
int ci=odiskName.find(':'); // goto host-column
while ((ci =odiskName.find('/',ci)) > 0) {
odiskName.replace(ci,1,"_");
}//while
// check if there is something that is exactly the tail
// eg. [srv:/tmp3] is exact tail of [/cache/.cfs_mnt_points/srv:_tmp3]
if ( ( (p=disk->deviceName().tqfindRev(odiskName
if ( ( (p=disk->deviceName().findRev(odiskName
,disk->deviceName().length()) )
!= -1)
&& (p + odiskName.length()
@ -455,10 +455,10 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk)
}
#endif
if (pos != -1) { // tqreplace
if (pos != -1) { // replace
DiskEntry * olddisk = disks->at(pos);
if ( (-1!=olddisk->mountOptions().tqfind("user")) &&
(-1==disk->mountOptions().tqfind("user")) ) {
if ( (-1!=olddisk->mountOptions().find("user")) &&
(-1==disk->mountOptions().find("user")) ) {
// add "user" option to new diskEntry
TQString s=disk->mountOptions();
if (s.length()>0) s.append(",");

@ -101,7 +101,7 @@ public:
~DiskList();
int readFSTAB();
int readDF();
int tqfind(const DiskEntry* disk) {return disks->tqfind(disk);}
int find(const DiskEntry* disk) {return disks->find(disk);}
DiskEntry* at(uint index) {return disks->at(index);}
DiskEntry* first() {return disks->first();}
DiskEntry* next() {return disks->next();}

@ -107,10 +107,10 @@ int DiskEntry::mount()
cmdS=TQString::tqfromLatin1("mount -t%t -o%o %d %m");
}
cmdS.tqreplace(TQString::tqfromLatin1("%d"),deviceName());
cmdS.tqreplace(TQString::tqfromLatin1("%m"),mountPoint());
cmdS.tqreplace(TQString::tqfromLatin1("%t"),fsType());
cmdS.tqreplace(TQString::tqfromLatin1("%o"),mountOptions());
cmdS.replace(TQString::tqfromLatin1("%d"),deviceName());
cmdS.replace(TQString::tqfromLatin1("%m"),mountPoint());
cmdS.replace(TQString::tqfromLatin1("%t"),fsType());
cmdS.replace(TQString::tqfromLatin1("%o"),mountOptions());
kdDebug() << "mount-cmd: [" << cmdS << "]" << endl;
int e=sysCall(cmdS);
@ -126,8 +126,8 @@ int DiskEntry::umount()
if (cmdS.isEmpty()) // generate default umount cmd
cmdS="umount %d";
cmdS.tqreplace(TQString::tqfromLatin1("%d"),deviceName());
cmdS.tqreplace(TQString::tqfromLatin1("%m"),mountPoint());
cmdS.replace(TQString::tqfromLatin1("%d"),deviceName());
cmdS.replace(TQString::tqfromLatin1("%m"),mountPoint());
kdDebug() << "umount-cmd: [" << cmdS << "]" << endl;
int e=sysCall(cmdS);
@ -193,23 +193,23 @@ TQString DiskEntry::guessIconName()
{
TQString iconName;
// try to be intelligent
if (-1!=mountPoint().tqfind("cdrom",0,FALSE)) iconName+="cdrom";
else if (-1!=deviceName().tqfind("cdrom",0,FALSE)) iconName+="cdrom";
else if (-1!=mountPoint().tqfind("writer",0,FALSE)) iconName+="cdwriter";
else if (-1!=deviceName().tqfind("writer",0,FALSE)) iconName+="cdwriter";
else if (-1!=mountPoint().tqfind("mo",0,FALSE)) iconName+="mo";
else if (-1!=deviceName().tqfind("mo",0,FALSE)) iconName+="mo";
else if (-1!=deviceName().tqfind("fd",0,FALSE)) {
if (-1!=deviceName().tqfind("360",0,FALSE)) iconName+="5floppy";
if (-1!=deviceName().tqfind("1200",0,FALSE)) iconName+="5floppy";
if (-1!=mountPoint().find("cdrom",0,FALSE)) iconName+="cdrom";
else if (-1!=deviceName().find("cdrom",0,FALSE)) iconName+="cdrom";
else if (-1!=mountPoint().find("writer",0,FALSE)) iconName+="cdwriter";
else if (-1!=deviceName().find("writer",0,FALSE)) iconName+="cdwriter";
else if (-1!=mountPoint().find("mo",0,FALSE)) iconName+="mo";
else if (-1!=deviceName().find("mo",0,FALSE)) iconName+="mo";
else if (-1!=deviceName().find("fd",0,FALSE)) {
if (-1!=deviceName().find("360",0,FALSE)) iconName+="5floppy";
if (-1!=deviceName().find("1200",0,FALSE)) iconName+="5floppy";
else iconName+="3floppy";
}
else if (-1!=mountPoint().tqfind("floppy",0,FALSE)) iconName+="3floppy";
else if (-1!=mountPoint().tqfind("zip",0,FALSE)) iconName+="zip";
else if (-1!=fsType().tqfind("nfs",0,FALSE)) iconName+="nfs";
else if (-1!=mountPoint().find("floppy",0,FALSE)) iconName+="3floppy";
else if (-1!=mountPoint().find("zip",0,FALSE)) iconName+="zip";
else if (-1!=fsType().find("nfs",0,FALSE)) iconName+="nfs";
else iconName+="hdd";
mounted() ? iconName+="_mount" : iconName+="_unmount";
// if ( -1==mountOptions().tqfind("user",0,FALSE) )
// if ( -1==mountOptions().find("user",0,FALSE) )
// iconName.prepend("root_"); // special root icon, normal user can´t mount
//debug("device %s is %s",deviceName().latin1(),iconName.latin1());

@ -343,7 +343,7 @@ void KDFWidget::updateDFDone( void ){
int k=0;
item = new CListViewItem( mList, item );
bool root = disk->mountOptions().tqfind("user",0,false)==-1 ? true : false;
bool root = disk->mountOptions().find("user",0,false)==-1 ? true : false;
item->setPixmap( k++, mList->icon( disk->iconName(), root ) );
item->setText( k++, disk->deviceName() );
item->setText( k++, disk->fsType() );
@ -400,10 +400,10 @@ DiskEntry *KDFWidget::selectedDisk( TQListViewItem *item )
DiskEntry disk(item->text(deviceCol));
disk.setMountPoint(item->text(mntCol));
// I can't get tqfind() to work. The Disks::compareItems(..) is
// I can't get find() to work. The Disks::compareItems(..) is
// never called.
//
//int pos=mDiskList->tqfind(disk);
//int pos=mDiskList->find(disk);
int pos = -1;
for( u_int i=0; i<mDiskList.count(); i++ )
@ -515,10 +515,10 @@ void KDFWidget::popupMenu( TQListViewItem *item, const TQPoint &p )
if( mStd.fileManager().isEmpty() == false )
{
TQString cmd = mStd.fileManager();
int pos = cmd.tqfind("%m");
int pos = cmd.find("%m");
if( pos > 0 )
{
cmd = cmd.tqreplace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &";
cmd = cmd.replace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &";
}
else
{
@ -569,10 +569,10 @@ void KDFWidget::updateDiskBarPixmaps( void )
int i=0;
for(TQListViewItem *it=mList->firstChild(); it!=0;it=it->nextSibling(),i++ )
{
// I can't get tqfind() to work. The Disks::compareItems(..) is
// I can't get find() to work. The Disks::compareItems(..) is
// never called.
//
//int pos=mDiskList->tqfind(disk);
//int pos=mDiskList->find(disk);
DiskEntry dummy(it->text(deviceCol));
dummy.setMountPoint(it->text(mntCol));
@ -609,8 +609,8 @@ void KDFWidget::updateDiskBarPixmaps( void )
p.setPen(black);
p.drawRect(0,0,w,h);
TQColor c;
if ( (disk->iconName().tqfind("cdrom") != -1)
|| (disk->iconName().tqfind("writer") != -1) )
if ( (disk->iconName().find("cdrom") != -1)
|| (disk->iconName().find("writer") != -1) )
c = gray;
else
c = disk->percentFull() > FULL_PERCENT ? red : darkGreen;

@ -190,7 +190,7 @@ void KwikDisk::updateDFDone()
TQPixmap *pix = new TQPixmap(KSystemTray::loadIcon(disk->iconName()));
if( getuid() !=0 && disk->mountOptions().tqfind("user",0, false) == -1 )
if( getuid() !=0 && disk->mountOptions().find("user",0, false) == -1 )
{
//
// Special root icon, normal user cant mount.
@ -264,10 +264,10 @@ void KwikDisk::toggleMount(int item)
if( m_options.fileManager().isEmpty() == false )
{
TQString cmd = m_options.fileManager();
int pos = cmd.tqfind("%m");
int pos = cmd.find("%m");
if( pos > 0 )
{
cmd = cmd.tqreplace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &";
cmd = cmd.replace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &";
}
else
{

@ -99,7 +99,7 @@ const TQPixmap &CListView::icon( const TQString &iconName, bool drawBorder )
}
}
mPixDict.tqreplace( iconName, pix );
mPixDict.replace( iconName, pix );
}
return( *pix );

@ -251,9 +251,9 @@ void MntConfigWidget::iconChangedButton(TQString iconName)
}
void MntConfigWidget::iconChanged(const TQString &iconName)
{
if( iconName.tqfindRev('_') == 0 ||
(iconName.right(iconName.length()-iconName.tqfindRev('_'))!="_mount" &&
iconName.right(iconName.length()-iconName.tqfindRev('_'))!="_unmount"))
if( iconName.findRev('_') == 0 ||
(iconName.right(iconName.length()-iconName.findRev('_'))!="_mount" &&
iconName.right(iconName.length()-iconName.findRev('_'))!="_unmount"))
{
TQString msg = i18n(""
"This filename is not valid: %1\n"

@ -215,7 +215,7 @@ void TopLevel::setupActions()
KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(select_all()), actionCollection());
KStdAction::find(TQT_TQOBJECT(this), TQT_SLOT(search()), actionCollection());
KStdAction::findNext(TQT_TQOBJECT(this), TQT_SLOT(search_again()), actionCollection());
KStdAction::replace(TQT_TQOBJECT(this), TQT_SLOT(tqreplace()), actionCollection());
KStdAction::replace(TQT_TQOBJECT(this), TQT_SLOT(replace()), actionCollection());
(void)new KAction(i18n("&Insert File..."), 0, TQT_TQOBJECT(this), TQT_SLOT(file_insert()),
actionCollection(), "insert_file");
@ -445,11 +445,11 @@ TQString TopLevel::replaceISpell(TQString msg, int client)
{
switch(client)
{
case KS_CLIENT_ISPELL: msg.tqreplace("ISpell", "<b>ispell</b>"); break;
case KS_CLIENT_ASPELL: msg.tqreplace("ISpell", "<b>aspell</b>"); break;
case KS_CLIENT_HSPELL: msg.tqreplace("ISpell", "<b>hspell</b>"); break;
case KS_CLIENT_ISPELL: msg.replace("ISpell", "<b>ispell</b>"); break;
case KS_CLIENT_ASPELL: msg.replace("ISpell", "<b>aspell</b>"); break;
case KS_CLIENT_HSPELL: msg.replace("ISpell", "<b>hspell</b>"); break;
}
msg.tqreplace("\n", "<p>");
msg.replace("\n", "<p>");
return "<qt>"+msg+"</qt>";
}
@ -762,7 +762,7 @@ void TopLevel::mail()
// Default subject string
//
TQString defaultsubject = name();
int index = defaultsubject.tqfindRev('/');
int index = defaultsubject.findRev('/');
if( index != -1)
defaultsubject = defaultsubject.right(defaultsubject.length() - index - 1 );
@ -788,7 +788,7 @@ void TopLevel::fancyprint(){
y += fm.ascent();
TQString line;
line = eframe->textLine(i);
line.tqreplace( TQRegExp("\t"), " " );
line.replace( TQRegExp("\t"), " " );
strncpy(buf,line.local8Bit(),160);
for (int j = 0 ; j <150; j++){
if (!isprint(buf[j]))
@ -818,7 +818,7 @@ void TopLevel::search(){
statusbar_slot();
}
void TopLevel::tqreplace(){
void TopLevel::replace(){
eframe->replace();
statusbar_slot();
}

@ -177,7 +177,7 @@ public slots:
void file_save_as();
void helpselected();
void search();
void tqreplace();
void replace();
void search_again();
void toggle_overwrite();

@ -50,7 +50,7 @@ KTextFileDialog::KTextFileDialog(const TQString& startDir,
TQStringList::Iterator it;
int i = 0;
for( it = encodings.begin(); it != encodings.end(); ++it) {
if ( (*it).tqcontains( encodingStr ) ) {
if ( (*it).contains( encodingStr ) ) {
mEncoding->setCurrentItem( i );
break;
}
@ -111,7 +111,7 @@ void KTextFileDialog::slotShowEncCombo()
int i = 1;
for( it = encodings.begin(); it != encodings.end(); ++it) {
if ( (*it).tqcontains( encoding() ) ) {
if ( (*it).contains( encoding() ) ) {
encCombo->setCurrentItem( i );
break;
}

@ -65,7 +65,7 @@ public:
void readSettings();
/// Map stored settings to widget status
void setWidgets();
/// A kind of TQString::tqfind()
/// A kind of TQString::find()
int findKeyWord(TQString &, const TQString &);
/// Enable/disable all UI elements
void setEnabled(bool);

@ -483,7 +483,7 @@ void FDFormat::processStdOut(KProcess *, char *b, int l)
else
{
s = TQString::tqfromLatin1(b,l);
if (s.tqcontains("ioctl(FD_FORM)"))
if (s.contains("ioctl(FD_FORM)"))
{
emit status (i18n(
"Cannot access floppy or floppy drive.\n"
@ -491,7 +491,7 @@ void FDFormat::processStdOut(KProcess *, char *b, int l)
"have selected a valid floppy drive."),-1);
return;
}
if (s.tqfind("/dev/")>=0)
if (s.find("/dev/")>=0)
{
emit status(s,-1);
return;
@ -502,7 +502,7 @@ void FDFormat::processStdOut(KProcess *, char *b, int l)
s = TQString::tqfromLatin1(b,l);
DEBUGS(s);
TQRegExp regexp( "([0-9]+)" );
if ( s.startsWith( "bad data at cyl" ) || ( s.tqfind( "Problem reading cylinder" ) != -1 ) )
if ( s.startsWith( "bad data at cyl" ) || ( s.find( "Problem reading cylinder" ) != -1 ) )
{
if ( regexp.search( s ) > -1 )
{
@ -516,7 +516,7 @@ void FDFormat::processStdOut(KProcess *, char *b, int l)
}
return;
}
else if (s.tqfind("ioctl(FDFMTBEG)")!=-1)
else if (s.find("ioctl(FDFMTBEG)")!=-1)
{
emit status (i18n(
"Cannot access floppy or floppy drive.\n"
@ -524,13 +524,13 @@ void FDFormat::processStdOut(KProcess *, char *b, int l)
"have selected a valid floppy drive."),-1);
return;
}
else if (s.tqfind("busy")!=-1) // "Device or resource busy"
else if (s.find("busy")!=-1) // "Device or resource busy"
{
emit status(i18n("Device busy.\nPerhaps you need to unmount the floppy first."),-1);
return;
}
// Be careful to leave "iotcl" as last before checking numbers
else if (s.tqfind("ioctl")!=-1)
else if (s.find("ioctl")!=-1)
{
emit status(i18n("Low-level format error: %1").tqarg(s),-1);
return;
@ -722,18 +722,18 @@ void FATFilesystem::processStdOut(KProcess *, char *b, int l)
#elif defined(ANY_LINUX)
TQString s ( TQString::tqfromLatin1( b, l ) );
kdDebug(KFAREA) << s << endl;
if (s.tqfind("mounted file system")!=-1) // "/dev/fd0 contains a mounted file system
if (s.find("mounted file system")!=-1) // "/dev/fd0 contains a mounted file system
{
emit status(i18n("Floppy is mounted.\nYou need to unmount the floppy first."),-1);
return;
}
else if (s.tqfind("busy")!=-1) // "Device or resource busy"
else if (s.find("busy")!=-1) // "Device or resource busy"
{
emit status(i18n("Device busy.\nPerhaps you need to unmount the floppy first."),-1);
return;
}
# if 0
else if ( s.tqfind( "mkdosfs" ) != -1 ) // DEBUG: get the program header and show it!
else if ( s.find( "mkdosfs" ) != -1 ) // DEBUG: get the program header and show it!
{
emit status( s, -1 );
return;
@ -888,12 +888,12 @@ void Ext2Filesystem::processStdOut(KProcess *, char *b, int l)
#elif defined(ANY_LINUX)
TQString s ( TQString::tqfromLatin1( b, l ) );
kdDebug(KFAREA) << s << endl;
if (s.tqfind("mounted")!=-1) // "/dev/fd0 is mounted; will not make a filesystem here!"
if (s.find("mounted")!=-1) // "/dev/fd0 is mounted; will not make a filesystem here!"
{
emit status(i18n("Floppy is mounted.\nYou need to unmount the floppy first."),-1);
return;
}
else if (s.tqfind("busy")!=-1) // "Device or resource busy"
else if (s.find("busy")!=-1) // "Device or resource busy"
{
emit status(i18n("Device busy.\nPerhaps you need to unmount the floppy first."),-1);
return;
@ -979,12 +979,12 @@ void MinixFilesystem::processStdOut(KProcess *, char *b, int l)
{
TQString s ( TQString::tqfromLatin1( b, l ) );
kdDebug(KFAREA) << s << endl;
if (s.tqfind("mounted")!=-1) // "mkfs.minix: /dev/fd0 is mounted; will not make a filesystem here!"
if (s.find("mounted")!=-1) // "mkfs.minix: /dev/fd0 is mounted; will not make a filesystem here!"
{
emit status(i18n("Floppy is mounted.\nYou need to unmount the floppy first."),-1);
return;
}
else if (s.tqfind("busy")!=-1) // "Device or resource busy"
else if (s.find("busy")!=-1) // "Device or resource busy"
{
emit status(i18n("Device busy.\nPerhaps you need to unmount the floppy first."),-1);
return;

@ -99,7 +99,7 @@ void keyGenerate::slotOk()
{
if (KMessageBox::warningContinueCancel(this,i18n("You are about to create a key with no email address"))!=KMessageBox::Continue) return;
}
else if ((vmail.tqfind(" ")!=-1) || (vmail.tqfind(".")==-1) || (vmail.tqfind("@")==-1)) {
else if ((vmail.find(" ")!=-1) || (vmail.find(".")==-1) || (vmail.find("@")==-1)) {
KMessageBox::sorry(this,i18n("Email address not valid"));
return;
}

@ -188,7 +188,7 @@ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprin
break;
}
if (gpgOutput.section(':',11,11).tqfind("D",0,true)!=-1) // disabled key
if (gpgOutput.section(':',11,11).find("D",0,true)!=-1) // disabled key
{
tr=i18n("Disabled");
trustColor=KGpgSettings::colorBad();
@ -241,15 +241,15 @@ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprin
}
prop->kCOwnerTrust->setCurrentItem(ownerTrust);
if (fullname.tqfind("<")!=-1) {
if (fullname.find("<")!=-1) {
TQString kmail=fullname;
if (fullname.tqfind(")")!=-1)
if (fullname.find(")")!=-1)
kmail=kmail.section(')',1);
kmail=kmail.section('<',1);
kmail.truncate(kmail.length()-1);
if (kmail.tqfind("<")!=-1) //////// several email addresses in the same key
if (kmail.find("<")!=-1) //////// several email addresses in the same key
{
kmail=kmail.tqreplace(">",";");
kmail=kmail.replace(">",";");
kmail.remove("<");
}
prop->tLMail->setText("<qt><a href=mailto:"+kmail+">"+kmail+"</a></qt>");
@ -257,7 +257,7 @@ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprin
prop->tLMail->setText(i18n("none"));
TQString kname=fullname.section('<',0,0);
if (fullname.tqfind("(")!=-1) {
if (fullname.find("(")!=-1) {
kname=kname.section('(',0,0);
TQString comment=fullname.section('(',1,1);
comment=comment.section(')',0,0);
@ -265,7 +265,7 @@ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprin
} else
prop->tLComment->setText(i18n("none"));
prop->tLName->setText("<qt><b>"+KgpgInterface::checkForUtf8(kname).tqreplace(TQRegExp("<"),"&lt;")+"</b></qt>");
prop->tLName->setText("<qt><b>"+KgpgInterface::checkForUtf8(kname).replace(TQRegExp("<"),"&lt;")+"</b></qt>");
}
if (gpgOutput.startsWith("fpr") && (fingervalue.isNull())) {
@ -332,7 +332,7 @@ void KgpgKeyInfo::finishphotoreadprocess(KProcIO *p)
{
TQString required=TQString();
while (p->readln(required,true)!=-1)
if (required.tqfind("keyedit.prompt")!=-1) {
if (required.find("keyedit.prompt")!=-1) {
p->writeStdin(TQString("quit"));
p->closeWhenDone();

@ -278,7 +278,7 @@ void keyServer::slotsearchread(KProcIO *p)
while (p->readln(required,true)!=-1) {
//required=TQString::fromUtf8(required);
if (required.tqfind("keysearch.prompt")!=-1) {
if (required.find("keysearch.prompt")!=-1) {
if (count<4)
p->writeStdin(TQString("N"));
else {
@ -288,15 +288,15 @@ void keyServer::slotsearchread(KProcIO *p)
required=TQString();
}
if (required.tqfind("GOT_IT")!=-1) {
if (required.find("GOT_IT")!=-1) {
count++;
required=TQString();
}
if (required.tqfind("(")==0) {
if (required.find("(")==0) {
cycle=true;
TQString fullname=required.remove(0,required.tqfind(")")+1).stripWhiteSpace();
if (fullname.tqfind("<")!=-1) {
TQString fullname=required.remove(0,required.find(")")+1).stripWhiteSpace();
if (fullname.find("<")!=-1) {
keymail=fullname.section('<',-1,-1);
if (keymail.endsWith(">")) keymail.truncate(keymail.length()-1);
keyname=fullname.section('<',0,0);
@ -312,7 +312,7 @@ void keyServer::slotsearchread(KProcIO *p)
if ((cycle) && (!required.isEmpty())) {
TQString subkey=required.stripWhiteSpace();
if (subkey.tqfind(" key ")!=-1 && subkey.at(0).isDigit ())
if (subkey.find(" key ")!=-1 && subkey.at(0).isDigit ())
{
TQString kid=subkey.section(",",0,0).stripWhiteSpace();
kid=kid.right(8);
@ -324,7 +324,7 @@ void keyServer::slotsearchread(KProcIO *p)
}
else
{
if (subkey.tqfind("<")!=-1) {
if (subkey.find("<")!=-1) {
keymail=subkey.section('<',-1,-1);
if (keymail.endsWith(">")) keymail.truncate(keymail.length()-1);
keyname=subkey.section('<',0,0);
@ -472,12 +472,12 @@ void keyServer::slotimportresult(KProcess*)
parsedOutput=readmessage;
TQStringList importedKeys;
while (parsedOutput.tqfind("IMPORTED")!=-1) {
parsedOutput.remove(0,parsedOutput.tqfind("IMPORTED")+8);
while (parsedOutput.find("IMPORTED")!=-1) {
parsedOutput.remove(0,parsedOutput.find("IMPORTED")+8);
importedKeys+=parsedOutput.section("\n",0,0).stripWhiteSpace();
}
if (readmessage.tqfind("IMPORT_RES")!=-1) {
if (readmessage.find("IMPORT_RES")!=-1) {
importedNb=readmessage.section("IMPORT_RES",-1,-1);
importedNb=importedNb.stripWhiteSpace();
importedNbProcess=importedNb.section(" ",0,0);

@ -183,7 +183,7 @@ if (compressionScheme==0)
else
extension=".tar.bz2";
if (encryptOptions.tqfind("armor")!=encryptOptions.end () )
if (encryptOptions.find("armor")!=encryptOptions.end () )
extension+=".asc";
else if (KGpgSettings::pgpExtension())
extension+=".pgp";
@ -602,7 +602,7 @@ static TQString getGpgHome()
char *env=getenv("GNUPGHOME");
TQString gpgHome(env ? env : TQDir::homeDirPath()+"/.gnupg/");
gpgHome.tqreplace("//", "/");
gpgHome.replace("//", "/");
if(!gpgHome.endsWith("/"))
gpgHome.append('/');
@ -660,7 +660,7 @@ void MyView::startWizard()
fp2 = popen("gpg --display-charset=utf-8 --no-tty --with-colon --list-keys "+TQFile::encodeName(tst.section(':',4,4)), "r");
while ( fgets( line, sizeof(line), fp2)) {
tst2=TQString::fromUtf8(line);
if (tst2.startsWith("pub") && (trustedvals.tqfind(tst2.section(':',1,1))==-1)) {
if (tst2.startsWith("pub") && (trustedvals.find(tst2.section(':',1,1))==-1)) {
counter=true;
wiz->CBdefault->insertItem(tst.section(':',4,4).right(8)+": "+name);
if (firstKey.isEmpty())
@ -1029,8 +1029,8 @@ TQString newtxt=kapp->tqclipboard()->text(clipboardMode);
if (newtxt.length()>300)
newtxt=TQString(newtxt.left(250).stripWhiteSpace())+"...\n"+TQString(newtxt.right(40).stripWhiteSpace());
newtxt.tqreplace(TQRegExp("<"),"&lt;"); ///// disable html tags
newtxt.tqreplace(TQRegExp("\n"),"<br>");
newtxt.replace(TQRegExp("<"),"&lt;"); ///// disable html tags
newtxt.replace(TQRegExp("\n"),"<br>");
pop = new KPassivePopup( this);
pop->setView(i18n("Encrypted following text:"),newtxt,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop));

@ -76,12 +76,12 @@ FILE *fp;
void KgpgInterface::updateIDs(TQString txtString)
{
int cut=txtString.tqfind(' ',22,false);
int cut=txtString.find(' ',22,false);
txtString.remove(0,cut);
if (txtString.tqfind("(",0,false)!=-1)
if (txtString.find("(",0,false)!=-1)
txtString=txtString.section('(',0,0)+txtString.section(')',-1);
txtString.tqreplace(TQRegExp("<"),"&lt;");
if (userIDs.tqfind(txtString)==-1)
txtString.replace(TQRegExp("<"),"&lt;");
if (userIDs.find(txtString)==-1)
{
if (!userIDs.isEmpty())
userIDs+=i18n(" or ");
@ -123,7 +123,7 @@ KgpgInterface::~KgpgInterface()
void KgpgInterface::encryptfin(KProcess *)
{
if (message.tqfind("END_ENCRYPTION")!=-1)
if (message.find("END_ENCRYPTION")!=-1)
emit encryptionfinished(sourceFile);
else {
emit errormessage(message);
@ -134,12 +134,12 @@ void KgpgInterface::readencprocess(KProcIO *p)
{
TQString required;
while (p->readln(required,true)!=-1) {
if (required.tqfind("BEGIN_ENCRYPTION",0,false)!=-1)
if (required.find("BEGIN_ENCRYPTION",0,false)!=-1)
emit processstarted(sourceFile.path());
if (required.tqfind("GET_")!=-1) {
if (required.tqfind("openfile.overwrite.okay")!=-1)
if (required.find("GET_")!=-1) {
if (required.find("openfile.overwrite.okay")!=-1)
p->writeStdin(TQString("Yes"));
else if ((required.tqfind("passphrase.enter")!=-1)) {
else if ((required.find("passphrase.enter")!=-1)) {
TQCString passphrase;
int code=KPasswordDialog::getNewPassword(passphrase,i18n("Enter passphrase for your file (symmetrical encryption):"));
if (code!=TQDialog::Accepted) {
@ -187,7 +187,7 @@ void KgpgInterface::KgpgDecryptFile(KURL srcUrl,KURL destUrl,TQStringList Option
void KgpgInterface::decryptfin(KProcess *)
{
if ((message.tqfind("DECRYPTION_OKAY")!=-1) && (message.tqfind("END_DECRYPTION")!=-1)) //&& (message.tqfind("GOODMDC")!=-1)
if ((message.find("DECRYPTION_OKAY")!=-1) && (message.find("END_DECRYPTION")!=-1)) //&& (message.find("GOODMDC")!=-1)
emit decryptionfinished();
else
emit errormessage(message);
@ -198,22 +198,22 @@ void KgpgInterface::readdecprocess(KProcIO *p)
{
TQString required;
while (p->readln(required,true)!=-1) {
if (required.tqfind("BEGIN_DECRYPTION",0,false)!=-1)
if (required.find("BEGIN_DECRYPTION",0,false)!=-1)
emit processstarted(decryptUrl);
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if (required.tqfind("ENC_TO")!=-1) {
if (required.tqfind("0000000000000000")!=-1)
if (required.find("ENC_TO")!=-1) {
if (required.find("0000000000000000")!=-1)
anonymous=true;
}
if (required.tqfind("GET_")!=-1) {
if (required.tqfind("openfile.overwrite.okay")!=-1)
if (required.find("GET_")!=-1) {
if (required.find("openfile.overwrite.okay")!=-1)
p->writeStdin(TQString("Yes"));
else if ((required.tqfind("passphrase.enter")!=-1)) {
else if ((required.find("passphrase.enter")!=-1)) {
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
userIDs.tqreplace(TQRegExp("<"),"&lt;");
userIDs.replace(TQRegExp("<"),"&lt;");
TQCString passphrase;
TQString passdlgmessage;
if (anonymous)
@ -289,14 +289,14 @@ void KgpgInterface::txtreadencprocess(KProcIO *p)
{
TQString required;
while (p->readln(required,true)!=-1) {
if (required.tqfind("BEGIN_ENCRYPTION",0,false)!=-1)
if (required.find("BEGIN_ENCRYPTION",0,false)!=-1)
{
p->writeStdin(txtToEncrypt,false);
txtToEncrypt=TQString();
p->closeWhenDone();
}
else
if ((required.tqfind("passphrase.enter")!=-1))
if ((required.find("passphrase.enter")!=-1))
{
TQCString passphrase;
TQString passdlgmessage=i18n("Enter passphrase (symmetrical encryption)");
@ -370,23 +370,23 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int )
log.append(data);
int pos;
while ((pos=gpgOutput.tqfind("\n"))!=-1)
while ((pos=gpgOutput.find("\n"))!=-1)
{
TQString required=gpgOutput.left(pos);
gpgOutput.remove(0,pos+2);
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if (required.tqfind("ENC_TO")!=-1)
if (required.find("ENC_TO")!=-1)
{
if (required.tqfind("0000000000000000")!=-1)
if (required.find("0000000000000000")!=-1)
anonymous=true;
}
if (required.tqfind("GET_")!=-1)
if (required.find("GET_")!=-1)
{
if ((required.tqfind("passphrase.enter")!=-1))
if ((required.find("passphrase.enter")!=-1))
{
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
@ -417,16 +417,16 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int )
}
}
if (required.tqfind("BEGIN_DECRYPTION")!=-1)
if (required.find("BEGIN_DECRYPTION")!=-1)
{
p->closeStdin();
required=TQString();
}
if (required.tqfind("END_DECRYPTION")!=-1) decfinished=true;
if (required.tqfind("DECRYPTION_OKAY")!=-1) decok=true;
if (required.tqfind("DECRYPTION_FAILED")!=-1) decok=false;
if (required.tqfind("BADMDC")!=-1) badmdc=true;
if (required.find("END_DECRYPTION")!=-1) decfinished=true;
if (required.find("DECRYPTION_OKAY")!=-1) decok=true;
if (required.find("DECRYPTION_FAILED")!=-1) decok=false;
if (required.find("BADMDC")!=-1) badmdc=true;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////// Text signing
@ -482,17 +482,17 @@ void KgpgInterface::txtsignprocess(KProcIO *p)
while (p->readln(required,true)!=-1) {
// kdDebug(2100)<<"SIGNING: "<<required<<endl;
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if (required.tqfind("GOOD_PASSPHRASE")!=-1)
if (required.find("GOOD_PASSPHRASE")!=-1)
{
p->writeStdin(message,true);
message=TQString();
p->closeWhenDone();
}
if ((required.tqfind("passphrase.enter")!=-1))
if ((required.find("passphrase.enter")!=-1))
{
if (step>1) step--;
else step=3;
@ -586,13 +586,13 @@ TQString required;
required=required.section("]",1,-1).stripWhiteSpace();
if (required.startsWith("GOODSIG"))
{
TQString userName=required.section(" ",2,-1).tqreplace(TQRegExp("<"),"&lt;");
TQString userName=required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;");
userName=checkForUtf8(userName);
signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").tqarg(userName).tqarg("0x"+required.section(" ",1,1).right(8));
}
if (required.startsWith("BADSIG"))
{
signID=i18n("<qt><b>Bad signature</b> from:<br>%1<br>Key ID: %2<br><br><b>Text is corrupted.</b></qt>").tqarg(required.section(" ",2,-1).tqreplace(TQRegExp("<"),"&lt;")).tqarg("0x"+required.section(" ",1,1).right(8));
signID=i18n("<qt><b>Bad signature</b> from:<br>%1<br>Key ID: %2<br><br><b>Text is corrupted.</b></qt>").tqarg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).tqarg("0x"+required.section(" ",1,1).right(8));
}
if (required.startsWith("NO_PUBKEY"))
{
@ -670,8 +670,8 @@ void Md5Widget::slotApply()
text = cb->text(TQClipboard::Clipboard);
if ( !text.isEmpty() ) {
text=text.stripWhiteSpace();
while (text.tqfind(' ')!=-1)
text.remove(text.tqfind(' '),1);
while (text.find(' ')!=-1)
text.remove(text.find(' '),1);
if (text==mdSum) {
TextLabel1_2->setText(i18n("<b>Correct checksum</b>, file is ok."));
KLed1->setColor(TQColor(0,255,0));
@ -714,9 +714,9 @@ void KgpgInterface::KgpgSignFile(TQString keyID,KURL srcUrl,TQStringList Options
void KgpgInterface::signfin(KProcess *)
{
if (message.tqfind("SIG_CREATED")!=-1)
if (message.find("SIG_CREATED")!=-1)
KMessageBox::information(0,i18n("The signature file %1 was successfully created.").tqarg(file.fileName()));
else if (message.tqfind("BAD_PASSPHRASE")!=-1)
else if (message.find("BAD_PASSPHRASE")!=-1)
KMessageBox::sorry(0,i18n("Bad passphrase, signature was not created."));
else
KMessageBox::sorry(0,message);
@ -728,13 +728,13 @@ void KgpgInterface::readsignprocess(KProcIO *p)
{
TQString required;
while (p->readln(required,true)!=-1) {
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if (required.tqfind("GET_")!=-1) {
if (required.tqfind("openfile.overwrite.okay")!=-1)
if (required.find("GET_")!=-1) {
if (required.find("openfile.overwrite.okay")!=-1)
p->writeStdin(TQString("Yes"));
else if ((required.tqfind("passphrase.enter")!=-1)) {
else if ((required.find("passphrase.enter")!=-1)) {
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
TQCString passphrase;
@ -790,7 +790,7 @@ TQString required;
while (p->readln(required,true)!=-1)
{
message+=required+"\n";
if (required.tqfind("GET_")!=-1) {
if (required.find("GET_")!=-1) {
p->writeStdin(TQString("quit"));
p->closeWhenDone();
}
@ -799,12 +799,12 @@ TQString required;
signID=i18n("No signature found.");
if (required.startsWith("GOODSIG"))
{
signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").tqarg(required.section(" ",2,-1).tqreplace(TQRegExp("<"),"&lt;")).tqarg("0x"+required.section(" ",1,1).right(8));
signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").tqarg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).tqarg("0x"+required.section(" ",1,1).right(8));
}
if (required.startsWith("BADSIG"))
{
signID=i18n("<qt><b>BAD signature</b> from:<br> %1<br>Key id: %2<br><br>"
"<b>The file is corrupted!</b></qt>").tqarg(required.section(" ",2,-1).tqreplace(TQRegExp("<"),"&lt;")).tqarg("0x"+required.section(" ",1,1).right(8));
"<b>The file is corrupted!</b></qt>").tqarg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).tqarg("0x"+required.section(" ",1,1).right(8));
}
if (required.startsWith("NO_PUBKEY"))
{
@ -839,7 +839,7 @@ void KgpgInterface::verifyfin(KProcess *)
void KgpgInterface::KgpgSignKey(TQString keyID,TQString signKeyID,TQString signKeyMail,bool local,int checking)
{
signKeyMail.tqreplace(TQRegExp("<"),"&lt;");
signKeyMail.replace(TQRegExp("<"),"&lt;");
konsChecked=checking;
konsLocal=local;
konsSignKey=signKeyID;
@ -872,40 +872,40 @@ void KgpgInterface::sigprocess(KProcIO *p)
{
output+=required+"\n";
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if (signSuccess==4) {
if (required.tqfind("GET_")!=-1)
if (required.find("GET_")!=-1)
p->writeStdin(TQString("quit"));
p->closeWhenDone();
return;
}
if ((required.tqfind("GOOD_PASSPHRASE")!=-1)) {
if ((required.find("GOOD_PASSPHRASE")!=-1)) {
signSuccess=3;
step=2;
}
if (required.tqfind("sign_uid.expire")!=-1) {
if (required.find("sign_uid.expire")!=-1) {
p->writeStdin(TQString("Never"));
required=TQString();
}
if (required.tqfind("sign_uid.class")!=-1) {
if (required.find("sign_uid.class")!=-1) {
p->writeStdin(TQString::number(konsChecked));
required=TQString();
}
if (required.tqfind("sign_uid.okay")!=-1) {
if (required.find("sign_uid.okay")!=-1) {
p->writeStdin(TQString("Y"));
required=TQString();
}
if (required.tqfind("sign_all.okay")!=-1) {
if (required.find("sign_all.okay")!=-1) {
p->writeStdin(TQString("Y"));
required=TQString();
}
if (required.tqfind("passphrase.enter")!=-1) {
if (required.find("passphrase.enter")!=-1) {
TQCString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>%1 Enter passphrase for <b>%2</b>:</qt>")
.tqarg(errMessage).tqarg(userIDs));
@ -920,16 +920,16 @@ void KgpgInterface::sigprocess(KProcIO *p)
required=TQString();
// step=2;
}
if ((step==2) && (required.tqfind("keyedit.prompt")!=-1)) {
if ((step==2) && (required.find("keyedit.prompt")!=-1)) {
p->writeStdin(TQString("save"));
required=TQString();
}
if (required.tqfind("BAD_PASSPHRASE")!=-1) {
if (required.find("BAD_PASSPHRASE")!=-1) {
errMessage=i18n("<b>Bad passphrase</b>. Try again.</br>");
required=TQString();
signSuccess=2; ///// bad passphrase
}
if (required.tqfind("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode
if (required.find("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode
{
if (signSuccess!=2)
signSuccess=1; ///// switching to console mode
@ -997,7 +997,7 @@ void KgpgInterface::KgpgDelSignature(TQString keyID,TQString signKeyID)
while ( fgets( buffer, sizeof(buffer), fp)) {
encResult=buffer;
if (encResult.startsWith("sig")) {
if (encResult.tqfind(message)!=-1)
if (encResult.find(message)!=-1)
break;
signb++;
} else if (encResult.startsWith("rev"))
@ -1019,7 +1019,7 @@ void KgpgInterface::delsigprocess(KProcIO *p)
TQString required=TQString();
while (p->readln(required,true)!=-1)
{
if (required.tqfind("keyedit.delsig")!=-1){
if (required.find("keyedit.delsig")!=-1){
if ((sigsearch==signb) && (step==0)) {
p->writeStdin(TQString("Y"));
@ -1029,12 +1029,12 @@ void KgpgInterface::delsigprocess(KProcIO *p)
sigsearch++;
required=TQString();
}
if ((step==1) && (required.tqfind("keyedit.prompt")!=-1)) {
if ((step==1) && (required.find("keyedit.prompt")!=-1)) {
p->writeStdin(TQString("save"));
required=TQString();
deleteSuccess=true;
}
if (required.tqfind("GET_LINE")!=-1) {
if (required.find("GET_LINE")!=-1) {
p->writeStdin(TQString("quit"));
p->closeWhenDone();
deleteSuccess=false;
@ -1097,20 +1097,20 @@ void KgpgInterface::expprocess(KProcIO *p)
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if ((required.tqfind("GOOD_PASSPHRASE")!=-1)) {
if ((required.find("GOOD_PASSPHRASE")!=-1)) {
expSuccess=3;
step=2;
}
if (required.tqfind("keygen.valid")!=-1) {
if (required.find("keygen.valid")!=-1) {
p->writeStdin(TQString::number(expirationDelay));
required=TQString();
}
if (required.tqfind("passphrase.enter")!=-1) {
if (required.find("passphrase.enter")!=-1) {
TQCString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs));
if (code!=TQDialog::Accepted) {
@ -1123,22 +1123,22 @@ void KgpgInterface::expprocess(KProcIO *p)
required=TQString();
// step=2;
}
if ((step==2) && (required.tqfind("keyedit.prompt")!=-1)) {
if ((step==2) && (required.find("keyedit.prompt")!=-1)) {
p->writeStdin(TQString("save"));
p->closeWhenDone();
required=TQString();
}
if ((step==2) && (required.tqfind("keyedit.save.okay")!=-1)) {
if ((step==2) && (required.find("keyedit.save.okay")!=-1)) {
p->writeStdin(TQString("YES"));
p->closeWhenDone();
required=TQString();
}
if (required.tqfind("BAD_PASSPHRASE")!=-1) {
if (required.find("BAD_PASSPHRASE")!=-1) {
p->writeStdin(TQString("quit"));
p->closeWhenDone();
expSuccess=2; ///// bad passphrase
}
if ((required.tqfind("GET_")!=-1) && (expSuccess!=2)) /////// gpg asks for something unusal, turn to konsole mode
if ((required.find("GET_")!=-1) && (expSuccess!=2)) /////// gpg asks for something unusal, turn to konsole mode
{
expSuccess=1; ///// switching to console mode
p->writeStdin(TQString("quit"));
@ -1189,23 +1189,23 @@ void KgpgInterface::trustprocess(KProcIO *p)
TQString required=TQString();
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.tqfind("edit_ownertrust.set_ultimate.okay")!=-1) {
if (required.find("edit_ownertrust.set_ultimate.okay")!=-1) {
p->writeStdin(TQString("YES"));
required=TQString();
}
if (required.tqfind("edit_ownertrust.value")!=-1) {
if (required.find("edit_ownertrust.value")!=-1) {
p->writeStdin(TQString::number(trustValue));
required=TQString();
}
if (required.tqfind("keyedit.prompt")!=-1) {
if (required.find("keyedit.prompt")!=-1) {
p->writeStdin(TQString("save"));
p->closeWhenDone();
required=TQString();
}
if (required.tqfind("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode
if (required.find("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode
{
expSuccess=1; ///// switching to console mode
p->writeStdin(TQString("quit"));
@ -1247,10 +1247,10 @@ void KgpgInterface::passprocess(KProcIO *p)
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if ((step>2) && (required.tqfind("keyedit.prompt")!=-1)) {
if ((step>2) && (required.find("keyedit.prompt")!=-1)) {
if (step==3)
{
emit passwordChanged();
@ -1260,18 +1260,18 @@ void KgpgInterface::passprocess(KProcIO *p)
required=TQString();
}
if ((required.tqfind("GOOD_PASSPHRASE")!=-1) && (step==2))
if ((required.find("GOOD_PASSPHRASE")!=-1) && (step==2))
step=3;
if ((required.tqfind("BAD_PASSPHRASE")!=-1) && (step==2)) {
if ((required.find("BAD_PASSPHRASE")!=-1) && (step==2)) {
step=1;
message=i18n("<b>Bad passphrase</b>. Try again<br>");
}
if ((required.tqfind("passphrase.enter")!=-1)) {
if ((required.find("passphrase.enter")!=-1)) {
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
userIDs.tqreplace(TQRegExp("<"),"&lt;");
userIDs.replace(TQRegExp("<"),"&lt;");
if (step==1) {
TQCString passphrase;
@ -1307,7 +1307,7 @@ void KgpgInterface::passprocess(KProcIO *p)
}
if (required.tqfind("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode
if (required.find("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode
{
p->writeStdin(TQString("quit"));
p->closeWhenDone();
@ -1394,14 +1394,14 @@ kdDebug(2100)<<"Importing is over"<<endl;
TQString parsedOutput=message;
TQStringList importedKeys;
while (parsedOutput.tqfind("IMPORTED")!=-1) {
parsedOutput.remove(0,parsedOutput.tqfind("IMPORTED")+8);
while (parsedOutput.find("IMPORTED")!=-1) {
parsedOutput.remove(0,parsedOutput.find("IMPORTED")+8);
importedKeys<<parsedOutput.section("\n",0,0).stripWhiteSpace();
importedKeysIds<<parsedOutput.stripWhiteSpace().section(' ',0,0);
}
if (message.tqfind("IMPORT_RES")!=-1) {
if (message.find("IMPORT_RES")!=-1) {
parsedOutput=message.section("IMPORT_RES",-1,-1).stripWhiteSpace();
messageList=TQStringList::split(" ",parsedOutput,true);
@ -1460,7 +1460,7 @@ void KgpgInterface::importprocess(KProcIO *p)
{
TQString outp;
while (p->readln(outp)!=-1) {
if (outp.tqfind("http-proxy")==-1)
if (outp.find("http-proxy")==-1)
message+=outp+"\n";
}
}
@ -1496,25 +1496,25 @@ void KgpgInterface::adduidprocess(KProcIO *p)
TQString required=TQString();
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if (required.tqfind("keygen.name")!=-1) {
if (required.find("keygen.name")!=-1) {
p->writeStdin(uidName);
required=TQString();
}
if (required.tqfind("keygen.email")!=-1) {
if (required.find("keygen.email")!=-1) {
p->writeStdin(uidEmail);
required=TQString();
}
if (required.tqfind("keygen.comment")!=-1) {
if (required.find("keygen.comment")!=-1) {
p->writeStdin(uidComment);
required=TQString();
}
if (required.tqfind("passphrase.enter")!=-1) {
if (required.find("passphrase.enter")!=-1) {
TQCString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>")
.tqarg(userIDs));
@ -1529,12 +1529,12 @@ void KgpgInterface::adduidprocess(KProcIO *p)
}
if (required.tqfind("keyedit.prompt")!=-1) {
if (required.find("keyedit.prompt")!=-1) {
p->writeStdin(TQString("save"));
required=TQString();
}
if ((required.tqfind("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
{
kdDebug(2100)<<"unknown request"<<endl;
addSuccess=false; ///// switching to console mode
@ -1629,15 +1629,15 @@ void KgpgInterface::delphotoprocess(KProcIO *p)
TQString required=TQString();
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if (required.tqfind("keyedit.remove.uid.okay")!=-1) {
if (required.find("keyedit.remove.uid.okay")!=-1) {
p->writeStdin(TQString("YES"));
required=TQString();
}
if (required.tqfind("passphrase.enter")!=-1) {
if (required.find("passphrase.enter")!=-1) {
TQCString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs));
if (code!=TQDialog::Accepted) {
@ -1651,12 +1651,12 @@ void KgpgInterface::delphotoprocess(KProcIO *p)
}
if (required.tqfind("keyedit.prompt")!=-1) {
if (required.find("keyedit.prompt")!=-1) {
p->writeStdin(TQString("save"));
required=TQString();
}
if ((required.tqfind("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
{
kdDebug(2100)<<"unknown request"<<endl;
delSuccess=false;
@ -1692,15 +1692,15 @@ void KgpgInterface::addphotoprocess(KProcIO *p)
TQString required=TQString();
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if (required.tqfind("photoid.jpeg.add")!=-1) {
if (required.find("photoid.jpeg.add")!=-1) {
p->writeStdin(photoUrl);
required=TQString();
}
if (required.tqfind("photoid.jpeg.size")!=-1) {
if (required.find("photoid.jpeg.size")!=-1) {
if (KMessageBox::questionYesNo(0,i18n("This image is very large. Use it anyway?"), TQString(), i18n("Use Anyway"), i18n("Do Not Use"))==KMessageBox::Yes)
p->writeStdin(TQString("Yes"));
else
@ -1712,7 +1712,7 @@ void KgpgInterface::addphotoprocess(KProcIO *p)
required=TQString();
}
if (required.tqfind("passphrase.enter")!=-1) {
if (required.find("passphrase.enter")!=-1) {
TQCString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs));
if (code!=TQDialog::Accepted) {
@ -1726,12 +1726,12 @@ void KgpgInterface::addphotoprocess(KProcIO *p)
}
if (required.tqfind("keyedit.prompt")!=-1) {
if (required.find("keyedit.prompt")!=-1) {
p->writeStdin(TQString("save"));
required=TQString();
}
if ((required.tqfind("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
{
kdDebug(2100)<<"unknown request"<<endl;
p->writeStdin(TQString("quit"));
@ -1782,23 +1782,23 @@ void KgpgInterface::revokeprocess(KProcIO *p)
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.tqfind("USERID_HINT",0,false)!=-1)
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
if ((required.tqfind("GOOD_PASSPHRASE")!=-1))
if ((required.find("GOOD_PASSPHRASE")!=-1))
revokeSuccess=true;
if ((required.tqfind("gen_revoke.okay")!=-1) || (required.tqfind("ask_revocation_reason.okay")!=-1) || (required.tqfind("openfile.overwrite.okay")!=-1)) {
if ((required.find("gen_revoke.okay")!=-1) || (required.find("ask_revocation_reason.okay")!=-1) || (required.find("openfile.overwrite.okay")!=-1)) {
p->writeStdin(TQString("YES"));
required=TQString();
}
if (required.tqfind("ask_revocation_reason.code")!=-1) {
if (required.find("ask_revocation_reason.code")!=-1) {
p->writeStdin(TQString::number(revokeReason));
required=TQString();
}
if (required.tqfind("passphrase.enter")!=-1) {
if (required.find("passphrase.enter")!=-1) {
TQCString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs));
if (code!=TQDialog::Accepted) {
@ -1811,13 +1811,13 @@ void KgpgInterface::revokeprocess(KProcIO *p)
required=TQString();
}
if (required.tqfind("ask_revocation_reason.text")!=-1) {
if (required.find("ask_revocation_reason.text")!=-1) {
// kdDebug(2100)<<"description"<<endl;
p->writeStdin(revokeDescription);
revokeDescription=TQString();
required=TQString();
}
if ((required.tqfind("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
{
kdDebug(2100)<<"unknown request"<<endl;
expSuccess=1; ///// switching to console mode
@ -2119,7 +2119,7 @@ void KgpgInterface::setGpgBoolSetting(TQString name,bool enable,TQString url)
TQString KgpgInterface::checkForUtf8bis(TQString txt)
{
if (strchr (txt.ascii(), 0xc3) || (txt.tqfind("\\x")!=-1))
if (strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1))
txt=checkForUtf8(txt);
else {
txt=checkForUtf8(txt);
@ -2141,18 +2141,18 @@ TQString KgpgInterface::checkForUtf8(TQString txt)
for (s = txt.ascii(); *s && !(*s & 0x80); s++)
;
if (*s && !strchr (txt.ascii(), 0xc3) && (txt.tqfind("\\x")==-1))
if (*s && !strchr (txt.ascii(), 0xc3) && (txt.find("\\x")==-1))
return txt;
/* The string is not in UTF-8 */
//if (strchr (txt.ascii(), 0xc3)) return (txt+" +++");
if (txt.tqfind("\\x")==-1)
if (txt.find("\\x")==-1)
return TQString::fromUtf8(txt.ascii());
// if (!strchr (txt.ascii(), 0xc3) || (txt.tqfind("\\x")!=-1)) {
for ( int idx = 0 ; (idx = txt.tqfind( "\\x", idx )) >= 0 ; ++idx ) {
// if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) {
for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) {
char str[2] = "x";
str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 );
txt.tqreplace( idx, 4, str );
txt.replace( idx, 4, str );
}
if (!strchr (txt.ascii(), 0xc3))
return TQString::fromUtf8(txt.ascii());

@ -84,7 +84,7 @@ void KgpgLibrary::fastencode(KURL &fileToCrypt,TQStringList selec,TQStringList e
}
urlselected=fileToCrypt;
KURL dest;
if (encryptOptions.tqfind("--armor")!=encryptOptions.end())
if (encryptOptions.find("--armor")!=encryptOptions.end())
dest.setPath(urlselected.path()+".asc");
else
dest.setPath(urlselected.path()+extension);

@ -416,7 +416,7 @@ void kgpgOptions::updateSettings()
for (uint i=0;i<page6->ServerBox->count();i++)
{
TQString currItem=page6->ServerBox->text(i);
if (currItem.tqfind(" ")!=-1) // it is the default keyserver
if (currItem.find(" ")!=-1) // it is the default keyserver
keyServer=currItem.section(" ",0,0);
else
{
@ -538,7 +538,7 @@ void kgpgOptions::listkey()
tst=line;
if (tst.startsWith("pub")) {
name=KgpgInterface::checkForUtf8(tst.section(':',9,9));
if ((!name.isEmpty()) && (trustedvals.tqfind(tst.section(':',1,1))==-1)) {
if ((!name.isEmpty()) && (trustedvals.find(tst.section(':',1,1))==-1)) {
counter++;
//name=name.section('<',-1,-1);
// name=name.section('>',0,0);
@ -546,7 +546,7 @@ void kgpgOptions::listkey()
ids+=tst.section(':',4,4);
if (tst.section(':',4,4).right(8)==alwaysKeyID)
alwaysKeyName=tst.section(':',4,4).right(8)+":"+name;
if (issec.tqfind(tst.section(':',4,4).right(8),0,FALSE)!=-1)
if (issec.find(tst.section(':',4,4).right(8),0,FALSE)!=-1)
{
//*** page1->file_key->insertItem(pixkeyDouble,tst.section(':',4,4).right(8)+":"+name);
//*** page1->always_key->insertItem(pixkeyDouble,tst.section(':',4,4).right(8)+":"+name);
@ -572,13 +572,13 @@ void kgpgOptions::slotAddKeyServer()
TQString newServer=KInputDialog::getText(i18n("Add New Key Server"),i18n("Server URL:"));
if (!newServer.isEmpty())
page6->ServerBox->insertItem(newServer.stripWhiteSpace());
page6->ServerBox->setSelected(page6->ServerBox->tqfindItem(newServer.stripWhiteSpace()),true);
page6->ServerBox->setSelected(page6->ServerBox->findItem(newServer.stripWhiteSpace()),true);
}
void kgpgOptions::slotDelKeyServer()
{
bool defaultDeleted=false;
if (page6->ServerBox->currentText().tqfind(" ")!=-1) defaultDeleted=true;
if (page6->ServerBox->currentText().find(" ")!=-1) defaultDeleted=true;
page6->ServerBox->removeItem(page6->ServerBox->currentItem());
page6->ServerBox->setSelected(0,true);
if (defaultDeleted) page6->ServerBox->changeItem(page6->ServerBox->currentText().section(" ",0,0)+" "+i18n("(Default)"),0);

@ -271,12 +271,12 @@ KDialogBase( tqparent, name, true,i18n("Private Key List"),Ok | Cancel)
dead=false;
break;
case '-':
if (tst2.section(':',11,11).tqfind('D')==-1) warn=true;
if (tst2.section(':',11,11).find('D')==-1) warn=true;
break;
default:
break;
}
if (tst2.section(':',11,11).tqfind('D')!=-1)
if (tst2.section(':',11,11).find('D')!=-1)
dead=true;
break;
}
@ -284,7 +284,7 @@ KDialogBase( tqparent, name, true,i18n("Private Key List"),Ok | Cancel)
pclose(fp2);
if (!fullname.isEmpty() && (!dead)) {
TQString keyMail,keyName;
if (fullname.tqfind("<")!=-1) {
if (fullname.find("<")!=-1) {
keyMail=fullname.section('<',-1,-1);
keyMail.truncate(keyMail.length()-1);
keyName=fullname.section('<',0,0);
@ -301,7 +301,7 @@ KDialogBase( tqparent, name, true,i18n("Private Key List"),Ok | Cancel)
KListViewItem *sub= new KListViewItem(item,i18n("Expiration:"),val);
sub->setSelectable(false);
item->setPixmap(0,keyPair);
if (preselected.tqfind(id,0,false)!=-1) {
if (preselected.find(id,0,false)!=-1) {
keysListpr->setSelected(item,true);
keysListpr->setCurrentItem(item);
selectedok=true;
@ -506,7 +506,7 @@ void mySearchLine::updateSearch(const TQString& s)
{
if (item->isVisible() && !(item->text(6).isEmpty()))
{
if (searchListView->displayOnlySecret && searchListView->secretList.tqfind(item->text(6))==-1)
if (searchListView->displayOnlySecret && searchListView->secretList.find(item->text(6))==-1)
item->setVisible(false);
if (!searchListView->displayDisabled && item->pixmap(2))
if (item->pixmap(2)->serialNumber()==disabledSerial)
@ -838,7 +838,7 @@ void listKeys::slotToggleDisabled()
void listKeys::slotGotoDefaultKey()
{
TQListViewItem *myDefaulKey = keysList2->tqfindItem(KGpgSettings::defaultKey(),6);
TQListViewItem *myDefaulKey = keysList2->findItem(KGpgSettings::defaultKey(),6);
keysList2->clearSelection();
keysList2->setCurrentItem(myDefaulKey);
keysList2->setSelected(myDefaulKey,true);
@ -1006,7 +1006,7 @@ void listKeys::slotSetPhotoSize(int size)
TQListViewItem *newdef = keysList2->firstChild();
while (newdef) {
//if ((keysList2->photoKeysList.tqfind(newdef->text(6))!=-1) && (newdef->childCount ()>0))
//if ((keysList2->photoKeysList.find(newdef->text(6))!=-1) && (newdef->childCount ()>0))
if (newdef->childCount ()>0) {
bool hasphoto=false;
TQListViewItem *newdefChild = newdef->firstChild();
@ -1049,19 +1049,19 @@ void listKeys::findFirstKey()
//
KFind *m_tqfind = new KFind(searchString, searchOptions,this);
m_tqfind->setData(searchText);
while (m_tqfind->find()==KFind::NoMatch) {
KFind *m_find = new KFind(searchString, searchOptions,this);
m_find->setData(searchText);
while (m_find->find()==KFind::NoMatch) {
if (!item->nextSibling()) {
foundItem=false;
break;
} else {
item = item->nextSibling();
searchText=item->text(0)+" "+item->text(1)+" "+item->text(6);
m_tqfind->setData(searchText);
m_find->setData(searchText);
}
}
delete m_tqfind;
delete m_find;
if (foundItem) {
@ -1091,20 +1091,20 @@ void listKeys::findNextKey()
//kdDebug(2100)<<"Next string:"<<searchText<<endl;
//kdDebug(2100)<<"Search:"<<searchString<<endl;
//kdDebug(2100)<<"OPts:"<<searchOptions<<endl;
KFind *m_tqfind = new KFind(searchString, searchOptions,this);
m_tqfind->setData(searchText);
while (m_tqfind->find()==KFind::NoMatch) {
KFind *m_find = new KFind(searchString, searchOptions,this);
m_find->setData(searchText);
while (m_find->find()==KFind::NoMatch) {
if (!item->nextSibling()) {
foundItem=false;
break;
} else {
item = item->nextSibling();
searchText=item->text(0)+" "+item->text(1)+" "+item->text(6);
m_tqfind->setData(searchText);
m_find->setData(searchText);
//kdDebug(2100)<<"Next string:"<<searchText<<endl;
}
}
delete m_tqfind;
delete m_find;
if (foundItem) {
keysList2->clearSelection();
keysList2->setCurrentItem(item);
@ -1309,7 +1309,7 @@ void listKeys::slotSetDefKey()
void listKeys::slotSetDefaultKey(TQString newID)
{
TQListViewItem *newdef = keysList2->tqfindItem(newID,6);
TQListViewItem *newdef = keysList2->findItem(newID,6);
if (newdef)
slotSetDefaultKey(newdef);
}
@ -1328,7 +1328,7 @@ void listKeys::slotSetDefaultKey(TQListViewItem *newdef)
return;
}
TQListViewItem *olddef = keysList2->tqfindItem(KGpgSettings::defaultKey(),6);
TQListViewItem *olddef = keysList2->findItem(KGpgSettings::defaultKey(),6);
KGpgSettings::setDefaultKey(newdef->text(6));
KGpgSettings::writeConfig();
@ -1382,10 +1382,10 @@ void listKeys::slotmenu(TQListViewItem *sel, const TQPoint &pos, int )
if (keysList2->currentItem()->text(6).isEmpty())
popupgroup->exec(pos);
else {
if ((keysList2->secretList.tqfind(sel->text(6))!=-1) && (keysList2->selectedItems().count()==1))
if ((keysList2->secretList.find(sel->text(6))!=-1) && (keysList2->selectedItems().count()==1))
popupsec->exec(pos);
else
if ((keysList2->orphanList.tqfind(sel->text(6))!=-1) && (keysList2->selectedItems().count()==1))
if ((keysList2->orphanList.find(sel->text(6))!=-1) && (keysList2->selectedItems().count()==1))
popuporphan->exec(pos);
else
popup->exec(pos);
@ -1730,7 +1730,7 @@ void listKeys::createNewGroup()
TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
KGpgSettings::setGroups(groups.join(","));
keysList2->refreshgroups();
TQListViewItem *newgrp = keysList2->tqfindItem(groupName,0);
TQListViewItem *newgrp = keysList2->findItem(groupName,0);
keysList2->clearSelection();
keysList2->setCurrentItem(newgrp);
@ -2232,7 +2232,7 @@ void listKeys::readgenprocess(KProcIO *p)
{
TQString required;
while (p->readln(required,true)!=-1) {
if (required.tqfind("KEY_CREATED")!=-1)
if (required.find("KEY_CREATED")!=-1)
newkeyFinger=required.stripWhiteSpace().section(' ',-1);
message+=required+"\n";
}
@ -2299,7 +2299,7 @@ void listKeys::newKeyDone(KProcess *)
delete pop;
keyCreated->exec();
TQListViewItem *newdef = keysList2->tqfindItem(newkeyID,6);
TQListViewItem *newdef = keysList2->findItem(newkeyID,6);
if (newdef)
if (page->CBdefault->isChecked())
slotSetDefaultKey(newdef);
@ -2388,7 +2388,7 @@ void listKeys::confirmdeletekey()
deleteGroup();
return;
}
if (((keysList2->secretList.tqfind(keysList2->currentItem()->text(6))!=-1) || (keysList2->orphanList.tqfind(keysList2->currentItem()->text(6))!=-1)) && (keysList2->selectedItems().count()==1))
if (((keysList2->secretList.find(keysList2->currentItem()->text(6))!=-1) || (keysList2->orphanList.find(keysList2->currentItem()->text(6))!=-1)) && (keysList2->selectedItems().count()==1))
deleteseckey();
else {
TQStringList keysToDelete;
@ -2397,7 +2397,7 @@ void listKeys::confirmdeletekey()
bool secretKeyInside=false;
for ( uint i = 0; i < exportList.count(); ++i )
if ( exportList.at(i) ) {
if (keysList2->secretList.tqfind(exportList.at(i)->text(6))!=-1) {
if (keysList2->secretList.find(exportList.at(i)->text(6))!=-1) {
secretKeyInside=true;
secList+=exportList.at(i)->text(0)+" ("+exportList.at(i)->text(1)+")<br>";
exportList.at(i)->setSelected(false);
@ -2718,14 +2718,14 @@ void KeyView::refreshkeylist()
TQStringList::Iterator ite;
ite=issec.tqfind(pubKey.gpgkeyid.right(8));
ite=issec.find(pubKey.gpgkeyid.right(8));
if (ite!=issec.end()) {
item->setPixmap(0,pixkeyPair);
secretList+=pubKey.gpgkeyid;
issec.remove(*ite);
} else item->setPixmap(0,pixkeySingle);
if (openKeys.tqfind(pubKey.gpgkeyid)!=-1)
if (openKeys.find(pubKey.gpgkeyid)!=-1)
item->setOpen(true);
}
@ -2753,9 +2753,9 @@ void KeyView::refreshkeylist()
if(current != NULL) {
// select previous selected
if (!current->text(6).isEmpty())
newPos = tqfindItem(current->text(6), 6);
newPos = findItem(current->text(6), 6);
else
newPos = tqfindItem(current->text(0), 0);
newPos = findItem(current->text(0), 0);
delete current;
}
@ -2816,7 +2816,7 @@ void KeyView::insertOrphanedKeys(TQStringList orphans)
fp = popen("gpg --no-secmem-warning --no-tty --with-colons --list-secret-keys", "r");
while ( fgets( line, sizeof(line), fp)) {
TQString lineRead=TQString::fromUtf8(line);
if ((lineRead.startsWith("sec")) && (orphans.tqfind(lineRead.section(':',4,4).right(8))!=orphans.end())) {
if ((lineRead.startsWith("sec")) && (orphans.find(lineRead.section(':',4,4).right(8))!=orphans.end())) {
gpgKey orphanedKey=extractKey(lineRead);
bool isbold=false;
@ -2881,7 +2881,7 @@ void KeyView::slotReloadKeys(TQStringList keyIDs)
refreshcurrentkey(*it);
}
kdDebug(2100)<<"Refreshing key:--------"<<TQString((keyIDs.last()).right(8).prepend("0x"))<<endl;
ensureItemVisible(this->tqfindItem((keyIDs.last()).right(8).prepend("0x"),6));
ensureItemVisible(this->findItem((keyIDs.last()).right(8).prepend("0x"),6));
emit statusMessage(i18n("%1 Keys, %2 Groups").tqarg(childCount()-groupNb).tqarg(groupNb),1);
emit statusMessage(i18n("Ready"),0);
}
@ -2911,12 +2911,12 @@ void KeyView::slotReloadOrphaned()
TQStringList::Iterator it;
for ( it = issec.begin(); it != issec.end(); ++it ) {
if (tqfindItem(*it,6)==0) {
if (findItem(*it,6)==0) {
insertOrphan(*it);
orphanList+=*it+",";
}
}
setSelected(tqfindItem(*it,6),true);
setSelected(findItem(*it,6),true);
emit statusMessage(i18n("%1 Keys, %2 Groups").tqarg(childCount()-groupNb).tqarg(groupNb),1);
emit statusMessage(i18n("Ready"),0);
}
@ -2958,7 +2958,7 @@ void KeyView::refreshcurrentkey(TQString currentID)
item->setPixmap(2,pubKey.trustpic);
item->setVisible(true);
item->setExpandable(true);
if (issec.tqfind(pubKey.gpgkeyid.right(8),0,FALSE)!=-1) {
if (issec.find(pubKey.gpgkeyid.right(8),0,FALSE)!=-1) {
item->setPixmap(0,pixkeyPair);
secretList+=pubKey.gpgkeyid;
} else {
@ -2969,12 +2969,12 @@ void KeyView::refreshcurrentkey(TQString currentID)
pclose(fp);
if (!keyFound) {
if (orphanList.tqfind(currentID)==-1)
if (orphanList.find(currentID)==-1)
orphanList+=currentID+",";
insertOrphan(currentID);
return;
}
if (orphanList.tqfind(currentID)!=-1)
if (orphanList.find(currentID)!=-1)
orphanList.remove(currentID);
clearSelection();
@ -3059,7 +3059,7 @@ gpgKey KeyView::extractKey(TQString keyColon)
ret.gpgkeyexpiration=KGlobal::locale()->formatDate(date, true);
}
TQString fullname=keyString[9];
if (fullname.tqfind("<")!=-1) {
if (fullname.find("<")!=-1) {
ret.gpgkeymail=fullname.section('<',-1,-1);
ret.gpgkeymail.truncate(ret.gpgkeymail.length()-1);
ret.gpgkeyname=fullname.section('<',0,0);
@ -3138,7 +3138,7 @@ gpgKey KeyView::extractKey(TQString keyColon)
ret.trustpic=trustunknown;
break;
}
if (keyString[11].tqfind('D')!=-1) {
if (keyString[11].find('D')!=-1) {
ret.gpgkeytrust=i18n("Disabled");
ret.trustpic=trustbad;
}

@ -256,7 +256,7 @@ void popupPublic::sort()
if (current==NULL)
return;
if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){
if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){
if (current->isSelected()) {
current->setSelected(false);
reselect=true;
@ -266,7 +266,7 @@ void popupPublic::sort()
while ( current->nextSibling() ) {
current = current->nextSibling();
if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) {
if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) {
if (current->isSelected()) {
current->setSelected(false);
reselect=true;
@ -304,7 +304,7 @@ void popupPublic::customOpts(const TQString &str)
void popupPublic::slotGotoDefaultKey()
{
TQListViewItem *myDefaulKey = keysList->tqfindItem(KGpgSettings::defaultKey(),2);
TQListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2);
keysList->clearSelection();
keysList->setCurrentItem(myDefaulKey);
keysList->setSelected(myDefaulKey,true);
@ -346,7 +346,7 @@ void popupPublic::slotpreselect()
{
TQListViewItem *it=NULL;
if (!keysList->firstChild()) return;
if (fmode) it=keysList->tqfindItem(KGpgSettings::defaultKey(),2);
if (fmode) it=keysList->findItem(KGpgSettings::defaultKey(),2);
if (!trusted)
sort();
if (fmode)
@ -415,13 +415,13 @@ void popupPublic::slotprocread(KProcIO *p)
untrustedList<<id;
break;
}
if (keyString[11].tqfind('D')!=-1) dead=true;
if (keyString[11].find('D')!=-1) dead=true;
tst=keyString[9];
if (tst.tqfind("<")!=-1) {
if (tst.find("<")!=-1) {
keymail=tst.section('<',-1,-1);
keymail.truncate(keymail.length()-1);
keyname=tst.section('<',0,0);
//if (keyname.tqfind("(")!=-1)
//if (keyname.find("(")!=-1)
// keyname=keyname.section('(',0,0);
} else {
keymail=TQString();
@ -433,7 +433,7 @@ void popupPublic::slotprocread(KProcIO *p)
UpdateViewItem2 *item=new UpdateViewItem2(keysList,keyname,keymail,id,isDefaultKey);
//KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, validity: %3").tqarg(id).tqarg(tr).tqarg(val));
//sub->setSelectable(false);
if (seclist.tqfind(tst,0,FALSE)!=-1)
if (seclist.find(tst,0,FALSE)!=-1)
item->setPixmap(0,keyPair);
else
item->setPixmap(0,keySingle);

@ -501,7 +501,7 @@ CReplaceDialog::CReplaceDialog( TQWidget *tqparent, const char *name, bool modal
connect( mFindSelector, TQT_SIGNAL(activated(int)),
TQT_SLOT(findSelectorChanged(int)) );
text = i18n("Fo&rmat (tqfind):");
text = i18n("Fo&rmat (find):");
TQLabel *label = new TQLabel( mFindSelector, text, plainPage() );
if( label == 0 ) { return; }
@ -530,7 +530,7 @@ CReplaceDialog::CReplaceDialog( TQWidget *tqparent, const char *name, bool modal
connect( mReplaceSelector, TQT_SIGNAL(activated(int)),
TQT_SLOT(replaceSelectorChanged(int)) );
text = i18n("For&mat (tqreplace):");
text = i18n("For&mat (replace):");
label = new TQLabel( mReplaceSelector, text, plainPage() );
if( label == 0 ) { return; }
label->setFixedHeight( label->tqsizeHint().height() );

@ -104,7 +104,7 @@ void CDragLabel::prepPixmap( KURLDrag &uriDrag )
}
TQString text;
int index = mUrl.tqfindRev( '/', mUrl.length() );
int index = mUrl.findRev( '/', mUrl.length() );
if( index < 0 )
{
text = mUrl;

@ -47,7 +47,7 @@ CExportDialog::CExportDialog( TQWidget *tqparent, char *name, bool modal )
readConfiguration();
TQString path = mDestination.fileInput->text();
int index = path.tqfindRev( '/' );
int index = path.findRev( '/' );
if( index != -1 ) { mWorkDir = path.left( index+1 ); }
}
@ -474,7 +474,7 @@ void CExportDialog::browserClicked( void )
return;
}
int index = url.tqfindRev( '/' );
int index = url.findRev( '/' );
if( index != -1 )
{
mWorkDir = url.left( index+1 );

@ -568,7 +568,7 @@ bool CHexBuffer::hasFileName( void )
//
// FIXME: Files can be called "Untitled" so this must be corrected.
//
if( mUrl.isEmpty() || mUrl.tqcontains( i18n( "Untitled" ), false ) )
if( mUrl.isEmpty() || mUrl.contains( i18n( "Untitled" ), false ) )
{
return( false );
}
@ -4360,7 +4360,7 @@ void CHexBuffer::doActionGroup( CHexActionGroup *group )
void CHexBuffer::doAction( CHexAction *action )
{
if( action->mAction == CHexAction::tqreplace )
if( action->mAction == CHexAction::replace )
{
doReplace( action, true );
}
@ -4406,7 +4406,7 @@ void CHexBuffer::recordStart( SCursor &cursor )
void CHexBuffer::recordReplace( SCursor &cursor, uint size, char *data1,
uint data1Size )
{
CHexAction *hexAction = new CHexAction( CHexAction::tqreplace,
CHexAction *hexAction = new CHexAction( CHexAction::replace,
cursor.curr.offset );
if( hexAction == 0 )
{
@ -4786,7 +4786,7 @@ void CHexBuffer::printHtmlTocPage( const TQString &tocName,
for( uint i=0; i<=numPage; i++ )
{
TQString n( fileNames[i].right( fileNames[i].length() -
fileNames[i].tqfindRev('/') - 1) );
fileNames[i].findRev('/') - 1) );
os << "<A HREF=\"" << n << "\">" << i18n("Page") << i+1;
os << "</A>";
os << " " << offsets[i];
@ -4802,7 +4802,7 @@ void CHexBuffer::printHtmlTocPage( const TQString &tocName,
// Make a symlink. We ignore any error here. I don't consider
// it to be fatal.
//
TQString n( tocName.right( tocName.length() - tocName.tqfindRev('/') - 1) );
TQString n( tocName.right( tocName.length() - tocName.findRev('/') - 1) );
symlink( n.latin1(), linkName.latin1() );
}
@ -4825,7 +4825,7 @@ void CHexBuffer::printHtmlCaption( TQTextStream &os, uint captionType,
break;
case 2:
caption = mUrl.right( mUrl.length() - mUrl.tqfindRev('/') - 1);
caption = mUrl.right( mUrl.length() - mUrl.findRev('/') - 1);
break;
case 3:
@ -4854,7 +4854,7 @@ void CHexBuffer::printHtmlNavigator( TQTextStream &os, const TQString *next,
}
else
{
TQString n( next->right( next->length() - next->tqfindRev('/') - 1) );
TQString n( next->right( next->length() - next->findRev('/') - 1) );
os << "<A HREF=\"" << n << "\">" << i18n("Next") << "</A>" << " ";
}
@ -4864,7 +4864,7 @@ void CHexBuffer::printHtmlNavigator( TQTextStream &os, const TQString *next,
}
else
{
TQString p( prev->right( prev->length() - prev->tqfindRev('/') - 1) );
TQString p( prev->right( prev->length() - prev->findRev('/') - 1) );
os << "<A HREF=\"" << p << "\">" << i18n("Previous") << "</A>" << " ";
}
@ -4874,7 +4874,7 @@ void CHexBuffer::printHtmlNavigator( TQTextStream &os, const TQString *next,
}
else
{
TQString t( toc->right( toc->length() - toc->tqfindRev('/') - 1) );
TQString t( toc->right( toc->length() - toc->findRev('/') - 1) );
os << "<A HREF=\"" << t << "\">" << i18n("Contents");
os << "</A>" << " ";
}

@ -967,7 +967,7 @@ class CHexAction
public:
enum HexAction
{
tqreplace
replace
};
public:

@ -564,7 +564,7 @@ void CHexEditorWidget::saveWorkingDirectory( const TQString &url )
return;
}
int index = url.tqfindRev( '/' );
int index = url.findRev( '/' );
if( index != -1 )
{
mWorkDir = url.left( index+1 );
@ -1456,7 +1456,7 @@ void CHexEditorWidget::gotoOffset( void )
}
void CHexEditorWidget::tqfind( void )
void CHexEditorWidget::find( void )
{
if( mFindNavigatorDialog != 0 )
{
@ -1619,7 +1619,7 @@ void CHexEditorWidget::findNavigator( SSearchControl &sc )
TQT_SIGNAL(findData(SSearchControl &, uint, bool)),
TQT_SLOT(findData(SSearchControl &, uint, bool)) );
connect( mFindNavigatorDialog, TQT_SIGNAL(makeKey(void)),
TQT_SLOT(tqfind()) );
TQT_SLOT(find()) );
}
if( mFindNavigatorDialog->isVisible() == false )
{
@ -1630,7 +1630,7 @@ void CHexEditorWidget::findNavigator( SSearchControl &sc )
void CHexEditorWidget::tqreplace( void )
void CHexEditorWidget::replace( void )
{
hideReplacePrompt();

@ -150,12 +150,12 @@ class CHexEditorWidget : public TQWidget
void gotoNextBookmark( void );
void gotoPrevBookmark( void );
void gotoOffset( void );
void tqfind( void );
void find( void );
void findAgain( void );
void findNext( void );
void findPrevious( void );
void findData( SSearchControl &sc, uint mode, bool navigator );
void tqreplace( void );
void replace( void );
void insertPattern( void );
void encoding( void );
void strings( void );

@ -267,9 +267,9 @@ CTabBar::CTabBar( TQWidget *tqparent, char *name )
void CTabBar::addName( const TQString &name )
{
TQString n( name.right(name.length()-name.tqfindRev('/')-1) );
TQString n( name.right(name.length()-name.findRev('/')-1) );
TQTab *t = tqfind( n );
TQTab *t = find( n );
if( t == 0 )
{
t = new TQTab();
@ -283,8 +283,8 @@ void CTabBar::addName( const TQString &name )
void CTabBar::removeName( const TQString &name )
{
TQString n( name.right(name.length()-name.tqfindRev('/')-1) );
TQTab *t = tqfind(n);
TQString n( name.right(name.length()-name.findRev('/')-1) );
TQTab *t = find(n);
if( t == 0 )
{
return;
@ -306,8 +306,8 @@ void CTabBar::removeName( const TQString &name )
void CTabBar::changeName( const TQString &curName, const TQString &newName )
{
TQString n( curName.right(curName.length()-curName.tqfindRev('/')-1) );
TQTab *t = tqfind(n);
TQString n( curName.right(curName.length()-curName.findRev('/')-1) );
TQTab *t = find(n);
if( t == 0 )
{
return;
@ -318,7 +318,7 @@ void CTabBar::changeName( const TQString &curName, const TQString &newName )
{
if( (*it).id() == t->identifier() )
{
TQString m( newName.right(newName.length()-newName.tqfindRev('/')-1) );
TQString m( newName.right(newName.length()-newName.findRev('/')-1) );
t->setText(m);
mFileList.remove(it);
@ -331,7 +331,7 @@ void CTabBar::changeName( const TQString &curName, const TQString &newName )
}
TQTab *CTabBar::tqfind( const TQString &name )
TQTab *CTabBar::find( const TQString &name )
{
TQPtrList<TQTab> &list = *tabList();
for( TQTab *t = list.first(); t != 0; t = list.next() )

@ -88,7 +88,7 @@ class CTabBar : public TQTabBar
void slotSelected( int id );
private:
TQTab *tqfind( const TQString &name );
TQTab *find( const TQString &name );
private:
TQValueList<CFileKey> mFileList;

@ -1942,7 +1942,7 @@ void CHexViewWidget::paintText( const TQRect &rect, bool expand )
#endif
}
if( contentsRect().tqcontains( r ) == false )
if( contentsRect().contains( r ) == false )
{
paintFrame();
if( r.left() < frameWidth() ) { r.setLeft( frameWidth() ); }

@ -42,7 +42,7 @@ KCharCodec *KCharCodec::createCodec( const TQString &Name )
{
KCharCodec *Codec = 0;
if( KTextCharCodec::codecNames().tqfindIndex(Name) != -1 )
if( KTextCharCodec::codecNames().findIndex(Name) != -1 )
Codec = KTextCharCodec::createCodec( Name );
else if( KEBCDIC1047CharCodec::codecName() == Name )
Codec = KEBCDIC1047CharCodec::create();

@ -207,7 +207,7 @@ void KValueEditor::doValueEditAction( KValueEditAction Action, int Input )
EditValue = NewValue;
ByteCodec->encode( ByteBuffer, 0, EditValue );
HexEdit->DataBuffer->tqreplace( Index, 1, (char*)&EditValue, 1 );
HexEdit->DataBuffer->replace( Index, 1, (char*)&EditValue, 1 );
}
HexEdit->updateCursor();

@ -83,7 +83,7 @@ int KBigBuffer::remove( KSection /*Section*/ )
return 0;
}
unsigned int KBigBuffer::tqreplace( KSection /*Section*/, const char*, unsigned int /*Length*/ )
unsigned int KBigBuffer::replace( KSection /*Section*/, const char*, unsigned int /*Length*/ )
{
return 0;
}
@ -95,8 +95,8 @@ int KBigBuffer::fill( char /*FillChar*/, int /*Length*/, unsigned int /*Pos*/ )
int KBigBuffer::move( int /*DestPos*/, KSection /*SourceSection*/ ) { return 0; }
//int KBigBuffer::tqfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; }
int KBigBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; }
//int KBigBuffer::find( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; }
int KBigBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; }
int KBigBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; }

@ -52,18 +52,18 @@ class KHEXEDIT_EXPORT KBigBuffer : public KDataBuffer
virtual int insert( int Pos, const char*, int Length );
virtual int remove( KSection S );
virtual unsigned int tqreplace( KSection S, const char*, unsigned int InputLength );
virtual unsigned int replace( KSection S, const char*, unsigned int InputLength );
virtual int move( int DestPos, KSection SourceSection );
virtual int fill( char FillChar, int Length = -1, unsigned int Pos = 0 );
virtual void setDatum( unsigned int Offset, const char Char );
virtual void setModified( bool M = true );
//virtual int tqfind( const char*, int Length, int Pos = 0 ) const;
virtual int tqfind( const char*KeyData, int Length, KSection Section ) const;
//virtual int find( const char*, int Length, int Pos = 0 ) const;
virtual int find( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
public:
void setReadOnly( bool RO = true );

@ -50,7 +50,7 @@ static const char *localTextPlain()
TextPlainLocal = TQCString(KGlobal::locale()->encoding()).lower();
// remove the whitespaces
int s;
while( (s=TextPlainLocal.tqfind(' ')) >= 0 )
while( (s=TextPlainLocal.find(' ')) >= 0 )
TextPlainLocal.remove( s, 1 );
TextPlainLocal.prepend( TextPlainLocalStub );
@ -62,12 +62,12 @@ static const char *localTextPlain()
// tries to create a codec by the given charset description
static TQTextCodec* codecForCharset( const TQCString& Desc )
{
int i = Desc.tqfind( "charset=" );
int i = Desc.find( "charset=" );
if( i >= 0 )
{
TQCString CharSetName = Desc.mid( i+8 );
// remove any further attributes
if( (i=CharSetName.tqfind( ';' )) >= 0 )
if( (i=CharSetName.find( ';' )) >= 0 )
CharSetName = CharSetName.left( i );
// try to find codec

@ -25,13 +25,13 @@ using namespace KHE;
int KDataBuffer::insert( int Pos, const char* D, int Length )
{
return tqreplace( Pos,0,D,Length );
return replace( Pos,0,D,Length );
}
int KDataBuffer::remove( KSection Remove )
{
tqreplace( Remove, 0, 0 );
replace( Remove, 0, 0 );
return Remove.width(); // TODO: check if this is true
}

@ -146,9 +146,9 @@ class KHEXEDIT_EXPORT KDataBuffer
* @param SourceLength
* @return length of replacced data
*/
virtual unsigned int tqreplace( KSection DestSection, const char* Source, unsigned int SourceLength ) = 0;
virtual unsigned int replace( KSection DestSection, const char* Source, unsigned int SourceLength ) = 0;
/** convenience function, behaves as above */
unsigned int tqreplace( unsigned int Pos, unsigned int RemoveLength,
unsigned int replace( unsigned int Pos, unsigned int RemoveLength,
const char* Source, unsigned int SourceLength );
/** moves a part of the data to a new position, while floating the other data around
@ -201,7 +201,7 @@ class KHEXEDIT_EXPORT KDataBuffer
* @param Pos the position to start the search
* @return index of the first or -1
*/
//virtual int tqfind( const char*, int Length, int Pos = 0 ) const = 0;
//virtual int find( const char*, int Length, int Pos = 0 ) const = 0;
/** searches for a given data string
* The section limits the data within which the key has to be found
* If the end of the section is lower then the start the search continues at the start???
@ -210,7 +210,7 @@ class KHEXEDIT_EXPORT KDataBuffer
* @param Section section within the keydata is to be found
* @return index of the first occurence or -1
*/
virtual int tqfind( const char*KeyData, int Length, KSection Section ) const = 0;
virtual int find( const char*KeyData, int Length, KSection Section ) const = 0;
/** searches backward beginning with byte at Pos.
* @param
* @param Length length of search string
@ -219,7 +219,7 @@ class KHEXEDIT_EXPORT KDataBuffer
*/
virtual int rfind( const char*, int Length, int Pos = -1 ) const = 0;
/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
};
@ -235,9 +235,9 @@ inline const char *KDataBuffer::dataSet( int Offset, int Length ) const
inline int KDataBuffer::remove( int Pos, int Length )
{ return remove( KSection(Pos,Pos+Length-1) ); }
inline unsigned int KDataBuffer::tqreplace( unsigned int Pos, unsigned int RemoveLength,
inline unsigned int KDataBuffer::replace( unsigned int Pos, unsigned int RemoveLength,
const char* D, unsigned int InputLength )
{ return tqreplace( KSection(Pos,Pos+RemoveLength-1), D, InputLength ); }
{ return replace( KSection(Pos,Pos+RemoveLength-1), D, InputLength ); }
inline bool KDataBuffer::isReadOnly() const { return false; }

@ -89,7 +89,7 @@ int KFixedSizeBuffer::remove( KSection Remove )
}
unsigned int KFixedSizeBuffer::tqreplace( KSection Remove, const char* D, unsigned int InputLength )
unsigned int KFixedSizeBuffer::replace( KSection Remove, const char* D, unsigned int InputLength )
{
// check all parameters
if( Remove.startsBehind( Size-1 ) || (Remove.width()==0 && InputLength==0) )
@ -262,7 +262,7 @@ int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, un
}
int KFixedSizeBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; }
int KFixedSizeBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const { return 0; }
int KFixedSizeBuffer::rfind( const char*, int /*Length*/, int /*Pos*/ ) const { return 0; }

@ -48,17 +48,17 @@ class KFixedSizeBuffer : public KDataBuffer
virtual int insert( int Pos, const char*, int Length );
virtual int remove( KSection Remove );
virtual unsigned int tqreplace( KSection Remove, const char*, unsigned int InputLength );
virtual unsigned int replace( KSection Remove, const char*, unsigned int InputLength );
virtual int move( int DestPos, KSection SourceSection );
virtual int fill( const char FillChar, int Length = -1, unsigned int Pos = 0 );
virtual void setDatum( unsigned int Offset, const char Char );
virtual void setModified( bool M = true );
virtual int tqfind( const char*KeyData, int Length, KSection Section ) const;
virtual int find( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
public:
void setReadOnly( bool RO = true );

@ -904,7 +904,7 @@ void KHexEdit::insert( const TQByteArray &D )
// we restrict the replacement to the minimum length of selection and input
ChangedRange = BufferRanges->selection();
ChangedRange.restrictEndTo( ChangedRange.start()+D.size()-1 );
int W = DataBuffer->tqreplace( ChangedRange, D.data(), ChangedRange.width() );
int W = DataBuffer->replace( ChangedRange, D.data(), ChangedRange.width() );
BufferCursor->gotoCIndex( ChangedRange.start()+W );
BufferRanges->removeSelection();
}
@ -917,7 +917,7 @@ void KHexEdit::insert( const TQByteArray &D )
ChangedRange.restrictEndTo( BufferLayout->length()-1 );
if( ChangedRange.isValid() )
{
int W = DataBuffer->tqreplace( ChangedRange, D.data(), ChangedRange.width() );
int W = DataBuffer->replace( ChangedRange, D.data(), ChangedRange.width() );
BufferCursor->gotoNextByte( W );
}
}
@ -930,7 +930,7 @@ void KHexEdit::insert( const TQByteArray &D )
// replacing the selection
KSection Selection = BufferRanges->selection();
int OldLastIndex = BufferLayout->length() - 1;
int W = DataBuffer->tqreplace( Selection, D.data(), D.size() );
int W = DataBuffer->replace( Selection, D.data(), D.size() );
updateLength();
BufferCursor->gotoIndex( Selection.start() + W );
if( W > 0 )
@ -1933,7 +1933,7 @@ void KHexEdit::handleInternalDrag( TQDropEvent *e )
ChangedRange.restrictEndTo( BufferLayout->length()-1 );
if( ChangedRange.isValid() )
{
int NoOfReplaced = DataBuffer->tqreplace( ChangedRange, Data.data(), ChangedRange.width() );
int NoOfReplaced = DataBuffer->replace( ChangedRange, Data.data(), ChangedRange.width() );
BufferCursor->gotoNextByte( NoOfReplaced );
}
}

@ -108,7 +108,7 @@ int KPlainBuffer::remove( KSection Remove )
}
unsigned int KPlainBuffer::tqreplace( KSection Remove, const char* D, unsigned int InputLength )
unsigned int KPlainBuffer::replace( KSection Remove, const char* D, unsigned int InputLength )
{
// check all parameters
if( Remove.start() >= (int)Size || (Remove.width()==0 && InputLength==0) )
@ -259,7 +259,7 @@ int KPlainBuffer::fill( const char FChar, int FillLength, unsigned int Pos )
}
int KPlainBuffer::tqfind( const char* SearchString, int Length, KSection Section ) const
int KPlainBuffer::find( const char* SearchString, int Length, KSection Section ) const
{
Section.restrictEndTo( Size-1 );

@ -54,18 +54,18 @@ class KPlainBuffer : public KDataBuffer
virtual int insert( int Pos, const char*, int Length );
virtual int remove( KSection Remove );
virtual unsigned int tqreplace( KSection Remove, const char*, unsigned int InputLength );
virtual unsigned int replace( KSection Remove, const char*, unsigned int InputLength );
virtual int move( int DestPos, KSection SourceSection );
virtual int fill( const char FillChar, int Length = -1, unsigned int Pos = 0 );
virtual void setDatum( unsigned int Offset, const char Char );
virtual void setModified( bool M = true );
//virtual int tqfind( const char*, int Length, int Pos = 0 ) const;
virtual int tqfind( const char*KeyData, int Length, KSection Section ) const;
//virtual int find( const char*, int Length, int Pos = 0 ) const;
virtual int find( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
/* virtual int tqfind( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
/* virtual int find( const TQString &expr, bool cs, bool wo, bool forward = true, int *index = 0 ); */
public:
void setReadOnly( bool RO = true );

@ -50,7 +50,7 @@ void KWrappingROBuffer::set( const char* D, int L )
}
int KWrappingROBuffer::tqfind( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const
int KWrappingROBuffer::find( const char*/*KeyData*/, int /*Length*/, KSection /*Section*/ ) const
{
return 0;
}

@ -47,13 +47,13 @@ class KWrappingROBuffer : public KReadOnlyBuffer
virtual int insert( int Pos, const char*, int Length );
virtual int remove( KSection S );
virtual unsigned int tqreplace( KSection S, const char*, unsigned int Length );
virtual unsigned int replace( KSection S, const char*, unsigned int Length );
virtual int fill( const char FillChar, int, int );
virtual void setDatum( unsigned int Offset, const char Char );
virtual void setModified( bool M );
virtual int tqfind( const char*KeyData, int Length, KSection Section ) const;
virtual int find( const char*KeyData, int Length, KSection Section ) const;
virtual int rfind( const char*, int Length, int Pos = -1 ) const;
@ -75,7 +75,7 @@ inline char KWrappingROBuffer::datum( unsigned int Offset ) const { return Data[
inline int KWrappingROBuffer::insert( int, const char*, int ) { return 0; }
inline int KWrappingROBuffer::remove( KSection ) { return 0; }
inline unsigned int KWrappingROBuffer::tqreplace( KSection, const char*, unsigned int ) { return 0; }
inline unsigned int KWrappingROBuffer::replace( KSection, const char*, unsigned int ) { return 0; }
inline int KWrappingROBuffer::fill( const char , int, int ) { return 0; }
inline void KWrappingROBuffer::setDatum( unsigned int, const char ) {}

@ -141,7 +141,7 @@ void KHexEditPart::fitActionSettings()
ShowUnprintableAction->setChecked( HexEdit->showUnprintable() );
CodingAction->setCurrentItem( (int)HexEdit->coding() );
EncodingAction->setCurrentItem( KCharCodec::codecNames().tqfindIndex(HexEdit->encodingName()) );
EncodingAction->setCurrentItem( KCharCodec::codecNames().findIndex(HexEdit->encodingName()) );
ResizeStyleAction->setCurrentItem( (int)HexEdit->resizeStyle() );

@ -18,7 +18,7 @@
*
*/
// kate: space-indent on; indent-width 2; tqreplace-tabs on;
// kate: space-indent on; indent-width 2; replace-tabs on;
#include <tqptrlist.h>
#include <tqsignalmapper.h>
@ -161,10 +161,10 @@ actionCollection());
mAction.paste = KStdAction::paste( TQT_TQOBJECT(editor()), TQT_SLOT(paste()), actionCollection() );
mAction.selectAll = KStdAction::selectAll( TQT_TQOBJECT(editor()), TQT_SLOT(selectAll()),actionCollection() );
mAction.unselect = KStdAction::deselect( TQT_TQOBJECT(editor()), TQT_SLOT(unselect()), actionCollection());
mAction.tqfind = KStdAction::find( TQT_TQOBJECT(editor()), TQT_SLOT(tqfind()), actionCollection() );
mAction.find = KStdAction::find( TQT_TQOBJECT(editor()), TQT_SLOT(find()), actionCollection() );
mAction.findNext = KStdAction::findNext( TQT_TQOBJECT(editor()), TQT_SLOT(findNext()), actionCollection() );
mAction.findPrev = KStdAction::findPrev( TQT_TQOBJECT(editor()),TQT_SLOT(findPrevious()),actionCollection() );
mAction.tqreplace = KStdAction::replace( TQT_TQOBJECT(editor()), TQT_SLOT(tqreplace()), actionCollection() );
mAction.replace = KStdAction::replace( TQT_TQOBJECT(editor()), TQT_SLOT(replace()), actionCollection() );
mAction.gotoOffset = new KAction( i18n("&Goto Offset..."), CTRL+Key_G,
TQT_TQOBJECT(editor()), TQT_SLOT(gotoOffset()),actionCollection(), "goto_offset" );
mAction.insertPattern = new KAction( i18n("&Insert Pattern..."), CTRL+Key_Insert,
@ -479,7 +479,7 @@ void KHexEdit::addRecentFile( const TQString &fileName )
return;
}
if( fileName.tqcontains( i18n( "Untitled" ), false ) )
if( fileName.contains( i18n( "Untitled" ), false ) )
{
return;
}
@ -498,7 +498,7 @@ void KHexEdit::removeRecentFile( const TQString &fileName )
return;
}
if( fileName.tqcontains( i18n( "Untitled" ), false ) )
if( fileName.contains( i18n( "Untitled" ), false ) )
{
return;
}
@ -511,7 +511,7 @@ void KHexEdit::removeRecentFile( const TQString &fileName )
void KHexEdit::renameRecentFile(const TQString &curName, const TQString &newName)
{
if( curName.tqcontains( i18n( "Untitled" ), false ) )
if( curName.contains( i18n( "Untitled" ), false ) )
{
addRecentFile( newName );
}
@ -1232,7 +1232,7 @@ void KHexEdit::removeDocument( const TQString &fileName )
{
TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this);
documentMenu->removeItemAt( mDocumentList.tqfindIndex(*it) );
documentMenu->removeItemAt( mDocumentList.findIndex(*it) );
mDocumentList.remove( it );
for( uint i=0; i < mDocumentList.count(); i++ )
@ -1259,7 +1259,7 @@ void KHexEdit::renameDocument( const TQString &curName, const TQString &newName
if( *it == curName )
{
TQPopupMenu *documentMenu = (TQPopupMenu *)factory()->container("documents", this);
documentMenu->changeItem( newName, mDocumentList.tqfindIndex(*it) );
documentMenu->changeItem( newName, mDocumentList.findIndex(*it) );
mDocumentList.insert( it, newName );
mDocumentList.remove( it );
return;

@ -85,10 +85,10 @@ class KHexEdit : public KMainWindow
KAction *paste;
KAction *selectAll;
KAction *unselect;
KAction *tqfind;
KAction *find;
KAction *findNext;
KAction *findPrev;
KAction *tqreplace;
KAction *replace;
KAction *gotoOffset;
KAction *insertPattern;
KAction *copyAsText;

@ -10,7 +10,7 @@ new in version 0.5 (Aaron J. Seigo)
(Carsten Pfeiffer <pfeiffer@kde.org>)
- use KEdit instead of QMultiLineEdit directly
-> gains Search & tqreplace + undo
-> gains Search & replace + undo
- allocate KTMainWindow on the heap to avoid double deletion on quit
new in version 0.4 (Mario Weilguni <mweilguni@kde.org>)
@ -62,7 +62,7 @@ new in version 0.2.0
- changed the tqlayout to be more KDE conforming (toolbar, statusbar,...)
- folders are now called books and entries are pages
- added subject to each page
- you may popup a window with a list of all subjects and use it to tqfind
- you may popup a window with a list of all subjects and use it to find
pages more easily
- further reduced the minimum size of the window

@ -827,7 +827,7 @@ void KJotsMain::jumpToBookmark(const TQString& bookmark)
KMessageBox::information(this,
i18n("This bookmark is from an older version of KJots and is not fully supported. It may or may not work. You should delete and recreate this bookmark."), TQString(), "oldBookmarkWarning");
int slash = bookmark.tqfindRev('/');
int slash = bookmark.findRev('/');
if (slash != -1)
{

@ -46,9 +46,9 @@
// helper functions for HTML output
TQString prepForHTML(TQString text)
{
text.tqreplace("<", "&lt;");
text.tqreplace(">", "&gt;");
text.tqreplace("\n", "<br>");
text.replace("<", "&lt;");
text.replace(">", "&gt;");
text.replace("\n", "<br>");
return text;
}
@ -428,7 +428,7 @@ bool KJotsBook::loadOldBook(TQFile &file)
int pos = 0;
while ((pos = buf.tqfind('\\',pos)) != -1)
while ((pos = buf.find('\\',pos)) != -1)
if (buf[++pos] == '\\')
buf.remove(pos, 1 );
@ -1125,8 +1125,8 @@ bool KJotsPage::isDirty()
TQDomElement text = doc.createElement( "Text" );
TQString saveText = body();
if ( saveText.tqcontains("]]>") ) {
saveText.tqreplace("]]>","]]&gt;");
if ( saveText.contains("]]>") ) {
saveText.replace("]]>","]]&gt;");
text.setAttribute("fixed", "1");
}
text.appendChild( doc.createCDATASection( saveText ));
@ -1153,7 +1153,7 @@ void KJotsPage::parseXml( TQDomElement &me )
TQString bodyText = e.text();
if ( e.hasAttribute("fixed") )
{
bodyText.tqreplace("]]&gt;", "]]>");
bodyText.replace("]]&gt;", "]]>");
}
setBody(bodyText);
}

@ -110,7 +110,7 @@ void run_program(const char *path, const int action)
if ((err = stat(path, &sb)) != 0 || sb.st_mode&S_IWOTH) {
if (err != 0) {
fprintf(stderr, "Can't tqfind %s\n", path);
fprintf(stderr, "Can't find %s\n", path);
return;
} else {
fprintf(stderr, "%s is writeable by anyone - we don't trust it\n", path);

@ -171,7 +171,7 @@ BatteryConfig::BatteryConfig (TQWidget * tqparent, const char *name)
}
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
TQLabel* explain = new KRichTextLabel( i18n("This panel controls whether the battery status monitor\nappears in the system tray and what it looks like.").tqreplace("\n"," "), this);
TQLabel* explain = new KRichTextLabel( i18n("This panel controls whether the battery status monitor\nappears in the system tray and what it looks like.").replace("\n"," "), this);
top_layout->addWidget(explain, 0);
laptop_portable::extra_config(this, config, top_layout);
}

@ -469,7 +469,7 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event )
}
void laptop_dock::mouseReleaseEvent( TQMouseEvent *e )
{
if ( !TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ) )
if ( !TQT_TQRECT_OBJECT(rect()).contains( e->pos() ) )
return;
switch ( e->button() ) {

@ -186,8 +186,8 @@ tv.tv_sec = 0; tv.tv_usec = 0;
TQString s;
if (ts.eof()) break;
s = ts.readLine();
if (s.tqcontains(thisreg)) {
_cardname = s.right(s.length() - s.tqfind(':') - 1);
if (s.contains(thisreg)) {
_cardname = s.right(s.length() - s.find(':') - 1);
_cardname = _cardname.stripWhiteSpace();
foundit = true;
CHECK_CHANGED(oldValues, _cardname);
@ -200,23 +200,23 @@ tv.tv_sec = 0; tv.tv_usec = 0;
int end;
s.simplifyWhiteSpace();
end = s.tqfind(TQRegExp("[ \r\t\n]"));
end = s.find(TQRegExp("[ \r\t\n]"));
s = s.remove(0, end+1);
end = s.tqfind(TQRegExp("[ \r\t\n]"));
end = s.find(TQRegExp("[ \r\t\n]"));
_type = s;
_type.truncate(end);
s = s.remove(0, end+1);
end = s.tqfind(TQRegExp("[ \r\t\n]"));
end = s.find(TQRegExp("[ \r\t\n]"));
_module = s;
_module.truncate(end);
s = s.remove(0, end+1);
end = s.tqfind(TQRegExp("[ \r\t\n]"));
end = s.find(TQRegExp("[ \r\t\n]"));
s = s.remove(0, end+1);
end = s.tqfind(TQRegExp("[ \r\t\n]"));
end = s.find(TQRegExp("[ \r\t\n]"));
_device = s;
_device.truncate(end);
s = s.remove(0, end+1);
@ -508,7 +508,7 @@ TQString thisreg;
while (!t.eof()) {
s = t.readLine();
if (s.tqcontains(TQRegExp(thisreg))) {
if (s.contains(TQRegExp(thisreg))) {
int n = (s.left(3).stripWhiteSpace()).toInt();
df.close();
return n;

@ -333,7 +333,7 @@ static void acpi_read_batteries() {
f = new TQFile(bat.info_file);
if (f && f->exists() && f->open(IO_ReadOnly)) {
while(f->readLine(buff,1024) > 0) {
if (buff.tqcontains("design capacity low:", false)) {
if (buff.contains("design capacity low:", false)) {
TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.cap_low = rx.cap(1).toInt();
@ -341,7 +341,7 @@ static void acpi_read_batteries() {
bat.cap_low = 0;
continue;
}
if (buff.tqcontains("last full capacity:", false)) {
if (buff.contains("last full capacity:", false)) {
TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.cap = rx.cap(1).toInt();
@ -363,7 +363,7 @@ static void acpi_read_batteries() {
f = new TQFile(bat.state_file);
if (f && f->exists() && f->open(IO_ReadOnly)) {
while(f->readLine(buff,1024) > 0) {
if (buff.tqcontains("present rate:", false)) {
if (buff.contains("present rate:", false)) {
TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.rate = rx.cap(1).toInt();
@ -372,7 +372,7 @@ static void acpi_read_batteries() {
present = true;
continue;
}
if (buff.tqcontains("remaining capacity:", false)) {
if (buff.contains("remaining capacity:", false)) {
TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.remaining = rx.cap(1).toInt();
@ -961,16 +961,16 @@ TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent)
TQLabel* note = new KRichTextLabel(i18n("\nIf you make /usr/bin/apm setuid then you will also "
"be able to choose 'suspend' and 'standby' in the above "
"dialog - check out the help button below to find out "
"how to do this").tqreplace("\n", TQString()), tqparent);
"how to do this").replace("\n", TQString()), tqparent);
return(note);
}
if (::has_acpi()) {
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
TQLabel* note = new KRichTextLabel(i18n("\nYou may need to enable ACPI suspend/resume in the ACPI panel").tqreplace("\n", TQString()), tqparent);
TQLabel* note = new KRichTextLabel(i18n("\nYou may need to enable ACPI suspend/resume in the ACPI panel").replace("\n", TQString()), tqparent);
return(note);
}
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
TQLabel* note = new KRichTextLabel(i18n("\nYour system does not support suspend/standby").tqreplace("\n", TQString()), tqparent);
TQLabel* note = new KRichTextLabel(i18n("\nYour system does not support suspend/standby").replace("\n", TQString()), tqparent);
return(note);
}
@ -1580,7 +1580,7 @@ get_acpi_list(char p, int *map, const char *dev, TQStringList &list, int &index,
while (!f.atEnd() && i < MAP_SIZE) {
TQString l;
f.readLine(l, 500);
if (l.tqcontains("active limit", false)) {
if (l.contains("active limit", false)) {
TQRegExp rx(TQString("%1(\\d+)").tqarg(p));
if (rx.search(l) >= 0) {
bool ok;
@ -1835,7 +1835,7 @@ laptop_portable::set_system_performance(TQString val) // val = string given by g
int current, result;
if((result = get_acpi_list('P', acpi_performance_map, "/performance", performance_list, current, acpi_performance_cpu, false, acpi_performance_enable))) {
char tmp[20];
int ind = performance_list.tqfindIndex(val);
int ind = performance_list.findIndex(val);
if (ind < 0 || ind >= MAP_SIZE || current == ind)
return;
snprintf(tmp, sizeof(tmp), "%d", acpi_performance_map[ind]);
@ -1857,7 +1857,7 @@ laptop_portable::set_system_performance(TQString val) // val = string given by g
invoke_acpi_helper("--cpufreq-25", tmp.latin1(), 0);
return;
case CPUFREQ_24:
int target = performance_list.tqfindIndex(val);
int target = performance_list.findIndex(val);
invoke_acpi_helper("--cpufreq-24", cpufreq_cpu.latin1(), cpufreq_minmax_frequency[target].latin1());
return;
}
@ -1871,7 +1871,7 @@ laptop_portable::set_system_throttling(TQString val) // val = string given by ge
{
if (::has_acpi()) {
char tmp[20];
int ind = throttle_list.tqfindIndex(val);
int ind = throttle_list.findIndex(val);
if (ind < 0 || ind >= MAP_SIZE)
return;
snprintf(tmp, sizeof(tmp), "%d", acpi_throttle_map[ind]);
@ -1909,7 +1909,7 @@ acpi_check_button(const char *prefix, TQString &result)
while (!f.atEnd()) {
TQString l;
f.readLine(l, 500);
if (l.tqcontains("state:")) {
if (l.contains("state:")) {
result = name;
v = 1;
break;

@ -68,7 +68,7 @@ SonyConfig::SonyConfig(TQWidget * tqparent, const char *name)
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
top_layout->addWidget(new KRichTextLabel(i18n("This panel allows you to control some of the features of the\n"
"'sonypi' device for your laptop - you should not enable the options below if you\nalso "
"use the 'sonypid' program in your system").tqreplace("\n", " "), this));
"use the 'sonypid' program in your system").replace("\n", " "), this));
enableScrollBar = new TQCheckBox( i18n("Enable &scroll bar"), this );
TQToolTip::add( enableScrollBar, i18n( "When checked this box enables the scrollbar so that it works under KDE" ) );
@ -86,7 +86,7 @@ SonyConfig::SonyConfig(TQWidget * tqparent, const char *name)
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
top_layout->addWidget(new KRichTextLabel(i18n("The /dev/sonypi is not accessable, if you wish to use the above features its\n"
"protections need to be changed. Clicking on the button below will change them\n").tqreplace("\n", " "), this));
"protections need to be changed. Clicking on the button below will change them\n").replace("\n", " "), this));
TQHBoxLayout *ll = new TQHBoxLayout();
TQPushButton *setupButton = new TQPushButton(i18n("Setup /dev/sonypi"), this);
connect( setupButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(setupHelper()) );

@ -246,14 +246,14 @@ bool XAutoLock::x11Event( XEvent* ev )
// don't futher process key events that were received only because XAutoLock wants them
if( ev->type == KeyPress && !ev->xkey.send_event
&& !xautolock_useXidle && !xautolock_useMit
&& !TQWidget::tqfind( ev->xkey.window ))
&& !TQWidget::find( ev->xkey.window ))
return true;
return false;
}
bool XAutoLock::ignoreWindow( WId w )
{
if( w != qt_xrootwin() && TQWidget::tqfind( w ))
if( w != qt_xrootwin() && TQWidget::find( w ))
return true;
return false;
}

@ -380,7 +380,7 @@ evaluateTriggers (Display* d)
* Nevertheless, simply resetting the screensaver is a
* convenience action that aids many xlock users, and doesn't
* harm anyone (*). The problem with older versions of xlock
* is that they can be told to tqreplace (= disable) the real
* is that they can be told to replace (= disable) the real
* screensaver, but forget to reset that same screensaver if
* it was already active at the time xlock starts. I guess
* xlock initially wasn't designed to be run without a user

@ -356,7 +356,7 @@ void GenericMonitor::launchBrowser()
void GenericMonitor::launchSearch()
{
launch("search", "ktqfind");
launch("search", "kfind");
}
void GenericMonitor::launchHomeFolder()

@ -244,7 +244,7 @@ bool KVaio::isKScreensaverAvailable()
// kdDebug() << "KVaio::showTextMsg: kded is registered at dcop server."
// << endl;
objects = mClient.remoteObjects("kdesktop");
if(objects.tqcontains("KScreensaverIface"))
if(objects.contains("KScreensaverIface"))
{
// kdDebug() << "KVaio::showTextMsg: kmilod is available at kded."
// << endl;
@ -278,7 +278,7 @@ bool KVaio::isKMiloDAvailable()
// kdDebug() << "KVaio::showTextMsg: kded is registered at dcop server."
// << endl;
objects = mClient.remoteObjects("kded");
if(objects.tqcontains("kmilod"))
if(objects.contains("kmilod"))
{
// kdDebug() << "KVaio::showTextMsg: kmilod is available at kded."
// << endl;

@ -175,7 +175,7 @@ void KCMThinkpadModule::load(bool useDefaults) {
m_KCMThinkpadGeneral->mSpinboxVolumeStep->setValue(config.readNumEntry("volumeStep", 14));
m_KCMThinkpadGeneral->commandExec->setURL(config.readEntry("buttonThinkpad", KDE_BINDIR "/konsole"));
m_KCMThinkpadGeneral->commandExecHome->setURL(config.readEntry("buttonHome", KDE_BINDIR "/konqueror"));
m_KCMThinkpadGeneral->commandExecSearch->setURL(config.readEntry("buttonSearch", KDE_BINDIR "/ktqfind"));
m_KCMThinkpadGeneral->commandExecSearch->setURL(config.readEntry("buttonSearch", KDE_BINDIR "/kfind"));
m_KCMThinkpadGeneral->commandExecMail->setURL(config.readEntry("buttonMail", KDE_BINDIR "/kmail"));
m_KCMThinkpadGeneral->commandExecZoom->setURL(config.readEntry("buttonZoom", KDE_BINDIR "/ksnapshot"));
m_nvramFile = config.readEntry("nvram", "/dev/nvram");

@ -445,7 +445,7 @@ void ThinkPadMonitor::reconfigure(KConfig* config) {
m_volumeStep = config->readNumEntry("volumeStep", defaultVolumeStep);
m_buttonThinkpad = config->readEntry("buttonThinkpad", "/usr/bin/konsole");
m_buttonHome = config->readEntry("buttonHome", "/usr/bin/konqueror");
m_buttonSearch = config->readEntry("buttonSearch", "/usr/bin/ktqfind");
m_buttonSearch = config->readEntry("buttonSearch", "/usr/bin/kfind");
m_buttonMail = config->readEntry("buttonMail", "/usr/bin/kmail");
m_buttonZoom = config->readEntry("buttonZoom", "/usr/bin/ksnapshot");
}

@ -154,7 +154,7 @@ void KMultiFormListBoxMultiVisible::append(KMultiFormListBoxEntry *elm)
void KMultiFormListBoxMultiVisible::delElement(TQWidget *elm)
{
int index = elms->tqfind(elm);
int index = elms->find(elm);
TQWidget *next = elms->at(index+1);
if (strcmp(next->name(),"seperator") != 0) {
elms->removeRef(next);
@ -186,7 +186,7 @@ void KMultiFormListBoxMultiVisible::insertElmIntoWidget(KMultiFormListBoxEntry *
// Find the location to insert the new element.
int index = elms->count();
if (after) {
index = elms->tqfindRef(after);
index = elms->findRef(after);
}
// Now show the new element.

@ -37,7 +37,7 @@
<pre>
KWidgetStreamer streamer;
KWidgetStreamer::PropertyMap& map = streamer.propertyMap();
KWidgetStreamer::PropertyList& list = *map.tqfind(TQLCDNUMBER_OBJECT_NAME_STRING);
KWidgetStreamer::PropertyList& list = *map.find(TQLCDNUMBER_OBJECT_NAME_STRING);
list.remove("numDigits");
</pre>
**/

@ -171,7 +171,7 @@ TQString CharactersWidget::title() const
RegExpWidget* CharactersWidget::findWidgetToEdit( TQPoint globalPos )
{
if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).tqcontains( globalPos ) )
if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).contains( globalPos ) )
return this;
else
return 0;

@ -259,7 +259,7 @@ RegExp* CompoundWidget::regExp() const
void CompoundWidget::mousePressEvent( TQMouseEvent* event )
{
if ( event->button() == Qt::LeftButton &&
TQRect( _pixmapPos, _pixmapSize ).tqcontains( event->pos() ) ) {
TQRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) {
// Skip otherwise we will never see the mouse release
// since it is eaten by Editor window.
}
@ -270,7 +270,7 @@ void CompoundWidget::mousePressEvent( TQMouseEvent* event )
void CompoundWidget::mouseReleaseEvent( TQMouseEvent* event)
{
if ( event->button() == Qt::LeftButton &&
TQRect( _pixmapPos, _pixmapSize ).tqcontains( event->pos() ) ) {
TQRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) {
_hidden = !_hidden;
_editorWindow->updateContent( 0 );
tqrepaint(); // is this necesary?

@ -95,7 +95,7 @@ void RegExpEditorWindow::mousePressEvent ( TQMouseEvent* event )
bool RegExpEditorWindow::pointSelected( TQPoint p ) const
{
TQRect rect = _top->selectionRect();
return rect.tqcontains(p);
return rect.contains(p);
}
void RegExpEditorWindow::mouseMoveEvent ( TQMouseEvent* event )
@ -168,7 +168,7 @@ bool RegExpEditorWindow::selectionOverlap( TQPoint pos, TQSize size ) const
{
TQRect child(pos, size);
return (_selection.intersects(child) && ! child.tqcontains(_selection));
return (_selection.intersects(child) && ! child.contains(_selection));
}
bool RegExpEditorWindow::hasSelection() const

@ -5,7 +5,7 @@ rm -rf manual
rm -rf predefined
rm -rf icons
rm unistd.h
tqfind -lname \* -maxdepth 1 | xargs rm
find -lname \* -maxdepth 1 | xargs rm
rm tqmoc_*
rm images.h
rm gen_*

@ -207,7 +207,7 @@ bool RegExpWidget::acceptWidgetInsert( RegExpType tp ) const
RegExpWidget* RegExpWidget::widgetUnderPoint( TQPoint globalPos, bool )
{
if ( TQRect(mapToGlobal( TQPoint(0,0) ), size() ).tqcontains( globalPos ) )
if ( TQRect(mapToGlobal( TQPoint(0,0) ), size() ).contains( globalPos ) )
return this;
else
return 0;

@ -98,7 +98,7 @@ RegExpWidget* SingleContainerWidget::findWidgetToEdit( TQPoint globalPos )
RegExpWidget* wid = _child->findWidgetToEdit( globalPos );
if ( wid )
return wid;
else if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).tqcontains( globalPos ) )
else if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).contains( globalPos ) )
return this;
else
return 0;

@ -226,7 +226,7 @@ void UserDefinedRegExps::slotSelectNewAction()
WidgetWinItem::WidgetWinItem( TQString fileName, RegExp* regexp, bool usersRegExp, TQListViewItem* tqparent )
:TQListViewItem( tqparent ), _regexp( regexp ), _usersRegExp ( usersRegExp )
{
int index = fileName.tqfindRev(TQString::fromLocal8Bit(".regexp"));
int index = fileName.findRev(TQString::fromLocal8Bit(".regexp"));
_name = fileName.left(index);
setText( 0, _name );

@ -52,7 +52,7 @@ namespace KSim
return false;
// Find our object and remove it from the list
if (m_baseList->tqfindRef(object) >= 0)
if (m_baseList->findRef(object) >= 0)
return m_baseList->remove();
return false;

@ -119,7 +119,7 @@ void KSim::ConfigDialog::reload()
void KSim::ConfigDialog::removePage(const TQCString &name)
{
const KSim::Plugin &plugin = KSim::PluginLoader::self().tqfind(name);
const KSim::Plugin &plugin = KSim::PluginLoader::self().find(name);
if (plugin.isNull() || !plugin.configPage()) {
KMessageBox::sorry(0, i18n("Failed to remove %1's config page due to the "
"plugin not being loaded or the config page has not been created").tqarg(name.data()));
@ -139,7 +139,7 @@ void KSim::ConfigDialog::removePage(const TQCString &name)
void KSim::ConfigDialog::createPage(const TQCString &name)
{
const KSim::Plugin &plugin = KSim::PluginLoader::self().tqfind(name);
const KSim::Plugin &plugin = KSim::PluginLoader::self().find(name);
createPage(plugin);
}
@ -193,7 +193,7 @@ void KSim::ConfigDialog::saveConfig(bool reload)
info.libName(true), item->text(0), info.location(),
findPlugin(item->text(0)).isEnabled()));
KSim::PluginLoader::self().tqfind(info).setEnabled(item->isOn());
KSim::PluginLoader::self().find(info).setEnabled(item->isOn());
}
m_currentPlugins = changedPlugins;

@ -110,7 +110,7 @@ void KSim::Sysinfo::clockUptimeUpdate()
TQString seconds;
// found days so we have to modify hours
if (uptime.tqfind(TQRegExp("%d" ), 0) >= 0)
if (uptime.find(TQRegExp("%d" ), 0) >= 0)
uptimeHours -= (uptimeDays * 24);
days.sprintf("%02li", uptimeDays);
@ -118,10 +118,10 @@ void KSim::Sysinfo::clockUptimeUpdate()
minutes.sprintf("%02li", uptimeMins);
seconds.sprintf("%02li", uptimeSecs);
uptime.tqreplace(TQRegExp("%d"), days);
uptime.tqreplace(TQRegExp("%h"), hours);
uptime.tqreplace(TQRegExp("%m"), minutes);
uptime.tqreplace(TQRegExp("%s"), seconds);
uptime.replace(TQRegExp("%d"), days);
uptime.replace(TQRegExp("%h"), hours);
uptime.replace(TQRegExp("%m"), minutes);
uptime.replace(TQRegExp("%s"), seconds);
m_uptimeLabel->setText(uptime);
}
}
@ -140,15 +140,15 @@ void KSim::Sysinfo::sysUpdate()
unsigned long cache = system.cacheRam();
unsigned long used = system.usedRam();
unsigned long allFree = free + buffer + cache;
bool all = memory.tqfind( "%F" ) != -1;
memory.tqreplace(TQRegExp("%s"), TQString::number(System::bytesToMegs(shared)));
memory.tqreplace(TQRegExp("%b"), TQString::number(System::bytesToMegs(buffer)));
memory.tqreplace(TQRegExp("%c"), TQString::number(System::bytesToMegs(cache)));
memory.tqreplace(TQRegExp("%u"), TQString::number(System::bytesToMegs(used)));
memory.tqreplace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total)));
memory.tqreplace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free)));
memory.tqreplace(TQRegExp("%F"), TQString::number(System::bytesToMegs(allFree)));
bool all = memory.find( "%F" ) != -1;
memory.replace(TQRegExp("%s"), TQString::number(System::bytesToMegs(shared)));
memory.replace(TQRegExp("%b"), TQString::number(System::bytesToMegs(buffer)));
memory.replace(TQRegExp("%c"), TQString::number(System::bytesToMegs(cache)));
memory.replace(TQRegExp("%u"), TQString::number(System::bytesToMegs(used)));
memory.replace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total)));
memory.replace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free)));
memory.replace(TQRegExp("%F"), TQString::number(System::bytesToMegs(allFree)));
kdDebug(2003) << memory << endl;
m_memLabel->setText("Memory");
TQToolTip::add(m_memLabel, memory );
@ -164,9 +164,9 @@ void KSim::Sysinfo::sysUpdate()
unsigned long total = system.totalSwap();
unsigned long free = system.freeSwap();
unsigned long swapUsed = system.usedSwap();
swap.tqreplace(TQRegExp("%u"), TQString::number(System::bytesToMegs(swapUsed)));
swap.tqreplace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total)));
swap.tqreplace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free)));
swap.replace(TQRegExp("%u"), TQString::number(System::bytesToMegs(swapUsed)));
swap.replace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total)));
swap.replace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free)));
m_swapLabel->setText("Swap");
TQToolTip::add(m_swapLabel, swap);
m_swapLabel->setValue(System::bytesToMegs(total) - System::bytesToMegs(free));

@ -119,7 +119,7 @@ KSim::MainView::MainView(KConfig *config,
m_hostLabel->setText(i18n("Unknown"));
else {
TQCString host(hostName);
int dotLocation = host.tqfind(".");
int dotLocation = host.find(".");
if (!m_config->displayFqdn() && dotLocation != -1)
host.truncate(dotLocation);

@ -125,7 +125,7 @@ bool KSim::PluginLoader::unloadPlugin(const TQCString &name)
return false;
// see if our plugin is loaded
KSim::Plugin plugin = tqfind(name);
KSim::Plugin plugin = find(name);
if (plugin.isNull())
return false;
@ -161,7 +161,7 @@ bool KSim::PluginLoader::isLoaded(const TQCString &library) const
if (library.isEmpty())
return false;
return !tqfind(library).isNull();
return !find(library).isNull();
}
KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name,
@ -211,13 +211,13 @@ KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name,
return info;
}
KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName)
KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName)
{
if (libName.isEmpty())
return KSim::Plugin::null;
TQCString library(libName);
if (libName.tqfind(Private::ksimString) == -1)
if (libName.find(Private::ksimString) == -1)
library.prepend(Private::ksimString);
KSim::PluginList::Iterator it;
@ -229,13 +229,13 @@ KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName)
return KSim::Plugin::null;
}
const KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName) const
const KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName) const
{
if (libName.isEmpty())
return KSim::Plugin::null;
TQCString library(libName);
if (libName.tqfind(Private::ksimString) == -1)
if (libName.find(Private::ksimString) == -1)
library.prepend(Private::ksimString);
KSim::PluginList::ConstIterator it;
@ -247,14 +247,14 @@ const KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName) const
return KSim::Plugin::null;
}
KSim::Plugin &KSim::PluginLoader::tqfind(const KSim::PluginInfo &info)
KSim::Plugin &KSim::PluginLoader::find(const KSim::PluginInfo &info)
{
return tqfind(info.libName());
return find(info.libName());
}
const KSim::Plugin &KSim::PluginLoader::tqfind(const KSim::PluginInfo &info) const
const KSim::Plugin &KSim::PluginLoader::find(const KSim::PluginInfo &info) const
{
return tqfind(info.libName());
return find(info.libName());
}
const KSim::PluginList &KSim::PluginLoader::pluginList() const

@ -123,19 +123,19 @@ namespace KSim
* @return a KSim::Plugin object
* @see KSim::Plugin
*/
KSim::Plugin &tqfind(const TQCString &libName);
KSim::Plugin &find(const TQCString &libName);
/**
* convenience function, see the above function for details.
*/
const KSim::Plugin &tqfind(const TQCString &libName) const;
const KSim::Plugin &find(const TQCString &libName) const;
/**
* equivalent to tqfind(info.libName());
* equivalent to find(info.libName());
*/
KSim::Plugin &tqfind(const KSim::PluginInfo &info);
KSim::Plugin &find(const KSim::PluginInfo &info);
/**
* convenience function, see the above function for details.
*/
const KSim::Plugin &tqfind(const KSim::PluginInfo &info) const;
const KSim::Plugin &find(const KSim::PluginInfo &info) const;
/**
* provides plugin(), view(), config page and plugin information
* @see KSim::Plugin KSim::PluginList

@ -64,7 +64,7 @@ void KSim::PluginObject::setConfigFileName(const TQString &name)
return;
d->configName = name;
if (name.tqfind("ksim") == -1)
if (name.find("ksim") == -1)
d->configName.prepend("ksim_");
}

@ -63,7 +63,7 @@ class KSim::Theme::Private
TQString text;
TQStringList::ConstIterator it;
for (it = file.begin(); it != file.end(); ++it) {
if ((*it).tqfind(entry) != -1) {
if ((*it).find(entry) != -1) {
text = TQStringList::split("=", (*it))[1].stripWhiteSpace();
}
}
@ -73,7 +73,7 @@ class KSim::Theme::Private
TQStringList::ConstIterator it2;
for (it2 = dFile.begin(); it2 != dFile.end(); ++it) {
if ((*it2).tqfind(entry) != -1) {
if ((*it2).find(entry) != -1) {
text = TQStringList::split("=", (*it2))[1].stripWhiteSpace();
}
}
@ -135,13 +135,13 @@ TQString KSim::Theme::name() const
if (name.endsWith("/"))
name.remove(name.length() - 1, 1);
return name.remove(0, name.tqfindRev("/") + 1);
return name.remove(0, name.findRev("/") + 1);
}
TQString KSim::Theme::author() const
{
TQString author(d->readOption("author", false));
return author.tqreplace(TQRegExp("\""), TQString());
return author.replace(TQRegExp("\""), TQString());
}
int KSim::Theme::fontItem() const
@ -318,7 +318,7 @@ TQFont KSim::Theme::largeFont() const
return TQApplication::font();
TQFont themeFont;
themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString()));
themeFont.setRawName(font.replace(TQRegExp("\""), TQString()));
return themeFont;
}
@ -330,7 +330,7 @@ TQFont KSim::Theme::normalFont() const
return TQApplication::font();
TQFont themeFont;
themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString()));
themeFont.setRawName(font.replace(TQRegExp("\""), TQString()));
return themeFont;
}
@ -342,7 +342,7 @@ TQFont KSim::Theme::smallFont() const
return TQApplication::font();
TQFont themeFont;
themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString()));
themeFont.setRawName(font.replace(TQRegExp("\""), TQString()));
return themeFont;
}
@ -644,7 +644,7 @@ bool KSim::Theme::textShadow(const TQString &itemType,
return false;
TQString shadow = readEntry(itemType, entry);
if (shadow.isEmpty() || shadow.tqfindRev("none") != -1)
if (shadow.isEmpty() || shadow.findRev("none") != -1)
return false;
return true;
@ -997,26 +997,26 @@ TQString KSim::ThemeLoader::parseConfig(const TQString &url,
while (!origStream.atEnd()) {
TQString line(origStream.readLine().simplifyWhiteSpace());
if (line.tqfind(reg) == 0) // find the location of the * comments
if (line.find(reg) == 0) // find the location of the * comments
// replace all * comments with # comments so KConfig doesn't complain
line.tqreplace(reg, "#");
line.replace(reg, "#");
if (line.tqfind("#") == -1) { // find the location of the string 'gkrellmms'
if (line.tqfindRev("=") == -1) { // if found we check for the string '='
int numLoc = line.tqfindRev(numbers);
if (line.find("#") == -1) { // find the location of the string 'gkrellmms'
if (line.findRev("=") == -1) { // if found we check for the string '='
int numLoc = line.findRev(numbers);
if (numLoc != -1)
// if '=' doesn't exist we add one so KConfig doesn't complain
line.insert(numLoc, " = ");
numLoc = line.tqfindRev(number);
numLoc = line.findRev(number);
if (numLoc != -1)
// if '=' doesn't exist we add one so KConfig doesn't complain
line.insert(numLoc, " = ");
numLoc = line.tqfindRev(minus);
numLoc = line.findRev(minus);
if (numLoc != -1)
// replace the '-' with an '=' so KConfig doesn't get confused
line.tqreplace(TQRegExp("-"), "=");
line.replace(TQRegExp("-"), "=");
}
}
@ -1038,7 +1038,7 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt)
homePath = locateLocal( "data", "ksim" )
+ TQString::tqfromLatin1( "/themes" )
+ homePath.right( homePath.length()
- homePath.tqfindRev( TQRegExp( "\\/" ),
- homePath.findRev( TQRegExp( "\\/" ),
homePath.length() ) );
if ( !TQFile::exists( homePath ) )

@ -67,7 +67,7 @@ void KSim::MonitorPrefs::saveConfig(KSim::Config *config)
TQStringList::ConstIterator it;
for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) {
KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo((*it));
item = static_cast<TQCheckListItem *>(tqfindItem(info.name(), 0));
item = static_cast<TQCheckListItem *>(findItem(info.name(), 0));
config->setEnabledMonitor(info.libName(), item->isOn());
config->setMonitorCommand(info.libName(), item->text(2));
config->setMonitorLocation(info.libName(), itemIndex(item));
@ -82,7 +82,7 @@ void KSim::MonitorPrefs::readConfig(KSim::Config *config)
for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) {
KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo((*it));
location = config->monitorLocation(info.libName());
origItem = static_cast<TQCheckListItem *>(tqfindItem(info.name(), 0));
origItem = static_cast<TQCheckListItem *>(findItem(info.name(), 0));
origItem->setOn(config->enabledMonitor(info.libName()));
origItem->setText(2, config->monitorCommand(info.libName()));
if (TQListViewItem *item = itemAtIndex(location)) {

@ -181,15 +181,15 @@ void CpuView::updateView()
// kdDebug(2003) << "idle = " << cpuData.idle << endl;
if (!m_firstTime) {
if (text.tqfind("%T") != -1)
if (text.find("%T") != -1)
cpuDiff = cpuData.sys + cpuData.user + cpuData.nice;
else if (text.tqfind("%t") != -1)
else if (text.find("%t") != -1)
cpuDiff = cpuData.sys + cpuData.user;
else if (text.tqfind("%s") != -1)
else if (text.find("%s") != -1)
cpuDiff = cpuData.sys;
else if (text.tqfind("%u") != -1)
else if (text.find("%u") != -1)
cpuDiff = cpuData.user;
else if (text.tqfind("%n") != -1)
else if (text.find("%n") != -1)
cpuDiff = cpuData.nice;
cpuDiff *= 100;
@ -225,7 +225,7 @@ void CpuView::updateCpu(CpuData &cpu, int cpuNumber)
while (!m_procStream->atEnd()) {
parser = m_procStream->readLine();
// remove all the entries apart from the line containing 'cpuString'
if (!cpuFound && parser.tqfind(TQRegExp(cpuString)) != -1) {
if (!cpuFound && parser.find(TQRegExp(cpuString)) != -1) {
output = parser;
cpuFound = true;
}
@ -438,7 +438,7 @@ void CpuConfig::readConfig()
TQStringList::ConstIterator it;
for (it = enabledCpus.begin(); it != enabledCpus.end(); ++it) {
if (TQCheckListItem *item =
static_cast<TQCheckListItem *>(m_listView->tqfindItem((*it), 0))) {
static_cast<TQCheckListItem *>(m_listView->findItem((*it), 0))) {
item->setOn(true);
item->setText(1, config()->readEntry(CPU_NAME(cpuNum), "%T"));
}

@ -248,7 +248,7 @@ void DiskView::updateData(DiskList &disks)
// (3,0):(108911,48080,1713380,60831,1102644)
TQRegExp regexp("\\([0-9]+,[0-9]+\\):\\([0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+\\)");
TQString content = m_procStream->read();
if (content.tqfind("disk_io") == -1)
if (content.find("disk_io") == -1)
{
m_bLinux24 = false;
@ -267,8 +267,8 @@ void DiskView::updateData(DiskList &disks)
{
idx += regexp.matchedLength();
TQString diskStr = regexp.cap(0);
diskStr.tqreplace(':', ',');
diskStr.tqreplace(TQRegExp("\\)?\\(?"), TQString());
diskStr.replace(':', ',');
diskStr.replace(TQRegExp("\\)?\\(?"), TQString());
TQStringList list = TQStringList::split(',', diskStr);
if (list.count() < 7)
@ -527,7 +527,7 @@ void DiskConfig::readConfig()
TQStringList::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
TQString text = ((*it) == "complete" ? i18n("All Disks") : (*it));
if (!m_listview->tqfindItem(text, 0))
if (!m_listview->findItem(text, 0))
new TQListViewItem(m_listview, text);
}
}

@ -189,7 +189,7 @@ void FilesystemWidget::processExited(KProcess *)
TQStringList::Iterator it;
for (it = errorList.begin(); it != errorList.end(); ++it) {
message += TQString::tqfromLatin1("<li>%1</li>")
.tqarg((*it).tqreplace(TQRegExp("[u]?mount: "), TQString()));
.tqarg((*it).replace(TQRegExp("[u]?mount: "), TQString()));
}
message += TQString::tqfromLatin1("</ul></qt>");

@ -107,7 +107,7 @@ void FsystemConfig::readConfig()
TQStringList list = config()->readListEntry("mountEntries");
for (TQListViewItemIterator it(m_availableMounts); it.current(); ++it) {
TQString string = it.current()->text(0) + ":" + splitString(it.current()->text(0));
static_cast<TQCheckListItem *>(it.current())->setOn(list.tqcontains(string) > 0);
static_cast<TQCheckListItem *>(it.current())->setOn(list.contains(string) > 0);
}
}
@ -155,7 +155,7 @@ void FsystemConfig::getStats()
if ( !FilesystemStats::readStats( ( *it ).dir, total, free ) )
continue;
if ( !m_availableMounts->tqfindItem( ( *it ).dir, 0 ) )
if ( !m_availableMounts->findItem( ( *it ).dir, 0 ) )
{
(void) new FSysViewItem( m_availableMounts, ( *it ).dir,
( *it ).fsname, ( *it ).type );
@ -169,7 +169,7 @@ void FsystemConfig::getStats()
TQStringList list = config()->readListEntry("mountEntries");
for (TQListViewItemIterator it(m_availableMounts); it.current(); ++it) {
TQString string = it.current()->text(0) + ":" + splitString(it.current()->text(0));
static_cast<TQCheckListItem *>(it.current())->setOn(list.tqcontains(string) > 0);
static_cast<TQCheckListItem *>(it.current())->setOn(list.contains(string) > 0);
}
}
@ -178,7 +178,7 @@ TQString FsystemConfig::splitString(const TQString &string) const
if (string == "/" || !m_splitNames->isChecked())
return string;
int location = string.tqfindRev("/");
int location = string.findRev("/");
TQString newString(string);
return newString.remove(0, location + 1);
}

@ -212,16 +212,16 @@ bool SensorBase::init()
TQString SensorBase::sensorType(const TQString &name)
{
if (name.tqfindRev("fan", -1, false) != -1)
if (name.findRev("fan", -1, false) != -1)
return i18n("Rounds per minute", " RPM");
if (name.tqfindRev("temp", -1, false) != -1)
if (name.findRev("temp", -1, false) != -1)
if (SensorBase::fahrenheit())
return TQString::tqfromLatin1("°F");
else
return TQString::tqfromLatin1("°C");
if (name.tqfindRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1)
if (name.findRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1)
return i18n("Volt", "V");
return TQString();
@ -239,7 +239,7 @@ TQString SensorBase::chipsetString(const ChipName *c)
float SensorBase::formatValue(const TQString &label, float value)
{
if (label.tqfindRev("temp", -1, false) != -1)
if (label.findRev("temp", -1, false) != -1)
return toFahrenheit(value);
return value;
@ -247,7 +247,7 @@ float SensorBase::formatValue(const TQString &label, float value)
TQString SensorBase::formatString(const TQString &label, float value)
{
if (label.tqfindRev("fan", -1, false) != -1)
if (label.findRev("fan", -1, false) != -1)
return TQString::number(value);
return TQString::number(value,'f',2);

@ -233,7 +233,7 @@ void SensorsConfig::showEvent(TQShowEvent *)
const SensorList &list = SensorBase::self()->sensorsList();
SensorList::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
TQListViewItem *item = m_sensorView->tqfindItem((*it).sensorName(), 1);
TQListViewItem *item = m_sensorView->findItem((*it).sensorName(), 1);
if (item)
item->setText(3, (*it).sensorValue() + (*it).sensorUnit());
}

@ -371,8 +371,8 @@ void NetView::updateGraph()
}
// Keep backwards compat for now
if ( timeDisplay.tqcontains( '%' ) > 0 )
timeDisplay.tqreplace( '%', "" );
if ( timeDisplay.contains( '%' ) > 0 )
timeDisplay.replace( '%', "" );
( *it ).label()->setText( netTime.toString( timeDisplay ) );
}
@ -468,7 +468,7 @@ void NetView::netStatistics(const TQString &device, NetData &data)
while (!m_procStream->atEnd()) {
parser = m_procStream->readLine();
// remove all the entries apart from the line containing 'device'
if (parser.tqfind(device) != -1)
if (parser.find(device) != -1)
output = parser;
}
@ -480,7 +480,7 @@ void NetView::netStatistics(const TQString &device, NetData &data)
// make sure our output doesn't contain "eth0:11210107" so we dont
// end up with netList[1] actually being netList[2]
output.tqreplace(TQRegExp(":"), " ");
output.replace(TQRegExp(":"), " ");
TQStringList netList = TQStringList::split(' ', output);
data.in = netList[1].toULong();
@ -559,7 +559,7 @@ bool NetView::isOnline(const TQString &device)
if (!file.open(IO_ReadOnly))
return -1;
return (TQTextStream(&file).read().tqfind(device) != -1 ? true : false);
return (TQTextStream(&file).read().find(device) != -1 ? true : false);
#endif
#ifdef __FreeBSD__

@ -256,7 +256,7 @@ TQStringList NetDialog::createList() const
for (it = output.begin(); it != output.end(); ++it) {
list = TQStringList::split(' ', (*it));
(*it) = list[0].stripWhiteSpace();
(*it).truncate((*it).tqfind(':'));
(*it).truncate((*it).find(':'));
}
return output;

@ -134,7 +134,7 @@ void BrowseDialog::applyFilter( TQListViewItem *item )
return;
}
if ( item->text( 0 ).tqfind( filterText, 0 /*index*/, false /*case sensitive*/ ) == -1 ) {
if ( item->text( 0 ).find( filterText, 0 /*index*/, false /*case sensitive*/ ) == -1 ) {
item->setVisible( false );
return;
}

@ -123,7 +123,7 @@ void ConfigPage::modifyHost()
if ( !currentItem )
return;
HostConfigMap::Iterator hostIt = m_hosts.tqfind( currentItem->text( 0 ) );
HostConfigMap::Iterator hostIt = m_hosts.find( currentItem->text( 0 ) );
if ( hostIt == m_hosts.end() )
return;
@ -147,7 +147,7 @@ void ConfigPage::removeHost()
if ( !currentItem )
return;
HostConfigMap::Iterator hostIt = m_hosts.tqfind( currentItem->text( 0 ) );
HostConfigMap::Iterator hostIt = m_hosts.find( currentItem->text( 0 ) );
if ( hostIt == m_hosts.end() )
return;
@ -191,7 +191,7 @@ void ConfigPage::modifyMonitor()
if ( !currentItem )
return;
MonitorConfigMap::Iterator monitorIt = m_monitors.tqfind( currentItem->text( 0 ) );
MonitorConfigMap::Iterator monitorIt = m_monitors.find( currentItem->text( 0 ) );
if ( monitorIt == m_monitors.end() )
return;
@ -215,7 +215,7 @@ void ConfigPage::removeMonitor()
if ( !currentItem )
return;
MonitorConfigMap::Iterator monitorIt = m_monitors.tqfind( currentItem->text( 0 ) );
MonitorConfigMap::Iterator monitorIt = m_monitors.find( currentItem->text( 0 ) );
if ( monitorIt == m_monitors.end() )
return;

@ -163,7 +163,7 @@ void HostDialog::loadSettingsFromHostConfig( const HostConfig &src )
hostName->setText( src.name );
port->setValue( src.port );
snmpVersion->setCurrentItem( allSnmpVersions().tqfindIndex( snmpVersionToString( src.version ) ) );
snmpVersion->setCurrentItem( allSnmpVersions().findIndex( snmpVersionToString( src.version ) ) );
if ( src.version != SnmpVersion3 ) {
communityString->setText( src.community );
@ -172,18 +172,18 @@ void HostDialog::loadSettingsFromHostConfig( const HostConfig &src )
securityName->setText( src.securityName );
securityLevel->setCurrentItem( allSecurityLevels().tqfindIndex( securityLevelToString( src.securityLevel ) ) );
securityLevel->setCurrentItem( allSecurityLevels().findIndex( securityLevelToString( src.securityLevel ) ) );
if ( src.securityLevel == NoAuthPriv )
return;
authenticationType->setCurrentItem( allAuthenticationProtocols().tqfindIndex( authenticationProtocolToString( src.authentication.protocol ) ) );
authenticationType->setCurrentItem( allAuthenticationProtocols().findIndex( authenticationProtocolToString( src.authentication.protocol ) ) );
authenticationPassphrase->setText( src.authentication.key );
if ( src.securityLevel == AuthNoPriv )
return;
privacyType->setCurrentItem( allPrivacyProtocols().tqfindIndex( privacyProtocolToString( src.privacy.protocol ) ) );
privacyType->setCurrentItem( allPrivacyProtocols().findIndex( privacyProtocolToString( src.privacy.protocol ) ) );
privacyPassphrase->setText( src.privacy.key );
}

@ -32,8 +32,8 @@ void LabelMonitor::setData( const Value &data )
if ( m_config.useCustomFormatString ) {
TQString text = m_config.customFormatString;
text.tqreplace( "%n", m_config.name );
text.tqreplace( "%s", dataString );
text.replace( "%n", m_config.name );
text.replace( "%s", dataString );
setText( text );
} else
setText( m_config.name + ": " + dataString );

@ -39,7 +39,7 @@ bool MonitorConfig::load( KConfigBase &config, const HostConfigMap &hosts )
if ( hostName.isEmpty() )
return false;
HostConfigMap::ConstIterator hostIt = hosts.tqfind( hostName );
HostConfigMap::ConstIterator hostIt = hosts.find( hostName );
if ( hostIt == hosts.end() )
return false;

@ -144,14 +144,14 @@ void MonitorDialog::init( const MonitorConfig &monitor )
assert( allHosts.findIndex( monitor.host.name ) != -1 );
host->setCurrentItem( allHosts.tqfindIndex( monitor.host.name ) );
host->setCurrentItem( allHosts.findIndex( monitor.host.name ) );
oid->setText( monitor.oid );
updateIntervalMinutes->setValue( monitor.refreshInterval.minutes );
updateIntervalSeconds->setValue( monitor.refreshInterval.seconds );
displayType->setCurrentItem( allDisplayTypes().tqfindIndex( monitorDisplayTypeToString( monitor.display ) ) );
displayType->setCurrentItem( allDisplayTypes().findIndex( monitorDisplayTypeToString( monitor.display ) ) );
customFormatStringCheckBox->setChecked( monitor.useCustomFormatString );
customFormatString->setEnabled( monitor.useCustomFormatString );
@ -166,7 +166,7 @@ void MonitorDialog::init( const MonitorConfig &monitor )
HostConfig MonitorDialog::currentHost() const
{
HostConfigMap::ConstIterator hostIt = m_hosts.tqfind( host->currentText() );
HostConfigMap::ConstIterator hostIt = m_hosts.find( host->currentText() );
if ( hostIt == m_hosts.end() )
return HostConfig();

@ -235,7 +235,7 @@ bool Session::snmpGet( const Identifier &identifier, Value &value, ErrorInfo *er
if ( !snmpGet( ids, vars, error ) )
return false;
ValueMap::ConstIterator it = vars.tqfind( identifier );
ValueMap::ConstIterator it = vars.find( identifier );
if ( it == vars.end() ) {
if ( error )
*error = ErrorInfo( ErrorInfo::ErrMissingVariables );

@ -83,7 +83,7 @@ KWalletContainerItem* KWalletFolderItem::getContainer(KWallet::Wallet::EntryType
return 0;
}
bool KWalletFolderItem::tqcontains(const TQString& key) {
bool KWalletFolderItem::contains(const TQString& key) {
return (getItem(key) != 0);
}
@ -138,7 +138,7 @@ KWallet::Wallet::EntryType KWalletContainerItem::type() {
return _type;
}
bool KWalletContainerItem::tqcontains(const TQString& key) {
bool KWalletContainerItem::contains(const TQString& key) {
return getItem(key) != 0;
}
@ -668,7 +668,7 @@ void KWalletIconView::slotDropped(TQDropEvent *e, const TQValueList<TQIconDragIt
void KWalletIconView::contentsMousePressEvent(TQMouseEvent *e) {
_mousePos = e->pos();
if (!tqfindItem(_mousePos)) {
if (!findItem(_mousePos)) {
clearSelection();
}
KIconView::contentsMousePressEvent( e );

@ -64,7 +64,7 @@ class KWalletContainerItem : public KListViewItem {
public:
virtual int rtti() const;
KWallet::Wallet::EntryType type();
bool tqcontains(const TQString& itemKey);
bool contains(const TQString& itemKey);
TQListViewItem* getItem(const TQString& itemKey);
private:
@ -84,7 +84,7 @@ class KWalletFolderItem : public KListViewItem {
void refresh();
KWalletContainerItem* getContainer(KWallet::Wallet::EntryType type);
TQPixmap getFolderIcon(KIcon::Group group);
bool tqcontains(const TQString& itemKey);
bool contains(const TQString& itemKey);
TQListViewItem* getItem(const TQString& itemKey);
public:

@ -101,11 +101,11 @@ void KWalletConfig::updateWalletLists() {
_wcw->_localWallet->insertStringList(wl);
_wcw->_defaultWallet->insertStringList(wl);
if (wl.tqcontains(p1)) {
if (wl.contains(p1)) {
_wcw->_localWallet->setCurrentText(p1);
}
if (wl.tqcontains(p2)) {
if (wl.contains(p2)) {
_wcw->_defaultWallet->setCurrentText(p2);
}
}

@ -230,7 +230,7 @@ void KWalletEditor::updateFolderList(bool checkEntries) {
if (!fi) {
continue;
}
if (!fl.tqcontains(fi->name())) {
if (!fl.contains(fi->name())) {
trash.push(i);
}
}
@ -277,7 +277,7 @@ void KWalletEditor::updateFolderList(bool checkEntries) {
}
//check if the current folder has been removed
if (!fl.tqcontains(_currentFolder)) {
if (!fl.contains(_currentFolder)) {
_currentFolder = "";
_ww->_entryTitle->clear();
_ww->_iconTitle->clear();
@ -478,7 +478,7 @@ void KWalletEditor::updateEntries(const TQString& folder) {
// Remove deleted entries
for (TQListViewItem *i = pi->firstChild(); i; i = i->nextSibling()) {
if (!entries.tqcontains(i->text(0))) {
if (!entries.contains(i->text(0))) {
if (i == _entryList->currentItem()) {
entrySelectionChanged(0L);
}
@ -487,7 +487,7 @@ void KWalletEditor::updateEntries(const TQString& folder) {
}
for (TQListViewItem *i = mi->firstChild(); i; i = i->nextSibling()) {
if (!entries.tqcontains(i->text(0))) {
if (!entries.contains(i->text(0))) {
if (i == _entryList->currentItem()) {
entrySelectionChanged(0L);
}
@ -496,7 +496,7 @@ void KWalletEditor::updateEntries(const TQString& folder) {
}
for (TQListViewItem *i = bi->firstChild(); i; i = i->nextSibling()) {
if (!entries.tqcontains(i->text(0))) {
if (!entries.contains(i->text(0))) {
if (i == _entryList->currentItem()) {
entrySelectionChanged(0L);
}
@ -505,7 +505,7 @@ void KWalletEditor::updateEntries(const TQString& folder) {
}
for (TQListViewItem *i = ui->firstChild(); i; i = i->nextSibling()) {
if (!entries.tqcontains(i->text(0))) {
if (!entries.contains(i->text(0))) {
if (i == _entryList->currentItem()) {
entrySelectionChanged(0L);
}
@ -518,7 +518,7 @@ void KWalletEditor::updateEntries(const TQString& folder) {
// Add new entries
for (TQStringList::Iterator i = entries.begin(); i != entries.end(); ++i) {
if (fi->tqcontains(*i)){
if (fi->contains(*i)){
continue;
}
@ -658,7 +658,7 @@ void KWalletEditor::newEntry() {
}
// FIXME: prohibits the use of the subheadings
if (fi->tqcontains(n)) {
if (fi->contains(n)) {
int rc = KMessageBox::questionYesNo(this, i18n("Sorry, that entry already exists. Try again?"), TQString(), i18n("Try Again"), i18n("Do Not Try"));
if (rc == KMessageBox::Yes) {
continue;

@ -185,7 +185,7 @@ TQStringList wl = KWallet::Wallet::walletList();
TQPtrStack<TQIconViewItem> trash;
for (TQIconViewItem *item = _iconView->firstItem(); item; item = item->nextItem()) {
if (!wl.tqcontains(item->text())) {
if (!wl.contains(item->text())) {
trash.push(item);
}
}
@ -194,7 +194,7 @@ TQPtrStack<TQIconViewItem> trash;
trash.clear();
for (TQStringList::Iterator i = wl.begin(); i != wl.end(); ++i) {
if (!_iconView->tqfindItem(*i)) {
if (!_iconView->findItem(*i)) {
// FIXME: if KWallet::Wallet::isOpen(*i) then show
// a different icon!
new KWalletItem(_iconView, *i);
@ -372,7 +372,7 @@ void KWalletManager::createWallet() {
return;
}
if (_iconView->tqfindItem(n)) {
if (_iconView->findItem(n)) {
int rc = KMessageBox::questionYesNo(this, i18n("Sorry, that wallet already exists. Try a new name?"), TQString(), i18n("Try New"), i18n("Do Not Try"));
if (rc == KMessageBox::Yes) {
continue;

@ -168,10 +168,10 @@ class InlineEditor : public TQTextEdit {
};
TQWidget *KWMapEditor::beginEdit(int row, int col, bool tqreplace) {
TQWidget *KWMapEditor::beginEdit(int row, int col, bool replace) {
//kdDebug(2300) << "EDIT COLUMN " << col << endl;
if (col != 2) {
return TQTable::beginEdit(row, col, tqreplace);
return TQTable::beginEdit(row, col, replace);
}
TQRect geo = cellGeometry(row, col);

@ -47,7 +47,7 @@ class KWMapEditor : public TQTable {
void copy();
protected:
virtual TQWidget *beginEdit(int row, int col, bool tqreplace);
virtual TQWidget *beginEdit(int row, int col, bool replace);
signals:
void dirty();

@ -7,7 +7,7 @@
<a>You will need to install the python-devel package. Once that package is installed you can ./configure and make again.
<c>Installation
<q>When I try to compile, I get this error: "cannot tqfind -lselinux"
<q>When I try to compile, I get this error: "cannot find -lselinux"
<a>You will need to install the libselinux-devel package. Once that package is installed you can ./configure and make again.
<c>Installation

@ -17,7 +17,7 @@ SuperKaramba Frequently Asked Questions
<dd><ul>
<li><a href="#Installation0">1.1. Where can I find SuperKaramba RPMs?</a></li>
<li><a href="#Installation1">1.2. When I try to compile, I get this error: "Python.h: No such file or directory"</a></li>
<li><a href="#Installation2">1.3. When I try to compile, I get this error: "cannot tqfind -lselinux"</a></li>
<li><a href="#Installation2">1.3. When I try to compile, I get this error: "cannot find -lselinux"</a></li>
<li><a href="#Installation3">1.4. After running ./configure,make, and make install, the superkaramba executable is not where I expected it to be. When I try to run superkaramba from the command line it says "command not found".</a></li>
</ul></dd>
<dt><b>2. General</b></dt>
@ -46,7 +46,7 @@ SuperKaramba Frequently Asked Questions
<dd>The SuperKaramba web site (<a href="http://netdragon.sourceforge.net">http://netdragon.sourceforge.net</a>) has a list of user-submitted RPMs for several distributions. Other user-submitted RPMs have been posted to <a href="http://www.kde-look.org">kde-look.org</a> and to the SuperKaramba Help forum.<br><br></dd>
<dt><b><a name="Installation1">1.2. When I try to compile, I get this error: "Python.h: No such file or directory"</a></b></dt>
<dd>You will need to install the python-devel package. Once that package is installed you can ./configure and make again.<br><br></dd>
<dt><b><a name="Installation2">1.3. When I try to compile, I get this error: "cannot tqfind -lselinux"</a></b></dt>
<dt><b><a name="Installation2">1.3. When I try to compile, I get this error: "cannot find -lselinux"</a></b></dt>
<dd>You will need to install the libselinux-devel package. Once that package is installed you can ./configure and make again.<br><br></dd>
<dt><b><a name="Installation3">1.4. After running ./configure,make, and make install, the superkaramba executable is not where I expected it to be. When I try to run superkaramba from the command line it says "command not found".</a></b></dt>
<dd>In some distributions ./configure points to different path than you might expect. For example, in Mandrake the default ./configure prefix is /usr/local/kde and the executable is installed in /usr/local/kde/bin. There are a few things you can do to fix this. You could run ./configure --prefix=/usr to specify the prefix that you prefer and then try make and make install again. Or you could create a symbolic link in your preferred directory that links to the executable. Or you could add the install directory to your $PATH.<br><br></dd>

@ -13,7 +13,7 @@ Table of Contents
1.1. Where can I find SuperKaramba RPMs?
1.2. When I try to compile, I get this error: "Python.h: No such file or directory"
1.3. When I try to compile, I get this error: "cannot tqfind -lselinux"
1.3. When I try to compile, I get this error: "cannot find -lselinux"
1.4. After running ./configure,make, and make install, the superkaramba executable is not where I expected it to be. When I try to run superkaramba from the command line it says "command not found".
@ -51,7 +51,7 @@ The SuperKaramba web site (http://netdragon.sourceforge.net) has a list of user-
You will need to install the python-devel package. Once that package is installed you can ./configure and make again.
1.3. When I try to compile, I get this error: "cannot tqfind -lselinux"
1.3. When I try to compile, I get this error: "cannot find -lselinux"
You will need to install the libselinux-devel package. Once that package is installed you can ./configure and make again.

@ -25,7 +25,7 @@ function replaceComments()
}
FOO=`tqfind $SRCDIR -type f -name "*_python.h"`
FOO=`find $SRCDIR -type f -name "*_python.h"`
for FILE in $FOO
do

@ -43,9 +43,9 @@ i = 0
for x in output:
param = x.split()
if (len(param) > 1):
if param[0].tqfind("Width:") != -1:
if param[0].find("Width:") != -1:
resX = int(param[1])
if param[0].tqfind("Height:") != -1:
if param[0].find("Height:") != -1:
resY = int(param[1])

@ -27,7 +27,7 @@ ClickArea::~ClickArea()
bool ClickArea::click( TQMouseEvent *e )
{
if( rect.tqcontains( e->x(), e->y() ) )
if( rect.contains( e->x(), e->y() ) )
{
//qDebug(TQString::number(e->type()));
//KShellProcess ksp;
@ -44,7 +44,7 @@ bool ClickArea::click( TQMouseEvent *e )
{
TQString program;
program = onClick;
program.tqreplace( TQRegExp("%v", false), value );
program.replace( TQRegExp("%v", false), value );
if( !program.isEmpty() )
{

@ -41,7 +41,7 @@ void ClickMap::setTextProps( TextField *t )
bool ClickMap::click( TQMouseEvent *e ) {
//Don't load the web page if the click isn't for us
if (boundingBox.tqcontains(e->x(), e->y())) {
if (boundingBox.contains(e->x(), e->y())) {
int index = ((e -> y() - getY()) / text.getLineHeight()) + 1;
if (index >= 1 && index <= (int)displays.count()) {

@ -145,12 +145,12 @@ void CPUSensor::update()
{
format = "%v";
}
format.tqreplace( TQRegExp("%load", false), TQString::number( load ) );
format.tqreplace( TQRegExp("%user", false), TQString::number( user ) );
format.tqreplace( TQRegExp("%nice", false), TQString::number( nice ) );
format.tqreplace( TQRegExp("%idle", false), TQString::number( idle ) );
format.tqreplace( TQRegExp("%system", false), TQString::number( system ) );
format.tqreplace( TQRegExp("%v", false), TQString::number( load ) );
format.replace( TQRegExp("%load", false), TQString::number( load ) );
format.replace( TQRegExp("%user", false), TQString::number( user ) );
format.replace( TQRegExp("%nice", false), TQString::number( nice ) );
format.replace( TQRegExp("%idle", false), TQString::number( idle ) );
format.replace( TQRegExp("%system", false), TQString::number( system ) );
format.replace( TQRegExp("%v", false), TQString::number( load ) );
meter->setValue( format );
++it;

@ -80,7 +80,7 @@ void DateSensor::toggleCalendar(TQMouseEvent *ev)
TQString height = sp->getParam("CALHEIGHT");
TQRect rect(meter->getX(),meter->getY(),width.toInt(), height.toInt());
if (rect.tqcontains( ev->x(), ev->y() ))
if (rect.contains( ev->x(), ev->y() ))
{
if (hidden)
{

@ -114,31 +114,31 @@ void DiskSensor::processExited(KProcess *)
{
format = "%u";
}
format.tqreplace( TQRegExp("%fp", false),TQString::number(getPercentFree(mntPt)));
format.tqreplace( TQRegExp("%fg",false),
format.replace( TQRegExp("%fp", false),TQString::number(getPercentFree(mntPt)));
format.replace( TQRegExp("%fg",false),
TQString::number(getFreeSpace(mntPt)/(1024*1024)));
format.tqreplace( TQRegExp("%fkb",false),
format.replace( TQRegExp("%fkb",false),
TQString::number(getFreeSpace(mntPt)*8) );
format.tqreplace( TQRegExp("%fk",false),
format.replace( TQRegExp("%fk",false),
TQString::number(getFreeSpace(mntPt)) );
format.tqreplace( TQRegExp("%f", false),TQString::number(getFreeSpace(mntPt)/1024));
format.replace( TQRegExp("%f", false),TQString::number(getFreeSpace(mntPt)/1024));
format.tqreplace( TQRegExp("%up", false),TQString::number(getPercentUsed(mntPt)));
format.tqreplace( TQRegExp("%ug",false),
format.replace( TQRegExp("%up", false),TQString::number(getPercentUsed(mntPt)));
format.replace( TQRegExp("%ug",false),
TQString::number(getUsedSpace(mntPt)/(1024*1024)));
format.tqreplace( TQRegExp("%ukb",false),
format.replace( TQRegExp("%ukb",false),
TQString::number(getUsedSpace(mntPt)*8) );
format.tqreplace( TQRegExp("%uk",false),
format.replace( TQRegExp("%uk",false),
TQString::number(getUsedSpace(mntPt)) );
format.tqreplace( TQRegExp("%u", false),TQString::number(getUsedSpace(mntPt)/1024));
format.replace( TQRegExp("%u", false),TQString::number(getUsedSpace(mntPt)/1024));
format.tqreplace( TQRegExp("%tg",false),
format.replace( TQRegExp("%tg",false),
TQString::number(getTotalSpace(mntPt)/(1024*1024)));
format.tqreplace( TQRegExp("%tkb",false),
format.replace( TQRegExp("%tkb",false),
TQString::number(getTotalSpace(mntPt)*8));
format.tqreplace( TQRegExp("%tk",false),
format.replace( TQRegExp("%tk",false),
TQString::number(getTotalSpace(mntPt)));
format.tqreplace( TQRegExp("%t", false),TQString::number(getTotalSpace(mntPt)/1024));
format.replace( TQRegExp("%t", false),TQString::number(getTotalSpace(mntPt)/1024));
meter->setValue(format);
++lit;
}

@ -86,15 +86,15 @@ ChannelIntensity::ChannelIntensity(ImageLabel* img, float r, TQString c,
ratio = (ratio < -1) ? -1 : ratio;
channel = 0;
if (c.tqfind("red", 0 , false))
if (c.find("red", 0 , false))
{
channel = 0;
}
else if (c.tqfind("green", 0, false))
else if (c.find("green", 0, false))
{
channel = 1;
}
else if (c.tqfind("blue", 0, false))
else if (c.find("blue", 0, false))
{
channel = 2;
}
@ -384,7 +384,7 @@ void ImageLabel::mUpdate(TQPainter* p)
bool ImageLabel::click(TQMouseEvent* e)
{
if (getBoundingBox().tqcontains(e -> x(), e -> y()) && isEnabled())
if (getBoundingBox().contains(e -> x(), e -> y()) && isEnabled())
{
TQString program;
if (e -> button() == Qt::LeftButton)
@ -530,7 +530,7 @@ void ImageLabel::rolloverImage(TQMouseEvent *e)
if (zoomed)
{
if (!rect_off.tqcontains(e->pos()))
if (!rect_off.contains(e->pos()))
{
// rollover the image to the zoomed image
//setValue(fn_roll);
@ -545,7 +545,7 @@ void ImageLabel::rolloverImage(TQMouseEvent *e)
}
else
{
if (rect_off.tqcontains(e->pos()))
if (rect_off.contains(e->pos()))
{
// rollover the image to the zoomed image
//setValue(fn_roll);

@ -70,7 +70,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance,
KURL url;
if(fn.tqfind('/') == -1)
if(fn.find('/') == -1)
url.setFileName(fn);
else
url = fn;
@ -1338,7 +1338,7 @@ void karamba::passClick(TQMouseEvent *e)
{
Meter* meter = (Meter*)(*it);
// Check if meter is still in list
if (clickList->tqcontainsRef(meter) && meter->click(e))
if (clickList->containsRef(meter) && meter->click(e))
{
// callback
meterClicked(e, meter);
@ -1388,7 +1388,7 @@ void karamba::passWheelClick( TQWheelEvent *e )
{
Meter* meter = (Meter*)(*it);
// Check if meter is still in list
if (clickList->tqcontainsRef(meter) && meter->click(&fakeEvent))
if (clickList->containsRef(meter) && meter->click(&fakeEvent))
{
if (RichTextLabel* richText = dynamic_cast<RichTextLabel*>(meter))
{

@ -142,7 +142,7 @@ public:
void changeInterval(int interval);
void setWidgetUpdate(bool wu) { widgetUpdate = wu; };
bool getWidgetUpdate() { return widgetUpdate; };
bool hasMeter(Meter* meter) { return meterList->tqcontainsRef(meter) > 0; };
bool hasMeter(Meter* meter) { return meterList->containsRef(meter) > 0; };
char getTempUnit() { return tempUnit; };
void addMenuConfigOption(TQString key, TQString name);
bool setMenuConfigOption(TQString key, bool value);

@ -309,7 +309,7 @@ void KarambaApplication::deleteKaramba(karamba* k, bool reloading)
bool KarambaApplication::hasKaramba(karamba* k)
{
return karambaList->tqcontainsRef(TQT_TQOBJECT(k)) > 0;
return karambaList->containsRef(TQT_TQOBJECT(k)) > 0;
}
// XXX: I guess this should be made with mutex/semaphores

@ -318,17 +318,17 @@ void MemSensor::update()
format = "%um";
}
format.tqreplace( TQRegExp("%fmb", false), TQString::number( (int)(( totalMem - usedMemNoBuffers)/1024.0+0.5)));
format.tqreplace( TQRegExp("%fm", false), TQString::number( (int)( ( totalMem - usedMem )/1024.0+0.5) ));
format.replace( TQRegExp("%fmb", false), TQString::number( (int)(( totalMem - usedMemNoBuffers)/1024.0+0.5)));
format.replace( TQRegExp("%fm", false), TQString::number( (int)( ( totalMem - usedMem )/1024.0+0.5) ));
format.tqreplace( TQRegExp("%umb", false), TQString::number( (int)((usedMemNoBuffers)/1024.0+0.5)));
format.tqreplace( TQRegExp("%um", false), TQString::number( (int)((usedMem)/1024.0+0.5 )));
format.replace( TQRegExp("%umb", false), TQString::number( (int)((usedMemNoBuffers)/1024.0+0.5)));
format.replace( TQRegExp("%um", false), TQString::number( (int)((usedMem)/1024.0+0.5 )));
format.tqreplace( TQRegExp("%tm", false), TQString::number( (int)( (totalMem)/1024.0+0.5)));
format.replace( TQRegExp("%tm", false), TQString::number( (int)( (totalMem)/1024.0+0.5)));
format.tqreplace( TQRegExp("%fs", false), TQString::number( (int)((totalSwap - usedSwap)/1024.0+0.5)));
format.tqreplace( TQRegExp("%us", false), TQString::number( (int)(usedSwap/1024.0+0.5)));
format.tqreplace( TQRegExp("%ts", false), TQString::number( (int)(totalSwap/1024.0+0.5)));
format.replace( TQRegExp("%fs", false), TQString::number( (int)((totalSwap - usedSwap)/1024.0+0.5)));
format.replace( TQRegExp("%us", false), TQString::number( (int)(usedSwap/1024.0+0.5)));
format.replace( TQRegExp("%ts", false), TQString::number( (int)(totalSwap/1024.0+0.5)));
meter->setValue(format);
++it;

@ -105,7 +105,7 @@ bool Meter::isEnabled()
bool Meter::insideActiveArea(int x, int y)
{
return boundingBox.tqcontains(x, y) && clickable;
return boundingBox.contains(x, y) && clickable;
}
#include "meter.moc"

@ -167,7 +167,7 @@ long attachClickArea(long widget, long meter, TQString LeftButton, TQString Midd
Meter* currMeter = (Meter*) meter;
// Look if currMeter has an ClickArea attached.
bool meterAlreadyClickable = currTheme->clickList->tqcontainsRef(currMeter);
bool meterAlreadyClickable = currTheme->clickList->containsRef(currMeter);
// if currMeter is of type ImageLabel*
if (ImageLabel* image = dynamic_cast<ImageLabel*>(currMeter))

@ -102,11 +102,11 @@ void NetworkSensor::getInOutBytes ( unsigned long &in,unsigned long &out) const
{
TQTextStream t( &file ); // use a text stream
line = t.readLine();
while(line !=0 && !line.tqcontains(device))
while(line !=0 && !line.contains(device))
{
line = t.readLine();
}
if ( line.tqcontains( device ) )
if ( line.contains( device ) )
{
TQRegExp rx( "\\W+"+device+":\\D*(\\d+)(?:\\D+\\d+){7}\\D+(\\d+)", false);
rx.search(line);
@ -115,7 +115,7 @@ void NetworkSensor::getInOutBytes ( unsigned long &in,unsigned long &out) const
}
else
{
qDebug("Network sensor: can not tqfind %s", device.ascii());
qDebug("Network sensor: can not find %s", device.ascii());
in = 0;
out = 0;
}
@ -148,11 +148,11 @@ void NetworkSensor::update()
format = "%in";
}
format.tqreplace( TQRegExp("%inkb", false), TQString::number( ((inB - receivedBytes)*8)/delay, 'f', decimals ) );
format.tqreplace( TQRegExp("%in", false), TQString::number( (inB - receivedBytes)/delay, 'f', decimals ) );
format.replace( TQRegExp("%inkb", false), TQString::number( ((inB - receivedBytes)*8)/delay, 'f', decimals ) );
format.replace( TQRegExp("%in", false), TQString::number( (inB - receivedBytes)/delay, 'f', decimals ) );
format.tqreplace( TQRegExp("%outkb", false), TQString::number( ((outB - transmittedBytes)*8)/delay, 'f', decimals ) );
format.tqreplace( TQRegExp("%out", false), TQString::number( (outB - transmittedBytes)/delay, 'f', decimals ) );
format.replace( TQRegExp("%outkb", false), TQString::number( ((outB - transmittedBytes)*8)/delay, 'f', decimals ) );
format.replace( TQRegExp("%out", false), TQString::number( (outB - transmittedBytes)/delay, 'f', decimals ) );
meter->setValue( format );
++it;

@ -77,17 +77,17 @@ void NoatunSensor::update()
else
{
format.tqreplace( TQRegExp("%title", false), title );
format.tqreplace( TQRegExp("%id", false), noatunID );
format.replace( TQRegExp("%title", false), title );
format.replace( TQRegExp("%id", false), noatunID );
format.tqreplace( TQRegExp("%length", false), TQTime( 0,0,0 ).
format.replace( TQRegExp("%length", false), TQTime( 0,0,0 ).
addMSecs( songLength )
.toString( "h:mm:ss" ) );
format.tqreplace( TQRegExp("%time", false), TQTime( 0,0,0 ).
format.replace( TQRegExp("%time", false), TQTime( 0,0,0 ).
addMSecs( currentTime )
.toString( "h:mm:ss" ) );
format.tqreplace( TQRegExp("%remain", false), TQTime( 0,0,0 ).
format.replace( TQRegExp("%remain", false), TQTime( 0,0,0 ).
addMSecs( songLength )
.addMSecs(-currentTime )
.toString( "h:mm:ss" ) );
@ -147,8 +147,8 @@ TQString NoatunSensor::getTitle()
if (replyType == TQSTRING_OBJECT_NAME_STRING)
{
reply >> result;
result.tqreplace( TQRegExp("_")," " );
result.tqreplace( TQRegExp(".mp3$"),"" );
result.replace( TQRegExp("_")," " );
result.replace( TQRegExp(".mp3$"),"" );
}
else

@ -95,7 +95,7 @@ void RssSensor::update()
{
TQDomNodeList links = docElem.elementsByTagName( "link" );
TQDomNodeList displays;
if ( format.tqcontains( "%d", false ) > 0 )
if ( format.contains( "%d", false ) > 0 )
{
displays = docElem.elementsByTagName( "description" );
}

@ -91,9 +91,9 @@ void SensorSensor::processExited(KProcess *)
}
#if defined __FreeBSD__ || defined(Q_OS_NETBSD)
format.tqreplace( TQRegExp("%v", false), sensorMap[sensorMapBSD[type]]);
format.replace( TQRegExp("%v", false), sensorMap[sensorMapBSD[type]]);
#else
format.tqreplace( TQRegExp("%v", false), sensorMap[type]);
format.replace( TQRegExp("%v", false), sensorMap[type]);
#endif
meter->setValue(format);
++lit;

@ -153,7 +153,7 @@ void Systemtray::updateTrayWindows( void )
while ((emb = m_Wins.current()) != 0L)
{
WId wid = emb->embeddedWinId();
if ((wid == 0) || !kwin_module->systemTrayWindows().tqcontains(wid) )
if ((wid == 0) || !kwin_module->systemTrayWindows().contains(wid) )
m_Wins.remove(emb);
else
m_Wins.next();

@ -138,7 +138,7 @@ void TaskManager::windowAdded(WId w )
WId transient_for = (WId) transient_for_tmp;
// check if it's transient for a skiptaskbar window
if (_skiptaskbar_windows.tqcontains(transient_for))
if (_skiptaskbar_windows.contains(transient_for))
return;
// lets see if this is a transient for an existing task
@ -464,9 +464,9 @@ bool Task::isModified() const
{
static TQString modStr = TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]");
#ifdef KDE_3_2
int modStrPos = _info.visibleName().tqfind(modStr);
int modStrPos = _info.visibleName().find(modStr);
#else
int modStrPos = _info.visibleName.tqfind(modStr);
int modStrPos = _info.visibleName.find(modStr);
#endif
return ( modStrPos != -1 );
@ -608,10 +608,10 @@ bool Task::idMatch( const TQString& id1, const TQString& id2 )
if ( id1.isEmpty() || id2.isEmpty() )
return false;
if ( id1.tqcontains( id2 ) > 0 )
if ( id1.contains( id2 ) > 0 )
return true;
if ( id2.tqcontains( id1 ) > 0 )
if ( id2.contains( id1 ) > 0 )
return true;
return false;

@ -204,7 +204,7 @@ public:
//* @internal
void removeTransient( WId w ) { _transients.remove( w ); }
//* @internal
bool hasTransient( WId w ) const { return _transients.tqcontains( w ); }
bool hasTransient( WId w ) const { return _transients.contains( w ); }
//* @internal
void setActive(bool a);

@ -339,7 +339,7 @@ void TextLabel::mUpdate(TQPainter *p)
bool TextLabel::click(TQMouseEvent* e)
{
if (getBoundingBox().tqcontains(e -> x(), e -> y()) && isEnabled())
if (getBoundingBox().contains(e -> x(), e -> y()) && isEnabled())
{
TQString program;
if (e -> button() == Qt::LeftButton)

@ -416,9 +416,9 @@ bool ThemesDlg::filter(int index, TQWidget* widget, void* data)
}
else
{
if(w->themeName->text().lower().tqcontains(searchText))
if(w->themeName->text().lower().contains(searchText))
return true;
if(w->description->text().lower().tqcontains(searchText))
if(w->description->text().lower().contains(searchText))
return true;
}
return false;

@ -58,7 +58,7 @@ ThemeWidget::~ThemeWidget()
int ThemeWidget::addInstance()
{
int i = 1;
while(m_instancePool.tqfind(i) != m_instancePool.end())
while(m_instancePool.find(i) != m_instancePool.end())
++i;
m_instancePool.append(i);
updateRunning();

@ -101,13 +101,13 @@ void UptimeSensor::update()
{
format = "%dd %h:%M";
}
format.tqreplace( TQRegExp("%d"), TQString::number(days));
format.tqreplace( TQRegExp("%H"), TQString::number(hours).rightJustify(2,'0'));
format.tqreplace( TQRegExp("%M"), TQString::number(mins).rightJustify(2,'0'));
format.tqreplace( TQRegExp("%S"), TQString::number(secs).rightJustify(2,'0'));
format.tqreplace( TQRegExp("%h"), TQString::number(hours));
format.tqreplace( TQRegExp("%m"), TQString::number(mins));
format.tqreplace( TQRegExp("%s"), TQString::number(secs));
format.replace( TQRegExp("%d"), TQString::number(days));
format.replace( TQRegExp("%H"), TQString::number(hours).rightJustify(2,'0'));
format.replace( TQRegExp("%M"), TQString::number(mins).rightJustify(2,'0'));
format.replace( TQRegExp("%S"), TQString::number(secs).rightJustify(2,'0'));
format.replace( TQRegExp("%h"), TQString::number(hours));
format.replace( TQRegExp("%m"), TQString::number(mins));
format.replace( TQRegExp("%s"), TQString::number(secs));
meter->setValue(format);
++it;

@ -210,19 +210,19 @@ void XMMSSensor::update()
{
format.tqreplace( TQRegExp("%title", false), title );
format.replace( TQRegExp("%title", false), title );
format.tqreplace( TQRegExp("%length", false), TQTime( 0,0,0 ).
format.replace( TQRegExp("%length", false), TQTime( 0,0,0 ).
addMSecs( songLength )
.toString( "h:mm:ss" ) );
format.tqreplace( TQRegExp("%time", false), TQTime( 0,0,0 ).
format.replace( TQRegExp("%time", false), TQTime( 0,0,0 ).
addMSecs( currentTime )
.toString( "h:mm:ss" ) );
if( isPlaying )
{
format.tqreplace( TQRegExp("%remain", false), TQTime( 0,0,0 ).
format.replace( TQRegExp("%remain", false), TQTime( 0,0,0 ).
addMSecs( songLength )
.addMSecs(-currentTime )
.toString( "h:mm:ss" ) );
@ -230,7 +230,7 @@ void XMMSSensor::update()
else
{
format.tqreplace( TQRegExp("%remain", false), TQTime( 0,0,0 ).toString("h:mm:ss" ) );
format.replace( TQRegExp("%remain", false), TQTime( 0,0,0 ).toString("h:mm:ss" ) );
}
meter->setValue(format);
}

Loading…
Cancel
Save