Hang when loading a project

Andras Mantia amantia at kde.org
Wed Nov 29 09:12:22 UTC 2006


On Wednesday 29 November 2006 03:21, Jens Dagerbo wrote:
> C++ language support uses QProcess with header file preprocessing
> these days, and konsolepart uses KProcess. I suspect it's a bad idea
> to mix them.

Good catch, the problem is in kdevdriver.cpp, KDevDriver::setup(). Read 
the funny part:
#if KDE_VERSION <= 305
		return; /// \FIXME Roberto, please review! ;-)
	// If the QProcess from below is executed,
	// it somehow breaks the gcc call in 
parts/outputviews/makewidget.cpp. :-(
	// It then has the effect that KProcess will never exit, at least on 
KDE-3.0
#endif // KDE_VERSION
		QProcess proc;
		proc.addArgument( "gcc" );
		proc.addArgument( "-print-file-name=include" );
		if ( !proc.start() ) {
			qWarning( "Couldn't start gcc" );
			return;
		}
		while ( proc.isRunning() )
			usleep( 1 );


So the problem is known but the check is for KDe <= 3.0.5 ! I have a 
SUSE build of KDE 3.5.5 and KDevelop 3.3.5 and there is no problem, but 
there is with my self compiled KDE 3.5.5 and KDevelop 3.4. Enabling the 
#if for my version  "fixes" the hang. I think I have to rewrite that 
QProcess stuff to use KProcess or something else instead.

Andras


-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20061129/48576a03/attachment.sig>


More information about the KDevelop-devel mailing list