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/griffithimporter.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/griffithimporter.cpp')
-rw-r--r-- | src/translators/griffithimporter.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/translators/griffithimporter.cpp b/src/translators/griffithimporter.cpp index 8b0394f..953a159 100644 --- a/src/translators/griffithimporter.cpp +++ b/src/translators/griffithimporter.cpp @@ -20,8 +20,8 @@ #include <kstandarddirs.h> #include <kprocess.h> -#include <qdir.h> -#include <qfile.h> +#include <tqdir.h> +#include <tqfile.h> using Tellico::Import::GriffithImporter; @@ -34,28 +34,28 @@ GriffithImporter::~GriffithImporter() { } Tellico::Data::CollPtr GriffithImporter::collection() { - QString filename = QDir::homeDirPath() + QString::fromLatin1("/.griffith/griffith.db"); - if(!QFile::exists(filename)) { + TQString filename = TQDir::homeDirPath() + TQString::tqfromLatin1("/.griffith/griffith.db"); + if(!TQFile::exists(filename)) { myWarning() << "GriffithImporter::collection() - database not found: " << filename << endl; return 0; } - QString python = KStandardDirs::findExe(QString::fromLatin1("python")); + TQString python = KStandardDirs::findExe(TQString::tqfromLatin1("python")); if(python.isEmpty()) { myWarning() << "GriffithImporter::collection() - python not found!" << endl; return 0; } - QString griffith = KGlobal::dirs()->findResource("appdata", QString::fromLatin1("griffith2tellico.py")); + TQString griffith = KGlobal::dirs()->findResource("appdata", TQString::tqfromLatin1("griffith2tellico.py")); if(griffith.isEmpty()) { myWarning() << "GriffithImporter::collection() - griffith2tellico.py not found!" << endl; return 0; } m_process = new KProcess(); - connect(m_process, SIGNAL(receivedStdout(KProcess*, char*, int)), SLOT(slotData(KProcess*, char*, int))); - connect(m_process, SIGNAL(receivedStderr(KProcess*, char*, int)), SLOT(slotError(KProcess*, char*, int))); - connect(m_process, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*))); + connect(m_process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), TQT_SLOT(slotData(KProcess*, char*, int))); + connect(m_process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), TQT_SLOT(slotError(KProcess*, char*, int))); + connect(m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*))); *m_process << python << griffith; if(!m_process->start(KProcess::Block, KProcess::AllOutput)) { myDebug() << "ExecExternalFetcher::startSearch() - process failed to start" << endl; @@ -66,12 +66,12 @@ Tellico::Data::CollPtr GriffithImporter::collection() { } void GriffithImporter::slotData(KProcess*, char* buffer_, int len_) { - QDataStream stream(m_data, IO_WriteOnly | IO_Append); + TQDataStream stream(m_data, IO_WriteOnly | IO_Append); stream.writeRawBytes(buffer_, len_); } void GriffithImporter::slotError(KProcess*, char* buffer_, int len_) { - QString msg = QString::fromLocal8Bit(buffer_, len_); + TQString msg = TQString::fromLocal8Bit(buffer_, len_); myDebug() << "GriffithImporter::slotError() - " << msg << endl; setStatusMessage(msg); } @@ -89,7 +89,7 @@ void GriffithImporter::slotProcessExited(KProcess*) { return; } - QString text = QString::fromUtf8(m_data, m_data.size()); + TQString text = TQString::fromUtf8(m_data, m_data.size()); TellicoImporter imp(text); m_coll = imp.collection(); |