qfont_metrics.C: In function 'int<unnamed>::smallcapswidth(const QString&,
const LyXFont&)':
qfont_metrics.C:50: error: ambiguous overload for 'operator[]' in 's[i]'
/usr/include/QtCore/qstring.h:544: note: candidates are: const QChar
QString::operator[](int) const
/usr/include/QtCore/qstring.h:693: note: QCharRef
QString::operator[](int) <near match>
/usr/include/QtCore/qstring.h:546: note: const QChar
QString::operator[](uint) const
/usr/include/QtCore/qstring.h:695: note: QCharRef
QString::operator[](uint) <near match>
qfont_metrics.C: In function 'int font_metrics::width(const lyx::char_type*,
size_t, const LyXFont&)':
qfont_metrics.C:151: error: ambiguous overload for 'operator[]' in 'ucs2[i]'
/usr/include/QtCore/qstring.h:544: note: candidates are: const QChar
QString::operator[](int) const
/usr/include/QtCore/qstring.h:693: note: QCharRef
QString::operator[](int)
/usr/include/QtCore/qstring.h:546: note: const QChar
QString::operator[](uint) const
/usr/include/QtCore/qstring.h:695: note: QCharRef
QString::operator[](uint)
Index: qfont_metrics.C
===================================================================
--- qfont_metrics.C (revision 14853)
+++ qfont_metrics.C (working copy)
@@ -44,9 +44,9 @@
int w = 0;
- size_t const ls = s.size();
+ unsigned int const ls = s.size();
- for (size_t i = 0; i < ls; ++i) {
+ for (unsigned int i = 0; i < ls; ++i) {
QChar const & c = s[i];
QChar const uc = c.toUpper();
if (c != uc)
@@ -147,7 +147,7 @@
return fi.width(ucs2[0].unicode());
int w = 0;
- for (size_t i = 0; i < ls; ++i)
+ for (unsigned int i = 0; i < ls; ++i)
w += fi.width(ucs2[i].unicode());
return w;
--
Lgb