duchainify requires XServer [WAS: Re: QFSFileEngine::map: Mapping a file beyond its size is not portable]
David Nolden
zwabel at googlemail.com
Mon Dec 7 19:29:28 UTC 2009
Am Montag 07 Dezember 2009 20:14:37 schrieb Milian Wolff:
> 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
The tool eats those warnings unless you call it with --verbose, so you can see
the actual output of the tool.
> 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.
It uses the standard Core::NoUI initialization, the same stuff that the tests
do.
Greetings, David
More information about the KDevelop-devel
mailing list