Skip to content

Commit

Permalink
Fixes various issues with old UI settings code.
Browse files Browse the repository at this point in the history
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
daniel-kristjansson committed May 24, 2012
1 parent 98affd3 commit 8497403
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 93 deletions.
16 changes: 15 additions & 1 deletion mythtv/libs/libmyth/settings.cpp
Expand Up @@ -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++) for (uint i = 0; i < values.size(); i++)
{ {
Expand Down Expand Up @@ -875,6 +875,20 @@ void DateSetting::setValue(const QDate& newValue) {
Setting::setValue(newValue.toString(Qt::ISODate)); 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, QWidget* CheckBoxSetting::configWidget(ConfigurationGroup *cg, QWidget* parent,
const char* widgetName) { const char* widgetName) {
widget = new MythCheckBox(parent, widgetName); widget = new MythCheckBox(parent, widgetName);
Expand Down

0 comments on commit 8497403

Please sign in to comment.