mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #140 added streaming for tuples to QDebug
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <QJsonObject>
|
||||
#include <QDateTime>
|
||||
#include <QString>
|
||||
#include <QDebug>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <functional>
|
||||
@@ -182,6 +183,12 @@ namespace BlackMisc
|
||||
return TupleHelper < N - 1 >::unmarshall(arg, tu) >> std::get < N - 1 > (tu);
|
||||
}
|
||||
|
||||
template <class Tu>
|
||||
static QDebug debug(QDebug dbg, Tu &tu)
|
||||
{
|
||||
return TupleHelper < N - 1 >::debug(dbg, tu) << std::get < N - 1 > (tu);
|
||||
}
|
||||
|
||||
template <class Tu>
|
||||
static uint hash(const Tu &tu)
|
||||
{
|
||||
@@ -214,6 +221,8 @@ namespace BlackMisc
|
||||
template <class Tu>
|
||||
static const QDBusArgument &unmarshall(const QDBusArgument &arg, Tu &) { return arg; }
|
||||
template <class Tu>
|
||||
static QDebug debug(QDebug dbg, Tu &) { return dbg; }
|
||||
template <class Tu>
|
||||
static uint hash(const Tu &) { return 0; }
|
||||
template <class Tu>
|
||||
static void serializeJson(QJsonObject &, const QStringList &, const Tu &) {}
|
||||
|
||||
Reference in New Issue
Block a user