Bug 203845 - qt4: 4.2 escapes '\' differently than 4.1
qt4: 4.2 escapes '\' differently than 4.1
Product: Fedora
Classification: Fedora
Component: qt4 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rex Dieter
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2006-08-23 19:50 EDT by Deji Akingunola
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-30 09:44:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
fix texmaker build against qt-4.2 (483 bytes, patch)
2006-08-28 14:41 EDT, Rex Dieter
no flags Details | Diff

  None (edit)
Description Deji Akingunola 2006-08-23 19:50:01 EDT
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
-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
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

Please check it up and advise. Thanks 

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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Rex Dieter 2006-08-25 09:47:50 EDT
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 10:27:36 EDT
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 10:47:23 EDT
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 10:50:18 EDT
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 12:51:38 EDT
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 14:40:20 EDT
For now, I'd suggest simply patching texmaker.pro, patch forthcoming.
Comment 7 Rex Dieter 2006-08-28 14:41:18 EDT
Created attachment 135071 [details]
fix texmaker build against qt-4.2
Comment 8 Rex Dieter 2006-08-28 14:45:53 EDT
Confirmed that the qt-4.2.0-20060821 snapshot exibits the same (bad) behavior.
Comment 9 Deji Akingunola 2006-08-29 02:08:58 EDT
(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 09:44:04 EDT
Got the official word from upstream that this is expected behavior (marking

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

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 17:18:21 EDT
o.k, I'll just stick with your initial patch for now. Thanks

Note You need to log in before you can comment on or make changes to this bug.