mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:07:04 +08:00
refs #247 Fine-tuned CVariant constructors.
This commit is contained in:
@@ -63,6 +63,15 @@ namespace BlackMisc
|
||||
//! Construct a null variant of the given type.
|
||||
CVariant(QVariant::Type type) : m_v(type) {}
|
||||
|
||||
//! Avoid unexpected implicit cast to QVariant::Type. (Use CVariant::from() instead.)
|
||||
CVariant(int) = delete;
|
||||
|
||||
//! Implicit conversion from QString.
|
||||
CVariant(const QString &string) : m_v(string) {}
|
||||
|
||||
//! Implicit conversion from C string.
|
||||
CVariant(const char *string) : m_v(string) {}
|
||||
|
||||
//! Construct a variant from the given type and opaque pointer.
|
||||
CVariant(int typeId, const void *copy) : m_v(typeId, copy) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user