From fd7fafe596e69ec14b8d3097d679fb043b37fa32 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 28 Oct 2010 22:52:23 +0000 Subject: [PATCH] 2010-10-29 00:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/qtcore/hbqt_hbqslots.cpp * __HBQT_SLOTS_DISCONNECT() - Fixed a variable name to match real content (slot -> pszSignal) % __HBQT_SLOTS_CONNECT() - Synced with disconnect, added local variable to avoid double hb_parcx() calls. --- harbour/ChangeLog | 7 +++++++ harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp | 15 ++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 94241e02a8..52ac5c91ef 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,13 @@ The license applies to all entries newer than 2009-04-28. */ +2010-10-29 00:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbqt/qtcore/hbqt_hbqslots.cpp + * __HBQT_SLOTS_DISCONNECT() - Fixed a variable name + to match real content (slot -> pszSignal) + % __HBQT_SLOTS_CONNECT() - Synced with disconnect, + added local variable to avoid double hb_parcx() calls. + 2010-10-29 00:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/win_os.prg * Reverted 2010-10-22 19:08 UTC+0200 diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp index adeae5008f..9016ac92ba 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp @@ -207,10 +207,12 @@ HB_FUNC( __HBQT_SLOTS_CONNECT ) PHB_ITEM pBlock = hb_itemNew( hb_param( 4, HB_IT_BLOCK ) ); /* get codeblock */ if( pBlock ) { - int i = object->property( hb_parcx( 3 ) ).toInt(); + const char * pszSignal = hb_parcx( 3 ); + + int i = object->property( pszSignal ).toInt(); if( i == 0 ) { - QString signal = hb_parcx( 3 ); + QString signal = pszSignal; QByteArray theSignal = QMetaObject::normalizedSignature( signal.toAscii() ); if( QMetaObject::checkConnectArgs( theSignal, theSignal ) ) @@ -273,15 +275,14 @@ HB_FUNC( __HBQT_SLOTS_DISCONNECT ) QObject * object = ( QObject * ) hbqt_pPtrFromObj( 2 ); if( object ) { - const char * slot = hb_parcx( 3 ); - - int i = object->property( slot ).toInt(); + const char * pszSignal = hb_parcx( 3 ); + int i = object->property( pszSignal ).toInt(); if( i > 0 && i <= t_slots->listBlock.size() ) { - object->setProperty( slot, QVariant() ); + object->setProperty( pszSignal, QVariant() ); - QString signal = ( QString ) slot; + QString signal = pszSignal; QByteArray theSignal = signal.toAscii(); int signalId = object->metaObject()->indexOfSignal( QMetaObject::normalizedSignature( theSignal ) );