Commit 5ad230a4 authored by Volker Krause's avatar Volker Krause

Remove dead code for configuring the time spec

This is never called, and worse the method to read this setting is even
hardcoded to local time.
parent 1dcd907a
......@@ -105,7 +105,6 @@ public:
QFont mDefaultMonthViewFont;
QFont mDefaultAgendaTimeLabelsFont;
KDateTime::Spec mTimeSpec;
QStringList mTimeScaleTimeZones;
QSet<EventViews::EventView::ItemIcon> mAgendaViewIcons;
......@@ -115,8 +114,6 @@ protected:
void usrSetDefaults() Q_DECL_OVERRIDE;
void usrRead() Q_DECL_OVERRIDE;
bool usrSave() Q_DECL_OVERRIDE;
void setTimeZoneDefault();
};
BaseConfig::BaseConfig() : PrefsBase()
......@@ -159,8 +156,6 @@ void BaseConfig::usrSetDefaults()
setAgendaTimeLabelsFont(mDefaultAgendaTimeLabelsFont);
setMonthViewFont(mDefaultMonthViewFont);
setTimeZoneDefault();
PrefsBase::usrSetDefaults();
}
......@@ -180,10 +175,6 @@ void BaseConfig::usrRead()
setResourceColor(*it3, color);
}
if (!mTimeSpec.isValid()) {
setTimeZoneDefault();
}
#if 0
config()->setGroup("FreeBusy");
if (mRememberRetrievePw) {
......@@ -244,19 +235,6 @@ bool BaseConfig::usrSave()
return KConfigSkeleton::usrSave();
}
void BaseConfig::setTimeZoneDefault()
{
KTimeZone zone = KSystemTimeZones::local();
if (!zone.isValid()) {
qCCritical(CALENDARVIEW_LOG) << "KSystemTimeZones::local() return 0";
return;
}
qCDebug(CALENDARVIEW_LOG) << "----- time zone:" << zone.name();
mTimeSpec = zone;
}
class Q_DECL_HIDDEN Prefs::Private
{
public:
......@@ -264,8 +242,6 @@ public:
Private(Prefs *parent, KCoreConfigSkeleton *appConfig)
: mAppConfig(appConfig), q(parent) {}
void setTimeZoneDefault();
KConfigSkeletonItem *appConfigItem(const KConfigSkeletonItem *baseConfigItem) const;
void setBool(KCoreConfigSkeleton::ItemBool *baseConfigItem, bool value);
......@@ -859,12 +835,7 @@ KDateTime::Spec Prefs::timeSpec() const
QTimeZone Prefs::timeZone() const
{
return QTimeZone(timeSpec().timeZone().name().toUtf8());
}
void Prefs::setTimeSpec(const KDateTime::Spec &spec)
{
d->mBaseConfig.mTimeSpec = spec;
return QTimeZone::systemTimeZone();
}
bool Prefs::colorAgendaBusyDays() const
......
......@@ -154,7 +154,6 @@ public:
QColor resourceColor(const QString &);
QColor resourceColorKnown(const QString &) const;
void setTimeSpec(const KDateTime::Spec &spec);
KDateTime::Spec timeSpec() const;
QTimeZone timeZone() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment