|
Lines 892-898
Link Here
|
| 892 |
return NULL; |
892 |
return NULL; |
| 893 |
} |
893 |
} |
| 894 |
|
894 |
|
| 895 |
static TDECModule* return_instance( QWidget *parent, const char *name ) { |
895 |
static TDECModule* return_instance( TQWidget *parent, const char *name ) { |
| 896 |
TDECModule* tdecmodule; |
896 |
TDECModule* tdecmodule; |
| 897 |
PyObject *pyTDECModuleTuple; |
897 |
PyObject *pyTDECModuleTuple; |
| 898 |
PyObject *pyTDECModule; |
898 |
PyObject *pyTDECModule; |
|
Lines 901-907
Link Here
|
| 901 |
|
901 |
|
| 902 |
// Try to determine what py script we're loading. Note that "name" |
902 |
// Try to determine what py script we're loading. Note that "name" |
| 903 |
// typically appears to be NULL. |
903 |
// typically appears to be NULL. |
| 904 |
QString script(MODULE_NAME); |
904 |
TQString script(MODULE_NAME); |
| 905 |
|
905 |
|
| 906 |
// Reload libpython, but this time tell the runtime linker to make the |
906 |
// Reload libpython, but this time tell the runtime linker to make the |
| 907 |
// symbols global and available for later loaded libraries/module. |
907 |
// symbols global and available for later loaded libraries/module. |
|
Lines 914-921
Link Here
|
| 914 |
} |
914 |
} |
| 915 |
|
915 |
|
| 916 |
// Add the path to the python script to the interpreter search path. |
916 |
// Add the path to the python script to the interpreter search path. |
| 917 |
QString path = QString(MODULE_DIR); |
917 |
TQString path = TQString(MODULE_DIR); |
| 918 |
if(path == QString::null) { |
918 |
if(path == TQString::null) { |
| 919 |
return report_error ("***Failed to locate script path"); |
919 |
return report_error ("***Failed to locate script path"); |
| 920 |
} |
920 |
} |
| 921 |
if(!pyize->appendToSysPath (path.latin1 ())) { |
921 |
if(!pyize->appendToSysPath (path.latin1 ())) { |
|
Lines 930-943
Link Here
|
| 930 |
} |
930 |
} |
| 931 |
|
931 |
|
| 932 |
// Inject a helper function |
932 |
// Inject a helper function |
| 933 |
QString bridge = QString("import sip\n" |
933 |
TQString bridge = TQString("import sip\n" |
| 934 |
"import qt\n" |
934 |
"import qt\n" |
| 935 |
"def kcontrol_bridge_" FACTORY "(parent,name):\n" |
935 |
"def kcontrol_bridge_" FACTORY "(parent,name):\n" |
| 936 |
" if parent!=0:\n" |
936 |
" if parent!=0:\n" |
| 937 |
#if SIP_VERSION >= 0x040200 |
937 |
#if SIP_VERSION >= 0x040200 |
| 938 |
" wparent = sip.wrapinstance(parent,qt.QWidget)\n" |
938 |
" wparent = sip.wrapinstance(parent,qt.TQWidget)\n" |
| 939 |
#else |
939 |
#else |
| 940 |
" wparent = sip.wrapinstance(parent,'QWidget')\n" |
940 |
" wparent = sip.wrapinstance(parent,'TQWidget')\n" |
| 941 |
#endif |
941 |
#endif |
| 942 |
" else:\n" |
942 |
" else:\n" |
| 943 |
" wparent = None\n" |
943 |
" wparent = None\n" |
|
Lines 997-1003
Link Here
|
| 997 |
|
997 |
|
| 998 |
extern "C" { |
998 |
extern "C" { |
| 999 |
// Factory function that kcontrol will call. |
999 |
// Factory function that kcontrol will call. |
| 1000 |
TDECModule* CPP_FACTORY(QWidget *parent, const char *name) { |
1000 |
TDECModule* CPP_FACTORY(TQWidget *parent, const char *name) { |
| 1001 |
return return_instance(parent, name); |
1001 |
return return_instance(parent, name); |
| 1002 |
} |
1002 |
} |
| 1003 |
} |
1003 |
} |