grantlee-0.1.8 build failed on arm7
Sune Vuorela
nospam at vuorela.dk
Mon Jun 20 21:40:02 BST 2011
On 2011-06-04, ?????????????????? ?????????????? <kuzemkoa at mail.ru> wrote:
> Hello. I am using Gentoo on the Beagleboard-Xm.
> When I try to compile kde-4.6.80, I stoped on the grantlee build phase.
> This is a full log.
> http://paste.ubuntu.com/618234
/var/tmp/portage/dev-libs/grantlee-0.1.8/work/grantlee-0.1.8/templates/lib/abstractlocalizer.cpp:
In member function 'virtual QString
Grantlee::AbstractLocalizer::localize(const QVariant&) const':
/var/tmp/portage/dev-libs/grantlee-0.1.8/work/grantlee-0.1.8/templates/lib/abstractlocalizer.cpp:50:47:
error: call of overloaded 'localizeNumber(double)' is ambiguous
/var/tmp/portage/dev-libs/grantlee-0.1.8/work/grantlee-0.1.8/templates/lib/abstractlocalizer.h:94:19:
note: candidates are: virtual QString
Grantlee::AbstractLocalizer::localizeNumber(int) const
/var/tmp/portage/dev-libs/grantlee-0.1.8/work/grantlee-0.1.8/templates/lib/abstractlocalizer.h:99:19:
note: virtual QString
Grantlee::AbstractLocalizer::localizeNumber(qreal) const
is the interesting bits of the build log.
And when reading abstractlocalizer.cpp line 50, it is quite clear what
the issue is.
A untested patch:
diff --git a/templates/lib/abstractlocalizer.cpp b/templates/lib/abstractlocalizer.cpp
index 4e5b15d..104d888 100644
--- a/templates/lib/abstractlocalizer.cpp
+++ b/templates/lib/abstractlocalizer.cpp
@@ -46,8 +46,8 @@ QString AbstractLocalizer::localize( const QVariant& variant ) const
return localizeDateTime( variant.toDateTime() );
else if ( isSafeString( variant ) )
return localizeString( getSafeString( variant ).get() );
- else if ( variant.type() == QVariant::Double )
- return localizeNumber( variant.toDouble() );
+ else if ( variant.type() == QVariant::Double || variant.type()==QMetaType::Float )
+ return localizeNumber( variant.toReal() );
else if ( variant.canConvert( QVariant::LongLong ) )
return localizeNumber( variant.toInt() );
return QString();
/Sune
More information about the kde-core-devel
mailing list