summaryrefslogtreecommitdiffstats
path: root/src/collectionfactory.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
commit2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch)
tree18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/collectionfactory.cpp
parent1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff)
downloadtellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz
tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip
TQt4 port tellico
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/collectionfactory.cpp')
-rw-r--r--src/collectionfactory.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/collectionfactory.cpp b/src/collectionfactory.cpp
index 25f9d6f..974d254 100644
--- a/src/collectionfactory.cpp
+++ b/src/collectionfactory.cpp
@@ -79,7 +79,7 @@ Tellico::Data::CollPtr CollectionFactory::collection(int type_, bool addFields_)
}
Data::CollPtr c = new Data::Collection(i18n("My Collection"));
- Data::FieldPtr f = new Data::Field(QString::fromLatin1("title"), i18n("Title"));
+ Data::FieldPtr f = new Data::Field(TQString::tqfromLatin1("title"), i18n("Title"));
f->setCategory(i18n("General"));
f->setFlags(Data::Field::NoDelete);
f->setFormatFlag(Data::Field::FormatTitle);
@@ -88,7 +88,7 @@ Tellico::Data::CollPtr CollectionFactory::collection(int type_, bool addFields_)
}
// static
-Tellico::Data::CollPtr CollectionFactory::collection(const QString& typeName_, bool addFields_) {
+Tellico::Data::CollPtr CollectionFactory::collection(const TQString& typeName_, bool addFields_) {
if(typeName_ == typeName(Data::Collection::Book)) {
return new Data::BookCollection(addFields_);
} else if(typeName_ == typeName(Data::Collection::Album)) {
@@ -137,68 +137,68 @@ Tellico::CollectionNameMap CollectionFactory::nameMap() {
return map;
}
-QString CollectionFactory::typeName(int type_) {
+TQString CollectionFactory::typeName(int type_) {
switch(type_) {
case Data::Collection::Book:
- return QString::fromLatin1("book");
+ return TQString::tqfromLatin1("book");
break;
case Data::Collection::Video:
- return QString::fromLatin1("video");
+ return TQString::tqfromLatin1("video");
break;
case Data::Collection::Album:
- return QString::fromLatin1("album");
+ return TQString::tqfromLatin1("album");
break;
case Data::Collection::Bibtex:
- return QString::fromLatin1("bibtex");
+ return TQString::tqfromLatin1("bibtex");
break;
case Data::Collection::ComicBook:
- return QString::fromLatin1("comic");
+ return TQString::tqfromLatin1("comic");
break;
case Data::Collection::Wine:
- return QString::fromLatin1("wine");
+ return TQString::tqfromLatin1("wine");
break;
case Data::Collection::Coin:
- return QString::fromLatin1("coin");
+ return TQString::tqfromLatin1("coin");
break;
case Data::Collection::Stamp:
- return QString::fromLatin1("stamp");
+ return TQString::tqfromLatin1("stamp");
break;
case Data::Collection::Card:
- return QString::fromLatin1("card");
+ return TQString::tqfromLatin1("card");
break;
case Data::Collection::Game:
- return QString::fromLatin1("game");
+ return TQString::tqfromLatin1("game");
break;
case Data::Collection::File:
- return QString::fromLatin1("file");
+ return TQString::tqfromLatin1("file");
break;
case Data::Collection::BoardGame:
- return QString::fromLatin1("boardgame");
+ return TQString::tqfromLatin1("boardgame");
break;
case Data::Collection::Base:
- return QString::fromLatin1("entry");
+ return TQString::tqfromLatin1("entry");
break;
default:
kdWarning() << "CollectionFactory::collection() - collection type not implemented: " << type_ << endl;
- return QString::fromLatin1("entry");
+ return TQString::tqfromLatin1("entry");
break;
}
}
-bool CollectionFactory::isDefaultField(int type_, const QString& name_) {
+bool CollectionFactory::isDefaultField(int type_, const TQString& name_) {
Data::CollPtr coll = collection(type_, true);
Data::FieldVec fields = coll->fields();
for(Data::FieldVec::Iterator field = fields.begin(); field != fields.end(); ++field) {