Permalink
Browse files

Fixes various issues with old UI settings code.

icc was quite unhappy with these classes and it's evident at looking at them
that they haven't gotten any love since they were slated for eventual deletion.
  • Loading branch information...
1 parent 98affd3 commit 84974039959d2372844a39a820ca4c7530df5a58 @daniel-kristjansson daniel-kristjansson committed May 18, 2012
Showing with 161 additions and 93 deletions.
  1. +15 −1 mythtv/libs/libmyth/settings.cpp
  2. +146 −92 mythtv/libs/libmyth/settings.h
@@ -705,7 +705,7 @@ void ComboBoxSetting::setVisible(bool b)
}
}
-void ComboBoxSetting::setValue(QString newValue)
+void ComboBoxSetting::setValue(const QString &newValue)
{
for (uint i = 0; i < values.size(); i++)
{
@@ -875,6 +875,20 @@ void DateSetting::setValue(const QDate& newValue) {
Setting::setValue(newValue.toString(Qt::ISODate));
}
+void DateSetting::setValue(const QString &newValue)
+{
+ QDate date = QDate::fromString(newValue, Qt::ISODate);
+ if (date.isValid())
+ setValue(date);
+}
+
+void TimeSetting::setValue(const QString &newValue)
+{
+ QTime time = QTime::fromString(newValue, Qt::ISODate);
+ if (time.isValid())
+ setValue(time);
+}
+
QWidget* CheckBoxSetting::configWidget(ConfigurationGroup *cg, QWidget* parent,
const char* widgetName) {
widget = new MythCheckBox(parent, widgetName);
Oops, something went wrong.

0 comments on commit 8497403

Please sign in to comment.