diff options
Diffstat (limited to 'doc/codesnippets/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp')
-rw-r--r-- | doc/codesnippets/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/doc/codesnippets/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp b/doc/codesnippets/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp deleted file mode 100644 index 710826205..000000000 --- a/doc/codesnippets/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//! [0] -static uchar bindata[] = { 231, 1, 44, ... }; -QByteArray a; -a.setRawData(bindata, sizeof(bindata)); // a points to bindata -QDataStream s(a, IO_ReadOnly); // open on a's data -s >> <something>; // read raw bindata -s.close(); -a.resetRawData(bindata, sizeof(bindata)); // finished -//! [0] - - -//! [1] -static uchar bindata[] = { 231, 1, 44, ... }; -QByteArray a, b; -a.setRawData(bindata, sizeof(bindata)); // a points to bindata -a.resize(8); // will crash -b = a; // will crash -a[2] = 123; // might crash - // forget to resetRawData - will crash -//! [1] |