summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/plugins/macros
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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')
-rw-r--r--kexi/plugins/macros/kexiactions/datatableaction.cpp48
-rw-r--r--kexi/plugins/macros/kexiactions/datatableaction.h3
-rw-r--r--kexi/plugins/macros/kexiactions/executeaction.cpp18
-rw-r--r--kexi/plugins/macros/kexiactions/executeaction.h3
-rw-r--r--kexi/plugins/macros/kexiactions/kexiaction.cpp2
-rw-r--r--kexi/plugins/macros/kexiactions/kexiaction.h2
-rw-r--r--kexi/plugins/macros/kexiactions/kexivariable.h4
-rw-r--r--kexi/plugins/macros/kexiactions/messageaction.cpp8
-rw-r--r--kexi/plugins/macros/kexiactions/messageaction.h1
-rw-r--r--kexi/plugins/macros/kexiactions/navigateaction.cpp12
-rw-r--r--kexi/plugins/macros/kexiactions/navigateaction.h3
-rw-r--r--kexi/plugins/macros/kexiactions/objectnamevariable.h12
-rw-r--r--kexi/plugins/macros/kexiactions/objectvariable.h10
-rw-r--r--kexi/plugins/macros/kexiactions/openaction.cpp48
-rw-r--r--kexi/plugins/macros/kexiactions/openaction.h3
-rw-r--r--kexi/plugins/macros/kexipart/keximacrodesignview.cpp90
-rw-r--r--kexi/plugins/macros/kexipart/keximacrodesignview.h11
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerror.cpp22
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerror.h9
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerrorbase.ui32
-rw-r--r--kexi/plugins/macros/kexipart/keximacropart.cpp22
-rw-r--r--kexi/plugins/macros/kexipart/keximacropart.h17
-rw-r--r--kexi/plugins/macros/kexipart/keximacroproperty.cpp242
-rw-r--r--kexi/plugins/macros/kexipart/keximacroproperty.h44
-rw-r--r--kexi/plugins/macros/kexipart/keximacrotextview.cpp20
-rw-r--r--kexi/plugins/macros/kexipart/keximacrotextview.h5
-rw-r--r--kexi/plugins/macros/kexipart/keximacroview.cpp34
-rw-r--r--kexi/plugins/macros/kexipart/keximacroview.h7
-rw-r--r--kexi/plugins/macros/lib/action.cpp54
-rw-r--r--kexi/plugins/macros/lib/action.h45
-rw-r--r--kexi/plugins/macros/lib/context.cpp52
-rw-r--r--kexi/plugins/macros/lib/context.h17
-rw-r--r--kexi/plugins/macros/lib/exception.cpp16
-rw-r--r--kexi/plugins/macros/lib/exception.h12
-rw-r--r--kexi/plugins/macros/lib/macro.cpp26
-rw-r--r--kexi/plugins/macros/lib/macro.h29
-rw-r--r--kexi/plugins/macros/lib/macroitem.cpp64
-rw-r--r--kexi/plugins/macros/lib/macroitem.h24
-rw-r--r--kexi/plugins/macros/lib/manager.cpp54
-rw-r--r--kexi/plugins/macros/lib/manager.h50
-rw-r--r--kexi/plugins/macros/lib/metamethod.cpp130
-rw-r--r--kexi/plugins/macros/lib/metamethod.h50
-rw-r--r--kexi/plugins/macros/lib/metaobject.cpp44
-rw-r--r--kexi/plugins/macros/lib/metaobject.h26
-rw-r--r--kexi/plugins/macros/lib/metaparameter.cpp36
-rw-r--r--kexi/plugins/macros/lib/metaparameter.h36
-rw-r--r--kexi/plugins/macros/lib/variable.cpp76
-rw-r--r--kexi/plugins/macros/lib/variable.h86
-rw-r--r--kexi/plugins/macros/lib/xmlhandler.cpp52
-rw-r--r--kexi/plugins/macros/lib/xmlhandler.h16
-rw-r--r--kexi/plugins/macros/tests/actiontests.cpp32
-rw-r--r--kexi/plugins/macros/tests/actiontests.h1
-rw-r--r--kexi/plugins/macros/tests/commontests.cpp246
-rw-r--r--kexi/plugins/macros/tests/commontests.h5
-rw-r--r--kexi/plugins/macros/tests/komacrotestbase.h18
-rw-r--r--kexi/plugins/macros/tests/macroitemtests.cpp26
-rw-r--r--kexi/plugins/macros/tests/macroitemtests.h1
-rw-r--r--kexi/plugins/macros/tests/macrotests.cpp32
-rw-r--r--kexi/plugins/macros/tests/macrotests.h1
-rw-r--r--kexi/plugins/macros/tests/testaction.cpp8
-rw-r--r--kexi/plugins/macros/tests/testaction.h3
-rw-r--r--kexi/plugins/macros/tests/testobject.cpp28
-rw-r--r--kexi/plugins/macros/tests/testobject.h13
-rw-r--r--kexi/plugins/macros/tests/variabletests.cpp26
-rw-r--r--kexi/plugins/macros/tests/variabletests.h1
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.cpp180
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.h15
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.cpp232
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.h19
69 files changed, 1319 insertions, 1295 deletions
diff --git a/kexi/plugins/macros/kexiactions/datatableaction.cpp b/kexi/plugins/macros/kexiactions/datatableaction.cpp
index 90b13e4f..fff0eaf5 100644
--- a/kexi/plugins/macros/kexiactions/datatableaction.cpp
+++ b/kexi/plugins/macros/kexiactions/datatableaction.cpp
@@ -33,9 +33,9 @@ using namespace KexiMacro;
namespace KexiMacro {
- //static const QString OBJECT = "method";
- //static const QString OBJECT = "type";
- //static const QString OBJECT = "partitem";
+ //static const TQString OBJECT = "method";
+ //static const TQString OBJECT = "type";
+ //static const TQString OBJECT = "partitem";
template<class ACTIONIMPL>
class MethodVariable : public KexiVariable<ACTIONIMPL>
@@ -44,7 +44,7 @@ namespace KexiMacro {
MethodVariable(ACTIONIMPL* actionimpl)
: KexiVariable<ACTIONIMPL>(actionimpl, "method", i18n("Method"))
{
- QStringList list;
+ TQStringList list;
list << "import" << "export";
this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) );
@@ -59,7 +59,7 @@ namespace KexiMacro {
TypeVariable(ACTIONIMPL* actionimpl)
: KexiVariable<ACTIONIMPL>(actionimpl, "type", i18n("Type"))
{
- QStringList list;
+ TQStringList list;
list << "file" << "clipboard";
this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) );
@@ -71,10 +71,10 @@ namespace KexiMacro {
class PartItemVariable : public KexiVariable<ACTIONIMPL>
{
public:
- PartItemVariable(ACTIONIMPL* actionimpl, const QString& partitem = QString::null)
+ PartItemVariable(ACTIONIMPL* actionimpl, const TQString& partitem = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, "partitem", i18n("Item"))
{
- QStringList namelist;
+ TQStringList namelist;
if(actionimpl->mainWin()->project()) {
KexiPart::PartInfoList* parts = Kexi::partManager().partInfoList();
for(KexiPart::PartInfoListIterator it(*parts); it.current(); ++it) {
@@ -86,14 +86,14 @@ namespace KexiMacro {
for(KexiPart::ItemDictIterator item_it = *items; item_it.current(); ++item_it)
namelist << info->objectName() + "." + item_it.current()->name();
}
- for(QStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
+ for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
- //const QString name = info->objectName(); //info->groupName();
+ //const TQString name = info->objectName(); //info->groupName();
//this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) );
}
- const QString n =
- namelist.contains(partitem)
+ const TQString n =
+ namelist.tqcontains(partitem)
? partitem
: namelist.count() > 0 ? namelist[0] : "";
this->setVariant(n);
@@ -115,7 +115,7 @@ DataTableAction::~DataTableAction()
{
}
-bool DataTableAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool DataTableAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"DataTableAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
/*
@@ -141,27 +141,27 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
return;
}
- const QString method = context->variable("method")->variant().toString();
- const QString type = context->variable("type")->variant().toString();
+ const TQString method = context->variable("method")->variant().toString();
+ const TQString type = context->variable("type")->variant().toString();
- const QString partitem = context->variable("partitem")->variant().toString();
- QString identifier;
+ const TQString partitem = context->variable("partitem")->variant().toString();
+ TQString identifier;
if(! partitem.isEmpty()) {
- QStringList parts = QStringList::split(".", partitem);
- KexiPart::Part* part = Kexi::partManager().partForMimeType( QString("kexi/%1").arg(parts[0]) );
+ TQStringList parts = TQStringList::split(".", partitem);
+ KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(parts[0]) );
KexiPart::Item* item = part ? mainWin()->project()->item(part->info(), parts[1]) : 0;
if(! item)
- throw KoMacro::Exception(i18n("No such item \"%1\"").arg(partitem));
- identifier = QString::number(item->identifier());
+ throw KoMacro::Exception(i18n("No such item \"%1\"").tqarg(partitem));
+ identifier = TQString::number(item->identifier());
}
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
if(! identifier.isNull())
args.insert("itemId", identifier);
if(method == "import") {
args.insert("sourceType", type);
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVImportDialog", 0, mainWin(), 0, &args);
if (!dlg)
return; //error msg has been shown by KexiInternalPart
@@ -170,7 +170,7 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
}
else if(method == "export") {
args.insert("destinationType", type);
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVExportWizard", 0, mainWin(), 0, &args);
if (!dlg)
return; //error msg has been shown by KexiInternalPart
@@ -178,7 +178,7 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
delete dlg;
}
else {
- throw KoMacro::Exception(i18n("No such method \"%1\"").arg(method));
+ throw KoMacro::Exception(i18n("No such method \"%1\"").tqarg(method));
}
}
diff --git a/kexi/plugins/macros/kexiactions/datatableaction.h b/kexi/plugins/macros/kexiactions/datatableaction.h
index 3b5b32c0..b713b2c7 100644
--- a/kexi/plugins/macros/kexiactions/datatableaction.h
+++ b/kexi/plugins/macros/kexiactions/datatableaction.h
@@ -37,6 +37,7 @@ namespace KexiMacro {
class DataTableAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -60,7 +61,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexiactions/executeaction.cpp b/kexi/plugins/macros/kexiactions/executeaction.cpp
index 1e7f24a2..ccad645c 100644
--- a/kexi/plugins/macros/kexiactions/executeaction.cpp
+++ b/kexi/plugins/macros/kexiactions/executeaction.cpp
@@ -32,8 +32,8 @@
using namespace KexiMacro;
namespace KexiMacro {
- static const QString OBJECT = "object";
- static const QString NAME = "name";
+ static const TQString OBJECT = "object";
+ static const TQString NAME = "name";
}
ExecuteAction::ExecuteAction()
@@ -50,7 +50,7 @@ ExecuteAction::~ExecuteAction()
{
}
-bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"ExecuteAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false);
@@ -61,8 +61,8 @@ bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, cons
variable->clearChildren();
if(name == OBJECT) {
- const QString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "macro" or "script"
- const QString objectname = macroitem->variant(NAME, true).toString(); // e.g. "macro1" or "macro2" if objectvalue above is "macro"
+ const TQString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "macro" or "script"
+ const TQString objectname = macroitem->variant(NAME, true).toString(); // e.g. "macro1" or "macro2" if objectvalue above is "macro"
macroitem->variable(NAME, true)->setChildren(
KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new ObjectNameVariable<ExecuteAction>(this, objectvalue, objectname)) );
}
@@ -77,17 +77,17 @@ void ExecuteAction::activate(KSharedPtr<KoMacro::Context> context)
return;
}
- const QString mimetype = QString("kexi/%1").arg( context->variable("object")->variant().toString() );
- const QString name = context->variable("name")->variant().toString();
+ const TQString mimetype = TQString("kexi/%1").tqarg( context->variable("object")->variant().toString() );
+ const TQString name = context->variable("name")->variant().toString();
KexiPart::Part* part = Kexi::partManager().partForMimeType(mimetype);
if(! part) {
- throw KoMacro::Exception(i18n("No such mimetype \"%1\"").arg(mimetype));
+ throw KoMacro::Exception(i18n("No such mimetype \"%1\"").tqarg(mimetype));
}
KexiPart::Item* item = mainWin()->project()->item(part->info(), name);
if(! item) {
- throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").arg(name).arg(mimetype));
+ throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").tqarg(name).tqarg(mimetype));
}
part->execute(item);
diff --git a/kexi/plugins/macros/kexiactions/executeaction.h b/kexi/plugins/macros/kexiactions/executeaction.h
index 17a8ca88..b2cfaaea 100644
--- a/kexi/plugins/macros/kexiactions/executeaction.h
+++ b/kexi/plugins/macros/kexiactions/executeaction.h
@@ -39,6 +39,7 @@ namespace KexiMacro {
class ExecuteAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexiactions/kexiaction.cpp b/kexi/plugins/macros/kexiactions/kexiaction.cpp
index 521f8cfc..aeb3b764 100644
--- a/kexi/plugins/macros/kexiactions/kexiaction.cpp
+++ b/kexi/plugins/macros/kexiactions/kexiaction.cpp
@@ -25,7 +25,7 @@
using namespace KexiMacro;
-KexiAction::KexiAction(const QString& name, const QString& text)
+KexiAction::KexiAction(const TQString& name, const TQString& text)
: KoMacro::Action(name)
{
m_mainwin = dynamic_cast< KexiMainWindow* >( KoMacro::Manager::self()->guiClient() );
diff --git a/kexi/plugins/macros/kexiactions/kexiaction.h b/kexi/plugins/macros/kexiactions/kexiaction.h
index a61e2bc1..7474a269 100644
--- a/kexi/plugins/macros/kexiactions/kexiaction.h
+++ b/kexi/plugins/macros/kexiactions/kexiaction.h
@@ -51,7 +51,7 @@ namespace KexiMacro {
* name will be used to identify the action.
* @param text The i18n-caption text used for display purposes.
*/
- KexiAction(const QString& name, const QString& text);
+ KexiAction(const TQString& name, const TQString& text);
/**
* Destructor.
diff --git a/kexi/plugins/macros/kexiactions/kexivariable.h b/kexi/plugins/macros/kexiactions/kexivariable.h
index 27dcc0ef..da3f47e2 100644
--- a/kexi/plugins/macros/kexiactions/kexivariable.h
+++ b/kexi/plugins/macros/kexiactions/kexivariable.h
@@ -48,7 +48,7 @@ namespace KexiMacro {
/**
* Constructor.
*/
- KexiVariable(ACTIONIMPL* actionimpl, const QString& name, const QString& caption)
+ KexiVariable(ACTIONIMPL* actionimpl, const TQString& name, const TQString& caption)
: KoMacro::Variable()
, m_actionimpl(actionimpl)
{
@@ -68,7 +68,7 @@ namespace KexiMacro {
}
private:
- /// The parent @a KexiAction implementation.
+ /// The tqparent @a KexiAction implementation.
ACTIONIMPL* m_actionimpl;
};
}
diff --git a/kexi/plugins/macros/kexiactions/messageaction.cpp b/kexi/plugins/macros/kexiactions/messageaction.cpp
index 1a4605cb..a36d0526 100644
--- a/kexi/plugins/macros/kexiactions/messageaction.cpp
+++ b/kexi/plugins/macros/kexiactions/messageaction.cpp
@@ -31,8 +31,8 @@ using namespace KexiMacro;
MessageAction::MessageAction()
: KexiAction("message", i18n("Message"))
{
- setVariable("caption", i18n("Caption"), QString(""));
- setVariable("message", i18n("Message"), QString(""));
+ setVariable("caption", i18n("Caption"), TQString(""));
+ setVariable("message", i18n("Message"), TQString(""));
}
MessageAction::~MessageAction()
@@ -42,8 +42,8 @@ MessageAction::~MessageAction()
void MessageAction::activate(KSharedPtr<KoMacro::Context> context)
{
kdDebug() << "MessageAction::activate(KSharedPtr<Context>)" << endl;
- const QString caption = context->variable("caption")->variant().toString();
- const QString message = context->variable("message")->variant().toString();
+ const TQString caption = context->variable("caption")->variant().toString();
+ const TQString message = context->variable("message")->variant().toString();
KMessageBox::information(mainWin(), message, caption);
}
diff --git a/kexi/plugins/macros/kexiactions/messageaction.h b/kexi/plugins/macros/kexiactions/messageaction.h
index 543674bd..5ccac9b7 100644
--- a/kexi/plugins/macros/kexiactions/messageaction.h
+++ b/kexi/plugins/macros/kexiactions/messageaction.h
@@ -40,6 +40,7 @@ namespace KexiMacro {
class MessageAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/kexiactions/navigateaction.cpp b/kexi/plugins/macros/kexiactions/navigateaction.cpp
index d3fe551c..bc573d10 100644
--- a/kexi/plugins/macros/kexiactions/navigateaction.cpp
+++ b/kexi/plugins/macros/kexiactions/navigateaction.cpp
@@ -45,7 +45,7 @@ namespace KexiMacro {
NavigateVariable(ACTIONIMPL* actionimpl)
: KexiVariable<ACTIONIMPL>(actionimpl, "record", i18n("Record"))
{
- QStringList list;
+ TQStringList list;
list << "first" << "previous" << "next" << "last" << "goto";
this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) );
@@ -79,7 +79,7 @@ NavigateAction::~NavigateAction()
{
}
-bool NavigateAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool NavigateAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"NavigateAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false);
@@ -111,16 +111,16 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context)
KexiViewBase* view = dialog->selectedView();
if(! view) {
- throw KoMacro::Exception(i18n("No view selected for \"%1\".").arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("No view selected for \"%1\".").tqarg(dialog->caption()));
}
KexiDataAwareView* dbview = dynamic_cast<KexiDataAwareView*>( view );
KexiDataAwareObjectInterface* dbobj = dbview ? dbview->dataAwareObject() : 0;
if(! dbview) {
- throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").tqarg(dialog->caption()));
}
- const QString record = context->variable("record")->variant().toString();
+ const TQString record = context->variable("record")->variant().toString();
if(record == "previous") {
dbobj->selectPrevRow();
}
@@ -151,7 +151,7 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context)
void sortAscending();
void sortDescending();
*/
- throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").arg(record).arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").tqarg(record).tqarg(dialog->caption()));
}
}
diff --git a/kexi/plugins/macros/kexiactions/navigateaction.h b/kexi/plugins/macros/kexiactions/navigateaction.h
index f7f74f86..c5dc61ef 100644
--- a/kexi/plugins/macros/kexiactions/navigateaction.h
+++ b/kexi/plugins/macros/kexiactions/navigateaction.h
@@ -39,6 +39,7 @@ namespace KexiMacro {
class NavigateAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexiactions/objectnamevariable.h b/kexi/plugins/macros/kexiactions/objectnamevariable.h
index eeaabe04..e9ffa949 100644
--- a/kexi/plugins/macros/kexiactions/objectnamevariable.h
+++ b/kexi/plugins/macros/kexiactions/objectnamevariable.h
@@ -42,14 +42,14 @@ namespace KexiMacro {
class ObjectNameVariable : public KexiVariable<ACTIONIMPL>
{
public:
- ObjectNameVariable(ACTIONIMPL* actionimpl, const QString& objectname = QString::null, const QString& name = QString::null)
+ ObjectNameVariable(ACTIONIMPL* actionimpl, const TQString& objectname = TQString(), const TQString& name = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, "name", i18n("Name"))
{
if(! actionimpl->mainWin()->project())
return;
- QStringList namelist;
- KexiPart::Info* info = Kexi::partManager().infoForMimeType( QString("kexi/%1").arg(objectname) );
+ TQStringList namelist;
+ KexiPart::Info* info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(objectname) );
if(info) {
KexiPart::ItemDict* items = actionimpl->mainWin()->project()->items(info);
if(items)
@@ -60,12 +60,12 @@ namespace KexiMacro {
if(namelist.count() <= 0)
namelist << "";
- for(QStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
+ for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
- this->setVariant( (name.isNull() || ! namelist.contains(name)) ? namelist[0] : name );
+ this->setVariant( (name.isNull() || ! namelist.tqcontains(name)) ? namelist[0] : name );
- kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" children="<<namelist<<endl;
+ kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" tqchildren="<<namelist<<endl;
}
virtual ~ObjectNameVariable() {}
diff --git a/kexi/plugins/macros/kexiactions/objectvariable.h b/kexi/plugins/macros/kexiactions/objectvariable.h
index b61f24e3..83a7a471 100644
--- a/kexi/plugins/macros/kexiactions/objectvariable.h
+++ b/kexi/plugins/macros/kexiactions/objectvariable.h
@@ -52,7 +52,7 @@ namespace KexiMacro {
DataExport = 4
};
- ObjectVariable(ACTIONIMPL* actionimpl, int conditions = VisibleInNav, const QString& objectname = QString::null)
+ ObjectVariable(ACTIONIMPL* actionimpl, int conditions = VisibleInNav, const TQString& objectname = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, "object", i18n("Object"))
{
KexiPart::PartInfoList* parts = Kexi::partManager().partInfoList();
@@ -66,16 +66,16 @@ namespace KexiMacro {
if(conditions & DataExport && ! info->isDataExportSupported())
continue;
- const QString name = info->objectName(); //info->groupName();
+ const TQString name = info->objectName(); //info->groupName();
this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) );
}
if(! objectname.isNull())
this->setVariant( objectname );
- else if(this->children().count() > 0)
- this->setVariant( this->children()[0]->variant() );
+ else if(this->tqchildren().count() > 0)
+ this->setVariant( this->tqchildren()[0]->variant() );
else
- this->setVariant( QString::null );
+ this->setVariant( TQString() );
kdDebug()<<"##################### KexiActions::ObjectVariable() variant="<<this->variant()<<endl;
}
diff --git a/kexi/plugins/macros/kexiactions/openaction.cpp b/kexi/plugins/macros/kexiactions/openaction.cpp
index b67041bb..2e43116f 100644
--- a/kexi/plugins/macros/kexiactions/openaction.cpp
+++ b/kexi/plugins/macros/kexiactions/openaction.cpp
@@ -33,13 +33,13 @@ using namespace KexiMacro;
namespace KexiMacro {
- static const QString DATAVIEW = "data";
- static const QString DESIGNVIEW = "design";
- static const QString TEXTVIEW = "text";
+ static const TQString DATAVIEW = "data";
+ static const TQString DESIGNVIEW = "design";
+ static const TQString TEXTVIEW = "text";
- static const QString OBJECT = "object";
- static const QString NAME = "name";
- static const QString VIEW = "view";
+ static const TQString OBJECT = "object";
+ static const TQString NAME = "name";
+ static const TQString VIEW = "view";
/**
* The ViewVariable class provide a list of viewmodes supported
@@ -49,11 +49,11 @@ namespace KexiMacro {
class ViewVariable : public KexiVariable<ACTIONIMPL>
{
public:
- ViewVariable(ACTIONIMPL* actionimpl, const QString& objectname = QString::null, const QString& viewname = QString::null)
+ ViewVariable(ACTIONIMPL* actionimpl, const TQString& objectname = TQString(), const TQString& viewname = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, VIEW, i18n("View"))
{
- QStringList namelist;
- KexiPart::Part* part = Kexi::partManager().partForMimeType( QString("kexi/%1").arg(objectname) );
+ TQStringList namelist;
+ KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(objectname) );
if(part) {
int viewmodes = part->supportedViewModes();
if(viewmodes & Kexi::DataViewMode)
@@ -62,11 +62,11 @@ namespace KexiMacro {
namelist << DESIGNVIEW;
if(viewmodes & Kexi::TextViewMode)
namelist << TEXTVIEW;
- for(QStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
- this->children().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
+ for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
+ this->tqchildren().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
}
- const QString n =
- namelist.contains(viewname)
+ const TQString n =
+ namelist.tqcontains(viewname)
? viewname
: namelist.count() > 0 ? namelist[0] : "";
@@ -92,7 +92,7 @@ OpenAction::~OpenAction()
{
}
-bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"OpenAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false);
@@ -103,9 +103,9 @@ bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const Q
variable->clearChildren();
if(name == OBJECT) {
- const QString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "table" or "query"
- const QString objectname = macroitem->variant(NAME, true).toString(); // e.g. "table1" or "table2" if objectvalue above is "table"
- const QString viewname = macroitem->variant(VIEW, true).toString(); // "data", "design" or "text"
+ const TQString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "table" or "query"
+ const TQString objectname = macroitem->variant(NAME, true).toString(); // e.g. "table1" or "table2" if objectvalue above is "table"
+ const TQString viewname = macroitem->variant(VIEW, true).toString(); // "data", "design" or "text"
macroitem->variable(NAME, true)->setChildren(
KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new ObjectNameVariable<OpenAction>(this, objectvalue, objectname)) );
@@ -122,15 +122,15 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context)
throw KoMacro::Exception(i18n("No project loaded."));
}
- const QString objectname = context->variable(OBJECT)->variant().toString();
- const QString name = context->variable(NAME)->variant().toString();
- KexiPart::Item* item = mainWin()->project()->itemForMimeType( QString("kexi/%1").arg(objectname).latin1(), name );
+ const TQString objectname = context->variable(OBJECT)->variant().toString();
+ const TQString name = context->variable(NAME)->variant().toString();
+ KexiPart::Item* item = mainWin()->project()->itemForMimeType( TQString("kexi/%1").tqarg(objectname).latin1(), name );
if(! item) {
- throw KoMacro::Exception(i18n("No such object \"%1.%2\".").arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("No such object \"%1.%2\".").tqarg(objectname).tqarg(name));
}
// Determinate the viewmode.
- const QString view = context->variable(VIEW)->variant().toString();
+ const TQString view = context->variable(VIEW)->variant().toString();
int viewmode;
if(view == DATAVIEW)
viewmode = Kexi::DataViewMode;
@@ -139,14 +139,14 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context)
else if(view == TEXTVIEW)
viewmode = Kexi::TextViewMode;
else {
- throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").arg(view).arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").tqarg(view).tqarg(objectname).tqarg(name));
}
// Try to open the object now.
bool openingCancelled;
if(! mainWin()->openObject(item, viewmode, openingCancelled)) {
if(! openingCancelled) {
- throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").tqarg(objectname).tqarg(name));
}
}
}
diff --git a/kexi/plugins/macros/kexiactions/openaction.h b/kexi/plugins/macros/kexiactions/openaction.h
index b49f1238..a30903fb 100644
--- a/kexi/plugins/macros/kexiactions/openaction.h
+++ b/kexi/plugins/macros/kexiactions/openaction.h
@@ -39,6 +39,7 @@ namespace KexiMacro {
class OpenAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -63,7 +64,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
index 030be0cb..4d480365 100644
--- a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
@@ -18,8 +18,8 @@
#include "keximacrodesignview.h"
#include "keximacroproperty.h"
-#include <qtimer.h>
-#include <qdom.h>
+#include <tqtimer.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kexidialogbase.h>
@@ -107,8 +107,8 @@ class KexiMacroDesignView::Private
};
-KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro)
- : KexiMacroView(mainwin, parent, macro, "KexiMacroDesignView")
+KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro)
+ : KexiMacroView(mainwin, tqparent, macro, "KexiMacroDesignView")
, d( new Private() )
{
// The table's data-model.
@@ -123,19 +123,19 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
KexiDB::Field::NoOptions, // options
0, // length
0, // precision
- QVariant(), // default value
+ TQVariant(), // default value
i18n("Action"), // caption
- QString::null, // description
+ TQString(), // description
0 // width
);
d->tabledata->addColumn(actioncol);
- QValueVector<QString> items;
+ TQValueVector<TQString> items;
items.append(""); // empty means no action
// Append the list of actions provided by Kexi.
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
- QStringList::ConstIterator it, end( actionnames.constEnd() );
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList::ConstIterator it, end( actionnames.constEnd() );
for( it = actionnames.constBegin(); it != end; ++it) {
KSharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(*it);
items.append( action->text() );
@@ -151,16 +151,16 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
KexiDB::Field::NoOptions, // options
0, // length
0, // precision
- QVariant(), // default value
+ TQVariant(), // default value
i18n("Comment"), // caption
- QString::null, // description
+ TQString(), // description
0 // width
) );
// Create the tableview.
- QHBoxLayout* layout = new QHBoxLayout(this);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
d->datatable = new KexiDataTable(mainWin(), this, "Macro KexiDataTable", false /*not db aware*/);
- layout->addWidget(d->datatable);
+ tqlayout->addWidget(d->datatable);
d->tableview = d->datatable->tableView();
d->tableview->setSpreadSheetMode();
d->tableview->setColumnStretchEnabled( true, COLUMN_ID_COMMENT ); //last column occupies the rest of the area
@@ -173,14 +173,14 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
d->propertyset = new KexiDataAwarePropertySet(this, d->tableview);
// Connect signals the KexiDataTable provides to local slots.
- connect(d->tabledata, SIGNAL(aboutToChangeCell(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)),
- this, SLOT(beforeCellChanged(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)));
- connect(d->tabledata, SIGNAL(rowUpdated(KexiTableItem*)),
- this, SLOT(rowUpdated(KexiTableItem*)));
- connect(d->tabledata, SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
- this, SLOT(rowInserted(KexiTableItem*,uint,bool)));
- connect(d->tabledata, SIGNAL(rowDeleted()),
- this, SLOT(rowDeleted()));
+ connect(d->tabledata, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)),
+ this, TQT_SLOT(beforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)));
+ connect(d->tabledata, TQT_SIGNAL(rowUpdated(KexiTableItem*)),
+ this, TQT_SLOT(rowUpdated(KexiTableItem*)));
+ connect(d->tabledata, TQT_SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
+ this, TQT_SLOT(rowInserted(KexiTableItem*,uint,bool)));
+ connect(d->tabledata, TQT_SIGNAL(rowDeleted()),
+ this, TQT_SLOT(rowDeleted()));
// Everything is ready. So, update the data now.
updateData();
@@ -207,7 +207,7 @@ void KexiMacroDesignView::updateData()
}
// Set the MacroItem's
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
KoMacro::MacroItem::List macroitems = macro()->items();
KoMacro::MacroItem::List::ConstIterator it(macroitems.constBegin()), end(macroitems.constEnd());
for(uint idx = 0; it != end; ++it, idx++) {
@@ -259,12 +259,12 @@ KoProperty::Set* KexiMacroDesignView::propertySet()
return d->propertyset->currentPropertySet();
}
-void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVariant& newvalue, KexiDB::ResultInfo* result)
+void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, TQVariant& newvalue, KexiDB::ResultInfo* result)
{
Q_UNUSED(result);
kdDebug() << "KexiMacroDesignView::beforeCellChanged() colnum=" << colnum << " newvalue=" << newvalue.toString() << endl;
- int rowindex = d->tabledata->findRef(item);
+ int rowindex = d->tabledata->tqfindRef(item);
if(rowindex < 0) {
kdWarning() << "KexiMacroDesignView::beforeCellChanged() No such item" << endl;
return;
@@ -286,11 +286,11 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVa
// Handle the column that should be changed
switch(colnum) {
case COLUMN_ID_ACTION: { // The "Action" column
- QString actionname;
+ TQString actionname;
bool ok;
int selectedindex = newvalue.toInt(&ok);
if(ok && selectedindex > 0) {
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
actionname = actionnames[ selectedindex - 1 ]; // first item is empty
}
KSharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(actionname);
@@ -311,7 +311,7 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVa
void KexiMacroDesignView::rowUpdated(KexiTableItem* item)
{
- int rowindex = d->tabledata->findRef(item);
+ int rowindex = d->tabledata->tqfindRef(item);
kdDebug() << "KexiMacroDesignView::rowUpdated() rowindex=" << rowindex << endl;
//propertySetSwitched();
//propertySetReloaded(true);
@@ -347,7 +347,7 @@ void KexiMacroDesignView::rowDeleted()
macroitems.remove( macroitems.at(rowindex) );
}
-bool KexiMacroDesignView::updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& variablename)
+bool KexiMacroDesignView::updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& variablename)
{
kdDebug() << "KexiMacroDesignView::updateSet() variablename=" << variablename << endl;
KoProperty::Property* property = KexiMacroProperty::createProperty(macroitem, variablename);
@@ -382,8 +382,8 @@ void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KShare
// if there exists no such propertyset yet, create one.
set = new KoProperty::Set(d->propertyset, action->name());
d->propertyset->insert(row, set, true);
- connect(set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(propertyChanged(KoProperty::Set&, KoProperty::Property&)));
+ connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
+ this, TQT_SLOT(propertyChanged(KoProperty::Set&, KoProperty::Property&)));
}
// The caption.
@@ -392,8 +392,8 @@ void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KShare
set->addProperty(prop);
// Display the list of variables.
- QStringList varnames = action->variableNames();
- for(QStringList::Iterator it = varnames.begin(); it != varnames.end(); ++it) {
+ TQStringList varnames = action->variableNames();
+ for(TQStringList::Iterator it = varnames.begin(); it != varnames.end(); ++it) {
if(updateSet(set, macroitem, *it)) {
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(*it, true);
kdDebug()<<"KexiMacroDesignView::updateProperties() name=" << *it << " variable=" << variable->variant().toString() << endl;
@@ -418,7 +418,7 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
d->reloadsProperties = true;
const int row = d->propertyset->currentRow();
- const QCString name = property.name();
+ const TQCString name = property.name();
kdDebug() << "KexiMacroDesignView::propertyChanged() name=" << name << " row=" << row << endl;
//TODO reload is only needed if something changed!
@@ -433,26 +433,26 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
updateProperties(row, &set, macroitem);
}
// It's needed to call the reload delayed cause in KoProperty::Editor
- // QTimer::singleShot(10, this, SLOT(selectItemLater())); may lead
+ // TQTimer::singleShot(10, this, TQT_SLOT(selectItemLater())); may lead
// to crashes if we are to fast.
- QTimer::singleShot(50, this, SLOT(reloadPropertyLater()));
+ TQTimer::singleShot(50, this, TQT_SLOT(reloadPropertyLater()));
}
d->reloadsProperties = false;
*/
/*
- QStringList dirtyvarnames = macroitem->setVariable(name, KSharedPtr<KoMacro::Variable>(pv));
+ TQStringList dirtyvarnames = macroitem->setVariable(name, KSharedPtr<KoMacro::Variable>(pv));
bool dirty = false;
bool reload = false;
- for(QStringList::Iterator it = dirtyvarnames.begin(); it != dirtyvarnames.end(); ++it) {
+ for(TQStringList::Iterator it = dirtyvarnames.begin(); it != dirtyvarnames.end(); ++it) {
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(*it);
if(! variable.data()) {
kdDebug() << "KexiMacroDesignView::propertyChanged() name=" << name << " it=" << *it << " skipped cause such a variable is not known." << endl;
continue;
}
- if(! set.contains( (*it).latin1() )) {
+ if(! set.tqcontains( (*it).latin1() )) {
// If there exist no such property yet, we need to add it.
if(updateSet(&set, macroitem, *it))
reload = true; // we like to reload the whole set
@@ -461,12 +461,12 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
kdDebug() << "KexiMacroDesignView::propertyChanged() set existing property=" << *it << endl;
KoProperty::Property& p = set.property((*it).latin1());
- KoMacro::Variable::List children = variable->children();
- if(children.count() > 0) {
- QStringList keys, names;
- KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end());
+ KoMacro::Variable::List tqchildren = variable->tqchildren();
+ if(tqchildren.count() > 0) {
+ TQStringList keys, names;
+ KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end());
for(; childit != childend; ++childit) {
- const QString s = (*childit)->variant().toString();
+ const TQString s = (*childit)->variant().toString();
keys << s;
names << s;
}
@@ -480,8 +480,8 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
// need to reload the whole set.
for(KoProperty::Set::Iterator setit = set; setit.current(); ++setit) {
if(setit.currentKey() == name) continue; // don't remove ourself
- if(setit.currentKey().left(5) == QCString("this:")) continue; // don't remove internal properties
- if(setit.currentKey() == QCString("newrow")) continue; // also an internal used property
+ if(setit.currentKey().left(5) == TQCString("this:")) continue; // don't remove internal properties
+ if(setit.currentKey() == TQCString("newrow")) continue; // also an internal used property
if(action.data() && action->hasVariable(setit.currentKey())) continue; // the property is still valid
reload = true; // we like to reload the whole set
}
diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.h b/kexi/plugins/macros/kexipart/keximacrodesignview.h
index c3eca2d2..e982f1bd 100644
--- a/kexi/plugins/macros/kexipart/keximacrodesignview.h
+++ b/kexi/plugins/macros/kexipart/keximacrodesignview.h
@@ -41,6 +41,7 @@ class KexiTableItem;
class KexiMacroDesignView : public KexiMacroView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -48,10 +49,10 @@ class KexiMacroDesignView : public KexiMacroView
*
* \param mainwin The \a KexiMainWindow instance this \a KexiViewBase
* belongs to.
- * \param parent The parent widget this widget should be displayed in.
+ * \param tqparent The tqparent widget this widget should be displayed in.
* \param macro The \a KoMacro::Macro instance this view is for.
*/
- KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro);
+ KexiMacroDesignView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro);
/**
* Destructor.
@@ -75,7 +76,7 @@ class KexiMacroDesignView : public KexiMacroView
* Called before a cell changed in the internaly used
* \a KexiTableView .
*/
- void beforeCellChanged(KexiTableItem*, int, QVariant&, KexiDB::ResultInfo*);
+ void beforeCellChanged(KexiTableItem*, int, TQVariant&, KexiDB::ResultInfo*);
/**
* Called if the passed \p item got updated.
@@ -90,7 +91,7 @@ class KexiMacroDesignView : public KexiMacroView
/**
* Called if a row got inserted.
*/
- void rowInserted(KexiTableItem* item, uint row, bool repaint);
+ void rowInserted(KexiTableItem* item, uint row, bool tqrepaint);
/**
* Called if a property in the \a KoProperty got changed.
@@ -117,7 +118,7 @@ class KexiMacroDesignView : public KexiMacroView
* Update the \a KoProperty::Set set with the passed \a KoMacro::MacroItem
* \p item and the variablename \p variablename .
*/
- bool updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> item, const QString& variablename);
+ bool updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> item, const TQString& variablename);
/**
* Update the properties of the \a KoProperty::Set \p set at
diff --git a/kexi/plugins/macros/kexipart/keximacroerror.cpp b/kexi/plugins/macros/kexipart/keximacroerror.cpp
index 15f4df3f..f6422be9 100644
--- a/kexi/plugins/macros/kexipart/keximacroerror.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroerror.cpp
@@ -24,7 +24,7 @@
#include <core/kexiproject.h>
#include <core/keximainwindow.h>
-#include <qtimer.h>
+#include <tqtimer.h>
/**
* \internal d-pointer class to be more flexible on future extension of the
@@ -44,7 +44,7 @@ class KexiMacroError::Private
};
KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Context> context)
- : KexiMacroErrorBase(mainwin, "KexiMacroError" , /*WFlags*/ Qt::WDestructiveClose)
+ : KexiMacroErrorBase(mainwin, "KexiMacroError" , /*WFlags*/ TQt::WDestructiveClose)
, d(new Private(mainwin, context))
{
//setText(i18n("Execution failed")); //caption
@@ -53,14 +53,14 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont
KoMacro::Exception* exception = context->exception();
iconlbl->setPixmap(KGlobal::instance()->iconLoader()->loadIcon("messagebox_critical", KIcon::Small, 32));
- errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").arg( context->macro()->name() ).arg( exception->errorMessage() ));
+ errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").tqarg( context->macro()->name() ).tqarg( exception->errorMessage() ));
int i = 1;
KoMacro::MacroItem::List items = context->macro()->items();
for (KoMacro::MacroItem::List::ConstIterator mit = items.begin(); mit != items.end(); mit++)
{
KListViewItem* listviewitem = new KListViewItem(errorlist);
- listviewitem->setText(0,QString("%1").arg(i++));
+ listviewitem->setText(0,TQString("%1").tqarg(i++));
listviewitem->setText(1,i18n("Action"));
KSharedPtr<KoMacro::MacroItem> macroitem = *mit;
@@ -86,8 +86,8 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont
}
}
- connect(designerbtn, SIGNAL(clicked()), this, SLOT(designbtnClicked()));
- connect(continuebtn, SIGNAL(clicked()), this, SLOT(continuebtnClicked()));
+ connect(designerbtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(designbtnClicked()));
+ connect(continuebtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(continuebtnClicked()));
}
KexiMacroError::~KexiMacroError()
@@ -98,16 +98,16 @@ KexiMacroError::~KexiMacroError()
void KexiMacroError::designbtnClicked()
{
if(! d->mainwin->project()) {
- kdWarning() << QString("KexiMacroError::designbtnClicked(): No project open.") << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): No project open.") << endl;
return;
}
// We need to determinate the KexiPart::Item which should be opened.
KSharedPtr<KoMacro::Macro> macro = d->context->macro();
- const QString name = macro->name();
+ const TQString name = macro->name();
KexiPart::Item* item = d->mainwin->project()->itemForMimeType("kexi/macro", name);
if(! item) {
- kdWarning() << QString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").arg(name) << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").tqarg(name) << endl;
return;
}
@@ -115,7 +115,7 @@ void KexiMacroError::designbtnClicked()
bool openingCancelled;
if(! d->mainwin->openObject(item, Kexi::DesignViewMode, openingCancelled)) {
if(! openingCancelled) {
- kdWarning() << QString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").arg(name) << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").tqarg(name) << endl;
return;
}
}
@@ -125,6 +125,6 @@ void KexiMacroError::designbtnClicked()
void KexiMacroError::continuebtnClicked()
{
- QTimer::singleShot(200, d->context, SLOT(activateNext()));
+ TQTimer::singleShot(200, d->context, TQT_SLOT(activateNext()));
close();
}
diff --git a/kexi/plugins/macros/kexipart/keximacroerror.h b/kexi/plugins/macros/kexipart/keximacroerror.h
index 641859b7..d902d6a4 100644
--- a/kexi/plugins/macros/kexipart/keximacroerror.h
+++ b/kexi/plugins/macros/kexipart/keximacroerror.h
@@ -22,9 +22,9 @@
#ifndef KEXIMACROERROR_H
#define KEXIMACROERROR_H
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <klistview.h>
#include <klocale.h>
@@ -50,13 +50,14 @@ class KexiMainWindow;
class KexiMacroError : public KexiMacroErrorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * @param mainwin The parent @a KexiMainWindow instance.
+ * @param mainwin The tqparent @a KexiMainWindow instance.
* @param context The @a KoMacro::Context where the error happened.
*/
KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Context> context);
diff --git a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
index 74e47cfc..cc3b6754 100644
--- a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
+++ b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiMacroErrorBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>KexiMacroErrorBase</cstring>
</property>
@@ -25,23 +25,23 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>iconlbl</cstring>
</property>
@@ -53,7 +53,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>48</width>
<height>48</height>
@@ -65,11 +65,11 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>errorlbl</cstring>
</property>
@@ -87,7 +87,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@@ -152,15 +152,15 @@
<number>1</number>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>designerbtn</cstring>
</property>
@@ -174,7 +174,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>continuebtn</cstring>
</property>
@@ -182,7 +182,7 @@
<string>Continue</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>cancelbtn</cstring>
</property>
@@ -206,7 +206,7 @@
<slot>close()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/kexi/plugins/macros/kexipart/keximacropart.cpp b/kexi/plugins/macros/kexipart/keximacropart.cpp
index c4f020e4..1fddbd78 100644
--- a/kexi/plugins/macros/kexipart/keximacropart.cpp
+++ b/kexi/plugins/macros/kexipart/keximacropart.cpp
@@ -25,8 +25,8 @@
//#include "keximainwindow.h"
//#include "kexiproject.h"
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
#include <kgenericfactory.h>
#include <kexipartitem.h>
//#include <kxmlguiclient.h>
@@ -54,8 +54,8 @@ class KexiMacroPart::Private
public:
};
-KexiMacroPart::KexiMacroPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiMacroPart::KexiMacroPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
, d( new Private() )
{
//kdDebug() << "KexiMacroPart::KexiMacroPart() Ctor" << endl;
@@ -83,7 +83,7 @@ KexiMacroPart::~KexiMacroPart()
delete d;
}
-bool KexiMacroPart::execute(KexiPart::Item* item, QObject* sender)
+bool KexiMacroPart::execute(KexiPart::Item* item, TQObject* sender)
{
KexiDialogBase* dialog = new KexiDialogBase(m_mainWin);
dialog->setId( item->identifier() );
@@ -123,9 +123,9 @@ void KexiMacroPart::initInstanceActions()
//createSharedAction(Kexi::DesignViewMode, i18n("Execute Macro"), "exec", 0, "data_execute");
}
-KexiViewBase* KexiMacroPart::createView(QWidget* parent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, QMap<QString,QString>*)
+KexiViewBase* KexiMacroPart::createView(TQWidget* tqparent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, TQMap<TQString,TQString>*)
{
- const QString itemname = item.name();
+ const TQString itemname = item.name();
//kdDebug() << "KexiMacroPart::createView() itemname=" << itemname << endl;
if(! itemname.isNull()) {
@@ -140,14 +140,14 @@ KexiViewBase* KexiMacroPart::createView(QWidget* parent, KexiDialogBase* dialog,
KexiMainWindow *win = dialog->mainWin();
if(win && win->project() && win->project()->dbConnection()) {
if(viewMode == Kexi::DesignViewMode) {
- return new KexiMacroDesignView(win, parent, macro);
+ return new KexiMacroDesignView(win, tqparent, macro);
}
if(viewMode == Kexi::TextViewMode) {
- return new KexiMacroTextView(win, parent, macro);
+ return new KexiMacroTextView(win, tqparent, macro);
}
if(viewMode == Kexi::DataViewMode) {
// Called if the macro should be executed.
- return new KexiMacroView(win, parent, macro);
+ return new KexiMacroView(win, tqparent, macro);
}
}
}
@@ -156,7 +156,7 @@ KexiViewBase* KexiMacroPart::createView(QWidget* parent, KexiDialogBase* dialog,
return 0;
}
-QString KexiMacroPart::i18nMessage(const QCString& englishMessage) const
+TQString KexiMacroPart::i18nMessage(const TQCString& englishMessage) const
{
if(englishMessage=="Design of object \"%1\" has been modified.") {
return i18n("Design of macro \"%1\" has been modified.");
diff --git a/kexi/plugins/macros/kexipart/keximacropart.h b/kexi/plugins/macros/kexipart/keximacropart.h
index 8d2d7af2..0ea70c06 100644
--- a/kexi/plugins/macros/kexipart/keximacropart.h
+++ b/kexi/plugins/macros/kexipart/keximacropart.h
@@ -18,7 +18,7 @@
#ifndef KEXIMACROPART_H
#define KEXIMACROPART_H
-//#include <qcstring.h>
+//#include <tqcstring.h>
#include <kexi.h>
#include <kexipart.h>
@@ -30,17 +30,18 @@
class KexiMacroPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * \param parent The parent QObject this part is child of.
+ * \param tqparent The tqparent TQObject this part is child of.
* \param name The name this part has.
* \param args Optional list of arguments passed to this part.
*/
- KexiMacroPart(QObject *parent, const char *name, const QStringList& args);
+ KexiMacroPart(TQObject *tqparent, const char *name, const TQStringList& args);
/**
* Destructor.
@@ -51,28 +52,28 @@ class KexiMacroPart : public KexiPart::Part
* Implementation of the KexiPart::Part::action method used to
* provide scripts as KAction's to the outside world.
*/
- virtual bool execute(KexiPart::Item* item, QObject* sender = 0);
+ virtual bool execute(KexiPart::Item* item, TQObject* sender = 0);
/**
* \return the i18n message for the passed \p englishMessage string.
*/
- virtual QString i18nMessage(const QCString& englishMessage) const;
+ virtual TQString i18nMessage(const TQCString& englishMessage) const;
protected:
/**
* Create a new view.
*
- * \param parent The parent QWidget the new view is displayed in.
+ * \param tqparent The tqparent TQWidget the new view is displayed in.
* \param dialog The \a KexiDialogBase the view is child of.
* \param item The \a KexiPart::Item this view is for.
* \param viewMode The viewmode we like to have a view for.
*/
- virtual KexiViewBase* createView(QWidget *parent,
+ virtual KexiViewBase* createView(TQWidget *tqparent,
KexiDialogBase* dialog,
KexiPart::Item& item,
int viewMode = Kexi::DesignViewMode,
- QMap<QString,QString>* staticObjectArgs = 0);
+ TQMap<TQString,TQString>* staticObjectArgs = 0);
/**
* Initialize the part's actions.
diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.cpp b/kexi/plugins/macros/kexipart/keximacroproperty.cpp
index 2fdafd28..578ba69b 100644
--- a/kexi/plugins/macros/kexipart/keximacroproperty.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroproperty.cpp
@@ -17,10 +17,10 @@
#include "keximacroproperty.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpainter.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
#include <kcombobox.h>
#include <kpushbutton.h>
@@ -50,11 +50,11 @@ class KexiMacroProperty::Private
KSharedPtr<KoMacro::MacroItem> macroitem;
/** The name the variable @a KoMacro::Variable is known
as in the @a KoMacro::MacroItem defined above. */
- QString name;
+ TQString name;
};
-KexiMacroProperty::KexiMacroProperty(KoProperty::Property* parent, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
- : KoProperty::CustomProperty(parent)
+KexiMacroProperty::KexiMacroProperty(KoProperty::Property* tqparent, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
+ : KoProperty::CustomProperty(tqparent)
, d( new Private() )
{
d->macroitem = macroitem;
@@ -86,7 +86,7 @@ void KexiMacroProperty::init()
}
//TESTCASE!!!!!!!!!!!!!!!!!!!!!!
- //if(! variable->isEnabled()) qFatal( QString("############## VARIABLE=%1").arg(variable->name()).latin1() );
+ //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").tqarg(variable->name()).latin1() );
Q_ASSERT(! d->name.isNull());
m_property->setName( d->name.latin1() );
@@ -96,12 +96,12 @@ void KexiMacroProperty::init()
m_property->setType( KEXIMACRO_PROPERTYEDITORTYPE ); // use our own propertytype
}
-KoProperty::Property* KexiMacroProperty::parentProperty() const
+KoProperty::Property* KexiMacroProperty::tqparentProperty() const
{
return m_property;
}
-void KexiMacroProperty::setValue(const QVariant &value, bool rememberOldValue)
+void KexiMacroProperty::setValue(const TQVariant &value, bool rememberOldValue)
{
Q_UNUSED(rememberOldValue);
kdDebug()<<"KexiMacroProperty::setValue name="<<d->name<<" value="<<value<<" rememberOldValue="<<rememberOldValue<<endl;
@@ -119,11 +119,11 @@ void KexiMacroProperty::setValue(const QVariant &value, bool rememberOldValue)
emit valueChanged();
}
-QVariant KexiMacroProperty::value() const
+TQVariant KexiMacroProperty::value() const
{
KSharedPtr<KoMacro::Variable> variable = d->macroitem->variable(d->name, true);
Q_ASSERT( variable.data() != 0 );
- return variable.data() ? variable->variant() : QVariant();
+ return variable.data() ? variable->variant() : TQVariant();
}
bool KexiMacroProperty::handleValue() const
@@ -136,7 +136,7 @@ KSharedPtr<KoMacro::MacroItem> KexiMacroProperty::macroItem() const
return d->macroitem;
}
-QString KexiMacroProperty::name() const
+TQString KexiMacroProperty::name() const
{
return d->name;
}
@@ -146,7 +146,7 @@ KSharedPtr<KoMacro::Variable> KexiMacroProperty::variable() const
return d->macroitem->variable(d->name, true/*checkaction*/);
}
-KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
KoProperty::Property* property = new KoProperty::Property();
KexiMacroProperty* customproperty = new KexiMacroProperty(property, macroitem, name);
@@ -164,8 +164,8 @@ KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::Macr
* KexiMacroPropertyFactory
*/
-KexiMacroPropertyFactory::KexiMacroPropertyFactory(QObject* parent)
- : KoProperty::CustomPropertyFactory(parent)
+KexiMacroPropertyFactory::KexiMacroPropertyFactory(TQObject* tqparent)
+ : KoProperty::CustomPropertyFactory(tqparent)
{
}
@@ -173,23 +173,23 @@ KexiMacroPropertyFactory::~KexiMacroPropertyFactory()
{
}
-KoProperty::CustomProperty* KexiMacroPropertyFactory::createCustomProperty(KoProperty::Property* parent)
+KoProperty::CustomProperty* KexiMacroPropertyFactory::createCustomProperty(KoProperty::Property* tqparent)
{
- kdDebug()<<"KexiMacroPropertyFactory::createCustomProperty parent="<<parent->name()<<endl;
+ kdDebug()<<"KexiMacroPropertyFactory::createCustomProperty tqparent="<<tqparent->name()<<endl;
- KoProperty::CustomProperty* customproperty = parent->customProperty();
- KexiMacroProperty* parentcustomproperty = dynamic_cast<KexiMacroProperty*>(customproperty);
- if(! parentcustomproperty) {
- kdWarning() << "KexiMacroPropertyFactory::createCustomProperty() parent=" << parent->name() << " has an invalid customproperty." << endl;
+ KoProperty::CustomProperty* customproperty = tqparent->customProperty();
+ KexiMacroProperty* tqparentcustomproperty = dynamic_cast<KexiMacroProperty*>(customproperty);
+ if(! tqparentcustomproperty) {
+ kdWarning() << "KexiMacroPropertyFactory::createCustomProperty() tqparent=" << tqparent->name() << " has an invalid customproperty." << endl;
return 0;
}
- KSharedPtr<KoMacro::MacroItem> macroitem = parentcustomproperty->macroItem();
+ KSharedPtr<KoMacro::MacroItem> macroitem = tqparentcustomproperty->macroItem();
Q_ASSERT( macroitem.data() != 0 );
- const QString name = parentcustomproperty->name();
+ const TQString name = tqparentcustomproperty->name();
Q_ASSERT(! name.isEmpty());
- KexiMacroProperty* macroproperty = new KexiMacroProperty(parent, macroitem, name);
+ KexiMacroProperty* macroproperty = new KexiMacroProperty(tqparent, macroitem, name);
if(! macroproperty->variable().data()) {
delete macroproperty; macroproperty = 0;
return 0;
@@ -218,26 +218,26 @@ void KexiMacroPropertyFactory::initFactory()
*/
/**
-* @internal implementation of a QListBoxItem to display the items of the
+* @internal implementation of a TQListBoxItem to display the items of the
* combobox used within @a KexiMacroPropertyWidget to handle variables
* within a @a ListBox instance.
*/
-class ListBoxItem : public QListBoxText
+class ListBoxItem : public TQListBoxText
{
public:
- ListBoxItem(QListBox* listbox)
- : QListBoxText(listbox), m_enabled(true) {}
- ListBoxItem(QListBox* listbox, const QString& text, QListBoxItem* after)
- : QListBoxText(listbox, text, after), m_enabled(true) {}
+ ListBoxItem(TQListBox* listbox)
+ : TQListBoxText(listbox), m_enabled(true) {}
+ ListBoxItem(TQListBox* listbox, const TQString& text, TQListBoxItem* after)
+ : TQListBoxText(listbox, text, after), m_enabled(true) {}
virtual ~ListBoxItem() {}
void setEnabled(bool enabled) { m_enabled = enabled; }
- virtual int width(const QListBox* lb) const {
- Q_ASSERT( dynamic_cast<KComboBox*>( lb->parent() ) );
- return static_cast<KComboBox*>( lb->parent() )->lineEdit()->width() + 2;
+ virtual int width(const TQListBox* lb) const {
+ Q_ASSERT( dynamic_cast<KComboBox*>( lb->tqparent() ) );
+ return static_cast<KComboBox*>( lb->tqparent() )->lineEdit()->width() + 2;
}
- virtual int height(const QListBox* lb) const {
- Q_ASSERT( dynamic_cast<KComboBox*>( lb->parent() ) );
- return m_enabled ? static_cast<KComboBox*>( lb->parent() )->height() + 2 : 0;
+ virtual int height(const TQListBox* lb) const {
+ Q_ASSERT( dynamic_cast<KComboBox*>( lb->tqparent() ) );
+ return m_enabled ? static_cast<KComboBox*>( lb->tqparent() )->height() + 2 : 0;
}
private:
bool m_enabled;
@@ -245,13 +245,13 @@ class ListBoxItem : public QListBoxText
/**
* @internal implementation of a @a ListBoxItem to provide an editable
-* @a KoProperty::Widget as QListBoxItem in a @a ListBox instance.
+* @a KoProperty::Widget as TQListBoxItem in a @a ListBox instance.
*/
class EditListBoxItem : public ListBoxItem
{
public:
- EditListBoxItem(QListBox* listbox, KexiMacroProperty* macroproperty)
+ EditListBoxItem(TQListBox* listbox, KexiMacroProperty* macroproperty)
: ListBoxItem(listbox)
, m_macroproperty(macroproperty)
, m_prop(0)
@@ -265,11 +265,11 @@ class EditListBoxItem : public ListBoxItem
delete m_prop;
}
- virtual QString text() const {
+ virtual TQString text() const {
KSharedPtr<KoMacro::Variable> variable = m_macroproperty->variable();
Q_ASSERT( variable.data() );
//kdDebug()<<"EditListBoxItem::text() text="<<variable->toString()<<endl;
- Q_ASSERT( variable->toString() != QString::null );
+ Q_ASSERT( variable->toString() != TQString() );
return variable->toString();
}
@@ -279,13 +279,13 @@ class EditListBoxItem : public ListBoxItem
KSharedPtr<KoMacro::Action> action() const { return m_macroproperty->macroItem()->action(); }
protected:
- virtual void paint(QPainter* p) {
+ virtual void paint(TQPainter* p) {
if(! m_widget) return;
- Q_ASSERT( dynamic_cast<KComboBox*>( listBox()->parent() ) );
+ Q_ASSERT( dynamic_cast<KComboBox*>( listBox()->tqparent() ) );
const int w = width(listBox());
const int h = height(listBox());
m_widget->setFixedSize(w - 2, h - 2);
- p->drawPixmap(0, 0, QPixmap::grabWidget(m_widget), 1, 1, w - 1, h - 1);
+ p->drawPixmap(0, 0, TQPixmap::grabWidget(m_widget), 1, 1, w - 1, h - 1);
}
private:
@@ -297,22 +297,22 @@ class EditListBoxItem : public ListBoxItem
kdWarning() << "EditListBoxItem::EditListBoxItem() Skipped cause there exists no action for macroproperty=" << m_macroproperty->name() << endl;
return;
}
- KoProperty::Property* parentproperty = m_macroproperty->parentProperty();
- if(! parentproperty) {
- kdWarning() << "EditListBoxItem::EditListBoxItem() No parentproperty defined" << endl;
+ KoProperty::Property* tqparentproperty = m_macroproperty->tqparentProperty();
+ if(! tqparentproperty) {
+ kdWarning() << "EditListBoxItem::EditListBoxItem() No tqparentproperty defined" << endl;
return;
}
KSharedPtr<KoMacro::Variable> variable = m_macroproperty->variable();
if(! variable.data()) {
- kdWarning() << "EditListBoxItem::EditListBoxItem() No variable defined for property=" << parentproperty->name() << endl;
+ kdWarning() << "EditListBoxItem::EditListBoxItem() No variable defined for property=" << tqparentproperty->name() << endl;
return;
}
- QVariant variant = variable->variant();
+ TQVariant variant = variable->variant();
KSharedPtr<KoMacro::Variable> actionvariable = action->variable(m_macroproperty->name());
if(actionvariable.data()) {
- QVariant actionvariant = actionvariable->variant();
+ TQVariant actionvariant = actionvariable->variant();
Q_ASSERT( ! actionvariant.isNull() );
Q_ASSERT( variant.canCast(actionvariant.type()) );
variant.cast( actionvariant.type() ); //preserve type.
@@ -320,38 +320,38 @@ class EditListBoxItem : public ListBoxItem
int type = KoProperty::Auto;
switch(variant.type()) {
- case QVariant::UInt:
- case QVariant::Int: {
+ case TQVariant::UInt:
+ case TQVariant::Int: {
type = KoProperty::Integer;
} break;
- case QVariant::CString:
- case QVariant::String: {
+ case TQVariant::CString:
+ case TQVariant::String: {
type = KoProperty::String;
} break;
default: {
- kdWarning() << "EditListBoxItem::EditListBoxItem() name=" << variable->name() << " type=" << QVariant::typeToName(variant.type()) << endl;
+ kdWarning() << "EditListBoxItem::EditListBoxItem() name=" << variable->name() << " type=" << TQVariant::typeToName(variant.type()) << endl;
} break;
}
- QString name = variable->name();
+ TQString name = variable->name();
Q_ASSERT(! name.isNull());
//if(name.isNull()) name = "aaaaaaaaaaaaaaaaa";//TESTCASE
m_prop = new KoProperty::Property(
name.latin1(), // name
variant, // value
variable->text(), // caption
- QString::null, // description
+ TQString(), // description
type, // type
- 0 //parentproperty // parent
+ 0 //tqparentproperty // tqparent
);
m_widget = KoProperty::FactoryManager::self()->createWidgetForProperty(m_prop);
Q_ASSERT( m_widget != 0 );
- //m_widget->reparent(listBox()->viewport(), 0, QPoint(0,0));
- m_widget->reparent(listBox(), 0, QPoint(1,1));
- //layout->addWidget(m_widget, 1);
+ //m_widget->reparent(listBox()->viewport(), 0, TQPoint(0,0));
+ m_widget->reparent(listBox(), 0, TQPoint(1,1));
+ //tqlayout->addWidget(m_widget, 1);
m_widget->setMinimumHeight(5);
- m_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_widget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}
private:
@@ -361,14 +361,14 @@ class EditListBoxItem : public ListBoxItem
};
/**
-* @internal implementation of a @a QListBox for the combobox used within
+* @internal implementation of a @a TQListBox for the combobox used within
* @a KexiMacroPropertyWidget to handle different variable-states.
*/
-class ListBox : public QListBox
+class ListBox : public TQListBox
{
public:
- ListBox(KComboBox* parent, KexiMacroProperty* macroproperty)
- : QListBox(parent)
+ ListBox(KComboBox* tqparent, KexiMacroProperty* macroproperty)
+ : TQListBox(tqparent)
, m_macroproperty(macroproperty)
, m_edititem(0)
{
@@ -388,74 +388,74 @@ class ListBox : public QListBox
m_edititem = new EditListBoxItem(this, m_macroproperty);
Q_ASSERT( m_edititem->widget() != 0 );
- const QString name = m_macroproperty->name();
- KoMacro::Variable::List children;
+ const TQString name = m_macroproperty->name();
+ KoMacro::Variable::List tqchildren;
{
- KoMacro::Variable::List actionchildren;
+ KoMacro::Variable::List actiontqchildren;
KSharedPtr<KoMacro::Variable> itemvar = m_macroproperty->macroItem()->variable(name,false);
//kdDebug() << "KexiMacroProperty::ListBox::update() itemvar="<<(itemvar.data() ? "name:"+itemvar->name()+" value:"+itemvar->toString() : "NULL")<<endl;
if(itemvar.data())
- actionchildren = itemvar->children();
+ actiontqchildren = itemvar->tqchildren();
KSharedPtr<KoMacro::Action> action = m_edititem->action();
KSharedPtr<KoMacro::Variable> actionvar = action.data() ? action->variable(name) : KSharedPtr<KoMacro::Variable>();
//kdDebug() << "KexiMacroProperty::ListBox::update() actionvar="<<(actionvar.data() ? "name:"+actionvar->name()+" value:"+actionvar->toString() : "NULL")<<endl;
if(actionvar.data())
- actionchildren += actionvar->children();
+ actiontqchildren += actionvar->tqchildren();
- KoMacro::Variable::List::ConstIterator it(actionchildren.constBegin()), end(actionchildren.constEnd());
+ KoMacro::Variable::List::ConstIterator it(actiontqchildren.constBegin()), end(actiontqchildren.constEnd());
for(; it != end; ++it) {
if(name == (*it)->name()) {
- KoMacro::Variable::List list = (*it)->children();
+ KoMacro::Variable::List list = (*it)->tqchildren();
KoMacro::Variable::List::ConstIterator listit(list.constBegin()), listend(list.constEnd());
for(; listit != listend; ++listit)
- children.append( *listit );
+ tqchildren.append( *listit );
}
}
- if(children.count() <= 0)
- children = actionchildren;
+ if(tqchildren.count() <= 0)
+ tqchildren = actiontqchildren;
}
/*
- kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<children.count()<<endl;
- KoMacro::Variable::List::ConstIterator listit(children.constBegin()), listend(children.constEnd());
+ kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<tqchildren.count()<<endl;
+ KoMacro::Variable::List::ConstIterator listit(tqchildren.constBegin()), listend(tqchildren.constEnd());
for(; listit != listend; ++listit) {
- kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->children().count()<<endl;
+ kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->tqchildren().count()<<endl;
}
*/
- if(children.count() > 0) {
- KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end());
+ if(tqchildren.count() > 0) {
+ KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end());
for(; childit != childend; ++childit) {
- const QString n = (*childit)->name();
+ const TQString n = (*childit)->name();
//if(! n.startsWith("@")) continue;
- const QVariant v = (*childit)->variant();
+ const TQVariant v = (*childit)->variant();
//kdDebug() << " child name=" << n << " value=" << v << endl;
switch( v.type() ) {
- /* case QVariant::Map: {
- const QMap<QString,QVariant> map = v.toMap();
- for(QMap<QString,QVariant>::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it)
+ /* case TQVariant::Map: {
+ const TQMap<TQString,TQVariant> map = v.toMap();
+ for(TQMap<TQString,TQVariant>::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it)
m_items.append(it.key());
} break; */
- case QVariant::List: {
- const QValueList<QVariant> list = v.toList();
- for(QValueList<QVariant>::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
- const QString s = (*it).toString().stripWhiteSpace();
+ case TQVariant::List: {
+ const TQValueList<TQVariant> list = v.toList();
+ for(TQValueList<TQVariant>::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
+ const TQString s = (*it).toString().stripWhiteSpace();
if(! s.isEmpty())
m_items.append(s);
}
} break;
- case QVariant::StringList: {
- const QStringList list = v.toStringList();
- for(QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
+ case TQVariant::StringList: {
+ const TQStringList list = v.toStringList();
+ for(TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
if(! (*it).isEmpty())
m_items.append(*it);
} break;
default: {
- const QString s = v.toString().stripWhiteSpace();
+ const TQString s = v.toString().stripWhiteSpace();
if(! s.isEmpty())
m_items.append(s);
} break;
@@ -463,30 +463,30 @@ class ListBox : public QListBox
}
}
- QListBoxItem* item = m_edititem;
+ TQListBoxItem* item = m_edititem;
const uint count = m_items.count();
for(uint i = 0; i < count; i++)
item = new ListBoxItem(this, m_items[i], item);
}
EditListBoxItem* editItem() const { return m_edititem; }
- QStringList items() const { return m_items; }
+ TQStringList items() const { return m_items; }
virtual void hide () {
- QListBox::hide();
+ TQListBox::hide();
for(uint i = 0; i < count(); i++)
static_cast<ListBoxItem*>( item(i) )->setEnabled(false);
}
virtual void show() {
update();
adjustSize();
- QListBox::show();
+ TQListBox::show();
}
private:
KexiMacroProperty* m_macroproperty;
EditListBoxItem* m_edititem;
- QStringList m_items;
+ TQStringList m_items;
};
/**
@@ -501,13 +501,13 @@ class KexiMacroPropertyWidget::Private
ListBox* listbox;
};
-KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, QWidget* parent)
- : KoProperty::Widget(property, parent)
+KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, TQWidget* tqparent)
+ : KoProperty::Widget(property, tqparent)
, d( new Private() )
{
kdDebug() << "KexiMacroPropertyWidget::KexiMacroPropertyWidget() Ctor" << endl;
- QHBoxLayout* layout = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this, 0, 0);
d->macroproperty = dynamic_cast<KexiMacroProperty*>( property->customProperty() );
if(! d->macroproperty) {
@@ -516,18 +516,18 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property,
}
d->combobox = new KComboBox(this);
- layout->addWidget(d->combobox);
+ tqlayout->addWidget(d->combobox);
d->listbox = new ListBox(d->combobox, d->macroproperty);
d->combobox->setEditable(true);
d->combobox->setListBox(d->listbox);
- d->combobox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ d->combobox->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
d->combobox->setMinimumHeight(5);
- d->combobox->setInsertionPolicy(QComboBox::NoInsertion);
+ d->combobox->setInsertionPolicy(TQComboBox::NoInsertion);
d->combobox->setMinimumSize(10, 0); // to allow the combo to be resized to a small size
d->combobox->setAutoCompletion(false);
d->combobox->setContextMenuEnabled(false);
- QVariant value = d->macroproperty->value();
+ TQVariant value = d->macroproperty->value();
int index = d->listbox->items().findIndex( value.toString() );
if(index >= 0) {
d->combobox->setCurrentItem(index + 1);
@@ -543,14 +543,14 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property,
d->combobox->setFocusProxy( d->listbox->editItem()->widget() );
setFocusWidget( d->combobox->lineEdit() );
- connect(d->combobox, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotComboBoxChanged()));
- connect(d->combobox, SIGNAL(activated(int)),
- this, SLOT(slotComboBoxActivated()));
- connect(d->listbox->editItem()->widget(), SIGNAL(valueChanged(Widget*)),
- this, SLOT(slotWidgetValueChanged()));
- connect(d->macroproperty, SIGNAL(valueChanged()),
- this, SLOT(slotPropertyValueChanged()));
+ connect(d->combobox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotComboBoxChanged()));
+ connect(d->combobox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotComboBoxActivated()));
+ connect(d->listbox->editItem()->widget(), TQT_SIGNAL(valueChanged(Widget*)),
+ this, TQT_SLOT(slotWidgetValueChanged()));
+ connect(d->macroproperty, TQT_SIGNAL(valueChanged()),
+ this, TQT_SLOT(slotPropertyValueChanged()));
}
KexiMacroPropertyWidget::~KexiMacroPropertyWidget()
@@ -559,23 +559,23 @@ KexiMacroPropertyWidget::~KexiMacroPropertyWidget()
delete d;
}
-QVariant KexiMacroPropertyWidget::value() const
+TQVariant KexiMacroPropertyWidget::value() const
{
kdDebug()<<"KexiMacroPropertyWidget::value() value="<<d->macroproperty->value()<<endl;
return d->macroproperty->value();
- /* QVariant value = d->combobox->currentText();
+ /* TQVariant value = d->combobox->currentText();
value.cast( d->macroproperty->value().type() );
return value; */
}
-void KexiMacroPropertyWidget::setValue(const QVariant& value, bool emitChange)
+void KexiMacroPropertyWidget::setValue(const TQVariant& value, bool emitChange)
{
kdDebug()<<"KexiMacroPropertyWidget::setValue() value="<<value<<" emitChange="<<emitChange<<endl;
if(! emitChange)
d->combobox->blockSignals(true);
- const QString s = value.toString();
+ const TQString s = value.toString();
d->combobox->setCurrentText( s.isNull() ? "" : s );
if(emitChange)
@@ -593,7 +593,7 @@ void KexiMacroPropertyWidget::setReadOnlyInternal(bool readOnly)
void KexiMacroPropertyWidget::slotComboBoxChanged()
{
kdDebug()<<"KexiMacroPropertyWidget::slotComboBoxChanged()"<<endl;
- const QVariant v = d->combobox->currentText();
+ const TQVariant v = d->combobox->currentText();
d->macroproperty->setValue(v, true);
//emit valueChanged(this);
}
@@ -602,7 +602,7 @@ void KexiMacroPropertyWidget::slotComboBoxActivated()
{
Q_ASSERT( d->listbox->editItem()->widget() );
const int index = d->combobox->currentItem();
- QString text = (index == 0)
+ TQString text = (index == 0)
? d->listbox->editItem()->widget()->value().toString()
: d->combobox->text(index);
kdDebug()<<"KexiMacroPropertyWidget::slotComboBoxActivated() index="<<index<<" text="<<text<<endl;
@@ -618,7 +618,7 @@ void KexiMacroPropertyWidget::slotWidgetValueChanged()
void KexiMacroPropertyWidget::slotPropertyValueChanged()
{
Q_ASSERT( d->listbox->editItem()->widget() );
- const QVariant v = d->macroproperty->value();
+ const TQVariant v = d->macroproperty->value();
kdDebug()<<"KexiMacroPropertyWidget::slotPropertyValueChanged() value="<<v<<endl;
d->listbox->editItem()->widget()->setValue(v, true);
}
diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.h b/kexi/plugins/macros/kexipart/keximacroproperty.h
index 19f7b7ac..b1c256e9 100644
--- a/kexi/plugins/macros/kexipart/keximacroproperty.h
+++ b/kexi/plugins/macros/kexipart/keximacroproperty.h
@@ -36,35 +36,36 @@ class KexiMacroPropertyWidget;
* more control about the handling of our macro-properties.
*/
class KexiMacroProperty
- : public QObject
+ : public TQObject
, public KoProperty::CustomProperty
{
Q_OBJECT
+ TQ_OBJECT
friend class KexiMacroPropertyWidget;
public:
/** Constructor. */
- explicit KexiMacroProperty(KoProperty::Property* parent, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ explicit KexiMacroProperty(KoProperty::Property* tqparent, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
/** Destructor. */
virtual ~KexiMacroProperty();
- /** @return the parent @a KoProperty::Property instance. */
- KoProperty::Property* parentProperty() const;
+ /** @return the tqparent @a KoProperty::Property instance. */
+ KoProperty::Property* tqparentProperty() const;
/** This function is called by @ref KoProperty::Property::setValue()
when a custom property is set.
You don't have to modify the property value, it is done by Property class.
- You just have to update child or parent properties value (m_property->parent()->setValue()).
+ You just have to update child or tqparent properties value (m_property->tqparent()->setValue()).
Note that, when calling Property::setValue, you <b>need</b> to set
useCustomProperty (3rd parameter) to false, or there will be infinite recursion. */
- virtual void setValue(const QVariant &value, bool rememberOldValue);
+ virtual void setValue(const TQVariant &value, bool rememberOldValue);
/** This function is called by @ref KoProperty::Property::value()
when a custom property is set and @ref handleValue() is true.
- You should return property's value, taken from parent's value.*/
- virtual QVariant value() const;
+ You should return property's value, taken from tqparent's value.*/
+ virtual TQVariant value() const;
/** Tells whether CustomProperty should be used to get the property's value.
You should return true for child properties, and false for others. */
@@ -75,8 +76,8 @@ class KexiMacroProperty
KSharedPtr<KoMacro::MacroItem> macroItem() const;
/** \return the name the property has in the \a KoMacro::MacroItem
- above. Is QString::null if there was no item provided. */
- QString name() const;
+ above. Is TQString() if there was no item provided. */
+ TQString name() const;
/** \return the \a KoMacro::Variable which has the name @a name()
in the item @a macroItem() . If such a variable doesn't exists NULL
@@ -85,7 +86,7 @@ class KexiMacroProperty
/** Factory function to create a new @a KoProperty::Property instance
that will use a @a KexiMacroProperty as container. */
- static KoProperty::Property* createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ static KoProperty::Property* createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
signals:
@@ -110,18 +111,18 @@ class KexiMacroPropertyFactory : public KoProperty::CustomPropertyFactory
{
public:
/** Constructor. */
- explicit KexiMacroPropertyFactory(QObject* parent);
+ explicit KexiMacroPropertyFactory(TQObject* tqparent);
/** Destructor. */
virtual ~KexiMacroPropertyFactory();
- /** @return a new instance of custom property for @p parent.
+ /** @return a new instance of custom property for @p tqparent.
Implement this for property types you want to support.
- Use parent->type() to get type of the property. */
- virtual KoProperty::CustomProperty* createCustomProperty(KoProperty::Property* parent);
+ Use tqparent->type() to get type of the property. */
+ virtual KoProperty::CustomProperty* createCustomProperty(KoProperty::Property* tqparent);
/** @return a new instance of custom property for @p property.
Implement this for property editor types you want to support.
- Use parent->type() to get type of the property. */
+ Use tqparent->type() to get type of the property. */
virtual KoProperty::Widget* createCustomWidget(KoProperty::Property* property);
/** Initializes this factory. The factory may register itself at
@@ -139,21 +140,22 @@ class KexiMacroPropertyFactory : public KoProperty::CustomPropertyFactory
class KexiMacroPropertyWidget : public KoProperty::Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor. */
- explicit KexiMacroPropertyWidget(KoProperty::Property* property, QWidget* parent = 0);
+ explicit KexiMacroPropertyWidget(KoProperty::Property* property, TQWidget* tqparent = 0);
/** Destructor. */
virtual ~KexiMacroPropertyWidget();
/** @return the value this widget has. */
- virtual QVariant value() const;
+ virtual TQVariant value() const;
/** Set the value @p value this widget has. If @p emitChange is true,
the @p KoProperty::Widget::valueChanged signal will be emitted. */
- virtual void setValue(const QVariant& value, bool emitChange=true);
+ virtual void setValue(const TQVariant& value, bool emitChange=true);
- //virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ //virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
@@ -165,7 +167,7 @@ class KexiMacroPropertyWidget : public KoProperty::Widget
/** Called if the text in the KComboBox changed. */
void slotComboBoxChanged();
- /** Called if an item in the QListBox of the KComboBox got activated. */
+ /** Called if an item in the TQListBox of the KComboBox got activated. */
void slotComboBoxActivated();
/** Called if the @a KoProperty::Widget of the EditListBoxItem got changed. */
diff --git a/kexi/plugins/macros/kexipart/keximacrotextview.cpp b/kexi/plugins/macros/kexipart/keximacrotextview.cpp
index 95c94a47..deec9633 100644
--- a/kexi/plugins/macros/kexipart/keximacrotextview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacrotextview.cpp
@@ -41,17 +41,17 @@ class KexiMacroTextView::Private
};
-KexiMacroTextView::KexiMacroTextView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro)
- : KexiMacroView(mainwin, parent, macro, "KexiMacroTextView")
+KexiMacroTextView::KexiMacroTextView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro)
+ : KexiMacroView(mainwin, tqparent, macro, "KexiMacroTextView")
, d( new Private() )
{
- QHBoxLayout* layout = new QHBoxLayout(this);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
d->editor = new KTextEdit(this);
- d->editor->setTextFormat(Qt::PlainText);
- d->editor->setWordWrap(QTextEdit::NoWrap);
- layout->addWidget(d->editor);
+ d->editor->setTextFormat(TQt::PlainText);
+ d->editor->setWordWrap(TQTextEdit::NoWrap);
+ tqlayout->addWidget(d->editor);
- connect(d->editor, SIGNAL(textChanged()), this, SLOT(editorChanged()));
+ connect(d->editor, TQT_SIGNAL(textChanged()), this, TQT_SLOT(editorChanged()));
}
KexiMacroTextView::~KexiMacroTextView()
@@ -66,13 +66,13 @@ void KexiMacroTextView::editorChanged()
bool KexiMacroTextView::loadData()
{
- QString data;
+ TQString data;
if(! loadDataBlock(data)) {
kexipluginsdbg << "KexiMacroTextView::loadData(): no DataBlock" << endl;
return false;
}
- kdDebug() << QString("KexiMacroTextView::loadData()\n%1").arg(data) << endl;
+ kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").tqarg(data) << endl;
//d->editor->blockSignals(true);
d->editor->setText(data);
//d->editor->blockSignals(false);
@@ -82,7 +82,7 @@ bool KexiMacroTextView::loadData()
tristate KexiMacroTextView::storeData(bool /*dontAsk*/)
{
- kexipluginsdbg << QString("KexiMacroTextView::storeData() %1 [%2]\n%3").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id()).arg(d->editor->text()) << endl;
+ kexipluginsdbg << TQString("KexiMacroTextView::storeData() %1 [%2]\n%3").tqarg(tqparentDialog()->partItem()->name()).tqarg(tqparentDialog()->id()).tqarg(d->editor->text()) << endl;
return storeDataBlock( d->editor->text() );
}
diff --git a/kexi/plugins/macros/kexipart/keximacrotextview.h b/kexi/plugins/macros/kexipart/keximacrotextview.h
index 66a2229c..5101c30b 100644
--- a/kexi/plugins/macros/kexipart/keximacrotextview.h
+++ b/kexi/plugins/macros/kexipart/keximacrotextview.h
@@ -32,6 +32,7 @@ namespace KoMacro {
class KexiMacroTextView : public KexiMacroView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -39,10 +40,10 @@ class KexiMacroTextView : public KexiMacroView
*
* \param mainwin The \a KexiMainWindow instance this \a KexiViewBase
* belongs to.
- * \param parent The parent widget this widget should be displayed in.
+ * \param tqparent The tqparent widget this widget should be displayed in.
* \param macro The \a KoMacro::Macro instance this view is for.
*/
- KexiMacroTextView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro);
+ KexiMacroTextView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro);
/**
* Destructor.
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();
diff --git a/kexi/plugins/macros/kexipart/keximacroview.h b/kexi/plugins/macros/kexipart/keximacroview.h
index beed842e..0c44419b 100644
--- a/kexi/plugins/macros/kexipart/keximacroview.h
+++ b/kexi/plugins/macros/kexipart/keximacroview.h
@@ -42,6 +42,7 @@ class KexiTableItem;
class KexiMacroView : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -49,10 +50,10 @@ class KexiMacroView : public KexiViewBase
*
* \param mainwin The \a KexiMainWindow instance this \a KexiViewBase
* belongs to.
- * \param parent The parent widget this widget should be displayed in.
+ * \param tqparent The tqparent widget this widget should be displayed in.
* \param macro The \a KoMacro::Macro instance this view is for.
*/
- KexiMacroView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro, const char* name = 0);
+ KexiMacroView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro, const char* name = 0);
/**
* Destructor.
@@ -94,7 +95,7 @@ class KexiMacroView : public KexiViewBase
* This slot will be invoked if Kexi's menuitem Data=>Execute
* got activated and will execute the Macro.
*/
- void execute(QObject* sender = 0);
+ void execute(TQObject* sender = 0);
protected:
diff --git a/kexi/plugins/macros/lib/action.cpp b/kexi/plugins/macros/lib/action.cpp
index e2dc0b64..db5596b4 100644
--- a/kexi/plugins/macros/lib/action.cpp
+++ b/kexi/plugins/macros/lib/action.cpp
@@ -37,21 +37,21 @@ namespace KoMacro {
/**
* The name this @a Action has.
*/
- QString name;
+ TQString name;
/**
* The i18n-caption text this @a Action has.
*/
- QString text;
+ TQString text;
/**
* The comment the user is able to define for each action.
*/
- QString comment;
+ TQString comment;
/**
* A map of @a Variable instances this @a Action
- * provides accessible by there QString name.
+ * provides accessible by there TQString name.
*/
Variable::Map varmap;
@@ -60,14 +60,14 @@ namespace KoMacro {
* sorted order for the @a Variable instances
* defined in the map above.
*/
- QStringList varnames;
+ TQStringList varnames;
};
}
-Action::Action(const QString& name, const QString& text)
- : QObject()
+Action::Action(const TQString& name, const TQString& text)
+ : TQObject()
, KShared()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -81,55 +81,55 @@ Action::Action(const QString& name, const QString& text)
Action::~Action()
{
- //kdDebug() << QString("Action::~Action() name=\"%1\"").arg(name()) << endl;
+ //kdDebug() << TQString("Action::~Action() name=\"%1\"").tqarg(name()) << endl;
// destroy the private d-pointer instance.
delete d;
}
-const QString Action::toString() const
+const TQString Action::toString() const
{
- return QString("Action:%1").arg(name());
+ return TQString("Action:%1").tqarg(name());
}
-const QString Action::name() const
+const TQString Action::name() const
{
return d->name;
}
-void Action::setName(const QString& name)
+void Action::setName(const TQString& name)
{
d->name = name;
}
-const QString Action::text() const
+const TQString Action::text() const
{
return d->text;
}
-void Action::setText(const QString& text)
+void Action::setText(const TQString& text)
{
d->text = text;
}
-const QString Action::comment() const
+const TQString Action::comment() const
{
return d->comment;
}
-void Action::setComment(const QString& comment)
+void Action::setComment(const TQString& comment)
{
d->comment = comment;
}
-bool Action::hasVariable(const QString& name) const
+bool Action::hasVariable(const TQString& name) const
{
- return d->varmap.contains(name);
+ return d->varmap.tqcontains(name);
}
-KSharedPtr<Variable> Action::variable(const QString& name) const
+KSharedPtr<Variable> Action::variable(const TQString& name) const
{
- return d->varmap.contains(name) ? d->varmap[name] : KSharedPtr<Variable>(0);
+ return d->varmap.tqcontains(name) ? d->varmap[name] : KSharedPtr<Variable>(0);
}
Variable::Map Action::variables() const
@@ -137,21 +137,21 @@ Variable::Map Action::variables() const
return d->varmap;
}
-QStringList Action::variableNames() const
+TQStringList Action::variableNames() const
{
return d->varnames;
}
void Action::setVariable(KSharedPtr<Variable> variable)
{
- const QString name = variable->name();
- if(! d->varmap.contains(name)) {
+ const TQString name = variable->name();
+ if(! d->varmap.tqcontains(name)) {
d->varnames.append(name);
}
- d->varmap.replace(name, variable);
+ d->varmap.tqreplace(name, variable);
}
-void Action::setVariable(const QString& name, const QString& text, const QVariant& variant)
+void Action::setVariable(const TQString& name, const TQString& text, const TQVariant& variant)
{
Variable* variable = new Variable(variant);
variable->setName(name);
@@ -159,9 +159,9 @@ void Action::setVariable(const QString& name, const QString& text, const QVarian
setVariable( KSharedPtr<Variable>(variable) );
}
-void Action::removeVariable(const QString& name)
+void Action::removeVariable(const TQString& name)
{
- if(d->varmap.contains(name)) {
+ if(d->varmap.tqcontains(name)) {
d->varmap.remove(name);
d->varnames.remove(name);
}
diff --git a/kexi/plugins/macros/lib/action.h b/kexi/plugins/macros/lib/action.h
index 5200c1a4..51e97869 100644
--- a/kexi/plugins/macros/lib/action.h
+++ b/kexi/plugins/macros/lib/action.h
@@ -25,9 +25,9 @@
#include "context.h"
#include "variable.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KoMacro {
@@ -36,26 +36,27 @@ namespace KoMacro {
* functionality KAction doesn't provide.
*/
class KOMACRO_EXPORT Action
- : public QObject // Qt functionality like signals and slots
+ : public TQObject // TQt functionality like signals and slots
, public KShared // shared reference-counting
{
Q_OBJECT
+ TQ_OBJECT
/// Property to get/set the name.
- Q_PROPERTY(QString name READ name WRITE setName)
+ TQ_PROPERTY(TQString name READ name WRITE setName)
/// Property to get/set the text.
- Q_PROPERTY(QString text READ text WRITE setText)
+ TQ_PROPERTY(TQString text READ text WRITE setText)
/// Property to get/set the comment.
- Q_PROPERTY(QString comment READ comment WRITE setComment)
+ TQ_PROPERTY(TQString comment READ comment WRITE setComment)
public:
/**
* Shared pointer to implement reference-counting.
*/
- typedef QMap<QString, KSharedPtr<Action> > Map;
+ typedef TQMap<TQString, KSharedPtr<Action> > Map;
/**
* Constructor.
@@ -63,7 +64,7 @@ namespace KoMacro {
* @param name The unique name this @a Action has.
* @param text The i18n-caption text this @a Action has.
*/
- explicit Action(const QString& name, const QString& text = QString::null);
+ explicit Action(const TQString& name, const TQString& text = TQString());
/**
* Destructor.
@@ -74,50 +75,50 @@ namespace KoMacro {
* @return a string representation of the functionality
* this action provides.
*/
- virtual const QString toString() const;
+ virtual const TQString toString() const;
/**
* The name this @a Action has.
*/
- const QString name() const;
+ const TQString name() const;
/**
* Set the name of the @a Action to @p name .
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* @return the i18n-caption text this @a Action has.
*/
- const QString text() const;
+ const TQString text() const;
/**
* Set the i18n-caption text this @a Action has.
*/
- void setText(const QString& text);
+ void setText(const TQString& text);
/**
* @return the comment associated with this action.
*/
- const QString comment() const;
+ const TQString comment() const;
/**
* Set the @p comment associated with this action.
*/
- void setComment(const QString& comment);
+ void setComment(const TQString& comment);
/**
* @return true if there exists a variable with the
* name @p name else false is returned.
*/
- bool hasVariable(const QString& name) const;
+ bool hasVariable(const TQString& name) const;
/**
* @return the variable @a Variable defined for the
* name @p name . If there exists no @a Variable with
* such a name, NULL is returned.
*/
- KSharedPtr<Variable> variable(const QString& name) const;
+ KSharedPtr<Variable> variable(const TQString& name) const;
/**
* @return the map of variables this @a Action provides.
@@ -127,7 +128,7 @@ namespace KoMacro {
/**
* @return a list of variablenames this @a Action provides.s
*/
- QStringList variableNames() const;
+ TQStringList variableNames() const;
/**
* Append the @a Variable @p variable to list of variables
@@ -140,15 +141,15 @@ namespace KoMacro {
*
* @param name The name the variable should have.
* @param text The i18n-caption used for display.
- * @param variant The QVariant value.
+ * @param variant The TQVariant value.
*/
- void setVariable(const QString& name, const QString& text, const QVariant& variant);
+ void setVariable(const TQString& name, const TQString& text, const TQVariant& variant);
/**
* Remove the variable defined with @p name . If there exists
* no such variable, nothing is done.
*/
- void removeVariable(const QString& name);
+ void removeVariable(const TQString& name);
/**
* This function is called, when the @a KoMacro::Variable
@@ -161,7 +162,7 @@ namespace KoMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(const KSharedPtr<MacroItem> &macroitem, const QString& name) {
+ virtual bool notifyUpdated(const KSharedPtr<MacroItem> &macroitem, const TQString& name) {
Q_UNUSED(macroitem);
Q_UNUSED(name);
return true; // The default implementation does nothing.
diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp
index 135c10c9..6e2fb2e4 100644
--- a/kexi/plugins/macros/lib/context.cpp
+++ b/kexi/plugins/macros/lib/context.cpp
@@ -23,7 +23,7 @@
#include "macroitem.h"
#include "exception.h"
-//#include <qtimer.h>
+//#include <tqtimer.h>
#include <kdebug.h>
using namespace KoMacro;
@@ -44,10 +44,10 @@ namespace KoMacro {
KSharedPtr<Macro> macro;
/**
- * List of @a Action instances that are children of the
+ * List of @a Action instances that are tqchildren of the
* macro.
*/
- QValueList<KSharedPtr<MacroItem > > items;
+ TQValueList<KSharedPtr<MacroItem > > items;
/**
* The currently selected @a MacroItem or NULL if there
@@ -59,7 +59,7 @@ namespace KoMacro {
* Map of all @a Variable instance that are defined within
* this context.
*/
- QMap<QString, KSharedPtr<Variable > > variables;
+ TQMap<TQString, KSharedPtr<Variable > > variables;
/**
* The @a Exception instance thrown at the last @a activate()
@@ -70,7 +70,7 @@ namespace KoMacro {
/// Constructor.
explicit Private(KSharedPtr<Macro> m)
: macro(m) // remember the macro
- , items(m->items()) // set d-pointer children to macro children
+ , items(m->items()) // set d-pointer tqchildren to macro tqchildren
, exception(0) // no exception yet.
{
}
@@ -85,7 +85,7 @@ namespace KoMacro {
}
//Constructor with initialization of our Private.object (d-pointer)
Context::Context(KSharedPtr<Macro> macro)
- : QObject()
+ : TQObject()
, d( new Private(macro) ) // create the private d-pointer instance.
{
}
@@ -97,17 +97,17 @@ Context::~Context()
}
//return if we have (d-pointer) variables
-bool Context::hasVariable(const QString& name) const
+bool Context::hasVariable(const TQString& name) const
{
- //Use QMap?s contains to check if a variable with name exists
- return d->variables.contains(name);
+ //Use TQMap?s contains to check if a variable with name exists
+ return d->variables.tqcontains(name);
}
//return variable with name or throw an exception if none is found in variables
-KSharedPtr<Variable> Context::variable(const QString& name) const
+KSharedPtr<Variable> Context::variable(const TQString& name) const
{
- //Use QMap?s contains to check if a variable with name exists in context
- if (d->variables.contains(name)) {
+ //Use TQMap?s contains to check if a variable with name exists in context
+ if (d->variables.tqcontains(name)) {
//return it
return d->variables[name];
}
@@ -119,7 +119,7 @@ KSharedPtr<Variable> Context::variable(const QString& name) const
}
}
//none found throw exception
- throw Exception(QString("Variable name='%1' does not exist.").arg(name));
+ throw Exception(TQString("Variable name='%1' does not exist.").tqarg(name));
}
//return a map of our (d-pointer) variables
@@ -129,12 +129,12 @@ Variable::Map Context::variables() const
}
//set a variable
-void Context::setVariable(const QString& name, KSharedPtr<Variable> variable)
+void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable)
{
//debuging infos
- kdDebug() << QString("KoMacro::Context::setVariable name='%1' variable='%2'").arg(name).arg(variable->toString()) << endl;
- //Use QMap?s replace to set/replace the variable named name
- d->variables.replace(name, variable);
+ kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").tqarg(name).tqarg(variable->toString()) << endl;
+ //Use TQMap?s replace to set/replace the variable named name
+ d->variables.tqreplace(name, variable);
}
//return the associated Macro
@@ -162,14 +162,14 @@ Exception* Context::exception() const
}
//try to activate all action?s in this context
-void Context::activate(QValueList<KSharedPtr<MacroItem > >::ConstIterator it)
+void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it)
{
//debuging infos
kdDebug() << "Context::activate()" << endl;
- //Q_ASSIGN(d->macro);
+ //TQ_ASSIGN(d->macro);
//set end to constEnd
- QValueList<KSharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd());
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd());
//loop through actions
for(;it != end; ++it) {
// fetch the MacroItem we are currently pointing to.
@@ -198,14 +198,14 @@ void Context::activate(QValueList<KSharedPtr<MacroItem > >::ConstIterator it)
d->exception = new Exception(e);
//add new tracemessages
//the macro name
- d->exception->addTraceMessage( QString("macro=%1").arg(d->macro->name()) );
+ d->exception->addTraceMessage( TQString("macro=%1").tqarg(d->macro->name()) );
//the action name
- d->exception->addTraceMessage( QString("action=%1").arg(action->name()) );
+ d->exception->addTraceMessage( TQString("action=%1").tqarg(action->name()) );
//and all variables wich belong to the action/macro
- QStringList variables = action->variableNames();
- for(QStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) {
+ TQStringList variables = action->variableNames();
+ for(TQStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) {
KSharedPtr<Variable> v = d->macroitem->variable(*vit, true);
- d->exception->addTraceMessage( QString("%1=%2").arg(*vit).arg(v->toString()) );
+ d->exception->addTraceMessage( TQString("%1=%2").tqarg(*vit).tqarg(v->toString()) );
}
return; // abort execution
}
@@ -252,7 +252,7 @@ void Context::activateNext()
}
//find the macroitem from which to continue
- QValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.find(d->macroitem);
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.tqfind(d->macroitem);
if (it != d->items.constEnd()) {
activate(++it); // try to continue the execution.
}
diff --git a/kexi/plugins/macros/lib/context.h b/kexi/plugins/macros/lib/context.h
index dd467dad..558ff0aa 100644
--- a/kexi/plugins/macros/lib/context.h
+++ b/kexi/plugins/macros/lib/context.h
@@ -20,7 +20,7 @@
#ifndef KOMACRO_CONTEXT_H
#define KOMACRO_CONTEXT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "variable.h"
@@ -35,14 +35,15 @@ namespace KoMacro {
/**
* The context of an execution. If a @a Macro got executed it creates
- * an instance of this class and passes it around all it's children
+ * an instance of this class and passes it around all it's tqchildren
* as local execution context.
*/
class KOMACRO_EXPORT Context
- : public QObject
+ : public TQObject
, public KShared
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -61,13 +62,13 @@ namespace KoMacro {
* @return true if there exists a variable with name @p name
* else false got returned.
*/
- bool hasVariable(const QString& name) const;
+ bool hasVariable(const TQString& name) const;
/**
* @return the @a Variable defined with name @p name or
* NULL if there exists no such variable.
*/
- KSharedPtr<Variable> variable(const QString& name) const;
+ KSharedPtr<Variable> variable(const TQString& name) const;
/**
* @return a map of all @a Variable instance that are defined
@@ -79,7 +80,7 @@ namespace KoMacro {
* Set the variable @p variable defined with name @p name . If
* there exists already a variable with that name replace it.
*/
- void setVariable(const QString& name, KSharedPtr<Variable> variable);
+ void setVariable(const TQString& name, KSharedPtr<Variable> variable);
/**
* @return the associated macro
@@ -113,14 +114,14 @@ namespace KoMacro {
* remembers what @a Action should be executed next and
* calling this slot just activates those @a Action .
*/
- virtual void activate(QValueList<KSharedPtr <MacroItem> >::ConstIterator it);
+ virtual void activate(TQValueList<KSharedPtr <MacroItem> >::ConstIterator it);
public slots:
/**
* This slot extends the slot above with the passed
* @a Context @p context which will be used as
- * parent context for this context.
+ * tqparent context for this context.
*/
virtual void activate(KSharedPtr<Context> context);
diff --git a/kexi/plugins/macros/lib/exception.cpp b/kexi/plugins/macros/lib/exception.cpp
index 7cfc7d71..91cfa03c 100644
--- a/kexi/plugins/macros/lib/exception.cpp
+++ b/kexi/plugins/macros/lib/exception.cpp
@@ -34,15 +34,15 @@ namespace KoMacro {
public:
/// A describing errormessage.
- const QString errormessage;
+ const TQString errormessage;
/// A more detailed list of tracemessages.
- QString tracemessages;
+ TQString tracemessages;
/**
* Constructor.
*/
- Private(const QString& errormessage)
+ Private(const TQString& errormessage)
: errormessage(errormessage)
{
}
@@ -52,11 +52,11 @@ namespace KoMacro {
}
//constructor
-Exception::Exception(const QString& errormessage)
+Exception::Exception(const TQString& errormessage)
: d( new Private(errormessage) ) // create the private d-pointer instance.
{
//debuging infos
- kdDebug() << QString("Exception errormessage=\"%1\"").arg(errormessage) << endl;
+ kdDebug() << TQString("Exception errormessage=\"%1\"").tqarg(errormessage) << endl;
}
//copy constructor
@@ -73,19 +73,19 @@ Exception::~Exception()
}
//get d-pointer errormessage
-const QString Exception::errorMessage() const
+const TQString Exception::errorMessage() const
{
return d->errormessage;
}
//get d-pointer tracemessages
-const QString Exception::traceMessages() const
+const TQString Exception::traceMessages() const
{
return d->tracemessages;
}
//add a Qstring to d-pointer tracemessages
-void Exception::addTraceMessage(const QString& tracemessage)
+void Exception::addTraceMessage(const TQString& tracemessage)
{
//no tracemessages till now
if(d->tracemessages.isEmpty())
diff --git a/kexi/plugins/macros/lib/exception.h b/kexi/plugins/macros/lib/exception.h
index 73504de0..bcf4abff 100644
--- a/kexi/plugins/macros/lib/exception.h
+++ b/kexi/plugins/macros/lib/exception.h
@@ -20,8 +20,8 @@
#ifndef KOMACRO_EXCEPTION_H
#define KOMACRO_EXCEPTION_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "komacro_export.h"
@@ -41,7 +41,7 @@ namespace KoMacro {
* @param errormessage A describing errormessage why the
* exception got thrown.
*/
- explicit Exception(const QString& errormessage);
+ explicit Exception(const TQString& errormessage);
/**
* Copy-constructor.
@@ -56,7 +56,7 @@ namespace KoMacro {
/**
* @return a describing errormessage.
*/
- const QString errorMessage() const;
+ const TQString errorMessage() const;
/**
* @return a stringlist of traces. This are normaly just
@@ -65,12 +65,12 @@ namespace KoMacro {
* we finally catched the error to display it to the
* user.
*/
- const QString traceMessages() const;
+ const TQString traceMessages() const;
/**
* Add the message @p tracemessage to the list of traces.
*/
- void addTraceMessage(const QString& tracemessage);
+ void addTraceMessage(const TQString& tracemessage);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/macro.cpp b/kexi/plugins/macros/lib/macro.cpp
index 688cc7b0..6bcdc21d 100644
--- a/kexi/plugins/macros/lib/macro.cpp
+++ b/kexi/plugins/macros/lib/macro.cpp
@@ -23,7 +23,7 @@
#include "context.h"
#include "variable.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
using namespace KoMacro;
@@ -41,20 +41,20 @@ namespace KoMacro {
/**
* A list of @a MacroItem instances.
*/
- QValueList<KSharedPtr<MacroItem > > itemlist;
+ TQValueList<KSharedPtr<MacroItem > > itemlist;
/**
* The name the @a Macro has.
*/
- QString name;
+ TQString name;
};
}
//constructor, initalize internal (d-pointer) name
-Macro::Macro(const QString& name)
- : QObject()
+Macro::Macro(const TQString& name)
+ : TQObject()
, KShared()
, XMLHandler(this)
, d( new Private() ) // create the private d-pointer instance.
@@ -70,25 +70,25 @@ Macro::~Macro()
}
//get internal (d-pointer) name
-const QString Macro::name() const
+const TQString Macro::name() const
{
return d->name;
}
//set internal (d-pointer) name
-void Macro::setName(const QString& name)
+void Macro::setName(const TQString& name)
{
d->name = name;
}
//get an "extended" name
-const QString Macro::toString() const
+const TQString Macro::toString() const
{
- return QString("Macro:%1").arg(name());
+ return TQString("Macro:%1").tqarg(name());
}
//get (d-pointer) itemlist
-QValueList<KSharedPtr<MacroItem > >& Macro::items() const
+TQValueList<KSharedPtr<MacroItem > >& Macro::items() const
{
return d->itemlist;
}
@@ -105,17 +105,17 @@ void Macro::clearItems()
}
//run our macro
-KSharedPtr<Context> Macro::execute(QObject* sender)
+KSharedPtr<Context> Macro::execute(TQObject* sender)
{
kdDebug() << "Macro::execute(KSharedPtr<Context>)" << endl;
//create context in which macro can/should run
KSharedPtr<Context> c = KSharedPtr<Context>( new Context(this) );
if(sender) {
- // set the sender-variable if we got a sender QObject.
+ // set the sender-variable if we got a sender TQObject.
c->setVariable("[sender]", KSharedPtr<Variable>( new Variable(sender) ));
}
- //connect(context, SIGNAL(activated()), this, SIGNAL(activated()));
+ //connect(context, TQT_SIGNAL(activated()), this, TQT_SIGNAL(activated()));
//call activate in the context of the macro
c->activate( c );
diff --git a/kexi/plugins/macros/lib/macro.h b/kexi/plugins/macros/lib/macro.h
index da38e05b..86e0122a 100644
--- a/kexi/plugins/macros/lib/macro.h
+++ b/kexi/plugins/macros/lib/macro.h
@@ -20,7 +20,7 @@
#ifndef KOMACRO_MACRO_H
#define KOMACRO_MACRO_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "action.h"
@@ -39,20 +39,21 @@ namespace KoMacro {
* of them points to an @a Action instance.
*/
class KOMACRO_EXPORT Macro
- : public QObject // Qt functionality like signals and slots
+ : public TQObject // TQt functionality like signals and slots
, public KShared // shared reference-counting
, public XMLHandler // to (un-)serialize from/to XML
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * A QMap of @a Macro instances accessible by there unique name. Each
- * class should use this typemap rather then the QMap direct. That
+ * A TQMap of @a Macro instances accessible by there unique name. Each
+ * class should use this typemap rather then the TQMap direct. That
* way we are more flexible on future changes.
*/
- typedef QMap<QString, KSharedPtr<Macro > > Map;
+ typedef TQMap<TQString, KSharedPtr<Macro > > Map;
/**
* Constructor.
@@ -60,7 +61,7 @@ namespace KoMacro {
* @param name The internal name this @a Macro has. This
* name will be used as unique identifier.
*/
- explicit Macro(const QString& name);
+ explicit Macro(const TQString& name);
/**
* Destructor.
@@ -70,23 +71,23 @@ namespace KoMacro {
/**
* @return the name this @a Macro instance has.
*/
- const QString name() const;
+ const TQString name() const;
/**
* Set the @p name this @a Macro instance has.
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* @return a string-representation of the macro.
*/
- virtual const QString toString() const;
+ virtual const TQString toString() const;
/**
* @return a list of @a MacroItem instances which
- * are children of this @a Macro .
+ * are tqchildren of this @a Macro .
*/
- QValueList< KSharedPtr<MacroItem> >& items() const;
+ TQValueList< KSharedPtr<MacroItem> >& items() const;
/**
* Add the @a MacroItem @p item to the list of items
@@ -100,13 +101,13 @@ namespace KoMacro {
void clearItems();
/**
- * Connect the Qt signal @p signal of the QObject @p sender
+ * Connect the TQt signal @p signal of the TQObject @p sender
* with this @a Macro . If the signal got emitted this
* @a Macro instance will be activated and the in the
* signal passed arguments are transfered into the
* activation @a Context .
*/
- //void connectSignal(const QObject* sender, const char* signal);
+ //void connectSignal(const TQObject* sender, const char* signal);
public slots:
@@ -116,7 +117,7 @@ namespace KoMacro {
* @param context The @a Context this @a Macro should
* be executed in.
*/
- virtual KSharedPtr<Context> execute(QObject* sender);
+ virtual KSharedPtr<Context> execute(TQObject* sender);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/macroitem.cpp b/kexi/plugins/macros/lib/macroitem.cpp
index 4027f2cc..471f9660 100644
--- a/kexi/plugins/macros/lib/macroitem.cpp
+++ b/kexi/plugins/macros/lib/macroitem.cpp
@@ -40,62 +40,62 @@ namespace KoMacro {
/**
* The comment this @a MacroItem has.
*/
- QString comment;
+ TQString comment;
/**
- * The @a QMap of @a Variable this @a MacroItem has.
+ * The @a TQMap of @a Variable this @a MacroItem has.
*/
Variable::Map variables;
/**
- * define a @a QVariant -cast as inline for better performance
- * @return the casted @a QVariant by passing a @param variant and its
- * expected QVariant::Type @param type.
+ * define a @a TQVariant -cast as inline for better performance
+ * @return the casted @a TQVariant by passing a @param variant and its
+ * expected TQVariant::Type @param type.
*/
- inline const QVariant cast(const QVariant& variant, QVariant::Type type) const
+ inline const TQVariant cast(const TQVariant& variant, TQVariant::Type type) const
{
- // If ok is true the QVariant v holds our new and to the correct type
+ // If ok is true the TQVariant v holds our new and to the correct type
// casted variant value. If ok is false the as argument passed variant
- // QVariant contains the (maybe uncasted string to prevent data-loosing
+ // TQVariant contains the (maybe uncasted string to prevent data-loosing
// what would happen if we e.g. would expect an integer and cast it to
// an incompatible non-int string) value.
bool ok = false;
- QVariant v;
+ TQVariant v;
// Try to cast the passed variant to the expected variant-type.
switch(type) {
- case QVariant::Bool: {
- const QString s = variant.toString();
+ case TQVariant::Bool: {
+ const TQString s = variant.toString();
ok = (s == "true" || s == "false" || s == "0" || s == "1" || s == "-1");
- v = QVariant( variant.toBool(), 0 );
+ v = TQVariant( variant.toBool(), 0 );
} break;
- case QVariant::Int: {
+ case TQVariant::Int: {
v = variant.toInt(&ok);
// Check if the cast is correct.
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::UInt: {
+ case TQVariant::UInt: {
v = variant.toUInt(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::LongLong: {
+ case TQVariant::LongLong: {
v = variant.toLongLong(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::ULongLong: {
+ case TQVariant::ULongLong: {
v = variant.toULongLong(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::Double: {
+ case TQVariant::Double: {
v = variant.toDouble(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::String: {
+ case TQVariant::String: {
ok = true; // cast will always be successfully
v = variant.toString();
} break;
default: {
- // If we got another type we try to let Qt handle it...
+ // If we got another type we try to let TQt handle it...
ok = v.cast(type);
kdWarning()<<"MacroItem::Private::cast() Unhandled ok="<<ok<<" type="<<type<<" value="<<v<<endl;
} break;
@@ -119,12 +119,12 @@ MacroItem::~MacroItem()
delete d;
}
-QString MacroItem::comment() const
+TQString MacroItem::comment() const
{
return d->comment;
}
-void MacroItem::setComment(const QString& comment)
+void MacroItem::setComment(const TQString& comment)
{
d->comment = comment;
}
@@ -139,15 +139,15 @@ void MacroItem::setAction(KSharedPtr<Action> action)
d->action = action;
}
-QVariant MacroItem::variant(const QString& name, bool checkaction) const
+TQVariant MacroItem::variant(const TQString& name, bool checkaction) const
{
KSharedPtr<Variable> v = variable(name, checkaction);
- return v.data() ? v->variant() : QVariant();
+ return v.data() ? v->variant() : TQVariant();
}
-KSharedPtr<Variable> MacroItem::variable(const QString& name, bool checkaction) const
+KSharedPtr<Variable> MacroItem::variable(const TQString& name, bool checkaction) const
{
- if(d->variables.contains(name))
+ if(d->variables.tqcontains(name))
return d->variables[name];
if(checkaction && d->action.data())
return d->action->variable(name);
@@ -159,7 +159,7 @@ Variable::Map MacroItem::variables() const
return d->variables;
}
-bool MacroItem::setVariant(const QString& name, const QVariant& variant)
+bool MacroItem::setVariant(const TQString& name, const TQVariant& variant)
{
// Let's look if there is an action defined for the variable. If that's
// the case, we try to use that action to preserve the type of the variant.
@@ -167,7 +167,7 @@ bool MacroItem::setVariant(const QString& name, const QVariant& variant)
// If we know the expected type, we try to cast the variant to the expected
// type else the variant stays untouched (so, it will stay a string).
- const QVariant v = actionvariable.data()
+ const TQVariant v = actionvariable.data()
? d->cast(variant, actionvariable->variant().type()) // try to cast the variant
: variant; // don't cast anything, just leave the string-type...
@@ -179,11 +179,11 @@ bool MacroItem::setVariant(const QString& name, const QVariant& variant)
variable = KSharedPtr<Variable>( new Variable() );
variable->setName(name);
- d->variables.replace(name, variable);
+ d->variables.tqreplace(name, variable);
}
// Remember the previous value for the case we like to restore it.
- const QVariant oldvar = variable->variant();
+ const TQVariant oldvar = variable->variant();
// Set the variable.
variable->setVariant(v);
@@ -201,15 +201,15 @@ bool MacroItem::setVariant(const QString& name, const QVariant& variant)
return true;
}
-KSharedPtr<Variable> MacroItem::addVariable(const QString& name, const QVariant& variant)
+KSharedPtr<Variable> MacroItem::addVariable(const TQString& name, const TQVariant& variant)
{
- Q_ASSERT(! d->variables.contains(name) );
+ Q_ASSERT(! d->variables.tqcontains(name) );
// Create a new Variable.
KSharedPtr<Variable> variable = KSharedPtr<Variable>( new Variable() );
variable->setName(name);
// Put it into the Variable-map.
- d->variables.replace(name, variable);
+ d->variables.tqreplace(name, variable);
// Set the variant of the Variable.
this->setVariant(name, variant);
diff --git a/kexi/plugins/macros/lib/macroitem.h b/kexi/plugins/macros/lib/macroitem.h
index 8f3e1502..6b996e70 100644
--- a/kexi/plugins/macros/lib/macroitem.h
+++ b/kexi/plugins/macros/lib/macroitem.h
@@ -20,12 +20,12 @@
#ifndef KOMACRO_MACROITEM_H
#define KOMACRO_MACROITEM_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
// Forward declarations.
-class QDomElement;
+class TQDomElement;
#include "action.h"
#include "context.h"
@@ -51,7 +51,7 @@ namespace KoMacro {
/**
* A list of \a MacroItem instances.
*/
- typedef QValueList<KSharedPtr<MacroItem > > List;
+ typedef TQValueList<KSharedPtr<MacroItem > > List;
/**
* Constructor.
@@ -67,13 +67,13 @@ namespace KoMacro {
* @return the comment defined by the user for
* this @a MacroItem .
*/
- QString comment() const;
+ TQString comment() const;
/**
* Set the comment @param comment defined by the user for this
* @a MacroItem .
*/
- void setComment(const QString& comment);
+ void setComment(const TQString& comment);
/**
* @return the @a Action this @a MacroItem points
@@ -98,7 +98,7 @@ namespace KoMacro {
* such a @param name in the case this @a MacroItem
* doesn't have such a name.
*/
- QVariant variant(const QString& name, bool checkaction = false) const;
+ TQVariant variant(const TQString& name, bool checkaction = false) const;
/**
* @return the @a Variable instance identified with
@@ -110,25 +110,25 @@ namespace KoMacro {
* such a @param name in the case this @a MacroItem
* doesn't have such a name.
*/
- KSharedPtr<Variable> variable(const QString& name, bool checkaction = false) const;
+ KSharedPtr<Variable> variable(const TQString& name, bool checkaction = false) const;
/**
* @return a map of @a Variable instances.
*/
- QMap<QString, KSharedPtr<Variable> > variables() const;
+ TQMap<TQString, KSharedPtr<Variable> > variables() const;
/**
- * Set the @a QVariant @param variant as variable with the variablename
+ * Set the @a TQVariant @param variant as variable with the variablename
* @param name .
* @return a bool for successfull setting.
*/
- bool setVariant(const QString& name, const QVariant& variant);
+ bool setVariant(const TQString& name, const TQVariant& variant);
/**
* Add a new variable with the vaiablename @param name and the given
- * @a QVariant @param variant to our @a MacroItem instance.
+ * @a TQVariant @param variant to our @a MacroItem instance.
*/
- KSharedPtr<Variable> addVariable(const QString& name, const QVariant& variant);
+ KSharedPtr<Variable> addVariable(const TQString& name, const TQVariant& variant);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/manager.cpp b/kexi/plugins/macros/lib/manager.cpp
index 77ad98b1..0a0d59e0 100644
--- a/kexi/plugins/macros/lib/manager.cpp
+++ b/kexi/plugins/macros/lib/manager.cpp
@@ -23,9 +23,9 @@
#include "macro.h"
#include "exception.h"
-#include <qobject.h>
-#include <qwidget.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqdom.h>
#include <kxmlguibuilder.h>
#include <kdebug.h>
@@ -41,12 +41,12 @@ namespace KoMacro {
{
public:
KXMLGUIClient* const xmlguiclient;
- QMap<QString, KSharedPtr<Macro > > macros;
+ TQMap<TQString, KSharedPtr<Macro > > macros;
- QStringList actionnames;
- QMap<QString, KSharedPtr<Action> > actions;
+ TQStringList actionnames;
+ TQMap<TQString, KSharedPtr<Action> > actions;
- QMap<QString, QGuardedPtr<QObject> > objects;
+ TQMap<TQString, TQGuardedPtr<TQObject> > objects;
Private(KXMLGUIClient* const xmlguiclient)
: xmlguiclient(xmlguiclient)
@@ -83,13 +83,13 @@ Manager::Manager(KXMLGUIClient* const xmlguiclient)
: d( new Private(xmlguiclient) ) // create the private d-pointer instance.
{
kdDebug() << "Manager::Manager() Ctor" << endl;
- QObject* obj = dynamic_cast<QObject*>(xmlguiclient);
+ TQObject* obj = dynamic_cast<TQObject*>(xmlguiclient);
if(obj) {
- d->objects.replace(obj->name(), obj);
+ d->objects.tqreplace(obj->name(), obj);
}
//TESTCASE
- d->objects.replace("TestCase", new QWidget());
+ d->objects.tqreplace("TestCase", new TQWidget());
}
Manager::~Manager()
@@ -103,33 +103,33 @@ KXMLGUIClient* Manager::guiClient() const
return d->xmlguiclient;
}
-bool Manager::hasMacro(const QString& macroname)
+bool Manager::hasMacro(const TQString& macroname)
{
- return d->macros.contains(macroname);
+ return d->macros.tqcontains(macroname);
}
-KSharedPtr<Macro> Manager::getMacro(const QString& macroname)
+KSharedPtr<Macro> Manager::getMacro(const TQString& macroname)
{
return d->macros[macroname];
}
-void Manager::addMacro(const QString& macroname, KSharedPtr<Macro> macro)
+void Manager::addMacro(const TQString& macroname, KSharedPtr<Macro> macro)
{
- d->macros.replace(macroname, macro);
+ d->macros.tqreplace(macroname, macro);
}
-void Manager::removeMacro(const QString& macroname)
+void Manager::removeMacro(const TQString& macroname)
{
d->macros.remove(macroname);
}
-KSharedPtr<Macro> Manager::createMacro(const QString& macroname)
+KSharedPtr<Macro> Manager::createMacro(const TQString& macroname)
{
KSharedPtr<Macro> macro = KSharedPtr<Macro>( new Macro(macroname) );
return macro;
}
-KSharedPtr<Action> Manager::action(const QString& name) const
+KSharedPtr<Action> Manager::action(const TQString& name) const
{
return d->actions[name];
}
@@ -139,32 +139,32 @@ Action::Map Manager::actions() const
return d->actions;
}
-QStringList Manager::actionNames() const
+TQStringList Manager::actionNames() const
{
return d->actionnames;
}
void Manager::publishAction(KSharedPtr<Action> action)
{
- const QString name = action->name();
- if(! d->actions.contains(name)) {
+ const TQString name = action->name();
+ if(! d->actions.tqcontains(name)) {
d->actionnames.append(name);
}
- d->actions.replace(name, action);
+ d->actions.tqreplace(name, action);
}
-void Manager::publishObject(const QString& name, QObject* object)
+void Manager::publishObject(const TQString& name, TQObject* object)
{
- Q_ASSERT(! d->objects.contains(name));
- d->objects.replace(name, object);
+ Q_ASSERT(! d->objects.tqcontains(name));
+ d->objects.tqreplace(name, object);
}
-QGuardedPtr<QObject> Manager::object(const QString& name) const
+TQGuardedPtr<TQObject> Manager::object(const TQString& name) const
{
return d->objects[name];
}
-QMap<QString, QGuardedPtr<QObject> > Manager::objects() const
+TQMap<TQString, TQGuardedPtr<TQObject> > Manager::objects() const
{
return d->objects;
}
diff --git a/kexi/plugins/macros/lib/manager.h b/kexi/plugins/macros/lib/manager.h
index 964f9d7c..fb332f66 100644
--- a/kexi/plugins/macros/lib/manager.h
+++ b/kexi/plugins/macros/lib/manager.h
@@ -20,16 +20,16 @@
#ifndef KOMACRO_MANAGER_H
#define KOMACRO_MANAGER_H
-#include <qmap.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
#include <ksharedptr.h>
#include <kxmlguiclient.h>
#include <kstaticdeleter.h>
#include "komacro_export.h"
-class QObject;
-class QDomElement;
+class TQObject;
+class TQDomElement;
namespace KoMacro {
@@ -42,11 +42,11 @@ namespace KoMacro {
*
* Example how KoMacro could be used.
* @code
- * // We have a class that inheritates from QObject and
+ * // We have a class that inheritates from TQObject and
* // implements some public signals and slots that will
* // be accessible by Macros once a class-instance
* // got published.
- * class PublishedObject : public QObject {};
+ * class PublishedObject : public TQObject {};
*
* // Somewhere we have our KMainWindow.
* KMainWindow* mainwindow = new KMainWindow();
@@ -55,7 +55,7 @@ namespace KoMacro {
* // Macro-framework.
* KoMacro::Manager* manager = new KoMacro::Manager( mainwindow );
*
- * // Now we like to publish a QObject
+ * // Now we like to publish a TQObject
* PublishedObject* publishedobject = new PublishedObject();
* manager->publishObject(publishedobject);
*
@@ -64,7 +64,7 @@ namespace KoMacro {
*
* // Finally free the publishedobject instance we created. We
* // need to free it manualy cause PublishedObject doesn't
- * // got a QObject parent as argument.
+ * // got a TQObject tqparent as argument.
* delete publishedobject;
*
* // Finally free the manager-instance. It's always needed
@@ -116,32 +116,32 @@ namespace KoMacro {
* \return true if we carry a \a Macro with the
* defined \p macroname .
*/
- bool hasMacro(const QString& macroname);
+ bool hasMacro(const TQString& macroname);
/**
* \return the \a Macro defined with \p macroname
* or NULL if we don't have such a \a Macro.
*/
- KSharedPtr<Macro> getMacro(const QString& macroname);
+ KSharedPtr<Macro> getMacro(const TQString& macroname);
/**
* Add a new \a Macro to the list of known macros. If
* there exists already a \a Macro instance with the
* defined \p macroname then the already existing one
- * will be replace.
+ * will be tqreplace.
*
* \param macroname The name the \a Macro will be
* accessible as.
* \param macro The \a Macro instance.
*/
- void addMacro(const QString& macroname, KSharedPtr<Macro> macro);
+ void addMacro(const TQString& macroname, KSharedPtr<Macro> macro);
/**
* Remove the \a Macro defined with \p macroname . If
* we don't know about a \a Macro with that \p macroname
* nothing happens.
*/
- void removeMacro(const QString& macroname);
+ void removeMacro(const TQString& macroname);
/**
* Factory function to create a new \a Macro instances.
@@ -150,21 +150,21 @@ namespace KoMacro {
* like to attach the returned new \a Macro to this
* \a Manager instance.
*/
- KSharedPtr<Macro> createMacro(const QString& macroname);
+ KSharedPtr<Macro> createMacro(const TQString& macroname);
#if 0
/**
* Factory method to create @a Action instances from the
* defined @p element .
*
- * @param element The serialized QDomElement that should
+ * @param element The serialized TQDomElement that should
* be used to create the @a Action instance.
* @return A new @a Action instance or NULL if the
* defined @p element is not valid.
*
* @deprecated Moved to common XMLReader/XMLWriter classes. Use Macro::xmlHandler() !
*/
- KSharedPtr<Action> createAction(const QDomElement& element);
+ KSharedPtr<Action> createAction(const TQDomElement& element);
#endif
/**
@@ -172,17 +172,17 @@ namespace KoMacro {
* name @p name or returns an empty @a KSharedPtr<Action> object
* if there was no such @a Action published.
*/
- KSharedPtr<Action> action(const QString& name) const;
+ KSharedPtr<Action> action(const TQString& name) const;
/**
* @return a map of all published actions.
*/
- QMap<QString, KSharedPtr<Action> > actions() const;
+ TQMap<TQString, KSharedPtr<Action> > actions() const;
/**
* @return a list of all published actions.
*/
- QStringList actionNames() const;
+ TQStringList actionNames() const;
/**
* Publish the @a Action @p action . The published @a Action
@@ -191,21 +191,21 @@ namespace KoMacro {
void publishAction(KSharedPtr<Action> action);
/**
- * Publish the passed QObject @p object. Those object will
+ * Publish the passed TQObject @p object. Those object will
* provide it's slots as callable functions.
*/
- void publishObject(const QString& name, QObject* object);
+ void publishObject(const TQString& name, TQObject* object);
/**
- * @return the publish QObject defined with name @p name
+ * @return the publish TQObject defined with name @p name
* or NULL if there exists no such object.
*/
- QGuardedPtr<QObject> object(const QString& name) const;
+ TQGuardedPtr<TQObject> object(const TQString& name) const;
/**
- * @return a map of the published QObject instances.
+ * @return a map of the published TQObject instances.
*/
- QMap<QString, QGuardedPtr<QObject> > objects() const;
+ TQMap<TQString, TQGuardedPtr<TQObject> > objects() const;
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/metamethod.cpp b/kexi/plugins/macros/lib/metamethod.cpp
index 8aa4dc54..979202e8 100644
--- a/kexi/plugins/macros/lib/metamethod.cpp
+++ b/kexi/plugins/macros/lib/metamethod.cpp
@@ -23,12 +23,12 @@
#include "variable.h"
#include "exception.h"
-#include <qobject.h>
-#include <qmetaobject.h>
+#include <tqobject.h>
+#include <tqmetaobject.h>
-// to access the Qt3 QUObject API.
-#include <private/qucom_p.h>
-#include <private/qucomextra_p.h>
+// to access the TQt3 TQUObject API.
+#include <private/tqucom_p.h>
+#include <private/tqucomextra_p.h>
#include <kdebug.h>
@@ -47,17 +47,17 @@ namespace KoMacro {
/**
* The signature this @a MetaMethod has.
*/
- QString signature;
+ TQString signature;
/**
* The signature tagname this @a MetaMethod has.
*/
- QString signaturetag;
+ TQString signaturetag;
/**
* The signature arguments this @a MetaMethod has.
*/
- QString signaturearguments;
+ TQString signaturearguments;
/**
* Cached signature arguments parsed into a list
@@ -81,7 +81,7 @@ namespace KoMacro {
}
-MetaMethod::MetaMethod(const QString& signature, Type type, KSharedPtr<MetaObject> object)
+MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObject> object)
: KShared()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -89,39 +89,39 @@ MetaMethod::MetaMethod(const QString& signature, Type type, KSharedPtr<MetaObjec
d->object = object;
d->type = type;
- int startpos = d->signature.find("(");
- int endpos = d->signature.findRev(")");
+ int startpos = d->signature.tqfind("(");
+ int endpos = d->signature.tqfindRev(")");
if(startpos < 0 || startpos > endpos) {
- throw Exception(QString("Invalid signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("Invalid signature \"%1\"").tqarg(d->signature));
}
d->signaturetag = d->signature.left(startpos).stripWhiteSpace();
if(d->signaturetag.isEmpty()) {
- throw Exception(QString("Invalid tagname in signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("Invalid tagname in signature \"%1\"").tqarg(d->signature));
}
d->signaturearguments = d->signature.mid(startpos + 1, endpos - startpos - 1).stripWhiteSpace();
do {
- int commapos = d->signaturearguments.find(",");
- int starttemplatepos = d->signaturearguments.find("<");
+ int commapos = d->signaturearguments.tqfind(",");
+ int starttemplatepos = d->signaturearguments.tqfind("<");
if(starttemplatepos >= 0 && (commapos < 0 || starttemplatepos < commapos)) {
- int endtemplatepos = d->signaturearguments.find(">", starttemplatepos);
+ int endtemplatepos = d->signaturearguments.tqfind(">", starttemplatepos);
if(endtemplatepos <= 0) {
- throw Exception(QString("No closing template-definiton in signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("No closing template-definiton in signature \"%1\"").tqarg(d->signature));
}
- commapos = d->signaturearguments.find(",", endtemplatepos);
+ commapos = d->signaturearguments.tqfind(",", endtemplatepos);
}
if(commapos > 0) {
- QString s = d->signaturearguments.left(commapos).stripWhiteSpace();
+ TQString s = d->signaturearguments.left(commapos).stripWhiteSpace();
if(! s.isEmpty()) {
d->arguments.append( new MetaParameter(s) );
}
d->signaturearguments = d->signaturearguments.right(d->signaturearguments.length() - commapos - 1);
}
else {
- QString s = d->signaturearguments.stripWhiteSpace();
+ TQString s = d->signaturearguments.stripWhiteSpace();
if(! s.isEmpty()) {
d->arguments.append( new MetaParameter(s) );
}
@@ -140,17 +140,17 @@ KSharedPtr<MetaObject> const MetaMethod::object() const
return d->object;
}
-const QString MetaMethod::signature() const
+const TQString MetaMethod::signature() const
{
return d->signature;
}
-const QString MetaMethod::signatureTag() const
+const TQString MetaMethod::signatureTag() const
{
return d->signaturetag;
}
-const QString MetaMethod::signatureArguments() const
+const TQString MetaMethod::signatureArguments() const
{
return d->signaturearguments;
}
@@ -165,71 +165,71 @@ MetaParameter::List MetaMethod::arguments() const
return d->arguments;
}
-QUObject* MetaMethod::toQUObject(Variable::List arguments)
+TQUObject* MetaMethod::toTQUObject(Variable::List arguments)
{
uint argsize = d->arguments.size();
if(arguments.size() <= argsize) {
- throw Exception(QString("To less arguments for slot with siganture \"%1\"").arg(d->signature));
+ throw Exception(TQString("To less arguments for slot with siganture \"%1\"").tqarg(d->signature));
}
- // The first item in the QUObject-array is for the returnvalue
+ // The first item in the TQUObject-array is for the returnvalue
// while everything >=1 are the passed parameters.
- QUObject* uo = new QUObject[ argsize + 1 ];
+ TQUObject* uo = new TQUObject[ argsize + 1 ];
- uo[0] = QUObject(); // empty placeholder for the returnvalue.
+ uo[0] = TQUObject(); // empty placeholder for the returnvalue.
for(uint i = 0; i < argsize; i++) {
KSharedPtr<MetaParameter> metaargument = d->arguments[i];
KSharedPtr<Variable> variable = arguments[i + 1];
if ( !variable ) {
- throw Exception(QString("Variable is undefined !"));
+ throw Exception(TQString("Variable is undefined !"));
}
if(metaargument->type() != variable->type()) {
- throw Exception(QString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").arg(d->signature).arg(metaargument->type()).arg(variable->type()));
+ throw Exception(TQString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").tqarg(d->signature).tqarg(metaargument->type()).tqarg(variable->type()));
}
switch(metaargument->type()) {
case Variable::TypeNone: {
kdDebug() << "Variable::TypeNone" << endl;
- uo[i + 1] = QUObject();
+ uo[i + 1] = TQUObject();
} break;
case Variable::TypeVariant: {
kdDebug() << "Variable::TypeVariant" << endl;
- const QVariant variant = variable->variant();
+ const TQVariant variant = variable->variant();
switch(metaargument->variantType()) {
- case QVariant::String: {
- const QString s = variant.toString();
- static_QUType_QString.set( &(uo[i + 1]), s );
+ case TQVariant::String: {
+ const TQString s = variant.toString();
+ static_TQUType_TQString.set( &(uo[i + 1]), s );
} break;
- case QVariant::Int: {
+ case TQVariant::Int: {
const int j = variant.toInt();
- static_QUType_int.set( &(uo[i + 1]), j );
+ static_TQUType_int.set( &(uo[i + 1]), j );
} break;
- case QVariant::Bool: {
+ case TQVariant::Bool: {
const bool b = variant.toBool();
- static_QUType_bool.set( &(uo[i + 1]), b );
+ static_TQUType_bool.set( &(uo[i + 1]), b );
} break;
- case QVariant::Double: {
+ case TQVariant::Double: {
const double d = variant.toDouble();
- static_QUType_double.set( &(uo[i + 1]), d );
+ static_TQUType_double.set( &(uo[i + 1]), d );
} break;
- case QVariant::Invalid: {
- static_QUType_QVariant.set( &(uo[i + 1]), variant );
+ case TQVariant::Invalid: {
+ static_TQUType_TQVariant.set( &(uo[i + 1]), variant );
}
/*FIXME
- static_QUType_charstar
- static_QUType_ptr.get(uo); QObject *qobj = (QObject *)(ptr);
+ static_TQUType_charstar
+ static_TQUType_ptr.get(uo); TQObject *qobj = (TQObject *)(ptr);
*/
default: {
- throw Exception(QString("Invalid parameter !!!!!!!!!!!!!!!!!!!!!!!"));
+ throw Exception(TQString("Invalid parameter !!!!!!!!!!!!!!!!!!!!!!!"));
} break;
}
} break;
@@ -237,15 +237,15 @@ QUObject* MetaMethod::toQUObject(Variable::List arguments)
case Variable::TypeObject: {
kdDebug() << "Variable::TypeObject" << endl;
- const QObject* obj = arguments[i + 1]->object();
+ const TQObject* obj = arguments[i + 1]->object();
if(! obj) { //FIXME: move check to MetaParameter?!
- throw Exception(QString("No QObject !"));
+ throw Exception(TQString("No TQObject !"));
}
- static_QUType_ptr.set( &(uo[i + 1]), obj );
+ static_TQUType_ptr.set( &(uo[i + 1]), obj );
} break;
default: {
- throw Exception(QString("Invalid variable type"));
+ throw Exception(TQString("Invalid variable type"));
} break;
}
@@ -254,43 +254,43 @@ QUObject* MetaMethod::toQUObject(Variable::List arguments)
return uo;
}
-KSharedPtr<Variable> MetaMethod::toVariable(QUObject* uo)
+KSharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo)
{
- const QString desc( uo->type->desc() );
+ const TQString desc( uo->type->desc() );
if(desc == "null") {
return new Variable();
}
- if(desc == "QString") {
- const QString s = static_QUType_QString.get(uo);
+ if(desc == TQSTRING_OBJECT_NAME_STRING) {
+ const TQString s = static_TQUType_TQString.get(uo);
return new Variable(s);
}
if(desc == "int") {
- const int j = static_QUType_int.get(uo);
+ const int j = static_TQUType_int.get(uo);
return new Variable(j);
}
if(desc == "bool") {
- const bool b = static_QUType_bool.get(uo);
+ const bool b = static_TQUType_bool.get(uo);
return new Variable(b);
}
if(desc == "double") {
- const double d = static_QUType_double.get(uo);
+ const double d = static_TQUType_double.get(uo);
return new Variable(d);
}
- if(desc == "QVariant") {
- QVariant v = static_QUType_QVariant.get(uo);
+ if(desc == "TQVariant") {
+ TQVariant v = static_TQUType_TQVariant.get(uo);
return new Variable(v);
}
- throw Exception(QString("Invalid parameter '%1'").arg(desc));
+ throw Exception(TQString("Invalid parameter '%1'").tqarg(desc));
}
-Variable::List MetaMethod::toVariableList(QUObject* uo)
+Variable::List MetaMethod::toVariableList(TQUObject* uo)
{
Variable::List list;
@@ -311,12 +311,12 @@ KSharedPtr<Variable> MetaMethod::invoke(Variable::List arguments)
throw Exception("MetaObject is undefined.");
}
- QObject* obj = d->object->object();
+ TQObject* obj = d->object->object();
KSharedPtr<Variable> returnvalue;
- QUObject* qu = 0;
+ TQUObject* qu = 0;
try {
- qu = toQUObject(arguments);
+ qu = toTQUObject(arguments);
switch( d->type ) {
case Signal: {
@@ -334,7 +334,7 @@ KSharedPtr<Variable> MetaMethod::invoke(Variable::List arguments)
returnvalue = toVariable( &qu[0] );
}
catch(Exception& e) {
- delete [] qu; // free the QUObject array and
+ delete [] qu; // free the TQUObject array and
kdDebug() << "EXCEPTION in KoMacro::MetaMethod::invoke(Variable::List)" << endl;
throw Exception(e); // re-throw exception
}
diff --git a/kexi/plugins/macros/lib/metamethod.h b/kexi/plugins/macros/lib/metamethod.h
index df53ac60..daf7dfcb 100644
--- a/kexi/plugins/macros/lib/metamethod.h
+++ b/kexi/plugins/macros/lib/metamethod.h
@@ -20,13 +20,13 @@
#ifndef KOMACRO_METAMETHOD_H
#define KOMACRO_METAMETHOD_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <ksharedptr.h>
#include "komacro_export.h"
-struct QUObject;
+struct TQUObject;
namespace KoMacro {
@@ -38,10 +38,10 @@ namespace KoMacro {
/**
* Class to provide abstract methods for the undocumented
- * Qt3 QUObject-API functionality.
+ * TQt3 TQUObject-API functionality.
*
- * The design tried to limit future porting to Qt4 by providing a
- * somewhat similar API to the Qt4 QMeta* stuff.
+ * The design tried to limit future porting to TQt4 by providing a
+ * somewhat similar API to the TQt4 TQMeta* stuff.
*/
class KOMACRO_EXPORT MetaMethod : public KShared
{
@@ -52,8 +52,8 @@ namespace KoMacro {
* access to.
*/
enum Type {
- Signal, /// The @a MetaMethod points to a Qt signal.
- Slot, /// The @a MetaMethod points to a Qt slot.
+ Signal, /// The @a MetaMethod points to a TQt signal.
+ Slot, /// The @a MetaMethod points to a TQt slot.
Unknown /// The @a MetaMethod is not known.
};
@@ -62,14 +62,14 @@ namespace KoMacro {
*
* @param signature The signature this @a MetaMethod has. This
* includes the tagname and the arguments and could look like
- * "myslot(const QString&, int)".
+ * "myslot(const TQString&, int)".
* @param type The @a MetaMethod::Type the @a MethodMethod
* has.
* @param object The @a MetaObject this @a MethodMethod
* belongs to. Each @a MethodMethod is associated with
* exactly one @a MetaObject .
*/
- explicit MetaMethod(const QString& signature, Type type = Unknown, KSharedPtr<MetaObject> object = 0);
+ explicit MetaMethod(const TQString& signature, Type type = Unknown, KSharedPtr<MetaObject> object = 0);
/**
* Destructor.
@@ -84,23 +84,23 @@ namespace KoMacro {
/**
* @return the signature this @a MetaMethod has. It could
- * be something like "mySlot(const QString&,int)".
+ * be something like "mySlot(const TQString&,int)".
*/
- const QString signature() const;
+ const TQString signature() const;
/**
* @return the signatures tagname this @a MetaMethod has.
- * At the signature "mySlot(const QString&,int)" the
+ * At the signature "mySlot(const TQString&,int)" the
* tagname would be "mySlot".
*/
- const QString signatureTag() const;
+ const TQString signatureTag() const;
/**
* @return the signatures arguments this @a MetaMethod has.
- * At the signature "mySlot(const QString&,int)" the
- * arguments are "const QString&,int".
+ * At the signature "mySlot(const TQString&,int)" the
+ * arguments are "const TQString&,int".
*/
- const QString signatureArguments() const;
+ const TQString signatureArguments() const;
/**
* @return the @a Type of method this @a MetaMethod provides
@@ -112,31 +112,31 @@ namespace KoMacro {
* @return the signature arguments as parsed list of
* @a MetaParameter instances.
*/
- QValueList< KSharedPtr<MetaParameter> > arguments() const;
+ TQValueList< KSharedPtr<MetaParameter> > arguments() const;
/**
* Translate the passed @p arguments list of @a Variable instances
- * into a Qt3 QUObject* array.
+ * into a TQt3 TQUObject* array.
*/
- QUObject* toQUObject(QValueList< KSharedPtr<Variable> > arguments);
+ TQUObject* toTQUObject(TQValueList< KSharedPtr<Variable> > arguments);
/**
- * Translate the passed @p uo QUObject reference into an internal used
+ * Translate the passed @p uo TQUObject reference into an internal used
* @a Variable instances.
*/
- KSharedPtr<Variable> toVariable(QUObject* uo);
+ KSharedPtr<Variable> toVariable(TQUObject* uo);
/**
- * Translate the passed @p uo QUObject array into an internal used
+ * Translate the passed @p uo TQUObject array into an internal used
* list of @a Variable instances.
*/
- QValueList< KSharedPtr<Variable> > toVariableList(QUObject* uo);
+ TQValueList< KSharedPtr<Variable> > toVariableList(TQUObject* uo);
/**
* Invoke the @a MetaMethod with the optional arguments
* @p arguments and return a variable.
*/
- KSharedPtr<Variable> invoke(QValueList< KSharedPtr<Variable> > arguments);
+ KSharedPtr<Variable> invoke(TQValueList< KSharedPtr<Variable> > arguments);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp
index 000f4181..e9e56b44 100644
--- a/kexi/plugins/macros/lib/metaobject.cpp
+++ b/kexi/plugins/macros/lib/metaobject.cpp
@@ -22,8 +22,8 @@
#include "variable.h"
#include "exception.h"
-#include <qguardedptr.h>
-#include <qmetaobject.h>
+#include <tqguardedptr.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
@@ -40,14 +40,14 @@ namespace KoMacro {
public:
/**
- * The QObject instance this @a MetaObject belongs to.
+ * The TQObject instance this @a MetaObject belongs to.
*/
- QGuardedPtr<QObject> const object;
+ TQGuardedPtr<TQObject> const object;
/**
* Constructor.
*/
- Private(QObject* const object)
+ Private(TQObject* const object)
: object(object)
{
}
@@ -55,7 +55,7 @@ namespace KoMacro {
}
-MetaObject::MetaObject(QObject* const object)
+MetaObject::MetaObject(TQObject* const object)
: KShared()
, d( new Private(object) ) // create the private d-pointer instance.
{
@@ -66,66 +66,66 @@ MetaObject::~MetaObject()
delete d;
}
-QObject* const MetaObject::object() const
+TQObject* const MetaObject::object() const
{
if(! d->object) {
- throw Exception(QString("Object is undefined."));
+ throw Exception(TQString("Object is undefined."));
}
return d->object;
}
/*
-QStrList MetaObject::signalNames() const
+TQStrList MetaObject::signalNames() const
{
- return object()->metaObject()->signalNames();
+ return object()->tqmetaObject()->signalNames();
}
-QStrList MetaObject::slotNames() const
+TQStrList MetaObject::slotNames() const
{
- return object()->metaObject()->slotNames();
+ return object()->tqmetaObject()->slotNames();
}
*/
int MetaObject::indexOfSignal(const char* signal) const
{
- QMetaObject* metaobject = object()->metaObject();
+ TQMetaObject* metaobject = object()->tqmetaObject();
int signalid = metaobject->findSignal(signal, false);
if(signalid < 0) {
- throw Exception(QString("Invalid signal \"%1\"").arg(signal));
+ throw Exception(TQString("Invalid signal \"%1\"").tqarg(signal));
}
return signalid;
}
int MetaObject::indexOfSlot(const char* slot) const
{
- QMetaObject* metaobject = object()->metaObject();
+ TQMetaObject* metaobject = object()->tqmetaObject();
int slotid = metaobject->findSlot(slot, false);
if(slotid < 0) {
- throw Exception(QString("Invalid slot \"%1\"").arg(slot));
+ throw Exception(TQString("Invalid slot \"%1\"").tqarg(slot));
}
return slotid;
}
KSharedPtr<MetaMethod> MetaObject::method(int index)
{
- QObject* obj = object();
+ TQObject* obj = object();
MetaMethod::Type type = MetaMethod::Slot;
- QMetaObject* metaobject = obj->metaObject();
+ TQMetaObject* metaobject = obj->tqmetaObject();
- const QMetaData* metadata = metaobject->slot(index, true);
+ const TQMetaData* metadata = metaobject->slot(index, true);
if(! metadata) {
// Try to get a signal with that index iff we failed to determinate
// a matching slot.
metadata = metaobject->signal(index, true);
if(! metadata) {
- throw Exception(QString("Invalid method index \"%1\" in object \"%2\"").arg(index).arg(obj->name()));
+ throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").tqarg(index).tqarg(obj->name()));
}
type = MetaMethod::Signal;
}
- if(metadata->access != QMetaData::Public) {
- throw Exception(QString("Not allowed to access method \"%1\" in object \"%2\"").arg(metadata->name).arg(obj->name()));
+ if(metadata->access != TQMetaData::Public) {
+ throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").tqarg(metadata->name).tqarg(obj->name()));
}
return new MetaMethod(metadata->name, type, this);
diff --git a/kexi/plugins/macros/lib/metaobject.h b/kexi/plugins/macros/lib/metaobject.h
index 8b611574..a1a52562 100644
--- a/kexi/plugins/macros/lib/metaobject.h
+++ b/kexi/plugins/macros/lib/metaobject.h
@@ -20,7 +20,7 @@
#ifndef KOMACRO_METAOBJECT_H
#define KOMACRO_METAOBJECT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "komacro_export.h"
@@ -32,11 +32,11 @@ namespace KoMacro {
class MetaMethod;
/**
- * Class to provide abstract access to extended QObject functionality
- * like the undocumented QUObject-API in Qt3.
+ * Class to provide abstract access to extended TQObject functionality
+ * like the undocumented TQUObject-API in TQt3.
*
- * The design tried to limit future porting to Qt4 by providing a
- * somewhat similar API to the Qt4 QMeta* stuff.
+ * The design tried to limit future porting to TQt4 by providing a
+ * somewhat similar API to the TQt4 TQMeta* stuff.
*/
class KOMACRO_EXPORT MetaObject : public KShared
{
@@ -45,10 +45,10 @@ namespace KoMacro {
/**
* Constructor.
*
- * @param object The QObject instance this @a MetaObject provides
+ * @param object The TQObject instance this @a MetaObject provides
* abstract access to.
*/
- explicit MetaObject(QObject* const object);
+ explicit MetaObject(TQObject* const object);
/**
* Destructor.
@@ -56,13 +56,13 @@ namespace KoMacro {
~MetaObject();
/**
- * @return the QObject this @a MetaObject provides abstract
+ * @return the TQObject this @a MetaObject provides abstract
* access to.
*/
- QObject* const object() const;
+ TQObject* const object() const;
- //QStrList signalNames() const;
- //QStrList slotNames() const;
+ //TQStrList signalNames() const;
+ //TQStrList slotNames() const;
/**
* @return the index of the signal @p signal .
@@ -91,7 +91,7 @@ namespace KoMacro {
KSharedPtr<MetaMethod> slot(const char* slot);
//KSharedPtr<MetaMethod> addSlot(const char* slot);
-//void connectSignal(QObject* obj, const char* signal);
+//void connectSignal(TQObject* obj, const char* signal);
/**
* Invoke the @a MetaMethod that has the index @p index .
@@ -104,7 +104,7 @@ namespace KoMacro {
* @return The returnvalue the method provides and that got
* returned if the execution is done.
*/
- KSharedPtr<Variable> invokeMethod(int index, QValueList< KSharedPtr<Variable> > arguments);
+ KSharedPtr<Variable> invokeMethod(int index, TQValueList< KSharedPtr<Variable> > arguments);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/metaparameter.cpp b/kexi/plugins/macros/lib/metaparameter.cpp
index 7f072b2b..ed921cfe 100644
--- a/kexi/plugins/macros/lib/metaparameter.cpp
+++ b/kexi/plugins/macros/lib/metaparameter.cpp
@@ -37,10 +37,10 @@ namespace KoMacro {
/**
* The signatures argument that represents this MetaParameter.
- * This could be something like "const QString&", "int" or
- * "QMap &lt; QString, QVariant &gt; ".
+ * This could be something like "const TQString&", "int" or
+ * "TQMap &lt; TQString, TQVariant &gt; ".
*/
- QString signatureargument;
+ TQString signatureargument;
/**
* The type of the @a Variable .
@@ -48,16 +48,16 @@ namespace KoMacro {
MetaParameter::Type type;
/**
- * If the @a MetaParameter::Type is a Variant this QVariant::Type
+ * If the @a MetaParameter::Type is a Variant this TQVariant::Type
* is used to defined what kind of Variant it is.
*/
- QVariant::Type varianttype;
+ TQVariant::Type varianttype;
};
}
-MetaParameter::MetaParameter(const QString& signatureargument)
+MetaParameter::MetaParameter(const TQString& signatureargument)
: KShared()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -78,7 +78,7 @@ MetaParameter::Type MetaParameter::type() const
return d->type;
}
-const QString MetaParameter::typeName() const
+const TQString MetaParameter::typeName() const
{
switch( d->type ) {
case TypeNone:
@@ -88,31 +88,31 @@ const QString MetaParameter::typeName() const
case TypeObject:
return "Object";
}
- return QString::null;
+ return TQString();
}
void MetaParameter::setType(MetaParameter::Type type)
{
d->type = type;
- d->varianttype = QVariant::Invalid;
+ d->varianttype = TQVariant::Invalid;
}
-QVariant::Type MetaParameter::variantType() const
+TQVariant::Type MetaParameter::variantType() const
{
return d->varianttype;
}
-void MetaParameter::setVariantType(QVariant::Type varianttype)
+void MetaParameter::setVariantType(TQVariant::Type varianttype)
{
d->type = TypeVariant;
d->varianttype = varianttype;
}
-void MetaParameter::setSignatureArgument(const QString& signatureargument)
+void MetaParameter::setSignatureArgument(const TQString& signatureargument)
{
d->signatureargument = signatureargument;
- QString argument = signatureargument;
+ TQString argument = signatureargument;
if(argument.startsWith("const")) {
argument = argument.mid(5).stripWhiteSpace();
}
@@ -122,14 +122,14 @@ void MetaParameter::setSignatureArgument(const QString& signatureargument)
}
if(argument.isEmpty()) {
- throw Exception(QString("Empty signature argument passed."));
+ throw Exception(TQString("Empty signature argument passed."));
}
- if(argument == "QVariant") {
- setVariantType( QVariant::Invalid );
+ if(argument == "TQVariant") {
+ setVariantType( TQVariant::Invalid );
}
- QVariant::Type type = argument.isNull() ? QVariant::Invalid : QVariant::nameToType(argument.latin1());
- if (type != QVariant::Invalid) {
+ TQVariant::Type type = argument.isNull() ? TQVariant::Invalid : TQVariant::nameToType(argument.latin1());
+ if (type != TQVariant::Invalid) {
setVariantType( type );
}
else {
diff --git a/kexi/plugins/macros/lib/metaparameter.h b/kexi/plugins/macros/lib/metaparameter.h
index ab2a4004..fa9df552 100644
--- a/kexi/plugins/macros/lib/metaparameter.h
+++ b/kexi/plugins/macros/lib/metaparameter.h
@@ -20,9 +20,9 @@
#ifndef KOMACRO_METAPARAMETER_H
#define KOMACRO_METAPARAMETER_H
-#include <qstring.h>
-#include <qvariant.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqvariant.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "komacro_export.h"
@@ -34,10 +34,10 @@ namespace KoMacro {
/**
* Class to provide abstract methods for the undocumented
- * Qt3 QUObject-API functionality.
+ * TQt3 TQUObject-API functionality.
*
- * The design tried to limit future porting to Qt4 by providing a
- * somewhat similar API to the Qt4 QMeta* stuff.
+ * The design tried to limit future porting to TQt4 by providing a
+ * somewhat similar API to the TQt4 TQMeta* stuff.
*/
class KOMACRO_EXPORT MetaParameter : public KShared
{
@@ -45,29 +45,29 @@ namespace KoMacro {
/**
* Property to get the type of the variable.
*/
- Q_PROPERTY(Type type READ type)
+ TQ_PROPERTY(Type type READ type)
/**
* Property to get the type of the variable as string.
*/
- Q_PROPERTY(QString typeName READ typeName)
+ TQ_PROPERTY(TQString typeName READ typeName)
public:
/**
* List of @a MetaParameter instances.
*/
- typedef QValueList<KSharedPtr <MetaParameter > > List;
+ typedef TQValueList<KSharedPtr <MetaParameter > > List;
/**
* Constructor.
*
* @param signatureargument The signatures argument
* that will be used to determinate the arguments
- * type. This could be something like "const QString&",
- * "int" or "QMap &lt; QString, QVariant &gt; ".
+ * type. This could be something like "const TQString&",
+ * "int" or "TQMap &lt; TQString, TQVariant &gt; ".
*/
- explicit MetaParameter(const QString& signatureargument = QString::null);
+ explicit MetaParameter(const TQString& signatureargument = TQString());
/**
* Destructor.
@@ -79,8 +79,8 @@ namespace KoMacro {
*/
enum Type {
TypeNone = 0, /// None type, the @a MetaParameter is empty.
- TypeVariant, /// The @a MetaParameter is a QVariant.
- TypeObject /// The @a MetaParameter is a QObject.
+ TypeVariant, /// The @a MetaParameter is a TQVariant.
+ TypeObject /// The @a MetaParameter is a TQObject.
};
/**
@@ -92,7 +92,7 @@ namespace KoMacro {
* @return the @a MetaParameter::Type as string. The typename
* could be "None", "Variant" or "Object".
*/
- const QString typeName() const;
+ const TQString typeName() const;
/**
* Set the @a MetaParameter::Type this variable is.
@@ -102,12 +102,12 @@ namespace KoMacro {
/**
* @return the @a MetaParameter::Type this variable is.
*/
- QVariant::Type variantType() const;
+ TQVariant::Type variantType() const;
/**
* Set the @a MetaParameter::Type this variable is.
*/
- void setVariantType(QVariant::Type varianttype);
+ void setVariantType(TQVariant::Type varianttype);
/**
* @return true if the passed @a Variable @p variable is
@@ -122,7 +122,7 @@ namespace KoMacro {
* @internal used method to set the signature argument. Those
* argument will be used to determinate the arguments type.
*/
- void setSignatureArgument(const QString& signatureargument);
+ void setSignatureArgument(const TQString& signatureargument);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/variable.cpp b/kexi/plugins/macros/lib/variable.cpp
index 598b8b46..f64613b0 100644
--- a/kexi/plugins/macros/lib/variable.cpp
+++ b/kexi/plugins/macros/lib/variable.cpp
@@ -37,31 +37,31 @@ namespace KoMacro {
/**
* The name this @a Variable has.
*/
- QString name;
+ TQString name;
/**
* The i18n-caption used for display purposes only
* this @a Variable has.
*/
- QString text;
+ TQString text;
/**
- * If @a Variable::Type is @a Variable::TypeVariant this QVariant
+ * If @a Variable::Type is @a Variable::TypeVariant this TQVariant
* holds the value else it's invalid.
*/
- QVariant variant;
+ TQVariant variant;
/**
- * If @a Variable::Type is @a Variable::TypeObject this QObject is
+ * If @a Variable::Type is @a Variable::TypeObject this TQObject is
* the value else it's NULL.
*/
- const QObject* object;
+ const TQObject* object;
/**
- * Optional list of children this @a Variable has.
+ * Optional list of tqchildren this @a Variable has.
*/
// TODO Dow we use this or is it for the future??
- Variable::List children;
+ Variable::List tqchildren;
/**
* Defines if the variable is enabled or disabled.
@@ -84,7 +84,7 @@ Variable::Variable()
d->object = 0;
}
-Variable::Variable(const QVariant& variant, const QString& name, const QString& text)
+Variable::Variable(const TQVariant& variant, const TQString& name, const TQString& text)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -95,7 +95,7 @@ Variable::Variable(const QVariant& variant, const QString& name, const QString&
d->text = text;
}
-Variable::Variable(const QObject* object)
+Variable::Variable(const TQObject* object)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -103,28 +103,28 @@ Variable::Variable(const QObject* object)
d->object = object;
}
-Variable::Variable(const QDomElement& element)
+Variable::Variable(const TQDomElement& element)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
- QString typesignature = element.attribute("type", "const QString&");
- QString value = element.text();
+ TQString typesignature = element.attribute("type", "const TQString&");
+ TQString value = element.text();
setSignatureArgument( typesignature );
switch( type() ) {
case KoMacro::MetaParameter::TypeVariant: {
- //kdDebug() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeVariant") << endl;
+ //kdDebug() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeVariant") << endl;
// Set the variant without overwritting the previously detected varianttype.
- setVariant( QVariant(value), false );
+ setVariant( TQVariant(value), false );
} break;
case KoMacro::MetaParameter::TypeObject: {
- //kdDebug() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeObject") << endl;
+ //kdDebug() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeObject") << endl;
//TODO setObject();
} break;
default: {
- kdWarning() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeNone") << endl;
+ kdWarning() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeNone") << endl;
} break;
}
}
@@ -134,35 +134,35 @@ Variable::~Variable()
delete d;
}
-QString Variable::name() const
+TQString Variable::name() const
{
return d->name;
}
-void Variable::setName(const QString& name)
+void Variable::setName(const TQString& name)
{
d->name = name;
}
-QString Variable::text() const
+TQString Variable::text() const
{
return d->text;
}
-void Variable::setText(const QString& text)
+void Variable::setText(const TQString& text)
{
d->text = text;
}
-const QVariant Variable::variant() const
+const TQVariant Variable::variant() const
{
//Q_ASSERT( type() == MetaParameter::TypeVariant );
- //Q_ASSERT( variantType() != QVariant::Invalid );
- //if(variantType() == QVariant::Invalid) return QVariant();
+ //Q_ASSERT( variantType() != TQVariant::Invalid );
+ //if(variantType() == TQVariant::Invalid) return TQVariant();
return d->variant;
}
-void Variable::setVariant(const QVariant& variant, bool detecttype)
+void Variable::setVariant(const TQVariant& variant, bool detecttype)
{
if(detecttype) {
setVariantType( variant.type() );
@@ -170,42 +170,42 @@ void Variable::setVariant(const QVariant& variant, bool detecttype)
d->variant = variant;
}
-const QObject* Variable::object() const
+const TQObject* Variable::object() const
{
Q_ASSERT( ! d->object );
return d->object;
}
-void Variable::setObject(const QObject* object)
+void Variable::setObject(const TQObject* object)
{
setType(TypeObject);
d->object = object;
}
-Variable::operator QVariant () const
+Variable::operator TQVariant () const
{
return variant();
}
-Variable::operator const QObject* () const
+Variable::operator const TQObject* () const
{
return object();
}
-const QString Variable::toString() const
+const TQString Variable::toString() const
{
switch( type() ) {
case KoMacro::MetaParameter::TypeVariant: {
return variant().toString();
} break;
case KoMacro::MetaParameter::TypeObject: {
- return QString("[%1]").arg( object()->name() );
+ return TQString("[%1]").tqarg( object()->name() );
} break;
default: {
throw Exception("Type is undefined.");
} break;
}
- return QString::null;
+ return TQString();
}
int Variable::toInt() const
@@ -213,24 +213,24 @@ int Variable::toInt() const
return variant().toInt();
}
-Variable::List Variable::children() const
+Variable::List Variable::tqchildren() const
{
- return d->children;
+ return d->tqchildren;
}
void Variable::appendChild(KSharedPtr<Variable> variable)
{
- d->children.append(variable);
+ d->tqchildren.append(variable);
}
void Variable::clearChildren()
{
- d->children.clear();
+ d->tqchildren.clear();
}
-void Variable::setChildren(const Variable::List& children)
+void Variable::setChildren(const Variable::List& tqchildren)
{
- d->children = children;
+ d->tqchildren = tqchildren;
}
/*
diff --git a/kexi/plugins/macros/lib/variable.h b/kexi/plugins/macros/lib/variable.h
index 26e9619e..108a6005 100644
--- a/kexi/plugins/macros/lib/variable.h
+++ b/kexi/plugins/macros/lib/variable.h
@@ -20,9 +20,9 @@
#ifndef KOMACRO_VARIABLE_H
#define KOMACRO_VARIABLE_H
-#include <qobject.h>
-#include <qdom.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqdom.h>
+#include <tqvariant.h>
#include <ksharedptr.h>
#include "metaparameter.h"
@@ -31,7 +31,7 @@ namespace KoMacro {
/**
* A variable value used to provide abstract access to variables. The
- * class handles QVariant and QObject and provides access to them.
+ * class handles TQVariant and TQObject and provides access to them.
* Variable inherits KShared and implements reference couting. So, it's
* not needed to take care of memory-managment.
*/
@@ -39,31 +39,31 @@ namespace KoMacro {
{
/**
- * Property to get and set a QVariant as variable.
+ * Property to get and set a TQVariant as variable.
*/
- Q_PROPERTY(QVariant variant READ variant WRITE setVariant)
+ TQ_PROPERTY(TQVariant variant READ variant WRITE setVariant)
/**
- * Property to get and set a QObject as variable.
+ * Property to get and set a TQObject as variable.
*/
- Q_PROPERTY(QObject* object READ object WRITE setObject)
+ TQ_PROPERTY(TQObject* object READ object WRITE setObject)
/**
* Property to get a string-representation of the variable.
*/
- Q_PROPERTY(QString string READ toString)
+ TQ_PROPERTY(TQString string READ toString)
public:
/**
* A list of variables.
*/
- typedef QValueList<KSharedPtr<Variable > > List;
+ typedef TQValueList<KSharedPtr<Variable > > List;
/**
* A map of variables.
*/
- typedef QMap<QString, KSharedPtr<Variable > > Map;
+ typedef TQMap<TQString, KSharedPtr<Variable > > Map;
/**
* Default constructor.
@@ -71,28 +71,28 @@ namespace KoMacro {
explicit Variable();
/**
- * Constructor from the QVariant @p variant .
+ * Constructor from the TQVariant @p variant .
*
* @param variant The value this variable has.
* @param name The unique @a name() this variable has.
* @param text The describing @a text() this variable has.
*/
- Variable(const QVariant& variant, const QString& name = QString::null, const QString& text = QString::null);
+ Variable(const TQVariant& variant, const TQString& name = TQString(), const TQString& text = TQString());
/**
- * Constructor from the QObject @p object .
+ * Constructor from the TQObject @p object .
*
* @param object The value this variable has.
*/
- Variable(const QObject* object);
+ Variable(const TQObject* object);
/**
- * Constructor from the QDomElement @p element .
+ * Constructor from the TQDomElement @p element .
* @deprecated replaced with methods of @a XMLHandler.
- * @param element The QDomElement that may optional contains the
+ * @param element The TQDomElement that may optional contains the
* variable content or other additional informations.
*/
- Variable(const QDomElement& element);
+ Variable(const TQDomElement& element);
/**
* Destructor.
@@ -102,69 +102,69 @@ namespace KoMacro {
/**
* @return the name this @a Variable has.
*/
- QString name() const;
+ TQString name() const;
/**
* Set the name @param name this @a Variable has.
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* @return the caption this @a Variable has.
*/
- QString text() const;
+ TQString text() const;
/**
* Set the caption @param text this @a Variable has.
*/
- void setText(const QString& text);
+ void setText(const TQString& text);
/**
- * Set the QObject @param object this variable has. A
+ * Set the TQObject @param object this variable has. A
* previously remembered value will be overwritten and
* the new type is a @a TypeObject .
*/
- void setObject(const QObject* object);
+ void setObject(const TQObject* object);
/**
- * @return the QVariant this variable has. If this
- * variable isn't a @a TypeVariant an invalid QVariant
+ * @return the TQVariant this variable has. If this
+ * variable isn't a @a TypeVariant an invalid TQVariant
* got returned.
*/
- const QVariant variant() const;
+ const TQVariant variant() const;
/**
- * Set the QVariant @param variant this variable has. A
+ * Set the TQVariant @param variant this variable has. A
* previously remembered value will be overwritten and
* the new type is a @a TypeVariant . If @param detecttype is
* true the method tries to set the @a variantType according
- * to the passed QVariant. If false the variantType won't
+ * to the passed TQVariant. If false the variantType won't
* be changed.
*/
- void setVariant(const QVariant& variant, bool detecttype = true);
+ void setVariant(const TQVariant& variant, bool detecttype = true);
/**
- * @return the QObject this variable has. If this
+ * @return the TQObject this variable has. If this
* variable isn't a @a TypeObject NULL got returned.
*/
- const QObject* object() const;
+ const TQObject* object() const;
/**
- * Implicit conversion to QVariant operator. This method
+ * Implicit conversion to TQVariant operator. This method
* calls @a variant() internaly.
*/
- operator QVariant () const;
+ operator TQVariant () const;
/**
- * Implicit conversion to QObject operator. This method
+ * Implicit conversion to TQObject operator. This method
* calls @a object() internaly.
*/
- operator const QObject* () const;
+ operator const TQObject* () const;
/**
* @return a string-represenation of the variable.
*/
- const QString toString() const;
+ const TQString toString() const;
/**
* @return a integer-represenation of the variable.
@@ -173,29 +173,29 @@ namespace KoMacro {
/**
* @return the optional list of @a Variable instances
- * that are children of this @a Variable .
+ * that are tqchildren of this @a Variable .
*
* @note that the list is returned call-by-reference. The
* list is accessed as getter/setter (read/write). So,
* don't set this method to const!
*/
- List children() const;
+ List tqchildren() const;
/**
- * Append a @a Variable to the list of children this
+ * Append a @a Variable to the list of tqchildren this
* @a Variable has.
*/
void appendChild(KSharedPtr<Variable> variable);
/**
- * Clear the list of children this @a Variable has.
+ * Clear the list of tqchildren this @a Variable has.
*/
void clearChildren();
/**
- * Set the children this @a Variable has.
+ * Set the tqchildren this @a Variable has.
*/
- void setChildren(const List& children);
+ void setChildren(const List& tqchildren);
#if 0
/**
diff --git a/kexi/plugins/macros/lib/xmlhandler.cpp b/kexi/plugins/macros/lib/xmlhandler.cpp
index b35759e1..4894c619 100644
--- a/kexi/plugins/macros/lib/xmlhandler.cpp
+++ b/kexi/plugins/macros/lib/xmlhandler.cpp
@@ -22,7 +22,7 @@
#include "macroitem.h"
#include "action.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
using namespace KoMacro;
@@ -67,7 +67,7 @@ XMLHandler::~XMLHandler()
delete d;
}
-bool XMLHandler::parseXML(const QDomElement& element)
+bool XMLHandler::parseXML(const TQDomElement& element)
{
// Remove old items. We should clear first.
d->macro->clearItems();
@@ -75,7 +75,7 @@ bool XMLHandler::parseXML(const QDomElement& element)
// We expect a <macro> element. Do we really need to be such strict or
// would it be more wise to trust the application in that case?
if(element.tagName() != "macro") {
- kdDebug() << QString("XMLHandler::parseXML() Invalid tagname \"%1\"").arg(element.tagName()) << endl;
+ kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").tqarg(element.tagName()) << endl;
return false;
}
@@ -83,20 +83,20 @@ bool XMLHandler::parseXML(const QDomElement& element)
// If there is more than one version, parsing should update old macro-data, so that it
// could write out in the newer version in toXML().
if( element.attribute("xmlversion") != "1"){
- kdDebug() << QString("XMLHandler::parseXML() Invalid xml-version \"%1\"").arg(element.attribute("xmlversion")) << endl;
+ kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").tqarg(element.attribute("xmlversion")) << endl;
return false;
}
// Do we need to load the macro's name?
// d->macro->setName(element.attribute("name"));
- // Iterate through the child nodes the passed QDomElement has and
+ // Iterate through the child nodes the passed TQDomElement has and
// build the MacroItem elements.
- for(QDomNode itemnode = element.firstChild(); ! itemnode.isNull(); itemnode = itemnode.nextSibling()) {
+ for(TQDomNode itemnode = element.firstChild(); ! itemnode.isNull(); itemnode = itemnode.nextSibling()) {
// The tagname should be "item"
if(itemnode.nodeName() == "item") {
// The node is an element.
- const QDomElement itemelem = itemnode.toElement();
+ const TQDomElement itemelem = itemnode.toElement();
// Create a new MacroItem
KSharedPtr<MacroItem> item = new MacroItem();
@@ -115,18 +115,18 @@ bool XMLHandler::parseXML(const QDomElement& element)
// Set the comment
item->setComment( itemelem.attribute("comment") );
- // Iterate through the children this item has and try
+ // Iterate through the tqchildren this item has and try
// to fill the list of variables our new MacroItem has.
- for(QDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) {
+ for(TQDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) {
// The tagname should be "variable"
if(childnode.nodeName() == "variable") {
// The node is an element.
- const QDomElement childelem = childnode.toElement();
+ const TQDomElement childelem = childnode.toElement();
// The name the variable has.
- const QString name = childelem.attribute("name");
+ const TQString name = childelem.attribute("name");
// The value the variable has.
- const QString value = childelem.text();
+ const TQString value = childelem.text();
// Store the new variable in our macroitem.
item->addVariable(name, value);
@@ -139,13 +139,13 @@ bool XMLHandler::parseXML(const QDomElement& element)
return true;
}
-QDomElement XMLHandler::toXML()
+TQDomElement XMLHandler::toXML()
{
- // The QDomDocument provides us the functionality to create new QDomElement instances.
- QDomDocument document;
+ // The TQDomDocument provides us the functionality to create new TQDomElement instances.
+ TQDomDocument document;
- // Create the Macro-QDomElement. This element will be returned.
- QDomElement macroelem = document.createElement("macro");
+ // Create the Macro-TQDomElement. This element will be returned.
+ TQDomElement macroelem = document.createElement("macro");
// Set the Macro-XML-Version, it should be the newest Version.
macroelem.setAttribute("xmlversion","1");
@@ -156,12 +156,12 @@ QDomElement XMLHandler::toXML()
// redundancy at this point.
//macroelem.setAttribute("name",d->macro->name());
- // The list of MacroItem-children a Macro provides.
- QValueList<KSharedPtr<MacroItem > > items = d->macro->items();
+ // The list of MacroItem-tqchildren a Macro provides.
+ TQValueList<KSharedPtr<MacroItem > > items = d->macro->items();
// Create an iterator...
- QValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd());
- // ...and iterate over the list of children the Macro provides.
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd());
+ // ...and iterate over the list of tqchildren the Macro provides.
for(;it != end; ++it) {
// We are iterating over MacroItem instances.
KSharedPtr<MacroItem> item = *it;
@@ -171,7 +171,7 @@ QDomElement XMLHandler::toXML()
bool append = false;
// Each MacroItem will have an own node.
- QDomElement itemelem = document.createElement("item");
+ TQDomElement itemelem = document.createElement("item");
// Each MacroItem could point to an Action provided by the Manager.
const KSharedPtr<Action> action = item->action();
@@ -184,9 +184,9 @@ QDomElement XMLHandler::toXML()
// Each MacroItem could have a list of variables. We
// iterate through that list and build a element
// for each single variable.
- QMap<QString, KSharedPtr<Variable > > varmap = item->variables();
+ TQMap<TQString, KSharedPtr<Variable > > varmap = item->variables();
- for(QMap<QString, KSharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) {
+ for(TQMap<TQString, KSharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) {
const KSharedPtr<Variable> v = vit.data();
if(! v.data()) {
// skip if the variable is NULL.
@@ -194,7 +194,7 @@ QDomElement XMLHandler::toXML()
}
// Create an own element for the variable. The tagname will be
// the name of the variable.
- QDomElement varelement = document.createElement("variable");
+ TQDomElement varelement = document.createElement("variable");
// Remember the name the value has.
varelement.setAttribute("name", vit.key());
@@ -208,7 +208,7 @@ QDomElement XMLHandler::toXML()
}
// Each MacroItem could have an optional comment.
- const QString comment = item->comment();
+ const TQString comment = item->comment();
if(! comment.isEmpty()) {
append = true;
itemelem.setAttribute("comment", item->comment());
diff --git a/kexi/plugins/macros/lib/xmlhandler.h b/kexi/plugins/macros/lib/xmlhandler.h
index b6978d0f..c6ee0c26 100644
--- a/kexi/plugins/macros/lib/xmlhandler.h
+++ b/kexi/plugins/macros/lib/xmlhandler.h
@@ -22,8 +22,8 @@
#include "komacro_export.h"
-class QObject;
-class QDomElement;
+class TQObject;
+class TQDomElement;
namespace KoMacro {
@@ -51,20 +51,20 @@ namespace KoMacro {
~XMLHandler();
/**
- * Reads a given @a QDomElement, extracts given
+ * Reads a given @a TQDomElement, extracts given
* Actions into the managed Macro-Instance.
- * @param element The @a QDomElement within
+ * @param element The @a TQDomElement within
* the @a Macro.
* @return Return true when parsing is successfull.
*/
- bool parseXML(const QDomElement& element);
+ bool parseXML(const TQDomElement& element);
/**
- * Converts the macro to a @a QDomElement.
- * @return The resulten @a QDomElement from
+ * Converts the macro to a @a TQDomElement.
+ * @return The resulten @a TQDomElement from
* the @a Macro.
*/
- QDomElement toXML();
+ TQDomElement toXML();
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/tests/actiontests.cpp b/kexi/plugins/macros/tests/actiontests.cpp
index 0150ecfd..65bebe66 100644
--- a/kexi/plugins/macros/tests/actiontests.cpp
+++ b/kexi/plugins/macros/tests/actiontests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -66,16 +66,16 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
- QValueList< KSharedPtr<KoMacro::MacroItem> > items;
+ TQValueList< KSharedPtr<KoMacro::MacroItem> > items;
KSharedPtr<KoMacro::Action> actionptr;
@@ -90,7 +90,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
ActionTests::ActionTests()
@@ -117,9 +117,9 @@ void ActionTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -147,7 +147,7 @@ void ActionTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- //QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ //TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( d->items.count(), sizetype(0) );
@@ -169,14 +169,14 @@ void ActionTests::testText()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
- const QString leetSpeech = "']['3 $']['";
+ const TQString leetSpeech = "']['3 $']['";
//check i18n text
- KOMACROTEST_ASSERT(d->actionptr->text(),QString("Test"));
+ KOMACROTEST_ASSERT(d->actionptr->text(),TQString("Test"));
//change it
d->actionptr->setText(leetSpeech);
//retest it
- KOMACROTEST_ASSERT(d->actionptr->text(),QString(leetSpeech));
+ KOMACROTEST_ASSERT(d->actionptr->text(),TQString(leetSpeech));
}
@@ -187,11 +187,11 @@ void ActionTests::testName()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//check name
- KOMACROTEST_ASSERT(d->actionptr->name(),QString("testaction"));
+ KOMACROTEST_ASSERT(d->actionptr->name(),TQString("testaction"));
//change it
d->actionptr->setName("ActionJackson");
//retest it
- KOMACROTEST_ASSERT(d->actionptr->name(),QString("ActionJackson"));
+ KOMACROTEST_ASSERT(d->actionptr->name(),TQString("ActionJackson"));
}
void ActionTests::testComment()
@@ -201,11 +201,11 @@ void ActionTests::testComment()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//check comment
- KOMACROTEST_XASSERT(d->actionptr->comment(),QString("No Comment!"));
+ KOMACROTEST_XASSERT(d->actionptr->comment(),TQString("No Comment!"));
//set comment
d->actionptr->setComment("Stringtest");
//check comment again
- KOMACROTEST_ASSERT(d->actionptr->comment(),QString("Stringtest"));
+ KOMACROTEST_ASSERT(d->actionptr->comment(),TQString("Stringtest"));
}
#include "actiontests.moc"
diff --git a/kexi/plugins/macros/tests/actiontests.h b/kexi/plugins/macros/tests/actiontests.h
index 48b5a252..07cf8958 100644
--- a/kexi/plugins/macros/tests/actiontests.h
+++ b/kexi/plugins/macros/tests/actiontests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class ActionTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/commontests.cpp b/kexi/plugins/macros/tests/commontests.cpp
index 84c596aa..1086a340 100644
--- a/kexi/plugins/macros/tests/commontests.cpp
+++ b/kexi/plugins/macros/tests/commontests.cpp
@@ -36,8 +36,8 @@
#include <ostream>
#include <climits>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -71,14 +71,14 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestObject* testobject;
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
/**
* Constructor.
@@ -94,7 +94,7 @@ namespace KoMacroTest {
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
CommonTests::CommonTests()
: KUnitTest::SlotTester()
@@ -119,9 +119,9 @@ void CommonTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
@@ -146,14 +146,14 @@ void CommonTests::testManager()
//check if manager-guiClient equals xmlguiclient
KOMACROTEST_ASSERT( ::KoMacro::Manager::self()->guiClient(), d->xmlguiclient );
//check if manger-object equals testobject
- KOMACROTEST_ASSERT( dynamic_cast<TestObject*>( (QObject*)::KoMacro::Manager::self()->object("TestObject") ), d->testobject );
+ KOMACROTEST_ASSERT( dynamic_cast<TestObject*>( (TQObject*)::KoMacro::Manager::self()->object("TestObject") ), d->testobject );
}
/*
void CommonTests::testAction()
{
- const QString testString = "teststring";
- const QString testInt = "testint";
- const QString testBool = "testbool";
+ const TQString testString = "teststring";
+ const TQString testInt = "testint";
+ const TQString testBool = "testbool";
//TODO: CLEANUP!!!!!!
//TODO: test manipulation of action and macroitem and context.
@@ -162,7 +162,7 @@ void CommonTests::testAction()
//Publish TestAction for the first time.
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
@@ -173,7 +173,7 @@ void CommonTests::testAction()
macro->execute(this);
//create list of KSharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
//check that there is one
@@ -188,7 +188,7 @@ void CommonTests::testAction()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("testString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("testString"));
//fetch the "testint"-variable
variableptr = actionptr->variable("testint");
@@ -209,7 +209,7 @@ void CommonTests::testAction()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TestString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TestString"));
actionptr->setVariable("testint","INTTEST",INT_MAX);
variableptr = actionptr->variable("testint");
@@ -234,7 +234,7 @@ void CommonTests::testAction()
macroitem->setVariable("teststring", "TeStString");
variableptr = macroitem->variable("teststring");
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TeStString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TeStString"));
macroitem->setVariable("testint",INT_MIN);
variableptr = macroitem->variable("testint");
@@ -249,8 +249,8 @@ void CommonTests::testAction()
//commontests.cpp: In member function 'void KoMacroTest::CommonTests::testAction()':
//commontests.cpp:249: error: call of overloaded 'setVariable(const char [8], int)' is ambiguous
- //../lib/macroitem.h:131: note: candidates are: QStringList KoMacro::MacroItem::setVariable(const QString&, KSharedPtr<KoMacro::Variable>)
- //../lib/macroitem.h:137: note: QStringList KoMacro::MacroItem::setVariable(const QString&, const QVariant&)
+ //../lib/macroitem.h:131: note: candidates are: TQStringList KoMacro::MacroItem::setVariable(const TQString&, KSharedPtr<KoMacro::Variable>)
+ //../lib/macroitem.h:137: note: TQStringList KoMacro::MacroItem::setVariable(const TQString&, const TQVariant&)
macroitem->setVariable("testint",(int) 0);
variableptr = macroitem->variable("testint");
@@ -286,14 +286,14 @@ void CommonTests::testXmlhandler()
// Local Init
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomElement domelement;
+ TQDomElement domelement;
// Save old doomdocument
- QString xmlOld = d->doomdocument->toString();
+ TQString xmlOld = d->doomdocument->toString();
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- QString xml = QString("<!DOCTYPE macros>"
+ TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -310,7 +310,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
// Test-XML-document with bad root element.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -324,7 +324,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),false);
// Test-XML-document with wrong macro-xmlversion.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -339,7 +339,7 @@ void CommonTests::testXmlhandler()
// TODO Test-XML-document if it has a wrong structure like wrong parathesis
// or missing end tag (is this critical??).
- /*xml = QString("<!DOCTYPE macros>"
+ /*xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -353,7 +353,7 @@ void CommonTests::testXmlhandler()
// Test-XML-document with wrong item- and variable-tags.
// TODO Could this happen??
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<iem action=\"testaction\" >"
"<vle name=\"teststring\" >testString</variable>"
@@ -367,7 +367,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true); //should be false?
// TODO Test-XML-document with maximum field-size.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -381,7 +381,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
// TODO Test-XML-document with minimum field-size.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -410,21 +410,21 @@ void CommonTests::testFunction()
/*
kdDebug()<<"===================== testFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create some data
- QString const comment = "Describe what the function does";
- QString const name = "myfunc";
- QString const text = "My Function";
- QString const receiver = "TestObject";
- QString const argument1 = "Some string";
+ TQString const comment = "Describe what the function does";
+ TQString const name = "myfunc";
+ TQString const text = "My Function";
+ TQString const receiver = "TestObject";
+ TQString const argument1 = "Some string";
int const argument2 = 12345;
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const QString &amp; , int)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>" + argument1 + "</argument>"
- "<argument>" + QString("%1").arg(argument2) + "</argument>"
+ "<argument>" + TQString("%1").tqarg(argument2) + "</argument>"
"</function>"
));
@@ -438,7 +438,7 @@ void CommonTests::testFunction()
//check domElement
KOMACROTEST_ASSERT( func->domElement(), domdocument.documentElement() );
//check name
- KOMACROTEST_ASSERT( QString(func->name()), name );
+ KOMACROTEST_ASSERT( TQString(func->name()), name );
//check text
KOMACROTEST_ASSERT( func->text(), text );
//check comment
@@ -446,7 +446,7 @@ void CommonTests::testFunction()
//check receiver
KOMACROTEST_ASSERT( func->receiver(), receiver );
//check slot (arguments)
- KOMACROTEST_ASSERT( QString(func->slot()), QString("myslot(const QString&,int)") );
+ KOMACROTEST_ASSERT( TQString(func->slot()), TQString("myslot(const TQString&,int)") );
//create KoMacro-MetaObject from receiverObject
KSharedPtr<KoMacro::MetaObject> receivermetaobject = func->receiverObject();
@@ -466,14 +466,14 @@ void CommonTests::testFunction()
for( it = funcvariables.constBegin(); it != end; ++it) {
kdDebug() << "VARIABLE => " << (*it ? (*it)->toString() : "<NULL>") << endl;
//hardcoded test:
- // firstrun we have a QString, secondrun we have an int
+ // firstrun we have a TQString, secondrun we have an int
switch(i) {
case 0: { // returnvalue
KOMACROTEST_ASSERT(*it, KSharedPtr<KoMacro::Variable>(NULL));
} break;
case 1: { // first parameter
//check first variable of func is the same as argument1
- //QString const argument1 = "Some string";
+ //TQString const argument1 = "Some string";
KOMACROTEST_ASSERT((*it)->toString(), argument1);
} break;
case 2: { // second parameter
@@ -497,10 +497,10 @@ void CommonTests::testFunction()
KSharedPtr<KoMacro::Variable> stringvar = funcvariables[1];
//check that it is not null
KOMACROTEST_XASSERT((int) stringvar.data(),0);
- //check via QVariant type that stringvar is from Type Variant
+ //check via TQVariant type that stringvar is from Type Variant
KOMACROTEST_ASSERT( stringvar->type(), KoMacro::MetaParameter::TypeVariant );
//check via metaparameter that variant is from type string
- KOMACROTEST_ASSERT( stringvar->variantType(), QVariant::String );
+ KOMACROTEST_ASSERT( stringvar->variantType(), TQVariant::String );
//chech that stringvar equals argument1
KOMACROTEST_ASSERT( stringvar->toString(), argument1 );
@@ -508,10 +508,10 @@ void CommonTests::testFunction()
KSharedPtr<KoMacro::Variable> intvar = funcvariables[2];
//check that it is not null
KOMACROTEST_XASSERT((int) intvar.data(), 0);
- //check via QVariant type that stringvar is from Type Variant
+ //check via TQVariant type that stringvar is from Type Variant
KOMACROTEST_ASSERT( intvar->type(), KoMacro::MetaParameter::TypeVariant );
//check that intvar is An String -> we create an string from int because of xml
- KOMACROTEST_ASSERT( intvar->variantType(), QVariant::String );
+ KOMACROTEST_ASSERT( intvar->variantType(), TQVariant::String );
//check that intvar equals argument2
KOMACROTEST_ASSERT( intvar->toInt(), argument2 );
@@ -522,7 +522,7 @@ void CommonTests::testFunction()
//check returnvalue
//func->setReturnValue(new KoMacro::Variable("54321"));
- //KOMACROTEST_ASSERT( func->returnValue()->toString(), QString("54321") );
+ //KOMACROTEST_ASSERT( func->returnValue()->toString(), TQString("54321") );
*/
}
@@ -532,12 +532,12 @@ void CommonTests::testIntFunction()
/*
kdDebug()<<"===================== testIntFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp; , int)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"</function>"
@@ -552,7 +552,7 @@ void CommonTests::testIntFunction()
//execute the function
func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("12345"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("12345"));
*/
}
@@ -562,12 +562,12 @@ void CommonTests::testDoubleFunction()
/*
kdDebug()<<"===================== testDoubleFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp; , double)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp; , double)\">"
"<argument>Some string</argument>"
"<argument>12.56</argument>"
"</function>"
@@ -582,22 +582,22 @@ void CommonTests::testDoubleFunction()
//execute the function
func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("12.56"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("12.56"));
*/
}
-void CommonTests::testQStringFunction()
+void CommonTests::testTQStringFunction()
{
//TODO: CLEANUP!!!!!!
/*
- kdDebug()<<"===================== testQStringFunction() ======================" << endl;
+ kdDebug()<<"===================== testTQStringFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\">"
"<argument>Some string</argument>"
"</function>"
));
@@ -610,7 +610,7 @@ void CommonTests::testQStringFunction()
KOMACROTEST_XASSERT((int) func, 0);
//execute the function func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("Some string"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("Some string"));
*/
}
@@ -619,20 +619,20 @@ void CommonTests::testMacro()
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testMacro() ======================" << endl;
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
//Is our XML parseable ?
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
-// //create a QDomDocument
-// QDomDocument domdocument = QDomDocument();
+// //create a TQDomDocument
+// TQDomDocument domdocument = TQDomDocument();
//
// //Fully fleged content this time with macro,function and action
-// domdocument.setContent(QString(
+// domdocument.setContent(TQString(
// "<macro name=\"mymacro\" icon=\"myicon\" text=\"My Macro\" comment=\"Some comment to describe the Macro.\">"
// "<action name=\"myaction\" text=\"My Action\" comment=\"Just some comment\" />"
-// "<function name=\"myfunc\" text=\"My Function\" comment=\"Describe what the function does\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\">"
+// "<function name=\"myfunc\" text=\"My Function\" comment=\"Describe what the function does\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\">"
// "<argument>The myfunc argument string</argument>"
// "</function>"
// "</macro>"
@@ -647,21 +647,21 @@ void CommonTests::testMacro()
//check that domeElement given to manager is the sam as in the macro
// KOMACROTEST_ASSERT( macro->toXML(), d->doomdocument->documentElement() );
//check the name
- KOMACROTEST_ASSERT( QString(macro->name()), QString("testMacro") );
+ KOMACROTEST_ASSERT( TQString(macro->name()), TQString("testMacro") );
/**
@deprecated values no longer exist
//check the text
- KOMACROTEST_ASSERT( macro->text(), QString("My Macro") );
+ KOMACROTEST_ASSERT( macro->text(), TQString("My Macro") );
//check iconname
- KOMACROTEST_ASSERT( QString(macro->icon()), QString("myicon") );
+ KOMACROTEST_ASSERT( TQString(macro->icon()), TQString("myicon") );
//check comment
- KOMACROTEST_ASSERT( macro->comment(), QString("Some comment to describe the Macro.") );
+ KOMACROTEST_ASSERT( macro->comment(), TQString("Some comment to describe the Macro.") );
*/
//create list of KsharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
//check that there is one
KOMACROTEST_ASSERT( items.count(), sizetype(1) );
//fetch the first one
@@ -670,14 +670,14 @@ void CommonTests::testMacro()
//-> check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
//check that it has the right name
- KOMACROTEST_ASSERT( QString(actionptr->name()), QString("testaction") );
+ KOMACROTEST_ASSERT( TQString(actionptr->name()), TQString("testaction") );
//check that it has the right text
- KOMACROTEST_ASSERT( actionptr->text(), QString("Test") );
+ KOMACROTEST_ASSERT( actionptr->text(), TQString("Test") );
//check that it has the right comment
-// KOMACROTEST_ASSERT( actionptr->comment(), QString("") );
+// KOMACROTEST_ASSERT( actionptr->comment(), TQString("") );
/*
//fetch the second one
- KSharedPtr<KoMacro::Action> myfuncptr = children[1];
+ KSharedPtr<KoMacro::Action> myfuncptr = tqchildren[1];
//cast it to function
KoMacro::Function* myfunc = dynamic_cast<KoMacro::Function*>( myfuncptr.data() );
@@ -685,16 +685,16 @@ void CommonTests::testMacro()
KOMACROTEST_XASSERT((int) myfunc, 0);
//check it?s name
- KOMACROTEST_ASSERT( QString(myfunc->name()), QString("myfunc"));
+ KOMACROTEST_ASSERT( TQString(myfunc->name()), TQString("myfunc"));
//check it?s text
- KOMACROTEST_ASSERT( myfunc->text(), QString("My Function") );
+ KOMACROTEST_ASSERT( myfunc->text(), TQString("My Function") );
//check it?s comment
- KOMACROTEST_ASSERT( myfunc->comment(), QString("Describe what the function does") );
+ KOMACROTEST_ASSERT( myfunc->comment(), TQString("Describe what the function does") );
//check it?s receiver object
- KOMACROTEST_ASSERT( myfunc->receiver(), QString("TestObject") );
+ KOMACROTEST_ASSERT( myfunc->receiver(), TQString("TestObject") );
//check it?s slot
- KOMACROTEST_ASSERT( myfunc->slot(), QString("myslot(const QString&)") );
+ KOMACROTEST_ASSERT( myfunc->slot(), TQString("myslot(const TQString&)") );
//exceute it
myfunc->activate();
@@ -712,8 +712,8 @@ void CommonTests::testMacro()
//KOMACROTEST_XASSERT((int) yanActionptr2.data(), 0);
//KOMACROTEST_XASSERT((int) yanActionptr3.data(), 0);
- //create a list of the children from yanMacro
- //QValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->children();
+ //create a list of the tqchildren from yanMacro
+ //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->tqchildren();
//check that there are two
//KOMACROTEST_ASSERT(yanChildren.count(), uint(2));
/*
@@ -722,9 +722,9 @@ void CommonTests::testMacro()
const int oldsize = yanChildren.count();
//add a new child to the macro
yanMacro->addChild(yanActionptr2);
- //get the children
- yanChildren = yanMacro->children();
- //get count of children
+ //get the tqchildren
+ yanChildren = yanMacro->tqchildren();
+ //get count of tqchildren
const int size = yanChildren.count();
//check count has changed
KOMACROTEST_XASSERT(size, oldsize);
@@ -735,9 +735,9 @@ void CommonTests::testMacro()
const int oldsize = yanChildren.count();
//add a new child to the macro
yanMacro->addChild(yanActionptr3);
- //get the children
- yanChildren = yanMacro->children();
- //get count of children
+ //get the tqchildren
+ yanChildren = yanMacro->tqchildren();
+ //get count of tqchildren
const int size = yanChildren.count();
//check count has changed
KOMACROTEST_XASSERT(size, oldsize);
@@ -752,18 +752,18 @@ void CommonTests::testDom() {
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testDom() ======================" << endl;
/*
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create data for various documents
- QString const comment = "Describe what the function does";
- QString const name = "myfunc";
- QString const text = "My Function";
- QString const receiver1 = "TestObject";
- QString const receiver2 = "GibtsNich";
+ TQString const comment = "Describe what the function does";
+ TQString const name = "myfunc";
+ TQString const text = "My Function";
+ TQString const receiver1 = "TestObject";
+ TQString const receiver2 = "GibtsNich";
//create wrong Argument tag
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<Arg0ment>Some string</Arg0ment>"
"<Arg0ment>12345</Arg0ment>"
"</function>"
@@ -774,8 +774,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create wrong receiver
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver2 + "\" slot=\"myslot(const QString &amp; , int)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver2 + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"</function>"
@@ -786,8 +786,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create "wrong" number of parameters
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int, double)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int, double)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"<argument>12345.25</argument>"
@@ -799,8 +799,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create wrong function tag
- domdocument.setContent(QString(
- "<NoFunction name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int, double)\">"
+ domdocument.setContent(TQString(
+ "<NoFunction name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int, double)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"<argument>12345.25</argument>"
@@ -810,7 +810,7 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ));
//create empty function
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<function name=\"\" text=\"\" comment=\"\" receiver=\"\" slot=\"\">"
"<argument> </argument>"
"<argument> </argument>"
@@ -824,7 +824,7 @@ void CommonTests::testDom() {
//create empty function
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<function>"
"</function>"
));
@@ -840,12 +840,12 @@ void CommonTests::testVariables()
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testVariables() ======================" << endl;
/*
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create data
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<macro name=\"mymacro123\" text=\"My Macro 123\">"
- "<function name=\"func1\" text=\"Function1\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\" >"
+ "<function name=\"func1\" text=\"Function1\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\" >"
"<argument>$MyArgumentVariable</argument>"
"<return>$MyReturnVariable</return>"
"</function>"
@@ -859,12 +859,12 @@ void CommonTests::testVariables()
//check that it is not null
KOMACROTEST_XASSERT((int) macro, 0);
- //create a list of its children
- QValueList< KSharedPtr<KoMacro::Action> > children = macro->children();
- //Check that there are two children. The first child is always the returnvalue.
- KOMACROTEST_ASSERT( children.count(), uint(2) );
- //fetch the children
- KSharedPtr<KoMacro::Action> func1ptr = children[1];
+ //create a list of its tqchildren
+ TQValueList< KSharedPtr<KoMacro::Action> > tqchildren = macro->tqchildren();
+ //Check that there are two tqchildren. The first child is always the returnvalue.
+ KOMACROTEST_ASSERT( tqchildren.count(), uint(2) );
+ //fetch the tqchildren
+ KSharedPtr<KoMacro::Action> func1ptr = tqchildren[1];
//create new context
KSharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr);
@@ -877,7 +877,7 @@ void CommonTests::testVariables()
}
{
- //set variable to be a QString
+ //set variable to be a TQString
context->setVariable("$MyArgumentVariable", new KoMacro::Variable("Some string"));
//execute function
func1ptr->activate(context);
@@ -886,7 +886,7 @@ void CommonTests::testVariables()
//check that it is not null
KOMACROTEST_XASSERT( (int) returnvariable.data(), 0);
//check that it is "Some String"
- KOMACROTEST_ASSERT(returnvariable->toString(),QString("Some string"));
+ KOMACROTEST_ASSERT(returnvariable->toString(),TQString("Some string"));
}
{
diff --git a/kexi/plugins/macros/tests/commontests.h b/kexi/plugins/macros/tests/commontests.h
index a3199ce2..0480c022 100644
--- a/kexi/plugins/macros/tests/commontests.h
+++ b/kexi/plugins/macros/tests/commontests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class CommonTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -88,9 +89,9 @@ namespace KoMacroTest {
void testDoubleFunction();
/**
- * Test the @a KoMacro::Function functionality with a QString.
+ * Test the @a KoMacro::Function functionality with a TQString.
*/
- void testQStringFunction();
+ void testTQStringFunction();
/**
* Test the @a KoMacro::Macro functionality.
diff --git a/kexi/plugins/macros/tests/komacrotestbase.h b/kexi/plugins/macros/tests/komacrotestbase.h
index d423e086..e301730d 100644
--- a/kexi/plugins/macros/tests/komacrotestbase.h
+++ b/kexi/plugins/macros/tests/komacrotestbase.h
@@ -27,11 +27,11 @@
*/
#define KOMACROTEST_ASSERT(actual, expected) \
{ \
- std::cout << QString("Testing: %1 == %2").arg(#actual).arg(#expected).latin1() << std::endl; \
+ std::cout << TQString("Testing: %1 == %2").tqarg(#actual).tqarg(#expected).latin1() << std::endl; \
check( __FILE__, __LINE__, #actual, actual, expected, false ); \
if(actual != expected) \
{ \
- kdWarning() << QString("==============> FAILED") << endl; \
+ kdWarning() << TQString("==============> FAILED") << endl; \
return; \
} \
}
@@ -44,11 +44,11 @@
*/
#define KOMACROTEST_XASSERT(actual, notexpected) \
{ \
- std::cout << QString("Testing: %1 != %2").arg(#actual).arg(#notexpected).latin1() << std::endl; \
+ std::cout << TQString("Testing: %1 != %2").tqarg(#actual).tqarg(#notexpected).latin1() << std::endl; \
check( __FILE__, __LINE__, #actual, actual, notexpected, true ); \
if(actual == notexpected) \
{ \
- kdWarning() << QString("==============> FAILED") << endl; \
+ kdWarning() << TQString("==============> FAILED") << endl; \
return; \
} \
}
@@ -70,11 +70,11 @@
setExceptionRaised(true); \
} \
if(exceptionRaised()) { \
- success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #expression); \
+ success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #expression); \
setExceptionRaised(false); \
} \
else { \
- failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed to throw an exception on: ") + #expression); \
+ failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed to throw an exception on: ") + #expression); \
return; \
} \
}
@@ -84,7 +84,7 @@
//Used more tha once at various places
//names of variables from testaction
namespace KoMacroTest {
- static const QString TESTSTRING = "teststring";
- static const QString TESTINT = "testint";
- static const QString TESTBOOL = "testbool";
+ static const TQString TESTSTRING = "teststring";
+ static const TQString TESTINT = "testint";
+ static const TQString TESTBOOL = "testbool";
}
diff --git a/kexi/plugins/macros/tests/macroitemtests.cpp b/kexi/plugins/macros/tests/macroitemtests.cpp
index 366318e1..47b93b0f 100644
--- a/kexi/plugins/macros/tests/macroitemtests.cpp
+++ b/kexi/plugins/macros/tests/macroitemtests.cpp
@@ -32,8 +32,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -64,12 +64,12 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
@@ -83,7 +83,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
MacroitemTests::MacroitemTests()
: KUnitTest::SlotTester()
@@ -108,9 +108,9 @@ void MacroitemTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -136,7 +136,7 @@ void MacroitemTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( items.count(), sizetype(0) );
@@ -148,7 +148,7 @@ void MacroitemTests::testMacroItemString()
kdDebug()<<"===================== testMacroItemString() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING);
@@ -167,7 +167,7 @@ void MacroitemTests::testMacroItemString()
macroitem->setVariable(TESTSTRING, "TeStString");
variableptr = macroitem->variable(TESTSTRING);
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TeStString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TeStString"));
//secondway for appending an macroitem
@@ -185,7 +185,7 @@ void MacroitemTests::testMacroItemInt()
kdDebug()<<"===================== testMacroItemInt() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//create new macroitem for testing
@@ -204,7 +204,7 @@ void MacroitemTests::testMacroItemInt()
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
KOMACROTEST_ASSERT(sizetype(variableptr->variant().toInt()),sizetype(-1));
- macroitem->setVariable(TESTINT,QVariant(0));
+ macroitem->setVariable(TESTINT,TQVariant(0));
variableptr = macroitem->variable(TESTINT);
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
KOMACROTEST_ASSERT(sizetype(variableptr->variant().toInt()),sizetype(0));
@@ -226,7 +226,7 @@ void MacroitemTests::testMacroItemBool()
kdDebug()<<"===================== testMacroItemBool() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//create new macroitem for testing
diff --git a/kexi/plugins/macros/tests/macroitemtests.h b/kexi/plugins/macros/tests/macroitemtests.h
index 3e44eebd..7ec3625c 100644
--- a/kexi/plugins/macros/tests/macroitemtests.h
+++ b/kexi/plugins/macros/tests/macroitemtests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class MacroitemTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/macrotests.cpp b/kexi/plugins/macros/tests/macrotests.cpp
index ed222df2..45f77efd 100644
--- a/kexi/plugins/macros/tests/macrotests.cpp
+++ b/kexi/plugins/macros/tests/macrotests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -64,14 +64,14 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestObject* testobject;
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
Private()
: xmlguiclient(0)
@@ -83,7 +83,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
MacroTests::MacroTests()
@@ -112,9 +112,9 @@ void MacroTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -134,7 +134,7 @@ void MacroTests::testMacro()
{
kdDebug()<<"===================== testMacro() ======================" << endl;
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro1 = KoMacro::Manager::self()->createMacro("testMacro");
KSharedPtr<KoMacro::Macro> macro2 = KoMacro::Manager::self()->createMacro("testMacro");
@@ -150,8 +150,8 @@ void MacroTests::testMacro()
KOMACROTEST_ASSERT(macro1->name(), macro2->name() );
//create list of KsharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items1 = macro1->items();
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items2 = macro2->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items1 = macro1->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items2 = macro2->items();
//check that there is one
KOMACROTEST_XASSERT( items1.count(), sizetype(0) );
@@ -161,16 +161,16 @@ void MacroTests::testMacro()
KOMACROTEST_ASSERT( items1.count(), items2.count() );
//check the name
- KOMACROTEST_ASSERT( QString(macro1->name()), QString("testMacro") );
+ KOMACROTEST_ASSERT( TQString(macro1->name()), TQString("testMacro") );
{
- const QString tmp1 = QString("test");
+ const TQString tmp1 = TQString("test");
macro1->setName(tmp1);
//check the name changed
- KOMACROTEST_XASSERT( QString(macro1->name()), QString("testMacro") );
+ KOMACROTEST_XASSERT( TQString(macro1->name()), TQString("testMacro") );
//check the name
- KOMACROTEST_ASSERT( QString(macro1->name()), QString("test") );
+ KOMACROTEST_ASSERT( TQString(macro1->name()), TQString("test") );
}
//fetch the first one
@@ -178,9 +178,9 @@ void MacroTests::testMacro()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
//check that it has the right name
- KOMACROTEST_ASSERT( QString(actionptr->name()), QString("testaction") );
+ KOMACROTEST_ASSERT( TQString(actionptr->name()), TQString("testaction") );
//check that it has the right text
- KOMACROTEST_ASSERT( actionptr->text(), QString("Test") );
+ KOMACROTEST_ASSERT( actionptr->text(), TQString("Test") );
//try to clear items
macro1->clearItems();
diff --git a/kexi/plugins/macros/tests/macrotests.h b/kexi/plugins/macros/tests/macrotests.h
index ed8d0f21..4a7c2043 100644
--- a/kexi/plugins/macros/tests/macrotests.h
+++ b/kexi/plugins/macros/tests/macrotests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class MacroTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/testaction.cpp b/kexi/plugins/macros/tests/testaction.cpp
index 4063aa1b..845acd5f 100644
--- a/kexi/plugins/macros/tests/testaction.cpp
+++ b/kexi/plugins/macros/tests/testaction.cpp
@@ -33,17 +33,17 @@ using namespace KoMacroTest;
TestAction::TestAction()
: KoMacro::Action("testaction", "Test")
{
- setVariable("teststring", "Stringtest", QString("testString"));
+ setVariable("teststring", "Stringtest", TQString("testString"));
setVariable("testint", "Inttest", int(0));
setVariable("testdouble", "Doubletest", double(0.5));
- setVariable("testbool", "Booltest", QVariant(true,0));
+ setVariable("testbool", "Booltest", TQVariant(true,0));
}
TestAction::~TestAction()
{
}
-bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
Q_UNUSED(macroitem);
Q_UNUSED(name);
@@ -53,7 +53,7 @@ bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const Q
void TestAction::activate(KSharedPtr<KoMacro::Context> context)
{
kdDebug() << "TestAction::activate(KSharedPtr<Context>)" << endl;
- const QString teststring = context->variable("teststring")->variant().toString();
+ const TQString teststring = context->variable("teststring")->variant().toString();
const int testint = context->variable("testint")->variant().toInt();
const bool testbool = context->variable("testbool")->variant().toBool();
}
diff --git a/kexi/plugins/macros/tests/testaction.h b/kexi/plugins/macros/tests/testaction.h
index 9eebff3c..9c045e3d 100644
--- a/kexi/plugins/macros/tests/testaction.h
+++ b/kexi/plugins/macros/tests/testaction.h
@@ -39,6 +39,7 @@ namespace KoMacroTest {
class TestAction : public KoMacro::Action
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ namespace KoMacroTest {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/tests/testobject.cpp b/kexi/plugins/macros/tests/testobject.cpp
index 39cadb7a..e0db481e 100644
--- a/kexi/plugins/macros/tests/testobject.cpp
+++ b/kexi/plugins/macros/tests/testobject.cpp
@@ -25,8 +25,8 @@
//#include "../lib/macro.h"
//#include "../lib/metaobject.h"
-//#include <qstringlist.h>
-//#include <qdom.h>
+//#include <tqstringlist.h>
+//#include <tqdom.h>
#include <kdebug.h>
//#include <kxmlguiclient.h>
@@ -57,7 +57,7 @@ namespace KoMacroTest {
}
TestObject::TestObject(KUnitTest::Tester* const tester)
- : QObject()
+ : TQObject()
, d( new Private(tester) ) // create the private d-pointer instance.
{
setName("TestObject");
@@ -71,18 +71,18 @@ TestObject::~TestObject()
//testObject without arguments
void TestObject::myslot()
{
- QString s = "CALLED => TestObject::myslot()";
+ TQString s = "CALLED => TestObject::myslot()";
//be loud
kdDebug() << s << endl;
//add some extra Debuginfos to TestResults see tester.h
d->tester->results()->addDebugInfo(s);
}
-//testobject with QString and int argument
+//testobject with TQString and int argument
//int is returnvalue
-int TestObject::myslot(const QString&, int i)
+int TestObject::myslot(const TQString&, int i)
{
- QString s = "CALLED => TestObject::myslot(const QString&, int)";
+ TQString s = "CALLED => TestObject::myslot(const TQString&, int)";
//be loud
kdDebug() << s << endl;
//add some extra debuginfos to TestResults
@@ -90,11 +90,11 @@ int TestObject::myslot(const QString&, int i)
return i;
}
-//testobject with QString argument
-//QString is returnvalue
-QString TestObject::myslot(const QString& s)
+//testobject with TQString argument
+//TQString is returnvalue
+TQString TestObject::myslot(const TQString& s)
{
- QString t = QString("CALLED => TestObject::myslot(const QString& s) s=%1").arg(s);
+ TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").tqarg(s);
//be loud
kdDebug() << t << endl;
//add some extra Debuginfos to TestResults
@@ -102,11 +102,11 @@ QString TestObject::myslot(const QString& s)
return s;
}
-//testobject with QString and double argument
+//testobject with TQString and double argument
//double is returnvalue
-double TestObject::myslot(const QString&, double d)
+double TestObject::myslot(const TQString&, double d)
{
- QString s = "CALLED => TestObject::myslot(const QString&, double)";
+ TQString s = "CALLED => TestObject::myslot(const TQString&, double)";
//be loud
kdDebug() << s << endl;
//add some extra Debuginfos to TestResults
diff --git a/kexi/plugins/macros/tests/testobject.h b/kexi/plugins/macros/tests/testobject.h
index da5e8ae2..87bed837 100644
--- a/kexi/plugins/macros/tests/testobject.h
+++ b/kexi/plugins/macros/tests/testobject.h
@@ -20,18 +20,19 @@
#ifndef KOMACROTEST_TESTOBJECT_H
#define KOMACROTEST_TESTOBJECT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kunittest/tester.h>
namespace KoMacroTest {
/**
* The TestObject class is used to test handling and communication
- * of external from QObject inheritated classes.
+ * of external from TQObject inheritated classes.
*/
- class TestObject : public QObject
+ class TestObject : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -59,20 +60,20 @@ namespace KoMacroTest {
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
*/
- int myslot(const QString&, int);
+ int myslot(const TQString&, int);
/**
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
*/
- QString myslot(const QString&);
+ TQString myslot(const TQString&);
/**
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
* @return is @param d
*/
- double myslot(const QString&, double d);
+ double myslot(const TQString&, double d);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/tests/variabletests.cpp b/kexi/plugins/macros/tests/variabletests.cpp
index 8bc8d9c7..5035f929 100644
--- a/kexi/plugins/macros/tests/variabletests.cpp
+++ b/kexi/plugins/macros/tests/variabletests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -66,12 +66,12 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
@@ -85,7 +85,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
/******************************************************************************
* This is an xtra big TODO:
@@ -117,9 +117,9 @@ void VariableTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -144,7 +144,7 @@ void VariableTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( items.count(), sizetype(0) );
@@ -152,7 +152,7 @@ void VariableTests::testMacro()
void VariableTests::testVariableString() {
kdDebug()<<"===================== testVariableString() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "teststring"-variable
@@ -173,19 +173,19 @@ void VariableTests::testVariableString() {
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is "testString"
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("testString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("testString"));
actionptr->setVariable("teststring", "STRINGTEST", "TestString");
variableptr = actionptr->variable("teststring");
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TestString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TestString"));
}
void VariableTests::testVariableInt() {
kdDebug()<<"===================== testVariableInt() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "testint"-variable
@@ -218,7 +218,7 @@ void VariableTests::testVariableInt() {
void VariableTests::testVariableBool() {
kdDebug()<<"===================== testVariableBool() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "testbool"-variable
diff --git a/kexi/plugins/macros/tests/variabletests.h b/kexi/plugins/macros/tests/variabletests.h
index 5bc7f144..a3cd7f60 100644
--- a/kexi/plugins/macros/tests/variabletests.h
+++ b/kexi/plugins/macros/tests/variabletests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class VariableTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp
index 9a0ebcb1..a08ff33d 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp
@@ -29,7 +29,7 @@
#include <ostream>
#include <cfloat>
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -58,7 +58,7 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
KSharedPtr<KoMacro::Action> testaction;
@@ -144,11 +144,11 @@ void XMLHandlerTests::testCorrectDomElement()
{
// Local Init
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -159,12 +159,12 @@ void XMLHandlerTests::testCorrectDomElement()
"</macro>");
// Set the XML-document with the above string.
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Is our XML parseable by calling parseXML()?
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
// Is the parsen content in the Macro correct ?
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
@@ -172,12 +172,12 @@ void XMLHandlerTests::testCorrectDomElement()
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
// Transform back by calling toXML().
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
// Test the Compare-method when a Variable will change, it must fail.
macro->items().first()->variable("teststring")->setVariant("bla");
- isvariableok.replace("teststring",false);
+ isvariableok.tqreplace("teststring",false);
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
}
@@ -185,9 +185,9 @@ void XMLHandlerTests::testCorrectDomElement()
void XMLHandlerTests::testBadRoot()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -197,23 +197,23 @@ void XMLHandlerTests::testBadRoot()
"</item>"
"</maro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 3.Test - XML-document with a missing Variable.
void XMLHandlerTests::testMissingVariable()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -222,16 +222,16 @@ void XMLHandlerTests::testMissingVariable()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -239,9 +239,9 @@ void XMLHandlerTests::testMissingVariable()
void XMLHandlerTests::testMoreVariables()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -252,10 +252,10 @@ void XMLHandlerTests::testMoreVariables()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
@@ -263,7 +263,7 @@ void XMLHandlerTests::testMoreVariables()
isvariableok["testbla"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -271,9 +271,9 @@ void XMLHandlerTests::testMoreVariables()
void XMLHandlerTests::testWrongVersion()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -283,14 +283,14 @@ void XMLHandlerTests::testWrongVersion()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 6.Test - XML-document if it has a wrong structure like wrong parathesis
@@ -298,9 +298,9 @@ void XMLHandlerTests::testWrongVersion()
void XMLHandlerTests::testWrongXMLStruct()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"macro xmlversion=\"1\">>"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -308,23 +308,23 @@ void XMLHandlerTests::testWrongXMLStruct()
"</item>"
"</macro>");
KOMACROTEST_XASSERT(doomdocument.setContent(xml),true);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 7.Test-XML-document with maximum field-size.
void XMLHandlerTests::testMaxNum()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -332,19 +332,19 @@ void XMLHandlerTests::testMaxNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX).arg(DBL_MAX);
+ "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- QDomElement elem2 = macro->toXML();
+ TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -352,9 +352,9 @@ void XMLHandlerTests::testMaxNum()
void XMLHandlerTests::testMaxNum2()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -362,19 +362,19 @@ void XMLHandlerTests::testMaxNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1);
+ "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -382,9 +382,9 @@ void XMLHandlerTests::testMaxNum2()
void XMLHandlerTests::testMinNum()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -392,19 +392,19 @@ void XMLHandlerTests::testMinNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN).arg(DBL_MIN);
+ "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -412,9 +412,9 @@ void XMLHandlerTests::testMinNum()
void XMLHandlerTests::testMinNum2()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -422,19 +422,19 @@ void XMLHandlerTests::testMinNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1);
+ "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -442,9 +442,9 @@ void XMLHandlerTests::testMinNum2()
void XMLHandlerTests::testBigNumber()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -452,19 +452,19 @@ void XMLHandlerTests::testBigNumber()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %1 </variable>"
"</item>"
- "</macro>").arg(DBL_MAX+1);
+ "</macro>").tqarg(DBL_MAX+1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -472,9 +472,9 @@ void XMLHandlerTests::testBigNumber()
void XMLHandlerTests::testTwoMacroItems()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -492,17 +492,17 @@ void XMLHandlerTests::testTwoMacroItems()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
/***************************************************************************
@@ -512,20 +512,20 @@ void XMLHandlerTests::testTwoMacroItems()
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
-* @p elem The given @a QDomElement which is parsen.
+* @p elem The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
-* @p isvariableok QMap of Bools for comparing each @a Variable .
+* @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok)
+ const TQMap<TQString, bool> isvariableok)
{
// Make an Iterator over the MacroItems of the Macro.
- const QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems = macro->items();
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator
+ const TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems = macro->items();
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator
mit(macroitems.constBegin()), end(macroitems.constEnd());
//1.comparison - Is the MacroItem-list empty?
@@ -541,12 +541,12 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
// Got to the first item-elements of the elem (there is only one in the tests).
- QDomNode itemnode = elem.firstChild();
+ TQDomNode itemnode = elem.firstChild();
// Iterate over the MacroItems and item-elements.
while(mit != end && ! itemnode.isNull()) {
const KSharedPtr<KoMacro::MacroItem> macroitem = *mit;
- const QDomElement itemelem = itemnode.toElement();
+ const TQDomElement itemelem = itemnode.toElement();
//2.comparison - Is the Action-name equal?
{
@@ -563,25 +563,25 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
// Go down to MacroItem->Variable and item->variable and compare them.
- QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables = macroitem->variables();
- QDomNode varnode = itemelem.firstChild();
+ TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables = macroitem->variables();
+ TQDomNode varnode = itemelem.firstChild();
while ( ! varnode.isNull()) {
- const QDomElement varelem = varnode.toElement();
- const KSharedPtr<KoMacro::Variable> varitem = mvariables.find(varelem.attribute("name")).data();
+ const TQDomElement varelem = varnode.toElement();
+ const KSharedPtr<KoMacro::Variable> varitem = mvariables.tqfind(varelem.attribute("name")).data();
//3.comparison - Is the content of the Variable
// in the MacroItem and and item equal?
{
- const bool var = *isvariableok.find(varelem.attribute("name"));
+ const bool var = *isvariableok.tqfind(varelem.attribute("name"));
if( ! var ) {
- KOMACROTEST_XASSERT(varitem->variant() == QVariant(varelem.text()), !var);
+ KOMACROTEST_XASSERT(varitem->variant() == TQVariant(varelem.text()), !var);
kdDebug() << "The content of the Variable: " << varitem->name()
<< " is not equal." << varitem->variant()
<< "!=" << varelem.text() << endl;
}
else {
- KOMACROTEST_ASSERT(varitem->variant() == QVariant(varelem.text()), var);
+ KOMACROTEST_ASSERT(varitem->variant() == TQVariant(varelem.text()), var);
}
}
@@ -604,11 +604,11 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
}
-// Prints a QMap of Variables to kdDebug().
-void XMLHandlerTests::printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s)
+// Prints a TQMap of Variables to kdDebug().
+void XMLHandlerTests::printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s)
{
- //QValueList<QString>::ConstIterator kit (keys.constBegin()), end(keys.constEnd());
- QMap<QString, KSharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd());
+ //TQValueList<TQString>::ConstIterator kit (keys.constBegin()), end(keys.constEnd());
+ TQMap<TQString, KSharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd());
while(mvit != end){
const KoMacro::Variable * v = *mvit;
kdDebug() << s << ": " << v->name() << endl;
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.h b/kexi/plugins/macros/tests/xmlhandlertests.h
index c78a8c79..3e67742f 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.h
+++ b/kexi/plugins/macros/tests/xmlhandlertests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class XMLHandlerTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -71,23 +72,23 @@ namespace KoMacroTest {
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
- * @p domelement The given @a QDomElement which is parsen.
+ * @p domelement The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
- * @p isvariableok QMap of Bools for comparing each @a Variable .
+ * @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok);
+ const TQMap<TQString, bool> isvariableok);
- // Prints a QMap of Variables to kdDebug().
- void printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s);
+ // Prints a TQMap of Variables to kdDebug().
+ void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s);
/**
* Sub-methods of testParseXML() and testToXML().
- * Test the correct parsing of a @a QDomElement into a @a Macro
+ * Test the correct parsing of a @a TQDomElement into a @a Macro
* respectively expected failure of parsing. Then transform it
* back and compare it.
*/
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.cpp b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
index 2234eaae..ac176f89 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
@@ -29,7 +29,7 @@
#include <ostream>
#include <cfloat>
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -65,7 +65,7 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
KSharedPtr<KoMacro::Action> testaction;
@@ -76,11 +76,11 @@ namespace KoMacroTest {
KSharedPtr<KoMacro::Action> action3_2; // action of the parsen macro3, for test12
/**
- * Represents a @a QValuList of @a MacroItem which are parsen in the
+ * Represents a @a TQValuList of @a MacroItem which are parsen in the
* correspondig @a Macro .
*/
- QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2
- QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3
+ TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2
+ TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3
/**
* @a MacroItem instances which ist fillen manually from the given XML
@@ -186,7 +186,7 @@ void XMLHandlerTests2::testCorrectDomElement()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -196,9 +196,9 @@ void XMLHandlerTests2::testCorrectDomElement()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -207,10 +207,10 @@ void XMLHandlerTests2::testCorrectDomElement()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -241,8 +241,8 @@ void XMLHandlerTests2::testCorrectDomElement()
varint->setVariant(117);
d->macroitem2->variable("testint")->setVariant(117);
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -279,7 +279,7 @@ void XMLHandlerTests2::testBadRoot()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -289,9 +289,9 @@ void XMLHandlerTests2::testBadRoot()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -300,10 +300,10 @@ void XMLHandlerTests2::testBadRoot()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -319,7 +319,7 @@ void XMLHandlerTests2::testMissingVariable()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -328,9 +328,9 @@ void XMLHandlerTests2::testMissingVariable()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -339,9 +339,9 @@ void XMLHandlerTests2::testMissingVariable()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -367,8 +367,8 @@ void XMLHandlerTests2::testMissingVariable()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -403,7 +403,7 @@ void XMLHandlerTests2::testMoreVariables()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -414,9 +414,9 @@ void XMLHandlerTests2::testMoreVariables()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -425,10 +425,10 @@ void XMLHandlerTests2::testMoreVariables()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
KSharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong");
// Is our XML parseable into a 2. Macro by calling parseXML()?
@@ -457,8 +457,8 @@ void XMLHandlerTests2::testMoreVariables()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -496,7 +496,7 @@ void XMLHandlerTests2::testWrongVersion()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -506,9 +506,9 @@ void XMLHandlerTests2::testWrongVersion()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -517,10 +517,10 @@ void XMLHandlerTests2::testWrongVersion()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -538,7 +538,7 @@ void XMLHandlerTests2::testWrongXMLStruct()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -548,9 +548,9 @@ void XMLHandlerTests2::testWrongXMLStruct()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -559,10 +559,10 @@ void XMLHandlerTests2::testWrongXMLStruct()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -578,7 +578,7 @@ void XMLHandlerTests2::testMaxNum()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -586,11 +586,11 @@ void XMLHandlerTests2::testMaxNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX).arg(DBL_MAX);
+ "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -599,10 +599,10 @@ void XMLHandlerTests2::testMaxNum()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MAX));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MAX));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -629,8 +629,8 @@ void XMLHandlerTests2::testMaxNum()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -666,7 +666,7 @@ void XMLHandlerTests2::testMaxNum2()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -674,11 +674,11 @@ void XMLHandlerTests2::testMaxNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1);
+ "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -687,10 +687,10 @@ void XMLHandlerTests2::testMaxNum2()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MAX+1));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MAX+1));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX+1));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX+1));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -717,8 +717,8 @@ void XMLHandlerTests2::testMaxNum2()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -754,7 +754,7 @@ void XMLHandlerTests2::testMinNum()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -762,11 +762,11 @@ void XMLHandlerTests2::testMinNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN).arg(DBL_MIN);
+ "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -775,10 +775,10 @@ void XMLHandlerTests2::testMinNum()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MIN));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MIN));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -805,8 +805,8 @@ void XMLHandlerTests2::testMinNum()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -842,7 +842,7 @@ void XMLHandlerTests2::testMinNum2()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -850,11 +850,11 @@ void XMLHandlerTests2::testMinNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1);
+ "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -863,10 +863,10 @@ void XMLHandlerTests2::testMinNum2()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MIN-1));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MIN-1));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN-1));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN-1));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -893,8 +893,8 @@ void XMLHandlerTests2::testMinNum2()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -930,7 +930,7 @@ void XMLHandlerTests2::testBigNumber()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -940,9 +940,9 @@ void XMLHandlerTests2::testBigNumber()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -951,10 +951,10 @@ void XMLHandlerTests2::testBigNumber()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- //TODO //KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0123456789012345678901234567890123456789));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ //TODO //KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0123456789012345678901234567890123456789));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -981,8 +981,8 @@ void XMLHandlerTests2::testBigNumber()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -1018,7 +1018,7 @@ void XMLHandlerTests2::testTwoMacroItems()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -1036,9 +1036,9 @@ void XMLHandlerTests2::testTwoMacroItems()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -1050,17 +1050,17 @@ void XMLHandlerTests2::testTwoMacroItems()
d->macroitem_2->setAction(d->testaction_2);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
KSharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong");
// Push the Variables into the macroitem4.
- KSharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",QVariant("testString2"));
- KSharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",QVariant(4));
- KSharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",QVariant(false));
- KSharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",QVariant(0.7));
+ KSharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",TQVariant("testString2"));
+ KSharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",TQVariant(4));
+ KSharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",TQVariant(false));
+ KSharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",TQVariant(0.7));
KSharedPtr<KoMacro::Variable> varbla_2 = d->macroitem_2->addVariable("testbla","somethingwrong2");
// Is our XML parseable into a 2. Macro by calling parseXML()?
@@ -1072,7 +1072,7 @@ void XMLHandlerTests2::testTwoMacroItems()
KOMACROTEST_ASSERT(d->macroitems2.size(),(sizetypelist)2);
{
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin());
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin());
// 2a.comparison - Test if the Action is correct?
d->macroitem2 = *mit2;
mit2++;
@@ -1101,8 +1101,8 @@ void XMLHandlerTests2::testTwoMacroItems()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -1111,7 +1111,7 @@ void XMLHandlerTests2::testTwoMacroItems()
KOMACROTEST_ASSERT(d->macroitems3.size(),(sizetypelist)2);
{
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin());
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin());
// 2b.comparison - Test if the Action is correct?
d->macroitem3 = *mit3;
mit3++;
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.h b/kexi/plugins/macros/tests/xmlhandlertests2.h
index 0a3fee3a..d8f92aaf 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.h
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class XMLHandlerTests2 : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -68,29 +69,29 @@ namespace KoMacroTest {
/// @internal d-pointer instance.
Private* const d;
- typedef QMap<QString,KoMacro::Variable>::size_type sizetypemap;
- typedef QValueList<KSharedPtr<KoMacro::MacroItem > >::size_type sizetypelist;
+ typedef TQMap<TQString,KoMacro::Variable>::size_type sizetypemap;
+ typedef TQValueList<KSharedPtr<KoMacro::MacroItem > >::size_type sizetypelist;
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
- * @p domelement The given @a QDomElement which is parsen.
+ * @p domelement The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
- * @p isvariableok QMap of Bools for comparing each @a Variable .
+ * @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
/* void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok);
+ const TQMap<TQString, bool> isvariableok);
- // Prints a QMap of Variables to kdDebug().
- void printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s);
+ // Prints a TQMap of Variables to kdDebug().
+ void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s);
*/
/**
* Sub-methods of testParseXML() and testToXML().
- * Test the correct parsing of a @a QDomElement into a @a Macro
+ * Test the correct parsing of a @a TQDomElement into a @a Macro
* respectively expected failure of parsing. Then transform it
* back and compare it.
*/