mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 21:05:31 +08:00
refs #879, added std::initializer_list in CVariantList
This commit is contained in:
committed by
Mathew Sutcliffe
parent
f71cb04cd2
commit
d997ec1e30
@@ -11,11 +11,9 @@
|
|||||||
|
|
||||||
namespace BlackMisc
|
namespace BlackMisc
|
||||||
{
|
{
|
||||||
/*
|
CVariantList::CVariantList(const CSequence &other) : CSequence(other)
|
||||||
* Construct from base class object
|
|
||||||
*/
|
|
||||||
CVariantList::CVariantList(const CSequence &other) :
|
|
||||||
CSequence(other)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
} // namespace
|
CVariantList::CVariantList(std::initializer_list<CVariant> il) : CSequence(il)
|
||||||
|
{}
|
||||||
|
} // ns
|
||||||
|
|||||||
@@ -16,12 +16,10 @@
|
|||||||
#include "blackmisc/collection.h"
|
#include "blackmisc/collection.h"
|
||||||
#include "blackmisc/sequence.h"
|
#include "blackmisc/sequence.h"
|
||||||
#include "blackmisc/variant.h"
|
#include "blackmisc/variant.h"
|
||||||
|
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
|
|
||||||
namespace BlackMisc
|
namespace BlackMisc
|
||||||
{
|
{
|
||||||
|
|
||||||
//! Value object encapsulating a list of variants.
|
//! Value object encapsulating a list of variants.
|
||||||
class BLACKMISC_EXPORT CVariantList :
|
class BLACKMISC_EXPORT CVariantList :
|
||||||
public CSequence<CVariant>,
|
public CSequence<CVariant>,
|
||||||
@@ -31,11 +29,13 @@ namespace BlackMisc
|
|||||||
BLACKMISC_DECLARE_USING_MIXIN_METATYPE(CVariantList)
|
BLACKMISC_DECLARE_USING_MIXIN_METATYPE(CVariantList)
|
||||||
|
|
||||||
//! Default constructor.
|
//! Default constructor.
|
||||||
CVariantList() = default;
|
CVariantList() {}
|
||||||
|
|
||||||
//! Construct from a base class object.
|
//! Construct from a base class object.
|
||||||
CVariantList(const CSequence &other);
|
CVariantList(const CSequence &other);
|
||||||
|
|
||||||
|
//! Initializer list constructor.
|
||||||
|
CVariantList(std::initializer_list<CVariant> il);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user