Bug 144987

Summary: QMake manager, parsing errors with pri files (include)
Product: [Applications] kdevelop Reporter: Andreas Bacher <andi.bacher>
Component: generalAssignee: Andreas Pakulat <apaku>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: pro and pri files in the project structure

Description Andreas Bacher 2007-05-03 15:34:46 UTC
Version:           3.4.0.2 (using KDE 3.5.6 "release 41.2" , openSUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.16.27-0.9-default

The QMake-Manager has errors when parsing my project which includes some pri files (include(prifile.pri)). I will attach the empty project structure (pro und pri files) that you can reproduce this parsing errors. One issue in my pro files is already adressed in #144377
Comment 1 Andreas Bacher 2007-05-03 15:36:10 UTC
Created attachment 20468 [details]
pro and pri files in the project structure
Comment 2 Andreas Pakulat 2007-05-03 15:47:30 UTC
Please be more verbose on what problems you have.
Comment 3 Andreas Bacher 2007-05-03 15:54:28 UTC
output when I start kdevelop from the shell

be3@linux:~> kdevelop
QObject::connect: No such slot MakeWidget::slotDocumentOpened(const KURL&)
QObject::connect:  (sender name:   'unnamed')
QObject::connect:  (receiver name: 'make widget')
QLayout "unnamed" added to IndexView "unnamed", which already has a layout
kdecore (KAction): WARNING: KAction::initPrivate(): trying to assign a shortcut (Alt+Ctrl+Shift+N) to an unnamed action.
kio (KTrader): WARNING: Parsing ' and [X-KDevelop-Version] == 4' gave syntax error
syntax error
syntax error
syntax error
syntax error
syntax error
syntax error
syntax error
syntax error
syntax error
syntax error
syntax error
.......and so on
Comment 4 Andreas Bacher 2007-05-03 16:01:48 UTC
The first problem is reported already in bug #144377, that the problem with blank first line in pro file
e.g.: 
INCLUDEPATH += \ 
               ../include \
               ../include2 
-> parser error

this works:
INCLUDEPATH += ../include \
               ../include2 
Comment 5 Andreas Bacher 2007-05-03 16:05:52 UTC
The second problem I have is with pri file which I include in other pro files (include(../lib_be3.pri). 

Error Message in KDevelop:
Couldn't parse project file: /home/be3/uim/lib_be3.pri

I also get parse errors in other pri files (Core.pri, ....).
Comment 6 Andreas Bacher 2007-05-04 07:30:37 UTC
Note : The old Qmake-Manager in KDevelop 3.3.5 has no problems with this pro and pri files. Import the atached project into KDevelop 3.4.0.2 and you will get a lot of errors on parsing project files. I could not figure out what the problem those pri files is.
Comment 7 Andreas Pakulat 2007-05-04 12:26:54 UTC
oh, seems I forgot to assign this BR to me. I already have a bugfix and its probably going to be comitted later today to svn. Its just that KDevelop is now in freeze for release with KDE 3.5.7 and thus I needed to get approval before comitting.

That fix allows to import your whole project and also solves 144377.
Comment 8 Andreas Pakulat 2007-05-04 12:40:32 UTC
SVN commit 660991 by apaku:

Fix a few parser issues:
1. Correctly parse 1-character-long variable values
2. Don't choke on multiline-values that don't have whitespace at the beginning of the line
3. Allow EOF at the end of a variable assignment, instead of just newline

BUG:144377
BUG:144987
CCBUG:145009


 M  +5 -4      qmake.ll  
 M  +27 -0     qmake.yy  
 M  +124 -119  qmake_lex.cpp  
 M  +183 -142  qmake_yacc.cpp  
 M  +3 -2      qmake_yacc.hpp