GVariant: Add a constructor that takes const char*.

This prevents the compiler from selecting the GVariant(bool) constructor
which is clearly not what I want when I do GVariant("Hello"). :^)
This commit is contained in:
Andreas Kling
2019-06-22 10:37:44 +02:00
parent e9cbda29e9
commit 9ee63ef8b3
2 changed files with 6 additions and 0 deletions

View File

@@ -47,6 +47,11 @@ GVariant::GVariant(bool value)
m_value.as_bool = value;
}
GVariant::GVariant(const char* cstring)
: GVariant(String(cstring))
{
}
GVariant::GVariant(const String& value)
: m_type(Type::String)
{