Here I still wonder if it's normal to have such
large central/global conditional constructs with
many hard-wired logic which really belongs to
other/different parts of this package.
Isn't there a more generic, or modular solution
to this problem?
Brgds,
Viktor
On 2010 Feb 22, at 18:14, Franček Prijatelj wrote:
>
> Hi Pritpal
>
> Here is an error compiling with MSVC8:
>
> cl.exe -I. -I../../../../../include -nologo -TP -W4 -wd4127 -Ot2b1 -EHs-c-
> -Zi -DHB_LEGACY_TYPES_OFF -DUNICODE -DHB_TR_LEVEL_DEBUG
> -IC:\Qt\msvc\include -IC:\Qt\msvc\include/QtCore -IC:\Qt\msvc\include/QtGui
> -IC:\Qt\msvc\include/QtNetwork -Fohbqt_hbslots.obj -c
> ../../../hbqt_hbslots.cpp
> hbqt_hbslots.cpp
> ../../../hbqt_hbslots.cpp(207) : fatal error C1061: compiler limit : blocks
> nested too deeply
> mingw32-make[3]: [hbqt_hbslots.obj] Error 2 (ignored)
>
> MSVC allows only 128 "if else if" nesting depth.
>
> There is a better solution (working and more optimal)
> Remove all else statements like:
>
>
> static bool connect_signal( QString signal, QObject * object, HBSlots *
> t_slots )
> {
> if( signal == ( QString ) "customContextMenuRequested(QPoint)" ) return
> object->connect( object, SIGNAL( customContextMenuRequested( const QPoint &
> ) ), t_slots, SLOT( customContextMenuRequested( const
> QPoint & ) ), Qt::AutoConnection );
> if( signal == ( QString ) "clicked()" ) return
> object->connect( object, SIGNAL( clicked()
>
> ), t_slots, SLOT( clicked()
>
> ), Qt::AutoConnection );
> if( signal == ( QString ) "returnPressed()" ) return
> object->connect( object, SIGNAL( returnPressed()
>
> ), t_slots, SLOT( returnPressed()
>
> ), Qt::AutoConnection );
> .
> .
> .
> return false;
> }
>
> static bool disconnect_signal( QObject * object, const char * signal )
> {
> if( signal == ( QString ) "customContextMenuRequested(QPoint)" ) return
> object->disconnect( SIGNAL( customContextMenuRequested( const QPoint & )
>
> ) );
> if( signal == ( QString ) "clicked()" ) return
> object->disconnect( SIGNAL( clicked()
>
> ) );
> if( signal == ( QString ) "returnPressed()" ) return
> object->disconnect( SIGNAL( returnPressed()
>
> ) );
> .
> .
> .
> return false;
> }
>
>
> BRGDS
> Franček
>
> --
> View this message in context:
> http://old.nabble.com/SF.net-SVN%3A-harbour-project%3A-13952--trunk-harbour-tp27682361p27690720.html
> Sent from the Harbour - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour