Convert QT to TQT in 'kdedistutils.py'

pull/1/head
Francois Andriot 11 years ago committed by Slávek Banko
parent 7a6d6362cf
commit 4997bbf9b9

@ -892,7 +892,7 @@ static TDECModule *report_error(char *msg) {
return NULL;
}
static TDECModule* return_instance( QWidget *parent, const char *name ) {
static TDECModule* return_instance( TQWidget *parent, const char *name ) {
TDECModule* tdecmodule;
PyObject *pyTDECModuleTuple;
PyObject *pyTDECModule;
@ -901,7 +901,7 @@ static TDECModule* return_instance( QWidget *parent, const char *name ) {
// Try to determine what py script we're loading. Note that "name"
// typically appears to be NULL.
QString script(MODULE_NAME);
TQString script(MODULE_NAME);
// Reload libpython, but this time tell the runtime linker to make the
// symbols global and available for later loaded libraries/module.
@ -914,8 +914,8 @@ static TDECModule* return_instance( QWidget *parent, const char *name ) {
}
// Add the path to the python script to the interpreter search path.
QString path = QString(MODULE_DIR);
if(path == QString::null) {
TQString path = TQString(MODULE_DIR);
if(path == TQString::null) {
return report_error ("***Failed to locate script path");
}
if(!pyize->appendToSysPath (path.latin1 ())) {
@ -930,14 +930,14 @@ static TDECModule* return_instance( QWidget *parent, const char *name ) {
}
// Inject a helper function
QString bridge = QString("import sip\n"
TQString bridge = TQString("import sip\n"
"import qt\n"
"def kcontrol_bridge_" FACTORY "(parent,name):\n"
" if parent!=0:\n"
#if SIP_VERSION >= 0x040200
" wparent = sip.wrapinstance(parent,qt.QWidget)\n"
" wparent = sip.wrapinstance(parent,qt.TQWidget)\n"
#else
" wparent = sip.wrapinstance(parent,'QWidget')\n"
" wparent = sip.wrapinstance(parent,'TQWidget')\n"
#endif
" else:\n"
" wparent = None\n"
@ -997,7 +997,7 @@ static TDECModule* return_instance( QWidget *parent, const char *name ) {
extern "C" {
// Factory function that kcontrol will call.
TDECModule* CPP_FACTORY(QWidget *parent, const char *name) {
TDECModule* CPP_FACTORY(TQWidget *parent, const char *name) {
return return_instance(parent, name);
}
}

Loading…
Cancel
Save