208 |
208 |
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()); |
|
216 #else |
214 doWrite (c.toAscii()); |
217 doWrite (c.toAscii()); |
|
218 #endif // QT_VERSION |
215 |
219 |
216 doWrite ('\0'); |
220 doWrite ('\0'); |
217 } |
221 } |
218 |
222 |
219 // ============================================================================= |
223 // ============================================================================= |