summaryrefslogtreecommitdiffstats
path: root/kommander/executor/instance.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kommander/executor/instance.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/executor/instance.cpp')
-rw-r--r--kommander/executor/instance.cpp26
1 files changed, 13 insertions, 13 deletions
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));
}