summaryrefslogtreecommitdiffstats
path: root/src/translators/amcimporter.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/amcimporter.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/amcimporter.cpp')
-rw-r--r--src/translators/amcimporter.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/translators/amcimporter.cpp b/src/translators/amcimporter.cpp
index 185b8fc..0209ddc 100644
--- a/src/translators/amcimporter.cpp
+++ b/src/translators/amcimporter.cpp
@@ -64,7 +64,7 @@ Tellico::Data::CollPtr AMCImporter::collection() {
TQMemArray<char> buffer(l+1);
m_ds.readRawBytes(buffer.data(), l);
TQString version = TQString::fromLocal8Bit(buffer, l);
- TQRegExp versionRx(TQString::fromLatin1(".+AMC_(\\d+)\\.(\\d+).+"));
+ TQRegExp versionRx(TQString::tqfromLatin1(".+AMC_(\\d+)\\.(\\d+).+"));
if(version.find(versionRx) == -1) {
myDebug() << "AMCImporter::collection() - no file id match" << endl;
return 0;
@@ -145,11 +145,11 @@ TQString AMCImporter::readImage(const TQString& format_) {
myDebug() << "AMCImporter::readImage() - null image" << endl;
return TQString();
}
- TQString format = TQString::fromLatin1("PNG");
+ TQString format = TQString::tqfromLatin1("PNG");
if(format_ == Latin1Literal(".jpg")) {
- format = TQString::fromLatin1("JPEG");
+ format = TQString::tqfromLatin1("JPEG");
} else if(format_ == Latin1Literal(".gif")) {
- format = TQString::fromLatin1("GIF");
+ format = TQString::tqfromLatin1("GIF");
}
return ImageFactory::addImage(img, format);
}
@@ -167,14 +167,14 @@ void AMCImporter::readEntry() {
if(m_majVersion >= 3 && m_minVersion >= 5) {
rating /= 10;
}
- e->setField(TQString::fromLatin1("rating"), TQString::number(rating));
+ e->setField(TQString::tqfromLatin1("rating"), TQString::number(rating));
int year = readInt();
if(year > 0) {
- e->setField(TQString::fromLatin1("year"), TQString::number(year));
+ e->setField(TQString::tqfromLatin1("year"), TQString::number(year));
}
int time = readInt();
if(time > 0) {
- e->setField(TQString::fromLatin1("running-time"), TQString::number(time));
+ e->setField(TQString::tqfromLatin1("running-time"), TQString::number(time));
}
readInt(); // video bitrate
@@ -182,55 +182,55 @@ void AMCImporter::readEntry() {
readInt(); // number of files
readBool(); // checked
readString(); // media label
- e->setField(TQString::fromLatin1("medium"), readString());
+ e->setField(TQString::tqfromLatin1("medium"), readString());
readString(); // source
readString(); // borrower
TQString s = readString(); // title
if(!s.isEmpty()) {
- e->setField(TQString::fromLatin1("title"), s);
+ e->setField(TQString::tqfromLatin1("title"), s);
}
TQString s2 = readString(); // translated title
if(s.isEmpty()) {
- e->setField(TQString::fromLatin1("title"), s2);
+ e->setField(TQString::tqfromLatin1("title"), s2);
}
- e->setField(TQString::fromLatin1("director"), readString());
+ e->setField(TQString::tqfromLatin1("director"), readString());
s = readString();
- TQRegExp roleRx(TQString::fromLatin1("(.+) \\(([^(]+)\\)"));
+ TQRegExp roleRx(TQString::tqfromLatin1("(.+) \\(([^(]+)\\)"));
roleRx.setMinimal(true);
if(s.find(roleRx) > -1) {
TQString role = roleRx.cap(2).lower();
if(role == Latin1Literal("story") || role == Latin1Literal("written by")) {
- e->setField(TQString::fromLatin1("writer"), roleRx.cap(1));
+ e->setField(TQString::tqfromLatin1("writer"), roleRx.cap(1));
} else {
- e->setField(TQString::fromLatin1("producer"), s);
+ e->setField(TQString::tqfromLatin1("producer"), s);
}
} else {
- e->setField(TQString::fromLatin1("producer"), s);
+ e->setField(TQString::tqfromLatin1("producer"), s);
}
- e->setField(TQString::fromLatin1("nationality"), readString());
- e->setField(TQString::fromLatin1("genre"), readString().replace(TQString::fromLatin1(", "), TQString::fromLatin1("; ")));
+ e->setField(TQString::tqfromLatin1("nationality"), readString());
+ e->setField(TQString::tqfromLatin1("genre"), readString().replace(TQString::tqfromLatin1(", "), TQString::tqfromLatin1("; ")));
- e->setField(TQString::fromLatin1("cast"), parseCast(readString()).join(TQString::fromLatin1("; ")));
+ e->setField(TQString::tqfromLatin1("cast"), parseCast(readString()).join(TQString::tqfromLatin1("; ")));
readString(); // url
- e->setField(TQString::fromLatin1("plot"), readString());
- e->setField(TQString::fromLatin1("comments"), readString());
+ e->setField(TQString::tqfromLatin1("plot"), readString());
+ e->setField(TQString::tqfromLatin1("comments"), readString());
s = readString(); // video format
- TQRegExp regionRx(TQString::fromLatin1("Region \\d"));
+ TQRegExp regionRx(TQString::tqfromLatin1("Region \\d"));
if(s.find(regionRx) > -1) {
- e->setField(TQString::fromLatin1("region"), regionRx.cap(0));
+ e->setField(TQString::tqfromLatin1("region"), regionRx.cap(0));
}
- e->setField(TQString::fromLatin1("audio-track"), readString()); // audio format
+ e->setField(TQString::tqfromLatin1("audio-track"), readString()); // audio format
readString(); // resolution
readString(); // frame rate
- e->setField(TQString::fromLatin1("language"), readString()); // audio language
- e->setField(TQString::fromLatin1("subtitle"), readString()); // subtitle
+ e->setField(TQString::tqfromLatin1("language"), readString()); // audio language
+ e->setField(TQString::tqfromLatin1("subtitle"), readString()); // subtitle
readString(); // file size
s = readString(); // picture extension
s = readImage(s); // picture
if(!s.isEmpty()) {
- e->setField(TQString::fromLatin1("cover"), s);
+ e->setField(TQString::tqfromLatin1("cover"), s);
}
m_coll->addEntries(e);
@@ -239,7 +239,7 @@ void AMCImporter::readEntry() {
TQStringList AMCImporter::parseCast(const TQString& text_) {
TQStringList cast;
int nPar = 0;
- TQRegExp castRx(TQString::fromLatin1("[,()]"));
+ TQRegExp castRx(TQString::tqfromLatin1("[,()]"));
TQString person, role;
int oldPos = 0;
for(int pos = text_.find(castRx); pos > -1; pos = text_.find(castRx, pos+1)) {
@@ -248,7 +248,7 @@ TQStringList AMCImporter::parseCast(const TQString& text_) {
person += text_.mid(oldPos, pos-oldPos).stripWhiteSpace();
TQString all = person;
if(!role.isEmpty()) {
- if(role.startsWith(TQString::fromLatin1("as "))) {
+ if(role.startsWith(TQString::tqfromLatin1("as "))) {
role = role.mid(3);
}
all += "::" + role;
@@ -277,7 +277,7 @@ TQStringList AMCImporter::parseCast(const TQString& text_) {
person += text_.mid(oldPos, pos-oldPos).stripWhiteSpace();
TQString all = person;
if(!role.isEmpty()) {
- if(role.startsWith(TQString::fromLatin1("as "))) {
+ if(role.startsWith(TQString::tqfromLatin1("as "))) {
role = role.mid(3);
}
all += "::" + role;