Differences From Artifact [37ebb8afd0]:
- File common/OFDataArray+QByteArray.mm — part of check-in [3ece549448] at 2017-04-15 17:18:52 on branch trunk — Make toOF/toQt more powerful and complete QtWidget (user: js, size: 1503) [annotate] [blame] [check-ins using]
- File
src/common/OFDataArray+QByteArray.mm
— part of check-in
[baf52ea3b1]
at
2017-04-17 23:25:45
on branch trunk
— Add a proper build system
Also lowers the minimum required Qt version to 5.5. (user: js, size: 1503) [annotate] [blame] [check-ins using]
To Artifact [d8eb348c3a]:
- File src/common/OFDataArray+QByteArray.mm — part of check-in [860515ac5a] at 2017-05-08 00:11:18 on branch trunk — Update to recent ObjFW changes (user: js, size: 1505) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
19 20 21 22 23 24 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "OFDataArray+QByteArray.h" @implementation OFDataArray (QByteArray) | | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "OFDataArray+QByteArray.h" @implementation OFDataArray (QByteArray) + (instancetype)dataArrayWithQByteArray: (const QByteArray &)qByteArray { OFDataArray *ret = [OFDataArray dataArray]; [ret addItems: qByteArray.data() count: qByteArray.count()]; return ret; } - (QByteArray)qByteArray { return QByteArray((char *)[self items], [self count] * [self itemSize]); } @end |