diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
commit | 2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch) | |
tree | 18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/translators/deliciousimporter.cpp | |
parent | 1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff) | |
download | tellico-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/translators/deliciousimporter.cpp')
-rw-r--r-- | src/translators/deliciousimporter.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/translators/deliciousimporter.cpp b/src/translators/deliciousimporter.cpp index 5c434cd..78c128d 100644 --- a/src/translators/deliciousimporter.cpp +++ b/src/translators/deliciousimporter.cpp @@ -19,12 +19,12 @@ #include <kstandarddirs.h> -#include <qfile.h> +#include <tqfile.h> using Tellico::Import::DeliciousImporter; DeliciousImporter::DeliciousImporter(const KURL& url_) : XSLTImporter(url_) { - QString xsltFile = locate("appdata", QString::fromLatin1("delicious2tellico.xsl")); + TQString xsltFile = locate("appdata", TQString::tqfromLatin1("delicious2tellico.xsl")); if(!xsltFile.isEmpty()) { KURL u; u.setPath(xsltFile); @@ -46,33 +46,33 @@ Tellico::Data::CollPtr DeliciousImporter::collection() { KURL libraryDir = url(); libraryDir.setPath(url().directory() + "Images/"); - const QStringList imageDirs = QStringList() - << QString::fromLatin1("Large Covers/") - << QString::fromLatin1("Medium Covers/") - << QString::fromLatin1("Small Covers/") - << QString::fromLatin1("Plain Covers/"); - const QString commField = QString::fromLatin1("comments"); - const QString uuidField = QString::fromLatin1("uuid"); - const QString coverField = QString::fromLatin1("cover"); + const TQStringList imageDirs = TQStringList() + << TQString::tqfromLatin1("Large Covers/") + << TQString::tqfromLatin1("Medium Covers/") + << TQString::tqfromLatin1("Small Covers/") + << TQString::tqfromLatin1("Plain Covers/"); + const TQString commField = TQString::tqfromLatin1("comments"); + const TQString uuidField = TQString::tqfromLatin1("uuid"); + const TQString coverField = TQString::tqfromLatin1("cover"); const bool isLocal = url().isLocalFile(); Data::EntryVec entries = coll->entries(); for(Data::EntryVecIt entry = entries.begin(); entry != entries.end(); ++entry) { - QString comments = entry->field(commField); + TQString comments = entry->field(commField); if(!comments.isEmpty()) { RTF2HTML rtf2html(comments); entry->setField(commField, rtf2html.toHTML()); } //try to add images - QString uuid = entry->field(uuidField); + TQString uuid = entry->field(uuidField); if(!uuid.isEmpty() && isLocal) { - for(QStringList::ConstIterator it = imageDirs.begin(); it != imageDirs.end(); ++it) { - QString imgPath = libraryDir.path() + *it + uuid; - if(!QFile::exists(imgPath)) { + for(TQStringList::ConstIterator it = imageDirs.begin(); it != imageDirs.end(); ++it) { + TQString imgPath = libraryDir.path() + *it + uuid; + if(!TQFile::exists(imgPath)) { continue; } - QString imgID = ImageFactory::addImage(imgPath, true); + TQString imgID = ImageFactory::addImage(imgPath, true); if(!imgID.isEmpty()) { entry->setField(coverField, imgID); } |