diff options
author | Timothy Pearson <[email protected]> | 2011-12-18 18:15:24 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-18 18:15:24 -0600 |
commit | 8d9b90ca794ffabf151719c2edebe9278a2d3f36 (patch) | |
tree | 55f446de8694c45be6bf0f1178920c2b92b0c9f5 /src/translators/bibtexexporter.cpp | |
parent | 2781e27b871150395a5a82e221684108641002b2 (diff) | |
download | tellico-8d9b90ca794ffabf151719c2edebe9278a2d3f36.tar.gz tellico-8d9b90ca794ffabf151719c2edebe9278a2d3f36.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'src/translators/bibtexexporter.cpp')
-rw-r--r-- | src/translators/bibtexexporter.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/translators/bibtexexporter.cpp b/src/translators/bibtexexporter.cpp index 2135c67..5cbce00 100644 --- a/src/translators/bibtexexporter.cpp +++ b/src/translators/bibtexexporter.cpp @@ -69,7 +69,7 @@ bool BibtexExporter::exec() { TQString crossRefField; bool hasCrossRefs = false; - const TQString bibtex = TQString::tqfromLatin1("bibtex"); + const TQString bibtex = TQString::fromLatin1("bibtex"); // keep a list of all the 'ordinary' fields to iterate through later Data::FieldVec fields; Data::FieldVec vec = coll->fields(); @@ -98,12 +98,12 @@ bool BibtexExporter::exec() { return false; } - TQString text = TQString::tqfromLatin1("@comment{Generated by Tellico ") - + TQString::tqfromLatin1(VERSION) - + TQString::tqfromLatin1("}\n\n"); + TQString text = TQString::fromLatin1("@comment{Generated by Tellico ") + + TQString::fromLatin1(VERSION) + + TQString::fromLatin1("}\n\n"); if(!coll->preamble().isEmpty()) { - text += TQString::tqfromLatin1("@preamble{") + coll->preamble() + TQString::tqfromLatin1("}\n\n"); + text += TQString::fromLatin1("@preamble{") + coll->preamble() + TQString::fromLatin1("}\n\n"); } const TQStringList macros = coll->macroList().keys(); @@ -111,11 +111,11 @@ bool BibtexExporter::exec() { TQMap<TQString, TQString>::ConstIterator macroIt; for(macroIt = coll->macroList().constBegin(); macroIt != coll->macroList().constEnd(); ++macroIt) { if(!macroIt.data().isEmpty()) { - text += TQString::tqfromLatin1("@string{") + text += TQString::fromLatin1("@string{") + macroIt.key() - + TQString::tqfromLatin1("=") + + TQString::fromLatin1("=") + BibtexHandler::exportText(macroIt.data(), macros) - + TQString::tqfromLatin1("}\n\n"); + + TQString::fromLatin1("}\n\n"); } } } @@ -236,7 +236,7 @@ TQWidget* BibtexExporter::widget(TQWidget* parent_, const char* name_/*=0*/) { } void BibtexExporter::readOptions(KConfig* config_) { - KConfigGroup group(config_, TQString::tqfromLatin1("ExportOptions - %1").tqarg(formatString())); + KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); m_expandMacros = group.readBoolEntry("Expand Macros", m_expandMacros); m_packageURL = group.readBoolEntry("URL Package", m_packageURL); m_skipEmptyKeys = group.readBoolEntry("Skip Empty Keys", m_skipEmptyKeys); @@ -249,7 +249,7 @@ void BibtexExporter::readOptions(KConfig* config_) { } void BibtexExporter::saveOptions(KConfig* config_) { - KConfigGroup group(config_, TQString::tqfromLatin1("ExportOptions - %1").tqarg(formatString())); + KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); m_expandMacros = m_checkExpandMacros->isChecked(); group.writeEntry("Expand Macros", m_expandMacros); m_packageURL = m_checkPackageURL->isChecked(); @@ -269,8 +269,8 @@ void BibtexExporter::saveOptions(KConfig* config_) { void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& fields_, const Data::Entry& entry_, const TQString& type_, const TQString& key_) { const TQStringList macros = static_cast<const Data::BibtexCollection*>(Data::Document::self()->collection().data())->macroList().keys(); - const TQString bibtex = TQString::tqfromLatin1("bibtex"); - const TQString bibtexSep = TQString::tqfromLatin1("bibtex-separator"); + const TQString bibtex = TQString::fromLatin1("bibtex"); + const TQString bibtexSep = TQString::fromLatin1("bibtex-separator"); text_ += '@' + type_ + '{' + key_; @@ -287,7 +287,7 @@ void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& field // insert "and" in between them (e.g. author and editor) if(fIt->formatFlag() == Data::Field::FormatName && fIt->flags() & Data::Field::AllowMultiple) { - value.replace(Data::Field::delimiter(), TQString::tqfromLatin1(" and ")); + value.replace(Data::Field::delimiter(), TQString::fromLatin1(" and ")); } else if(fIt->flags() & Data::Field::AllowMultiple) { TQString bibsep = fIt->property(bibtexSep); if(!bibsep.isEmpty()) { @@ -295,11 +295,11 @@ void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& field } } else if(fIt->type() == Data::Field::Para) { // strip HTML from bibtex export - TQRegExp stripHTML(TQString::tqfromLatin1("<.*>"), true); + TQRegExp stripHTML(TQString::fromLatin1("<.*>"), true); stripHTML.setMinimal(true); value.remove(stripHTML); } else if(fIt->property(bibtex) == Latin1Literal("pages")) { - TQRegExp rx(TQString::tqfromLatin1("(\\d)-(\\d)")); + TQRegExp rx(TQString::fromLatin1("(\\d)-(\\d)")); for(int pos = rx.search(value); pos > -1; pos = rx.search(value, pos+2)) { value.replace(pos, 3, rx.cap(1)+"--"+rx.cap(2)); } @@ -308,19 +308,19 @@ void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& field if(m_packageURL && fIt->type() == Data::Field::URL) { bool b = BibtexHandler::s_quoteStyle == BibtexHandler::BRACES; value = (b ? TQChar('{') : TQChar('"')) - + TQString::tqfromLatin1("\\url{") + BibtexHandler::exportText(value, macros) + TQChar('}') + + TQString::fromLatin1("\\url{") + BibtexHandler::exportText(value, macros) + TQChar('}') + (b ? TQChar('}') : TQChar('"')); } else if(fIt->type() != Data::Field::Number) { // numbers aren't escaped, nor will they have macros // if m_expandMacros is true, then macros is empty, so this is ok even then value = BibtexHandler::exportText(value, macros); } - text_ += TQString::tqfromLatin1(",\n ") + text_ += TQString::fromLatin1(",\n ") + fIt->property(bibtex) - + TQString::tqfromLatin1(" = ") + + TQString::fromLatin1(" = ") + value; } - text_ += TQString::tqfromLatin1("\n}\n\n"); + text_ += TQString::fromLatin1("\n}\n\n"); } #include "bibtexexporter.moc" |