Bug 101084 - QMake manager, subproject configuration, custom variables, missing choice to use += instead of =
Summary: QMake manager, subproject configuration, custom variables, missing choice to ...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: QMake (show other bugs)
Version: git master
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-08 10:06 UTC by Tobias Erbsland
Modified: 2006-11-22 21:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix problem with custom variables (2.13 KB, patch)
2006-01-12 04:04 UTC, David Cuadrado
Details
Fix problem with custom variables [improved] (186.96 KB, patch)
2006-01-13 01:51 UTC, David Cuadrado
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Erbsland 2005-03-08 10:06:33 UTC
Version:           3.2.50 (using KDE 3.3.0, SuSE)
Compiler:          gcc version 3.3.4 (pre 3.3.5 20040809)
OS:                Linux (i686) release 2.6.8-24.11-default

In Qt4.0 a new qmake variable is introduced:

QT

To select which parts of the qt library should be linked. The variable is used:

QT += network xml

The current version of the qmake manager is adding this variable to the "Custom Variables", but if i change something to the project. The variable is written back as:

QT = network xml

Now the default settings (core gui) are missing.


There must be an option where i can choose if the custom variable is:

ASSIGNMENT (=)
ADDITION (+=)
SUBTRACTION (-=)

Because if i create a console application with qt, i would specify:

QT -= gui

Other operators are:

ADD UNIQUE (*=) 
REGEXP (~=)
Comment 1 Tassilo Horn 2005-09-13 14:47:18 UTC
As a workarround for += one can use

QT = $$QT xml network

for example. But KDevelop (3.2.2 here) is not able to read Custom Variables with blanks in it again, so if close and reopen my project or KDevelop I get the following in my qmake-manager:

    Name:        Value:
    QT           $$QT

the "xml network" is missing. If I exit the qmake-manager with 'OK' this wrong value will be saved to my *.pro file and thus breaks it.
Comment 2 A T Somers 2005-11-15 00:31:15 UTC
The deleting of the stuff after the first space also happens after inserting a new existing file into the project. This is really annoying, as it makes compiling and linking fail. 
I think it constitutes data loss that the variable is reset to just the first item in the list. That is a serious bug.
Comment 3 Danny Kurniawan 2005-11-17 07:34:32 UTC
I'm experiencing the same problem... when I try to modify for variables QMAKE_CXX = ccache g++
Comment 4 David Cuadrado 2006-01-12 04:04:42 UTC
Created attachment 14220 [details]
Fix problem with custom variables

The patch is applicable in 

buildtools/qmake
Comment 5 David Cuadrado 2006-01-13 01:51:45 UTC
Created attachment 14233 [details]
Fix problem with custom variables [improved]

I think this is a better solution
Comment 6 Andreas Pakulat 2006-11-22 21:31:35 UTC
Fixed in svn, for Qt4 you can use all operators that exist