Hello Germain,
again a small, but annoying bug in puic and I think
formerly also
in uic (that's the reason it is in puic).
The problem:
When using Database objects like QDataTables puic
always produces statements like:
dbTier->{_strlist} = ['praxis_con', 'Tier'];
dbTier->setProperty("database",Qt::Variant(dbTier->{_strlist}));
These statements are unnecessary and result in a
warning during runtime:
QDataBrowser::setProperty( "database", value ) failed:
property invalid, read-only or does not exist
By comparing object.cpp in PerlQt3.006 and the Qt3.1.1
object.cpp
I found one very "enlightening" statement in the
"original":
object.cpp
146 if ( prop == "database" )
147 continue;
And thats what I put to line 180 of your object.cpp
which removes the
"dbTier->setProperty("database",
Qt::Variant(dbTier->{_strlist}));" line.
The "dbTier->{_strlist} = ['praxis_con', 'Tier'];"
remains, but does not result
in error messages.
Thanks,
Michael
Logged In: YES
user_id=145773
Hello Michael :)
Good one, thanks!
We can even skip the useless stringlist by putting the statement before the
setObjectProperty call.