summaryrefslogtreecommitdiffstats
path: root/languages/python
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /languages/python
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/python')
-rw-r--r--languages/python/pydoc.cpp12
-rw-r--r--languages/python/pydoc.h14
-rw-r--r--languages/python/pythonconfigwidget.cpp6
-rw-r--r--languages/python/pythonconfigwidget.h6
-rw-r--r--languages/python/pythonimplementationwidget.cpp36
-rw-r--r--languages/python/pythonimplementationwidget.h4
-rw-r--r--languages/python/pythonsupportpart.cpp120
-rw-r--r--languages/python/pythonsupportpart.h20
-rw-r--r--languages/python/qtdesignerpythonintegration.cpp10
9 files changed, 114 insertions, 114 deletions
diff --git a/languages/python/pydoc.cpp b/languages/python/pydoc.cpp
index 79f184d7..4b70e170 100644
--- a/languages/python/pydoc.cpp
+++ b/languages/python/pydoc.cpp
@@ -5,7 +5,7 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kstandarddirs.h>
#include <kinstance.h>
#include <kprocess.h>
@@ -16,7 +16,7 @@
using namespace KIO;
-PydocProtocol::PydocProtocol(const QCString &pool, const QCString &app)
+PydocProtocol::PydocProtocol(const TQCString &pool, const TQCString &app)
: SlaveBase("pydoc", pool, app), key()
{
python = KGlobal::dirs()->findExe("python");
@@ -33,7 +33,7 @@ void PydocProtocol::get(const KURL& url)
mimeType("text/html");
key = url.path();
- QString cmd = KProcess::quote(python);
+ TQString cmd = KProcess::quote(python);
cmd += " ";
cmd += KProcess::quote(script);
cmd += " -w ";
@@ -41,7 +41,7 @@ void PydocProtocol::get(const KURL& url)
FILE *fd = popen(cmd.local8Bit().data(), "r");
char buffer[4096];
- QByteArray array;
+ TQByteArray array;
while (!feof(fd)) {
int n = fread(buffer, 1, 2048, fd);
@@ -66,9 +66,9 @@ void PydocProtocol::mimetype(const KURL&)
}
-QCString PydocProtocol::errorMessage()
+TQCString PydocProtocol::errorMessage()
{
- return QCString( "<html><body bgcolor=\"#FFFFFF\">" + i18n("Error in pydoc").local8Bit() + "</body></html>" );
+ return TQCString( "<html><body bgcolor=\"#FFFFFF\">" + i18n("Error in pydoc").local8Bit() + "</body></html>" );
}
diff --git a/languages/python/pydoc.h b/languages/python/pydoc.h
index e17a257a..9e848a04 100644
--- a/languages/python/pydoc.h
+++ b/languages/python/pydoc.h
@@ -1,14 +1,14 @@
#ifndef _PYDOC_H_
#define _PYDOC_H_
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/slavebase.h>
class PydocProtocol : public KIO::SlaveBase
{
public:
- PydocProtocol(const QCString &pool, const QCString &app);
+ PydocProtocol(const TQCString &pool, const TQCString &app);
virtual ~PydocProtocol();
virtual void get(const KURL& url);
@@ -18,13 +18,13 @@ public:
protected:
void decodeURL(const KURL &url);
- void decodePath(QString path);
- QCString errorMessage();
+ void decodePath(TQString path);
+ TQCString errorMessage();
private:
- QString python;
- QString script;
- QString key;
+ TQString python;
+ TQString script;
+ TQString key;
};
#endif
diff --git a/languages/python/pythonconfigwidget.cpp b/languages/python/pythonconfigwidget.cpp
index 87472477..29103705 100644
--- a/languages/python/pythonconfigwidget.cpp
+++ b/languages/python/pythonconfigwidget.cpp
@@ -11,13 +11,13 @@
#include "pythonconfigwidget.h"
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <klineedit.h>
#include "domutil.h"
-PythonConfigWidget::PythonConfigWidget(QDomDocument &projectDom,
- QWidget *parent, const char *name)
+PythonConfigWidget::PythonConfigWidget(TQDomDocument &projectDom,
+ TQWidget *parent, const char *name)
: PythonConfigWidgetBase(parent, name), dom(projectDom)
{
interpreter_edit->setText(DomUtil::readEntry(dom, "/kdevpythonsupport/run/interpreter"));
diff --git a/languages/python/pythonconfigwidget.h b/languages/python/pythonconfigwidget.h
index 22708c29..674b8e3c 100644
--- a/languages/python/pythonconfigwidget.h
+++ b/languages/python/pythonconfigwidget.h
@@ -13,7 +13,7 @@
#define _PYTHONCONFIGWIDGET_H_
#include "pythonconfigwidgetbase.h"
-#include <qdom.h>
+#include <tqdom.h>
class PythonConfigWidget : public PythonConfigWidgetBase
@@ -21,14 +21,14 @@ class PythonConfigWidget : public PythonConfigWidgetBase
Q_OBJECT
public:
- PythonConfigWidget( QDomDocument &projectDom, QWidget *parent=0, const char *name=0 );
+ PythonConfigWidget( TQDomDocument &projectDom, TQWidget *parent=0, const char *name=0 );
~PythonConfigWidget();
public slots:
void accept();
private:
- QDomDocument &dom;
+ TQDomDocument &dom;
};
#endif
diff --git a/languages/python/pythonimplementationwidget.cpp b/languages/python/pythonimplementationwidget.cpp
index 439c7706..9aba5441 100644
--- a/languages/python/pythonimplementationwidget.cpp
+++ b/languages/python/pythonimplementationwidget.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
#include "pythonimplementationwidget.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
#include <klineedit.h>
#include <klocale.h>
@@ -34,7 +34,7 @@
#include <kdevproject.h>
PythonImplementationWidget::PythonImplementationWidget(KDevLanguageSupport* part,
- QWidget* parent, const char* name, bool modal)
+ TQWidget* parent, const char* name, bool modal)
: ImplementationWidget(part, parent, name, modal)
{
}
@@ -45,31 +45,31 @@ PythonImplementationWidget::~PythonImplementationWidget()
}
-QStringList PythonImplementationWidget::createClassFiles()
+TQStringList PythonImplementationWidget::createClassFiles()
{
-// QString template_py = "require '$BASEFILENAME$'\n\nclass $CLASSNAME$ < $BASECLASSNAME$\n\n def initialize(*k)\n super(*k)\n end\n\nend\n";
- QString template_py = "from qt import *\nfrom $BASEFILENAME$ import *\nclass $CLASSNAME$($BASECLASSNAME$):\n\n def __init__(self,parent,name):\n $BASECLASSNAME$.__init__(self,parent,name)\n \n\n\n";
+// TQString template_py = "require '$BASEFILENAME$'\n\nclass $CLASSNAME$ < $BASECLASSNAME$\n\n def initialize(*k)\n super(*k)\n end\n\nend\n";
+ TQString template_py = "from qt import *\nfrom $BASEFILENAME$ import *\nclass $CLASSNAME$($BASECLASSNAME$):\n\n def __init__(self,parent,name):\n $BASECLASSNAME$.__init__(self,parent,name)\n \n\n\n";
- QFileInfo formInfo(m_formName);
- template_py.replace(QRegExp("\\$BASEFILENAME\\$"), formInfo.baseName()+".py");
- template_py.replace(QRegExp("\\$CLASSNAME\\$"), classNameEdit->text());
- template_py.replace(QRegExp("\\$BASECLASSNAME\\$"), m_baseClassName);
+ TQFileInfo formInfo(m_formName);
+ template_py.replace(TQRegExp("\\$BASEFILENAME\\$"), formInfo.baseName()+".py");
+ template_py.replace(TQRegExp("\\$CLASSNAME\\$"), classNameEdit->text());
+ template_py.replace(TQRegExp("\\$BASECLASSNAME\\$"), m_baseClassName);
template_py = FileTemplate::read(m_part, "py") + template_py;
- QString file_py = fileNameEdit->text() + ".py";
+ TQString file_py = fileNameEdit->text() + ".py";
if (!m_part->project()->activeDirectory().isEmpty())
file_py = m_part->project()->activeDirectory() + "/" + file_py;
- QFile file(QDir::cleanDirPath(m_part->project()->projectDirectory() + "/" + file_py));
+ TQFile file(TQDir::cleanDirPath(m_part->project()->projectDirectory() + "/" + file_py));
if (!file.open(IO_WriteOnly)) {
KMessageBox::error(0, i18n("Cannot write to file"));
- return QStringList();
+ return TQStringList();
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << template_py;
file.close();
- QStringList files;
+ TQStringList files;
files.append(file_py);
return files;
}
diff --git a/languages/python/pythonimplementationwidget.h b/languages/python/pythonimplementationwidget.h
index e767ecc9..e8838bab 100644
--- a/languages/python/pythonimplementationwidget.h
+++ b/languages/python/pythonimplementationwidget.h
@@ -26,11 +26,11 @@ class PythonImplementationWidget : public ImplementationWidget
{
Q_OBJECT
public:
- PythonImplementationWidget(KDevLanguageSupport* part, QWidget* parent = 0, const char* name = 0, bool modal = true);
+ PythonImplementationWidget(KDevLanguageSupport* part, TQWidget* parent = 0, const char* name = 0, bool modal = true);
~PythonImplementationWidget();
- virtual QStringList createClassFiles();
+ virtual TQStringList createClassFiles();
};
diff --git a/languages/python/pythonsupportpart.cpp b/languages/python/pythonsupportpart.cpp
index 1b0e76da..9e6b0b0c 100644
--- a/languages/python/pythonsupportpart.cpp
+++ b/languages/python/pythonsupportpart.cpp
@@ -19,12 +19,12 @@
#include <codemodel.h>
#include <domutil.h>
-#include <qfileinfo.h>
-#include <qpopupmenu.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqfileinfo.h>
+#include <tqpopupmenu.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
#include <kaction.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -33,7 +33,7 @@
#include <kdevplugininfo.h>
#include <kinputdialog.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "qtdesignerpythonintegration.h"
#include "pythonimplementationwidget.h"
@@ -42,44 +42,44 @@ typedef KDevGenericFactory<PythonSupportPart> PythonSupportFactory;
static const KDevPluginInfo data("kdevpythonsupport");
K_EXPORT_COMPONENT_FACTORY( libkdevpythonsupport, PythonSupportFactory( data ) )
-PythonSupportPart::PythonSupportPart(QObject *parent, const char *name, const QStringList &)
+PythonSupportPart::PythonSupportPart(TQObject *parent, const char *name, const TQStringList &)
: KDevLanguageSupport(&data, parent, name ? name : "PythonSupportPart")
{
setInstance(PythonSupportFactory::instance());
setXMLFile("kdevpythonsupport.rc");
- connect( core(), SIGNAL(projectOpened()), this, SLOT(projectOpened()) );
- connect( core(), SIGNAL(projectClosed()), this, SLOT(projectClosed()) );
- connect( partController(), SIGNAL(savedFile(const KURL&)),
- this, SLOT(savedFile(const KURL&)) );
- connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)),
- this, SLOT(projectConfigWidget(KDialogBase*)) );
- connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)),
- this, SLOT(contextMenu(QPopupMenu *, const Context *)) );
+ connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) );
+ connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) );
+ connect( partController(), TQT_SIGNAL(savedFile(const KURL&)),
+ this, TQT_SLOT(savedFile(const KURL&)) );
+ connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)),
+ this, TQT_SLOT(projectConfigWidget(KDialogBase*)) );
+ connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)),
+ this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) );
KAction *action;
action = new KAction( i18n("Execute Program"), "exec", 0,
- this, SLOT(slotExecute()),
+ this, TQT_SLOT(slotExecute()),
actionCollection(), "build_exec" );
action->setToolTip( i18n("Execute program") );
action->setWhatsThis(i18n("<b>Execute program</b><p>Runs the Python program."));
action = new KAction( i18n("Execute String..."), "exec", 0,
- this, SLOT(slotExecuteString()),
+ this, TQT_SLOT(slotExecuteString()),
actionCollection(), "build_execstring" );
action->setToolTip( i18n("Execute string") );
action->setWhatsThis(i18n("<b>Execute String</b><p>Executes a string as Python code."));
action = new KAction( i18n("Start Python Interpreter"), "exec", 0,
- this, SLOT(slotStartInterpreter()),
+ this, TQT_SLOT(slotStartInterpreter()),
actionCollection(), "build_runinterpreter" );
action->setToolTip( i18n("Start Python interpreter") );
action->setWhatsThis(i18n("<b>Start python interpreter</b><p>Starts the Python interpreter without a program"));
action = new KAction( i18n("Python Documentation..."), 0,
- this, SLOT(slotPydoc()),
+ this, TQT_SLOT(slotPydoc()),
actionCollection(), "help_pydoc" );
action->setToolTip( i18n("Python documentation") );
action->setWhatsThis(i18n("<b>Python documentation</b><p>Shows a Python documentation page."));
@@ -90,7 +90,7 @@ PythonSupportPart::~PythonSupportPart()
{}
-void PythonSupportPart::contextMenu(QPopupMenu *popup, const Context *context)
+void PythonSupportPart::contextMenu(TQPopupMenu *popup, const Context *context)
{
if (context->hasType(Context::FileContext)){
const FileContext *fc = static_cast<const FileContext*>(context);
@@ -99,7 +99,7 @@ void PythonSupportPart::contextMenu(QPopupMenu *popup, const Context *context)
if (url.fileName().endsWith(".ui"))
{
m_contextFileName = url.fileName();
- int id = popup->insertItem(i18n("Create or Select Implementation..."), this, SLOT(slotCreateSubclass()));
+ int id = popup->insertItem(i18n("Create or Select Implementation..."), this, TQT_SLOT(slotCreateSubclass()));
popup->setWhatsThis(id, i18n("<b>Create or select implementation</b><p>Creates or selects a subclass of selected form for use with integrated KDevDesigner."));
}
}
@@ -108,9 +108,9 @@ void PythonSupportPart::contextMenu(QPopupMenu *popup, const Context *context)
void PythonSupportPart::projectConfigWidget(KDialogBase *dlg)
{
- QVBox *vbox = dlg->addVBoxPage(i18n("Python"));
+ TQVBox *vbox = dlg->addVBoxPage(i18n("Python"));
PythonConfigWidget *w = new PythonConfigWidget(*projectDom(), vbox, "python config widget");
- connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) );
+ connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) );
}
@@ -118,14 +118,14 @@ void PythonSupportPart::projectOpened()
{
kdDebug(9014) << "projectOpened()" << endl;
- connect( project(), SIGNAL(addedFilesToProject(const QStringList &)),
- this, SLOT(addedFilesToProject(const QStringList &)) );
- connect( project(), SIGNAL(removedFilesFromProject(const QStringList &)),
- this, SLOT(removedFilesFromProject(const QStringList &)) );
+ connect( project(), TQT_SIGNAL(addedFilesToProject(const TQStringList &)),
+ this, TQT_SLOT(addedFilesToProject(const TQStringList &)) );
+ connect( project(), TQT_SIGNAL(removedFilesFromProject(const TQStringList &)),
+ this, TQT_SLOT(removedFilesFromProject(const TQStringList &)) );
// We want to parse only after all components have been
// properly initialized
- QTimer::singleShot(0, this, SLOT(initialParse()));
+ TQTimer::singleShot(0, this, TQT_SLOT(initialParse()));
}
@@ -134,9 +134,9 @@ void PythonSupportPart::projectClosed()
}
-void PythonSupportPart::maybeParse(const QString fileName)
+void PythonSupportPart::maybeParse(const TQString fileName)
{
- QFileInfo fi(fileName);
+ TQFileInfo fi(fileName);
if (fi.extension() == "py") {
if( codeModel()->hasFile(fileName) ){
@@ -155,8 +155,8 @@ void PythonSupportPart::initialParse()
if (project()) {
kapp->setOverrideCursor(waitCursor);
- QStringList files = project()->allFiles();
- for (QStringList::Iterator it = files.begin(); it != files.end() ;++it) {
+ TQStringList files = project()->allFiles();
+ for (TQStringList::Iterator it = files.begin(); it != files.end() ;++it) {
kdDebug(9014) << "maybe parse " << project()->projectDirectory() + "/" + (*it) << endl;
maybeParse(project()->projectDirectory() + "/" + *it);
}
@@ -169,15 +169,15 @@ void PythonSupportPart::initialParse()
}
-void PythonSupportPart::addedFilesToProject(const QStringList &fileList)
+void PythonSupportPart::addedFilesToProject(const TQStringList &fileList)
{
kdDebug(9014) << "addedFilesToProject()" << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = fileList.begin(); it != fileList.end(); ++it )
{
- QString fileName = project()->projectDirectory() + "/" + ( *it );
+ TQString fileName = project()->projectDirectory() + "/" + ( *it );
maybeParse( fileName );
emit addedSourceInfo( fileName );
}
@@ -186,15 +186,15 @@ void PythonSupportPart::addedFilesToProject(const QStringList &fileList)
}
-void PythonSupportPart::removedFilesFromProject(const QStringList &fileList)
+void PythonSupportPart::removedFilesFromProject(const TQStringList &fileList)
{
kdDebug(9014) << "removedFilesFromProject()" << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = fileList.begin(); it != fileList.end(); ++it )
{
- QString fileName = project()->projectDirectory() + "/" + ( *it );
+ TQString fileName = project()->projectDirectory() + "/" + ( *it );
if( codeModel()->hasFile(fileName) ){
emit aboutToRemoveSourceInfo( fileName );
@@ -237,22 +237,22 @@ KMimeType::List PythonSupportPart::mimeTypes( )
return list;
}
-void PythonSupportPart::parse(const QString &fileName)
+void PythonSupportPart::parse(const TQString &fileName)
{
- QFile f(QFile::encodeName(fileName));
+ TQFile f(TQFile::encodeName(fileName));
if (!f.open(IO_ReadOnly))
return;
- QTextStream stream(&f);
+ TQTextStream stream(&f);
- QRegExp classre("^[ \t]*class[ \t]+([A-Za-z0-9_]+)[ \t]*(\\(([A-Za-z0-9_, \t]+)\\))?.*$");
- QRegExp methodre("^[ \t]*def[ \t]+([A-Za-z0-9_]+).*$");
+ TQRegExp classre("^[ \t]*class[ \t]+([A-Za-z0-9_]+)[ \t]*(\\(([A-Za-z0-9_, \t]+)\\))?.*$");
+ TQRegExp methodre("^[ \t]*def[ \t]+([A-Za-z0-9_]+).*$");
FileDom m_file = codeModel()->create<FileModel>();
m_file->setName( fileName );
ClassDom lastClass;
- QString rawline;
- QCString line;
+ TQString rawline;
+ TQCString line;
int lineNo = 0;
while (!stream.atEnd()) {
rawline = stream.readLine();
@@ -264,10 +264,10 @@ void PythonSupportPart::parse(const QString &fileName)
lastClass->setFileName( fileName );
lastClass->setStartPosition( lineNo, 0 );
- QStringList parentList = QStringList::split(",", classre.cap(3));
- QStringList::ConstIterator it;
+ TQStringList parentList = TQStringList::split(",", classre.cap(3));
+ TQStringList::ConstIterator it;
for (it = parentList.begin(); it != parentList.end(); ++it) {
- QString baseName = (*it).stripWhiteSpace();
+ TQString baseName = (*it).stripWhiteSpace();
kdDebug(9014) << "Add parent" << baseName << endl;
lastClass->addBaseClass( baseName );
}
@@ -296,7 +296,7 @@ void PythonSupportPart::parse(const QString &fileName)
if (lastClass && rawline.left(3) != "def") {
if( !lastClass->hasFunction(method->name()) )
lastClass->addFunction( method );
- QStringList scope;
+ TQStringList scope;
scope << lastClass->name();
method->setScope( scope );
@@ -314,9 +314,9 @@ void PythonSupportPart::parse(const QString &fileName)
}
-QString PythonSupportPart::interpreter()
+TQString PythonSupportPart::interpreter()
{
- QString prog = DomUtil::readEntry(*projectDom(), "/kdevpythonsupport/run/interpreter");
+ TQString prog = DomUtil::readEntry(*projectDom(), "/kdevpythonsupport/run/interpreter");
if (prog.isEmpty())
prog = "python";
@@ -324,18 +324,18 @@ QString PythonSupportPart::interpreter()
}
-void PythonSupportPart::startApplication(const QString &program)
+void PythonSupportPart::startApplication(const TQString &program)
{
bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevpythonsupport/run/terminal");
if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("KDevelop/AppFrontend"))
- appFrontend->startAppCommand(QString::QString(), program, inTerminal);
+ appFrontend->startAppCommand(TQString::TQString(), program, inTerminal);
}
void PythonSupportPart::slotExecute()
{
- QString program = project()->mainProgram();
- QString cmd = interpreter() + " " + program;
+ TQString program = project()->mainProgram();
+ TQString cmd = interpreter() + " " + program;
startApplication(cmd);
}
@@ -349,7 +349,7 @@ void PythonSupportPart::slotStartInterpreter()
void PythonSupportPart::slotExecuteString()
{
bool ok;
- QString cmd = KInputDialog::getText(i18n("String to Execute"), i18n("String to execute:"), QString::null, &ok, 0);
+ TQString cmd = KInputDialog::getText(i18n("String to Execute"), i18n("String to execute:"), TQString::null, &ok, 0);
if (ok) {
cmd.prepend("'");
cmd.append("'");
@@ -361,9 +361,9 @@ void PythonSupportPart::slotExecuteString()
void PythonSupportPart::slotPydoc()
{
bool ok;
- QString key = KInputDialog::getText(i18n("Show Python Documentation"), i18n("Show Python documentation on keyword:"), "", &ok, 0);
+ TQString key = KInputDialog::getText(i18n("Show Python Documentation"), i18n("Show Python documentation on keyword:"), "", &ok, 0);
if (ok && !key.isEmpty()) {
- QString url = "pydoc:";
+ TQString url = "pydoc:";
url += key;
partController()->showDocument(KURL(url));
}
@@ -394,7 +394,7 @@ KDevDesignerIntegration *PythonSupportPart::designer(KInterfaceDesigner::Designe
void PythonSupportPart::slotCreateSubclass()
{
- QFileInfo fi(m_contextFileName);
+ TQFileInfo fi(m_contextFileName);
kdDebug(9014) << k_funcinfo << " file: " << m_contextFileName << " ext: " << fi.extension(false) << endl;
if (fi.extension(false) != "ui")
return;
diff --git a/languages/python/pythonsupportpart.h b/languages/python/pythonsupportpart.h
index ad2085e5..efa6f51c 100644
--- a/languages/python/pythonsupportpart.h
+++ b/languages/python/pythonsupportpart.h
@@ -25,13 +25,13 @@ class PythonSupportPart : public KDevLanguageSupport
Q_OBJECT
public:
- PythonSupportPart( QObject *parent, const char *name, const QStringList & );
+ PythonSupportPart( TQObject *parent, const char *name, const TQStringList & );
~PythonSupportPart();
virtual KDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type);
public slots:
- void contextMenu(QPopupMenu *popup, const Context *context);
+ void contextMenu(TQPopupMenu *popup, const Context *context);
void slotCreateSubclass();
protected:
@@ -43,8 +43,8 @@ private slots:
void projectOpened();
void projectClosed();
void savedFile(const KURL &fileName);
- void addedFilesToProject(const QStringList &fileList);
- void removedFilesFromProject(const QStringList &fileList);
+ void addedFilesToProject(const TQStringList &fileList);
+ void removedFilesFromProject(const TQStringList &fileList);
void slotExecute();
void slotExecuteString();
void slotStartInterpreter();
@@ -54,13 +54,13 @@ private slots:
void slotPydoc();
private:
- QString interpreter();
- void startApplication(const QString &program);
- void maybeParse(const QString fileName);
- void parse(const QString &fileName);
+ TQString interpreter();
+ void startApplication(const TQString &program);
+ void maybeParse(const TQString fileName);
+ void parse(const TQString &fileName);
- QMap<KInterfaceDesigner::DesignerType, KDevDesignerIntegration*> m_designers;
- QString m_contextFileName;
+ TQMap<KInterfaceDesigner::DesignerType, KDevDesignerIntegration*> m_designers;
+ TQString m_contextFileName;
};
#endif
diff --git a/languages/python/qtdesignerpythonintegration.cpp b/languages/python/qtdesignerpythonintegration.cpp
index a4e324ed..53950f65 100644
--- a/languages/python/qtdesignerpythonintegration.cpp
+++ b/languages/python/qtdesignerpythonintegration.cpp
@@ -19,8 +19,8 @@
***************************************************************************/
#include "qtdesignerpythonintegration.h"
-#include <qpair.h>
-#include <qregexp.h>
+#include <tqpair.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -55,7 +55,7 @@ void QtDesignerPythonIntegration::addFunctionToClass(KInterfaceDesigner::Functio
KTextEditor::EditInterface* editIface = dynamic_cast<KTextEditor::EditInterface*>( m_part->partController()->activePart() );
if( !editIface ){
/// @todo show messagebox
-// QDialog::accept();
+// TQDialog::accept();
return;
}
@@ -77,9 +77,9 @@ void QtDesignerPythonIntegration::addFunctionToClass(KInterfaceDesigner::Functio
point.second = funEndColumn;
}
- QString func = function.function;
+ TQString func = function.function;
func.replace("()", "");
- QString str = " def " + func + "(self):\n\n";
+ TQString str = " def " + func + "(self):\n\n";
kdDebug(9014) << "insert " << str << " into " << point.first << endl;