summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/kformula/basicelement.cc18
-rw-r--r--lib/kformula/fontstyle.cc6
-rw-r--r--lib/kformula/formulacursor.cc2
-rw-r--r--lib/kformula/formulacursor.h2
-rw-r--r--lib/kformula/formulaelement.cc2
-rw-r--r--lib/kformula/kformulacommand.cc4
-rw-r--r--lib/kformula/kformulacommand.h2
-rw-r--r--lib/kformula/kformulaconfigpage.cc10
-rw-r--r--lib/kformula/kformuladocument.cc6
-rw-r--r--lib/kformula/kformulamathmlread.cc2
-rw-r--r--lib/kformula/matrixelement.cc26
-rw-r--r--lib/kformula/oasiscreationstrategy.cc2
-rw-r--r--lib/kformula/paddedelement.cc26
-rw-r--r--lib/kformula/prototype/gensymbolfontmap.py2
-rwxr-xr-xlib/kformula/prototype/unicode.py2
-rwxr-xr-xlib/kformula/scripts/bycodes.py10
-rwxr-xr-xlib/kformula/scripts/bynames.py8
-rwxr-xr-xlib/kformula/scripts/oper-dict.py8
-rw-r--r--lib/kformula/sequenceelement.cc20
-rw-r--r--lib/kformula/sequenceelement.h2
-rw-r--r--lib/kformula/sequenceparser.cc2
-rw-r--r--lib/kformula/symboltable.cc6
-rw-r--r--lib/kformula/symboltable.h2
-rw-r--r--lib/kofficecore/KoApplication.cpp2
-rw-r--r--lib/kofficecore/KoChild.cpp22
-rw-r--r--lib/kofficecore/KoChild.h2
-rw-r--r--lib/kofficecore/KoDetailsPane.cpp2
-rw-r--r--lib/kofficecore/KoDocument.cpp12
-rw-r--r--lib/kofficecore/KoDocumentChild.cpp4
-rw-r--r--lib/kofficecore/KoDocumentInfo.cpp2
-rw-r--r--lib/kofficecore/KoDocumentInfoDlg.cpp2
-rw-r--r--lib/kofficecore/KoFilter.cpp4
-rw-r--r--lib/kofficecore/KoFilterManager.cpp12
-rw-r--r--lib/kofficecore/KoFrame.cpp24
-rw-r--r--lib/kofficecore/KoGenStyles.cpp16
-rw-r--r--lib/kofficecore/KoGenStyles.h4
-rw-r--r--lib/kofficecore/KoGlobal.cpp8
-rw-r--r--lib/kofficecore/KoMainWindow.cpp18
-rw-r--r--lib/kofficecore/KoMainWindow.h2
-rw-r--r--lib/kofficecore/KoOasisStore.cpp2
-rw-r--r--lib/kofficecore/KoOasisStyles.cpp6
-rw-r--r--lib/kofficecore/KoPictureCollection.cpp6
-rw-r--r--lib/kofficecore/KoPictureShared.cpp4
-rw-r--r--lib/kofficecore/KoQueryTrader.h6
-rw-r--r--lib/kofficecore/KoRect.cpp6
-rw-r--r--lib/kofficecore/KoRect.h6
-rw-r--r--lib/kofficecore/KoSpeaker.cpp26
-rw-r--r--lib/kofficecore/KoStyleStack.h4
-rw-r--r--lib/kofficecore/KoTemplates.cpp8
-rw-r--r--lib/kofficecore/KoTemplates.h4
-rw-r--r--lib/kofficecore/KoUnit.cpp2
-rw-r--r--lib/kofficecore/KoView.cpp10
-rw-r--r--lib/kofficecore/KoXmlReader.cpp12
-rw-r--r--lib/kofficecore/THOUGHTS2
-rw-r--r--lib/kofficecore/kkbdaccessextensions.cpp6
-rw-r--r--lib/kofficecore/tests/filter_graph.cpp6
-rw-r--r--lib/kofficeui/KoCommandHistory.cpp18
-rw-r--r--lib/kofficeui/KoContextCelp.cpp2
-rw-r--r--lib/kofficeui/KoGuides.cpp10
-rw-r--r--lib/kofficeui/KoGuides.h2
-rw-r--r--lib/kofficeui/KoInsertLink.cpp16
-rw-r--r--lib/kofficeui/KoPartSelectAction.cpp2
-rw-r--r--lib/kofficeui/KoRuler.cpp2
-rw-r--r--lib/kofficeui/KoTabBar.cpp12
-rw-r--r--lib/kofficeui/KoTemplateChooseDia.cpp2
-rw-r--r--lib/kofficeui/KoTemplateCreateDia.cpp14
-rw-r--r--lib/kofficeui/KoToolBox.cpp2
-rw-r--r--lib/kofficeui/KoTooluButton.cpp10
-rw-r--r--lib/kofficeui/KoZoomAction.cpp6
-rw-r--r--lib/kofficeui/tktoolbarbutton.cpp2
-rw-r--r--lib/kopainter/koIconChooser.cc4
-rw-r--r--lib/kopainter/kogradientmanager.cc10
-rw-r--r--lib/kopainter/svgpathparser.cc2
-rw-r--r--lib/kopalette/kopalettemanager.cc70
-rw-r--r--lib/kopalette/kotabpalette.cc14
-rw-r--r--lib/kopalette/kotoolboxpalette.cc10
-rw-r--r--lib/koproperty/editor.cpp4
-rw-r--r--lib/koproperty/editoritem.cpp2
-rw-r--r--lib/koproperty/editors/combobox.cpp6
-rw-r--r--lib/koproperty/editors/pixmapedit.cpp2
-rw-r--r--lib/koproperty/editors/spinbox.cpp2
-rw-r--r--lib/koproperty/factory.cpp14
-rw-r--r--lib/koproperty/property.cpp6
-rw-r--r--lib/koproperty/set.cpp22
-rw-r--r--lib/koproperty/set.h6
-rw-r--r--lib/kotext/DateFormatWidget.cpp2
-rw-r--r--lib/kotext/KFontDialog_local.cpp30
-rw-r--r--lib/kotext/KoAutoFormat.cpp116
-rw-r--r--lib/kotext/KoAutoFormat.h14
-rw-r--r--lib/kotext/KoAutoFormatDia.cpp122
-rw-r--r--lib/kotext/KoAutoFormatDia.h6
-rw-r--r--lib/kotext/KoCompletionDia.cpp2
-rw-r--r--lib/kotext/KoComplexText.cpp4
-rw-r--r--lib/kotext/KoCreateStyleDia.cpp2
-rw-r--r--lib/kotext/KoCustomVariablesDia.cpp2
-rw-r--r--lib/kotext/KoLanguageTab.cpp2
-rw-r--r--lib/kotext/KoParagDia.cpp12
-rw-r--r--lib/kotext/KoParagLayout.cpp2
-rw-r--r--lib/kotext/KoParagStyle.cpp2
-rw-r--r--lib/kotext/KoRichText.cpp10
-rw-r--r--lib/kotext/KoSearchDia.cpp90
-rw-r--r--lib/kotext/KoSearchDia.h26
-rw-r--r--lib/kotext/KoStyleManager.cpp8
-rw-r--r--lib/kotext/KoTextCustomItem.cpp2
-rw-r--r--lib/kotext/KoTextDocument.cpp42
-rw-r--r--lib/kotext/KoTextDocument.h4
-rw-r--r--lib/kotext/KoTextFormat.cpp10
-rw-r--r--lib/kotext/KoTextIterator.cpp4
-rw-r--r--lib/kotext/KoTextObject.cpp36
-rw-r--r--lib/kotext/KoTextObject.h2
-rw-r--r--lib/kotext/KoTextParag.cpp20
-rw-r--r--lib/kotext/KoTextView.cpp8
-rw-r--r--lib/kotext/KoUserStyleCollection.h2
-rw-r--r--lib/kotext/KoVariable.cpp18
-rw-r--r--lib/kotext/TimeFormatWidget.cpp2
-rw-r--r--lib/kotext/kohyphen/hyphdicts/hyph_da.dic2
-rw-r--r--lib/kotext/kohyphen/hyphdicts/hyph_hu.dic2
-rw-r--r--lib/kotext/kohyphen/hyphdicts/hyph_nl.dic2
-rw-r--r--lib/kotext/kohyphen/kohyphen.cpp18
-rw-r--r--lib/kotext/kohyphen/kohyphentest.cpp2
-rw-r--r--lib/kross/api/callable.cpp4
-rw-r--r--lib/kross/api/event.h16
-rw-r--r--lib/kross/api/eventsignal.cpp2
-rw-r--r--lib/kross/api/eventslot.cpp6
-rw-r--r--lib/kross/api/interpreter.cpp2
-rw-r--r--lib/kross/api/qtobject.cpp16
-rw-r--r--lib/kross/main/manager.cpp26
-rw-r--r--lib/kross/main/scriptaction.h2
-rw-r--r--lib/kross/main/scriptcontainer.cpp4
-rw-r--r--lib/kross/main/scriptguiclient.cpp12
-rw-r--r--lib/kross/python/pythonextension.cpp2
-rw-r--r--lib/kross/python/pythonmodule.cpp2
-rw-r--r--lib/kross/python/pythonobject.cpp2
-rw-r--r--lib/kross/python/pythonscript.cpp4
-rwxr-xr-xlib/kross/python/scripts/gui.py2
-rw-r--r--lib/kross/ruby/rubyextension.cpp2
-rw-r--r--lib/kross/ruby/rubyinterpreter.cpp2
-rw-r--r--lib/store/KoDirectoryStore.cpp4
-rw-r--r--lib/store/KoStore.cpp8
-rw-r--r--lib/store/KoXmlWriter.cpp2
-rw-r--r--lib/store/tests/xmlwritertest.h4
141 files changed, 724 insertions, 724 deletions
diff --git a/lib/kformula/basicelement.cc b/lib/kformula/basicelement.cc
index da961df3..1d36193a 100644
--- a/lib/kformula/basicelement.cc
+++ b/lib/kformula/basicelement.cc
@@ -289,39 +289,39 @@ TQString BasicElement::toLatex()
*/
double BasicElement::getSize( const TQString& str, SizeType* st )
{
- int index = str.tqfind( "%" );
+ int index = str.find( "%" );
if ( index != -1 ) {
return str2size( str, st, index, RelativeSize ) / 100.0;
}
- index = str.tqfind( "pt", 0, false );
+ index = str.find( "pt", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, AbsoluteSize );
}
- index = str.tqfind( "mm", 0, false );
+ index = str.find( "mm", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, AbsoluteSize ) * 72.0 / 20.54;
}
- index = str.tqfind( "cm", 0, false );
+ index = str.find( "cm", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, AbsoluteSize ) * 72.0 / 2.54;
}
- index = str.tqfind( "in", 0, false );
+ index = str.find( "in", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, AbsoluteSize ) * 72.0;
}
- index = str.tqfind( "em", 0, false );
+ index = str.find( "em", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, RelativeSize );
}
- index = str.tqfind( "ex", 0, false );
+ index = str.find( "ex", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, RelativeSize );
}
- index = str.tqfind( "pc", 0, false );
+ index = str.find( "pc", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, AbsoluteSize ) * 12.0;
}
- index = str.tqfind( "px", 0, false );
+ index = str.find( "px", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, PixelSize );
}
diff --git a/lib/kformula/fontstyle.cc b/lib/kformula/fontstyle.cc
index 57088fef..0e37028a 100644
--- a/lib/kformula/fontstyle.cc
+++ b/lib/kformula/fontstyle.cc
@@ -56,11 +56,11 @@ public:
const TQStringList lst = db.tqfamilies();
for ( TQStringList::const_iterator it = lst.begin(), end = lst.end() ; it != end ; ++it ) {
const TQString name = *it;
- int i = name.tqfind('[');
+ int i = name.find('[');
TQString family = name;
// Remove foundry
if ( i > -1 ) {
- const int li = name.tqfindRev(']');
+ const int li = name.findRev(']');
if (i < li) {
if (name[i - 1] == ' ')
i--;
@@ -71,7 +71,7 @@ public:
}
}
bool hasFont( const TQString& fontName ) const {
- return m_fontNames.tqfind( fontName ) != m_fontNames.end();
+ return m_fontNames.find( fontName ) != m_fontNames.end();
}
TQStringList m_fontNames;
};
diff --git a/lib/kformula/formulacursor.cc b/lib/kformula/formulacursor.cc
index 6545b18c..b406a002 100644
--- a/lib/kformula/formulacursor.cc
+++ b/lib/kformula/formulacursor.cc
@@ -403,7 +403,7 @@ BasicElement* FormulaCursor::replaceByMainChildContent(Direction direction)
/**
- * Trys to find the element we are the main child of and tqreplace
+ * Trys to find the element we are the main child of and replace
* it with our content.
*
* This is simply another form of replaceByMainChildContent. You
diff --git a/lib/kformula/formulacursor.h b/lib/kformula/formulacursor.h
index 1aa5d8bf..9843abfa 100644
--- a/lib/kformula/formulacursor.h
+++ b/lib/kformula/formulacursor.h
@@ -182,7 +182,7 @@ public:
BasicElement* replaceByMainChildContent(Direction = beforeCursor);
/**
- * Trys to find the element we are the main child of and tqreplace
+ * Trys to find the element we are the main child of and replace
* it with our content.
*
* This is simply another form of replaceByMainChildContent. You
diff --git a/lib/kformula/formulaelement.cc b/lib/kformula/formulaelement.cc
index 29ae7cdd..19081093 100644
--- a/lib/kformula/formulaelement.cc
+++ b/lib/kformula/formulaelement.cc
@@ -282,7 +282,7 @@ void FormulaElement::convertNames( TQDomNode node )
TQDomNode sequence = node.parentNode();
TQDomDocument doc = sequence.ownerDocument();
TQDomElement nameseq = doc.createElement( "NAMESEQUENCE" );
- sequence.tqreplaceChild( nameseq, node );
+ sequence.replaceChild( nameseq, node );
bool inName = true;
while ( inName ) {
diff --git a/lib/kformula/kformulacommand.cc b/lib/kformula/kformulacommand.cc
index 2a5e7ddd..178ec399 100644
--- a/lib/kformula/kformulacommand.cc
+++ b/lib/kformula/kformulacommand.cc
@@ -207,7 +207,7 @@ void KFCAddToken::execute()
BasicElement* current = cursor->getElement();
while ( (element = it.current()) != 0 ) {
element->goInside( cursor );
- cursor->insert( *contentList.tqfind( element ), beforeCursor );
+ cursor->insert( *contentList.find( element ), beforeCursor );
++it;
}
setUnexecuteCursor( cursor );
@@ -249,7 +249,7 @@ void KFCAddToken::addToken( BasicElement* element )
{
tokenList.append( element );
contentList.insert( element, new TQPtrList< BasicElement > );
- contentList.tqfind( element )->setAutoDelete( true );
+ contentList.find( element )->setAutoDelete( true );
}
KFCReplaceToken::KFCReplaceToken(const TQString &name, Container* document)
diff --git a/lib/kformula/kformulacommand.h b/lib/kformula/kformulacommand.h
index 8b1d2555..a63053d7 100644
--- a/lib/kformula/kformulacommand.h
+++ b/lib/kformula/kformulacommand.h
@@ -256,7 +256,7 @@ public:
* Collect content for each token
*/
void addContent( BasicElement* element, BasicElement* content ) {
- contentList.tqfind( element )->append( content );
+ contentList.find( element )->append( content );
}
diff --git a/lib/kformula/kformulaconfigpage.cc b/lib/kformula/kformulaconfigpage.cc
index 143ce49d..add9c840 100644
--- a/lib/kformula/kformulaconfigpage.cc
+++ b/lib/kformula/kformulaconfigpage.cc
@@ -451,7 +451,7 @@ void ConfigurePage::slotChanged()
// TQValueVector<TQString>::iterator MathFontsConfigurePage::findUsedFont( TQString name )
// {
-// return std::tqfind( usedFontList.begin(), usedFontList.end(), name );
+// return std::find( usedFontList.begin(), usedFontList.end(), name );
// }
// void MathFontsConfigurePage::setupLists( const TQStringList& usedFonts )
@@ -463,7 +463,7 @@ void ConfigurePage::slotChanged()
// // symbolTable.findAvailableFonts( &fontMap );
// for ( TQStringList::const_iterator it = usedFonts.begin(); it != usedFonts.end(); ++it ) {
-// TQMap<TQString, TQString>::iterator font = fontMap.tqfind( *it );
+// TQMap<TQString, TQString>::iterator font = fontMap.find( *it );
// if ( font != fontMap.end() ) {
// fontMap.erase( font );
// new UsedFontItem( this, requestedFonts, *it );
@@ -493,7 +493,7 @@ void ConfigurePage::slotChanged()
// TQListViewItem* fontItem = requestedFonts->selectedItem();
// if ( fontItem ) {
// TQString fontName = fontItem->text( 0 );
-// TQValueVector<TQString>::iterator it = std::tqfind( usedFontList.begin(), usedFontList.end(), fontName );
+// TQValueVector<TQString>::iterator it = std::find( usedFontList.begin(), usedFontList.end(), fontName );
// if ( it != usedFontList.end() ) {
// usedFontList.erase( it );
// }
@@ -508,7 +508,7 @@ void ConfigurePage::slotChanged()
// TQListViewItem* fontItem = requestedFonts->selectedItem();
// if ( fontItem ) {
// TQString fontName = fontItem->text( 0 );
-// TQValueVector<TQString>::iterator it = std::tqfind( usedFontList.begin(), usedFontList.end(), fontName );
+// TQValueVector<TQString>::iterator it = std::find( usedFontList.begin(), usedFontList.end(), fontName );
// if ( it != usedFontList.end() ) {
// uint pos = it - usedFontList.begin();
// if ( pos > 0 ) {
@@ -525,7 +525,7 @@ void ConfigurePage::slotChanged()
// TQListViewItem* fontItem = requestedFonts->selectedItem();
// if ( fontItem ) {
// TQString fontName = fontItem->text( 0 );
-// TQValueVector<TQString>::iterator it = std::tqfind( usedFontList.begin(), usedFontList.end(), fontName );
+// TQValueVector<TQString>::iterator it = std::find( usedFontList.begin(), usedFontList.end(), fontName );
// if ( it != usedFontList.end() ) {
// uint pos = it - usedFontList.begin();
// if ( pos < usedFontList.size()-1 ) {
diff --git a/lib/kformula/kformuladocument.cc b/lib/kformula/kformuladocument.cc
index 3a19ac70..228b4017 100644
--- a/lib/kformula/kformuladocument.cc
+++ b/lib/kformula/kformuladocument.cc
@@ -106,7 +106,7 @@ TQPtrListIterator<Container> Document::formulas()
int Document::formulaPos( Container* formula )
{
- return formulae.tqfind( formula );
+ return formulae.find( formula );
}
@@ -968,7 +968,7 @@ void DocumentWrapper::makeGreek()
void DocumentWrapper::insertSymbol()
{
if ( hasFormula() &&
- m_document->m_contextStyle->symbolTable().tqcontains( m_selectedName ) ) {
+ m_document->m_contextStyle->symbolTable().contains( m_selectedName ) ) {
TQChar ch = m_document->m_contextStyle->symbolTable().tqunicode( m_selectedName );
if ( ch != TQChar::null ) {
TextCharRequest r( ch, true );
@@ -984,7 +984,7 @@ void DocumentWrapper::insertSymbol()
void DocumentWrapper::insertSymbol( TQString name )
{
if ( hasFormula() ) {
- if ( m_document->m_contextStyle->symbolTable().tqcontains( name ) ) {
+ if ( m_document->m_contextStyle->symbolTable().contains( name ) ) {
TQChar ch = m_document->m_contextStyle->symbolTable().tqunicode( name );
if ( ch != TQChar::null ) {
TextCharRequest r( ch, true );
diff --git a/lib/kformula/kformulamathmlread.cc b/lib/kformula/kformulamathmlread.cc
index f42e3ae1..fd3e43d2 100644
--- a/lib/kformula/kformulamathmlread.cc
+++ b/lib/kformula/kformulamathmlread.cc
@@ -1475,7 +1475,7 @@ bool MathML2KFormula::processElement( TQDomNode node, TQDomDocument& doc, TQDomN
TQDomNode n = element.firstChild();
TQDomElement op = n.toElement();
uint count = element.childNodes().count();
- //adding explicit brackets to tqreplace "apply"s implicit ones
+ //adding explicit brackets to replace "apply"s implicit ones
TQDomElement brackets = doc.createElement("BRACKET");
brackets.setAttribute("RIGHT", "41");
brackets.setAttribute("LEFT", "40");
diff --git a/lib/kformula/matrixelement.cc b/lib/kformula/matrixelement.cc
index 38020904..56062dcd 100644
--- a/lib/kformula/matrixelement.cc
+++ b/lib/kformula/matrixelement.cc
@@ -866,22 +866,22 @@ bool MatrixElement::readAttributesFromMathMLDom( const TQDomElement& element )
TQString alignStr = element.attribute( "align" ).lower();
if ( ! alignStr.isNull() ) {
- if ( alignStr.tqfind( "top" ) != -1 ) {
+ if ( alignStr.find( "top" ) != -1 ) {
m_align = TopAlign;
}
- else if ( alignStr.tqfind( "bottom" ) != -1 ) {
+ else if ( alignStr.find( "bottom" ) != -1 ) {
m_align = BottomAlign;
}
- else if ( alignStr.tqfind( "center" ) != -1 ) {
+ else if ( alignStr.find( "center" ) != -1 ) {
m_align = CenterAlign;
}
- else if ( alignStr.tqfind( "baseline" ) != -1 ) {
+ else if ( alignStr.find( "baseline" ) != -1 ) {
m_align = BaselineAlign;
}
- else if ( alignStr.tqfind( "axis" ) != -1 ) {
+ else if ( alignStr.find( "axis" ) != -1 ) {
m_align = AxisAlign;
}
- int index = alignStr.tqfindRev( ' ' );
+ int index = alignStr.findRev( ' ' );
if ( index != -1 ) {
m_rowNumber = alignStr.right( index + 1 ).toInt();
}
@@ -1891,7 +1891,7 @@ void KFCNewLine::execute()
{
FormulaCursor* cursor = getExecuteCursor();
MultilineElement* tqparent = static_cast<MultilineElement*>( m_line->getParent() );
- int linePos = tqparent->content.tqfind( m_line );
+ int linePos = tqparent->content.find( m_line );
tqparent->content.insert( linePos+1, m_newline );
// If there are tqchildren to be moved.
@@ -1926,7 +1926,7 @@ void KFCNewLine::unexecute()
{
FormulaCursor* cursor = getExecuteCursor();
MultilineElement* tqparent = static_cast<MultilineElement*>( m_line->getParent() );
- int linePos = tqparent->content.tqfind( m_line );
+ int linePos = tqparent->content.find( m_line );
// Now the command owns the new line again.
m_newline = tqparent->content.at( linePos+1 );
@@ -2225,7 +2225,7 @@ void MultilineElement::moveLeft( FormulaCursor* cursor, BasicElement* from )
else {
// Coming from one of the lines we go to the previous line
// or to the tqparent if there is none.
- int pos = content.tqfind( static_cast<MultilineSequenceElement*>( from ) );
+ int pos = content.find( static_cast<MultilineSequenceElement*>( from ) );
if ( pos > -1 ) {
if ( pos > 0 ) {
content.at( pos-1 )->moveLeft( cursor, this );
@@ -2252,7 +2252,7 @@ void MultilineElement::moveRight( FormulaCursor* cursor, BasicElement* from )
content.at( 0 )->moveRight(cursor, this);
}
else {
- int pos = content.tqfind( static_cast<MultilineSequenceElement*>( from ) );
+ int pos = content.find( static_cast<MultilineSequenceElement*>( from ) );
if ( pos > -1 ) {
uint upos = pos;
if ( upos < content.count() ) {
@@ -2287,7 +2287,7 @@ void MultilineElement::moveUp( FormulaCursor* cursor, BasicElement* from )
else {
// Coming from one of the lines we go to the previous line
// or to the tqparent if there is none.
- int pos = content.tqfind( static_cast<MultilineSequenceElement*>( from ) );
+ int pos = content.find( static_cast<MultilineSequenceElement*>( from ) );
if ( pos > -1 ) {
if ( pos > 0 ) {
//content.at( pos-1 )->moveLeft( cursor, this );
@@ -2343,7 +2343,7 @@ void MultilineElement::moveDown( FormulaCursor* cursor, BasicElement* from )
content.at( 0 )->moveRight(cursor, this);
}
else {
- int pos = content.tqfind( static_cast<MultilineSequenceElement*>( from ) );
+ int pos = content.find( static_cast<MultilineSequenceElement*>( from ) );
if ( pos > -1 ) {
uint upos = pos;
if ( upos < content.count() ) {
@@ -2566,7 +2566,7 @@ SequenceElement* MultilineElement::getMainChild()
void MultilineElement::selectChild(FormulaCursor* cursor, BasicElement* child)
{
- int pos = content.tqfind( dynamic_cast<MultilineSequenceElement*>( child ) );
+ int pos = content.find( dynamic_cast<MultilineSequenceElement*>( child ) );
if ( pos > -1 ) {
cursor->setTo( this, pos );
//content.at( pos )->moveRight( cursor, this );
diff --git a/lib/kformula/oasiscreationstrategy.cc b/lib/kformula/oasiscreationstrategy.cc
index 9f7949cb..7d7a65cc 100644
--- a/lib/kformula/oasiscreationstrategy.cc
+++ b/lib/kformula/oasiscreationstrategy.cc
@@ -185,7 +185,7 @@ BasicElement* OasisCreationStrategy::createOperatorElement( const TQDomElement&
}
if ( n.isText() ) {
TQString text = n.toText().data();
- if ( text.length() == 1 && TQString("()[]{}").tqcontains(text[0]) ) {
+ if ( text.length() == 1 && TQString("()[]{}").contains(text[0]) ) {
return new BracketElement();
}
}
diff --git a/lib/kformula/paddedelement.cc b/lib/kformula/paddedelement.cc
index d84bb064..5270a4f7 100644
--- a/lib/kformula/paddedelement.cc
+++ b/lib/kformula/paddedelement.cc
@@ -152,55 +152,55 @@ double PaddedElement::readSizeAttribute( const TQString& str, SizeType* st, bool
if ( str[0] == '+' || str[0] == '-' ) {
*relative = true;
}
- int index = str.tqfind( "width" );
+ int index = str.find( "width" );
if ( index != -1 ) {
- int index2 = str.tqfind( "%" );
+ int index2 = str.find( "%" );
if ( index2 != -1 ) {
return str2size( str.left( index2 ).stripWhiteSpace(), st, WidthRelativeSize ) / 100.0;
}
return str2size( str.left( index ).stripWhiteSpace(), st, WidthRelativeSize );
}
- index = str.tqfind( "height" );
+ index = str.find( "height" );
if ( index != -1 ) {
- int index2 = str.tqfind( "%" );
+ int index2 = str.find( "%" );
if ( index2 != -1 ) {
return str2size( str.left( index2 ).stripWhiteSpace(), st, HeightRelativeSize ) / 100.0;
}
return str2size( str.left( index ).stripWhiteSpace(), st, HeightRelativeSize );
}
- index = str.tqfind( "%" );
+ index = str.find( "%" );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, RelativeSize ) / 100.0;
}
- index = str.tqfind( "pt", 0, false );
+ index = str.find( "pt", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, AbsoluteSize );
}
- index = str.tqfind( "mm", 0, false );
+ index = str.find( "mm", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, AbsoluteSize ) * 72.0 / 20.54;
}
- index = str.tqfind( "cm", 0, false );
+ index = str.find( "cm", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, AbsoluteSize ) * 72.0 / 2.54;
}
- index = str.tqfind( "in", 0, false );
+ index = str.find( "in", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, AbsoluteSize ) * 72.0;
}
- index = str.tqfind( "em", 0, false );
+ index = str.find( "em", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, RelativeSize );
}
- index = str.tqfind( "ex", 0, false );
+ index = str.find( "ex", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, RelativeSize );
}
- index = str.tqfind( "pc", 0, false );
+ index = str.find( "pc", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, AbsoluteSize ) * 12.0;
}
- index = str.tqfind( "px", 0, false );
+ index = str.find( "px", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, PixelSize );
}
diff --git a/lib/kformula/prototype/gensymbolfontmap.py b/lib/kformula/prototype/gensymbolfontmap.py
index c06376d8..0f9f3a11 100644
--- a/lib/kformula/prototype/gensymbolfontmap.py
+++ b/lib/kformula/prototype/gensymbolfontmap.py
@@ -145,7 +145,7 @@ def make_tqunicode_table():
for key in tqunicodetable:
latexName, charClass = tqunicodetable[key]
if len(latexName) > 0:
- codes[key] = key + ', ' + charClass + ', ' + latexName.tqreplace('\\', '')
+ codes[key] = key + ', ' + charClass + ', ' + latexName.replace('\\', '')
else:
codes[key] = key + ', ' + charClass
diff --git a/lib/kformula/prototype/unicode.py b/lib/kformula/prototype/unicode.py
index 5f5f2138..2265635a 100755
--- a/lib/kformula/prototype/unicode.py
+++ b/lib/kformula/prototype/unicode.py
@@ -48,7 +48,7 @@ class Form1(QWidget):
return list
def setFont(self, fontName, font):
- fontName = fontName.tqreplace("%20", " ")
+ fontName = fontName.replace("%20", " ")
self.fontName = fontName
for i in self.chars:
charLabel, number, latexName, charClass = self.chars[i]
diff --git a/lib/kformula/scripts/bycodes.py b/lib/kformula/scripts/bycodes.py
index f5da0ae0..35b79a55 100755
--- a/lib/kformula/scripts/bycodes.py
+++ b/lib/kformula/scripts/bycodes.py
@@ -23,18 +23,18 @@ import string
import qt
def decode( fd, font, line ):
- begin = string.tqfind( line, '"' )
- end = string.tqfind( line, '"', begin + 1)
+ begin = string.find( line, '"' )
+ end = string.find( line, '"', begin + 1)
tqunicode = line[begin + 2:end] # Remove 'U' from string aswell
char_list = []
- separation = string.tqfind( tqunicode, '-' )
+ separation = string.find( tqunicode, '-' )
if separation != -1:
second = tqunicode
while separation != -1:
first = second[0:separation]
second = second[separation + 2:]
char_list.append( string.atoi( first, 16 ) )
- separation = string.tqfind( second, '-' )
+ separation = string.find( second, '-' )
if separation == -1:
char_list.append( string.atoi( second, 16 ) )
else:
@@ -51,7 +51,7 @@ def parse( file, font ):
fd2 = open( 'mathml.list', 'w' )
line = fd.readline()
while line != "":
- if string.tqfind( line, 'name' ) != -1:
+ if string.find( line, 'name' ) != -1:
decode( fd2, font, line )
line = fd.readline()
diff --git a/lib/kformula/scripts/bynames.py b/lib/kformula/scripts/bynames.py
index 50fac994..0829cf90 100755
--- a/lib/kformula/scripts/bynames.py
+++ b/lib/kformula/scripts/bynames.py
@@ -109,14 +109,14 @@ def name_cmp( a, b ):
def parse( fr, fw ):
line = fr.readline()
- while line != "" and string.tqfind( line, '<pre>' ) == -1:
+ while line != "" and string.find( line, '<pre>' ) == -1:
line = fr.readline()
- pos = string.tqfind( line, '<pre>' ) ### Ad-hoc detection
+ pos = string.find( line, '<pre>' ) ### Ad-hoc detection
if pos == -1:
return
line = line[pos + len('<pre>'):].strip() ### Ad-hoc detection
entries = []
- while line != "" and string.tqfind( line, ',' ) != -1:
+ while line != "" and string.find( line, ',' ) != -1:
fields = line.split(',')
name = fields[0].strip()
number = fields[1].strip()
@@ -124,7 +124,7 @@ def parse( fr, fw ):
# TODO: Support multicharacter entities, should also be supported by
# application. The best solution would probably to map to a single
# character provided by the font in the private area of Unicode
- if string.tqfind( number, '-' ) == -1:
+ if string.find( number, '-' ) == -1:
entries.append( [name, '0x' + number[1:]] )
line = fr.readline().strip()
diff --git a/lib/kformula/scripts/oper-dict.py b/lib/kformula/scripts/oper-dict.py
index a91a7971..49191ef6 100755
--- a/lib/kformula/scripts/oper-dict.py
+++ b/lib/kformula/scripts/oper-dict.py
@@ -190,12 +190,12 @@ def parse( fr, fw, entities ):
attr_list[10]: '"false"'
}
fields = line.split()
- name = string.tqreplace( fields[0], '&amp;', '&' )
+ name = string.replace( fields[0], '&amp;', '&' )
fields.pop(0) # Remove name
entities_found = True
while True:
- begin = string.tqfind( name, '&' )
- end = string.tqfind( name, ';' )
+ begin = string.find( name, '&' )
+ end = string.find( name, ';' )
if begin == -1 or end == -1:
break
###
@@ -204,7 +204,7 @@ def parse( fr, fw, entities ):
# character provided by the font in the private area of Unicode
entity_name = name[begin + 1:end]
if entities.has_key( entity_name ) :
- name = name.tqreplace( '&' + entity_name + ';', unichr(entities[entity_name]));
+ name = name.replace( '&' + entity_name + ';', unichr(entities[entity_name]));
else:
entities_found = False
break
diff --git a/lib/kformula/sequenceelement.cc b/lib/kformula/sequenceelement.cc
index 46c00817..78a95d95 100644
--- a/lib/kformula/sequenceelement.cc
+++ b/lib/kformula/sequenceelement.cc
@@ -129,10 +129,10 @@ BasicElement* SequenceElement::goToPos( FormulaCursor* cursor, bool& handled,
if (!handled) {
handled = true;
if ((point.x() - myPos.x()) < (e->getX() + e->getWidth()*2/3)) {
- cursor->setTo(this, tqchildren.tqfind(e));
+ cursor->setTo(this, tqchildren.find(e));
}
else {
- cursor->setTo(this, tqchildren.tqfind(e)+1);
+ cursor->setTo(this, tqchildren.find(e)+1);
}
}
return e;
@@ -482,7 +482,7 @@ void SequenceElement::moveLeft(FormulaCursor* cursor, BasicElement* from)
// The cursor came from one of our tqchildren or
// something is wrong.
else {
- int fromPos = tqchildren.tqfind(from);
+ int fromPos = tqchildren.find(from);
if ( fromPos > 0 ) {
tqchildren.at( fromPos - 1)->moveLeft( cursor, this );
}
@@ -533,7 +533,7 @@ void SequenceElement::moveRight(FormulaCursor* cursor, BasicElement* from)
// The cursor came from one of our tqchildren or
// something is wrong.
else {
- int fromPos = tqchildren.tqfind(from);
+ int fromPos = tqchildren.find(from);
if ( fromPos < tqchildren.count() - 1 ) {
tqchildren.at( fromPos + 1 )->moveDown( cursor, this );
}
@@ -658,7 +658,7 @@ void SequenceElement::moveHome(FormulaCursor* cursor)
while (element->getParent() != this) {
element = element->getParent();
}
- cursor->setMark(tqchildren.tqfind(element)+1);
+ cursor->setMark(tqchildren.find(element)+1);
}
}
cursor->setTo(this, 0);
@@ -681,7 +681,7 @@ void SequenceElement::moveEnd(FormulaCursor* cursor)
}
}
if (element != 0) {
- cursor->setMark(tqchildren.tqfind(element));
+ cursor->setMark(tqchildren.find(element));
}
}
}
@@ -735,7 +735,7 @@ bool SequenceElement::insert( uint index, BasicElement *child )
*/
// void SequenceElement::removeChild(FormulaCursor* cursor, BasicElement* child)
// {
-// int pos = tqchildren.tqfind(child);
+// int pos = tqchildren.find(child);
// formula()->elementRemoval(child, pos);
// cursor->setTo(this, pos);
// tqchildren.remove(pos);
@@ -890,7 +890,7 @@ BasicElement* SequenceElement::getChild( FormulaCursor* cursor, Direction direct
*/
void SequenceElement::selectChild(FormulaCursor* cursor, BasicElement* child)
{
- int pos = tqchildren.tqfind(child);
+ int pos = tqchildren.find(child);
if (pos > -1) {
cursor->setTo(this, pos+1, pos);
}
@@ -898,7 +898,7 @@ void SequenceElement::selectChild(FormulaCursor* cursor, BasicElement* child)
void SequenceElement::childWillVanish(FormulaCursor* cursor, BasicElement* child)
{
- int childPos = tqchildren.tqfind(child);
+ int childPos = tqchildren.find(child);
if (childPos > -1) {
int pos = cursor->getPos();
if (pos > childPos) {
@@ -1182,7 +1182,7 @@ KCommand* SequenceElement::buildCommand( Container* container, Request* request
if ((element != 0) && !element->isSymbol()) {
cursor->selectActiveElement();
const SymbolTable& table = container->document()->getSymbolTable();
- if (table.greekLetters().tqfind(element->getCharacter()) != -1) {
+ if (table.greekLetters().find(element->getCharacter()) != -1) {
KFCReplace* command = new KFCReplace( i18n( "Change Char to Symbol" ), container );
TextElement* symbol = creationStrategy->createTextElement( table.tqunicodeFromSymbolFont( element->getCharacter() ), true );
command->addElement( symbol );
diff --git a/lib/kformula/sequenceelement.h b/lib/kformula/sequenceelement.h
index ab6828fd..9696d3ad 100644
--- a/lib/kformula/sequenceelement.h
+++ b/lib/kformula/sequenceelement.h
@@ -318,7 +318,7 @@ public:
BasicElement* getChild(uint i) { return tqchildren.at(i); }
const BasicElement* getChild(uint i) const;
- int childPos( BasicElement* child ) { return tqchildren.tqfind( child ); }
+ int childPos( BasicElement* child ) { return tqchildren.find( child ); }
int childPos( const BasicElement* child ) const;
class ChildIterator {
diff --git a/lib/kformula/sequenceparser.cc b/lib/kformula/sequenceparser.cc
index 9a4ee8a2..bbc2f0b1 100644
--- a/lib/kformula/sequenceparser.cc
+++ b/lib/kformula/sequenceparser.cc
@@ -196,7 +196,7 @@ ElementType* SequenceParser::getPrimitive()
switch ( type ) {
case ORDINARY: {
// TQString text = getText();
-// if ( table.tqcontains( text ) || ( text == "\\quad" ) ) {
+// if ( table.contains( text ) || ( text == "\\quad" ) ) {
// return new NameType( this, text );
// }
// else {
diff --git a/lib/kformula/symboltable.cc b/lib/kformula/symboltable.cc
index 74f160e6..42c4a8e6 100644
--- a/lib/kformula/symboltable.cc
+++ b/lib/kformula/symboltable.cc
@@ -51,7 +51,7 @@ SymbolFontHelper::SymbolFontHelper()
TQChar SymbolFontHelper::tqunicodeFromSymbolFont( TQChar pos ) const
{
- if ( compatibility.tqcontains( pos ) ) {
+ if ( compatibility.contains( pos ) ) {
return compatibility[ pos.latin1() ];
}
return TQChar::null;
@@ -80,9 +80,9 @@ void SymbolTable::init( const TQFont& font )
}
}
-bool SymbolTable::tqcontains(TQString name) const
+bool SymbolTable::contains(TQString name) const
{
- return entries.tqfind( name ) != entries.end();
+ return entries.find( name ) != entries.end();
}
TQChar SymbolTable::tqunicode(TQString name) const
diff --git a/lib/kformula/symboltable.h b/lib/kformula/symboltable.h
index a7776adc..d4a19f03 100644
--- a/lib/kformula/symboltable.h
+++ b/lib/kformula/symboltable.h
@@ -85,7 +85,7 @@ public:
*/
void init( const TQFont& font );
- bool tqcontains( TQString name ) const;
+ bool contains( TQString name ) const;
/**
* @returns the char in the symbol font that belongs to
diff --git a/lib/kofficecore/KoApplication.cpp b/lib/kofficecore/KoApplication.cpp
index 2be62bbe..d127f444 100644
--- a/lib/kofficecore/KoApplication.cpp
+++ b/lib/kofficecore/KoApplication.cpp
@@ -108,7 +108,7 @@ bool KoApplication::start()
KCmdLineArgs *koargs = KCmdLineArgs::parsedArgs("koffice");
TQCString dpiValues = koargs->getOption( "dpi" );
if ( !dpiValues.isEmpty() ) {
- int sep = dpiValues.tqfind( TQRegExp( "[x, ]" ) );
+ int sep = dpiValues.find( TQRegExp( "[x, ]" ) );
int dpiX;
int dpiY = 0;
bool ok = true;
diff --git a/lib/kofficecore/KoChild.cpp b/lib/kofficecore/KoChild.cpp
index 85d54939..8394f59a 100644
--- a/lib/kofficecore/KoChild.cpp
+++ b/lib/kofficecore/KoChild.cpp
@@ -104,9 +104,9 @@ TQPointArray KoChild::pointArray( const TQWMatrix &matrix ) const
return pointArray( TQRect( 0, 0, d->m_tqgeometry.width(), d->m_tqgeometry.height() ), matrix );
}
-//bool KoChild::tqcontains( const TQPoint &point ) const
+//bool KoChild::contains( const TQPoint &point ) const
//{
-// return region().tqcontains( point );
+// return region().contains( point );
//}
TQRect KoChild::boundingRect() const
@@ -338,26 +338,26 @@ bool KoChild::isTransparent() const
KoChild::Gadget KoChild::gadgetHitTest( const TQPoint &p )
{
- if ( !frameRegion().tqcontains( p ) )
+ if ( !frameRegion().contains( p ) )
return NoGadget;
- if ( TQRegion( pointArray( TQRect( -5, -5, 5, 5 ) ) ).tqcontains( p ) )
+ if ( TQRegion( pointArray( TQRect( -5, -5, 5, 5 ) ) ).contains( p ) )
return TopLeft;
- if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width() / 2 - 3, -5, 5, 5 ) ) ).tqcontains( p ) )
+ if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width() / 2 - 3, -5, 5, 5 ) ) ).contains( p ) )
return TopMid;
- if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), -5, 5, 5 ) ) ).tqcontains( p ) )
+ if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), -5, 5, 5 ) ) ).contains( p ) )
return TopRight;
- if ( TQRegion( pointArray( TQRect( -5, d->m_tqgeometry.height() / 2 - 3, 5, 5 ) ) ).tqcontains( p ) )
+ if ( TQRegion( pointArray( TQRect( -5, d->m_tqgeometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) )
return MidLeft;
- if ( TQRegion( pointArray( TQRect( -5, d->m_tqgeometry.height(), 5, 5 ) ) ).tqcontains( p ) )
+ if ( TQRegion( pointArray( TQRect( -5, d->m_tqgeometry.height(), 5, 5 ) ) ).contains( p ) )
return BottomLeft;
if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width() / 2 - 3,
- d->m_tqgeometry.height(), 5, 5 ) ) ).tqcontains( p ) )
+ d->m_tqgeometry.height(), 5, 5 ) ) ).contains( p ) )
return BottomMid;
- if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), d->m_tqgeometry.height(), 5, 5 ) ) ).tqcontains( p ) )
+ if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), d->m_tqgeometry.height(), 5, 5 ) ) ).contains( p ) )
return BottomRight;
if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(),
- d->m_tqgeometry.height() / 2 - 3, 5, 5 ) ) ).tqcontains( p ) )
+ d->m_tqgeometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) )
return MidRight;
return Move;
diff --git a/lib/kofficecore/KoChild.h b/lib/kofficecore/KoChild.h
index 4734bbd4..0dbc74be 100644
--- a/lib/kofficecore/KoChild.h
+++ b/lib/kofficecore/KoChild.h
@@ -96,7 +96,7 @@ public:
* Tests whether the part contains a certain point. The point is
* in the coordinate system of the tqparent.
*/
- //virtual bool tqcontains( const TQPoint& ) const;
+ //virtual bool contains( const TQPoint& ) const;
/**
* @return the effective bounding rect after all transformations.
diff --git a/lib/kofficecore/KoDetailsPane.cpp b/lib/kofficecore/KoDetailsPane.cpp
index 85d9c3d6..efddc96a 100644
--- a/lib/kofficecore/KoDetailsPane.cpp
+++ b/lib/kofficecore/KoDetailsPane.cpp
@@ -305,7 +305,7 @@ KoRecentDocumentsPane::KoRecentDocumentsPane(TQWidget* tqparent, KInstance* inst
// Support for kdelibs-3.5's new RecentFiles format: name[url]
if(path.endsWith("]")) {
- int pos = path.tqfind("[");
+ int pos = path.find("[");
name = path.mid(0, pos - 1);
path = path.mid(pos + 1, path.length() - pos - 2);
}
diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp
index e9d985aa..a579e925 100644
--- a/lib/kofficecore/KoDocument.cpp
+++ b/lib/kofficecore/KoDocument.cpp
@@ -747,7 +747,7 @@ KoDocumentInfo *KoDocument::documentInfo() const
void KoDocument::setViewBuildDocument( KoView *view, const TQDomDocument &doc )
{
- if ( d->m_views.tqfind( view ) == -1 )
+ if ( d->m_views.find( view ) == -1 )
return;
uint viewIdx = d->m_views.at();
@@ -762,7 +762,7 @@ TQDomDocument KoDocument::viewBuildDocument( KoView *view )
{
TQDomDocument res;
- if ( d->m_views.tqfind( view ) == -1 )
+ if ( d->m_views.find( view ) == -1 )
return res;
uint viewIdx = d->m_views.at();
@@ -1623,7 +1623,7 @@ bool KoDocument::oldLoadAndParse(KoStore* store, const TQString& filename, TQDom
if (!store->open(filename))
{
kdWarning(30003) << "Entry " << filename << " not found!" << endl;
- d->lastErrorMessage = i18n( "Could not tqfind %1" ).tqarg( filename );
+ d->lastErrorMessage = i18n( "Could not find %1" ).tqarg( filename );
return false;
}
// Error variables for TQDomDocument::setContent
@@ -2199,7 +2199,7 @@ TQCString KoDocument::nativeFormatMimeType() const
TQCString nativeMimeType = service->property( "X-KDE-NativeMimeType" ).toString().latin1();
if ( nativeMimeType.isEmpty() ) {
// shouldn't happen, let's find out why it happened
- if ( !service->serviceTypes().tqcontains( "KOfficePart" ) )
+ if ( !service->serviceTypes().contains( "KOfficePart" ) )
kdWarning(30003) << "Wrong desktop file, KOfficePart isn't mentionned" << endl;
else if ( !KServiceType::serviceType( "KOfficePart" ) )
kdWarning(30003) << "The KOfficePart service type isn't installed!" << endl;
@@ -2290,7 +2290,7 @@ bool KoDocument::isNativeFormat( const TQCString& mimetype ) const
{
if ( mimetype == nativeFormatMimeType() )
return true;
- return extraNativeMimeTypes().tqcontains( mimetype );
+ return extraNativeMimeTypes().contains( mimetype );
}
TQStringList KoDocument::extraNativeMimeTypes() const
@@ -2315,7 +2315,7 @@ int KoDocument::supportedSpecialFormats() const
void KoDocument::addShell( KoMainWindow *shell )
{
- if ( d->m_shells.tqfindRef( shell ) == -1 )
+ if ( d->m_shells.findRef( shell ) == -1 )
{
//kdDebug(30003) << "addShell: shell " << (void*)shell << " added to doc " << this << endl;
d->m_shells.append( shell );
diff --git a/lib/kofficecore/KoDocumentChild.cpp b/lib/kofficecore/KoDocumentChild.cpp
index 27d4a673..38c4439a 100644
--- a/lib/kofficecore/KoDocumentChild.cpp
+++ b/lib/kofficecore/KoDocumentChild.cpp
@@ -109,7 +109,7 @@ KoDocument* KoDocumentChild::parentDocument() const
KoDocument* KoDocumentChild::hitTest( const TQPoint &p, const TQWMatrix &_matrix )
{
- if ( !region( _matrix ).tqcontains( p ) || !d->m_doc )
+ if ( !region( _matrix ).contains( p ) || !d->m_doc )
return 0L;
TQWMatrix m( _matrix );
@@ -357,7 +357,7 @@ bool KoDocumentChild::loadDocumentInternal( KoStore* store, const KoDocumentEntr
{
KParts::PartManager *manager = tqparent->manager();
- if ( !manager->parts()->tqcontainsRef( d->m_doc ) &&
+ if ( !manager->parts()->containsRef( d->m_doc ) &&
!tqparent->isSingleViewMode() )
manager->addPart( d->m_doc, false );
}
diff --git a/lib/kofficecore/KoDocumentInfo.cpp b/lib/kofficecore/KoDocumentInfo.cpp
index ccec3424..f6a3fe69 100644
--- a/lib/kofficecore/KoDocumentInfo.cpp
+++ b/lib/kofficecore/KoDocumentInfo.cpp
@@ -920,7 +920,7 @@ bool KoDocumentInfoUserMetadata::loadOasis( const TQDomNode& metaDoc )
if ( e.namespaceURI() == KoXmlNS::meta && e.localName() == "user-defined" && !e.text().isEmpty() )
{
TQString name = e.attributeNS( KoXmlNS::meta, "name", TQString() );
- if ( !m_reserved.tqcontains( name ) )
+ if ( !m_reserved.contains( name ) )
m_metaList[ name ] = e.text();
}
}
diff --git a/lib/kofficecore/KoDocumentInfoDlg.cpp b/lib/kofficecore/KoDocumentInfoDlg.cpp
index 8fa70f07..786e3982 100644
--- a/lib/kofficecore/KoDocumentInfoDlg.cpp
+++ b/lib/kofficecore/KoDocumentInfoDlg.cpp
@@ -487,7 +487,7 @@ void KoDocumentInfoPropsPage::applyChanges()
assert( entry );
if ( entry->name() == "documentinfo.xml" ||
- ( !docInfoSaved && !entries.tqcontains( "documentinfo.xml" ) ) )
+ ( !docInfoSaved && !entries.contains( "documentinfo.xml" ) ) )
{
d->m_dlg->save();
diff --git a/lib/kofficecore/KoFilter.cpp b/lib/kofficecore/KoFilter.cpp
index ba37191c..628d5f17 100644
--- a/lib/kofficecore/KoFilter.cpp
+++ b/lib/kofficecore/KoFilter.cpp
@@ -106,7 +106,7 @@ void KoEmbeddingFilter::endInternalEmbedding()
int KoEmbeddingFilter::internalPartReference( const TQString& key ) const
{
- TQMapConstIterator<TQString, PartReference> it = m_partStack.top()->m_partReferences.tqfind( key );
+ TQMapConstIterator<TQString, PartReference> it = m_partStack.top()->m_partReferences.find( key );
if ( it == m_partStack.top()->m_partReferences.end() )
return -1;
return it.data().m_index;
@@ -114,7 +114,7 @@ int KoEmbeddingFilter::internalPartReference( const TQString& key ) const
TQCString KoEmbeddingFilter::internalPartMimeType( const TQString& key ) const
{
- TQMapConstIterator<TQString, PartReference> it = m_partStack.top()->m_partReferences.tqfind( key );
+ TQMapConstIterator<TQString, PartReference> it = m_partStack.top()->m_partReferences.find( key );
if ( it == m_partStack.top()->m_partReferences.end() )
return TQCString();
return it.data().m_mimeType;
diff --git a/lib/kofficecore/KoFilterManager.cpp b/lib/kofficecore/KoFilterManager.cpp
index bc4d48bc..91522fbb 100644
--- a/lib/kofficecore/KoFilterManager.cpp
+++ b/lib/kofficecore/KoFilterManager.cpp
@@ -78,7 +78,7 @@ KoFilterChooser::KoFilterChooser (TQWidget *tqparent, const TQStringList &mimeTy
if (nativeFormat == "application/x-kword")
{
- const int index = m_mimeTypes.tqfindIndex ("text/plain");
+ const int index = m_mimeTypes.findIndex ("text/plain");
if (index > -1)
m_filterList->setCurrentItem (index);
}
@@ -370,7 +370,7 @@ namespace // in order not to mess with the global namespace ;)
TQStringList::ConstIterator testIt = ( *it )->export_.begin();
TQStringList::ConstIterator testEnd = ( *it )->export_.end();
for ( ; testIt != testEnd ; ++testIt ) {
- if ( stopList.tqfind( *testIt ) == stopEnd ) {
+ if ( stopList.find( *testIt ) == stopEnd ) {
expList.append( *testIt );
}
}
@@ -381,7 +381,7 @@ namespace // in order not to mess with the global namespace ;)
TQStringList::ConstIterator testIt = ( *it )->import.begin();
const TQStringList::ConstIterator testEnd = ( *it )->import.end();
for ( ; testIt != testEnd ; ++testIt ) {
- if ( stopList.tqfind( *testIt ) == stopEnd ) {
+ if ( stopList.find( *testIt ) == stopEnd ) {
impList.append( *testIt );
}
}
@@ -493,7 +493,7 @@ TQStringList KoFilterManager::mimeFilter( const TQCString& mimetype, Direction d
const TQStringList outMimes = connected( vertices, (*natit).latin1() );
//kdDebug(s_area) << k_funcinfo << "output formats connected to mime " << *natit << " : " << outMimes << endl;
for ( TQStringList::ConstIterator mit = outMimes.begin(); mit != outMimes.end(); ++mit )
- if ( lst.tqfind( *mit ) == lst.end() ) // append only if not there already. TQt4: TQSet<TQString>?
+ if ( lst.find( *mit ) == lst.end() ) // append only if not there already. TQt4: TQSet<TQString>?
lst.append( *mit );
}
return lst;
@@ -511,7 +511,7 @@ TQStringList KoFilterManager::mimeFilter()
if ( partIt == partEnd )
return TQStringList();
- // To tqfind *all* reachable mimetypes, we have to resort to
+ // To find *all* reachable mimetypes, we have to resort to
// a small hat trick, in order to avoid multiple searches:
// We introduce a fake vertex, which is connected to every
// single KOffice mimetype. Due to that one BFS is enough :)
@@ -550,7 +550,7 @@ bool KoFilterManager::filterAvailable( KoFilterEntry::Ptr entry )
key += " - ";
key += entry->service()->library();
- if ( !m_filterAvailable.tqcontains( key ) ) {
+ if ( !m_filterAvailable.contains( key ) ) {
//kdDebug( 30500 ) << "Not cached, checking..." << endl;
KLibrary* library = KLibLoader::self()->library( TQFile::encodeName( entry->service()->library() ) );
diff --git a/lib/kofficecore/KoFrame.cpp b/lib/kofficecore/KoFrame.cpp
index 2662169e..f11ba9f0 100644
--- a/lib/kofficecore/KoFrame.cpp
+++ b/lib/kofficecore/KoFrame.cpp
@@ -217,21 +217,21 @@ void KoFrame::mousePressEvent( TQMouseEvent* ev )
TQRect r7( 0, height() / 2 - 3, 5, 5 );
TQRect r8( width()- 5, height() / 2 - 3, 5, 5 );
- if ( r1.tqcontains( ev->pos() ) )
+ if ( r1.contains( ev->pos() ) )
d->m_mode = 1;
- else if ( r2.tqcontains( ev->pos() ) )
+ else if ( r2.contains( ev->pos() ) )
d->m_mode = 2;
- else if ( r3.tqcontains( ev->pos() ) )
+ else if ( r3.contains( ev->pos() ) )
d->m_mode = 3;
- else if ( r4.tqcontains( ev->pos() ) )
+ else if ( r4.contains( ev->pos() ) )
d->m_mode = 4;
- else if ( r5.tqcontains( ev->pos() ) )
+ else if ( r5.contains( ev->pos() ) )
d->m_mode = 5;
- else if ( r6.tqcontains( ev->pos() ) )
+ else if ( r6.contains( ev->pos() ) )
d->m_mode = 6;
- else if ( r7.tqcontains( ev->pos() ) )
+ else if ( r7.contains( ev->pos() ) )
d->m_mode = 7;
- else if ( r8.tqcontains( ev->pos() ) )
+ else if ( r8.contains( ev->pos() ) )
d->m_mode = 8;
else
d->m_mode = 0;
@@ -327,13 +327,13 @@ void KoFrame::mouseMoveEvent( TQMouseEvent* ev )
TQRect r7( 0, height() / 2 - 3, 5, 5 );
TQRect r8( width()- 5, height() / 2 - 3, 5, 5 );
- if ( r1.tqcontains( ev->pos() ) || r3.tqcontains( ev->pos() ) )
+ if ( r1.contains( ev->pos() ) || r3.contains( ev->pos() ) )
setCursor( sizeFDiagCursor );
- else if ( r2.tqcontains( ev->pos() ) || r4.tqcontains( ev->pos() ) )
+ else if ( r2.contains( ev->pos() ) || r4.contains( ev->pos() ) )
setCursor( sizeBDiagCursor );
- else if ( r5.tqcontains( ev->pos() ) || r6.tqcontains( ev->pos() ) )
+ else if ( r5.contains( ev->pos() ) || r6.contains( ev->pos() ) )
setCursor( sizeVerCursor );
- else if ( r7.tqcontains( ev->pos() ) || r8.tqcontains( ev->pos() ) )
+ else if ( r7.contains( ev->pos() ) || r8.contains( ev->pos() ) )
setCursor( sizeHorCursor );
else
setCursor( KCursor::handCursor() );
diff --git a/lib/kofficecore/KoGenStyles.cpp b/lib/kofficecore/KoGenStyles.cpp
index 68b8477a..221288df 100644
--- a/lib/kofficecore/KoGenStyles.cpp
+++ b/lib/kofficecore/KoGenStyles.cpp
@@ -31,7 +31,7 @@ KoGenStyles::~KoGenStyles()
TQString KoGenStyles::lookup( const KoGenStyle& style, const TQString& name, int flags )
{
- StyleMap::iterator it = m_styleMap.tqfind( style );
+ StyleMap::iterator it = m_styleMap.find( style );
if ( it == m_styleMap.end() ) {
// Not found, try if this style is in fact equal to its tqparent (the find above
// wouldn't have found it, due to m_parentName being set).
@@ -52,7 +52,7 @@ TQString KoGenStyles::lookup( const KoGenStyle& style, const TQString& name, int
testStyle.m_type = parentStyle->m_type;
// Also it's ok to not have the display name of the tqparent style
// in the auto style
- TQMap<TQString, TQString>::const_iterator it = parentStyle->m_attributes.tqfind( "style:display-name" );
+ TQMap<TQString, TQString>::const_iterator it = parentStyle->m_attributes.find( "style:display-name" );
if ( it != parentStyle->m_attributes.end() )
testStyle.addAttribute( "style:display-name", *it );
@@ -84,16 +84,16 @@ TQString KoGenStyles::makeUniqueName( const TQString& base, int flags ) const
{
// If this name is not used yet, and numbering isn't forced, then the given name is ok.
if ( ( flags & DontForceNumbering )
- && m_autoStylesInStylesDotXml.tqfind( base ) == m_autoStylesInStylesDotXml.end()
- && m_styleNames.tqfind( base ) == m_styleNames.end() )
+ && m_autoStylesInStylesDotXml.find( base ) == m_autoStylesInStylesDotXml.end()
+ && m_styleNames.find( base ) == m_styleNames.end() )
return base;
int num = 1;
TQString name;
do {
name = base;
name += TQString::number( num++ );
- } while ( m_autoStylesInStylesDotXml.tqfind( name ) != m_autoStylesInStylesDotXml.end()
- || m_styleNames.tqfind( name ) != m_styleNames.end() );
+ } while ( m_autoStylesInStylesDotXml.find( name ) != m_autoStylesInStylesDotXml.end()
+ || m_styleNames.find( name ) != m_styleNames.end() );
return name;
}
@@ -105,7 +105,7 @@ TQValueList<KoGenStyles::NamedStyle> KoGenStyles::styles( int type, bool markedF
const StyleArray::const_iterator end = m_styleArray.end();
for ( ; it != end ; ++it ) {
// Look up if it's marked for styles.xml or not by looking up in the corresponding style map.
- if ( (*it).style->type() == type && nameMap.tqfind((*it).name) != nameMap.end() ) {
+ if ( (*it).style->type() == type && nameMap.find((*it).name) != nameMap.end() ) {
lst.append( *it );
}
}
@@ -130,7 +130,7 @@ KoGenStyle* KoGenStyles::styleForModification( const TQString& name )
void KoGenStyles::markStyleForStylesXml( const TQString& name )
{
- Q_ASSERT( m_styleNames.tqfind( name ) != m_styleNames.end() );
+ Q_ASSERT( m_styleNames.find( name ) != m_styleNames.end() );
m_styleNames.remove( name );
m_autoStylesInStylesDotXml.insert( name, true );
styleForModification( name )->setAutoStyleInStylesDotXml( true );
diff --git a/lib/kofficecore/KoGenStyles.h b/lib/kofficecore/KoGenStyles.h
index ad25609e..67f46da1 100644
--- a/lib/kofficecore/KoGenStyles.h
+++ b/lib/kofficecore/KoGenStyles.h
@@ -420,14 +420,14 @@ public:
private:
TQString property( const TQString& propName, PropertyType type ) const {
- TQMap<TQString, TQString>::const_iterator it = m_properties[type].tqfind( propName );
+ TQMap<TQString, TQString>::const_iterator it = m_properties[type].find( propName );
if ( it != m_properties[type].end() )
return it.data();
return TQString();
}
TQString attribute( const TQString& propName ) const {
- TQMap<TQString, TQString>::const_iterator it = m_attributes.tqfind( propName );
+ TQMap<TQString, TQString>::const_iterator it = m_attributes.find( propName );
if ( it != m_attributes.end() )
return it.data();
return TQString();
diff --git a/lib/kofficecore/KoGlobal.cpp b/lib/kofficecore/KoGlobal.cpp
index 57868746..8ba1c077 100644
--- a/lib/kofficecore/KoGlobal.cpp
+++ b/lib/kofficecore/KoGlobal.cpp
@@ -142,12 +142,12 @@ void KoGlobal::createListOfLanguages()
{
// Extract the language tag from the directory name
TQString tag = *it;
- int index = tag.tqfindRev('/');
+ int index = tag.findRev('/');
tag = tag.left(index);
- index = tag.tqfindRev('/');
+ index = tag.findRev('/');
tag = tag.mid(index+1);
- if ( seenLanguages.tqfind( tag ) == seenLanguages.end() ) {
+ if ( seenLanguages.find( tag ) == seenLanguages.end() ) {
KSimpleConfig entry(*it);
entry.setGroup("KCM Locale");
@@ -169,7 +169,7 @@ void KoGlobal::createListOfLanguages()
TQString KoGlobal::tagOfLanguage( const TQString & _lang)
{
const LanguageMap& map = self()->m_langMap;
- TQMap<TQString,TQString>::ConstIterator it = map.tqfind( _lang );
+ TQMap<TQString,TQString>::ConstIterator it = map.find( _lang );
if ( it != map.end() )
return *it;
return TQString();
diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp
index be8a0fa2..4e30d64a 100644
--- a/lib/kofficecore/KoMainWindow.cpp
+++ b/lib/kofficecore/KoMainWindow.cpp
@@ -322,7 +322,7 @@ KoMainWindow::~KoMainWindow()
// safety first ;)
d->m_manager->setActivePart(0);
- if(d->m_rootViews.tqfindRef(d->m_activeView)==-1) {
+ if(d->m_rootViews.findRef(d->m_activeView)==-1) {
delete d->m_activeView;
d->m_activeView=0L;
}
@@ -375,7 +375,7 @@ void KoMainWindow::setRootDocument( KoDocument *doc )
d->m_rootViews.current()->show();
// The addShell has been done already if using openURL
- if ( !d->m_rootDoc->shells().tqcontains( this ) )
+ if ( !d->m_rootDoc->shells().contains( this ) )
d->m_rootDoc->addShell( this );
d->m_removeView->setEnabled(false);
d->m_orientation->setEnabled(false);
@@ -445,7 +445,7 @@ void KoMainWindow::addRecentURL( const KURL& url )
TQString path = url.path( -1 );
TQStringList tmpDirs = KGlobal::dirs()->resourceDirs( "tmp" );
for ( TQStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it )
- if ( path.tqcontains( *it ) )
+ if ( path.contains( *it ) )
ok = false; // it's in the tmp resource
if ( ok )
KRecentDocument::add(path);
@@ -530,7 +530,7 @@ KoDocument *KoMainWindow::rootDocument() const
KoView *KoMainWindow::rootView() const
{
- if(d->m_rootViews.tqfind(d->m_activeView)!=-1)
+ if(d->m_rootViews.find(d->m_activeView)!=-1)
return d->m_activeView;
return d->m_rootViews.first();
}
@@ -743,7 +743,7 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
KURL suggestedURL = pDoc->url();
TQStringList mimeFilter = KoFilterManager::mimeFilter( _native_format, KoFilterManager::Export, pDoc->extraNativeMimeTypes() );
- if (mimeFilter.tqfindIndex (oldOutputFormat) < 0 && !isExporting())
+ if (mimeFilter.findIndex (oldOutputFormat) < 0 && !isExporting())
{
kdDebug(30003) << "KoMainWindow::saveDocument no export filter for '" << oldOutputFormat << "'" << endl;
@@ -754,7 +754,7 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
TQString suggestedFilename = suggestedURL.fileName ();
if ( !suggestedFilename.isEmpty () ) // ".kwd" looks strange for a name
{
- int c = suggestedFilename.tqfindRev ('.');
+ int c = suggestedFilename.findRev ('.');
KMimeType::Ptr mime = KMimeType::mimeType( _native_format );
TQString ext = mime->property( "X-KDE-NativeExtension" ).toString();
@@ -1296,7 +1296,7 @@ void KoMainWindow::slotNewToolbarConfig()
d->m_veryHackyActionList);
// This one only for root views
- if(d->m_rootViews.tqfindRef(d->m_activeView)!=-1)
+ if(d->m_rootViews.findRef(d->m_activeView)!=-1)
factory->plugActionList(d->m_activeView, "view_split",
d->m_splitViewActionList );
plugActionList( "toolbarlist", d->m_toolbarList );
@@ -1388,7 +1388,7 @@ void KoMainWindow::slotCloseAllViews() {
void KoMainWindow::slotRemoveView() {
KoView *view;
- if(d->m_rootViews.tqfindRef(d->m_activeView)!=-1)
+ if(d->m_rootViews.findRef(d->m_activeView)!=-1)
view=d->m_rootViews.current();
else
view=d->m_rootViews.first();
@@ -1514,7 +1514,7 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart )
factory->plugActionList(d->m_activeView, "view_closeallviews",
d->m_veryHackyActionList);
// This one only for root views
- if(d->m_rootViews.tqfindRef(d->m_activeView)!=-1)
+ if(d->m_rootViews.findRef(d->m_activeView)!=-1)
factory->plugActionList(d->m_activeView, "view_split", d->m_splitViewActionList );
// Position and show toolbars according to user's preference
diff --git a/lib/kofficecore/KoMainWindow.h b/lib/kofficecore/KoMainWindow.h
index f1dd6419..8913e1a8 100644
--- a/lib/kofficecore/KoMainWindow.h
+++ b/lib/kofficecore/KoMainWindow.h
@@ -43,7 +43,7 @@ namespace KParts
* @brief Main window for a KOffice application
*
* This class is used to represent a main window
- * of a KOffice component. Each main window tqcontains
+ * of a KOffice component. Each main window contains
* a menubar and some toolbars.
*
* @note This class does NOT need to be subclassed in your application.
diff --git a/lib/kofficecore/KoOasisStore.cpp b/lib/kofficecore/KoOasisStore.cpp
index 7eec46a5..ea99ce8a 100644
--- a/lib/kofficecore/KoOasisStore.cpp
+++ b/lib/kofficecore/KoOasisStore.cpp
@@ -145,7 +145,7 @@ bool KoOasisStore::loadAndParse( const TQString& fileName, TQDomDocument& doc, T
if (!m_store->open(fileName))
{
kdWarning(30003) << "Entry " << fileName << " not found!" << endl;
- errorMessage = i18n( "Could not tqfind %1" ).tqarg( fileName );
+ errorMessage = i18n( "Could not find %1" ).tqarg( fileName );
return false;
}
// Error variables for TQDomDocument::setContent
diff --git a/lib/kofficecore/KoOasisStyles.cpp b/lib/kofficecore/KoOasisStyles.cpp
index d135a501..fe4ee658 100644
--- a/lib/kofficecore/KoOasisStyles.cpp
+++ b/lib/kofficecore/KoOasisStyles.cpp
@@ -180,7 +180,7 @@ void KoOasisStyles::insertStyle( const TQDomElement& e, bool styleAutoStyles )
if ( styleAutoStyles ) {
TQDict<TQDomElement>& dict = d->m_stylesAutoStyles[ family ];
dict.setAutoDelete( true );
- if ( dict.tqfind( name ) != 0 )
+ if ( dict.find( name ) != 0 )
kdDebug(30003) << "Auto-style: '" << name << "' already exists" << endl;
dict.insert( name, new TQDomElement( e ) );
//kdDebug(30003) << "Style: '" << name << "' loaded as a style auto style" << endl;
@@ -188,7 +188,7 @@ void KoOasisStyles::insertStyle( const TQDomElement& e, bool styleAutoStyles )
TQDict<TQDomElement>& dict = d->m_styles[ family ];
dict.setAutoDelete( true );
- if ( dict.tqfind( name ) != 0 )
+ if ( dict.find( name ) != 0 )
kdDebug(30003) << "Style: '" << name << "' already exists" << endl;
dict.insert( name, new TQDomElement( e ) );
//kdDebug(30003) << "Style: '" << name << "' loaded " << endl;
@@ -198,7 +198,7 @@ void KoOasisStyles::insertStyle( const TQDomElement& e, bool styleAutoStyles )
|| localName == "font-decl"
|| localName == "presentation-page-tqlayout" ) )
{
- if ( m_styles.tqfind( name ) != 0 )
+ if ( m_styles.find( name ) != 0 )
kdDebug(30003) << "Style: '" << name << "' already exists" << endl;
m_styles.insert( name, new TQDomElement( e ) );
} else if ( localName == "default-style" && ns == KoXmlNS::style ) {
diff --git a/lib/kofficecore/KoPictureCollection.cpp b/lib/kofficecore/KoPictureCollection.cpp
index 3d680bf7..835beafb 100644
--- a/lib/kofficecore/KoPictureCollection.cpp
+++ b/lib/kofficecore/KoPictureCollection.cpp
@@ -37,7 +37,7 @@ KoPicture KoPictureCollection::findPicture(const KoPictureKey& key) const
#ifdef DEBUG_PICTURES
kdDebug(30003) << "KoPictureCollection::findPicture " << key.toString() << endl;
#endif
- ConstIterator it = tqfind( key );
+ ConstIterator it = find( key );
if ( it == end() )
{
KoPicture picture;
@@ -285,7 +285,7 @@ void KoPictureCollection::readFromStore( KoStore * store, const StoreMap & store
}
}
- const int pos=u.tqfindRev('.');
+ const int pos=u.findRev('.');
if (pos==-1)
{
kdError(30003) << "File with no extension! Not supported!" << endl;
@@ -305,7 +305,7 @@ void KoPictureCollection::readFromStore( KoStore * store, const StoreMap & store
KoPicture KoPictureCollection::findOrLoad(const TQString& fileName, const TQDateTime& dateTime)
{
// As now all KoPictureKey objects have a valid TQDateTime, we must do it without a date/time check.
- ConstIterator it = tqfind( KoPictureKey ( fileName, dateTime ) );
+ ConstIterator it = find( KoPictureKey ( fileName, dateTime ) );
if ( it == end() )
{
return loadPicture( fileName );
diff --git a/lib/kofficecore/KoPictureShared.cpp b/lib/kofficecore/KoPictureShared.cpp
index 16fea2ef..6bc69345 100644
--- a/lib/kofficecore/KoPictureShared.cpp
+++ b/lib/kofficecore/KoPictureShared.cpp
@@ -299,7 +299,7 @@ bool KoPictureShared::loadXpm(TQIODevice* io)
int pos=0;
- while ((pos=array.tqfind(char(1),pos))!=-1)
+ while ((pos=array.find(char(1),pos))!=-1)
{
array[pos]='"';
}
@@ -436,7 +436,7 @@ bool KoPictureShared::loadFromFile(const TQString& fileName)
return false;
bool flag = false;
- const int pos=fileName.tqfindRev('.');
+ const int pos=fileName.findRev('.');
if (pos==-1)
{
kdDebug(30003) << "File with no extension!" << endl;
diff --git a/lib/kofficecore/KoQueryTrader.h b/lib/kofficecore/KoQueryTrader.h
index ff2a5100..54fa811e 100644
--- a/lib/kofficecore/KoQueryTrader.h
+++ b/lib/kofficecore/KoQueryTrader.h
@@ -64,7 +64,7 @@ public:
* @return TRUE if the document can handle the requested mimetype.
*/
bool supportsMimeType( const TQString & _mimetype ) const
- { return mimeTypes().tqcontains( _mimetype ); }
+ { return mimeTypes().contains( _mimetype ); }
/**
* Uses the factory of the component to create
@@ -152,13 +152,13 @@ public:
* @return TRUE if the filter can import the requested mimetype.
*/
bool imports( const TQString& _mimetype ) const
- { return ( import.tqcontains( _mimetype ) ); }
+ { return ( import.contains( _mimetype ) ); }
/**
* @return TRUE if the filter can export the requested mimetype.
*/
bool exports( const TQString& _m ) const
- { return ( export_.tqcontains( _m ) ); }
+ { return ( export_.contains( _m ) ); }
/**
* This function will query KDED to find all available filters.
diff --git a/lib/kofficecore/KoRect.cpp b/lib/kofficecore/KoRect.cpp
index 78a63992..2a3259a9 100644
--- a/lib/kofficecore/KoRect.cpp
+++ b/lib/kofficecore/KoRect.cpp
@@ -166,15 +166,15 @@ KoRect &KoRect::operator&=(const KoRect &rhs) {
return *this;
}
-bool KoRect::tqcontains(const KoPoint &p) const {
+bool KoRect::contains(const KoPoint &p) const {
return (p.x() >= m_tl.x() && p.x() <= m_br.x() && p.y() >= m_tl.y() && p.y() <= m_br.y());
}
-bool KoRect::tqcontains(const double &x, const double &y) const {
+bool KoRect::contains(const double &x, const double &y) const {
return (x >= m_tl.x() && x <= m_br.x() && y >= m_tl.y() && y <= m_br.y());
}
-bool KoRect::tqcontains(const KoRect &r) const {
+bool KoRect::contains(const KoRect &r) const {
return (r.left() >= m_tl.x() && r.right() <= m_br.x() && r.top() >= m_tl.y() && r.bottom() <= m_br.y());
}
diff --git a/lib/kofficecore/KoRect.h b/lib/kofficecore/KoRect.h
index b4289088..bb4f1161 100644
--- a/lib/kofficecore/KoRect.h
+++ b/lib/kofficecore/KoRect.h
@@ -108,11 +108,11 @@ public:
* Note that for KoRect(0, 0, 100, 100) the KoPoint(0, 0) as well as KoPoint(100, 100) are
* mathmatically contained in the rect, this in contrary to pixel based rectangles.
*/
- bool tqcontains(const KoPoint &p) const;
+ bool contains(const KoPoint &p) const;
/// Helper function for the above function.
- bool tqcontains(const double &x, const double &y) const;
+ bool contains(const double &x, const double &y) const;
/// Helper function for the above function.
- bool tqcontains(const KoRect &r) const;
+ bool contains(const KoRect &r) const;
KoRect unite(const KoRect &r) const;
KoRect intersect(const KoRect &r) const;
bool intersects(const KoRect &r) const;
diff --git a/lib/kofficecore/KoSpeaker.cpp b/lib/kofficecore/KoSpeaker.cpp
index fd42bcf3..75c8fec8 100644
--- a/lib/kofficecore/KoSpeaker.cpp
+++ b/lib/kofficecore/KoSpeaker.cpp
@@ -307,7 +307,7 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/)
if (pos == TQPoint())
item = iv->currentItem();
else
- item = iv->tqfindItem(iv->viewportToContents(iv->viewport()->mapFromGlobal(pos)));
+ item = iv->findItem(iv->viewportToContents(iv->viewport()->mapFromGlobal(pos)));
if (item) {
id = item->index();
text = item->text();
@@ -431,7 +431,7 @@ bool KoSpeaker::sayWidget(const TQString& msg)
{
TQString s = msg;
if (d->m_speakFlags & SpeakAccelerator) {
- int amp = s.tqfind("&");
+ int amp = s.find("&");
if (amp >= 0) {
TQString acc = s.mid(++amp,1);
acc = acc.stripWhiteSpace();
@@ -442,20 +442,20 @@ bool KoSpeaker::sayWidget(const TQString& msg)
s.remove("&");
if (TQStyleSheet::mightBeRichText(s)) {
// kdDebug() << "richtext" << endl;
- s.tqreplace(TQRegExp("</?[pbius]>"), "");
- s.tqreplace(TQRegExp("</?h\\d>"), "");
- s.tqreplace(TQRegExp("<(br|hr)>"), " ");
- s.tqreplace(TQRegExp(
+ s.replace(TQRegExp("</?[pbius]>"), "");
+ s.replace(TQRegExp("</?h\\d>"), "");
+ s.replace(TQRegExp("<(br|hr)>"), " ");
+ s.replace(TQRegExp(
"</?(qt|center|li|pre|div|span|em|strong|big|small|sub|sup|code|tt|font|nobr|ul|ol|dl|dt)>"), "");
- s.tqreplace(TQRegExp("</?(table|tr|th|td).*>"), "");
- s.tqreplace(TQRegExp("</?a\\s.+>"), "");
+ s.replace(TQRegExp("</?(table|tr|th|td).*>"), "");
+ s.replace(TQRegExp("</?a\\s.+>"), "");
// Replace <img source="small|frame_text"> with "small frame_text image. "
- s.tqreplace(TQRegExp("<img\\s.*(?:source=|src=)\"([^|\"]+)[|]?([^|\"]*)\">"), "\\1 \\2 image. ");
+ s.replace(TQRegExp("<img\\s.*(?:source=|src=)\"([^|\"]+)[|]?([^|\"]*)\">"), "\\1 \\2 image. ");
}
if (s.isEmpty()) return false;
- s.tqreplace("Ctrl+", i18n("control plus "));
- s.tqreplace("Alt+", i18n("alt plus "));
- s.tqreplace("+", i18n(" plus "));
+ s.replace("Ctrl+", i18n("control plus "));
+ s.replace("Alt+", i18n("alt plus "));
+ s.replace("+", i18n(" plus "));
sayScreenReaderOutput(s, "");
return true;
}
@@ -468,7 +468,7 @@ bool KoSpeaker::sayWidget(const TQString& msg)
// int id = m->idAt(i);
// TQMenuItem* mi = m->findItem(id);
// TQWidget* w = mi->widget();
-// if (w->rect().tqcontains(w->mapFromGlobal(p))) return id;
+// if (w->rect().contains(w->mapFromGlobal(p))) return id;
// }
// return -1;
// }
diff --git a/lib/kofficecore/KoStyleStack.h b/lib/kofficecore/KoStyleStack.h
index 4e6cfa7e..4fbc1793 100644
--- a/lib/kofficecore/KoStyleStack.h
+++ b/lib/kofficecore/KoStyleStack.h
@@ -98,7 +98,7 @@ public:
/**
* Check if any of the styles on the stack has an attribute called 'name'-'detail'
* where detail is e.g. left, right, top or bottom.
- * This allows to also tqfind 'name' alone (e.g. padding implies padding-left, padding-right etc.)
+ * This allows to also find 'name' alone (e.g. padding implies padding-left, padding-right etc.)
*/
bool hasAttribute( const TQString& name, const TQString& detail = TQString() ) const KDE_DEPRECATED;
@@ -111,7 +111,7 @@ public:
/**
* Check if any of the styles on the stack has an attribute called 'name'-'detail'
* where detail is e.g. left, right, top or bottom.
- * This allows to also tqfind 'name' alone (e.g. padding implies padding-left, padding-right etc.)
+ * This allows to also find 'name' alone (e.g. padding implies padding-left, padding-right etc.)
*/
bool hasAttributeNS( const char* nsURI, const char* localName, const char* detail = 0 ) const;
diff --git a/lib/kofficecore/KoTemplates.cpp b/lib/kofficecore/KoTemplates.cpp
index 178c6271..62c8358d 100644
--- a/lib/kofficecore/KoTemplates.cpp
+++ b/lib/kofficecore/KoTemplates.cpp
@@ -101,7 +101,7 @@ void KoTemplateGroup::setHidden(bool hidden) const {
bool KoTemplateGroup::add(KoTemplate *t, bool force, bool touch) {
- KoTemplate *myTemplate=tqfind(t->name());
+ KoTemplate *myTemplate=find(t->name());
if(myTemplate==0L) {
m_templates.append(t);
m_touched=touch;
@@ -120,7 +120,7 @@ bool KoTemplateGroup::add(KoTemplate *t, bool force, bool touch) {
return false;
}
-KoTemplate *KoTemplateGroup::tqfind(const TQString &name) const {
+KoTemplate *KoTemplateGroup::find(const TQString &name) const {
TQPtrListIterator<KoTemplate> it(m_templates);
while(it.current() && it.current()->name()!=name)
@@ -192,14 +192,14 @@ void KoTemplateTree::writeTemplateTree() {
void KoTemplateTree::add(KoTemplateGroup *g) {
- KoTemplateGroup *group=tqfind(g->name());
+ KoTemplateGroup *group=find(g->name());
if(group==0L)
m_groups.append(g);
else
group->addDir(g->dirs().first()); // "...there can be only one..." (Queen)
}
-KoTemplateGroup *KoTemplateTree::tqfind(const TQString &name) const {
+KoTemplateGroup *KoTemplateTree::find(const TQString &name) const {
TQPtrListIterator<KoTemplateGroup> it(m_groups);
while(it.current() && it.current()->name()!=name)
diff --git a/lib/kofficecore/KoTemplates.h b/lib/kofficecore/KoTemplates.h
index 7547fd60..98c3ef72 100644
--- a/lib/kofficecore/KoTemplates.h
+++ b/lib/kofficecore/KoTemplates.h
@@ -92,7 +92,7 @@ public:
KoTemplate *current() { return m_templates.current(); }
bool add(KoTemplate *t, bool force=false, bool touch=true);
- KoTemplate *tqfind(const TQString &name) const;
+ KoTemplate *find(const TQString &name) const;
bool touched() const { return m_touched; }
@@ -124,7 +124,7 @@ public:
KoTemplateGroup *current() { return m_groups.current(); }
void add(KoTemplateGroup *g);
- KoTemplateGroup *tqfind(const TQString &name) const;
+ KoTemplateGroup *find(const TQString &name) const;
KoTemplateGroup *defaultGroup() const { return m_defaultGroup; }
KoTemplate *defaultTemplate() const { return m_defaultTemplate; }
diff --git a/lib/kofficecore/KoUnit.cpp b/lib/kofficecore/KoUnit.cpp
index 51c63499..cc882345 100644
--- a/lib/kofficecore/KoUnit.cpp
+++ b/lib/kofficecore/KoUnit.cpp
@@ -153,7 +153,7 @@ double KoUnit::parseValue( TQString value, double defaultVal )
if( value.isEmpty() )
return defaultVal;
- int index = value.tqfind( TQRegExp( "[a-z]+$" ) );
+ int index = value.find( TQRegExp( "[a-z]+$" ) );
if ( index == -1 )
return value.toDouble();
diff --git a/lib/kofficecore/KoView.cpp b/lib/kofficecore/KoView.cpp
index 87751a34..e2b9775e 100644
--- a/lib/kofficecore/KoView.cpp
+++ b/lib/kofficecore/KoView.cpp
@@ -203,7 +203,7 @@ void KoView::setPartManager( KParts::PartManager *manager )
{
d->m_manager = manager;
if ( !koDocument()->isSingleViewMode() &&
- manager->parts()->tqcontainsRef( koDocument() ) == 0 ) // is there another view registered?
+ manager->parts()->containsRef( koDocument() ) == 0 ) // is there another view registered?
{
d->m_registered = true; // no, so we have to register now and ungregister again in the DTOR
manager->addPart( koDocument(), false );
@@ -241,11 +241,11 @@ KoDocument *KoView::hitTest( const TQPoint &viewPos )
{
if ( ( viewChild = child( docChild->document() ) ) )
{
- if ( viewChild->frameRegion().tqcontains( pos ) )
+ if ( viewChild->frameRegion().contains( pos ) )
return 0;
}
else
- if ( docChild->frameRegion().tqcontains( pos ) )
+ if ( docChild->frameRegion().contains( pos ) )
return 0;
}
@@ -254,11 +254,11 @@ KoDocument *KoView::hitTest( const TQPoint &viewPos )
{
if ( ( viewChild = child( docChild->document() ) ) )
{
- if ( viewChild->frameRegion().tqcontains( pos ) )
+ if ( viewChild->frameRegion().contains( pos ) )
return 0;
}
else
- if ( docChild->frameRegion().tqcontains( pos ) )
+ if ( docChild->frameRegion().contains( pos ) )
return 0;
}
diff --git a/lib/kofficecore/KoXmlReader.cpp b/lib/kofficecore/KoXmlReader.cpp
index 371b4d29..52e6d8ae 100644
--- a/lib/kofficecore/KoXmlReader.cpp
+++ b/lib/kofficecore/KoXmlReader.cpp
@@ -421,7 +421,7 @@ TQString KoXmlNodeData::attribute( const TQString& name )
bool KoXmlNodeData::hasAttribute( const TQString& name )
{
- return attr.tqcontains( name );
+ return attr.contains( name );
}
void KoXmlNodeData::setAttributeNS( const TQString& nsURI,
@@ -429,7 +429,7 @@ const TQString& name, const TQString& value )
{
TQString prefix;
TQString localName = name;
- int i = name.tqfind( ':' );
+ int i = name.find( ':' );
if( i != -1 )
{
localName = name.mid( i + 1 );
@@ -451,7 +451,7 @@ TQString KoXmlNodeData::attributeNS( const TQString& nsURI, const TQString& name
bool KoXmlNodeData::hasAttributeNS( const TQString& nsURI, const TQString& name )
{
DTQString key( nsURI, name );
- return attrNS.tqcontains( key );
+ return attrNS.contains( key );
}
TQString KoXmlNodeData::data() const
@@ -665,7 +665,7 @@ const TQString& name, const TQXmlAttributes& atts )
nodeTagName = name;
nodeLocalName = name;
nodePrefix = nsURI.isNull() ? TQString() : TQString("");
- int i = name.tqfind( ':' );
+ int i = name.find( ':' );
if( i != -1 )
{
nodeTagName = name.mid( i + 1 );
@@ -695,7 +695,7 @@ const TQString& name, const TQXmlAttributes& atts )
TQString name; // without prefix, i.e. local name
name = qName = atts.qName(c);
- int i = qName.tqfind( ':' );
+ int i = qName.find( ':' );
if( i != -1 ) prefix = qName.left( i );
if( i != -1 ) name = qName.mid( i + 1 );
element->setAttributeNS( atts.uri(c), qName, atts.value(c) );
@@ -720,7 +720,7 @@ const TQString& name, const TQXmlAttributes& atts )
{
TQString prefix;
TQString name = atts.qName(c); // qName contains the prefix
- int i = name.tqfind( ':' );
+ int i = name.find( ':' );
if( i != -1 ) prefix = name.left( i );
if( i != -1 ) name = atts.qName(c).mid( i + 1 );
if( !atts.uri(c).isEmpty() )
diff --git a/lib/kofficecore/THOUGHTS b/lib/kofficecore/THOUGHTS
index 33befa05..fc936fdc 100644
--- a/lib/kofficecore/THOUGHTS
+++ b/lib/kofficecore/THOUGHTS
@@ -77,7 +77,7 @@ as inactive child.
###
If a part doesn't support zooming natively we have to fall back to WMartix
-hacks (don't know how we can "ask" a part about that, but I'm sure we tqfind
+hacks (don't know how we can "ask" a part about that, but I'm sure we find
some BC way).
2.2) Widget embedding:
diff --git a/lib/kofficecore/kkbdaccessextensions.cpp b/lib/kofficecore/kkbdaccessextensions.cpp
index a45e1334..dccc913a 100644
--- a/lib/kofficecore/kkbdaccessextensions.cpp
+++ b/lib/kofficecore/kkbdaccessextensions.cpp
@@ -310,7 +310,7 @@ void KKbdAccessExtensions::nextHandle()
advance = (d->handleNdx > 2 || !dynamic_cast<TQDockWindow *>(panel)->area());
if (advance) {
TQWidgetList* allWidgets = getAllPanels();
- allWidgets->tqfindRef(panel);
+ allWidgets->findRef(panel);
panel = 0;
if (allWidgets->current()) panel = allWidgets->next();
delete allWidgets;
@@ -340,7 +340,7 @@ void KKbdAccessExtensions::prevHandle()
rewind = (d->handleNdx < 1);
if (rewind) {
TQWidgetList* allWidgets = getAllPanels();
- allWidgets->tqfindRef(panel);
+ allWidgets->findRef(panel);
panel = 0;
if (allWidgets->current()) panel = allWidgets->prev();
delete allWidgets;
@@ -563,7 +563,7 @@ void KKbdAccessExtensions::displayAccessKeys()
KKeySequence seq = sc.seq(i);
if (seq.count() == 1) {
TQString s = seq.toString();
- if (availableAccessKeys.tqcontains(s))
+ if (availableAccessKeys.contains(s))
availableAccessKeys.remove(s);
}
}
diff --git a/lib/kofficecore/tests/filter_graph.cpp b/lib/kofficecore/tests/filter_graph.cpp
index ac25c8d7..baead627 100644
--- a/lib/kofficecore/tests/filter_graph.cpp
+++ b/lib/kofficecore/tests/filter_graph.cpp
@@ -53,7 +53,7 @@ int main( int /*argc*/, char ** /*argv*/ )
output += " \"";
output += key.latin1();
output += "\" [tqshape=box, style=filled, fillcolor=lightblue];\n";
- if ( vertices.tqfind( key ) == vertices.end() )
+ if ( vertices.find( key ) == vertices.end() )
vertices.append( key );
}
}
@@ -71,7 +71,7 @@ int main( int /*argc*/, char ** /*argv*/ )
TQStringList::ConstIterator importEnd = ( *it )->import.end();
for ( ; importIt != importEnd; ++importIt ) {
// already there?
- if ( vertices.tqfind( *importIt ) == vertices.end() ) {
+ if ( vertices.find( *importIt ) == vertices.end() ) {
vertices.append( *importIt );
output += " \"";
output += ( *importIt ).latin1();
@@ -84,7 +84,7 @@ int main( int /*argc*/, char ** /*argv*/ )
for ( ; exportIt != exportEnd; ++exportIt ) {
// First make sure the export vertex is in place
- if ( vertices.tqfind( *exportIt ) == vertices.end() ) {
+ if ( vertices.find( *exportIt ) == vertices.end() ) {
output += " \"";
output += ( *exportIt ).latin1();
output += "\";\n";
diff --git a/lib/kofficeui/KoCommandHistory.cpp b/lib/kofficeui/KoCommandHistory.cpp
index 22e8599b..cfde2802 100644
--- a/lib/kofficeui/KoCommandHistory.cpp
+++ b/lib/kofficeui/KoCommandHistory.cpp
@@ -173,7 +173,7 @@ void KoCommandHistory::addCommand(KCommand *command, bool execute) {
return;
int index;
- if(d->m_present!=0L && (index=m_commands.tqfindRef(d->m_present))!=-1) {
+ if(d->m_present!=0L && (index=m_commands.findRef(d->m_present))!=-1) {
if (m_first)
--index;
m_commands.insert(index+1, command);
@@ -232,7 +232,7 @@ void KoCommandHistory::undo() {
m_redo->setText(i18n("&Redo: %1").tqarg(d->m_present->name()));
}
int index;
- if((index=m_commands.tqfindRef(d->m_present))!=-1 && m_commands.prev()!=0) {
+ if((index=m_commands.findRef(d->m_present))!=-1 && m_commands.prev()!=0) {
d->m_present=m_commands.current();
emit commandExecuted();
emit commandExecuted(commandUndone);
@@ -270,7 +270,7 @@ void KoCommandHistory::redo() {
if(d->m_savedAt==0)
emit documentRestored();
}
- else if((index=m_commands.tqfindRef(d->m_present))!=-1 && m_commands.next()!=0) {
+ else if((index=m_commands.findRef(d->m_present))!=-1 && m_commands.next()!=0) {
d->m_present=m_commands.current();
d->m_present->execute();
emit commandExecuted();
@@ -301,7 +301,7 @@ void KoCommandHistory::redo() {
void KoCommandHistory::documentSaved() {
if(d->m_present!=0 && !m_first)
- d->m_savedAt=m_commands.tqfindRef(d->m_present);
+ d->m_savedAt=m_commands.findRef(d->m_present);
else if(d->m_present==0 && !m_first)
d->m_savedAt=-42; // this value signals that the document has
// been saved with an empty history.
@@ -331,7 +331,7 @@ void KoCommandHistory::clipCommands() {
if(count<=m_undoLimit && count<=m_redoLimit)
return;
- int index=m_commands.tqfindRef(d->m_present);
+ int index=m_commands.findRef(d->m_present);
if(index>=m_undoLimit) {
for(int i=0; i<=(index-m_undoLimit); ++i) {
m_commands.removeFirst();
@@ -339,7 +339,7 @@ void KoCommandHistory::clipCommands() {
if(d->m_savedAt==-1)
d->m_savedAt=-42;
}
- index=m_commands.tqfindRef(d->m_present); // calculate the new
+ index=m_commands.findRef(d->m_present); // calculate the new
count=m_commands.count(); // values (for the redo-branch :)
// make it easier for us... d->m_savedAt==-1 -> invalid
if(d->m_savedAt!=-42 && d->m_savedAt<-1)
@@ -362,7 +362,7 @@ void KoCommandHistory::slotUndoAboutToShow()
slotChangeUndoNumberOfSelectedItem( -1 );
int i = 0;
TQStringList lst;
- if (m_commands.tqfindRef(d->m_present)!=-1)
+ if (m_commands.findRef(d->m_present)!=-1)
while ( m_commands.current() && i<10 ) // TODO make number of items configurable ?
{
lst.append(i18n("Undo: %1").tqarg(m_commands.current()->name()));
@@ -413,7 +413,7 @@ void KoCommandHistory::slotRedoAboutToShow()
d->m_present = m_commands.first();
lst.append(i18n("Redo: %1").tqarg(d->m_present->name()));
}
- if (m_commands.tqfindRef(d->m_present)!=-1 && m_commands.next())
+ if (m_commands.findRef(d->m_present)!=-1 && m_commands.next())
while ( m_commands.current() && i<10 ) // TODO make number of items configurable ?
{
lst.append(i18n("Redo: %1").tqarg(m_commands.current()->name()));
@@ -436,7 +436,7 @@ void KoCommandHistory::updateActions()
if ( m_undo && m_redo )
{
m_undo->setEnabled( !m_first && ( d->m_present != 0L ) );
- m_redo->setEnabled(m_first || (m_commands.tqfindRef(d->m_present)!=-1 && m_commands.next()!=0));
+ m_redo->setEnabled(m_first || (m_commands.findRef(d->m_present)!=-1 && m_commands.next()!=0));
}
}
diff --git a/lib/kofficeui/KoContextCelp.cpp b/lib/kofficeui/KoContextCelp.cpp
index 830dded4..c2a237bd 100644
--- a/lib/kofficeui/KoContextCelp.cpp
+++ b/lib/kofficeui/KoContextCelp.cpp
@@ -227,7 +227,7 @@ void KoHelpView::mouseReleaseEvent( TQMouseEvent* e )
TQString helpapp=currentAnchor.right(currentAnchor.length()-7);
TQString helpanchor;
int pos;
- if ((pos=helpapp.tqfind("#"))!=-1) {
+ if ((pos=helpapp.find("#"))!=-1) {
helpanchor=helpapp.right(helpapp.length()-pos-1);
helpapp=helpapp.left(pos);
}
diff --git a/lib/kofficeui/KoGuides.cpp b/lib/kofficeui/KoGuides.cpp
index a7e85bcf..01f6e745 100644
--- a/lib/kofficeui/KoGuides.cpp
+++ b/lib/kofficeui/KoGuides.cpp
@@ -134,7 +134,7 @@ bool KoGuides::mousePressEvent( TQMouseEvent *e )
m_mouseSelected = false;
KoPoint p( mapFromScreen( e->pos() ) );
- KoGuideLine * guideLine = tqfind( p, m_zoomHandler->unzoomItY( 2 ) );
+ KoGuideLine * guideLine = find( p, m_zoomHandler->unzoomItY( 2 ) );
if ( guideLine )
{
m_lastPoint = e->pos();
@@ -216,7 +216,7 @@ bool KoGuides::mouseMoveEvent( TQMouseEvent *e )
else if ( e->state() == Qt::NoButton )
{
KoPoint p( mapFromScreen( e->pos() ) );
- KoGuideLine * guideLine = tqfind( p, m_zoomHandler->unzoomItY( 2 ) );
+ KoGuideLine * guideLine = find( p, m_zoomHandler->unzoomItY( 2 ) );
if ( guideLine )
{
m_view->canvas()->setCursor( guideLine->orientation == Qt::Vertical ? TQt::sizeHorCursor : TQt::sizeVerCursor );
@@ -249,7 +249,7 @@ bool KoGuides::mouseReleaseEvent( TQMouseEvent *e )
removeSelected();
}
}
- KoGuideLine * guideLine = tqfind( p, m_zoomHandler->unzoomItY( 2 ) );
+ KoGuideLine * guideLine = find( p, m_zoomHandler->unzoomItY( 2 ) );
if ( guideLine )
{
m_view->canvas()->setCursor( guideLine->orientation == Qt::Vertical ? TQt::sizeHorCursor : TQt::sizeVerCursor );
@@ -722,7 +722,7 @@ void KoGuides::addGuide( const TQPoint &pos, bool /* horizontal */, int rulerWid
void KoGuides::slotChangePosition()
{
KoPoint p( mapFromScreen( m_lastPoint ) );
- KoGuideLine * guideLine = tqfind( p, m_zoomHandler->unzoomItY( 2 ) );
+ KoGuideLine * guideLine = find( p, m_zoomHandler->unzoomItY( 2 ) );
const KoPageLayout& pl = m_view->koDocument()->pageLayout();
double max = 0.0;
@@ -819,7 +819,7 @@ bool KoGuides::hasSelected()
}
-KoGuides::KoGuideLine * KoGuides::tqfind( KoPoint &p, double diff )
+KoGuides::KoGuideLine * KoGuides::find( KoPoint &p, double diff )
{
TQValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
for ( ; it != m_guideLines[GL_SELECTED].end(); ++it )
diff --git a/lib/kofficeui/KoGuides.h b/lib/kofficeui/KoGuides.h
index 15d99ca2..b98b0472 100644
--- a/lib/kofficeui/KoGuides.h
+++ b/lib/kofficeui/KoGuides.h
@@ -351,7 +351,7 @@ private:
* @return the fould guide
* @return 0 if none is found
*/
- KoGuideLine * tqfind( KoPoint &p, double diff );
+ KoGuideLine * find( KoPoint &p, double diff );
/**
* @brief Move selected guides.
diff --git a/lib/kofficeui/KoInsertLink.cpp b/lib/kofficeui/KoInsertLink.cpp
index 947624b9..4c863935 100644
--- a/lib/kofficeui/KoInsertLink.cpp
+++ b/lib/kofficeui/KoInsertLink.cpp
@@ -129,25 +129,25 @@ void KoInsertLinkDia::setHrefLinkName(const TQString &_href, const TQString &_li
}
return;
}
- if(_href.tqfind("http://")!=-1 || _href.tqfind("https://")!=-1 ||_href.tqfind("ftp://")!=-1 )
+ if(_href.find("http://")!=-1 || _href.find("https://")!=-1 ||_href.find("ftp://")!=-1 )
{
internetLink->setHrefName(_href);
internetLink->setLinkName(_link);
showPage(0);
}
- else if(_href.tqfind("file:/")!=-1)
+ else if(_href.find("file:/")!=-1)
{
fileLink->setHrefName(_href);
fileLink->setLinkName(_link);
showPage(2);
}
- else if(_href.tqfind("mailto:")!=-1 || _href.tqfind("news:")!=-1)
+ else if(_href.find("mailto:")!=-1 || _href.find("news:")!=-1)
{
mailLink->setHrefName(_href);
mailLink->setLinkName(_link);
showPage(1);
}
- else if(_href.tqfind("bkm://")!=-1)
+ else if(_href.find("bkm://")!=-1)
{
if ( bookmarkLink )
{
@@ -259,7 +259,7 @@ TQString internetLinkPage::createInternetLink()
if(result.isEmpty())
return result;
- if(result.tqfind("http://")==-1 && result.tqfind("https://")==-1 && result.tqfind("ftp://")==-1)
+ if(result.find("http://")==-1 && result.find("https://")==-1 && result.find("ftp://")==-1)
result = "http://"+result;
return result;
}
@@ -332,7 +332,7 @@ TQString bookmarkLinkPage::createBookmarkLink()
if(result.isEmpty())
return result;
- if(result.tqfind("bkm://")==-1)
+ if(result.find("bkm://")==-1)
result = "bkm://"+result;
return result;
}
@@ -411,7 +411,7 @@ TQString mailLinkPage::createMailLink()
if(result.isEmpty())
return result;
- if(result.tqfind("mailto:")==-1 && result.tqfind("news:")==-1)
+ if(result.find("mailto:")==-1 && result.find("news:")==-1)
result = "mailto:"+result;
return result;
}
@@ -516,7 +516,7 @@ TQString fileLinkPage::createFileLink()
if(result.isEmpty())
return result;
- if(result.tqfind("file:/")==-1)
+ if(result.find("file:/")==-1)
result = "file://"+result;
return result;
}
diff --git a/lib/kofficeui/KoPartSelectAction.cpp b/lib/kofficeui/KoPartSelectAction.cpp
index 0e574725..d563e906 100644
--- a/lib/kofficeui/KoPartSelectAction.cpp
+++ b/lib/kofficeui/KoPartSelectAction.cpp
@@ -52,7 +52,7 @@ void KoPartSelectAction::init()
for( ; it != m_lstEntries.end(); ++it ) {
KService::Ptr serv = (*it).service();
if (!serv->genericName().isEmpty()) {
- KAction *action = new KAction( serv->genericName().tqreplace('&',"&&"), serv->icon(), 0,
+ KAction *action = new KAction( serv->genericName().replace('&',"&&"), serv->icon(), 0,
this, TQT_SLOT( slotActionActivated() ),
parentCollection(), serv->name().latin1() );
insert( action );
diff --git a/lib/kofficeui/KoRuler.cpp b/lib/kofficeui/KoRuler.cpp
index 8e936874..212becd7 100644
--- a/lib/kofficeui/KoRuler.cpp
+++ b/lib/kofficeui/KoRuler.cpp
@@ -843,7 +843,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e )
p.drawLine( pt_fr, 0, pt_fr, d->canvas->height() );
}
- KoTabulatorList::Iterator it = d->tabList.tqfind( d->currTab );
+ KoTabulatorList::Iterator it = d->tabList.find( d->currTab );
Q_ASSERT( it != d->tabList.end() );
if ( it != d->tabList.end() )
(*it).ptPos = newValue;
diff --git a/lib/kofficeui/KoTabBar.cpp b/lib/kofficeui/KoTabBar.cpp
index b2e7c94b..7c0beeeb 100644
--- a/lib/kofficeui/KoTabBar.cpp
+++ b/lib/kofficeui/KoTabBar.cpp
@@ -245,7 +245,7 @@ int KoTabBarPrivate::tabAt( const TQPoint& pos )
{
TQRect rect = tabRects[ i ];
if( rect.isNull() ) continue;
- if( rect.tqcontains( pos ) ) return i;
+ if( rect.contains( pos ) ) return i;
}
return -1; // not found
@@ -396,7 +396,7 @@ void KoTabBar::addTab( const TQString& text )
// removes a tab
void KoTabBar::removeTab( const TQString& text )
{
- int i = d->tabs.tqfindIndex( text );
+ int i = d->tabs.findIndex( text );
if ( i == -1 ) return;
if ( d->activeTab == i + 1 )
@@ -457,7 +457,7 @@ void KoTabBar::setTabs( const TQStringList& list )
if( !left.isNull() )
{
- d->firstTab = d->tabs.tqfindIndex( left ) + 1;
+ d->firstTab = d->tabs.findIndex( left ) + 1;
if( d->firstTab > (int)d->tabs.count() )
d->firstTab = 1;
if( d->firstTab <= 0 )
@@ -572,7 +572,7 @@ void KoTabBar::scrollLast()
void KoTabBar::ensureVisible( const TQString& tab )
{
- int i = d->tabs.tqfindIndex( tab );
+ int i = d->tabs.findIndex( tab );
if ( i == -1 )
return;
i++;
@@ -612,7 +612,7 @@ void KoTabBar::moveTab( unsigned tab, unsigned target )
void KoTabBar::setActiveTab( const TQString& text )
{
- int i = d->tabs.tqfindIndex( text );
+ int i = d->tabs.findIndex( text );
if ( i == -1 )
return;
@@ -729,7 +729,7 @@ TQSize KoTabBar::tqsizeHint() const
void KoTabBar::renameTab( const TQString& old_name, const TQString& new_name )
{
- TQStringList::Iterator it = d->tabs.tqfind( old_name );
+ TQStringList::Iterator it = d->tabs.find( old_name );
(*it) = new_name;
update();
diff --git a/lib/kofficeui/KoTemplateChooseDia.cpp b/lib/kofficeui/KoTemplateChooseDia.cpp
index bd7a63f8..280a875c 100644
--- a/lib/kofficeui/KoTemplateChooseDia.cpp
+++ b/lib/kofficeui/KoTemplateChooseDia.cpp
@@ -319,7 +319,7 @@ void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout
TQString s = value;
if ( s.endsWith("]") )
{
- int pos = s.tqfind("[");
+ int pos = s.find("[");
s = s.mid( pos + 1, s.length() - pos - 2);
}
KURL url(s);
diff --git a/lib/kofficeui/KoTemplateCreateDia.cpp b/lib/kofficeui/KoTemplateCreateDia.cpp
index 756c6e2a..213e694f 100644
--- a/lib/kofficeui/KoTemplateCreateDia.cpp
+++ b/lib/kofficeui/KoTemplateCreateDia.cpp
@@ -228,7 +228,7 @@ void KoTemplateCreateDia::slotOk() {
return;
}
- KoTemplateGroup *group=d->m_tree->tqfind(item->text(0));
+ KoTemplateGroup *group=d->m_tree->find(item->text(0));
if(!group) { // even safer
d->m_tree->writeTemplateTree();
KDialogBase::slotCancel();
@@ -254,7 +254,7 @@ void KoTemplateCreateDia::slotOk() {
icon+=".png";
// try to find the extension for the template file :P
- const int pos = m_file.tqfindRev( '.' );
+ const int pos = m_file.findRev( '.' );
TQString ext;
if ( pos > -1 )
ext = m_file.mid( pos );
@@ -278,7 +278,7 @@ void KoTemplateCreateDia::slotOk() {
kdDebug(30004) << "Trying to create template: " << d->m_name->text() << "URL=" << ".source/"+file+ext << " ICON=" << tmpIcon << endl;
KoTemplate *t=new KoTemplate(d->m_name->text(), TQString(), ".source/"+file+ext, tmpIcon, "", "", false, true);
if(!group->add(t)) {
- KoTemplate *existingTemplate=group->tqfind(d->m_name->text());
+ KoTemplate *existingTemplate=group->find(d->m_name->text());
if(existingTemplate && !existingTemplate->isHidden()) {
if(KMessageBox::warningYesNo(this, i18n("Do you really want to overwrite"
" the existing '%1' template?").
@@ -321,7 +321,7 @@ void KoTemplateCreateDia::slotOk() {
bool ready=false;
TQStringList tmp=group->dirs();
for(TQStringList::ConstIterator it=tmp.begin(); it!=tmp.end() && !ready; ++it) {
- if((*it).tqcontains(dir)==0) {
+ if((*it).contains(dir)==0) {
orig.setPath( (*it)+".directory" );
// Check if we can read the file
if( KIO::NetAccess::exists(orig, true, this) ) {
@@ -395,7 +395,7 @@ void KoTemplateCreateDia::slotAddGroup() {
const TQString name ( KInputDialog::getText( i18n("Add Group"), i18n("Enter group name:"), TQString(), &ok, this ) );
if(!ok)
return;
- KoTemplateGroup *group=d->m_tree->tqfind(name);
+ KoTemplateGroup *group=d->m_tree->find(name);
if(group && !group->isHidden())
{
KMessageBox::information( this, i18n("This name is already used."), i18n("Add Group") );
@@ -436,14 +436,14 @@ void KoTemplateCreateDia::slotRemove() {
}
if(item->depth()==0) {
- KoTemplateGroup *group=d->m_tree->tqfind(item->text(0));
+ KoTemplateGroup *group=d->m_tree->find(item->text(0));
if(group)
group->setHidden(true);
}
else {
bool done=false;
for(KoTemplateGroup *g=d->m_tree->first(); g!=0L && !done; g=d->m_tree->next()) {
- KoTemplate *t=g->tqfind(item->text(0));
+ KoTemplate *t=g->find(item->text(0));
if(t) {
t->setHidden(true);
done=true;
diff --git a/lib/kofficeui/KoToolBox.cpp b/lib/kofficeui/KoToolBox.cpp
index ca7db5a7..eea6a290 100644
--- a/lib/kofficeui/KoToolBox.cpp
+++ b/lib/kofficeui/KoToolBox.cpp
@@ -172,7 +172,7 @@ void KoToolBox::enableTools(bool enable)
}
m_buttonGroup->setEnabled(enable);
for (TQ_UINT32 i = 0; i < m_numberOfButtons; ++i) {
- m_buttonGroup->tqfind( i )->setEnabled( enable );
+ m_buttonGroup->find( i )->setEnabled( enable );
}
}
diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp
index 4b5b1b4d..9f500bb1 100644
--- a/lib/kofficeui/KoTooluButton.cpp
+++ b/lib/kofficeui/KoTooluButton.cpp
@@ -377,7 +377,7 @@ void KoColorPanel::paintEvent( TQPaintEvent* e )
if ( !m_colorMap.isEmpty() ) {
int currentRow = startRow, currentCol = startCol;
while ( currentRow < endRow && currentCol < endCol ) {
- TQMap<Position, TQColor>::ConstIterator it = m_colorMap.tqfind( Position( currentCol, currentRow ) );
+ TQMap<Position, TQColor>::ConstIterator it = m_colorMap.find( Position( currentCol, currentRow ) );
if( it != m_colorMap.end() )
p.fillRect( ( currentCol << 4 ) + 2, ( currentRow << 4 ) + 2, 12, 12, it.data() );
@@ -516,7 +516,7 @@ TQColor KoColorPanel::mapToColor( const TQPoint& point ) const
TQColor KoColorPanel::mapToColor( const KoColorPanel::Position& position ) const
{
- TQMap<Position, TQColor>::ConstIterator it = m_colorMap.tqfind( position );
+ TQMap<Position, TQColor>::ConstIterator it = m_colorMap.find( position );
if ( it != m_colorMap.end() )
return it.data();
return TQColor();
@@ -576,7 +576,7 @@ void KoColorPanel::updateFocusPosition( const Position& newPosition )
m_focusPosition = newPosition;
- TQMap<Position, TQColor>::ConstIterator it = m_colorMap.tqfind( m_focusPosition );
+ TQMap<Position, TQColor>::ConstIterator it = m_colorMap.find( m_focusPosition );
if ( it != m_colorMap.end() ) {
// draw at the new focus position
tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ),
@@ -588,7 +588,7 @@ void KoColorPanel::updateFocusPosition( const Position& newPosition )
void KoColorPanel::paint( const Position& position )
{
- TQMap<Position, TQColor>::ConstIterator it = m_colorMap.tqfind( position );
+ TQMap<Position, TQColor>::ConstIterator it = m_colorMap.find( position );
if ( it == m_colorMap.end() )
return;
@@ -852,7 +852,7 @@ void KoToolButton::buttonShift( int& dx, int& dy )
bool KoToolButton::hitArrow( const TQPoint& pos )
{
- return TQRect( width() - ARROW_WIDTH, 0, ARROW_WIDTH, height() ).tqcontains( pos );
+ return TQRect( width() - ARROW_WIDTH, 0, ARROW_WIDTH, height() ).contains( pos );
}
#include <KoTooluButton.moc>
diff --git a/lib/kofficeui/KoZoomAction.cpp b/lib/kofficeui/KoZoomAction.cpp
index 5455a159..bebe7055 100644
--- a/lib/kofficeui/KoZoomAction.cpp
+++ b/lib/kofficeui/KoZoomAction.cpp
@@ -60,7 +60,7 @@ void KoZoomAction::setZoom( const TQString& text )
const int val=regexp.cap(1).toInt( &ok );
//zoom : limit inferior=10
- if( ok && val>9 && list.tqcontains( val )==0 )
+ if( ok && val>9 && list.contains( val )==0 )
list.append( val );
}
@@ -73,7 +73,7 @@ void KoZoomAction::setZoom( const TQString& text )
setItems( values );
TQString zoomStr = i18n("%1%").tqarg( zoom );
- setCurrentItem( values.tqfindIndex( zoomStr ) );
+ setCurrentItem( values.findIndex( zoomStr ) );
}
void KoZoomAction::setZoom( int zoom )
@@ -106,7 +106,7 @@ void KoZoomAction::init()
values << i18n("%1%").tqarg("500");
setItems( values );
- setCurrentItem( values.tqfindIndex( i18n("%1%").tqarg( 100 ) ) );
+ setCurrentItem( values.findIndex( i18n("%1%").tqarg( 100 ) ) );
connect( this, TQT_SIGNAL( activated( const TQString& ) ),
TQT_SLOT( activated( const TQString& ) ) );
diff --git a/lib/kofficeui/tktoolbarbutton.cpp b/lib/kofficeui/tktoolbarbutton.cpp
index d3def7c9..fa36390e 100644
--- a/lib/kofficeui/tktoolbarbutton.cpp
+++ b/lib/kofficeui/tktoolbarbutton.cpp
@@ -332,7 +332,7 @@ bool TKToolBarButton::eventFilter(TQObject *o, TQEvent *ev)
case TQEvent::Hide:
on(false);
setDown(false);
- if ( !tqgeometry().tqcontains(parentWidget()->mapFromGlobal(TQCursor::pos())) )
+ if ( !tqgeometry().contains(parentWidget()->mapFromGlobal(TQCursor::pos())) )
leaveEvent(0L);
return false;
break;
diff --git a/lib/kopainter/koIconChooser.cc b/lib/kopainter/koIconChooser.cc
index 4c7aab32..06efc8cf 100644
--- a/lib/kopainter/koIconChooser.cc
+++ b/lib/kopainter/koIconChooser.cc
@@ -125,7 +125,7 @@ void KoIconChooser::addItem(KoIconItem *item)
bool KoIconChooser::removeItem(KoIconItem *item)
{
- int index = mIconList.tqfind(item);
+ int index = mIconList.find(item);
bool ok = mIconList.remove(item);
if( ok )
{
@@ -155,7 +155,7 @@ KoIconItem *KoIconChooser::currentItem()
// does NOT emit selected() (should it?)
void KoIconChooser::setCurrentItem(KoIconItem *item)
{
- int index = mIconList.tqfind(item);
+ int index = mIconList.find(item);
// item is available
if(index != -1 && mNCols > 0)
diff --git a/lib/kopainter/kogradientmanager.cc b/lib/kopainter/kogradientmanager.cc
index 242b5470..c95a5671 100644
--- a/lib/kopainter/kogradientmanager.cc
+++ b/lib/kopainter/kogradientmanager.cc
@@ -38,7 +38,7 @@ KoGradientManager::~KoGradientManager()
KoGradient* KoGradientManager::loadGradient(const TQString& filename)
{
TQString strExt;
- const int result=filename.tqfindRev('.');
+ const int result=filename.findRev('.');
if (result>=0)
{
strExt=filename.mid(result).lower();
@@ -466,7 +466,7 @@ KoGradient* KoGradientManager::parseSvgGradient(const TQDomElement& element)
TQColor c;
float off;
TQString temp = colorstop.attribute( "offset" );
- if( temp.tqcontains( '%' ) )
+ if( temp.contains( '%' ) )
{
temp = temp.left( temp.length() - 1 );
off = temp.toFloat() / 100.0;
@@ -521,19 +521,19 @@ void KoGradientManager::parseSvgColor(TQColor &color, const TQString &s)
TQString g = colors[1];
TQString b = colors[2].left( ( colors[2].length() - 1 ) );
- if( r.tqcontains( "%" ) )
+ if( r.contains( "%" ) )
{
r = r.left( r.length() - 1 );
r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) );
}
- if( g.tqcontains( "%" ) )
+ if( g.contains( "%" ) )
{
g = g.left( g.length() - 1 );
g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) );
}
- if( b.tqcontains( "%" ) )
+ if( b.contains( "%" ) )
{
b = b.left( b.length() - 1 );
b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) );
diff --git a/lib/kopainter/svgpathparser.cc b/lib/kopainter/svgpathparser.cc
index 1bdc3095..9295cdd2 100644
--- a/lib/kopainter/svgpathparser.cc
+++ b/lib/kopainter/svgpathparser.cc
@@ -93,7 +93,7 @@ SVGPathParser::parseSVG( const TQString &s, bool process )
if( !s.isEmpty() )
{
TQString d = s;
- d = d.tqreplace( ',', ' ' );
+ d = d.replace( ',', ' ' );
d = d.simplifyWhiteSpace();
const char *ptr = d.latin1();
diff --git a/lib/kopalette/kopalettemanager.cc b/lib/kopalette/kopalettemanager.cc
index 839a6187..94ea8d4d 100644
--- a/lib/kopalette/kopalettemanager.cc
+++ b/lib/kopalette/kopalettemanager.cc
@@ -141,7 +141,7 @@ void KoPaletteManager::addWidget(TQWidget * widget,
TQString pname = paletteName;
- TQWidget * w = m_widgets->tqfind(name);
+ TQWidget * w = m_widgets->find(name);
if (w != 0 )
{
removeWidget(name);
@@ -157,7 +157,7 @@ void KoPaletteManager::addWidget(TQWidget * widget,
visible = cfg->readBoolEntry("visible");
}
- KoPalette * palette = m_palettes->tqfind(pname);
+ KoPalette * palette = m_palettes->find(pname);
if (palette == 0) {
palette = createPalette(pname, widget->caption(), style);
@@ -181,11 +181,11 @@ void KoPaletteManager::addWidget(TQWidget * widget,
m_defaultWidgetOrder.append(name);
// Find out the hidden state
- if(m_widgetNames->tqcontains(name))
+ if(m_widgetNames->contains(name))
{
// The widget has already been added (and removed) during this session
- if(m_hiddenWidgets.tqcontains(name))
+ if(m_hiddenWidgets.contains(name))
palette->hidePage( widget );
else
{
@@ -241,13 +241,13 @@ void KoPaletteManager::slotReset()
for (it = m_defaultWidgetOrder.begin(); it != m_defaultWidgetOrder.end(); ++it) {
TQString widgetName = *it;
- TQWidget * w = m_widgets->tqfind(widgetName);
+ TQWidget * w = m_widgets->find(widgetName);
if (!w) {
continue;
}
- TQString paletteName = *m_defaultMapping->tqfind(widgetName);
- KoPalette * p = m_palettes->tqfind(paletteName);
+ TQString paletteName = *m_defaultMapping->find(widgetName);
+ KoPalette * p = m_palettes->find(paletteName);
if (p == 0) {
// Funny -- we should have a consistent set of palettes without holes!
@@ -271,48 +271,48 @@ void KoPaletteManager::slotResetFont()
TQWidget * KoPaletteManager::widget(const TQString & name)
{
- return m_widgets->tqfind(name);
+ return m_widgets->find(name);
}
void KoPaletteManager::showWidget(const TQString & name)
{
- TQWidget * w = m_widgets->tqfind(name);
+ TQWidget * w = m_widgets->find(name);
if (!w) return;
- TQString pname = *m_currentMapping->tqfind(name);
+ TQString pname = *m_currentMapping->find(name);
if (pname.isNull()) return;
- KoPalette * p = m_palettes->tqfind(pname);
+ KoPalette * p = m_palettes->find(pname);
p->showPage(w);
- KToggleAction * a = m_actions->tqfind(name);
+ KToggleAction * a = m_actions->find(name);
a->setChecked(true);
}
void KoPaletteManager::hideWidget(const TQString & name)
{
- TQWidget * w = m_widgets->tqfind(name);
+ TQWidget * w = m_widgets->find(name);
if (!w) return;
- TQString pname = *m_currentMapping->tqfind(name);
+ TQString pname = *m_currentMapping->find(name);
if (pname.isNull()) return;
- KoPalette * p = m_palettes->tqfind(pname);
+ KoPalette * p = m_palettes->find(pname);
p->hidePage(w);
- KToggleAction * a = m_actions->tqfind(name);
+ KToggleAction * a = m_actions->find(name);
a->setChecked(false);
}
void KoPaletteManager::removeWidget(const TQString & name)
{
- TQString palette = *(m_currentMapping->tqfind(name));
+ TQString palette = *(m_currentMapping->find(name));
if (palette.isNull()) return;
- TQWidget * w = m_widgets->tqfind(name);
+ TQWidget * w = m_widgets->find(name);
if (!w) return;
- KoPalette * p = m_palettes->tqfind(palette);
+ KoPalette * p = m_palettes->find(palette);
if (!p) return;
p->showPage(w);
@@ -331,7 +331,7 @@ KoPalette * KoPaletteManager::createPalette(const TQString & name, const TQStrin
KoPalette * palette = 0;
- palette = m_palettes->tqfind(name);
+ palette = m_palettes->find(name);
if (palette) return palette;
@@ -362,7 +362,7 @@ KoPalette * KoPaletteManager::createPalette(const TQString & name, const TQStrin
void KoPaletteManager::placePalette(const TQString & name, TQt::Dock location)
{
Q_ASSERT(!name.isNull());
- KoPalette * palette = m_palettes->tqfind(name);
+ KoPalette * palette = m_palettes->find(name);
if (!palette) return;
@@ -441,9 +441,9 @@ void KoPaletteManager::slotTogglePalette(int paletteIndex)
{
// Toggle the right palette
TQString name = *m_widgetNames->at(paletteIndex);
- TQWidget * w = m_widgets->tqfind(name);
- TQString pname = *m_currentMapping->tqfind(name);
- KoPalette * p = m_palettes->tqfind(pname);
+ TQWidget * w = m_widgets->find(name);
+ TQString pname = *m_currentMapping->find(name);
+ KoPalette * p = m_palettes->find(pname);
p->togglePageHidden( w );
m_hiddenWidgets.clear();
@@ -457,12 +457,12 @@ void KoPaletteManager::slotToggleAllPalettes()
while(!m_hiddenWidgets.isEmpty())
{
TQString name = m_hiddenWidgets.pop();
- TQWidget *w = m_widgets->tqfind(name);
- KToggleAction * a = m_actions->tqfind(name);
+ TQWidget *w = m_widgets->find(name);
+ KToggleAction * a = m_actions->find(name);
a->setChecked(true);
- TQString pname = *m_currentMapping->tqfind(name);
- KoPalette * p = m_palettes->tqfind(pname);
+ TQString pname = *m_currentMapping->find(name);
+ KoPalette * p = m_palettes->find(pname);
p->showPage(w);
}
}
@@ -473,14 +473,14 @@ void KoPaletteManager::slotToggleAllPalettes()
TQDictIterator<TQWidget> it(*m_widgets);
for (; it.current(); ++it)
{
- KToggleAction * a = m_actions->tqfind(it.currentKey());
+ KToggleAction * a = m_actions->find(it.currentKey());
if(a->isChecked())
{
a->setChecked(false);
m_hiddenWidgets.push(it.currentKey());
- TQString pname = *m_currentMapping->tqfind(it.currentKey());
- KoPalette * p = m_palettes->tqfind(pname);
+ TQString pname = *m_currentMapping->find(it.currentKey());
+ KoPalette * p = m_palettes->find(pname);
p->hidePage(it.current());
}
}
@@ -570,7 +570,7 @@ void KoPaletteManager::save()
TQStringList::iterator it;
bool inserted = false;
for (it = paletteList.begin(); it != paletteList.end(); ++it) {
- KoPalette * p2 = m_palettes->tqfind((*it));
+ KoPalette * p2 = m_palettes->find((*it));
if (p2->y() > p->y()) {
paletteList.insert(it, itP.currentKey());
inserted = true;
@@ -592,15 +592,15 @@ void KoPaletteManager::save()
TQDictIterator<TQWidget> itW(*m_widgets);
for (; itW.current(); ++itW) {
cfg->setGroup("palettetab-" + itW.currentKey());
- TQString pname = *m_currentMapping->tqfind(itW.currentKey());
- KoPalette * p = m_palettes->tqfind(pname);
+ TQString pname = *m_currentMapping->find(itW.currentKey());
+ KoPalette * p = m_palettes->find(pname);
TQWidget * w = itW.current();
cfg->writeEntry("docker", pname);
if(palettesShown)
cfg->writeEntry("visible", !p->isHidden(w));
else
- if(m_hiddenWidgets.tqcontains(itW.currentKey()))
+ if(m_hiddenWidgets.contains(itW.currentKey()))
cfg->writeEntry("visible", true);
else
cfg->writeEntry("visible", false);
diff --git a/lib/kopalette/kotabpalette.cc b/lib/kopalette/kotabpalette.cc
index 972a8144..c1b7a8a2 100644
--- a/lib/kopalette/kotabpalette.cc
+++ b/lib/kopalette/kotabpalette.cc
@@ -70,9 +70,9 @@ void KoTabPalette::unplug(const TQWidget * w)
void KoTabPalette::showPage(TQWidget *w)
{
m_page->showPage(w);
- if (m_hiddenPages.tqfind(w) == m_hiddenPages.end()) return;
+ if (m_hiddenPages.find(w) == m_hiddenPages.end()) return;
- int i = *m_hiddenPages.tqfind(w);
+ int i = *m_hiddenPages.find(w);
m_page->insertTab(w, w->caption(), i);
m_hiddenPages.erase(w);
show();
@@ -89,7 +89,7 @@ void KoTabPalette::makeVisible(bool v)
int KoTabPalette::indexOf(TQWidget *w)
{
- if (m_hiddenPages.tqfind(w) != m_hiddenPages.end()) {
+ if (m_hiddenPages.find(w) != m_hiddenPages.end()) {
int i = m_page->indexOf(w);
return -i;
}
@@ -100,12 +100,12 @@ int KoTabPalette::indexOf(TQWidget *w)
bool KoTabPalette::isHidden(TQWidget * w)
{
- return (m_hiddenPages.tqfind(w) != m_hiddenPages.end());
+ return (m_hiddenPages.find(w) != m_hiddenPages.end());
}
void KoTabPalette::hidePage( TQWidget *w)
{
- if (m_hiddenPages.tqfind(w) != m_hiddenPages.end()) return;
+ if (m_hiddenPages.find(w) != m_hiddenPages.end()) return;
int i = m_page->indexOf(w);
m_page->removePage(w);
@@ -117,8 +117,8 @@ void KoTabPalette::hidePage( TQWidget *w)
void KoTabPalette::togglePageHidden(TQWidget *w)
{
- if (m_hiddenPages.tqfind(w) != m_hiddenPages.end()) {
- int i = *m_hiddenPages.tqfind(w);
+ if (m_hiddenPages.find(w) != m_hiddenPages.end()) {
+ int i = *m_hiddenPages.find(w);
m_page->insertTab(w, w->caption(), i);
m_hiddenPages.erase(w);
show();
diff --git a/lib/kopalette/kotoolboxpalette.cc b/lib/kopalette/kotoolboxpalette.cc
index c41382cf..2ba9f3bb 100644
--- a/lib/kopalette/kotoolboxpalette.cc
+++ b/lib/kopalette/kotoolboxpalette.cc
@@ -65,7 +65,7 @@ void KoToolBoxPalette::showPage(TQWidget *w)
int KoToolBoxPalette::indexOf(TQWidget *w)
{
- if (m_hiddenPages.tqfind(w) != m_hiddenPages.end()) {
+ if (m_hiddenPages.find(w) != m_hiddenPages.end()) {
return m_page->indexOf(w);
}
else {
@@ -86,13 +86,13 @@ void KoToolBoxPalette::makeVisible(bool v)
bool KoToolBoxPalette::isHidden(TQWidget * w)
{
- return (m_hiddenPages.tqfind(w) != m_hiddenPages.end());
+ return (m_hiddenPages.find(w) != m_hiddenPages.end());
}
void KoToolBoxPalette::togglePageHidden(TQWidget *w)
{
- if (m_hiddenPages.tqfind(w) != m_hiddenPages.end()) {
- int i = *m_hiddenPages.tqfind(w);
+ if (m_hiddenPages.find(w) != m_hiddenPages.end()) {
+ int i = *m_hiddenPages.find(w);
m_page->insertItem(i, w, w->caption());
show();
}
@@ -109,7 +109,7 @@ void KoToolBoxPalette::togglePageHidden(TQWidget *w)
void KoToolBoxPalette::hidePage( TQWidget * w)
{
- if (m_hiddenPages.tqfind(w) != m_hiddenPages.end()) return;
+ if (m_hiddenPages.find(w) != m_hiddenPages.end()) return;
int i = m_page->indexOf(w);
m_page->removeItem(w);
m_hiddenPages[w] = i;
diff --git a/lib/koproperty/editor.cpp b/lib/koproperty/editor.cpp
index 3c0a0940..f15cab20 100644
--- a/lib/koproperty/editor.cpp
+++ b/lib/koproperty/editor.cpp
@@ -250,7 +250,7 @@ Editor::fill()
void
Editor::addItem(const TQCString &name, EditorItem *tqparent)
{
- if(!d->set || !d->set->tqcontains(name))
+ if(!d->set || !d->set->contains(name))
return;
Property *property = &(d->set->property(name));
@@ -950,7 +950,7 @@ Editor::handleKeyPress(TQKeyEvent* ev)
else if( (s==Qt::NoButton) && (k==Key_Home) ) {
if (d->currentWidget && d->currentWidget->hasFocus())
return false;
- //tqfind 1st visible
+ //find 1st visible
item = firstChild();
while (item && (!item->isSelectable() || !item->isVisible()))
item = item->itemBelow();
diff --git a/lib/koproperty/editoritem.cpp b/lib/koproperty/editoritem.cpp
index ca6fe6c7..1c0e1b72 100644
--- a/lib/koproperty/editoritem.cpp
+++ b/lib/koproperty/editoritem.cpp
@@ -239,7 +239,7 @@ void GroupContainer::setContents( TQWidget* contents )
bool GroupContainer::event( TQEvent * e ) {
if (e->type()==TQEvent::MouseButtonPress) {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e);
- if (me->button() == Qt::LeftButton && d->contents && TQT_TQRECT_OBJECT(d->groupWidget->rect()).tqcontains(me->pos())) {
+ if (me->button() == Qt::LeftButton && d->contents && TQT_TQRECT_OBJECT(d->groupWidget->rect()).contains(me->pos())) {
d->groupWidget->setOpen(!d->groupWidget->isOpen());
if (d->groupWidget->isOpen())
d->contents->show();
diff --git a/lib/koproperty/editors/combobox.cpp b/lib/koproperty/editors/combobox.cpp
index f1206f2d..661aa1e0 100644
--- a/lib/koproperty/editors/combobox.cpp
+++ b/lib/koproperty/editors/combobox.cpp
@@ -71,7 +71,7 @@ ComboBox::value() const
if (idx<0 || idx>=(int)property()->listData()->keys.count())
return TQVariant();
return TQVariant( property()->listData()->keys[idx] );
-// if(property()->listData() && property()->listData()->tqcontains(m_edit->currentText()))
+// if(property()->listData() && property()->listData()->contains(m_edit->currentText()))
// return (*(property()->valueList()))[m_edit->currentText()];
// return TQVariant();
}
@@ -85,7 +85,7 @@ ComboBox::setValue(const TQVariant &value, bool emitChange)
}
if (!m_setValueEnabled)
return;
- int idx = property()->listData()->keys.tqfindIndex( value );
+ int idx = property()->listData()->keys.findIndex( value );
if (idx>=0 && idx<m_edit->count()) {
m_edit->setCurrentItem(idx);
}
@@ -120,7 +120,7 @@ ComboBox::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, cons
{
TQString txt;
if (property()->listData()) {
- const int idx = property()->listData()->keys.tqfindIndex( value );
+ const int idx = property()->listData()->keys.findIndex( value );
if (idx>=0)
txt = property()->listData()->names[ idx ];
}
diff --git a/lib/koproperty/editors/pixmapedit.cpp b/lib/koproperty/editors/pixmapedit.cpp
index 95cdbb9d..edc19c80 100644
--- a/lib/koproperty/editors/pixmapedit.cpp
+++ b/lib/koproperty/editors/pixmapedit.cpp
@@ -104,7 +104,7 @@ PixmapEdit::setValue(const TQVariant &value, bool emitChange)
}
else {
TQImage img(m_pixmap.convertToImage());
- if (!TQRect(TQPoint(0,0), m_edit->size()*3).tqcontains(m_pixmap.rect())) {
+ if (!TQRect(TQPoint(0,0), m_edit->size()*3).contains(m_pixmap.rect())) {
img = img.smoothScale(m_edit->size()*3, TQ_ScaleMin);
m_previewPixmap.convertFromImage(img);//preview pixmap is a bit larger
}
diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp
index c72a060d..8ae4e30a 100644
--- a/lib/koproperty/editors/spinbox.cpp
+++ b/lib/koproperty/editors/spinbox.cpp
@@ -291,7 +291,7 @@ DoubleEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, co
}
}
if (valueText.isEmpty())
- valueText = TQString(value.toString()).tqreplace('.', KGlobal::locale()->decimalSymbol());
+ valueText = TQString(value.toString()).replace('.', KGlobal::locale()->decimalSymbol());
Widget::drawViewer(p, cg, r, valueText);
// p->eraseRect(r);
diff --git a/lib/koproperty/factory.cpp b/lib/koproperty/factory.cpp
index a042ca28..864d4895 100644
--- a/lib/koproperty/factory.cpp
+++ b/lib/koproperty/factory.cpp
@@ -104,10 +104,10 @@ FactoryManager::registerFactoryForEditor(int editorType, CustomPropertyFactory *
{
if(!widgetFactory)
return;
- if(d->registeredWidgets.tqfind(editorType))
+ if(d->registeredWidgets.find(editorType))
kopropertywarn << "FactoryManager::registerFactoryForEditor(): "
"Overriding already registered custom widget type \"" << editorType << "\"" << endl;
- d->registeredWidgets.tqreplace(editorType, widgetFactory);
+ d->registeredWidgets.replace(editorType, widgetFactory);
}
void
@@ -121,7 +121,7 @@ FactoryManager::registerFactoryForEditors(const TQValueList<int> &editorTypes, C
CustomPropertyFactory *
FactoryManager::factoryForEditorType(int type)
{
- return d->registeredWidgets.tqfind(type);
+ return d->registeredWidgets.find(type);
}
Widget*
@@ -132,7 +132,7 @@ FactoryManager::createWidgetForProperty(Property *property)
const int type = property->type();
- CustomPropertyFactory *factory = d->registeredWidgets.tqfind(type);
+ CustomPropertyFactory *factory = d->registeredWidgets.find(type);
if (factory)
return factory->createCustomWidget(property);
@@ -224,11 +224,11 @@ FactoryManager::registerFactoryForProperty(int propertyType, CustomPropertyFacto
{
if(!factory)
return;
- if(d->registeredCustomProperties.tqfind(propertyType))
+ if(d->registeredCustomProperties.find(propertyType))
kopropertywarn << "FactoryManager::registerFactoryForProperty(): "
"Overriding already registered custom property type \"" << propertyType << "\"" << endl;
- d->registeredCustomProperties.tqreplace(propertyType, factory);
+ d->registeredCustomProperties.replace(propertyType, factory);
}
void
@@ -244,7 +244,7 @@ CustomProperty*
FactoryManager::createCustomProperty(Property *tqparent)
{
const int type = tqparent->type();
- CustomPropertyFactory *factory = d->registeredWidgets.tqfind(type);
+ CustomPropertyFactory *factory = d->registeredWidgets.find(type);
if (factory)
return factory->createCustomProperty(tqparent);
diff --git a/lib/koproperty/property.cpp b/lib/koproperty/property.cpp
index 87d12a6d..0add7b91 100644
--- a/lib/koproperty/property.cpp
+++ b/lib/koproperty/property.cpp
@@ -529,7 +529,7 @@ Property::setOption(const char* name, const TQVariant& val)
TQVariant
Property::option(const char* name) const
{
- if (d->options.tqcontains(name))
+ if (d->options.contains(name))
return d->options[name];
return TQVariant();
}
@@ -685,7 +685,7 @@ Property::addSet(Set *set)
}
if ((Set*)d->set==set)
return;
- TQGuardedPtr<Set> *pset = d->sets ? d->sets->tqfind(set) : 0;
+ TQGuardedPtr<Set> *pset = d->sets ? d->sets->find(set) : 0;
if (pset && (Set*)*pset == set)
return;
if (!d->sets) {
@@ -693,7 +693,7 @@ Property::addSet(Set *set)
d->sets->setAutoDelete(true);
}
- d->sets->tqreplace(set, new TQGuardedPtr<Set>( set ));
+ d->sets->replace(set, new TQGuardedPtr<Set>( set ));
// TQValueList<Set*>::iterator it = tqFind( d->sets.begin(), d->sets.end(), set);
// if(it == d->sets.end()) // not in our list
diff --git a/lib/koproperty/set.cpp b/lib/koproperty/set.cpp
index 3193a50f..d508fc0a 100644
--- a/lib/koproperty/set.cpp
+++ b/lib/koproperty/set.cpp
@@ -73,7 +73,7 @@ class SetPrivate
inline KoProperty::Property& property(const TQCString &name) const
{
- KoProperty::Property *p = dict.tqfind(name);
+ KoProperty::Property *p = dict.find(name);
if (p)
return *p;
Set_nonConstNull.setName(0); //to ensure returned property is null
@@ -178,7 +178,7 @@ Set::addPropertyInternal(Property *property, TQCString group, bool updateSorting
return;
}
- Property *p = d->dict.tqfind(property->name());
+ Property *p = d->dict.find(property->name());
if(p) {
p->addRelatedProperty(property);
}
@@ -218,7 +218,7 @@ Set::removeProperty(const TQCString &name)
if(name.isNull())
return;
- Property *p = d->dict.tqfind(name);
+ Property *p = d->dict.find(name);
removeProperty(p);
}
@@ -255,10 +255,10 @@ Set::addToGroup(const TQCString &group, Property *property)
return;
//do not add the same property to the group twice
- if(d->groupForProperty.tqcontains(property) && (d->groupForProperty[property] == group))
+ if(d->groupForProperty.contains(property) && (d->groupForProperty[property] == group))
return;
- if(!d->propertiesOfGroup.tqcontains(group)) { // group doesn't exist
+ if(!d->propertiesOfGroup.contains(group)) { // group doesn't exist
TQValueList<TQCString> l;
l.append(property->name());
d->propertiesOfGroup.insert(group, l);
@@ -280,7 +280,7 @@ Set::removeFromGroup(Property *property)
if (d->propertiesOfGroup[group].isEmpty()) {
//remove group as well
d->propertiesOfGroup.remove(group);
- TQValueListIterator<TQCString> it = d->groupNames.tqfind(group);
+ TQValueListIterator<TQCString> it = d->groupNames.find(group);
if (it != d->groupNames.end()) {
d->groupNames.remove(it);
}
@@ -309,7 +309,7 @@ Set::setGroupDescription(const TQCString &group, const TQString& desc)
TQString
Set::groupDescription(const TQCString &group) const
{
- if(d->groupDescriptions.tqcontains(group))
+ if(d->groupDescriptions.contains(group))
return d->groupDescriptions[group];
return group;
}
@@ -353,9 +353,9 @@ Set::setReadOnly(bool readOnly)
}
bool
-Set::tqcontains(const TQCString &name) const
+Set::contains(const TQCString &name) const
{
- return d->dict.tqfind(name);
+ return d->dict.find(name);
}
Property&
@@ -497,7 +497,7 @@ void Buffer::intersectedChanged(KoProperty::Set& set, KoProperty::Property& prop
{
Q_UNUSED(set);
TQCString propertyName = prop.name();
- if ( !tqcontains( propertyName ) )
+ if ( !contains( propertyName ) )
return;
const TQValueList<Property*> *props = prop.related();
@@ -511,7 +511,7 @@ void Buffer::intersectedReset(KoProperty::Set& set, KoProperty::Property& prop)
{
Q_UNUSED(set);
TQCString propertyName = prop.name();
- if ( !tqcontains( propertyName ) )
+ if ( !contains( propertyName ) )
return;
const TQValueList<Property*> *props = prop.related();
diff --git a/lib/koproperty/set.h b/lib/koproperty/set.h
index 567bcdad..9004c2c4 100644
--- a/lib/koproperty/set.h
+++ b/lib/koproperty/set.h
@@ -107,7 +107,7 @@ class KOPROPERTY_EXPORT Set : public TQObject
void setReadOnly(bool readOnly);
/*! \return true if the set contains property names \a name. */
- bool tqcontains(const TQCString &name) const;
+ bool contains(const TQCString &name) const;
/*! \return property named with \a name. If no such property is found,
null property (Property::null) is returned. */
@@ -116,12 +116,12 @@ class KOPROPERTY_EXPORT Set : public TQObject
/*! Accesses a property by it's name.
Property reference is returned, so all property modifications are allowed.
If there is no such property, null property is returned,
- so it's good practice to use tqcontains() is you're unsure if the property exists.
+ so it's good practice to use contains() is you're unsure if the property exists.
For example, to set a value of a property, use:
/code
Set set;
...
- if (!set.tqcontains("myProperty")) {
+ if (!set.contains("myProperty")) {
dosomething;
}
set["myProperty"].setValue("My Value");
diff --git a/lib/kotext/DateFormatWidget.cpp b/lib/kotext/DateFormatWidget.cpp
index bff1f86c..0c1b3575 100644
--- a/lib/kotext/DateFormatWidget.cpp
+++ b/lib/kotext/DateFormatWidget.cpp
@@ -155,7 +155,7 @@ TQString DateFormatWidget::resultString()
{
const TQString lookup(combo1->currentText());
const TQStringList listTranslated( KoVariableDateFormat::staticTranslatedFormatPropsList() );
- const int index = listTranslated.tqfindIndex(lookup);
+ const int index = listTranslated.findIndex(lookup);
if (index==-1)
return (lookup); // Either costum or non-locale
diff --git a/lib/kotext/KFontDialog_local.cpp b/lib/kotext/KFontDialog_local.cpp
index bcbdde6b..6dbb498f 100644
--- a/lib/kotext/KFontDialog_local.cpp
+++ b/lib/kotext/KFontDialog_local.cpp
@@ -287,7 +287,7 @@ KFontChooser_local::KFontChooser_local(TQWidget *tqparent, const char *name,
connect( sizeListBox, TQT_SIGNAL(highlighted(const TQString&)),
TQT_SLOT(size_chosen_slot(const TQString&)) );
- sizeListBox->setSelected(sizeListBox->tqfindItem(TQString::number(10)), true); // default to 10pt.
+ sizeListBox->setSelected(sizeListBox->findItem(TQString::number(10)), true); // default to 10pt.
row ++;
@@ -478,13 +478,13 @@ void KFontChooser_local::family_chosen_slot(const TQString& family)
currentStyles.clear();
for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
TQString style = *it;
- int pos = style.tqfind("Plain");
- if(pos >=0) style = style.tqreplace(pos,5,i18n("Regular"));
- pos = style.tqfind("Normal");
- if(pos >=0) style = style.tqreplace(pos,6,i18n("Regular"));
- pos = style.tqfind("Oblique");
- if(pos >=0) style = style.tqreplace(pos,7,i18n("Italic"));
- if(!styleListBox->tqfindItem(style)) {
+ int pos = style.find("Plain");
+ if(pos >=0) style = style.replace(pos,5,i18n("Regular"));
+ pos = style.find("Normal");
+ if(pos >=0) style = style.replace(pos,6,i18n("Regular"));
+ pos = style.find("Oblique");
+ if(pos >=0) style = style.replace(pos,7,i18n("Italic"));
+ if(!styleListBox->findItem(style)) {
styleListBox->insertItem(i18n(style.utf8()));
currentStyles.insert(i18n(style.utf8()), *it);
}
@@ -495,9 +495,9 @@ void KFontChooser_local::family_chosen_slot(const TQString& family)
}
styleListBox->blockSignals(true);
- TQListBoxItem *item = styleListBox->tqfindItem(selectedStyle);
+ TQListBoxItem *item = styleListBox->findItem(selectedStyle);
if (item)
- styleListBox->setSelected(styleListBox->tqfindItem(selectedStyle), true);
+ styleListBox->setSelected(styleListBox->findItem(selectedStyle), true);
else
styleListBox->setSelected(0, true);
styleListBox->blockSignals(false);
@@ -551,7 +551,7 @@ void KFontChooser_local::style_chosen_slot(const TQString& style)
fillSizeList();
}
sizeListBox->blockSignals(true);
- sizeListBox->setSelected(sizeListBox->tqfindItem(TQString::number(selectedSize)), true);
+ sizeListBox->setSelected(sizeListBox->findItem(TQString::number(selectedSize)), true);
sizeListBox->blockSignals(false);
sizeListBox->ensureCurrentVisible();
@@ -598,9 +598,9 @@ void KFontChooser_local::setupDisplay()
// 1st Fallback
if ( (i == numEntries) )
{
- if (family.tqcontains('['))
+ if (family.contains('['))
{
- family = family.left(family.tqfind('[')).stripWhiteSpace();
+ family = family.left(family.find('[')).stripWhiteSpace();
for (i = 0; i < numEntries; i++) {
if (family == familyListBox->text(i).lower()) {
familyListBox->setCurrentItem(i);
@@ -697,10 +697,10 @@ void KFontChooser_local::addFont( TQStringList &list, const char *xfont )
TQString font = TQString::tqfromLatin1(ptr + 1);
int pos;
- if ( ( pos = font.tqfind( '-' ) ) > 0 ) {
+ if ( ( pos = font.find( '-' ) ) > 0 ) {
font.truncate( pos );
- if ( font.tqfind( TQString::tqfromLatin1("open look"), 0, false ) >= 0 )
+ if ( font.find( TQString::tqfromLatin1("open look"), 0, false ) >= 0 )
return;
TQStringList::Iterator it = list.begin();
diff --git a/lib/kotext/KoAutoFormat.cpp b/lib/kotext/KoAutoFormat.cpp
index b6529b8f..dfe6c6df 100644
--- a/lib/kotext/KoAutoFormat.cpp
+++ b/lib/kotext/KoAutoFormat.cpp
@@ -75,8 +75,8 @@ void KoCompletionBox::setLastWord( TQString const &lastword)
m_lastWord = lastword;
}
-KoAutoFormatEntry::KoAutoFormatEntry(const TQString& tqreplace)
- : m_tqreplace( tqreplace )
+KoAutoFormatEntry::KoAutoFormatEntry(const TQString& replace)
+ : m_replace( replace )
{
m_formatOptions= 0L;
}
@@ -296,11 +296,11 @@ void KoAutoFormat::readConfig(bool force)
TQString beginDoubleQuote = config->readEntry( "TypographicQuotesBegin" );
TQString endDoubleQuote = config->readEntry( "TypographicQuotesEnd" );
- m_typographicDoubleQuotes.tqreplace = config->readBoolEntry( "TypographicQuotesEnabled", false );
+ m_typographicDoubleQuotes.replace = config->readBoolEntry( "TypographicQuotesEnabled", false );
TQString begin = config->readEntry( "TypographicSimpleQuotesBegin" );
TQString end = config->readEntry( "TypographicSimpleQuotesEnd" );
- m_typographicSimpleQuotes.tqreplace = config->readBoolEntry( "TypographicSimpleQuotesEnabled", false );
+ m_typographicSimpleQuotes.replace = config->readBoolEntry( "TypographicSimpleQuotesEnabled", false );
m_bAutoSuperScript = config->readBoolEntry( "AutoSuperScript", true );
@@ -352,7 +352,7 @@ void KoAutoFormat::readConfig(bool force)
else
m_typographicDoubleQuotes.end = endDoubleQuote[0];
- m_typographicDoubleQuotes.tqreplace = m_typographicDoubleQuotes.tqreplace
+ m_typographicDoubleQuotes.replace = m_typographicDoubleQuotes.replace
&& !m_typographicDoubleQuotes.begin.isNull()
&& !m_typographicDoubleQuotes.end.isNull();
@@ -377,7 +377,7 @@ void KoAutoFormat::readConfig(bool force)
else
m_typographicSimpleQuotes.end = end[0];
- m_typographicSimpleQuotes.tqreplace = m_typographicSimpleQuotes.tqreplace
+ m_typographicSimpleQuotes.replace = m_typographicSimpleQuotes.replace
&& !m_typographicSimpleQuotes.end.isNull()
&& !m_typographicSimpleQuotes.begin.isNull();
@@ -404,7 +404,7 @@ void KoAutoFormat::readAutoCorrectConfig()
{
if ( fname.isEmpty() && !kdelang.isEmpty() )
fname = locate( "data", "koffice/autocorrect/" + kdelang + ".xml", m_doc->instance() );
- if ( fname.isEmpty() && kdelang.tqcontains("_") )
+ if ( fname.isEmpty() && kdelang.contains("_") )
{
kdelang.remove( TQRegExp( "_.*" ) );
fname = locate( "data", "koffice/autocorrect/" + kdelang + ".xml", m_doc->instance() );
@@ -456,7 +456,7 @@ void KoAutoFormat::readAutoCorrectConfig()
for(uint i = 0; i < nl.count() ; i++) {
//bug in qmap we overwrite = false doesn't work
//so we can't add multiple "othernb"
- m_superScriptEntries.insert( nl.item(i).toElement().attribute("tqfind"), KoAutoFormatEntry(nl.item(i).toElement().attribute("super")),FALSE );
+ m_superScriptEntries.insert( nl.item(i).toElement().attribute("find"), KoAutoFormatEntry(nl.item(i).toElement().attribute("super")),FALSE );
}
}
@@ -527,7 +527,7 @@ void KoAutoFormat::loadAutoCorrection( const TQDomElement & _de, bool _allLangua
void KoAutoFormat::loadEntry( const TQDomElement &nl, bool _allLanguages)
{
- KoAutoFormatEntry *tmp =new KoAutoFormatEntry(nl.attribute("tqreplace"));
+ KoAutoFormatEntry *tmp =new KoAutoFormatEntry(nl.attribute("replace"));
if ( nl.hasAttribute("FONT"))
{
tmp->createNewEntryContext();
@@ -607,9 +607,9 @@ void KoAutoFormat::loadEntry( const TQDomElement &nl, bool _allLanguages)
tmp->formatEntryContext()->m_backGroundColor = col;
}
if ( !_allLanguages )
- m_entries.insert( nl.attribute("tqfind"), tmp );
+ m_entries.insert( nl.attribute("find"), tmp );
else
- m_allLanguages.insert( nl.attribute("tqfind"), tmp );
+ m_allLanguages.insert( nl.attribute("find"), tmp );
}
@@ -628,10 +628,10 @@ void KoAutoFormat::saveConfig()
config->writeEntry( "TypographicQuotesBegin", TQString( m_typographicDoubleQuotes.begin ) );
config->writeEntry( "TypographicQuotesEnd", TQString( m_typographicDoubleQuotes.end ) );
- config->writeEntry( "TypographicQuotesEnabled", m_typographicDoubleQuotes.tqreplace );
+ config->writeEntry( "TypographicQuotesEnabled", m_typographicDoubleQuotes.replace );
config->writeEntry( "TypographicSimpleQuotesBegin", TQString( m_typographicSimpleQuotes.begin ) );
config->writeEntry( "TypographicSimpleQuotesEnd", TQString( m_typographicSimpleQuotes.end ) );
- config->writeEntry( "TypographicSimpleQuotesEnabled", m_typographicSimpleQuotes.tqreplace );
+ config->writeEntry( "TypographicSimpleQuotesEnabled", m_typographicSimpleQuotes.replace );
config->writeEntry( "AdvancedAutocorrect", m_advancedAutoCorrect );
config->writeEntry( "AutoCorrectionWithFormat", m_bAutoCorrectionWithFormat );
@@ -709,8 +709,8 @@ void KoAutoFormat::saveConfig()
for ( ; it2 != m_superScriptEntries.end() ; ++it2 )
{
data = doc.createElement("superscript");
- data.setAttribute("tqfind", it2.key());
- data.setAttribute("super", it2.data().tqreplace());
+ data.setAttribute("find", it2.key());
+ data.setAttribute("super", it2.data().replace());
super.appendChild(data);
}
begin.appendChild(super);
@@ -751,8 +751,8 @@ TQDomElement KoAutoFormat::saveEntry( TQDictIterator<KoAutoFormatEntry> _entry,
{
TQDomElement data;
data = doc.createElement("item");
- data.setAttribute("tqfind", _entry.currentKey());
- data.setAttribute("tqreplace", _entry.current()->tqreplace());
+ data.setAttribute("find", _entry.currentKey());
+ data.setAttribute("replace", _entry.current()->replace());
if ( _entry.current()->formatEntryContext() )
{
KoSearchContext *tmp = _entry.current()->formatEntryContext();
@@ -847,16 +847,16 @@ TQDomElement KoAutoFormat::saveEntry( TQDictIterator<KoAutoFormatEntry> _entry,
return data;
}
-void KoAutoFormat::addAutoFormatEntry( const TQString &key, const TQString &tqreplace )
+void KoAutoFormat::addAutoFormatEntry( const TQString &key, const TQString &replace )
{
- KoAutoFormatEntry *findEntry = m_entries.tqfind( key);
+ KoAutoFormatEntry *findEntry = m_entries.find( key);
if ( findEntry )
{
- if ( findEntry->tqreplace().lower() == tqreplace.lower() )
+ if ( findEntry->replace().lower() == replace.lower() )
return;
}
- KoAutoFormatEntry *tmp = new KoAutoFormatEntry( tqreplace );
+ KoAutoFormatEntry *tmp = new KoAutoFormatEntry( replace );
m_entries.insert( key, tmp );
saveConfig();
buildMaxLen();
@@ -932,7 +932,7 @@ bool KoAutoFormat::doCompletion( KoTextCursor* textEditCursor, KoTextParag *para
uint maxlength = 0;
for ( TQStringList::ConstIterator it = wordlist.begin(); it != wordlist.end(); ++it ) // several completion words were found
{
- if ( (*it).tqstartsWith( lastWord, false ) && new_wordlist.tqfind(*it) == new_wordlist.end() ) //the completion words that begin with lastWord
+ if ( (*it).tqstartsWith( lastWord, false ) && new_wordlist.find(*it) == new_wordlist.end() ) //the completion words that begin with lastWord
{
if ( (*it).length() > maxlength )
maxlength = (*it).length();
@@ -1092,8 +1092,8 @@ void KoAutoFormat::autoFormatIsActive()
m_autoReplaceNumber ||
m_autoChangeFormat ||
m_completion ||
- m_typographicDoubleQuotes.tqreplace ||
- m_typographicSimpleQuotes.tqreplace ||
+ m_typographicDoubleQuotes.replace ||
+ m_typographicSimpleQuotes.replace ||
m_entries.count()!=0 ||
m_allLanguages.count()!=0;
}
@@ -1323,13 +1323,13 @@ void KoAutoFormat::doAutoFormat( KoTextCursor* textEditCursor, KoTextParag *para
}
else
{
- if ( ch == '"' && m_typographicDoubleQuotes.tqreplace )
+ if ( ch == '"' && m_typographicDoubleQuotes.replace )
{
KCommand *cmd = doTypographicQuotes( textEditCursor, parag, index, txtObj, true /*double quote*/ );
if ( cmd )
txtObj->emitNewCommand( cmd );
}
- else if ( ch == '\'' && m_typographicDoubleQuotes.tqreplace )
+ else if ( ch == '\'' && m_typographicDoubleQuotes.replace )
{
KCommand *cmd = doTypographicQuotes( textEditCursor, parag, index, txtObj, false /* simple quote*/ );
if ( cmd )
@@ -1400,10 +1400,10 @@ KCommand *KoAutoFormat::autoFormatWord( KoTextCursor* textEditCursor, KoTextPara
cursor.setIndex( start + length );
textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor );
KCommand *cmd = 0L;
- kdDebug()<<"it->tqreplace() :"<<it->tqreplace()<<endl;
+ kdDebug()<<"it->replace() :"<<it->replace()<<endl;
if (!it->formatEntryContext() || !m_bAutoCorrectionWithFormat)
{
- cmd = txtObj->replaceSelectionCommand( textEditCursor, it->tqreplace(),
+ cmd = txtObj->replaceSelectionCommand( textEditCursor, it->replace(),
i18n("Autocorrect Word"),
KoTextDocument::HighlightSelection );
}
@@ -1414,7 +1414,7 @@ KCommand *KoAutoFormat::autoFormatWord( KoTextCursor* textEditCursor, KoTextPara
KoTextFormat * newFormat = new KoTextFormat(*lastFormat);
changeTextFormat(it->formatEntryContext(), newFormat, flags );
KMacroCommand *macro = new KMacroCommand( i18n("Autocorrect Word with Format"));
- KCommand *cmd2=txtObj->replaceSelectionCommand( textEditCursor, it->tqreplace(),
+ KCommand *cmd2=txtObj->replaceSelectionCommand( textEditCursor, it->replace(),
i18n("Autocorrect Word"),
KoTextDocument::HighlightSelection );
if ( cmd2 )
@@ -1423,13 +1423,13 @@ KCommand *KoAutoFormat::autoFormatWord( KoTextCursor* textEditCursor, KoTextPara
cursor.setParag( parag );
cursor.setIndex( start );
textdoc->setSelectionStart( KoTextDocument::HighlightSelection, &cursor );
- cursor.setIndex( start + it->tqreplace().length()/*+ length + 1*/ );
+ cursor.setIndex( start + it->replace().length()/*+ length + 1*/ );
textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor );
cmd2 =txtObj->setFormatCommand( textEditCursor, &lastFormat, newFormat, flags, false, KoTextDocument::HighlightSelection );
macro->addCommand( cmd2);
- index = index - length + it->tqreplace().length();
+ index = index - length + it->replace().length();
textEditCursor->setIndex(index+1);
cmd2 =txtObj->setFormatCommand( textEditCursor, &newFormat, lastFormat, 0 );
macro->addCommand( cmd2);
@@ -1448,7 +1448,7 @@ KCommand *KoAutoFormat::autoFormatWord( KoTextCursor* textEditCursor, KoTextPara
txtObj->emitHideCursor();
textEditCursor->gotoRight();
txtObj->emitShowCursor();
- index = index - length + it->tqreplace().length();
+ index = index - length + it->replace().length();
return cmd;
}
}
@@ -1557,7 +1557,7 @@ KCommand * KoAutoFormat::doUpperCase( KoTextCursor *textEditCursor, KoTextParag
// Go back over any space/tab/CR
while ( backCursor.index() > 0 || backCursor.parag()->prev() )
{
- beginningOfSentence = false; // we could go back -> false unless we'll tqfind '.'
+ beginningOfSentence = false; // we could go back -> false unless we'll find '.'
backCursor.gotoLeft();
if ( !backCursor.parag()->at( backCursor.index() )->c.isSpace() )
break;
@@ -1578,7 +1578,7 @@ KCommand * KoAutoFormat::doUpperCase( KoTextCursor *textEditCursor, KoTextParag
+ punct;
kdDebug() << "text: " << text << endl;
// text has the word at the end of the 'sentence', including the termination. Example: "Mr."
- beginningOfSentence = (m_upperCaseExceptions.tqfindIndex(text)==-1); // Ok if we can't find it
+ beginningOfSentence = (m_upperCaseExceptions.findIndex(text)==-1); // Ok if we can't find it
}
if ( beginningOfSentence )
@@ -1605,7 +1605,7 @@ KCommand * KoAutoFormat::doUpperCase( KoTextCursor *textEditCursor, KoTextParag
// Check next letter - we still want to be able to write fully uppercase words...
backCursor.setIndex( backCursor.index() + 1 );
TQChar thirdChar = backCursor.parag()->at( backCursor.index() )->c;
- if ( isLower( thirdChar ) && (m_twoUpperLetterException.tqfindIndex(word)==-1))
+ if ( isLower( thirdChar ) && (m_twoUpperLetterException.findIndex(word)==-1))
{
// Ok, convert
KoTextCursor cursor( parag->document() );
@@ -1681,13 +1681,13 @@ void KoAutoFormat::detectStartOfLink(KoTextParag * parag, int const index, bool
word.append( s->at( i ).c );
}
- if (word.tqfind("http")!=-1 || word.tqfind("https")!=-1 || word.tqfind("mailto")!=-1 || word.tqfind("ftp")!=-1 || word.tqfind("file")!=-1
- || word.tqfind("news")!=-1 || word.tqfind('@')!=-1)
+ if (word.find("http")!=-1 || word.find("https")!=-1 || word.find("mailto")!=-1 || word.find("ftp")!=-1 || word.find("file")!=-1
+ || word.find("news")!=-1 || word.find('@')!=-1)
m_ignoreUpperCase=true;
else
{
- int const tmp_pos=word.tqfind("www.");
- if (tmp_pos!=-1 && (word.tqfind('.',tmp_pos+4)!=-1 || insertedDot) )
+ int const tmp_pos=word.find("www.");
+ if (tmp_pos!=-1 && (word.find('.',tmp_pos+4)!=-1 || insertedDot) )
m_ignoreUpperCase=true;
}
}
@@ -1696,35 +1696,35 @@ void KoAutoFormat::doAutoDetectUrl( KoTextCursor *textEditCursor, KoTextParag *p
{
kdDebug() << "link:" << word << endl;
char link_type = 0;
- int pos = word.tqfind("http://");
- int tmp_pos = word.tqfind("https://");
+ int pos = word.find("http://");
+ int tmp_pos = word.find("https://");
if(tmp_pos<pos && tmp_pos!=-1)
pos = tmp_pos;
- tmp_pos = word.tqfind("mailto:/");
+ tmp_pos = word.find("mailto:/");
if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1)
pos = tmp_pos;
- tmp_pos = word.tqfind("ftp://");
+ tmp_pos = word.find("ftp://");
if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1)
pos = tmp_pos;
- tmp_pos = word.tqfind("ftp.");
+ tmp_pos = word.find("ftp.");
if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1)
{
pos = tmp_pos;
link_type = 3;
}
- tmp_pos = word.tqfind("file:/");
+ tmp_pos = word.find("file:/");
if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1)
pos = tmp_pos;
- tmp_pos = word.tqfind("news:");
+ tmp_pos = word.find("news:");
if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1)
pos = tmp_pos;
- tmp_pos = word.tqfind("www.");
- if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1 && word.tqfind('.',tmp_pos+4)!=-1 )
+ tmp_pos = word.find("www.");
+ if((tmp_pos<pos || pos==-1 ) && tmp_pos!=-1 && word.find('.',tmp_pos+4)!=-1 )
{
pos = tmp_pos;
link_type = 2;
}
- tmp_pos = word.tqfind('@');
+ tmp_pos = word.find('@');
if ( pos == -1 && tmp_pos != -1 )
{
pos = tmp_pos-1;
@@ -1821,7 +1821,7 @@ void KoAutoFormat::doAutoIncludeUpperUpper(KoTextCursor* /*textEditCursor*/, KoT
}
if( word.length() > 2 && word.left(2)==word.left(2).upper() && word.tqat(3)!=word.tqat(3).upper() )
{
- if ( m_twoUpperLetterException.tqfindIndex(word )==-1)
+ if ( m_twoUpperLetterException.findIndex(word )==-1)
m_twoUpperLetterException.append( word);
}
i+=word.length();
@@ -1858,7 +1858,7 @@ void KoAutoFormat::doAutoIncludeAbbreviation(KoTextCursor* /*textEditCursor*/, K
}
if( word.length()>1 && !wordAfter.isEmpty() && wordAfter.tqat(0)==wordAfter.tqat(0).lower())
{
- if ( m_upperCaseExceptions.tqfindIndex(word )==-1)
+ if ( m_upperCaseExceptions.findIndex(word )==-1)
m_upperCaseExceptions.append( word );
}
}
@@ -2151,7 +2151,7 @@ KCommand *KoAutoFormat::doCapitalizeNameOfDays( KoTextCursor* textEditCursor, Ko
{
//m_cacheNameOfDays
//todo
- int pos = m_cacheNameOfDays.tqfindIndex( word.lower() );
+ int pos = m_cacheNameOfDays.findIndex( word.lower() );
if ( pos == -1 )
return 0L;
KoTextDocument * textdoc = parag->textDocument();
@@ -2183,19 +2183,19 @@ KCommand *KoAutoFormat::doAutoSuperScript( KoTextCursor* textEditCursor, KoTextP
{
KoAutoFormatEntryMap::Iterator it = m_superScriptEntries.begin();
bool found = false;
- TQString tqreplace;
+ TQString replace;
for ( ; it != m_superScriptEntries.end() ; ++it )
{
if( it.key()==word)
{
- tqreplace = it.data().tqreplace();
+ replace = it.data().replace();
found = true;
break;
}
else if ( it.key()=="othernb")
{
- TQString tmp = it.data().tqreplace();
- int pos = word.tqfind( tmp );
+ TQString tmp = it.data().replace();
+ int pos = word.find( tmp );
if( pos != -1)
{
if( pos + tmp.length() == word.length())
@@ -2204,7 +2204,7 @@ KCommand *KoAutoFormat::doAutoSuperScript( KoTextCursor* textEditCursor, KoTextP
word.left( pos ).toInt( &ok);
if( ok )
{
- tqreplace = tmp;
+ replace = tmp;
found = true;
break;
}
@@ -2216,7 +2216,7 @@ KCommand *KoAutoFormat::doAutoSuperScript( KoTextCursor* textEditCursor, KoTextP
{
KoTextDocument * textdoc = parag->textDocument();
- int start = index - tqreplace.length();
+ int start = index - replace.length();
KoTextFormat * lastFormat = parag->at( start )->format();
KoTextFormat * newFormat = new KoTextFormat(*lastFormat);
KoTextCursor cursor( parag->document() );
diff --git a/lib/kotext/KoAutoFormat.h b/lib/kotext/KoAutoFormat.h
index 4f59fbaa..8f4199a2 100644
--- a/lib/kotext/KoAutoFormat.h
+++ b/lib/kotext/KoAutoFormat.h
@@ -72,11 +72,11 @@ class KoAutoFormatEntry
{
public:
// The text to find is actually the key in KWAutoFormat's map.
- // What we replace it with is tqreplace().
- KoAutoFormatEntry(const TQString& tqreplace = TQString());
+ // What we replace it with is replace().
+ KoAutoFormatEntry(const TQString& replace = TQString());
~KoAutoFormatEntry();
- TQString tqreplace() const { return m_tqreplace; }
- void changeReplace(const TQString & rep){ m_tqreplace = rep; }
+ TQString replace() const { return m_replace; }
+ void changeReplace(const TQString & rep){ m_replace = rep; }
KoSearchContext *formatEntryContext()const;
void createNewEntryContext();
@@ -84,7 +84,7 @@ public:
void clearFormatEntryContext( );
protected:
- TQString m_tqreplace;
+ TQString m_replace;
// For formatting in the replacement - not implemented yet
KoSearchContext *m_formatOptions;
};
@@ -145,7 +145,7 @@ public:
struct TypographicQuotes
{
TQChar begin, end;
- bool tqreplace; // aka enabled
+ bool replace; // aka enabled
};
// Configuration (on/off/settings). Called by the dialog.
@@ -289,7 +289,7 @@ public:
buildMaxLen();
}
- void addAutoFormatEntry( const TQString &key, const TQString &tqreplace );
+ void addAutoFormatEntry( const TQString &key, const TQString &replace );
void removeAutoFormatEntry( const TQString &key ) {
diff --git a/lib/kotext/KoAutoFormatDia.cpp b/lib/kotext/KoAutoFormatDia.cpp
index 6a602c92..90b1a97d 100644
--- a/lib/kotext/KoAutoFormatDia.cpp
+++ b/lib/kotext/KoAutoFormatDia.cpp
@@ -114,7 +114,7 @@ void KoAutoFormatExceptionWidget::slotAddException()
{
if(text.at(text.length()-1)!='.' && m_bAbbreviation)
text=text+".";
- if( m_listException.tqfindIndex( text )==-1)
+ if( m_listException.findIndex( text )==-1)
{
m_listException<<text;
@@ -468,13 +468,13 @@ void KoAutoFormatDia::setupTab2()
void KoAutoFormatDia::initTab2()
{
- bool state=m_autoFormat.getConfigTypographicDoubleQuotes().tqreplace;
+ bool state=m_autoFormat.getConfigTypographicDoubleQuotes().replace;
cbTypographicDoubleQuotes->setChecked( state );
pbDoubleQuote1->setText( oDoubleBegin );
pbDoubleQuote2->setText(oDoubleEnd );
slotChangeStateDouble(state);
- state=m_autoFormat.getConfigTypographicSimpleQuotes().tqreplace;
+ state=m_autoFormat.getConfigTypographicSimpleQuotes().replace;
cbTypographicSimpleQuotes->setChecked( state );
pbSimpleQuote1->setText( oSimpleBegin );
pbSimpleQuote2->setText(oSimpleEnd );
@@ -510,7 +510,7 @@ void KoAutoFormatDia::setupTab3()
tmp =dir.entryList (TQDir::Files);
for ( TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it )
{
- if ( !(*it).tqcontains("autocorrect"))
+ if ( !(*it).contains("autocorrect"))
{
TQString readableName = KGlobal::locale()->twoAlphaToCountryName((*it).left((*it).length()-4));
TQString tmp;
@@ -542,14 +542,14 @@ void KoAutoFormatDia::setupTab3()
lblFind = new TQLabel( i18n( "&Find:" ), tab3 );
grid->addWidget( lblFind, 3, 0 );
- m_tqfind = new KoAutoFormatLineEdit( tab3 );
- grid->addWidget( m_tqfind, 3, 1 );
+ m_find = new KoAutoFormatLineEdit( tab3 );
+ grid->addWidget( m_find, 3, 1 );
- lblFind->setBuddy( m_tqfind );
+ lblFind->setBuddy( m_find );
- connect( m_tqfind, TQT_SIGNAL( textChanged( const TQString & ) ),
- TQT_SLOT( slottqfind( const TQString & ) ) );
- connect( m_tqfind, TQT_SIGNAL( keyReturnPressed() ),
+ connect( m_find, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotfind( const TQString & ) ) );
+ connect( m_find, TQT_SIGNAL( keyReturnPressed() ),
TQT_SLOT( slotAddEntry()));
pbSpecialChar1 = new TQPushButton( "...", tab3 );
@@ -562,14 +562,14 @@ void KoAutoFormatDia::setupTab3()
lblReplace = new TQLabel( i18n( "&Replace:" ), tab3 );
grid->addWidget( lblReplace, 3, 3 );
- m_tqreplace = new KoAutoFormatLineEdit( tab3 );
- grid->addWidget( m_tqreplace, 3, 4 );
+ m_replace = new KoAutoFormatLineEdit( tab3 );
+ grid->addWidget( m_replace, 3, 4 );
- lblReplace->setBuddy( m_tqreplace );
+ lblReplace->setBuddy( m_replace );
- connect( m_tqreplace, TQT_SIGNAL( textChanged( const TQString & ) ),
- TQT_SLOT( slottqfind2( const TQString & ) ) );
- connect( m_tqreplace, TQT_SIGNAL( keyReturnPressed() ),
+ connect( m_replace, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotfind2( const TQString & ) ) );
+ connect( m_replace, TQT_SIGNAL( keyReturnPressed() ),
TQT_SLOT( slotAddEntry()));
pbSpecialChar2 = new TQPushButton( "...", tab3 );
@@ -655,7 +655,7 @@ void KoAutoFormatDia::initTab3()
TQDictIterator<KoAutoFormatEntry> it( m_docAutoFormat->getAutoFormatEntries());
for( ; it.current(); ++it )
{
- ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->tqreplace() );
+ ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->replace() );
}
}
@@ -665,12 +665,12 @@ void KoAutoFormatDia::slotChangeAdvancedAutoCorrection()
cbAutoCorrectionWithFormat->setEnabled( state );
pbSpecialChar2->setEnabled( state );
pbSpecialChar1->setEnabled( state );
- m_tqreplace->setEnabled( state);
- m_tqfind->setEnabled( state);
+ m_replace->setEnabled( state);
+ m_find->setEnabled( state);
m_pListView->setEnabled( state);
- state = state && !m_tqreplace->text().isEmpty() && !m_tqfind->text().isEmpty();
- KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_tqfind->text());
+ state = state && !m_replace->text().isEmpty() && !m_find->text().isEmpty();
+ KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_find->text());
pbRemove->setEnabled(state && entry);
pbChangeFormat->setEnabled(state && entry);
pbClearFormat->setEnabled(state && entry);
@@ -684,7 +684,7 @@ void KoAutoFormatDia::changeAutoformatLanguage(const TQString & text)
m_docAutoFormat->configAutoFormatLanguage( TQString());
else
{
- m_docAutoFormat->configAutoFormatLanguage( exceptionLanguageName.tqfind(text).data());
+ m_docAutoFormat->configAutoFormatLanguage( exceptionLanguageName.find(text).data());
}
if ( !noSignal )
{
@@ -765,10 +765,10 @@ void KoAutoFormatDia::slotChangeTextFormatEntry()
KoAutoFormatEntry *entry = 0L;
if ( addNewEntry )
{
- if ( m_tqreplace->text().isEmpty() )
+ if ( m_replace->text().isEmpty() )
return;
if ( !newEntry )
- newEntry = new KoAutoFormatEntry( m_tqreplace->text());
+ newEntry = new KoAutoFormatEntry( m_replace->text());
entry =newEntry;
}
else
@@ -813,28 +813,28 @@ void KoAutoFormatDia::slotRemoveEntry()
}
-void KoAutoFormatDia::slottqfind( const TQString & )
+void KoAutoFormatDia::slotfind( const TQString & )
{
- KoAutoFormatEntry *entry = m_docAutoFormat->findFormatEntry(m_tqfind->text());
+ KoAutoFormatEntry *entry = m_docAutoFormat->findFormatEntry(m_find->text());
if ( entry )
{
- m_tqreplace->setText(entry->tqreplace().latin1());
+ m_replace->setText(entry->replace().latin1());
pbAdd->setText(i18n("&Modify"));
- m_pListView->setCurrentItem(m_pListView->tqfindItem(m_tqfind->text(),0));
+ m_pListView->setCurrentItem(m_pListView->findItem(m_find->text(),0));
} else {
- m_tqreplace->clear();
+ m_replace->clear();
pbAdd->setText(i18n("&Add"));
m_pListView->setCurrentItem(0L);
}
- slottqfind2("");
+ slotfind2("");
}
-void KoAutoFormatDia::slottqfind2( const TQString & )
+void KoAutoFormatDia::slotfind2( const TQString & )
{
- bool state = !m_tqreplace->text().isEmpty() && !m_tqfind->text().isEmpty();
- KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_tqfind->text());
+ bool state = !m_replace->text().isEmpty() && !m_find->text().isEmpty();
+ KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_find->text());
pbRemove->setEnabled(state && entry);
if ( state && entry )
{
@@ -853,10 +853,10 @@ void KoAutoFormatDia::refreshEntryList()
TQDictIterator<KoAutoFormatEntry> it( m_docAutoFormat->getAutoFormatEntries());
for( ; it.current(); ++it )
{
- ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->tqreplace() );
+ ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->replace() );
}
m_pListView->setCurrentItem(m_pListView->firstChild ());
- bool state = !(m_tqreplace->text().isEmpty()) && !(m_tqfind->text().isEmpty());
+ bool state = !(m_replace->text().isEmpty()) && !(m_find->text().isEmpty());
//we can delete item, as we search now in listbox and not in m_find lineedit
pbRemove->setEnabled(m_pListView->currentItem() && m_pListView->selectedItem()!=0 );
pbChangeFormat->setEnabled(state && m_pListView->currentItem() && m_pListView->selectedItem()!=0 );
@@ -886,14 +886,14 @@ void KoAutoFormatDia::slotAddEntry()
{
if(!pbAdd->isEnabled())
return;
- TQString repl = m_tqreplace->text();
- TQString tqfind = m_tqfind->text();
- if(repl.isEmpty() || tqfind.isEmpty())
+ TQString repl = m_replace->text();
+ TQString find = m_find->text();
+ if(repl.isEmpty() || find.isEmpty())
{
KMessageBox::sorry( 0L, i18n( "An area is empty" ) );
return;
}
- if(repl==tqfind)
+ if(repl==find)
{
KMessageBox::sorry( 0L, i18n( "Find string is the same as replace string!" ) );
return;
@@ -904,18 +904,18 @@ void KoAutoFormatDia::slotAddEntry()
{
if ( newEntry )
{
- newEntry->changeReplace( m_tqreplace->text());
- addEntryList(tqfind, newEntry);
+ newEntry->changeReplace( m_replace->text());
+ addEntryList(find, newEntry);
delete tmp;
newEntry = 0L;
}
else
- addEntryList(tqfind, tmp);
+ addEntryList(find, tmp);
}
else
- editEntryList(tqfind, tqfind, tmp);
- m_tqreplace->clear();
- m_tqfind->clear();
+ editEntryList(find, find, tmp);
+ m_replace->clear();
+ m_find->clear();
refreshEntryList();
autocorrectionEntryChanged= true;
@@ -926,15 +926,15 @@ void KoAutoFormatDia::chooseSpecialChar1()
{
TQString f = font().family();
TQChar c = ' ';
- bool const focus = m_tqfind->hasFocus();
+ bool const focus = m_find->hasFocus();
if ( KoCharSelectDia::selectChar( f, c, false ) )
{
- int const cursorpos = m_tqfind->cursorPosition();
+ int const cursorpos = m_find->cursorPosition();
if (focus)
- m_tqfind->setText( m_tqfind->text().insert( cursorpos, c ) );
+ m_find->setText( m_find->text().insert( cursorpos, c ) );
else
- m_tqfind->setText( m_tqfind->text().append(c) );
- m_tqfind->setCursorPosition( cursorpos+1 );
+ m_find->setText( m_find->text().append(c) );
+ m_find->setCursorPosition( cursorpos+1 );
}
}
@@ -943,15 +943,15 @@ void KoAutoFormatDia::chooseSpecialChar2()
{
TQString f = font().family();
TQChar c = ' ';
- bool const focus = m_tqreplace->hasFocus();
+ bool const focus = m_replace->hasFocus();
if ( KoCharSelectDia::selectChar( f, c, false ) )
{
- int const cursorpos = m_tqreplace->cursorPosition();
+ int const cursorpos = m_replace->cursorPosition();
if (focus)
- m_tqreplace->setText( m_tqreplace->text().insert(m_tqreplace->cursorPosition(), c ) );
+ m_replace->setText( m_replace->text().insert(m_replace->cursorPosition(), c ) );
else
- m_tqreplace->setText( m_tqreplace->text().append(c) );
- m_tqreplace->setCursorPosition( cursorpos+1 );
+ m_replace->setText( m_replace->text().append(c) );
+ m_replace->setCursorPosition( cursorpos+1 );
}
}
@@ -969,9 +969,9 @@ void KoAutoFormatDia::slotEditEntry()
return;
delete newEntry;
newEntry=0L;
- m_tqfind->setText(m_pListView->currentItem()->text(0));
- m_tqreplace->setText(m_pListView->currentItem()->text(1));
- bool state = !m_tqreplace->text().isEmpty() && !m_tqfind->text().isEmpty();
+ m_find->setText(m_pListView->currentItem()->text(0));
+ m_replace->setText(m_pListView->currentItem()->text(1));
+ bool state = !m_replace->text().isEmpty() && !m_find->text().isEmpty();
pbRemove->setEnabled(state);
pbChangeFormat->setEnabled( state );
pbClearFormat->setEnabled(state);
@@ -983,13 +983,13 @@ bool KoAutoFormatDia::applyConfig()
{
// First tab
KoAutoFormat::TypographicQuotes tq = m_autoFormat.getConfigTypographicSimpleQuotes();
- tq.tqreplace = cbTypographicSimpleQuotes->isChecked();
+ tq.replace = cbTypographicSimpleQuotes->isChecked();
tq.begin = pbSimpleQuote1->text()[ 0 ];
tq.end = pbSimpleQuote2->text()[ 0 ];
m_docAutoFormat->configTypographicSimpleQuotes( tq );
tq = m_autoFormat.getConfigTypographicDoubleQuotes();
- tq.tqreplace = cbTypographicDoubleQuotes->isChecked();
+ tq.replace = cbTypographicDoubleQuotes->isChecked();
tq.begin = pbDoubleQuote1->text()[ 0 ];
tq.end = pbDoubleQuote2->text()[ 0 ];
m_docAutoFormat->configTypographicDoubleQuotes( tq );
@@ -1024,7 +1024,7 @@ bool KoAutoFormatDia::applyConfig()
m_docAutoFormat->configIncludeTwoUpperUpperLetterException( twoUpperLetter->autoInclude());
m_docAutoFormat->configIncludeAbbreviation( abbreviation->autoInclude());
- TQString lang = exceptionLanguageName.tqfind(autoFormatLanguage->currentText()).data();
+ TQString lang = exceptionLanguageName.find(autoFormatLanguage->currentText()).data();
if ( lang == i18n("Default") )
m_docAutoFormat->configAutoFormatLanguage(TQString());
else
diff --git a/lib/kotext/KoAutoFormatDia.h b/lib/kotext/KoAutoFormatDia.h
index 38a9ecb3..3e8020e7 100644
--- a/lib/kotext/KoAutoFormatDia.h
+++ b/lib/kotext/KoAutoFormatDia.h
@@ -121,7 +121,7 @@ protected:
TQPushButton *pbSimpleQuote1, *pbSimpleQuote2, *pbSimpleDefault;
TQPushButton *pbChangeFormat, *pbClearFormat;
KCharSelect *charselect;
- KoAutoFormatLineEdit *m_tqfind, *m_tqreplace;
+ KoAutoFormatLineEdit *m_find, *m_replace;
KListView *m_pListView;
TQChar oSimpleBegin, oSimpleEnd;
@@ -149,8 +149,8 @@ protected slots:
void slotItemRenamed(TQListViewItem * item, const TQString & newText, int column);
void slotRemoveEntry();
void slotEditEntry();
- void slottqfind( const TQString & );
- void slottqfind2( const TQString & );
+ void slotfind( const TQString & );
+ void slotfind2( const TQString & );
void chooseSpecialChar1();
void chooseSpecialChar2();
void chooseDoubleQuote1();
diff --git a/lib/kotext/KoCompletionDia.cpp b/lib/kotext/KoCompletionDia.cpp
index f2860cf1..6289675d 100644
--- a/lib/kotext/KoCompletionDia.cpp
+++ b/lib/kotext/KoCompletionDia.cpp
@@ -130,7 +130,7 @@ void KoCompletion::slotAddCompletionEntry() {
TQString const newWord = KInputDialog::getText( i18n("Add Completion Entry"), i18n("Enter entry:"), TQString(), &ok, this ).lower();
if ( ok )
{
- if ( !m_listCompletion.tqcontains( newWord ))
+ if ( !m_listCompletion.contains( newWord ))
{
m_listCompletion.append( newWord );
m_lbListCompletion->insertItem( newWord );
diff --git a/lib/kotext/KoComplexText.cpp b/lib/kotext/KoComplexText.cpp
index e3196085..4239bf47 100644
--- a/lib/kotext/KoComplexText.cpp
+++ b/lib/kotext/KoComplexText.cpp
@@ -120,7 +120,7 @@ static inline const TQChar *prevChar( const TQString &str, int pos )
pos--;
ch--;
}
- return &TQChar::tqreplacement;
+ return &TQChar::replacement;
}
static inline const TQChar *nextChar( const TQString &str, int pos)
@@ -136,7 +136,7 @@ static inline const TQChar *nextChar( const TQString &str, int pos)
pos++;
ch++;
}
- return &TQChar::tqreplacement;
+ return &TQChar::replacement;
}
static inline bool prevVisualCharJoins( const TQString &str, int pos)
diff --git a/lib/kotext/KoCreateStyleDia.cpp b/lib/kotext/KoCreateStyleDia.cpp
index cf9130af..648dc252 100644
--- a/lib/kotext/KoCreateStyleDia.cpp
+++ b/lib/kotext/KoCreateStyleDia.cpp
@@ -42,7 +42,7 @@ KoCreateStyleDia::KoCreateStyleDia( const TQStringList & _list, TQWidget *tqpare
void KoCreateStyleDia::slotOk()
{
- if ( styleList.tqfindIndex(m_styleName->text() ) != -1 )
+ if ( styleList.findIndex(m_styleName->text() ) != -1 )
{
KMessageBox::error(this, i18n("Name already exists! Please choose another name"));
m_styleName->clear();
diff --git a/lib/kotext/KoCustomVariablesDia.cpp b/lib/kotext/KoCustomVariablesDia.cpp
index af709678..fd28bfe6 100644
--- a/lib/kotext/KoCustomVariablesDia.cpp
+++ b/lib/kotext/KoCustomVariablesDia.cpp
@@ -218,7 +218,7 @@ KoCustomVariablesDia::KoCustomVariablesDia( TQWidget *tqparent, const TQPtrList<
KoVariable *var = it.current();
if ( var->type() == VT_CUSTOM ) {
KoCustomVariable *v = (KoCustomVariable*)var;
- if ( !lst.tqcontains( v->name() ) ) {
+ if ( !lst.contains( v->name() ) ) {
lst.append( v->name() );
KoCustomVariablesListItem *item = new KoCustomVariablesListItem( list );
item->setVariable( v );
diff --git a/lib/kotext/KoLanguageTab.cpp b/lib/kotext/KoLanguageTab.cpp
index 47fb045e..2ec9fede 100644
--- a/lib/kotext/KoLanguageTab.cpp
+++ b/lib/kotext/KoLanguageTab.cpp
@@ -42,7 +42,7 @@ KoLanguageTab::KoLanguageTab( KSpell2::Broker::Ptr broker, TQWidget* tqparent, c
TQStringList::ConstIterator itTag = langTags.begin();
for ( ; itName != langNames.end() && itTag != langTags.end(); ++itName, ++itTag )
{
- if ( spellCheckLanguages.tqfind( *itTag ) != spellCheckLanguages.end() )
+ if ( spellCheckLanguages.find( *itTag ) != spellCheckLanguages.end() )
languageKComboBox->insertItem( SmallIcon( "spellcheck" ), *itName );
else
languageKComboBox->insertItem( *itName );
diff --git a/lib/kotext/KoParagDia.cpp b/lib/kotext/KoParagDia.cpp
index 65cc1f2e..3ee02617 100644
--- a/lib/kotext/KoParagDia.cpp
+++ b/lib/kotext/KoParagDia.cpp
@@ -1454,7 +1454,7 @@ void KoParagDecorationWidget::slotPressEvent(TQMouseEvent *_ev)
TQRect r = wPreview->contentsRect();
TQRect rect(r.x() + OFFSETX, r.y() + OFFSETY,
r.width() - OFFSETX, r.y() + OFFSETY + Ko_SPACE);
- if(rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+ if(rect.contains(TQPoint(_ev->x(),_ev->y())))
{
clickedBorderPreview( m_topBorder, KoBorder::TopBorder,
wDeco->bBorderTop );
@@ -1462,7 +1462,7 @@ void KoParagDecorationWidget::slotPressEvent(TQMouseEvent *_ev)
rect.setCoords(r.x() + OFFSETX, r.height() - OFFSETY - Ko_SPACE,
r.width() - OFFSETX, r.height() - OFFSETY);
- if(rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+ if(rect.contains(TQPoint(_ev->x(),_ev->y())))
{
clickedBorderPreview( m_bottomBorder, KoBorder::BottomBorder,
wDeco->bBorderBottom );
@@ -1470,7 +1470,7 @@ void KoParagDecorationWidget::slotPressEvent(TQMouseEvent *_ev)
rect.setCoords(r.x() + OFFSETX, r.y() + OFFSETY,
r.x() + Ko_SPACE + OFFSETX, r.height() - OFFSETY);
- if(rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+ if(rect.contains(TQPoint(_ev->x(),_ev->y())))
{
clickedBorderPreview( m_leftBorder, KoBorder::LeftBorder,
wDeco->bBorderLeft );
@@ -1478,7 +1478,7 @@ void KoParagDecorationWidget::slotPressEvent(TQMouseEvent *_ev)
rect.setCoords(r.width() - OFFSETX - Ko_SPACE, r.y() + OFFSETY,
r.width() - OFFSETX, r.height() - OFFSETY);
- if(rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
+ if(rect.contains(TQPoint(_ev->x(),_ev->y())))
{
clickedBorderPreview( m_rightBorder, KoBorder::RightBorder,
wDeco->bBorderRight );
@@ -1960,7 +1960,7 @@ void KoParagTabulatorsWidget::newClicked() {
newTab.ptWidth=m_tabList[selected].ptWidth;
m_tabList.insert(m_tabList.at(selected), newTab);
lstTabs->insertItem( tabToString(newTab), selected);
- lstTabs->setCurrentItem(lstTabs->tqfindItem(tabToString(newTab)));
+ lstTabs->setCurrentItem(lstTabs->findItem(tabToString(newTab)));
sortLists();
}
}
@@ -2113,7 +2113,7 @@ void KoParagTabulatorsWidget::sortLists() {
for ( ; it != m_tabList.end(); ++it )
lstTabs->insertItem( KoUnit::toUserStringValue( (*it).ptPos, m_unit ) );
- lstTabs->setCurrentItem(lstTabs->tqfindItem(curValue));
+ lstTabs->setCurrentItem(lstTabs->findItem(curValue));
noSignals=false;
}
diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp
index 129c4d4a..fd1a9453 100644
--- a/lib/kotext/KoParagLayout.cpp
+++ b/lib/kotext/KoParagLayout.cpp
@@ -488,7 +488,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex
tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF;
else if( value=="200%")
tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE;
- else if ( value.tqfind('%') > -1 )
+ else if ( value.find('%') > -1 )
{
value = value.remove( '%' );
double percent = value.toDouble();
diff --git a/lib/kotext/KoParagStyle.cpp b/lib/kotext/KoParagStyle.cpp
index f44bcd59..96209cba 100644
--- a/lib/kotext/KoParagStyle.cpp
+++ b/lib/kotext/KoParagStyle.cpp
@@ -220,7 +220,7 @@ TQString KoParagStyle::saveStyle( KoGenStyles& genStyles, int styleType, const T
// try to preserve existing internal name, if it looks adequate (no spaces)
// ## TODO: check XML-Schemacs NCName conformity
- bool nameIsConform = !m_name.isEmpty() && m_name.tqfind( ' ' ) == -1;
+ bool nameIsConform = !m_name.isEmpty() && m_name.find( ' ' ) == -1;
TQString newName;
if ( nameIsConform )
newName = genStyles.lookup( gs, m_name, KoGenStyles::DontForceNumbering );
diff --git a/lib/kotext/KoRichText.cpp b/lib/kotext/KoRichText.cpp
index 157f79a8..5df4c93d 100644
--- a/lib/kotext/KoRichText.cpp
+++ b/lib/kotext/KoRichText.cpp
@@ -381,10 +381,10 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko
TQString s( str );
#if defined(TQ_WS_WIN)
if ( checkNewLine )
- s = s.tqreplace( TQRegExp( "\\r" ), "" );
+ s = s.replace( TQRegExp( "\\r" ), "" );
#endif
if ( checkNewLine )
- justInsert = s.tqfind( '\n' ) == -1;
+ justInsert = s.find( '\n' ) == -1;
if ( justInsert ) {
string->insert( idx, s );
if ( formatting ) {
@@ -1635,7 +1635,7 @@ void KoTextParag::insertLineStart( int index, KoTextParagLineStart *ls )
// we could loop forever (e.g. if one char is wider than the page...)
#ifndef NDEBUG
TQMap<int, KoTextParagLineStart*>::Iterator it;
- if ( ( it = lineStarts.tqfind( index ) ) == lineStarts.end() ) {
+ if ( ( it = lineStarts.find( index ) ) == lineStarts.end() ) {
lineStarts.insert( index, ls );
} else {
kdWarning(32500) << "insertLineStart: there's already a line for char index=" << index << endl;
@@ -1742,10 +1742,10 @@ void KoTextFlow::unregisterFloatingItem( KoTextCustomItem* item )
void KoTextFlow::registerFloatingItem( KoTextCustomItem* item )
{
if ( item->placement() == KoTextCustomItem::PlaceRight ) {
- if ( !rightItems.tqcontains( item ) )
+ if ( !rightItems.contains( item ) )
rightItems.append( item );
} else if ( item->placement() == KoTextCustomItem::PlaceLeft &&
- !leftItems.tqcontains( item ) ) {
+ !leftItems.contains( item ) ) {
leftItems.append( item );
}
}
diff --git a/lib/kotext/KoSearchDia.cpp b/lib/kotext/KoSearchDia.cpp
index 915ef4f7..0acd88cc 100644
--- a/lib/kotext/KoSearchDia.cpp
+++ b/lib/kotext/KoSearchDia.cpp
@@ -100,11 +100,11 @@ void KoSearchContextUI::setCtxHistory( const TQStringList & history )
m_ctx->m_strings = history;
}
-KoSearchDia::KoSearchDia( TQWidget * tqparent,const char *name, KoSearchContext *tqfind, bool hasSelection, bool hasCursor )
- : KFindDialog( tqparent, name, tqfind->m_options, tqfind->m_strings )
+KoSearchDia::KoSearchDia( TQWidget * tqparent,const char *name, KoSearchContext *find, bool hasSelection, bool hasCursor )
+ : KFindDialog( tqparent, name, find->m_options, find->m_strings )
{
// The dialog extension.
- m_findUI = new KoSearchContextUI( tqfind, findExtension() );
+ m_findUI = new KoSearchContextUI( find, findExtension() );
setHasSelection(hasSelection);
setHasCursor(hasCursor);
}
@@ -119,12 +119,12 @@ void KoSearchDia::slotOk()
m_findUI->setCtxHistory( findHistory() );
}
-KoReplaceDia::KoReplaceDia( TQWidget *tqparent, const char *name, KoSearchContext *tqfind, KoSearchContext *tqreplace, bool hasSelection, bool hasCursor )
- : KReplaceDialog( tqparent, name, tqfind->m_options, tqfind->m_strings, tqreplace->m_strings )
+KoReplaceDia::KoReplaceDia( TQWidget *tqparent, const char *name, KoSearchContext *find, KoSearchContext *replace, bool hasSelection, bool hasCursor )
+ : KReplaceDialog( tqparent, name, find->m_options, find->m_strings, replace->m_strings )
{
// The dialog extension.
- m_findUI = new KoSearchContextUI( tqfind, findExtension() );
- m_replaceUI = new KoSearchContextUI( tqreplace, replaceExtension() );
+ m_findUI = new KoSearchContextUI( find, findExtension() );
+ m_replaceUI = new KoSearchContextUI( replace, replaceExtension() );
// Look whether we have a selection, and/or a cursor
setHasSelection(hasSelection);
setHasCursor(hasCursor);
@@ -147,8 +147,8 @@ void KoReplaceDia::slotOk()
KoFindReplace::KoFindReplace( TQWidget * tqparent, KoSearchDia * dialog, const TQValueList<KoTextObject *> & lstObject, KoTextView* textView )
- : m_tqfind( new KoTextFind( dialog->pattern(), dialog->options(), this, tqparent ) ),
- m_tqreplace( 0L ),
+ : m_find( new KoTextFind( dialog->pattern(), dialog->options(), this, tqparent ) ),
+ m_replace( 0L ),
m_searchContext( *dialog->searchContext() ),
m_replaceContext(),
m_searchContextEnabled( dialog->optionSelected() ),
@@ -158,12 +158,12 @@ KoFindReplace::KoFindReplace( TQWidget * tqparent, KoSearchDia * dialog, const T
m_textIterator( lstObject, textView, dialog->options() ),
m_lastTextObjectHighlighted( 0 )
{
- connectFind( m_tqfind );
+ connectFind( m_find );
}
KoFindReplace::KoFindReplace( TQWidget * tqparent, KoReplaceDia * dialog, const TQValueList<KoTextObject *> & lstObject, KoTextView* textView )
- : m_tqfind( 0L ),
- m_tqreplace( new KoTextReplace( dialog->pattern(), dialog->replacement(), dialog->options(), this, tqparent ) ),
+ : m_find( 0L ),
+ m_replace( new KoTextReplace( dialog->pattern(), dialog->replacement(), dialog->options(), this, tqparent ) ),
m_searchContext( *dialog->searchContext() ),
m_replaceContext( *dialog->replaceContext() ),
m_searchContextEnabled( dialog->optionFindSelected() ),
@@ -173,23 +173,23 @@ KoFindReplace::KoFindReplace( TQWidget * tqparent, KoReplaceDia * dialog, const
m_textIterator( lstObject, textView, dialog->options() ),
m_lastTextObjectHighlighted( 0 )
{
- connectFind( m_tqreplace );
- connect( m_tqreplace, TQT_SIGNAL( tqreplace( const TQString &, int , int, int ) ),
- this, TQT_SLOT( tqreplace( const TQString &, int , int,int ) ) );
+ connectFind( m_replace );
+ connect( m_replace, TQT_SIGNAL( replace( const TQString &, int , int, int ) ),
+ this, TQT_SLOT( replace( const TQString &, int , int,int ) ) );
}
-void KoFindReplace::connectFind( KFind* tqfind )
+void KoFindReplace::connectFind( KFind* find )
{
- connect( tqfind, TQT_SIGNAL( optionsChanged() ),
+ connect( find, TQT_SIGNAL( optionsChanged() ),
this, TQT_SLOT( optionsChanged() ) );
- connect( tqfind, TQT_SIGNAL( dialogClosed() ),
+ connect( find, TQT_SIGNAL( dialogClosed() ),
this, TQT_SLOT( dialogClosed() ) );
// Connect highlight signal to code which handles highlighting
// of found text.
- connect( tqfind, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ connect( find, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
this, TQT_SLOT( highlight( const TQString &, int, int ) ) );
// Connect findNext signal - called when pressing the button in the dialog
- connect( tqfind, TQT_SIGNAL( findNext() ),
+ connect( find, TQT_SIGNAL( findNext() ),
this, TQT_SLOT( slotFindNext() ) );
m_bInit = true;
m_currentParagraphModified = false;
@@ -204,8 +204,8 @@ KoFindReplace::~KoFindReplace()
{
removeHighlight();
//kdDebug(32500) << "KoFindReplace::~KoFindReplace" << endl;
- delete m_tqfind;
- delete m_tqreplace;
+ delete m_find;
+ delete m_replace;
}
void KoFindReplace::optionsChanged()
@@ -270,11 +270,11 @@ bool KoFindReplace::findNext()
m_currentParagraphModified = false;
}
- if ( m_tqfind )
+ if ( m_find )
// Let KFind inspect the text fragment, and display a dialog if a match is found
- res = m_tqfind->find();
+ res = m_find->find();
else
- res = m_tqreplace->replace();
+ res = m_replace->replace();
}
//kdDebug(32500) << k_funcinfo << "we're done. res=" << res << endl;
@@ -286,17 +286,17 @@ bool KoFindReplace::findNext()
m_textIterator.setOptions( m_textIterator.options() & ~KFindDialog::FromCursor );
m_textIterator.restart();
m_bInit = true;
- if ( m_tqfind )
- m_tqfind->resetCounts();
+ if ( m_find )
+ m_find->resetCounts();
else
- m_tqreplace->resetCounts();
+ m_replace->resetCounts();
return findNext();
}
else { // done, close the 'find next' dialog
- if ( m_tqfind )
- m_tqfind->closeFindNextDialog();
+ if ( m_find )
+ m_find->closeFindNextDialog();
else
- m_tqreplace->closeReplaceNextDialog();
+ m_replace->closeReplaceNextDialog();
}
return false;
}
@@ -327,15 +327,15 @@ bool KoFindReplace::findPrevious()
long KoFindReplace::options() const
{
- return m_tqfind ? m_tqfind->options() : m_tqreplace->options();
+ return m_find ? m_find->options() : m_replace->options();
}
void KoFindReplace::setOptions(long opt)
{
- if ( m_tqfind )
- m_tqfind->setOptions(opt);
+ if ( m_find )
+ m_find->setOptions(opt);
else
- m_tqreplace->setOptions(opt);
+ m_replace->setOptions(opt);
m_textIterator.setOptions( opt );
}
@@ -354,19 +354,19 @@ void KoFindReplace::highlight( const TQString &, int matchingIndex, int matching
m_lastTextObjectHighlighted->removeHighlight(true);
m_lastTextObjectHighlighted = m_textIterator.currentTextObject();
//kdDebug(32500) << "KoFindReplace::highlight " << matchingIndex << "," << matchingLength << endl;
- KDialogBase* dialog = m_tqfind ? m_tqfind->findNextDialog() : m_tqreplace->replaceNextDialog();
+ KDialogBase* dialog = m_find ? m_find->findNextDialog() : m_replace->replaceNextDialog();
highlightPortion(m_textIterator.currentParag(), m_offset + matchingIndex, matchingLength, m_lastTextObjectHighlighted->textDocument(), dialog );
}
-// slot connected to the 'tqreplace' signal
-void KoFindReplace::tqreplace( const TQString &text, int matchingIndex,
+// slot connected to the 'replace' signal
+void KoFindReplace::replace( const TQString &text, int matchingIndex,
int replacementLength, int matchedLength )
{
//kdDebug(32500) << "KoFindReplace::replace m_offset=" << m_offset << " matchingIndex=" << matchingIndex << " matchedLength=" << matchedLength << " options=" << options() << endl;
m_matchingIndex = matchingIndex;
int index = m_offset + matchingIndex;
- // highlight might not have happened (if 'prompt on tqreplace' is off)
+ // highlight might not have happened (if 'prompt on replace' is off)
if ( (options() & KReplaceDialog::PromptOnReplace) == 0 )
highlight( text, matchingIndex, matchedLength );
@@ -493,19 +493,19 @@ KMacroCommand* KoFindReplace::macroCommand()
void KoFindReplace::setActiveWindow()
{
- KDialogBase* dialog = m_tqfind ? m_tqfind->findNextDialog() : m_tqreplace->replaceNextDialog();
+ KDialogBase* dialog = m_find ? m_find->findNextDialog() : m_replace->replaceNextDialog();
if ( dialog )
dialog->setActiveWindow();
}
/*int KoFindReplace::numMatches() const
{
- return m_tqfind->numMatches();
+ return m_find->numMatches();
}
int KoFindReplace::numReplacements() const
{
- return m_tqreplace->numReplacements();
+ return m_replace->numReplacements();
}*/
////
@@ -921,10 +921,10 @@ bool KoFindReplace::validateMatch( const TQString & /*text*/, int index, int mat
bool KoFindReplace::shouldRestart()
{
- if ( m_tqfind )
- return m_tqfind->shouldRestart( true /*since text is editable*/, m_doCounting );
+ if ( m_find )
+ return m_find->shouldRestart( true /*since text is editable*/, m_doCounting );
else
- return m_tqreplace->shouldRestart( true /*since text is editable*/, m_doCounting );
+ return m_replace->shouldRestart( true /*since text is editable*/, m_doCounting );
}
#include "KoSearchDia.moc"
diff --git a/lib/kotext/KoSearchDia.h b/lib/kotext/KoSearchDia.h
index 56570f4d..49eb75d1 100644
--- a/lib/kotext/KoSearchDia.h
+++ b/lib/kotext/KoSearchDia.h
@@ -128,7 +128,7 @@ class KOTEXT_EXPORT KoSearchDia:
TQ_OBJECT
public:
- KoSearchDia( TQWidget *tqparent, const char *name, KoSearchContext *tqfind, bool hasSelection, bool hasCursor );
+ KoSearchDia( TQWidget *tqparent, const char *name, KoSearchContext *find, bool hasSelection, bool hasCursor );
KoSearchContext * searchContext() {
return m_findUI->context();
}
@@ -152,7 +152,7 @@ class KOTEXT_EXPORT KoReplaceDia:
public:
- KoReplaceDia( TQWidget *tqparent, const char *name, KoSearchContext *tqfind, KoSearchContext *tqreplace, bool hasSelection, bool hasCursor );
+ KoReplaceDia( TQWidget *tqparent, const char *name, KoSearchContext *find, KoSearchContext *replace, bool hasSelection, bool hasCursor );
KoSearchContext * searchContext() {
return m_findUI->context();
}
@@ -201,8 +201,8 @@ private:
};
/**
- * This class implements the 'tqfind' functionality ( the "search next, prompt" loop )
- * and the 'tqreplace' functionality. Same class, to allow centralizing the findNext() code.
+ * This class implements the 'find' functionality ( the "search next, prompt" loop )
+ * and the 'replace' functionality. Same class, to allow centralizing the findNext() code.
*/
class KOTEXT_EXPORT KoFindReplace : public TQObject
{
@@ -217,7 +217,7 @@ public:
return m_textIterator.currentParag();
}
- bool isReplace() const { return m_tqreplace != 0L; }
+ bool isReplace() const { return m_replace != 0L; }
bool shouldRestart();
@@ -252,10 +252,10 @@ protected:
long options() const;
void setOptions(long opt);
void removeHighlight();
- bool needData() const { return m_tqfind ? m_tqfind->needData() : m_tqreplace->needData(); }
+ bool needData() const { return m_find ? m_find->needData() : m_replace->needData(); }
void setData( const TQString& data, int startPos = -1 ) {
- if ( m_tqfind ) m_tqfind->setData( data, startPos );
- else m_tqreplace->setData( data, startPos );
+ if ( m_find ) m_find->setData( data, startPos );
+ else m_replace->setData( data, startPos );
}
protected slots:
@@ -263,15 +263,15 @@ protected slots:
void optionsChanged();
void dialogClosed();
void highlight( const TQString &text, int matchingIndex, int matchingLength );
- void tqreplace( const TQString &text, int replacementIndex, int replacedLength, int searchLength );
+ void replace( const TQString &text, int replacementIndex, int replacedLength, int searchLength );
void slotCurrentParagraphModified( int, int, int );
private:
- void connectFind( KFind* tqfind );
+ void connectFind( KFind* find );
// Only one of those two will be set
- KoTextFind * m_tqfind;
- KoTextReplace * m_tqreplace;
+ KoTextFind * m_find;
+ KoTextReplace * m_replace;
KoSearchContext m_searchContext;
KoSearchContext m_replaceContext;
@@ -282,7 +282,7 @@ private:
KMacroCommand *m_macroCmd;
int m_offset;
- int m_matchingIndex; // can be removed once we use kde-3.2 (for ktqfind::index())
+ int m_matchingIndex; // can be removed once we use kde-3.2 (for kfind::index())
KoTextIterator m_textIterator;
diff --git a/lib/kotext/KoStyleManager.cpp b/lib/kotext/KoStyleManager.cpp
index ef925289..e921ff1e 100644
--- a/lib/kotext/KoStyleManager.cpp
+++ b/lib/kotext/KoStyleManager.cpp
@@ -98,7 +98,7 @@ KoStyleManager::KoStyleManager( TQWidget *_parent, KoUnit::Unit unit,
newTab->setWidget( new KoParagTabulatorsWidget( unit, -1, newTab ) );
addTab( newTab );
- TQListBoxItem * item = m_stylesList->tqfindItem( activeStyleName );
+ TQListBoxItem * item = m_stylesList->findItem( activeStyleName );
m_stylesList->setCurrentItem( item ? m_stylesList->index(item) : 0 );
noSignals=false;
@@ -475,7 +475,7 @@ void KoStyleManager::deleteStyle() {
m_stylesList->removeItem(curItem);
m_styleCombo->removeItem(curItem);
- m_inheritCombo->listBox()->removeItem( m_inheritCombo->listBox()->index(m_inheritCombo->listBox()->tqfindItem(name )));
+ m_inheritCombo->listBox()->removeItem( m_inheritCombo->listBox()->index(m_inheritCombo->listBox()->findItem(name )));
numStyles--;
m_stylesList->setSelected( m_stylesList->currentItem(), true );
@@ -488,7 +488,7 @@ void KoStyleManager::moveUpStyle()
save();
const TQString currentStyleName = m_currentStyle->name();
const TQString currentStyleDisplayName = m_stylesList->currentText();
- int pos2 = m_styleOrder.tqfindIndex( currentStyleName );
+ int pos2 = m_styleOrder.findIndex( currentStyleName );
if ( pos2 != -1 )
{
m_styleOrder.remove( m_styleOrder.at(pos2));
@@ -516,7 +516,7 @@ void KoStyleManager::moveDownStyle()
save();
const TQString currentStyleName = m_currentStyle->name();
const TQString currentStyleDisplayName = m_stylesList->currentText();
- int pos2 = m_styleOrder.tqfindIndex( currentStyleName );
+ int pos2 = m_styleOrder.findIndex( currentStyleName );
if ( pos2 != -1 )
{
m_styleOrder.remove( m_styleOrder.at(pos2));
diff --git a/lib/kotext/KoTextCustomItem.cpp b/lib/kotext/KoTextCustomItem.cpp
index f6eaf7de..4b567e0b 100644
--- a/lib/kotext/KoTextCustomItem.cpp
+++ b/lib/kotext/KoTextCustomItem.cpp
@@ -125,7 +125,7 @@ void CustomItemsMap::insertItems( const KoTextCursor & startCursor, int size )
KoTextCursor cursor( startCursor );
for ( int i = 0; i < size; ++i )
{
- CustomItemsMap::Iterator it = tqfind( i );
+ CustomItemsMap::Iterator it = find( i );
if ( it != end() )
{
kdDebug(32500) << "CustomItemsMap::insertItems setting custom item " << it.data() << endl;
diff --git a/lib/kotext/KoTextDocument.cpp b/lib/kotext/KoTextDocument.cpp
index b5de2a73..de81299c 100644
--- a/lib/kotext/KoTextDocument.cpp
+++ b/lib/kotext/KoTextDocument.cpp
@@ -191,7 +191,7 @@ void KoTextDocument::setPlainText( const TQString &text )
//oText = text;
int lastNl = 0;
- int nl = text.tqfind( '\n' );
+ int nl = text.find( '\n' );
if ( nl == -1 ) {
lParag = createParag( this, lParag, 0 );
if ( !fParag )
@@ -216,7 +216,7 @@ void KoTextDocument::setPlainText( const TQString &text )
if ( nl == 0xffffff )
break;
lastNl = nl + 1;
- nl = text.tqfind( '\n', nl + 1 );
+ nl = text.find( '\n', nl + 1 );
if ( nl == -1 )
nl = 0xffffff;
}
@@ -283,7 +283,7 @@ void KoTextDocument::informParagraphDeleted( KoTextParag* parag )
void KoTextDocument::selectionStart( int id, int &paragId, int &index )
{
- TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
return;
KoTextDocumentSelection &sel = *it;
@@ -293,7 +293,7 @@ void KoTextDocument::selectionStart( int id, int &paragId, int &index )
KoTextCursor KoTextDocument::selectionStartCursor( int id)
{
- TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
return KoTextCursor( this );
KoTextDocumentSelection &sel = *it;
@@ -304,7 +304,7 @@ KoTextCursor KoTextDocument::selectionStartCursor( int id)
KoTextCursor KoTextDocument::selectionEndCursor( int id)
{
- TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
return KoTextCursor( this );
KoTextDocumentSelection &sel = *it;
@@ -315,7 +315,7 @@ KoTextCursor KoTextDocument::selectionEndCursor( int id)
void KoTextDocument::selectionEnd( int id, int &paragId, int &index )
{
- TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
return;
KoTextDocumentSelection &sel = *it;
@@ -325,7 +325,7 @@ void KoTextDocument::selectionEnd( int id, int &paragId, int &index )
bool KoTextDocument::isSelectionSwapped( int id )
{
- TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
return false;
KoTextDocumentSelection &sel = *it;
@@ -334,7 +334,7 @@ bool KoTextDocument::isSelectionSwapped( int id )
KoTextParag *KoTextDocument::selectionStart( int id )
{
- TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
return 0;
KoTextDocumentSelection &sel = *it;
@@ -345,7 +345,7 @@ KoTextParag *KoTextDocument::selectionStart( int id )
KoTextParag *KoTextDocument::selectionEnd( int id )
{
- TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
return 0;
KoTextDocumentSelection &sel = *it;
@@ -385,7 +385,7 @@ static void setSelectionEndHelper( int id, KoTextDocumentSelection &sel, KoTextC
bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor )
{
- TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
return FALSE;
KoTextDocumentSelection &sel = *it;
@@ -532,7 +532,7 @@ void KoTextDocument::selectAll( int id )
bool KoTextDocument::removeSelection( int id )
{
- TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
return FALSE;
@@ -584,7 +584,7 @@ bool KoTextDocument::removeSelection( int id )
TQString KoTextDocument::selectedText( int id, bool withCustom ) const
{
// ######## TODO: look at textFormat() and return rich text or plain text (like the text() method!)
- TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.find( id );
if ( it == selections.end() )
return TQString();
@@ -696,7 +696,7 @@ TQString KoTextDocument::copySelection( KoXmlWriter& writer, KoSavingContext& co
void KoTextDocument::setFormat( int id, const KoTextFormat *f, int flags )
{
- TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.find( id );
if ( it == selections.end() )
return;
@@ -735,7 +735,7 @@ void KoTextDocument::setFormat( int id, const KoTextFormat *f, int flags )
void KoTextDocument::removeSelectedText( int id, KoTextCursor *cursor )
{
- TQMap<int, KoTextDocumentSelection>::Iterator it = selections.tqfind( id );
+ TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
return;
@@ -813,7 +813,7 @@ KoTextCursor *KoTextDocument::redo( KoTextCursor *c )
return commandHistory->redo( c );
}
-bool KoTextDocument::tqfind( const TQString &expr, bool cs, bool wo, bool forward,
+bool KoTextDocument::find( const TQString &expr, bool cs, bool wo, bool forward,
int *parag, int *index, KoTextCursor *cursor )
{
KoTextParag *p = forward ? fParag : lParag;
@@ -842,7 +842,7 @@ bool KoTextDocument::tqfind( const TQString &expr, bool cs, bool wo, bool forwar
first = FALSE;
for ( ;; ) {
- int res = forward ? s.tqfind( expr, start, cs ) : s.tqfindRev( expr, start, cs );
+ int res = forward ? s.find( expr, start, cs ) : s.findRev( expr, start, cs );
if ( res == -1 )
break;
@@ -883,7 +883,7 @@ bool KoTextDocument::tqfind( const TQString &expr, bool cs, bool wo, bool forwar
bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const
{
- TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.tqfind( selId );
+ TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.find( selId );
if ( it == selections.end() )
return FALSE;
@@ -900,7 +900,7 @@ bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const
KoTextParag *p = startParag;
while ( p ) {
- if ( p->rect().tqcontains( pos ) ) {
+ if ( p->rect().contains( pos ) ) {
bool inSel = FALSE;
int selStart = p->selectionStart( selId );
int selEnd = p->selectionEnd( selId );
@@ -912,8 +912,8 @@ bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const
if ( i == selEnd )
break;
if ( p->at( i )->lineStart ) {
- y = (*p->lineStarts.tqfind( i ))->y;
- h = (*p->lineStarts.tqfind( i ))->h;
+ y = (*p->lineStarts.find( i ))->y;
+ h = (*p->lineStarts.find( i ))->h;
}
if ( pos.y() - p->rect().y() >= y && pos.y() - p->rect().y() <= y + h ) {
if ( inSel && pos.x() >= p->at( i )->x &&
@@ -989,7 +989,7 @@ bool KoTextDocument::visitSelection( int selectionId, KoParagVisitor* visitor, b
bool KoTextDocument::hasSelection( int id, bool visible ) const
{
- return ( selections.tqfind( id ) != selections.end() &&
+ return ( selections.find( id ) != selections.end() &&
( !visible ||
( (KoTextDocument*)this )->selectionStartCursor( id ) !=
( (KoTextDocument*)this )->selectionEndCursor( id ) ) );
diff --git a/lib/kotext/KoTextDocument.h b/lib/kotext/KoTextDocument.h
index 44bb0001..1f7739aa 100644
--- a/lib/kotext/KoTextDocument.h
+++ b/lib/kotext/KoTextDocument.h
@@ -55,7 +55,7 @@ public:
enum SelectionId {
Standard = 0,
InputMethodPreedit = 1,
- HighlightSelection = 2, // used to highlight during search/tqreplace
+ HighlightSelection = 2, // used to highlight during search/replace
Temp = 32000 // This selection must not be drawn, it's used e.g. by undo/redo to
// remove multiple lines with removeSelectedText()
};
@@ -135,7 +135,7 @@ public:
KoTextFormatCollection *formatCollection() const;
- bool tqfind( const TQString &expr, bool cs, bool wo, bool forward, int *parag, int *index, KoTextCursor *cursor );
+ bool find( const TQString &expr, bool cs, bool wo, bool forward, int *parag, int *index, KoTextCursor *cursor );
//void setTextFormat( TQt::TextFormat f );
//TQt::TextFormat textFormat() const;
diff --git a/lib/kotext/KoTextFormat.cpp b/lib/kotext/KoTextFormat.cpp
index 5a1570ac..27556ed6 100644
--- a/lib/kotext/KoTextFormat.cpp
+++ b/lib/kotext/KoTextFormat.cpp
@@ -189,7 +189,7 @@ KoTextFormat::~KoTextFormat()
// It should have been removed from the collection before being deleted.
#ifndef NDEBUG
if ( tqparent() && tqparent()->defaultFormat() ) // not when destroying the collection
- assert( ! ( tqparent()->dict().tqfind( key() ) == this ) );
+ assert( ! ( tqparent()->dict().find( key() ) == this ) );
// (has to be the same pointer, not only the same key)
#endif
delete d;
@@ -645,7 +645,7 @@ void KoTextFormat::save( KoGenStyle& gs, KoSavingContext& context, KoTextFormat
{
TQString lang = m_language;
TQString country;
- const int pos = lang.tqfind( '_' );
+ const int pos = lang.find( '_' );
if ( pos != -1 ) {
country = lang.mid( pos + 1 );
lang = lang.left( pos );
@@ -1737,7 +1737,7 @@ KoTextFormat *KoTextFormatCollection::format( const KoTextFormat *f )
}
#endif
- KoTextFormat *fm = cKey.tqfind( f->key() );
+ KoTextFormat *fm = cKey.find( f->key() );
if ( fm ) {
#ifdef DEBUG_COLLECTION
kdDebug(32500) << " format(f) need '" << f->key() << "', normal case!" << endl;
@@ -1783,7 +1783,7 @@ KoTextFormat *KoTextFormatCollection::format( const KoTextFormat *of, const KoTe
#endif
cres->copyFormat( *nf, flags );
- KoTextFormat *fm = cKey.tqfind( cres->key() );
+ KoTextFormat *fm = cKey.find( cres->key() );
if ( !fm ) {
#ifdef DEBUG_COLLECTION
kdDebug(32500) << " format(of,nf,flags) mix of '" << of->key() << "' and '" << nf->key() << ", worst case!" << endl;
@@ -1814,7 +1814,7 @@ KoTextFormat *KoTextFormatCollection::format( const TQFont &f, const TQColor &c,
}
TQString key = KoTextFormat::getKey( f, c, FALSE, KoTextFormat::AlignNormal );
- cachedFormat = cKey.tqfind( key );
+ cachedFormat = cKey.find( key );
cfont = f;
ccol = c;
diff --git a/lib/kotext/KoTextIterator.cpp b/lib/kotext/KoTextIterator.cpp
index ed320ed1..73468f7e 100644
--- a/lib/kotext/KoTextIterator.cpp
+++ b/lib/kotext/KoTextIterator.cpp
@@ -89,7 +89,7 @@ void KoTextIterator::init( const TQValueList<KoTextObject *> & lstObjects, KoTex
m_lstObjects.pop_front();
m_lstObjects.push_back( textobj );
if ( m_lstObjects.first() == initialFirst ) { // safety
- kdWarning(32500) << "Didn't manage to tqfind " << textView->textObject() << " in the list of textobjects!!!" << endl;
+ kdWarning(32500) << "Didn't manage to find " << textView->textObject() << " in the list of textobjects!!!" << endl;
break;
}
}
@@ -99,7 +99,7 @@ void KoTextIterator::init( const TQValueList<KoTextObject *> & lstObjects, KoTex
m_lstObjects.pop_back();
m_lstObjects.push_front( textobj );
if ( m_lstObjects.first() == initialFirst ) { // safety
- kdWarning(32500) << "Didn't manage to tqfind " << textView->textObject() << " in the list of textobjects!!!" << endl;
+ kdWarning(32500) << "Didn't manage to find " << textView->textObject() << " in the list of textobjects!!!" << endl;
break;
}
}
diff --git a/lib/kotext/KoTextObject.cpp b/lib/kotext/KoTextObject.cpp
index 6289482b..d9a2f054 100644
--- a/lib/kotext/KoTextObject.cpp
+++ b/lib/kotext/KoTextObject.cpp
@@ -508,7 +508,7 @@ void KoTextObject::doKeyboardAction( KoTextCursor * cursor, KoTextFormat * & /*c
if ( cursor->parag() )
{
TQString last_line = cursor->parag()->toString();
- last_line.remove(0,last_line.tqfind(' ')+1);
+ last_line.remove(0,last_line.find(' ')+1);
if( last_line.isEmpty() && cursor->parag()->counter() && cursor->parag()->counter()->numbering() == KoParagCounter::NUM_LIST ) //if the previous line the in paragraph is empty
{
@@ -635,7 +635,7 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat,
clearUndoRedoInfo();
checkUndoRedoInfo( cursor, UndoRedoInfo::Insert );
if ( !undoRedoInfo.valid() ) {
- if ( !commandName.isNull() ) // see tqreplace-selection
+ if ( !commandName.isNull() ) // see replace-selection
newPlaceHolderCommand( commandName );
undoRedoInfo.id = cursor->parag()->paragId();
undoRedoInfo.index = cursor->index();
@@ -726,7 +726,7 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat,
selectionChangedNotify(); // does the tqrepaint
}
if ( !customItemsMap.isEmpty()
- && !commandName.isNull() /* see tqreplace-selection; #139890 */ ) {
+ && !commandName.isNull() /* see replace-selection; #139890 */ ) {
clearUndoRedoInfo();
}
@@ -749,7 +749,7 @@ void KoTextObject::pasteText( KoTextCursor * cursor, const TQString & text, KoTe
TQString t = text;
// Need to convert CRLF to NL
TQRegExp crlf( TQString::tqfromLatin1("\r\n") );
- t.tqreplace( crlf, TQChar('\n') );
+ t.replace( crlf, TQChar('\n') );
// Convert non-printable chars
for ( int i=0; (uint) i<t.length(); i++ ) {
if ( t[ i ] < ' ' && t[ i ] != '\n' && t[ i ] != '\t' )
@@ -949,7 +949,7 @@ void KoTextObject::applyStyleChange( KoStyleChangeDefMap changed )
KoTextParag *p = textdoc->firstParag();
while ( p ) {
- KoStyleChangeDefMap::Iterator it = changed.tqfind( p->style() );
+ KoStyleChangeDefMap::Iterator it = changed.find( p->style() );
if ( it != changed.end() )
{
if ( (*it).paragLayoutChanged == -1 || (*it).formatChanged == -1 ) // Style has been deleted
@@ -1592,7 +1592,7 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ
if ( protectContent() )
return 0L;
Q_ASSERT( ( insertFlags & DoNotRemoveSelected ) == 0 ); // nonsensical
- const bool tqrepaint = ( insertFlags & DoNotRepaint ) == 0; // DoNotRepaint is set during search/tqreplace
+ const bool tqrepaint = ( insertFlags & DoNotRepaint ) == 0; // DoNotRepaint is set during search/replace
if ( tqrepaint )
emit hideCursor();
// This could be improved to use a macro command only when there's a selection to remove.
@@ -1699,7 +1699,7 @@ void KoTextObject::selectionChangedNotify( bool enableActions /* = true */)
void KoTextObject::setViewArea( TQWidget* w, int maxY )
{
- m_mapViewAreas.tqreplace( w, maxY );
+ m_mapViewAreas.replace( w, maxY );
}
void KoTextObject::setLastFormattedParag( KoTextParag *parag )
@@ -2045,9 +2045,9 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty
{
TQChar prev = text.tqat(TQMAX(i-1,0));
if(i==0 || prev == ' ' || prev == '\n' || prev == '\t')
- text=text.tqreplace(i, 1, text.tqat(i).upper() );
+ text=text.replace(i, 1, text.tqat(i).upper() );
else
- text=text.tqreplace(i, 1, text.tqat(i).lower() );
+ text=text.replace(i, 1, text.tqat(i).lower() );
}
}
break;
@@ -2059,7 +2059,7 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty
repl=repl.upper();
else if(text.tqat(i).lower()!=text.tqat(i))
repl=repl.lower();
- text=text.tqreplace(i, 1, repl );
+ text=text.replace(i, 1, repl );
}
break;
case KoChangeCaseDia::SentenceCase:
@@ -2069,7 +2069,7 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty
{
TQChar prev = text.at(TQMAX(i-1,0));
if(i==0 || prev == '\n' ||prev.isPunct())
- text=text.tqreplace(i, 1, text.tqat(i).upper() );
+ text=text.replace(i, 1, text.tqat(i).upper() );
}
}
break;
@@ -2343,21 +2343,21 @@ bool KoTextObject::statistics( TQProgressDialog *progress, ulong & charsWithSpac
TQStringList syls = TQStringList::split(re, word);
int word_syllables = 0;
for ( TQStringList::Iterator it = subs_syl.begin(); it != subs_syl.end(); ++it ) {
- if( word.tqfind(*it, 0, false) != -1 )
+ if( word.find(*it, 0, false) != -1 )
word_syllables--;
}
for ( TQStringList::Iterator it = subs_syl_regexp.begin(); it != subs_syl_regexp.end(); ++it ) {
re.setPattern(*it);
- if( word.tqfind(re) != -1 )
+ if( word.find(re) != -1 )
word_syllables--;
}
for ( TQStringList::Iterator it = add_syl.begin(); it != add_syl.end(); ++it ) {
- if( word.tqfind(*it, 0, false) != -1 )
+ if( word.find(*it, 0, false) != -1 )
word_syllables++;
}
for ( TQStringList::Iterator it = add_syl_regexp.begin(); it != add_syl_regexp.end(); ++it ) {
re.setPattern(*it);
- if( word.tqfind(re) != -1 )
+ if( word.find(re) != -1 )
word_syllables++;
}
word_syllables += syls.count();
@@ -2375,11 +2375,11 @@ bool KoTextObject::statistics( TQProgressDialog *progress, ulong & charsWithSpac
s = s + ".";
}
re.setPattern("[.?!]+"); // count "..." as only one "."
- s.tqreplace(re, ".");
+ s.replace(re, ".");
re.setPattern("\\d\\.\\d"); // don't count floating point numbers as sentences
- s.tqreplace(re, "0,0");
+ s.replace(re, "0,0");
re.setPattern("[A-Z]\\.+"); // don't count "U.S.A." as three sentences
- s.tqreplace(re, "*");
+ s.replace(re, "*");
for ( uint i = 0 ; i < s.length() ; ++i )
{
TQChar ch = s[i];
diff --git a/lib/kotext/KoTextObject.h b/lib/kotext/KoTextObject.h
index e1519ff4..a463d0fc 100644
--- a/lib/kotext/KoTextObject.h
+++ b/lib/kotext/KoTextObject.h
@@ -305,7 +305,7 @@ public:
bool removeSelected );
void selectAll( bool select );
- /** Highlighting support (for search/tqreplace, spellchecking etc.).
+ /** Highlighting support (for search/replace, spellchecking etc.).
* Don't forget to ensure the paragraph is visible.
*/
void highlightPortion( KoTextParag * parag, int index, int length, bool tqrepaint );
diff --git a/lib/kotext/KoTextParag.cpp b/lib/kotext/KoTextParag.cpp
index f516b7ca..633bdb58 100644
--- a/lib/kotext/KoTextParag.cpp
+++ b/lib/kotext/KoTextParag.cpp
@@ -510,7 +510,7 @@ KoTextStringChar *KoTextParag::lineStartOfChar( int i, int *index, int *line ) c
--l;
}
- kdWarning(32500) << "KoTextParag::lineStartOfChar: couldn't tqfind " << i << endl;
+ kdWarning(32500) << "KoTextParag::lineStartOfChar: couldn't find " << i << endl;
return 0;
}
@@ -537,7 +537,7 @@ KoTextStringChar *KoTextParag::lineStartOfLine( int line, int *index ) const
return &str->at( i );
}
- kdWarning(32500) << "KoTextParag::lineStartOfLine: couldn't tqfind " << line << endl;
+ kdWarning(32500) << "KoTextParag::lineStartOfLine: couldn't find " << line << endl;
return 0;
}
@@ -705,7 +705,7 @@ TQChar::Direction KoTextParag::direction() const
void KoTextParag::setSelection( int id, int start, int end )
{
- TQMap<int, KoTextParagSelection>::ConstIterator it = selections().tqfind( id );
+ TQMap<int, KoTextParagSelection>::ConstIterator it = selections().find( id );
if ( it != mSelections->end() ) {
if ( start == ( *it ).start && end == ( *it ).end )
return;
@@ -731,7 +731,7 @@ int KoTextParag::selectionStart( int id ) const
{
if ( !mSelections )
return -1;
- TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->tqfind( id );
+ TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id );
if ( it == mSelections->end() )
return -1;
return ( *it ).start;
@@ -741,7 +741,7 @@ int KoTextParag::selectionEnd( int id ) const
{
if ( !mSelections )
return -1;
- TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->tqfind( id );
+ TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id );
if ( it == mSelections->end() )
return -1;
return ( *it ).end;
@@ -751,7 +751,7 @@ bool KoTextParag::hasSelection( int id ) const
{
if ( !mSelections )
return FALSE;
- TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->tqfind( id );
+ TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id );
if ( it == mSelections->end() )
return FALSE;
return ( *it ).start != ( *it ).end || length() == 1;
@@ -761,7 +761,7 @@ bool KoTextParag::fullSelected( int id ) const
{
if ( !mSelections )
return FALSE;
- TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->tqfind( id );
+ TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id );
if ( it == mSelections->end() )
return FALSE;
return ( *it ).start == 0 && ( *it ).end == str->length() - 1;
@@ -1509,7 +1509,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText
int xstart, xend = 0;
TQString qstr = str->toString();
- qstr.tqreplace( TQChar(0x00a0U), ' ' ); // Not all fonts have non-breakable-space glyph
+ qstr.replace( TQChar(0x00a0U), ' ' ); // Not all fonts have non-breakable-space glyph
const int nSels = doc ? doc->numSelections() : 1;
TQMemArray<int> selectionStarts( nSels );
@@ -1927,7 +1927,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s
painter.drawText( startX, posY, str, start, len, dir );
}
}
- if ( str[ start ] == '\t' && m_tabCache.tqcontains( start ) ) {
+ if ( str[ start ] == '\t' && m_tabCache.contains( start ) ) {
painter.save();
KoTextZoomHandler * zh = textDocument()->paintingZoomHandler();
const KoTabulator& tab = m_layout.tabList()[ m_tabCache[ start ] ];
@@ -2381,7 +2381,7 @@ void KoTextParag::printRTDebug( int info )
static const char * const tabtype[] = { "T_LEFT", "T_CENTER", "T_RIGHT", "T_DEC_PNT", "error!!!" };
KoTabulatorList tabList = m_layout.tabList();
if ( tabList.isEmpty() ) {
- if ( str->toString().tqfind( '\t' ) != -1 )
+ if ( str->toString().find( '\t' ) != -1 )
kdDebug(32500) << "Tab width: " << textDocument()->tabStopWidth() << endl;
} else {
KoTabulatorList::Iterator it = tabList.begin();
diff --git a/lib/kotext/KoTextView.cpp b/lib/kotext/KoTextView.cpp
index cea0fae1..32e82b73 100644
--- a/lib/kotext/KoTextView.cpp
+++ b/lib/kotext/KoTextView.cpp
@@ -1095,7 +1095,7 @@ TQPtrList<KAction> KoTextView::dataToolActionList(KInstance * instance, const TQ
if ( textObject()->hasSelection() )
{
text = textObject()->selectedText();
- if ( text.tqfind(' ') == -1 && text.tqfind('\t') == -1 && text.tqfind(KoTextObject::customItemChar()) == -1 )
+ if ( text.find(' ') == -1 && text.find('\t') == -1 && text.find(KoTextObject::customItemChar()) == -1 )
{
m_singleWord = true;
}
@@ -1103,7 +1103,7 @@ TQPtrList<KAction> KoTextView::dataToolActionList(KInstance * instance, const TQ
{
m_singleWord = false;
//laurent : don't try to search thesaurus when we have a customItemChar.
- if( text.tqfind(KoTextObject::customItemChar())!=-1)
+ if( text.find(KoTextObject::customItemChar())!=-1)
text = TQString();
}
}
@@ -1166,13 +1166,13 @@ void KoTextView::slotToolActivated( const KDataToolInfo & info, const TQString &
TQString mimetype = "application/x-qrichtext";
TQString datatype = "KoTextString";
// If unsupported, try text/plain
- if ( !info.mimeTypes().tqcontains( mimetype ) )
+ if ( !info.mimeTypes().contains( mimetype ) )
{
mimetype = "text/plain";
datatype = TQSTRING_OBJECT_NAME_STRING;
}
// If unsupported (and if we have a single word indeed), try application/x-singleword
- if ( !info.mimeTypes().tqcontains( mimetype ) && m_singleWord )
+ if ( !info.mimeTypes().contains( mimetype ) && m_singleWord )
mimetype = "application/x-singleword";
kdDebug(32500) << "Running tool with datatype=" << datatype << " mimetype=" << mimetype << endl;
diff --git a/lib/kotext/KoUserStyleCollection.h b/lib/kotext/KoUserStyleCollection.h
index 9330ca4d..e9a771a9 100644
--- a/lib/kotext/KoUserStyleCollection.h
+++ b/lib/kotext/KoUserStyleCollection.h
@@ -61,7 +61,7 @@ public:
/**
* @return the index of @p style in the collection
*/
- int indexOf( KoUserStyle* style ) const { return m_styleList.tqfindIndex( style ); }
+ int indexOf( KoUserStyle* style ) const { return m_styleList.findIndex( style ); }
/**
* Return the list of all styles in the collection.
diff --git a/lib/kotext/KoVariable.cpp b/lib/kotext/KoVariable.cpp
index bd03ecf9..0f8edaf8 100644
--- a/lib/kotext/KoVariable.cpp
+++ b/lib/kotext/KoVariable.cpp
@@ -245,8 +245,8 @@ TQString KoVariableDateFormat::convert( const TQVariant& data ) const
TQString tmp ( dateTime.toString(m_strFormat) );
const int month = dateTime.date().month();
- tmp.tqreplace("PPPP", KGlobal::locale()->calendar()->monthNamePossessive(month, false)); //long possessive month name
- tmp.tqreplace("PPP", KGlobal::locale()->calendar()->monthNamePossessive(month, true)); //short possessive month name
+ tmp.replace("PPPP", KGlobal::locale()->calendar()->monthNamePossessive(month, false)); //long possessive month name
+ tmp.replace("PPP", KGlobal::locale()->calendar()->monthNamePossessive(month, true)); //short possessive month name
return tmp;
}
@@ -508,7 +508,7 @@ void KoVariableCollection::registerVariable( KoVariable *var )
void KoVariableCollection::unregisterVariable( KoVariable *var )
{
- variables.take( variables.tqfindRef( var ) );
+ variables.take( variables.findRef( var ) );
}
TQValueList<KoVariable *> KoVariableCollection::recalcVariables(int type)
@@ -554,14 +554,14 @@ void KoVariableCollection::setVariableValue( const TQString &name, const TQStrin
TQString KoVariableCollection::getVariableValue( const TQString &name ) const
{
- if ( !varValues.tqcontains( name ) )
+ if ( !varValues.contains( name ) )
return i18n( "No value" );
return varValues[ name ];
}
bool KoVariableCollection::customVariableExist(const TQString &varname) const
{
- return varValues.tqcontains( varname );
+ return varValues.contains( varname );
}
void KoVariableCollection::setVariableSelected(KoVariable * var)
@@ -757,7 +757,7 @@ KoVariable* KoVariableCollection::loadOasisField( KoTextDocument* textdoc, const
TQString dataStyleName = tag.attributeNS( KoXmlNS::style, "data-style-name", TQString() );
TQString dateFormat = "locale";
const KoOasisStyles::DataFormatsMap& map = context.oasisStyles().dataFormats();
- KoOasisStyles::DataFormatsMap::const_iterator it = map.tqfind( dataStyleName );
+ KoOasisStyles::DataFormatsMap::const_iterator it = map.find( dataStyleName );
if ( it != map.end() )
dateFormat = (*it).formatStr;
@@ -1402,7 +1402,7 @@ TQCString KoDateVariable::formatStr(int & correct)
const TQString tmpString(config->readEntry("Last Used"+num));
if(tmpString.startsWith("locale"))
continue;
- else if(stringList.tqcontains(tmpString))
+ else if(stringList.contains(tmpString))
continue;
else if(!tmpString.isEmpty())
{
@@ -1614,7 +1614,7 @@ TQCString KoTimeVariable::formatStr(int & _correct)
TQString tmpString(config->readEntry("Last Used"+num));
if(tmpString.startsWith("locale"))
continue;
- else if(stringList.tqcontains(tmpString))
+ else if(stringList.contains(tmpString))
continue;
else if(!tmpString.isEmpty())
{
@@ -2225,7 +2225,7 @@ void KoFieldVariable::recalc()
case VST_FILENAMEWITHOUTEXTENSION:
{
TQString file=m_doc->url().fileName();
- int pos=file.tqfindRev(".");
+ int pos=file.findRev(".");
if(pos !=-1)
value=file.mid(0,pos);
else
diff --git a/lib/kotext/TimeFormatWidget.cpp b/lib/kotext/TimeFormatWidget.cpp
index 187b2929..34fd7cb2 100644
--- a/lib/kotext/TimeFormatWidget.cpp
+++ b/lib/kotext/TimeFormatWidget.cpp
@@ -116,7 +116,7 @@ TQString TimeFormatWidget::resultString()
{
const TQString lookup(combo1->currentText());
const TQStringList listTranslated( KoVariableTimeFormat::staticTranslatedFormatPropsList() );
- const int index = listTranslated.tqfindIndex(lookup);
+ const int index = listTranslated.findIndex(lookup);
if (index==-1)
return (lookup); // Either costum or non-locale
diff --git a/lib/kotext/kohyphen/hyphdicts/hyph_da.dic b/lib/kotext/kohyphen/hyphdicts/hyph_da.dic
index 2a7154fb..77d0666f 100644
--- a/lib/kotext/kohyphen/hyphdicts/hyph_da.dic
+++ b/lib/kotext/kohyphen/hyphdicts/hyph_da.dic
@@ -540,7 +540,7 @@ le4mo
4leu
l1f
lfin4
-ltqfind5
+lfind5
l1go1
l3h
li4ga
diff --git a/lib/kotext/kohyphen/hyphdicts/hyph_hu.dic b/lib/kotext/kohyphen/hyphdicts/hyph_hu.dic
index 8b1bdce4..2137b1f9 100644
--- a/lib/kotext/kohyphen/hyphdicts/hyph_hu.dic
+++ b/lib/kotext/kohyphen/hyphdicts/hyph_hu.dic
@@ -25668,7 +25668,7 @@ fimeg1
fi1me
2f1i2nas
fi1na
-2tqfind
+2find
fin1os2z
fi1no
fi2n1�
diff --git a/lib/kotext/kohyphen/hyphdicts/hyph_nl.dic b/lib/kotext/kohyphen/hyphdicts/hyph_nl.dic
index a5b6f05c..0a5b745b 100644
--- a/lib/kotext/kohyphen/hyphdicts/hyph_nl.dic
+++ b/lib/kotext/kohyphen/hyphdicts/hyph_nl.dic
@@ -3408,7 +3408,7 @@ fik4st
fil4m3a
film5on
fi3lo
-4tqfind
+4find
3fini
f3inj
4fink
diff --git a/lib/kotext/kohyphen/kohyphen.cpp b/lib/kotext/kohyphen/kohyphen.cpp
index 29d13c37..d8a0374e 100644
--- a/lib/kotext/kohyphen/kohyphen.cpp
+++ b/lib/kotext/kohyphen/kohyphen.cpp
@@ -71,7 +71,7 @@ KoHyphenator::KoHyphenator()
for (uint i = 0; i < records.count(); i++)
{
TQDomNamedNodeMap attr = records.item(i).attributes();
- if (attr.tqcontains("lang") && attr.tqcontains("encoding")) {
+ if (attr.contains("lang") && attr.contains("encoding")) {
TQString lang = attr.namedItem("lang").nodeValue();
TQString encoding = attr.namedItem("encoding").nodeValue();
#ifdef DEBUG_HYPHENATOR
@@ -171,18 +171,18 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const
{
TQString lang( _lang );
//only load dictionary when encoding info is present
- if (encodings.tqfind(lang) == encodings.end())
+ if (encodings.find(lang) == encodings.end())
{
- int underscore = lang.tqfind('_');
+ int underscore = lang.find('_');
if ( underscore > -1 ) {
lang.truncate( underscore );
- if (encodings.tqfind(lang) == encodings.end())
+ if (encodings.find(lang) == encodings.end())
throw KoHyphenatorException( TQString("No dictionary for %1").tqarg(lang) );
}
else
throw KoHyphenatorException( TQString("No dictionary for %1").tqarg(lang) );
}
- if (dicts.tqfind(lang) == dicts.end())
+ if (dicts.find(lang) == dicts.end())
{
#ifdef DEBUG_HYPHENATOR
kdDebug() << "Searching dictionary for '" << lang << "' language..." << endl;
@@ -194,7 +194,7 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const
kdDebug() << "Loading dictionary for '" << lang << "' language: path = " << path << endl;
#endif
const_cast<KoHyphenator*>(this)->dicts.insert( lang, hnj_hyphen_load(TQFile::encodeName(path)) );
- if (dicts.tqfind(lang) == dicts.end())
+ if (dicts.find(lang) == dicts.end())
{
#ifdef DEBUG_HYPHENATOR
kdDebug() << "No dictionary loaded" << endl;
@@ -210,14 +210,14 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const
TQTextCodec* KoHyphenator::codecForLang(const TQString& lang) const
{
- EncodingMap::Iterator it = encodings.tqfind(lang);
+ EncodingMap::Iterator it = encodings.find(lang);
if (it == encodings.end())
{
- int underscore = lang.tqfind('_');
+ int underscore = lang.find('_');
if ( underscore > -1 ) {
TQString _lang( lang );
_lang.truncate( underscore );
- it = encodings.tqfind(_lang);
+ it = encodings.find(_lang);
}
}
if (it != encodings.end())
diff --git a/lib/kotext/kohyphen/kohyphentest.cpp b/lib/kotext/kohyphen/kohyphentest.cpp
index d5d8daff..96e0bd2d 100644
--- a/lib/kotext/kohyphen/kohyphentest.cpp
+++ b/lib/kotext/kohyphen/kohyphentest.cpp
@@ -34,7 +34,7 @@ void check_hyphenation( const TQStringList& tests, const TQStringList& results,
for ( it = tests.begin(), itres = results.begin(); it != tests.end() ; ++it, ++itres ) {
TQString result = hypher->hyphenate((*it), lang);
kdDebug() << (*it) << " hyphenates like this: " << result << endl;
- check( result.tqreplace(TQChar(0xad),'-'), *itres );
+ check( result.replace(TQChar(0xad),'-'), *itres );
}
}
diff --git a/lib/kross/api/callable.cpp b/lib/kross/api/callable.cpp
index a7a394ba..f095f596 100644
--- a/lib/kross/api/callable.cpp
+++ b/lib/kross/api/callable.cpp
@@ -47,7 +47,7 @@ const TQString Callable::getClassName() const
bool Callable::hasChild(const TQString& name) const
{
- return m_tqchildren.tqcontains(name);
+ return m_tqchildren.contains(name);
}
Object::Ptr Callable::getChild(const TQString& name) const
@@ -66,7 +66,7 @@ bool Callable::addChild(const TQString& name, Object* object)
krossdebug( TQString("Kross::Api::Callable::addChild() object.name='%1' object.classname='%2'")
.tqarg(name).tqarg(object->getClassName()) );
#endif
- m_tqchildren.tqreplace(name, Object::Ptr(object));
+ m_tqchildren.replace(name, Object::Ptr(object));
return true;
}
diff --git a/lib/kross/api/event.h b/lib/kross/api/event.h
index e378052b..26a92117 100644
--- a/lib/kross/api/event.h
+++ b/lib/kross/api/event.h
@@ -97,7 +97,7 @@ namespace Kross { namespace Api {
*/
inline void addFunction(const TQString& name, FunctionPtr function)
{
- m_functions.tqreplace(name, new Function0<T>(static_cast<T*>(this), function));
+ m_functions.replace(name, new Function0<T>(static_cast<T*>(this), function));
}
/**
@@ -114,7 +114,7 @@ namespace Kross { namespace Api {
*/
inline void addFunction(const TQString& name, Function* function)
{
- m_functions.tqreplace(name, function);
+ m_functions.replace(name, function);
}
/**
@@ -124,7 +124,7 @@ namespace Kross { namespace Api {
template<class RETURNOBJ, class ARG1OBJ, class ARG2OBJ, class ARG3OBJ, class ARG4OBJ, class INSTANCE, typename METHOD>
inline void addFunction4(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0, ARG3OBJ* arg3 = 0, ARG4OBJ* arg4 = 0)
{
- m_functions.tqreplace(name,
+ m_functions.replace(name,
new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ, ARG2OBJ, ARG3OBJ, ARG4OBJ>
(instance, method, arg1, arg2, arg3, arg4)
);
@@ -134,7 +134,7 @@ namespace Kross { namespace Api {
template<class RETURNOBJ, class ARG1OBJ, class ARG2OBJ, class ARG3OBJ, class INSTANCE, typename METHOD>
inline void addFunction3(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0, ARG3OBJ* arg3 = 0)
{
- m_functions.tqreplace(name,
+ m_functions.replace(name,
new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ, ARG2OBJ, ARG3OBJ>
(instance, method, arg1, arg2, arg3)
);
@@ -144,7 +144,7 @@ namespace Kross { namespace Api {
template<class RETURNOBJ, class ARG1OBJ, class ARG2OBJ, class INSTANCE, typename METHOD>
inline void addFunction2(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0)
{
- m_functions.tqreplace(name,
+ m_functions.replace(name,
new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ, ARG2OBJ>
(instance, method, arg1, arg2)
);
@@ -154,7 +154,7 @@ namespace Kross { namespace Api {
template<class RETURNOBJ, class ARG1OBJ, class INSTANCE, typename METHOD>
inline void addFunction1(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0)
{
- m_functions.tqreplace(name,
+ m_functions.replace(name,
new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ>
(instance, method, arg1)
);
@@ -164,7 +164,7 @@ namespace Kross { namespace Api {
template<class RETURNOBJ, class INSTANCE, typename METHOD>
inline void addFunction0(const TQString& name, INSTANCE* instance, METHOD method)
{
- m_functions.tqreplace(name,
+ m_functions.replace(name,
new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ>
(instance, method)
);
@@ -177,7 +177,7 @@ namespace Kross { namespace Api {
*/
bool isAFunction(const TQString & name) const
{
- return m_functions.tqcontains(name);
+ return m_functions.contains(name);
}
/**
diff --git a/lib/kross/api/eventsignal.cpp b/lib/kross/api/eventsignal.cpp
index c3e94620..e3a8e54f 100644
--- a/lib/kross/api/eventsignal.cpp
+++ b/lib/kross/api/eventsignal.cpp
@@ -54,7 +54,7 @@ Object::Ptr EventSignal::call(const TQString& /*name*/, KSharedPtr<List> argumen
if(n.startsWith("2")) // Remove prefix of SIGNAL-macros
n.remove(0,1);
- int signalid = m_sender->tqmetaObject()->tqfindSignal(n.latin1(), false);
+ int signalid = m_sender->tqmetaObject()->findSignal(n.latin1(), false);
if(signalid < 0)
throw new Exception(TQString("No such signal '%1'.").tqarg(n));
diff --git a/lib/kross/api/eventslot.cpp b/lib/kross/api/eventslot.cpp
index fed92ea0..fd566d31 100644
--- a/lib/kross/api/eventslot.cpp
+++ b/lib/kross/api/eventslot.cpp
@@ -54,7 +54,7 @@ Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments)
if(n.startsWith("1")) // Remove prefix of SLOT-macros
n.remove(0,1);
- int slotid = m_receiver->tqmetaObject()->tqfindSlot(n.latin1(), false);
+ int slotid = m_receiver->tqmetaObject()->findSlot(n.latin1(), false);
if(slotid < 0)
throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(n)) );
@@ -69,8 +69,8 @@ Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments)
TQCString EventSlot::getSlot(const TQCString& signal)
{
TQString signature = TQString(signal).mid(1);
- int startpos = signature.tqfind("(");
- int endpos = signature.tqfindRev(")");
+ int startpos = signature.find("(");
+ int endpos = signature.findRev(")");
if(startpos < 0 || startpos > endpos) {
krosswarning( TQString("EventSlot::getSlot(%1) Invalid signal.").tqarg(signal) );
return TQCString();
diff --git a/lib/kross/api/interpreter.cpp b/lib/kross/api/interpreter.cpp
index c6796e1f..8d266930 100644
--- a/lib/kross/api/interpreter.cpp
+++ b/lib/kross/api/interpreter.cpp
@@ -71,7 +71,7 @@ const TQStringList InterpreterInfo::getMimeTypes()
bool InterpreterInfo::hasOption(const TQString& key)
{
- return m_options.tqcontains(key);
+ return m_options.contains(key);
}
InterpreterInfo::Option* InterpreterInfo::getOption(const TQString name)
diff --git a/lib/kross/api/qtobject.cpp b/lib/kross/api/qtobject.cpp
index 2aa8f408..243f0503 100644
--- a/lib/kross/api/qtobject.cpp
+++ b/lib/kross/api/qtobject.cpp
@@ -90,8 +90,8 @@ TQObject* QtObject::getObject()
TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments)
{
- int startpos = signature.tqfind("(");
- int endpos = signature.tqfindRev(")");
+ int startpos = signature.find("(");
+ int endpos = signature.findRev(")");
if(startpos < 0 || startpos > endpos)
throw Exception::Ptr( new Exception(TQString("Invalid TQt signal or slot signature '%1'").tqarg(signature)) );
@@ -112,7 +112,7 @@ TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments)
// Fill parameters.
uint argcount = arguments ? arguments->count() : 0;
for(uint i = 0; i < paramcount; i++) {
- if(paramlist[i].tqfind(TQSTRING_OBJECT_NAME_STRING) >= 0) {
+ if(paramlist[i].find(TQSTRING_OBJECT_NAME_STRING) >= 0) {
const TQString s = (argcount > i) ? Variant::toString(arguments->item(i)) : TQString();
//krossdebug(TQString("EventSlot::toTQUObject s=%1").tqarg(s));
static_TQUType_TQString.set( &(uo[i + 1]), s );
@@ -135,7 +135,7 @@ Kross::Api::Object::Ptr QtObject::propertyNames(Kross::Api::List::Ptr)
Kross::Api::Object::Ptr QtObject::hasProperty(Kross::Api::List::Ptr args)
{
return new Kross::Api::Variant(
- m_object->tqmetaObject()->tqfindProperty(Kross::Api::Variant::toString(args->item(0)).latin1(), false));
+ m_object->tqmetaObject()->findProperty(Kross::Api::Variant::toString(args->item(0)).latin1(), false));
}
Kross::Api::Object::Ptr QtObject::getProperty(Kross::Api::List::Ptr args)
@@ -164,7 +164,7 @@ Kross::Api::Object::Ptr QtObject::slotNames(Kross::Api::List::Ptr)
Kross::Api::Object::Ptr QtObject::hasSlot(Kross::Api::List::Ptr args)
{
return new Kross::Api::Variant(
- bool(m_object->tqmetaObject()->slotNames(false).tqfind(
+ bool(m_object->tqmetaObject()->slotNames(false).find(
Kross::Api::Variant::toString(args->item(0)).latin1()
) != -1));
}
@@ -173,7 +173,7 @@ Kross::Api::Object::Ptr QtObject::callSlot(Kross::Api::List::Ptr args)
{
//TODO just call the child event ?!
TQString name = Kross::Api::Variant::toString(args->item(0));
- int slotid = m_object->tqmetaObject()->tqfindSlot(name.latin1(), false);
+ int slotid = m_object->tqmetaObject()->findSlot(name.latin1(), false);
if(slotid < 0)
throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(name)) );
@@ -193,7 +193,7 @@ Kross::Api::Object::Ptr QtObject::signalNames(Kross::Api::List::Ptr)
Kross::Api::Object::Ptr QtObject::hasSignal(Kross::Api::List::Ptr args)
{
return new Kross::Api::Variant(
- bool(m_object->tqmetaObject()->signalNames(false).tqfind(
+ bool(m_object->tqmetaObject()->signalNames(false).find(
Kross::Api::Variant::toString(args->item(0)).latin1()
) != -1));
}
@@ -201,7 +201,7 @@ Kross::Api::Object::Ptr QtObject::hasSignal(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr QtObject::emitSignal(Kross::Api::List::Ptr args)
{
TQString name = Kross::Api::Variant::toString(args->item(0));
- int signalid = m_object->tqmetaObject()->tqfindSignal(name.latin1(), false);
+ int signalid = m_object->tqmetaObject()->findSignal(name.latin1(), false);
if(signalid < 0)
throw Exception::Ptr( new Exception(TQString("No such signal '%1'.").tqarg(name)) );
m_object->qt_invoke(signalid, 0); //TODO convert Kross::Api::List::Ptr => TQUObject*
diff --git a/lib/kross/main/manager.cpp b/lib/kross/main/manager.cpp
index b966a1cc..646a8746 100644
--- a/lib/kross/main/manager.cpp
+++ b/lib/kross/main/manager.cpp
@@ -83,10 +83,10 @@ Manager::Manager()
TQString pythonlib = TQFile::encodeName( KLibLoader::self()->findLibrary(KROSS_PYTHON_LIBRARY) );
if(! pythonlib.isEmpty()) { // If the Kross Python plugin exists we offer it as supported scripting language.
InterpreterInfo::Option::Map pythonoptions;
- pythonoptions.tqreplace("restricted",
+ pythonoptions.replace("restricted",
new InterpreterInfo::Option("Restricted", "Restricted Python interpreter", TQVariant(false,0))
);
- d->interpreterinfos.tqreplace("python",
+ d->interpreterinfos.replace("python",
new InterpreterInfo("python",
pythonlib, // library
"*.py", // file filter-wildcard
@@ -100,10 +100,10 @@ Manager::Manager()
TQString rubylib = TQFile::encodeName( KLibLoader::self()->findLibrary(KROSS_RUBY_LIBRARY) );
if(! rubylib.isEmpty()) { // If the Kross Ruby plugin exists we offer it as supported scripting language.
InterpreterInfo::Option::Map rubyoptions;
- rubyoptions.tqreplace("safelevel",
+ rubyoptions.replace("safelevel",
new InterpreterInfo::Option("safelevel", "Level of safety of the Ruby interpreter", TQVariant(0)) // 0 -> unsafe, 4 -> very safe
);
- d->interpreterinfos.tqreplace("ruby",
+ d->interpreterinfos.replace("ruby",
new InterpreterInfo("ruby",
rubylib, // library
"*.rb", // file filter-wildcard
@@ -131,7 +131,7 @@ TQMap<TQString, InterpreterInfo*> Manager::getInterpreterInfos()
bool Manager::hasInterpreterInfo(const TQString& interpretername) const
{
- return d->interpreterinfos.tqcontains(interpretername);
+ return d->interpreterinfos.contains(interpretername);
}
InterpreterInfo* Manager::getInterpreterInfo(const TQString& interpretername)
@@ -145,7 +145,7 @@ const TQString Manager::getInterpreternameForFile(const TQString& file)
rx.setWildcard(true);
for(TQMap<TQString, InterpreterInfo*>::Iterator it = d->interpreterinfos.begin(); it != d->interpreterinfos.end(); ++it) {
rx.setPattern((*it)->getWildcard());
- if( file.tqfind(rx) >= 0 )
+ if( file.find(rx) >= 0 )
return (*it)->getInterpretername();
}
return TQString();
@@ -155,11 +155,11 @@ ScriptContainer::Ptr Manager::getScriptContainer(const TQString& scriptname)
{
//TODO at the moment we don't share ScriptContainer instances.
- //if(d->m_scriptcontainers.tqcontains(scriptname))
+ //if(d->m_scriptcontainers.contains(scriptname))
// return d->m_scriptcontainers[scriptname];
ScriptContainer* scriptcontainer = new ScriptContainer(scriptname);
//ScriptContainer script(this, scriptname);
- //d->m_scriptcontainers.tqreplace(scriptname, scriptcontainer);
+ //d->m_scriptcontainers.replace(scriptname, scriptcontainer);
return scriptcontainer;
}
@@ -168,7 +168,7 @@ Interpreter* Manager::getInterpreter(const TQString& interpretername)
{
setException(0); // clear previous exceptions
- if(! d->interpreterinfos.tqcontains(interpretername)) {
+ if(! d->interpreterinfos.contains(interpretername)) {
setException( new Exception(i18n("No such interpreter '%1'").tqarg(interpretername)) );
return 0;
}
@@ -192,8 +192,8 @@ const TQStringList Manager::getInterpreters()
bool Manager::addModule(Module::Ptr module)
{
TQString name = module->getName();
- //if( d->modules.tqcontains(name) ) return false;
- d->modules.tqreplace(name, module);
+ //if( d->modules.contains(name) ) return false;
+ d->modules.replace(name, module);
return true;
}
@@ -201,7 +201,7 @@ Module::Ptr Manager::loadModule(const TQString& modulename)
{
Module::Ptr module = 0;
- if(d->modules.tqcontains(modulename)) {
+ if(d->modules.contains(modulename)) {
module = d->modules[modulename];
if(module)
return module;
@@ -240,7 +240,7 @@ Module::Ptr Manager::loadModule(const TQString& modulename)
}
// Don't remember module cause we like to have freeing it handled by the caller.
- //d->modules.tqreplace(modulename, module);
+ //d->modules.replace(modulename, module);
//krossdebug( TQString("Kross::Api::Manager::loadModule modulename='%1' module='%2'").tqarg(modulename).tqarg(module->toString()) );
return module;
diff --git a/lib/kross/main/scriptaction.h b/lib/kross/main/scriptaction.h
index 27f910d0..4b78d611 100644
--- a/lib/kross/main/scriptaction.h
+++ b/lib/kross/main/scriptaction.h
@@ -174,7 +174,7 @@ namespace Kross { namespace Api {
/**
* This signal got emitted after the try to execute this
- * \a ScriptAction failed. The \p errormessage tqcontains
+ * \a ScriptAction failed. The \p errormessage contains
* the error message.
*/
void failed(const TQString& errormessage, const TQString& tracedetails);
diff --git a/lib/kross/main/scriptcontainer.cpp b/lib/kross/main/scriptcontainer.cpp
index 5acde9db..a345dd02 100644
--- a/lib/kross/main/scriptcontainer.cpp
+++ b/lib/kross/main/scriptcontainer.cpp
@@ -151,7 +151,7 @@ TQMap<TQString, TQVariant>& ScriptContainer::getOptions()
TQVariant ScriptContainer::getOption(const TQString name, TQVariant defaultvalue, bool /*recursive*/)
{
- if(d->options.tqcontains(name))
+ if(d->options.contains(name))
return d->options[name];
Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo( d->interpretername );
return info ? info->getOptionValue(name, defaultvalue) : defaultvalue;
@@ -162,7 +162,7 @@ bool ScriptContainer::setOption(const TQString name, const TQVariant& value)
Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo( d->interpretername );
if(info) {
if(info->hasOption(name)) {
- d->options.tqreplace(name, value);
+ d->options.replace(name, value);
return true;
} else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").tqarg(name).tqarg(value.toString()) );
} else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").tqarg(name).tqarg(value.toString()) );
diff --git a/lib/kross/main/scriptguiclient.cpp b/lib/kross/main/scriptguiclient.cpp
index 36d81151..ebcf0b00 100644
--- a/lib/kross/main/scriptguiclient.cpp
+++ b/lib/kross/main/scriptguiclient.cpp
@@ -82,11 +82,11 @@ ScriptGUIClient::ScriptGUIClient(KXMLGUIClient* guiclient, TQWidget* tqparent)
new KAction(i18n("Scripts Manager..."), 0, 0, this, TQT_SLOT(showScriptManager()), actionCollection(), "configurescripts");
// The predefined ScriptActionCollection's this ScriptGUIClient provides.
- d->collections.tqreplace("installedscripts",
+ d->collections.replace("installedscripts",
new ScriptActionCollection(i18n("Scripts"), actionCollection(), "installedscripts") );
- d->collections.tqreplace("loadedscripts",
+ d->collections.replace("loadedscripts",
new ScriptActionCollection(i18n("Loaded"), actionCollection(), "loadedscripts") );
- d->collections.tqreplace("executedscripts",
+ d->collections.replace("executedscripts",
new ScriptActionCollection(i18n("History"), actionCollection(), "executedscripts") );
reloadInstalledScripts();
@@ -102,7 +102,7 @@ ScriptGUIClient::~ScriptGUIClient()
bool ScriptGUIClient::hasActionCollection(const TQString& name)
{
- return d->collections.tqcontains(name);
+ return d->collections.contains(name);
}
ScriptActionCollection* ScriptGUIClient::getActionCollection(const TQString& name)
@@ -118,12 +118,12 @@ TQMap<TQString, ScriptActionCollection*> ScriptGUIClient::getActionCollections()
void ScriptGUIClient::addActionCollection(const TQString& name, ScriptActionCollection* collection)
{
removeActionCollection(name);
- d->collections.tqreplace(name, collection);
+ d->collections.replace(name, collection);
}
bool ScriptGUIClient::removeActionCollection(const TQString& name)
{
- if(d->collections.tqcontains(name)) {
+ if(d->collections.contains(name)) {
ScriptActionCollection* c = d->collections[name];
d->collections.remove(name);
delete c;
diff --git a/lib/kross/python/pythonextension.cpp b/lib/kross/python/pythonextension.cpp
index aab781ab..f13cf93a 100644
--- a/lib/kross/python/pythonextension.cpp
+++ b/lib/kross/python/pythonextension.cpp
@@ -177,7 +177,7 @@ Kross::Api::Dict::Ptr PythonExtension::toObject(const Py::Dict& dict)
uint length = l.length();
for(Py::List::size_type i = 0; i < length; ++i) {
const char* n = l[i].str().as_string().c_str();
- map.tqreplace(n, toObject( dict[n] ));
+ map.replace(n, toObject( dict[n] ));
}
return new Kross::Api::Dict(map);
}
diff --git a/lib/kross/python/pythonmodule.cpp b/lib/kross/python/pythonmodule.cpp
index 9c3353ea..24b43159 100644
--- a/lib/kross/python/pythonmodule.cpp
+++ b/lib/kross/python/pythonmodule.cpp
@@ -84,7 +84,7 @@ Py::Object PythonModule::import(const Py::Tuple& args)
#ifdef KROSS_PYTHON_MODULE_DEBUG
krossdebug( TQString("Kross::Python::PythonModule::import() module=%1").tqarg(modname) );
#endif
- if( modname.tqfind( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) {
+ if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) {
krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) );
}
else {
diff --git a/lib/kross/python/pythonobject.cpp b/lib/kross/python/pythonobject.cpp
index f765cbbd..9689d222 100644
--- a/lib/kross/python/pythonobject.cpp
+++ b/lib/kross/python/pythonobject.cpp
@@ -67,7 +67,7 @@ Kross::Api::Object::Ptr PythonObject::call(const TQString& name, Kross::Api::Lis
krossdebug( TQString("PythonObject::call(%1)").tqarg(name) );
if(m_pyobject.isInstance()) {
- //if(! m_calls.tqcontains(n)) throw ...
+ //if(! m_calls.contains(n)) throw ...
PyObject* r = PyObject_CallMethod(m_pyobject.ptr(), (char*) name.latin1(), 0);
if(! r) { //FIXME happens too if e.g. number of arguments doesn't match !!!
diff --git a/lib/kross/python/pythonscript.cpp b/lib/kross/python/pythonscript.cpp
index 4bf37c74..7d34a6fb 100644
--- a/lib/kross/python/pythonscript.cpp
+++ b/lib/kross/python/pythonscript.cpp
@@ -386,7 +386,7 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross::
// Try to determinate the function we like to execute.
PyObject* func = PyDict_GetItemString(moduledict.ptr(), name.latin1());
- if( (! d->m_functions.tqcontains(name)) || (! func) )
+ if( (! d->m_functions.contains(name)) || (! func) )
throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").tqarg(name)) );
Py::Callable funcobject(func, true); // the funcobject takes care of freeing our func pyobject.
@@ -432,7 +432,7 @@ Kross::Api::Object::Ptr PythonScript::classInstance(const TQString& name)
// Try to determinate the class.
PyObject* pyclass = PyDict_GetItemString(moduledict.ptr(), name.latin1());
- if( (! d->m_classes.tqcontains(name)) || (! pyclass) )
+ if( (! d->m_classes.contains(name)) || (! pyclass) )
throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such class '%1'.").tqarg(name)) );
PyObject *pyobj = PyInstance_New(pyclass, 0, 0);//aclarg, 0);
diff --git a/lib/kross/python/scripts/gui.py b/lib/kross/python/scripts/gui.py
index 89a07066..997e9849 100755
--- a/lib/kross/python/scripts/gui.py
+++ b/lib/kross/python/scripts/gui.py
@@ -197,7 +197,7 @@ class QtDialog:
class Label(qt.QLabel):
def __init__(self, dialog, tqparent, caption):
qt.QLabel.__init__(self, tqparent)
- self.setText("<qt>%s</qt>" % caption.tqreplace("\n","<br>"))
+ self.setText("<qt>%s</qt>" % caption.replace("\n","<br>"))
class Frame(qt.QHBox):
def __init__(self, dialog, tqparent):
diff --git a/lib/kross/ruby/rubyextension.cpp b/lib/kross/ruby/rubyextension.cpp
index c989976d..6c2cb40f 100644
--- a/lib/kross/ruby/rubyextension.cpp
+++ b/lib/kross/ruby/rubyextension.cpp
@@ -141,7 +141,7 @@ int RubyExtension::convertHash_i(VALUE key, VALUE value, VALUE vmap)
if (key != Qundef)
{
Kross::Api::Object::Ptr o = RubyExtension::toObject( value );
- if(o) map->tqreplace(STR2CSTR(key), o);
+ if(o) map->replace(STR2CSTR(key), o);
}
return ST_CONTINUE;
}
diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp
index d1fbec01..4a4df32f 100644
--- a/lib/kross/ruby/rubyinterpreter.cpp
+++ b/lib/kross/ruby/rubyinterpreter.cpp
@@ -122,7 +122,7 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name)
TQString modname = StringValuePtr(name);
if(modname.startsWith("kross")) {
krossdebug( TQString("RubyInterpreter::require() module=%1").tqarg(modname) );
- if( modname.tqfind( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) {
+ if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) {
krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) );
}
else {
diff --git a/lib/store/KoDirectoryStore.cpp b/lib/store/KoDirectoryStore.cpp
index 8cf30788..76e5aa72 100644
--- a/lib/store/KoDirectoryStore.cpp
+++ b/lib/store/KoDirectoryStore.cpp
@@ -27,7 +27,7 @@
KoDirectoryStore::KoDirectoryStore( const TQString& path, Mode _mode )
: m_basePath( path )
{
- const int pos = path.tqfindRev( '/' );
+ const int pos = path.findRev( '/' );
// The parameter must include "maindoc.xml" or "content.xml"
if ( pos != -1 && pos != (int)m_basePath.length()-1 )
m_basePath = m_basePath.left( pos );
@@ -60,7 +60,7 @@ bool KoDirectoryStore::init( Mode _mode )
bool KoDirectoryStore::openReadOrWrite( const TQString& name, int iomode )
{
//kdDebug(s_area) << "KoDirectoryStore::openReadOrWrite m_currentPath=" << m_currentPath << " name=" << name << endl;
- int pos = name.tqfindRev('/');
+ int pos = name.findRev('/');
if ( pos != -1 ) // there are subdirs in the name -> maybe need to create them, when writing
{
pushDirectory(); // remember where we were
diff --git a/lib/store/KoStore.cpp b/lib/store/KoStore.cpp
index a027bf7e..4a98aa11 100644
--- a/lib/store/KoStore.cpp
+++ b/lib/store/KoStore.cpp
@@ -208,7 +208,7 @@ bool KoStore::open( const TQString & _name )
if ( m_mode == Write )
{
kdDebug(s_area) << "KoStore: opening for writing '" << m_sName << "'" << endl;
- if ( m_strFiles.tqfindIndex( m_sName ) != -1 ) // just check if it's there
+ if ( m_strFiles.findIndex( m_sName ) != -1 ) // just check if it's there
{
kdWarning(s_area) << "KoStore: Duplicate filename " << m_sName << endl;
//return KIO::ERR_FILE_ALREADY_EXIST;
@@ -379,7 +379,7 @@ bool KoStore::enterDirectory( const TQString& directory )
bool success = true;
TQString tmp( directory );
- while ( ( pos = tmp.tqfind( '/' ) ) != -1 &&
+ while ( ( pos = tmp.find( '/' ) ) != -1 &&
( success = enterDirectoryInternal( tmp.left( pos ) ) ) )
tmp = tmp.mid( pos + 1 );
@@ -562,7 +562,7 @@ TQString KoStore::expandEncodedPath( TQString intern ) const
TQString result;
int pos;
- if ( ( pos = intern.tqfindRev( '/', -1 ) ) != -1 ) {
+ if ( ( pos = intern.findRev( '/', -1 ) ) != -1 ) {
result = expandEncodedDirectory( intern.left( pos ) ) + '/';
intern = intern.mid( pos + 1 );
}
@@ -595,7 +595,7 @@ TQString KoStore::expandEncodedDirectory( TQString intern ) const
TQString result;
int pos;
- while ( ( pos = intern.tqfind( '/' ) ) != -1 ) {
+ while ( ( pos = intern.find( '/' ) ) != -1 ) {
if ( TQChar(intern.at(0)).isDigit() )
result += "part";
result += intern.left( pos + 1 ); // copy numbers (or "pictures") + "/"
diff --git a/lib/store/KoXmlWriter.cpp b/lib/store/KoXmlWriter.cpp
index 4260f76f..dca95d8a 100644
--- a/lib/store/KoXmlWriter.cpp
+++ b/lib/store/KoXmlWriter.cpp
@@ -393,7 +393,7 @@ void KoXmlWriter::addTextSpan( const TQString& text, const TQMap<int, int>& tabC
addTextNode( str );
str = TQString();
startElement( "text:tab" );
- if ( tabCache.tqcontains( i ) )
+ if ( tabCache.contains( i ) )
addAttribute( "text:tab-ref", tabCache[i] + 1 );
endElement();
break;
diff --git a/lib/store/tests/xmlwritertest.h b/lib/store/tests/xmlwritertest.h
index b3d305ea..cdafe8a5 100644
--- a/lib/store/tests/xmlwritertest.h
+++ b/lib/store/tests/xmlwritertest.h
@@ -34,8 +34,8 @@
TQCString s2 = expectedFull; \
if ( s1.length() != s2.length() ) \
qDebug( "got length %d, expected %d", s1.length(), s2.length() ); \
- s1.tqreplace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \
- s2.tqreplace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \
+ s1.replace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \
+ s2.replace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \
qDebug( "%s", s1.data() ); \
qDebug( "Expected:\n%s", s2.data() ); \
return 1; /*exit*/ \