]> git.lyx.org Git - lyx.git/commitdiff
remove size_t/int warning: QString doesn't use size_t so we must cast it to avoid...
authorPeter Kümmel <syntheticpp@gmx.net>
Wed, 29 Nov 2006 22:57:34 +0000 (22:57 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Wed, 29 Nov 2006 22:57:34 +0000 (22:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16117 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/qt_helpers.C
src/frontends/qt4/qt_helpers.h

index b1dfd2c62de119f05111aa3bfce381e7e0fd1415..ce329e1c637e9bec6f1473f6f9892da05b1da61c 100644 (file)
@@ -113,9 +113,9 @@ void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
 
 void ucs4_to_qstring(lyx::docstring const & str, QString & s)
 {
-       size_t const ls = str.size(); 
-       s.resize(ls);
-       for (int i = ls; --i >= 0; )
+       int  i = static_cast<int>(str.size()); 
+       s.resize(i);
+       for (i; --i >= 0; )
                s[i] = ucs4_to_qchar(str[i]);
 }
 
index 29a3fbfaee527761b4f8190de6f8dbf993d69e8f..1bfed02b7f188184ed1666ede58fef501278f742 100644 (file)
@@ -87,8 +87,9 @@ void ucs4_to_qstring(docstring const & str, QString & s);
 
 inline void ucs4_to_qstring(char_type const * str, size_t ls, QString & s)
 {
-       s.resize(ls);
-       for (int i = ls; --i >= 0; )
+       int i = static_cast<int>(ls);
+       s.resize(i);
+       for (i ; --i >= 0; )
                s[i] = ucs4_to_qchar(str[i]);
 }