Fix a number of invalid references to temporary variables in python-trinity

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/python-trinity@1258860 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru v3.5.13
tpearson 13 years ago
parent 969673f24b
commit 83ee79237f

@ -136,7 +136,7 @@ private:
KMountPoint::List::Iterator it;
for( it = cList->begin(); it != cList->end(); ++it )
{
inst = sipConvertFromType(&(KMountPoint::Ptr)(*it), sipType_KMountPoint_Ptr, sipTransferObj);
inst = sipConvertFromType(static_cast<KMountPoint::Ptr>(*it), sipType_KMountPoint_Ptr, sipTransferObj);
if ((inst == NULL) || (PyList_Append (plist, inst) < 0))
{

@ -204,7 +204,8 @@ typedef QDict<int> IntDict;
while (it.current ())
{
PyObject *a0 = sipConvertFromInstance (&it.currentKey (), sipClass_QCString, sipTransferObj);
QString current_key = it.currentKey ();
PyObject *a0 = sipConvertFromInstance (&current_key, sipClass_QCString, sipTransferObj);
PyObject *a1 = PyInt_FromLong ((long) it.current ());
if ((a0 == NULL) || (a1 == NULL) || (PyDict_SetItem (dict, a0, a1) < 0))

@ -256,7 +256,8 @@ public:
%MethodCode
//returns (KFileMetaInfoItem)
//takes key | (QString)
sipRes = &((*sipCpp) [(const QString&) *a0]);
KFileMetaInfoItem sipResObj = ((*sipCpp) [*static_cast<const QString*>(a0)]);
sipRes = &sipResObj;
%End
%End
@ -339,7 +340,8 @@ public:
%MethodCode
//returns (KFileMetaInfoGroup)
//takes key | (QString)
sipRes = &((*sipCpp) [(const QString&)*a0]);
KFileMetaInfoGroup sipResObj = ((*sipCpp) [*static_cast<const QString*>(a0)]);
sipRes = &sipResObj;
%End
%End

@ -235,7 +235,8 @@ typedef QValueList<KService::Ptr> List;
KService::List::Iterator it;
for( it = cList->begin(); it != cList->end(); ++it )
{
svc = &(KService::Ptr)(*it);
KSharedPtr <KService> svcptr = static_cast<KService::Ptr>(*it);
svc = &svcptr;
inst = sipConvertFromType(svc, sipType_KService_Ptr, sipTransferObj);
if ((inst == NULL) || (PyList_Append (plist, inst) < 0))

@ -235,7 +235,8 @@ public:
KServiceGroup::List::Iterator it;
for( it = cList->begin(); it != cList->end(); ++it )
{
svcGroupType = &(KServiceGroup::SPtr)(*it);
KSharedPtr<KSycocaEntry> svcptr = static_cast<KServiceGroup::SPtr>(*it);
svcGroupType = &svcptr;
inst = sipConvertFromType(svcGroupType, sipType_KSycocaEntry_Ptr, sipTransferObj);
if ((inst == NULL) || (PyList_Append (plist, inst) < 0))

@ -240,7 +240,8 @@ protected:
QValueList<KServiceType::Ptr>::Iterator it;
for( it = cList->begin(); it != cList->end(); ++it )
{
svc = &(KServiceType::Ptr)(*it);
KSharedPtr <KServiceType> svcptr = static_cast<KServiceType::Ptr>(*it);
svc = &svcptr;
inst = sipConvertFromType(svc, sipType_KServiceType_Ptr, sipTransferObj);
if ((inst == NULL) || (PyList_Append (plist, inst) < 0))

@ -144,7 +144,8 @@ protected:
KSycocaEntry::List::Iterator it;
for( it = cList->begin(); it != cList->end(); ++it )
{
svc = &(KSycocaEntry::Ptr)(*it);
KSharedPtr<KSycocaEntry> svcptr = static_cast<KSycocaEntry::Ptr>(*it);
svc = &svcptr;
if (svc->data ()->sycocaType () == KST_KService)
{
svcType = (KSharedPtr<KService> *)svc;

@ -218,7 +218,8 @@ protected:
while (it.current ())
{
PyObject *a0 = sipConvertFromInstance (&it.currentKey (), sipClass_QString, sipTransferObj);
QString current_key = it.currentKey ();
PyObject *a0 = sipConvertFromInstance (&current_key, sipClass_QString, sipTransferObj);
PyObject *a1 = PyInt_FromLong ((long) it.current ());
if ((a0 == NULL) || (a1 == NULL) || (PyDict_SetItem (dict, a0, a1) < 0))

Loading…
Cancel
Save