[Panel-devel] Superkaramba Qt4 Port
Vinay Khaitan
vkhaitan at gmail.com
Fri Sep 2 14:46:32 CEST 2005
Hello,
As I promised, All the themes in Examples section are working smoothly.
But there is problem in KNewsuff part. It is actually bug of KNewStuff
library.
KNewStuff dialog is shown, but I get infinite recursion, when clicked on one
tab.
the bactrace shows this.......
#557 0x410ffe7e in QTabBar::setCurrentIndex () from
/home/kde4/qt/lib/libQtGui_debug.so.4
#558 0x405f7f44 in KTabCtl::showTab (this=0x8271cd8, i=1) at qtabbar.h:119
#559 0x405f802d in KTabCtl::qt_metacall (this=0x8271cd8,
_c=InvokeMetaMethod, _id=1, _a=0xbf68e5f8) at ktabctl.moc:68
#560 0x4161d6e1 in QMetaObject::activate () from
/home/kde4/qt/lib/libQtCore_debug.so.4
#561 0x4161d7ef in QMetaObject::activate () from
/home/kde4/qt/lib/libQtCore_debug.so.4
#562 0x4110171b in QTabBar::selected () from
/home/kde4/qt/lib/libQtGui_debug.so.4
#563 0x410ffe7e in QTabBar::setCurrentIndex () from
/home/kde4/qt/lib/libQtGui_debug.so.4
#564 0x405f7f44 in KTabCtl::showTab (this=0x8271cd8, i=1) at qtabbar.h:119
#565 0x405f802d in KTabCtl::qt_metacall (this=0x8271cd8,
_c=InvokeMetaMethod, _id=1, _a=0xbf68eba8) at ktabctl.moc:68
#566 0x4161d6e1 in QMetaObject::activate () from
/home/kde4/qt/lib/libQtCore_debug.so.4
#567 0x4161d7ef in QMetaObject::activate () from
/home/kde4/qt/lib/libQtCore_debug.so.4
#568 0x4110171b in QTabBar::selected () from
/home/kde4/qt/lib/libQtGui_debug.so.4
#569 0x410ffe7e in QTabBar::setCurrentIndex () from
/home/kde4/qt/lib/libQtGui_debug.so.4
looking into backtrace, the infinite recursion is very clear. After looking
into source, the reason is clear...
<snip KTabCtl>
void KTabCtl::showTab(int i)
{
unsigned int j;
for (j = 0; j < pages.size(); j++) {
if (j != (unsigned)i) {
pages[j]->hide();
}
}
if((unsigned)i < pages.size()) {
emit(tabSelected(i));
if( pages.size() >= 2 ) {
pages[i]->raise();
}
tabs->setCurrentTab(i); // line of interest...
pages[i]->setGeometry(getChildRect());
pages[i]->show();
}
}
</snip>
setCurrentTab() calls setCurrentIndex().
setCurrentIndex emits signal QTabBar::selected()
and in the constructor of KTabCtl
<snip>
{
tabs = new QTabBar(this);
connect(tabs, SIGNAL(selected(int)), this, SLOT(showTab(int))); //problematic
point
tabs->move(2, 1);
blBorder = true;
}
</snip>
The reason of recursion is evident immediately. Corresponding person should
resolve this matter.
I also got a crash when testing themes. That was because of these
statements....
function()
{
QPixmap pm.;
QPainter p;
p.begin(&pm);
bitBlt(&pm,.............................); //The problem.
p.end();
}
BitBlt actually wants to open QPainter on QPaintdevice, which it cant do,
when it cant do because of p.begin() already called. So there is trouble and
finally crash(qFatal()).
I just changed the order and everything is smooth. My curiousity is that,
how can this work in Qt3? Does qt allows to call bitBlt() with opened
painter on QPaintDevice?
bye
Vinay Khaitan
On 9/2/05, Vinay Khaitan <vkhaitan at gmail.com> wrote:
>
> As Qt4 port is now complete, I am now doing the bug hunting task. It looks
> that perhaps KDE-3.5 branch also had bug, which crashes things.
> After some bug hunting When A nice theme is running smoothly, I will post
> again.
>
> On 9/1/05, Vinay Khaitan <vkhaitan at gmail.com > wrote:
> >
> > oops, the image requires moderator approval. the link for it:-
> > http://k.domaindlx.com/vkhaitan/snapshot3.png
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/panel-devel/attachments/20050902/56566194/attachment.html
More information about the Panel-devel
mailing list