mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 18:24:48 +00:00
Use correct types for qstring, also to avoid 64<->32 bit issues.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14858 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
810f6e499b
commit
86b063d2da
@ -44,9 +44,9 @@ int smallcapswidth(QString const & s, LyXFont const & f)
|
|||||||
|
|
||||||
int w = 0;
|
int w = 0;
|
||||||
|
|
||||||
size_t const ls = s.size();
|
int const ls = s.size();
|
||||||
|
|
||||||
for (size_t i = 0; i < ls; ++i) {
|
for (int i = 0; i < ls; ++i) {
|
||||||
QChar const & c = s[i];
|
QChar const & c = s[i];
|
||||||
QChar const uc = c.toUpper();
|
QChar const uc = c.toUpper();
|
||||||
if (c != uc)
|
if (c != uc)
|
||||||
@ -147,7 +147,7 @@ int font_metrics::width(char_type const * s, size_t ls, LyXFont const & f)
|
|||||||
return fi.width(ucs2[0].unicode());
|
return fi.width(ucs2[0].unicode());
|
||||||
|
|
||||||
int w = 0;
|
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());
|
w += fi.width(ucs2[i].unicode());
|
||||||
|
|
||||||
return w;
|
return w;
|
||||||
|
@ -144,9 +144,9 @@ QString const ucs4_to_qstring(vector<char_type> const & ucs4)
|
|||||||
|
|
||||||
vector<char_type> qstring_to_ucs4(QString const & qstr)
|
vector<char_type> qstring_to_ucs4(QString const & qstr)
|
||||||
{
|
{
|
||||||
size_t ls = qstr.size();
|
int ls = qstr.size();
|
||||||
vector<char_type> ucs4;
|
vector<char_type> ucs4;
|
||||||
for (size_t i = 0; i < ls; ++i)
|
for (int i = 0; i < ls; ++i)
|
||||||
ucs4.push_back(static_cast<boost::uint32_t>(qstr[i].unicode()));
|
ucs4.push_back(static_cast<boost::uint32_t>(qstr[i].unicode()));
|
||||||
|
|
||||||
return ucs4;
|
return ucs4;
|
||||||
@ -155,9 +155,9 @@ vector<char_type> qstring_to_ucs4(QString const & qstr)
|
|||||||
|
|
||||||
void qstring_to_ucs4(QString const & qstr, vector<char_type> & ucs4)
|
void qstring_to_ucs4(QString const & qstr, vector<char_type> & ucs4)
|
||||||
{
|
{
|
||||||
size_t ls = qstr.size();
|
int ls = qstr.size();
|
||||||
ucs4.clear();
|
ucs4.clear();
|
||||||
for (size_t i = 0; i < ls; ++i)
|
for (int i = 0; i < ls; ++i)
|
||||||
ucs4.push_back(static_cast<boost::uint32_t>(qstr[i].unicode()));
|
ucs4.push_back(static_cast<boost::uint32_t>(qstr[i].unicode()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user