[Kmymoney-devel] qApp->mainWidget()
Alvaro Soliverez
asoliverez at gmail.com
Mon Sep 21 02:36:47 CEST 2009
On Sun, Sep 20, 2009 at 8:32 PM, Fernando Vilas <fvilas at iname.com> wrote:
> Hi,
>
> I just committed the first pass at a port to KDE4 of the QIF module.
> The only
> deprecated call warnings remaining are for qApp->mainWidget(). Has anyone
> resolved this one yet?
>
> I considered getting the list from QApplication::topLevelWidgets()
> and just
> using the first value returned, but I didn't find anything that promised
> the
> order of the results.
>
> Some other projects store the main widget in a static variable (we
> do too),
> for later reference. The trouble is that this causes undefined references
> when
> building libconverter. I can try to fix those, but I didn't want to
> introduce
> dependencies if I could avoid it.
>
> Thoughts?
>
>
You could call topLevelWidgets and check the type for KXmlGuiWindow of
whatever the type is for the main widget now. I think we can assume we will
only have one of those per session.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20090920/c01413ca/attachment.html
More information about the KMyMoney-devel
mailing list