src/bytestream.cpp

changeset 17
b41d74bacdea
parent 15
3d3e5f0fc4cc
equal deleted inserted replaced
16:a8c78391e414 17:b41d74bacdea
209 // ============================================================================= 209 // =============================================================================
210 void Bytestream::writeString (str val) { 210 void Bytestream::writeString (str val) {
211 growToFit (val.length() + 1); 211 growToFit (val.length() + 1);
212 212
213 for (qchar c : val) 213 for (qchar c : val)
214 #if (QT_VERSION >= QT_VERSION_CHECK (5, 0, 0))
215 doWrite (c.toLatin1()); 214 doWrite (c.toLatin1());
216 #else
217 doWrite (c.toAscii());
218 #endif // QT_VERSION
219 215
220 doWrite ('\0'); 216 doWrite ('\0');
221 } 217 }
222 218
223 // ============================================================================= 219 // =============================================================================

mercurial