summaryrefslogtreecommitdiffstats
path: root/src/translators/risimporter.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-16 09:57:51 -0600
committerTimothy Pearson <[email protected]>2011-12-16 09:57:51 -0600
commit2781e27b871150395a5a82e221684108641002b2 (patch)
tree57f4d7c01a48faef1a840fbe0de8f4ec1e5f606f /src/translators/risimporter.cpp
parent031454e56009d576589c28757f6c6fcf4884095e (diff)
downloadtellico-2781e27b871150395a5a82e221684108641002b2.tar.gz
tellico-2781e27b871150395a5a82e221684108641002b2.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 031454e56009d576589c28757f6c6fcf4884095e.
Diffstat (limited to 'src/translators/risimporter.cpp')
-rw-r--r--src/translators/risimporter.cpp146
1 files changed, 73 insertions, 73 deletions
diff --git a/src/translators/risimporter.cpp b/src/translators/risimporter.cpp
index 087397e..bcf4db5 100644
--- a/src/translators/risimporter.cpp
+++ b/src/translators/risimporter.cpp
@@ -37,33 +37,33 @@ void RISImporter::initTagMap() {
if(!s_tagMap) {
s_tagMap = new TQMap<TQString, TQString>();
// BT is special and is handled separately
- s_tagMap->insert(TQString::fromLatin1("TY"), TQString::fromLatin1("entry-type"));
- s_tagMap->insert(TQString::fromLatin1("ID"), TQString::fromLatin1("bibtex-key"));
- s_tagMap->insert(TQString::fromLatin1("T1"), TQString::fromLatin1("title"));
- s_tagMap->insert(TQString::fromLatin1("TI"), TQString::fromLatin1("title"));
- s_tagMap->insert(TQString::fromLatin1("T2"), TQString::fromLatin1("booktitle"));
- s_tagMap->insert(TQString::fromLatin1("A1"), TQString::fromLatin1("author"));
- s_tagMap->insert(TQString::fromLatin1("AU"), TQString::fromLatin1("author"));
- s_tagMap->insert(TQString::fromLatin1("ED"), TQString::fromLatin1("editor"));
- s_tagMap->insert(TQString::fromLatin1("YR"), TQString::fromLatin1("year"));
- s_tagMap->insert(TQString::fromLatin1("PY"), TQString::fromLatin1("year"));
- s_tagMap->insert(TQString::fromLatin1("N1"), TQString::fromLatin1("note"));
- s_tagMap->insert(TQString::fromLatin1("AB"), TQString::fromLatin1("abstract")); // should be note?
- s_tagMap->insert(TQString::fromLatin1("N2"), TQString::fromLatin1("abstract"));
- s_tagMap->insert(TQString::fromLatin1("KW"), TQString::fromLatin1("keyword"));
- s_tagMap->insert(TQString::fromLatin1("JF"), TQString::fromLatin1("journal"));
- s_tagMap->insert(TQString::fromLatin1("JO"), TQString::fromLatin1("journal"));
- s_tagMap->insert(TQString::fromLatin1("JA"), TQString::fromLatin1("journal"));
- s_tagMap->insert(TQString::fromLatin1("VL"), TQString::fromLatin1("volume"));
- s_tagMap->insert(TQString::fromLatin1("IS"), TQString::fromLatin1("number"));
- s_tagMap->insert(TQString::fromLatin1("PB"), TQString::fromLatin1("publisher"));
- s_tagMap->insert(TQString::fromLatin1("SN"), TQString::fromLatin1("isbn"));
- s_tagMap->insert(TQString::fromLatin1("AD"), TQString::fromLatin1("address"));
- s_tagMap->insert(TQString::fromLatin1("CY"), TQString::fromLatin1("address"));
- s_tagMap->insert(TQString::fromLatin1("UR"), TQString::fromLatin1("url"));
- s_tagMap->insert(TQString::fromLatin1("L1"), TQString::fromLatin1("pdf"));
- s_tagMap->insert(TQString::fromLatin1("T3"), TQString::fromLatin1("series"));
- s_tagMap->insert(TQString::fromLatin1("EP"), TQString::fromLatin1("pages"));
+ s_tagMap->insert(TQString::tqfromLatin1("TY"), TQString::tqfromLatin1("entry-type"));
+ s_tagMap->insert(TQString::tqfromLatin1("ID"), TQString::tqfromLatin1("bibtex-key"));
+ s_tagMap->insert(TQString::tqfromLatin1("T1"), TQString::tqfromLatin1("title"));
+ s_tagMap->insert(TQString::tqfromLatin1("TI"), TQString::tqfromLatin1("title"));
+ s_tagMap->insert(TQString::tqfromLatin1("T2"), TQString::tqfromLatin1("booktitle"));
+ s_tagMap->insert(TQString::tqfromLatin1("A1"), TQString::tqfromLatin1("author"));
+ s_tagMap->insert(TQString::tqfromLatin1("AU"), TQString::tqfromLatin1("author"));
+ s_tagMap->insert(TQString::tqfromLatin1("ED"), TQString::tqfromLatin1("editor"));
+ s_tagMap->insert(TQString::tqfromLatin1("YR"), TQString::tqfromLatin1("year"));
+ s_tagMap->insert(TQString::tqfromLatin1("PY"), TQString::tqfromLatin1("year"));
+ s_tagMap->insert(TQString::tqfromLatin1("N1"), TQString::tqfromLatin1("note"));
+ s_tagMap->insert(TQString::tqfromLatin1("AB"), TQString::tqfromLatin1("abstract")); // should be note?
+ s_tagMap->insert(TQString::tqfromLatin1("N2"), TQString::tqfromLatin1("abstract"));
+ s_tagMap->insert(TQString::tqfromLatin1("KW"), TQString::tqfromLatin1("keyword"));
+ s_tagMap->insert(TQString::tqfromLatin1("JF"), TQString::tqfromLatin1("journal"));
+ s_tagMap->insert(TQString::tqfromLatin1("JO"), TQString::tqfromLatin1("journal"));
+ s_tagMap->insert(TQString::tqfromLatin1("JA"), TQString::tqfromLatin1("journal"));
+ s_tagMap->insert(TQString::tqfromLatin1("VL"), TQString::tqfromLatin1("volume"));
+ s_tagMap->insert(TQString::tqfromLatin1("IS"), TQString::tqfromLatin1("number"));
+ s_tagMap->insert(TQString::tqfromLatin1("PB"), TQString::tqfromLatin1("publisher"));
+ s_tagMap->insert(TQString::tqfromLatin1("SN"), TQString::tqfromLatin1("isbn"));
+ s_tagMap->insert(TQString::tqfromLatin1("AD"), TQString::tqfromLatin1("address"));
+ s_tagMap->insert(TQString::tqfromLatin1("CY"), TQString::tqfromLatin1("address"));
+ s_tagMap->insert(TQString::tqfromLatin1("UR"), TQString::tqfromLatin1("url"));
+ s_tagMap->insert(TQString::tqfromLatin1("L1"), TQString::tqfromLatin1("pdf"));
+ s_tagMap->insert(TQString::tqfromLatin1("T3"), TQString::tqfromLatin1("series"));
+ s_tagMap->insert(TQString::tqfromLatin1("EP"), TQString::tqfromLatin1("pages"));
}
}
@@ -72,41 +72,41 @@ void RISImporter::initTypeMap() {
if(!s_typeMap) {
s_typeMap = new TQMap<TQString, TQString>();
// leave capitalized, except for bibtex types
- s_typeMap->insert(TQString::fromLatin1("ABST"), TQString::fromLatin1("Abstract"));
- s_typeMap->insert(TQString::fromLatin1("ADVS"), TQString::fromLatin1("Audiovisual material"));
- s_typeMap->insert(TQString::fromLatin1("ART"), TQString::fromLatin1("Art Work"));
- s_typeMap->insert(TQString::fromLatin1("BILL"), TQString::fromLatin1("Bill/Resolution"));
- s_typeMap->insert(TQString::fromLatin1("BOOK"), TQString::fromLatin1("book")); // bibtex
- s_typeMap->insert(TQString::fromLatin1("CASE"), TQString::fromLatin1("Case"));
- s_typeMap->insert(TQString::fromLatin1("CHAP"), TQString::fromLatin1("inbook")); // == "inbook" ?
- s_typeMap->insert(TQString::fromLatin1("COMP"), TQString::fromLatin1("Computer program"));
- s_typeMap->insert(TQString::fromLatin1("CONF"), TQString::fromLatin1("inproceedings")); // == "conference" ?
- s_typeMap->insert(TQString::fromLatin1("CTLG"), TQString::fromLatin1("Catalog"));
- s_typeMap->insert(TQString::fromLatin1("DATA"), TQString::fromLatin1("Data file"));
- s_typeMap->insert(TQString::fromLatin1("ELEC"), TQString::fromLatin1("Electronic Citation"));
- s_typeMap->insert(TQString::fromLatin1("GEN"), TQString::fromLatin1("Generic"));
- s_typeMap->insert(TQString::fromLatin1("HEAR"), TQString::fromLatin1("Hearing"));
- s_typeMap->insert(TQString::fromLatin1("ICOMM"), TQString::fromLatin1("Internet Communication"));
- s_typeMap->insert(TQString::fromLatin1("INPR"), TQString::fromLatin1("In Press"));
- s_typeMap->insert(TQString::fromLatin1("JFULL"), TQString::fromLatin1("Journal (full)")); // = "periodical" ?
- s_typeMap->insert(TQString::fromLatin1("JOUR"), TQString::fromLatin1("article")); // "Journal"
- s_typeMap->insert(TQString::fromLatin1("MAP"), TQString::fromLatin1("Map"));
- s_typeMap->insert(TQString::fromLatin1("MGZN"), TQString::fromLatin1("article")); // bibtex
- s_typeMap->insert(TQString::fromLatin1("MPCT"), TQString::fromLatin1("Motion picture"));
- s_typeMap->insert(TQString::fromLatin1("MUSIC"), TQString::fromLatin1("Music score"));
- s_typeMap->insert(TQString::fromLatin1("NEWS"), TQString::fromLatin1("Newspaper"));
- s_typeMap->insert(TQString::fromLatin1("PAMP"), TQString::fromLatin1("Pamphlet")); // = "booklet" ?
- s_typeMap->insert(TQString::fromLatin1("PAT"), TQString::fromLatin1("Patent"));
- s_typeMap->insert(TQString::fromLatin1("PCOMM"), TQString::fromLatin1("Personal communication"));
- s_typeMap->insert(TQString::fromLatin1("RPRT"), TQString::fromLatin1("Report")); // = "techreport" ?
- s_typeMap->insert(TQString::fromLatin1("SER"), TQString::fromLatin1("Serial (BookMonograph)"));
- s_typeMap->insert(TQString::fromLatin1("SLIDE"), TQString::fromLatin1("Slide"));
- s_typeMap->insert(TQString::fromLatin1("SOUND"), TQString::fromLatin1("Sound recording"));
- s_typeMap->insert(TQString::fromLatin1("STAT"), TQString::fromLatin1("Statute"));
- s_typeMap->insert(TQString::fromLatin1("THES"), TQString::fromLatin1("phdthesis")); // "mastersthesis" ?
- s_typeMap->insert(TQString::fromLatin1("UNBILL"), TQString::fromLatin1("Unenacted bill/resolution"));
- s_typeMap->insert(TQString::fromLatin1("UNPB"), TQString::fromLatin1("unpublished")); // bibtex
- s_typeMap->insert(TQString::fromLatin1("VIDEO"), TQString::fromLatin1("Video recording"));
+ s_typeMap->insert(TQString::tqfromLatin1("ABST"), TQString::tqfromLatin1("Abstract"));
+ s_typeMap->insert(TQString::tqfromLatin1("ADVS"), TQString::tqfromLatin1("Audiovisual material"));
+ s_typeMap->insert(TQString::tqfromLatin1("ART"), TQString::tqfromLatin1("Art Work"));
+ s_typeMap->insert(TQString::tqfromLatin1("BILL"), TQString::tqfromLatin1("Bill/Resolution"));
+ s_typeMap->insert(TQString::tqfromLatin1("BOOK"), TQString::tqfromLatin1("book")); // bibtex
+ s_typeMap->insert(TQString::tqfromLatin1("CASE"), TQString::tqfromLatin1("Case"));
+ s_typeMap->insert(TQString::tqfromLatin1("CHAP"), TQString::tqfromLatin1("inbook")); // == "inbook" ?
+ s_typeMap->insert(TQString::tqfromLatin1("COMP"), TQString::tqfromLatin1("Computer program"));
+ s_typeMap->insert(TQString::tqfromLatin1("CONF"), TQString::tqfromLatin1("inproceedings")); // == "conference" ?
+ s_typeMap->insert(TQString::tqfromLatin1("CTLG"), TQString::tqfromLatin1("Catalog"));
+ s_typeMap->insert(TQString::tqfromLatin1("DATA"), TQString::tqfromLatin1("Data file"));
+ s_typeMap->insert(TQString::tqfromLatin1("ELEC"), TQString::tqfromLatin1("Electronic Citation"));
+ s_typeMap->insert(TQString::tqfromLatin1("GEN"), TQString::tqfromLatin1("Generic"));
+ s_typeMap->insert(TQString::tqfromLatin1("HEAR"), TQString::tqfromLatin1("Hearing"));
+ s_typeMap->insert(TQString::tqfromLatin1("ICOMM"), TQString::tqfromLatin1("Internet Communication"));
+ s_typeMap->insert(TQString::tqfromLatin1("INPR"), TQString::tqfromLatin1("In Press"));
+ s_typeMap->insert(TQString::tqfromLatin1("JFULL"), TQString::tqfromLatin1("Journal (full)")); // = "periodical" ?
+ s_typeMap->insert(TQString::tqfromLatin1("JOUR"), TQString::tqfromLatin1("article")); // "Journal"
+ s_typeMap->insert(TQString::tqfromLatin1("MAP"), TQString::tqfromLatin1("Map"));
+ s_typeMap->insert(TQString::tqfromLatin1("MGZN"), TQString::tqfromLatin1("article")); // bibtex
+ s_typeMap->insert(TQString::tqfromLatin1("MPCT"), TQString::tqfromLatin1("Motion picture"));
+ s_typeMap->insert(TQString::tqfromLatin1("MUSIC"), TQString::tqfromLatin1("Music score"));
+ s_typeMap->insert(TQString::tqfromLatin1("NEWS"), TQString::tqfromLatin1("Newspaper"));
+ s_typeMap->insert(TQString::tqfromLatin1("PAMP"), TQString::tqfromLatin1("Pamphlet")); // = "booklet" ?
+ s_typeMap->insert(TQString::tqfromLatin1("PAT"), TQString::tqfromLatin1("Patent"));
+ s_typeMap->insert(TQString::tqfromLatin1("PCOMM"), TQString::tqfromLatin1("Personal communication"));
+ s_typeMap->insert(TQString::tqfromLatin1("RPRT"), TQString::tqfromLatin1("Report")); // = "techreport" ?
+ s_typeMap->insert(TQString::tqfromLatin1("SER"), TQString::tqfromLatin1("Serial (BookMonograph)"));
+ s_typeMap->insert(TQString::tqfromLatin1("SLIDE"), TQString::tqfromLatin1("Slide"));
+ s_typeMap->insert(TQString::tqfromLatin1("SOUND"), TQString::tqfromLatin1("Sound recording"));
+ s_typeMap->insert(TQString::tqfromLatin1("STAT"), TQString::tqfromLatin1("Statute"));
+ s_typeMap->insert(TQString::tqfromLatin1("THES"), TQString::tqfromLatin1("phdthesis")); // "mastersthesis" ?
+ s_typeMap->insert(TQString::tqfromLatin1("UNBILL"), TQString::tqfromLatin1("Unenacted bill/resolution"));
+ s_typeMap->insert(TQString::tqfromLatin1("UNPB"), TQString::tqfromLatin1("unpublished")); // bibtex
+ s_typeMap->insert(TQString::tqfromLatin1("VIDEO"), TQString::tqfromLatin1("Video recording"));
}
}
@@ -134,7 +134,7 @@ Tellico::Data::CollPtr RISImporter::collection() {
Data::FieldVec vec = currColl->fields();
for(Data::FieldVec::Iterator it = vec.begin(); it != vec.end(); ++it) {
// continue if property is empty
- TQString ris = it->property(TQString::fromLatin1("ris"));
+ TQString ris = it->property(TQString::tqfromLatin1("ris"));
if(ris.isEmpty()) {
continue;
}
@@ -144,7 +144,7 @@ Tellico::Data::CollPtr RISImporter::collection() {
f = new Data::Field(*it);
m_coll->addField(f);
}
- f->setProperty(TQString::fromLatin1("ris"), ris);
+ f->setProperty(TQString::tqfromLatin1("ris"), ris);
risFields.insert(ris, f);
}
@@ -189,7 +189,7 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
// however, at least one website (Springer) outputs RIS with no space after the final "ER -"
// so just strip the white space later
// also be gracious and allow only any amount of space before hyphen
- TQRegExp rx(TQString::fromLatin1("^(\\w\\w)\\s+-(.*)$"));
+ TQRegExp rx(TQString::tqfromLatin1("^(\\w\\w)\\s+-(.*)$"));
TQString currLine, nextLine;
for(currLine = t.readLine(); !m_cancelled && !currLine.isNull(); currLine = nextLine, j += currLine.length()) {
nextLine = t.readLine();
@@ -225,7 +225,7 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
sp = value;
if(!ep.isEmpty()) {
value = sp + '-' + ep;
- tag = TQString::fromLatin1("EP");
+ tag = TQString::tqfromLatin1("EP");
sp = TQString();
ep = TQString();
} else {
@@ -253,10 +253,10 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
// special case for BT
// primary title for books, secondary for everything else
if(tag == Latin1Literal("BT")) {
- if(entry->field(TQString::fromLatin1("entry-type")) == Latin1Literal("book")) {
- f = m_coll->fieldByName(TQString::fromLatin1("title"));
+ if(entry->field(TQString::tqfromLatin1("entry-type")) == Latin1Literal("book")) {
+ f = m_coll->fieldByName(TQString::tqfromLatin1("title"));
} else {
- f = m_coll->fieldByName(TQString::fromLatin1("booktitle"));
+ f = m_coll->fieldByName(TQString::tqfromLatin1("booktitle"));
}
} else {
f = fieldByTag(tag);
@@ -272,7 +272,7 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
f->addAllowed(value);
// if the field can have multiple values, append current values to new value
if((f->flags() & Data::Field::AllowMultiple) && !entry->field(f->name()).isEmpty()) {
- value.prepend(entry->field(f->name()) + TQString::fromLatin1("; "));
+ value.prepend(entry->field(f->name()) + TQString::tqfromLatin1("; "));
}
entry->setField(f, value);
@@ -293,15 +293,15 @@ Tellico::Data::FieldPtr RISImporter::fieldByTag(const TQString& tag_) {
if(!fieldTag.isEmpty()) {
f = m_coll->fieldByName(fieldTag);
if(f) {
- f->setProperty(TQString::fromLatin1("ris"), tag_);
+ f->setProperty(TQString::tqfromLatin1("ris"), tag_);
return f;
}
}
// add non-default fields if not already there
if(tag_== Latin1Literal("L1")) {
- f = new Data::Field(TQString::fromLatin1("pdf"), i18n("PDF"), Data::Field::URL);
- f->setProperty(TQString::fromLatin1("ris"), TQString::fromLatin1("L1"));
+ f = new Data::Field(TQString::tqfromLatin1("pdf"), i18n("PDF"), Data::Field::URL);
+ f->setProperty(TQString::tqfromLatin1("ris"), TQString::tqfromLatin1("L1"));
f->setCategory(i18n("Miscellaneous"));
}
m_coll->addField(f);