duchainify requires XServer [WAS: Re: QFSFileEngine::map: Mapping a file beyond its size is not portable]

Milian Wolff mail at milianw.de
Mon Dec 7 19:14:37 UTC 2009

On Monday 07 December 2009 16:09:51 David Nolden wrote:
> Am Montag 07 Dezember 2009 15:57:33 schrieb Milian Wolff:
> > Hi all!
> >
> > I get the above mentioned error on a test machine of mine, running
> >  Archlinux with kde-qt compiled from sources. I know that at least David
> >  got this error also on OpenSuse.
> >
> > My problem is: It makes duchainify stop working alltogether it seems:
> This was only a real problem in one of the beta release of Qt 4.6, where
>  they made the mapping fail fully in such a case. But at that point I made
>  the fallback work properly, so even if the mapping fails, KDevelop keeps
>  working.
> But in the final release, they're turned the problem into a pure warning,
>  so it's only an aesthetical problem.
> And btw. the main problem is anyway that their check is somehow broken, as
>  we actually _do not_ map a file beyond its size.
> So to make it short: This issue is probably not the reason why your
>  duchainify doesn't work.

OK, found the culprit:

1) Somehow the qWarning is not shown on several of my machines
2) Duchainify requires an XServer, as this is where the exit takes place:

1830        if (qt_is_gui_used && !X11->display) {
1831            if ((X11->display = XOpenDisplay(X11->displayName)) == 0) {
1832                qWarning("%s: cannot connect to X server %s", appName,
1833                         XDisplayName(X11->displayName));
1834                QApplicationPrivate::reset_instance_pointer();
1835                exit(1);
1836            }

Imo this is very sub-optimal. DUChainify is a CLI app, no? There is not need 
for an XServer in it, or is there?

Maybe I'll look into the source later today/night.

Milian Wolff
mail at milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20091207/aa5e2ee6/attachment.sig>

More information about the KDevelop-devel mailing list