summaryrefslogtreecommitdiffstats
path: root/src/translators/bibtexhandler.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit0254ebaa5e056092461fd585b6851d15faa43035 (patch)
tree2bf41a1c189b92dc1b9ab89e3ce392f8132214c4 /src/translators/bibtexhandler.cpp
parentfa071926f015f39711632b3fb9fe16004d93d0ec (diff)
downloadtellico-0254ebaa5e056092461fd585b6851d15faa43035.tar.gz
tellico-0254ebaa5e056092461fd585b6851d15faa43035.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/translators/bibtexhandler.cpp')
-rw-r--r--src/translators/bibtexhandler.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/translators/bibtexhandler.cpp b/src/translators/bibtexhandler.cpp
index e6c07fa..873dc27 100644
--- a/src/translators/bibtexhandler.cpp
+++ b/src/translators/bibtexhandler.cpp
@@ -103,7 +103,7 @@ TQString BibtexHandler::bibtexKey(const TQString& author_, const TQString& title
TQString key;
// if no comma, take the last word
if(!author_.isEmpty()) {
- if(author_.tqfind(',') == -1) {
+ if(author_.find(',') == -1) {
key += author_.section(' ', -1).lower() + '-';
} else {
// if there is a comma, take the string up to the first comma
@@ -116,7 +116,7 @@ TQString BibtexHandler::bibtexKey(const TQString& author_, const TQString& title
}
key += year_;
// bibtex key may only contain [0-9a-zA-Z-]
- return key.tqreplace(s_badKeyChars, TQString());
+ return key.replace(s_badKeyChars, TQString());
}
void BibtexHandler::loadTranslationMaps() {
@@ -155,7 +155,7 @@ TQString BibtexHandler::importText(char* text_) {
TQString str = TQString::fromUtf8(text_);
for(StringListMap::Iterator it = s_utf8LatexMap->begin(); it != s_utf8LatexMap->end(); ++it) {
for(TQStringList::Iterator sit = it.data().begin(); sit != it.data().end(); ++sit) {
- str.tqreplace(*sit, it.key());
+ str.replace(*sit, it.key());
}
}
@@ -166,7 +166,7 @@ TQString BibtexHandler::importText(char* text_) {
TQRegExp rx(TQString::tqfromLatin1("\\{([A-Z]+)\\}"));
rx.setMinimal(true);
- str.tqreplace(rx, TQString::tqfromLatin1("\\1"));
+ str.replace(rx, TQString::tqfromLatin1("\\1"));
return str;
}
@@ -191,7 +191,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma
TQString text = text_;
for(StringListMap::Iterator it = s_utf8LatexMap->begin(); it != s_utf8LatexMap->end(); ++it) {
- text.tqreplace(it.key(), it.data()[0]);
+ text.replace(it.key(), it.data()[0]);
}
if(macros_.isEmpty()) {
@@ -209,7 +209,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma
TQStringList tokens = TQStringList::split('#', text, true);
for(TQStringList::Iterator it = tokens.begin(); it != tokens.end(); ++it) {
// check to see if token is a macro
- if(macros_.tqfindIndex((*it).stripWhiteSpace()) == -1) {
+ if(macros_.findIndex((*it).stripWhiteSpace()) == -1) {
// the token is NOT a macro, add braces around whole words and also around capitals
list << lquote + addBraces(*it) + rquote;
} else {
@@ -219,7 +219,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma
const TQChar octo = '#';
text = list.join(octo);
- text.tqreplace(TQString(rquote)+octo+lquote, octo);
+ text.replace(TQString(rquote)+octo+lquote, octo);
return text;
}
@@ -264,7 +264,7 @@ bool BibtexHandler::setFieldValue(Data::EntryPtr entry_, const TQString& bibtexF
// special case keywords, replace commas with semi-colons so they get separated
TQString value = value_;
if(field->property(TQString::tqfromLatin1("bibtex")).startsWith(TQString::tqfromLatin1("keyword"))) {
- value.tqreplace(',', ';');
+ value.replace(',', ';');
// special case refbase bibtex export, with multiple keywords fields
TQString oValue = entry_->field(field);
if(!oValue.isEmpty()) {
@@ -279,9 +279,9 @@ TQString& BibtexHandler::cleanText(TQString& text_) {
// TQRegExp rx(TQString::tqfromLatin1("(?=[^\\\\])\\\\.+\\{"));
TQRegExp rx(TQString::tqfromLatin1("\\\\.+\\{"));
rx.setMinimal(true);
- text_.tqreplace(rx, TQString());
- text_.tqreplace(TQRegExp(TQString::tqfromLatin1("[{}]")), TQString());
- text_.tqreplace('~', ' ');
+ text_.replace(rx, TQString());
+ text_.replace(TQRegExp(TQString::tqfromLatin1("[{}]")), TQString());
+ text_.replace('~', ' ');
return text_;
}