diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp')
-rw-r--r-- | kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp index d650e958..b778bc75 100644 --- a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp +++ b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp @@ -44,8 +44,8 @@ class KexiScriptPart::Private Kross::Api::ScriptGUIClient* scriptguiclient; }; -KexiScriptPart::KexiScriptPart(QObject *parent, const char *name, const QStringList &l) - : KexiPart::Part(parent, name, l) +KexiScriptPart::KexiScriptPart(TQObject *tqparent, const char *name, const TQStringList &l) + : KexiPart::Part(tqparent, name, l) , d( new Private() ) { d->scriptguiclient = 0; @@ -68,7 +68,7 @@ KexiScriptPart::~KexiScriptPart() delete d; } -bool KexiScriptPart::execute(KexiPart::Item* item, QObject* sender) +bool KexiScriptPart::execute(KexiPart::Item* item, TQObject* sender) { Q_UNUSED(sender); @@ -88,21 +88,21 @@ bool KexiScriptPart::execute(KexiPart::Item* item, QObject* sender) Kross::Api::ScriptAction* scriptaction = view->scriptAction(); if(scriptaction) { - const QString dontAskAgainName = "askExecuteScript"; + const TQString dontAskAgainName = "askExecuteScript"; KConfig* config = KGlobal::config(); - QString dontask = config->readEntry(dontAskAgainName).lower(); + TQString dontask = config->readEntry(dontAskAgainName).lower(); bool exec = (dontask == "yes"); if( !exec && dontask != "no" ) { exec = KMessageBox::warningContinueCancel(0, - i18n("Do you want to execute the script \"%1\"?\n\nScripts obtained from unknown sources can contain dangerous code.").arg(scriptaction->text()), + i18n("Do you want to execute the script \"%1\"?\n\nScripts obtained from unknown sources can contain dangerous code.").tqarg(scriptaction->text()), i18n("Execute Script?"), KGuiItem(i18n("Execute"), "exec"), dontAskAgainName, KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue; } if(exec) { - //QTimer::singleShot(10, scriptaction, SLOT(activate())); + //TQTimer::singleShot(10, scriptaction, TQT_SLOT(activate())); d->scriptguiclient->executeScriptAction( scriptaction ); } } @@ -124,12 +124,12 @@ void KexiScriptPart::initPartActions() // scripting-plugin depends on this instance and loading the plugin will // fail if it's not avaiable. if(! Kross::Api::Manager::scriptManager()->hasChild("KexiMainWindow")) { - Kross::Api::Manager::scriptManager()->addQObject(m_mainWin, "KexiMainWindow"); + Kross::Api::Manager::scriptManager()->addTQObject(TQT_TQOBJECT(m_mainWin), "KexiMainWindow"); // Add the KAction's provided by the ScriptGUIClient to the // KexiMainWindow. //FIXME: fix+use createSharedPartAction() whyever it doesn't work as expected right now... - QPopupMenu* popup = m_mainWin->findPopupMenu("tools"); + TQPopupMenu* popup = m_mainWin->findPopupMenu("tools"); if(popup) { KAction* execscriptaction = d->scriptguiclient->action("executescriptfile"); if(execscriptaction) @@ -159,9 +159,9 @@ void KexiScriptPart::initInstanceActions() createSharedAction(Kexi::DesignViewMode, i18n("Configure Editor..."), "configure", 0, "script_config_editor"); } -KexiViewBase* KexiScriptPart::createView(QWidget *parent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, QMap<QString,QString>*) +KexiViewBase* KexiScriptPart::createView(TQWidget *tqparent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, TQMap<TQString,TQString>*) { - QString partname = item.name(); + TQString partname = item.name(); if( ! partname.isNull() ) { KexiMainWindow *win = dialog->mainWin(); if(!win || !win->project() || !win->project()->dbConnection()) @@ -181,13 +181,13 @@ KexiViewBase* KexiScriptPart::createView(QWidget *parent, KexiDialogBase* dialog } if(viewMode == Kexi::DesignViewMode) { - return new KexiScriptDesignView(win, parent, scriptaction); + return new KexiScriptDesignView(win, tqparent, scriptaction); } } return 0; } -QString KexiScriptPart::i18nMessage(const QCString& englishMessage) const +TQString KexiScriptPart::i18nMessage(const TQCString& englishMessage) const { if (englishMessage=="Design of object \"%1\" has been modified.") return i18n("Design of script \"%1\" has been modified."); |