diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /filters/generic_wrapper | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filters/generic_wrapper')
-rw-r--r-- | filters/generic_wrapper/generic_filter.cc | 26 | ||||
-rw-r--r-- | filters/generic_wrapper/generic_filter.h | 17 |
2 files changed, 22 insertions, 21 deletions
diff --git a/filters/generic_wrapper/generic_filter.cc b/filters/generic_wrapper/generic_filter.cc index 14830762..f3ae2b13 100644 --- a/filters/generic_wrapper/generic_filter.cc +++ b/filters/generic_wrapper/generic_filter.cc @@ -19,8 +19,8 @@ #include <stdlib.h> -#include <qtextcodec.h> -#include <qfile.h> +#include <tqtextcodec.h> +#include <tqfile.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -37,11 +37,11 @@ typedef KGenericFactory<GenericFilter, KoFilter> GenericFilterFactory; K_EXPORT_COMPONENT_FACTORY( libgenerickofilter, GenericFilterFactory ) -GenericFilter::GenericFilter(KoFilter *, const char *, const QStringList&) : +GenericFilter::GenericFilter(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus GenericFilter::convert( const QCString &from, const QCString &to ) +KoFilter::ConversiontqStatus GenericFilter::convert( const TQCString &from, const TQCString &to ) { //find the right script to use @@ -80,14 +80,14 @@ KoFilter::ConversionStatus GenericFilter::convert( const QCString &from, const Q return KoFilter::NotImplemented; } -KoFilter::ConversionStatus GenericFilter::doImport() +KoFilter::ConversiontqStatus GenericFilter::doImport() { - KTempFile temp(QString("genericfilter-")); + KTempFile temp(TQString("genericfilter-")); temp.setAutoDelete(true); - QFile tempFile(temp.name()); + TQFile tempFile(temp.name()); - m_out = KoStore::createStore(&tempFile, KoStore::Write); + m_out = KoStore::createStore(TQT_TQIODEVICE(&tempFile), KoStore::Write); if (!m_out || !m_out->open("root")) { @@ -97,15 +97,15 @@ KoFilter::ConversionStatus GenericFilter::doImport() } else { - QString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " " + TQString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " " + KProcess::quote(m_chain->outputFile()); - system(QFile::encodeName(exec)); + system(TQFile::encodeName(exec)); kdDebug() << "Executing: " << exec << endl; - QFile outFile(m_chain->outputFile()); + TQFile outFile(m_chain->outputFile()); outFile.open(IO_ReadOnly); - QByteArray outData = outFile.readAll(); + TQByteArray outData = outFile.readAll(); if (outData.size()==0) { m_out->close(); return KoFilter::UnexpectedEOF; @@ -119,7 +119,7 @@ KoFilter::ConversionStatus GenericFilter::doImport() return KoFilter::OK; } -KoFilter::ConversionStatus GenericFilter::doExport() +KoFilter::ConversiontqStatus GenericFilter::doExport() { return KoFilter::NotImplemented; } diff --git a/filters/generic_wrapper/generic_filter.h b/filters/generic_wrapper/generic_filter.h index 21cc7311..1fde2b95 100644 --- a/filters/generic_wrapper/generic_filter.h +++ b/filters/generic_wrapper/generic_filter.h @@ -20,8 +20,8 @@ #ifndef __GENERICFILTER_H__ #define __GENERICFILTER_H__ -#include <qcstring.h> -#include <qstringlist.h> +#include <tqcstring.h> +#include <tqstringlist.h> #include <kprocess.h> #include <KoFilter.h> @@ -30,17 +30,18 @@ class GenericFilter : public KoFilter { Q_OBJECT + TQ_OBJECT public: - GenericFilter(KoFilter *parent, const char *name, const QStringList&); + GenericFilter(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~GenericFilter() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, - const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, + const TQCString& to ); private: - KoFilter::ConversionStatus doImport(); - KoFilter::ConversionStatus doExport(); - QString m_to, m_from, m_exec; + KoFilter::ConversiontqStatus doImport(); + KoFilter::ConversiontqStatus doExport(); + TQString m_to, m_from, m_exec; KoStore* m_out; }; |