summaryrefslogtreecommitdiffstats
path: root/kommander/executor
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/executor')
-rw-r--r--kommander/executor/dcopkommanderif.h2
-rw-r--r--kommander/executor/instance.cpp26
-rw-r--r--kommander/executor/instance.h7
-rw-r--r--kommander/executor/main.cpp2
-rw-r--r--kommander/executor/register.cpp8
5 files changed, 23 insertions, 22 deletions
diff --git a/kommander/executor/dcopkommanderif.h b/kommander/executor/dcopkommanderif.h
index 1ba67cbb..c756b059 100644
--- a/kommander/executor/dcopkommanderif.h
+++ b/kommander/executor/dcopkommanderif.h
@@ -58,7 +58,7 @@ virtual void setChecked(const TQString &widgetName, bool checked) = 0;
virtual void setAssociatedText(const TQString &widgetName, const TQString &text) = 0;
virtual TQStringList associatedText(const TQString &widgetName) = 0;
virtual TQString type(const TQString& widget) = 0;
-virtual TQStringList children(const TQString& parent, bool recursive) = 0;
+virtual TQStringList tqchildren(const TQString& tqparent, bool recursive) = 0;
virtual TQString global(const TQString& variableName) = 0;
virtual void setGlobal(const TQString& variableName, const TQString& value) = 0;
virtual void setMaximum(const TQString &widgetName, int value) = 0;
diff --git a/kommander/executor/instance.cpp b/kommander/executor/instance.cpp
index a8ff3400..d24e856a 100644
--- a/kommander/executor/instance.cpp
+++ b/kommander/executor/instance.cpp
@@ -67,7 +67,7 @@ void Instance::addCmdlineArguments(const TQStringList& args)
TQStringList stdArgs;
for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it)
{
- int pos = (*it).find('=');
+ int pos = (*it).tqfind('=');
if (pos != -1)
m_textInstance->setGlobal((*it).left(pos), (*it).mid(pos+1));
else
@@ -75,7 +75,7 @@ void Instance::addCmdlineArguments(const TQStringList& args)
}
int i = 0;
for (TQStringList::ConstIterator it = stdArgs.begin(); it != stdArgs.end(); ++it)
- m_textInstance->setGlobal(TQString("_ARG%1").arg(++i), *it);
+ m_textInstance->setGlobal(TQString("_ARG%1").tqarg(++i), *it);
m_textInstance->setGlobal("_ARGS", stdArgs.join(" "));
m_textInstance->setGlobal("_ARGCOUNT", TQString::number(stdArgs.count()));
}
@@ -97,16 +97,16 @@ bool Instance::build(const KURL& fname)
if (!fname.isValid() || !isFileValid(fname))
return false; // Check if file is correct
- // create the main instance, must inherit QDialog
+ // create the main instance, must inherit TQDialog
KommanderFactory::loadPlugins();
if (fname.isValid())
- m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast<TQWidget*>(parent()));
+ m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast<TQWidget*>(tqparent()));
else
{
TQFile inputFile;
inputFile.open(IO_ReadOnly, stdin);
- m_instance = KommanderFactory::create(&inputFile);
+ m_instance = KommanderFactory::create(TQT_TQIODEVICE(&inputFile));
}
// check if build was successful
@@ -121,7 +121,7 @@ bool Instance::build(const KURL& fname)
window->setFileName(fname.path().local8Bit());
// FIXME : Should verify that all of the widgets in the dialog derive from KommanderWidget
- m_textInstance = kommanderWidget(m_instance);
+ m_textInstance = kommanderWidget(TQT_TQOBJECT(m_instance));
if (!m_textInstance) // Main dialog/window is not a Kommander widget - look for one
{
@@ -185,7 +185,7 @@ bool Instance::isFileValid(const KURL& fname) const
if (!TQFileInfo(fname.path()).exists())
{
KMessageBox::sorry(0, i18n("<qt>Kommander file<br><b>%1</b><br>does not "
- "exist.</qt>").arg(fname.path()));
+ "exist.</qt>").tqarg(fname.path()));
return false;
}
@@ -220,7 +220,7 @@ bool Instance::isFileValid(const KURL& fname) const
}
if (!TQFileInfo(fname.path()).isExecutable())
{
- if (KMessageBox::warningContinueCancel(0, i18n("<qt>The Kommander file <i>%1</i> does not have the <b>executable attribute</b> set and could possibly contain dangerous exploits.<p>If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.<p>Are you sure you want to continue?</qt>").arg(fname.pathOrURL()), TQString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
+ if (KMessageBox::warningContinueCancel(0, i18n("<qt>The Kommander file <i>%1</i> does not have the <b>executable attribute</b> set and could possibly contain dangerous exploits.<p>If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.<p>Are you sure you want to continue?</qt>").tqarg(fname.pathOrURL()), TQString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
return false;
}
return true;
@@ -431,13 +431,13 @@ TQString Instance::type(const TQString& widget)
return TQString();
}
-TQStringList Instance::children(const TQString& parent, bool recursive)
+TQStringList Instance::tqchildren(const TQString& tqparent, bool recursive)
{
TQStringList matching;
- TQObject* child = stringToWidget(parent);
+ TQObject* child = stringToWidget(tqparent);
TQObjectList* widgets;
if (!child)
- child = m_instance;
+ child = TQT_TQOBJECT(m_instance);
if (child->inherits(TQWIDGET_OBJECT_NAME_STRING))
{
widgets = child->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, recursive);
@@ -674,9 +674,9 @@ int Instance::getWinID()
void Instance::setBusyCursor(bool busy)
{
if (busy)
- m_instance->setCursor(TQCursor(Qt::WaitCursor));
+ m_instance->setCursor(TQCursor(TQt::WaitCursor));
else
- m_instance->setCursor(TQCursor(Qt::ArrowCursor));
+ m_instance->setCursor(TQCursor(TQt::ArrowCursor));
}
diff --git a/kommander/executor/instance.h b/kommander/executor/instance.h
index 95b52ead..469d7202 100644
--- a/kommander/executor/instance.h
+++ b/kommander/executor/instance.h
@@ -43,6 +43,7 @@ class KommanderWidget;
class Instance : public TQObject, virtual public DCOPKommanderIf
{
Q_OBJECT
+ TQ_OBJECT
public:
Instance();
@@ -89,7 +90,7 @@ public:
virtual void setAssociatedText(const TQString &widgetName, const TQString &text);
virtual TQStringList associatedText(const TQString &widgetName);
virtual TQString type(const TQString& widget);
- virtual TQStringList children(const TQString& parent, bool recursive);
+ virtual TQStringList tqchildren(const TQString& tqparent, bool recursive);
virtual TQString global(const TQString& variableName);
virtual void setGlobal(const TQString& variableName, const TQString& value);
virtual void setMaximum(const TQString &widgetName, int value);
@@ -111,7 +112,7 @@ public:
TQWidget *widget() { return m_instance;}
public slots:
- /** Sets the instance's parent */
+ /** Sets the instance's tqparent */
void setParent(TQWidget*);
/** Returns whether the instance is built */
bool isBuilt() const;
@@ -126,7 +127,7 @@ private:
TQGuardedPtr<TQWidget> m_instance;
/* Associated Text Instance */
KommanderWidget *m_textInstance;
- /** The parent widget */
+ /** The tqparent widget */
TQWidget *m_parent;
/* Get object by name */
TQObject* stringToWidget(const TQString& name);
diff --git a/kommander/executor/main.cpp b/kommander/executor/main.cpp
index 00d7e509..d49dd373 100644
--- a/kommander/executor/main.cpp
+++ b/kommander/executor/main.cpp
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
{
char buf[200];
TQString baseFile = args->url(0).fileName();
- int ext = baseFile.findRev('.');
+ int ext = baseFile.tqfindRev('.');
if (ext != -1)
baseFile = baseFile.left(ext);
strcpy(buf, baseFile.latin1());
diff --git a/kommander/executor/register.cpp b/kommander/executor/register.cpp
index db794e25..f3d33799 100644
--- a/kommander/executor/register.cpp
+++ b/kommander/executor/register.cpp
@@ -49,7 +49,7 @@ void Instance::registerSpecials()
SpecialInformation::insert("null", 0, 0);
SpecialInformation::insert("pid", 0, 0);
SpecialInformation::insert("dcopid", 0, 0);
- SpecialInformation::insert("parentPid", 0, 0);
+ SpecialInformation::insert("tqparentPid", 0, 0);
SpecialInformation::insert("execBegin", 0, 1);
SpecialInformation::insert("env", 1, 1);
SpecialInformation::insert("exec", 1, 1);
@@ -80,15 +80,15 @@ void Instance::registerSpecials()
SpecialInformation::setCurrentObject("String");
SpecialInformation::insert("length", 1, 1, i18n( "Return number of chars in the string.") );
- SpecialInformation::insert("contains", 2, 2, i18n( "Check if the string contains given substring.") );
- SpecialInformation::insert("find", 2, 2, i18n( "Return position of a substring in the string, "
+ SpecialInformation::insert("tqcontains", 2, 2, i18n( "Check if the string contains given substring.") );
+ SpecialInformation::insert("tqfind", 2, 2, i18n( "Return position of a substring in the string, "
"or -1 if it isn't found.") );
SpecialInformation::insert("left", 2, 2, i18n( "Return first n chars of the string.") );
SpecialInformation::insert("right", 2, 2, i18n( "Return last n chars of the string.") );
SpecialInformation::insert("mid", 3, 3, i18n( "Return substring of the string, starting from "
"given position.") );
SpecialInformation::insert("remove", 2, 2, i18n( "Replace all occurencies of given substring.") );
- SpecialInformation::insert("replace", 3, 3, i18n( "Replace all occurencies of given substring "
+ SpecialInformation::insert("tqreplace", 3, 3, i18n( "Replace all occurencies of given substring "
"with given replacement.") );
SpecialInformation::insert("upper", 1, 1, i18n( "Convert the string to uppercase.") );
SpecialInformation::insert("lower", 1, 1, i18n( "Convert the string to lowercase.") );