Bug 203845

Summary: qt4: 4.2 escapes '\' differently than 4.1
Product: [Fedora] Fedora Reporter: Deji Akingunola <dakingun>
Component: qt4Assignee: Rex Dieter <rdieter>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-30 13:44:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fix texmaker build against qt-4.2 none

Description Deji Akingunola 2006-08-23 23:50:01 UTC
Description of problem:
To start with, I'm not sure this is qt4 bug at all, but texmaker (as currently
is in Extras) built fine with qt4-4.1. Starting with the texmaker source rpm
currently in FE-devel, I changed qmake4 in the rpm spec to the qmake-qt4, and
the build fails as below:
>>>
webpublishdialog.cpp: In member function 'void WebPublishDialog::readsettings()':
webpublishdialog.cpp:877: error: expected primary-expression before '/' token
webpublishdialog.cpp:877: error: 'usr' was not declared in this scope
webpublishdialog.cpp:877: error: expected `;' before string constant
g++ -c -m64 -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -Wall -W
-D_REENTRANT  -DPREFIX="/usr" -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/QtCore
-I/usr/include/QtGui -I/usr/include -I.moc -I.ui -o .obj/x11fontdialog.o
x11fontdialog.cpp
make: *** [.obj/webpublishdialog.o] Error 1
make: *** Waiting for unfinished jobs....
error: Bad exit status from /home/deji/rpmbuild/tmp/rpm-tmp.45982 (%build)
<<<<

The code segment causing this failure is extracted below,
>>>
#ifdef Q_WS_X11
PROGRAMDIR=PREFIX"/share/texmaker";
#endif
<<<

Please check it up and advise. Thanks 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Rex Dieter 2006-08-25 13:47:50 UTC
I'll try rebuilding it myself, and see how it goes.

It may be worth asking upstream if they've tried/used qt-4.2 yet.

Comment 2 Rex Dieter 2006-08-25 14:27:36 UTC
Here's the difference:
When using qt4-4.2, Makefile gets DEFINES as:
DEFINES       = -DPREFIX="/usr" ...
and qt4-4.1 is
DEFINES       = -DPREFIX=\"/usr\" ...
And, only the latter works.

Comment 3 Deji Akingunola 2006-08-25 14:47:23 UTC
Thanks Rex. So who should provide the fix here, upstream or qt4-4.2?
In any case I'm going to contact upstream about it.

Comment 4 Rex Dieter 2006-08-25 14:50:18 UTC
I'd say it's (mostly) qt4's fault here, the behavior changed between 4.1 and
4.2.  I'll keep digging and report this to trolltech.

Comment 5 Rex Dieter 2006-08-25 16:51:38 UTC
Changing subject to match reality.  Issue has also been reported to upstream
mailing lists: qt-interest and qt4-preview-feedback.

Comment 6 Rex Dieter 2006-08-28 18:40:20 UTC
For now, I'd suggest simply patching texmaker.pro, patch forthcoming.


Comment 7 Rex Dieter 2006-08-28 18:41:18 UTC
Created attachment 135071 [details]
fix texmaker build against qt-4.2

Comment 8 Rex Dieter 2006-08-28 18:45:53 UTC
Confirmed that the qt-4.2.0-20060821 snapshot exibits the same (bad) behavior.

Comment 9 Deji Akingunola 2006-08-29 06:08:58 UTC
(In reply to comment #7)
> Created an attachment (id=135071) [edit]
> fix texmaker build against qt-4.2
> 
Thanks, that works.


Comment 10 Rex Dieter 2006-08-30 13:44:04 UTC
Got the official word from upstream that this is expected behavior (marking
WONTFIX).  

Here's an example on how to make .pro code that uses escapes work with all qt4
versions.

-------------------
The "best" solution available is:
 
contains($$list($$[QT_VERSION]), 4.2.*) { 
   DEFINES += FOO=\\\"$(FOO)\\\" 
} else { 
   DEFINES += FOO=\"$(FOO)\" 
}

This will allow a single .pro to work with <4.2.x as well as beyond. 
-------------------

Comment 11 Deji Akingunola 2006-08-31 21:18:21 UTC
o.k, I'll just stick with your initial patch for now. Thanks