Bug 294461

Summary: build failure: qstring ambiguity [patch]
Product: [Applications] digikam Reporter: tropikhajma <tropikhajma>
Component: Portability-CompilationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 2.5.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In: 2.6.0
Sentry Crash Report:
Attachments: patch

Description tropikhajma 2012-02-20 00:28:19 UTC
Created attachment 68946 [details]
patch

Version:           2.5.0 (using KDE 4.8.0) 
OS:                Solaris

build fails with the below errors.
the attached patch worked for me

Reproducible: Always

Steps to Reproduce:
try to build digikam

Actual Results:  
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 82: Error: Overloading ambiguity between "QString::QString(const QChar*)" and "QString::QString(const char*)".
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 82: Error: Cannot use int to initialize const QString.
Warning: A reference return value should be an lvalue (if the value of this function is used, the result is unpredictable).
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Overloading ambiguity between "QString::QString(const QChar*)" and "QString::QString(const char*)".
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Cannot use int to initialize const QString.
Warning: A reference return value should be an lvalue (if the value of this function is used, the result is unpredictable).
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Overloading ambiguity between "QString::QString(const QChar*)" and "QString::QString(const char*)".
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Cannot use int to initialize const QString.
Warning: A reference return value should be an lvalue (if the value of this function is used, the result is unpredictable).
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Overloading ambiguity between "QString::QString(const QChar*)" and "QString::QString(const char*)".
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Cannot use int to initialize const QString.
Warning: A reference return value should be an lvalue (if the value of this function is used, the result is unpredictable).
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 82: Error: Overloading ambiguity between "QString::QString(const QChar*)" and "QString::QString(const char*)".
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 82: Error: Cannot use int to initialize const QString.
Warning: A reference return value should be an lvalue (if the value of this function is used, the result is unpredictable).
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Overloading ambiguity between "QString::QString(const QChar*)" and "QString::QString(const char*)".
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Cannot use int to initialize const QString.
Warning: A reference return value should be an lvalue (if the value of this function is used, the result is unpredictable).
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Overloading ambiguity between "QString::QString(const QChar*)" and "QString::QString(const char*)".
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Cannot use int to initialize const QString.
Warning: A reference return value should be an lvalue (if the value of this function is used, the result is unpredictable).
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Overloading ambiguity between "QString::QString(const QChar*)" and "QString::QString(const char*)".
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/build/extra/kipi-plugins/picasawebexport/../../../../extra/kipi-plugins/picasawebexport/picasawebtalker.h", line 79: Error: Cannot use int to initialize const QString.
Warning: A reference return value should be an lvalue (if the value of this function is used, the result is unpredictable).
16 Error(s) and 8 Warning(s) detected.

Expected Results:  
builds ok

Solaris Studio 12.3
Comment 1 caulier.gilles 2012-02-20 08:09:21 UTC
Git commit 432b55d6dbc13208f0af19a3794bf65ef2b1f328 by Gilles Caulier.
Committed on 20/02/2012 at 09:08.
Pushed by cgilles into branch 'master'.

fix compilation under Solaris

M  +2    -2    picasawebexport/picasawebtalker.h

http://commits.kde.org/kipi-plugins/432b55d6dbc13208f0af19a3794bf65ef2b1f328