Bug 78148 - adding new class break existing qmake project file
Summary: adding new class break existing qmake project file
Status: RESOLVED DUPLICATE of bug 135142
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: QMake (show other bugs)
Version: 3.0.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-21 15:55 UTC by Gioele Barabucci
Modified: 2006-11-20 21:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gioele Barabucci 2004-03-21 15:55:22 UTC
Version:           3.0.2 (using KDE 3.2.0, Gentoo)
Compiler:          gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r4, propolice)
OS:          Linux (ppc) release 2.4.24-ben1

I imported a qmake project with just one class in kdevelop.
Later I added a second class using the class wizard, and this updated the .pro file.
Now the .pro file is broke because the new file appears in SOURCES and INCLUDE sections with a leading "/".

Example:

Before:
  proj/
    main.cpp
    a.cpp
    a.h
    proj.pro
  proj.pro contained
   TEMPLATE = app
   CONFIG += qt opengl debug threads
   SOURCES = main.cpp a.cpp
   HEADERS = a.h

After:
  proj/
    main.cpp
    a.cpp
    a.h
    b.cpp <-- new class
    b.h
    proj.pro
  proj.pro contains
   TEMPLATE = app
   CONFIG += qt debug threads <-- opengl has been removed!!!
   SOURCES += main.cpp a.cpp /b.cpp
   HEADERS += a.h /b.h <-- should be "b.h" not "/b.h"
Comment 1 Gianni 2006-10-02 10:54:35 UTC
Version: 3.3.2
OS:      Linux(i686) release 2.6.15-27-386
Compiler:i486-linux-gnu

I found a similar problem with "Project-> New Class..." operation.
The .pro file before adding a class is something like that:

macx{
  SOQTLIB += $$system(soqt-config --ldflags)
}
win32{
  SOQTLIB += X:\Coin3D\lib\soqt1.lib \
             X:\Coin3D\lib\coin2.lib
}
unix{
  SOQTLIB += -L/usr/local/lib -lSoQt \
             -L/usr/lib -lCoin
}

LIBS += $$SOQTLIB

HEADERS += ...
SOURCES += ...

After adding a class with "Project-> New Class..."
the .pro file is corrupted because HEADERS and SOURCES parts are popped up while the platform dependent part is pushed at the bottom:

HEADERS += ...
SOURCES += ...

LIBS += $$SOQTLIB

macx{
  SOQTLIB += $$system(soqt-config --ldflags)
}
win32{
  SOQTLIB += X:\Coin3D\lib\soqt1.lib \
             X:\Coin3D\lib\coin2.lib
}
unix{
  SOQTLIB += -L/usr/local/lib -lSoQt \
             -L/usr/lib -lCoin
}

Thanks for suggesting at least a work around.
Comment 2 Andreas Pakulat 2006-11-20 21:57:36 UTC

*** This bug has been marked as a duplicate of 135142 ***