Trolltech Home | QSA-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

QSA-interest Archive, April 2007
New bug introduced by a fix in qsa-1.1.5


Message 1 in thread

I upgraded from QSA 1.1.4 to QSA 1.1.5
I noticed one new bug was introduced - when calling slots of child
QObject in scripting, it said "No matching overload ...", however with
QSA 1.1.4 the exactly same code worked fine.

In my case, I have class gui::Base as "context" in QSInterpreter and
instance of gui::PageSpace (which is descendant of QWidget) presented
in scripting under name of "PageSpace".

When I called "PageSpace.refresh(document.getFirstPage(),document);"
in script it worked with qsa-1.1.4 and not worked (no matching
overload...) with qsa-1.1.5, though the matching overloads get listed
correctly.

I tracked down the issue to the code in kernel/quickobjects.cpp
In function qsToUObject (which is called form executeSlot) there were
some QS::isNaN tests added.
When I removed these tests (with patch I attached), everything started
to work fine

I guess these tests should fix the "Calling a slot with signature
(int) now reports an error if a string that is not a numeric string,
is passed as argument.", but they break calling other slots.

The patch reintroduces the bug, but it works ... I hope for some
better fix in 1.1.6 :)

These are the relevant slots of "PageSpace" QObject (stripped from
http://pdfedit.cvs.sourceforge.net/pdfedit/pdfedit/src/gui/pagespace.h?view=markup)
in which I noticed this bug:

void refresh ( QSPage * pageToView = NULL, QSPdf * pdf = NULL );
void refresh ( QSPage * pageToView,  QObject * pdf );	
void refresh ( int pageToView, QSPdf * pdf = NULL );	
void refresh ( int pageToView, QObject * pdf );

Hope this will help in identifying and fixing the bug correctly :)

Martin Petricek

Attachment:

Attachment: qsa-1.1.5-bugfix.patch
Description: Binary data


Message 2 in thread

BH wrote:
> I upgraded from QSA 1.1.4 to QSA 1.1.5
> I noticed one new bug was introduced - when calling slots of child
> QObject in scripting, it said "No matching overload ...", however with
> QSA 1.1.4 the exactly same code worked fine.
> 
> In my case, I have class gui::Base as "context" in QSInterpreter and
> instance of gui::PageSpace (which is descendant of QWidget) presented
> in scripting under name of "PageSpace".
> 
> When I called "PageSpace.refresh(document.getFirstPage(),document);"
> in script it worked with qsa-1.1.4 and not worked (no matching
> overload...) with qsa-1.1.5, though the matching overloads get listed
> correctly.

Hi Martin,

I can't seem to reproduce this. Do you have a small compilable example I 
could use?

best regards,
Gunnar

To unsubscribe - send "unsubscribe" in the subject to qsa-interest-request@xxxxxxxxxxxxx