From e985f7e545f4739493965aad69bbecb136dc9346 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 16 Jun 2011 19:02:47 +0000 Subject: 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 --- kommander/executor/instance.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'kommander/executor/instance.cpp') 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(parent())); + m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast(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("Kommander file
%1
does not " - "exist.
").arg(fname.path())); + "exist.").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("The Kommander file %1 does not have the executable attribute set and could possibly contain dangerous exploits.

If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.

Are you sure you want to continue?").arg(fname.pathOrURL()), TQString(), i18n("Run Nevertheless")) == KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(0, i18n("The Kommander file %1 does not have the executable attribute set and could possibly contain dangerous exploits.

If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.

Are you sure you want to continue?").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)); } -- cgit v1.2.1