Summary: | opening QMake project stalls then "Couldn't start gcc" | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Steven T. Hatton <hattons> |
Component: | general | Assignee: | András Manţia <amantia> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kdevelop-bugs-null |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Steven T. Hatton
2006-12-01 16:59:47 UTC
Do you have gcc installed and if yes where it is installed (is in your path?)? The "Couldn't start gcc" appears after 60 second of the rest, right? SVN commit 609706 by apaku: Use KProcess instead of QProcess to not break the BlockingKProcess from amantia Repair disconnect BUG:138215 M +18 -18 qmakedefaultopts.cpp M +4 -4 qmakedefaultopts.h M +1 -1 scope.cpp --- branches/kdevelop/3.4/buildtools/qmake/qmakedefaultopts.cpp #609705:609706 @@ -15,7 +15,7 @@ #include <ktempfile.h> #include <qdir.h> #include <qregexp.h> -#include <qprocess.h> +#include <kprocess.h> #include <kmessagebox.h> #include <klocale.h> @@ -34,23 +34,23 @@ makefile->close(); qmakefile->close(); - proc = new QProcess(); - kdDebug(9024) << "Working dir:" << projdir << endl; + proc = new KProcess(); + kdDebug(9024) << "KProc Working dir:" << projdir << endl; proc->setWorkingDirectory( projdir ); - proc->addArgument( qmake ); - proc->addArgument( "-d" ); - proc->addArgument( "-o" ); - proc->addArgument( makefile->name() ); - proc->addArgument( qmakefile->name() ); - kdDebug(9024) << "Executing:" << proc->arguments() << endl; - connect( proc, SIGNAL( processExited( ) ), this, SLOT( slotFinished( ) ) ); - connect( proc, SIGNAL( readyReadStderr( ) ), - this, SLOT( slotReadStderr( ) ) ); - proc->setCommunication( QProcess::Stderr ); - proc->start(); + *proc << qmake; + *proc << "-d"; + *proc << "-o"; + *proc << makefile->name(); + *proc << qmakefile->name(); + kdDebug(9024) << "Executing:" << proc->args() << endl; + connect( proc, SIGNAL( processExited( KProcess* ) ), this, SLOT( slotFinished( KProcess* ) ) ); + connect( proc, SIGNAL( receivedStderr( KProcess*, char*, int ) ), + this, SLOT( slotReadStderr( KProcess*, char*, int ) ) ); +// proc->setCommunication( QProcess::Stderr ); + proc->start( KProcess::NotifyOnExit, KProcess::Stderr ); if( !proc->isRunning() && !proc->normalExit() ) { - kdDebug(9024) << "Couldn't execute qmake: " << proc->arguments() << endl; + kdDebug(9024) << "Couldn't execute qmake: " << proc->args() << endl; // kdDebug(9024) << "message box" << endl; // KMessageBox::error( 0, i18n("Error running QMake.\nTried to execute:\n%1\n\nPlease check the path to Qt under Project Options->C++ Support->Qt tab.").arg(proc->arguments().join(" ")), i18n("Couldn't execute qmake") ); makefile->unlink(); @@ -79,9 +79,9 @@ qmakefile = 0; } -void QMakeDefaultOpts::slotReadStderr() +void QMakeDefaultOpts::slotReadStderr( KProcess* , char* buf, int len ) { - QString buffer = QString::fromLocal8Bit( proc->readStderr() ); + QString buffer = QString::fromLocal8Bit( buf, len ); QStringList lines = QStringList::split( "\n", buffer ); for ( QStringList::const_iterator it = lines.begin(); it != lines.end(); ++it) { @@ -96,7 +96,7 @@ } } -void QMakeDefaultOpts::slotFinished() +void QMakeDefaultOpts::slotFinished( KProcess* ) { kdDebug(9024) << "Proc finished" << endl; makefile->unlink(); --- branches/kdevelop/3.4/buildtools/qmake/qmakedefaultopts.h #609705:609706 @@ -17,7 +17,7 @@ #include <qobject.h> class KTempFile; -class QProcess; +class KProcess; class QMakeDefaultOpts : public QObject { @@ -36,14 +36,14 @@ void variablesRead(); private slots: - void slotReadStderr( ); - void slotFinished( ); + void slotReadStderr( KProcess*, char*, int ); + void slotFinished( KProcess* ); private: QMap<QString, QStringList> m_variables; KTempFile* makefile; KTempFile* qmakefile; - QProcess* proc; + KProcess* proc; QStringList m_keys; }; --- branches/kdevelop/3.4/buildtools/qmake/scope.cpp #609705:609706 @@ -1448,7 +1448,7 @@ { if( m_unfinishedScopes ) m_unfinishedScopes->remove( s ); - disconnect( s, SIGNAL( initializationFinished( Scope* ) ), this, SLOT( emitFinished( Scope* ) ) ); + disconnect( s, SIGNAL( initializationFinished( Scope* ) ), this, SLOT( emitInitFinished( Scope* ) ) ); } if( !m_unfinishedScopes || m_unfinishedScopes->isEmpty() ) { |