refs #478 refs #488, utils / free functions

* seed for random numbers per thread
* added function to get all user metatypes as string
* added new read file function per path/name
* removed DBus operators for pixmap
* JSON operators for byte array
* util function for JSON string
This commit is contained in:
Klaus Basan
2015-10-14 01:48:52 +02:00
committed by Mathew Sutcliffe
parent 19df8a5d71
commit a725ce2181
14 changed files with 120 additions and 64 deletions

View File

@@ -1,31 +0,0 @@
/* Copyright (C) 2015
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "blackmisc/dbus.h"
#include "blackmisc/blackmiscfreefunctions.h"
const QDBusArgument &operator>>(const QDBusArgument &argument, QPixmap &pixmap)
{
QByteArray ba;
argument.beginStructure();
argument >> ba;
BlackMisc::pngByteArrayToPixmapRef(ba, pixmap);
argument.endStructure();
return argument;
}
QDBusArgument &operator<<(QDBusArgument &argument, const QPixmap &pixmap)
{
QByteArray ba;
BlackMisc::pixmapToPngByteArray(pixmap, ba);
argument.beginStructure();
argument << ba;
argument.endStructure();
return argument;
}