aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2016-10-01 18:54:57 +0200
committerGitHub <noreply@github.com>2016-10-01 18:54:57 +0200
commit704d011cab4116ba9a495ff69a243f02aa88faee (patch)
treed52c1eed836ee673cf3632ed93b7d1a32d02466b
parent4f27fb89e110486a50311b944e46adfb4eeff9a0 (diff)
parentc4dc07d822178dbbf87d101583494702ed8c6875 (diff)
Merge pull request #10603 from Paxxi/fix_yesno
[xbmc][fix] Fix issue where yes/no dialog would show blank buttons
-rw-r--r--xbmc/messaging/helpers/DialogHelper.h8
-rw-r--r--xbmc/utils/Variant.cpp5
-rw-r--r--xbmc/utils/Variant.h3
3 files changed, 12 insertions, 4 deletions
diff --git a/xbmc/messaging/helpers/DialogHelper.h b/xbmc/messaging/helpers/DialogHelper.h
index d2977972ea..1fa61b77b1 100644
--- a/xbmc/messaging/helpers/DialogHelper.h
+++ b/xbmc/messaging/helpers/DialogHelper.h
@@ -70,7 +70,8 @@ struct DialogYesNoMessage
\sa CGUIDialogYesNo::ShowAndGetInput
\sa DialogYesNoMessage
*/
-DialogResponse ShowYesNoDialogText(CVariant heading, CVariant text, CVariant noLabel = "", CVariant yesLabel = "", uint32_t autoCloseTimeout = 0);
+DialogResponse ShowYesNoDialogText(CVariant heading, CVariant text, CVariant noLabel = CVariant(),
+ CVariant yesLabel = CVariant(), uint32_t autoCloseTimeout = 0);
/*!
\brief This is a helper method to send a threadmessage to open a Yes/No dialog box
@@ -90,8 +91,9 @@ DialogResponse ShowYesNoDialogText(CVariant heading, CVariant text, CVariant noL
\sa CGUIDialogYesNo::ShowAndGetInput
\sa DialogYesNoMessage
*/
-DialogResponse ShowYesNoDialogLines(CVariant heading, CVariant line0, CVariant line1 = "",
- CVariant line2 = "", CVariant noLabel = "", CVariant yesLabel = "", uint32_t autoCloseTimeout = 0);
+DialogResponse ShowYesNoDialogLines(CVariant heading, CVariant line0, CVariant line1 = CVariant(),
+ CVariant line2 = CVariant(), CVariant noLabel = CVariant(),
+ CVariant yesLabel = CVariant(), uint32_t autoCloseTimeout = 0);
}
}
diff --git a/xbmc/utils/Variant.cpp b/xbmc/utils/Variant.cpp
index 270d99e0e5..a884130831 100644
--- a/xbmc/utils/Variant.cpp
+++ b/xbmc/utils/Variant.cpp
@@ -129,6 +129,11 @@ double str2double(const std::wstring &str, double fallback /* = 0.0 */)
return fallback;
}
+CVariant::CVariant()
+ : m_type{VariantTypeNull}
+{
+}
+
CVariant CVariant::ConstNullVariant = CVariant::VariantTypeConstNull;
CVariant::CVariant(VariantType type)
diff --git a/xbmc/utils/Variant.h b/xbmc/utils/Variant.h
index b902751dce..6760a6ae6d 100644
--- a/xbmc/utils/Variant.h
+++ b/xbmc/utils/Variant.h
@@ -48,7 +48,8 @@ public:
VariantTypeConstNull
};
- CVariant(VariantType type = VariantTypeNull);
+ CVariant();
+ CVariant(VariantType type);
CVariant(int integer);
CVariant(int64_t integer);
CVariant(unsigned int unsignedinteger);