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 /kexi/plugins/macros/kexipart/keximacroview.cpp | |
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 'kexi/plugins/macros/kexipart/keximacroview.cpp')
-rw-r--r-- | kexi/plugins/macros/kexipart/keximacroview.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kexi/plugins/macros/kexipart/keximacroview.cpp b/kexi/plugins/macros/kexipart/keximacroview.cpp index 35200829..507764a7 100644 --- a/kexi/plugins/macros/kexipart/keximacroview.cpp +++ b/kexi/plugins/macros/kexipart/keximacroview.cpp @@ -17,7 +17,7 @@ #include "keximacroview.h" -#include <qdom.h> +#include <tqdom.h> #include <kdebug.h> #include <kexidialogbase.h> @@ -62,12 +62,12 @@ class KexiMacroView::Private }; -KexiMacroView::KexiMacroView(KexiMainWindow *mainwin, QWidget *parent, KoMacro::Macro* const macro, const char* name) - : KexiViewBase(mainwin, parent, (name ? name : "KexiMacroView")) +KexiMacroView::KexiMacroView(KexiMainWindow *mainwin, TQWidget *tqparent, KoMacro::Macro* const macro, const char* name) + : KexiViewBase(mainwin, tqparent, (name ? name : "KexiMacroView")) , d( new Private(macro) ) { //kdDebug() << "KexiMacroView::KexiMacroView() Ctor" << endl; - plugSharedAction( "data_execute", this, SLOT(execute()) ); + plugSharedAction( "data_execute", this, TQT_SLOT(execute()) ); } KexiMacroView::~KexiMacroView() @@ -98,16 +98,16 @@ bool KexiMacroView::loadData() { d->macro->clearItems(); - QString data; + TQString data; if(! loadDataBlock(data)) { kexipluginsdbg << "KexiMacroView::loadData(): no DataBlock" << endl; return false; } - QString errmsg; + TQString errmsg; int errline, errcol; - QDomDocument domdoc; + TQDomDocument domdoc; bool parsed = domdoc.setContent(data, false, &errmsg, &errline, &errcol); if(! parsed) { @@ -115,8 +115,8 @@ bool KexiMacroView::loadData() return false; } - kexipluginsdbg << QString("KexiMacroView::loadData()\n%1").arg(domdoc.toString()) << endl; - QDomElement macroelem = domdoc.namedItem("macro").toElement(); + kexipluginsdbg << TQString("KexiMacroView::loadData()\n%1").tqarg(domdoc.toString()) << endl; + TQDomElement macroelem = domdoc.namedItem("macro").toElement(); if(macroelem.isNull()) { kexipluginsdbg << "KexiMacroView::loadData() Macro domelement is null" << endl; return false; @@ -139,7 +139,7 @@ KexiDB::SchemaData* KexiMacroView::storeNewData(const KexiDB::SchemaData& sdata, if(! storeData()) { kexipluginsdbg << "KexiMacroView::storeNewData() Failed to store the data." << endl; //failure: remove object's schema data to avoid garbage - KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection(); + KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection(); conn->removeObject( schema->id() ); delete schema; return 0; @@ -150,21 +150,21 @@ KexiDB::SchemaData* KexiMacroView::storeNewData(const KexiDB::SchemaData& sdata, tristate KexiMacroView::storeData(bool /*dontAsk*/) { - QDomDocument domdoc("macros"); - QDomElement macroelem = d->macro->toXML(); + TQDomDocument domdoc("macros"); + TQDomElement macroelem = d->macro->toXML(); domdoc.appendChild(macroelem); - const QString xml = domdoc.toString(2); - const QString name = QString("%1 [%2]").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id()); - kexipluginsdbg << QString("KexiMacroView::storeData %1\n%2").arg(name).arg(xml) << endl; + const TQString xml = domdoc.toString(2); + const TQString name = TQString("%1 [%2]").tqarg(tqparentDialog()->partItem()->name()).tqarg(tqparentDialog()->id()); + kexipluginsdbg << TQString("KexiMacroView::storeData %1\n%2").tqarg(name).tqarg(xml) << endl; return storeDataBlock(xml); } -void KexiMacroView::execute(QObject* sender) +void KexiMacroView::execute(TQObject* sender) { KSharedPtr<KoMacro::Context> context = d->macro->execute(sender); if(context->hadException()) { KexiMacroError* error = new KexiMacroError( - mainWin(), // The parent KexiMainWindow + mainWin(), // The tqparent KexiMainWindow context // The KoMacro::Context where the error occured. ); error->exec(); |