summaryrefslogtreecommitdiffstats
path: root/src/translators/gcfilmsexporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/translators/gcfilmsexporter.cpp')
-rw-r--r--src/translators/gcfilmsexporter.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/translators/gcfilmsexporter.cpp b/src/translators/gcfilmsexporter.cpp
index 279a3ab..91a4d8e 100644
--- a/src/translators/gcfilmsexporter.cpp
+++ b/src/translators/gcfilmsexporter.cpp
@@ -61,19 +61,19 @@ bool GCfilmsExporter::exec() {
char d = GCFILMS_DELIMITER;
bool format = options() & Export::ExportFormatted;
// when importing GCfilms, a url field is added
- bool hasURL = coll->hasField(TQString::tqfromLatin1("url"))
- && coll->fieldByName(TQString::tqfromLatin1("url"))->type() == Data::Field::URL;
+ bool hasURL = coll->hasField(TQString::fromLatin1("url"))
+ && coll->fieldByName(TQString::fromLatin1("url"))->type() == Data::Field::URL;
uint minRating = 1;
uint maxRating = 5;
- Data::FieldPtr f = coll->fieldByName(TQString::tqfromLatin1("rating"));
+ Data::FieldPtr f = coll->fieldByName(TQString::fromLatin1("rating"));
if(f) {
bool ok;
- uint n = Tellico::toUInt(f->property(TQString::tqfromLatin1("minimum")), &ok);
+ uint n = Tellico::toUInt(f->property(TQString::fromLatin1("minimum")), &ok);
if(ok) {
minRating = n;
}
- n = Tellico::toUInt(f->property(TQString::tqfromLatin1("maximum")), &ok);
+ n = Tellico::toUInt(f->property(TQString::fromLatin1("maximum")), &ok);
if(ok) {
maxRating = n;
}
@@ -83,8 +83,8 @@ bool GCfilmsExporter::exec() {
KURL imageDir;
if(url().isLocalFile()) {
imageDir = url();
- imageDir.cd(TQString::tqfromLatin1(".."));
- imageDir.addPath(url().fileName().section('.', 0, 0) + TQString::tqfromLatin1("_images/"));
+ imageDir.cd(TQString::fromLatin1(".."));
+ imageDir.addPath(url().fileName().section('.', 0, 0) + TQString::fromLatin1("_images/"));
if(!KIO::NetAccess::exists(imageDir, false, 0)) {
bool success = KIO::NetAccess::mkdir(imageDir, Kernel::self()->widget());
if(!success) {
@@ -103,7 +103,7 @@ bool GCfilmsExporter::exec() {
push(ts, "nationality", entry, format);
push(ts, "genre", entry, format);
// do image
- TQString tmp = entry->field(TQString::tqfromLatin1("cover"));
+ TQString tmp = entry->field(TQString::fromLatin1("cover"));
if(!tmp.isEmpty() && !imageDir.isEmpty()) {
images << tmp;
ts << imageDir.path() << tmp;
@@ -111,9 +111,9 @@ bool GCfilmsExporter::exec() {
ts << d;
// do not format cast since the commas could get mixed up
- const TQStringList cast = entry->fields(TQString::tqfromLatin1("cast"), false);
+ const TQStringList cast = entry->fields(TQString::fromLatin1("cast"), false);
for(TQStringList::ConstIterator it = cast.begin(); it != cast.end(); ++it) {
- ts << (*it).section(TQString::tqfromLatin1("::"), 0, 0);
+ ts << (*it).section(TQString::fromLatin1("::"), 0, 0);
if(it != cast.fromLast()) {
ts << ", ";
}
@@ -142,7 +142,7 @@ bool GCfilmsExporter::exec() {
// gcfilms's ratings go 0-10, just multiply by two
bool ok;
- int rat = Tellico::toUInt(entry->field(TQString::tqfromLatin1("rating"), format), &ok);
+ int rat = Tellico::toUInt(entry->field(TQString::fromLatin1("rating"), format), &ok);
if(ok) {
ts << rat * 10/(maxRating-minRating);
}
@@ -154,7 +154,7 @@ bool GCfilmsExporter::exec() {
push(ts, "subtitle", entry, format);
// values[20] is borrower name, values[21] is loan date
- if(entry->field(TQString::tqfromLatin1("loaned")).isEmpty()) {
+ if(entry->field(TQString::fromLatin1("loaned")).isEmpty()) {
ts << d << d;
} else {
// find loan
@@ -179,7 +179,7 @@ bool GCfilmsExporter::exec() {
ts << d;
// for certification, only thing we can do is assume default american ratings
- tmp = entry->field(TQString::tqfromLatin1("certification"), format);
+ tmp = entry->field(TQString::fromLatin1("certification"), format);
int age = 0;
if(tmp == Latin1Literal("U (USA)")) {
age = 1;
@@ -218,14 +218,14 @@ bool GCfilmsExporter::exec() {
}
void GCfilmsExporter::push(TQTextOStream& ts_, TQCString fieldName_, Data::EntryVec::ConstIterator entry_, bool format_) {
- Data::FieldPtr f = collection()->fieldByName(TQString::tqfromLatin1(fieldName_));
+ Data::FieldPtr f = collection()->fieldByName(TQString::fromLatin1(fieldName_));
// don't format multiple names cause commas will cause problems
if(f->formatFlag() == Data::Field::FormatName && (f->flags() & Data::Field::AllowMultiple)) {
format_ = false;
}
- TQString s = entry_->field(TQString::tqfromLatin1(fieldName_), format_);
+ TQString s = entry_->field(TQString::fromLatin1(fieldName_), format_);
if(f->flags() & Data::Field::AllowMultiple) {
- ts_ << s.replace(TQString::tqfromLatin1("; "), TQChar(','));
+ ts_ << s.replace(TQString::fromLatin1("; "), TQChar(','));
} else {
ts_ << s;
}