summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Krause <[email protected]>2017-04-08 17:02:30 +0200
committerVolker Krause <[email protected]>2017-04-08 17:02:30 +0200
commit5ad230a4e8cb859fac0cf6007231d4c0966768af (patch)
tree4c7dbae14b5b39c52e309beacd37212480b3d862
parent1dcd907a743d516cc8ca904624b0b4b270e7bf01 (diff)
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.
-rw-r--r--src/prefs.cpp31
-rw-r--r--src/prefs.h1
2 files changed, 1 insertions, 31 deletions
diff --git a/src/prefs.cpp b/src/prefs.cpp
index b3fc370..75fa5d4 100644
--- a/src/prefs.cpp
+++ b/src/prefs.cpp
@@ -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
diff --git a/src/prefs.h b/src/prefs.h
index 9df294a..d6eb29f 100644
--- a/src/prefs.h
+++ b/src/prefs.h
@@ -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;