From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- filters/generic_wrapper/generic_filter.cc | 26 +++++++++++++------------- filters/generic_wrapper/generic_filter.h | 17 +++++++++-------- 2 files changed, 22 insertions(+), 21 deletions(-) (limited to 'filters/generic_wrapper') 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 -#include -#include +#include +#include #include #include @@ -37,11 +37,11 @@ typedef KGenericFactory 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 -#include +#include +#include #include #include @@ -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; }; -- cgit v1.2.1