mirror of
https://github.com/RGBCube/serenity
synced 2025-07-19 18:07:34 +00:00
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:
parent
e9cbda29e9
commit
9ee63ef8b3
2 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@ public:
|
|||
GVariant(bool);
|
||||
GVariant(float);
|
||||
GVariant(int);
|
||||
GVariant(const char*);
|
||||
GVariant(const String&);
|
||||
GVariant(const GraphicsBitmap&);
|
||||
GVariant(const GIcon&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue