[PATCH 07/23] kcalendarsystem: Drop unused internal functions.

Jon Severinsson jon at severinsson.net
Fri Oct 12 15:13:42 UTC 2012


---
 kdecore/date/kcalendarsystem.cpp               |   42 --------------------
 kdecore/date/kcalendarsystem.h                 |   50 +-----------------------
 kdecore/date/kcalendarsystemcoptic.cpp         |    6 ---
 kdecore/date/kcalendarsystemcoptic_p.h         |    6 +--
 kdecore/date/kcalendarsystemethiopian.cpp      |    6 ---
 kdecore/date/kcalendarsystemethiopian_p.h      |    7 +---
 kdecore/date/kcalendarsystemgregorian.cpp      |    6 ---
 kdecore/date/kcalendarsystemgregorian_p.h      |    7 +---
 kdecore/date/kcalendarsystemhebrew.cpp         |    6 ---
 kdecore/date/kcalendarsystemhebrew_p.h         |    7 +---
 kdecore/date/kcalendarsystemindiannational.cpp |    6 ---
 kdecore/date/kcalendarsystemindiannational_p.h |    7 +---
 kdecore/date/kcalendarsystemislamiccivil.cpp   |    6 ---
 kdecore/date/kcalendarsystemislamiccivil_p.h   |    7 +---
 kdecore/date/kcalendarsystemjalali.cpp         |    6 ---
 kdecore/date/kcalendarsystemjalali_p.h         |    7 +---
 kdecore/date/kcalendarsystemjapanese.cpp       |    6 ---
 kdecore/date/kcalendarsystemjapanese_p.h       |    7 +---
 kdecore/date/kcalendarsystemjulian.cpp         |    8 +---
 kdecore/date/kcalendarsystemjulian_p.h         |    7 +---
 kdecore/date/kcalendarsystemminguo.cpp         |    6 ---
 kdecore/date/kcalendarsystemminguo_p.h         |    7 +---
 kdecore/date/kcalendarsystemprivate_p.h        |    1 -
 kdecore/date/kcalendarsystemqdate.cpp          |    8 +---
 kdecore/date/kcalendarsystemqdate_p.h          |    7 +---
 kdecore/date/kcalendarsystemthai.cpp           |    6 ---
 kdecore/date/kcalendarsystemthai_p.h           |    7 +---
 27 filer ändrade, 27 tillägg(+), 225 borttagningar(-)

diff --git a/kdecore/date/kcalendarsystem.cpp b/kdecore/date/kcalendarsystem.cpp
index 138c62d..f146d99 100644
--- a/kdecore/date/kcalendarsystem.cpp
+++ b/kdecore/date/kcalendarsystem.cpp
@@ -648,15 +648,6 @@ QString KCalendarSystemPrivate::stringFromInteger(int number, int padWidth, QCha
     }
 }
 
-// Allows us to set dates outside publically valid range, USE WITH CARE!!!!
-bool KCalendarSystemPrivate::setAnyDate(QDate &date, int year, int month, int day) const
-{
-    int jd;
-    q->dateToJulianDay(year, month, day, jd);
-    date = QDate::fromJulianDay(jd);
-    return true;
-}
-
 // Utility to correctly add years to a year number because some systems such as
 // Julian and Gregorian calendars don't have a year 0
 int KCalendarSystemPrivate::addYears(int originalYear, int addYears) const
@@ -923,21 +914,6 @@ void KCalendarSystemPrivate::loadConfig(const QString & calendarType)
     loadShortYearWindowStartYear(calendarGroup);
 }
 
-
-KCalendarSystem::KCalendarSystem(const KLocale *locale)
-               : d_ptr(new KCalendarSystemPrivate(this))
-{
-    d_ptr->m_config = KSharedConfig::Ptr();
-    d_ptr->m_locale = locale;
-}
-
-KCalendarSystem::KCalendarSystem(const KSharedConfig::Ptr config, const KLocale *locale)
-               : d_ptr(new KCalendarSystemPrivate(this))
-{
-    d_ptr->m_config = config;
-    d_ptr->m_locale = locale;
-}
-
 KCalendarSystem::KCalendarSystem(KCalendarSystemPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale)
                : d_ptr(&dd)
 {
@@ -2251,21 +2227,3 @@ const KLocale * KCalendarSystem::locale() const
 
     return d->locale();
 }
-
-// Deprecated
-void KCalendarSystem::setMaxMonthsInYear(int maxMonths)
-{
-    Q_UNUSED(maxMonths)
-}
-
-// Deprecated
-void KCalendarSystem::setMaxDaysInWeek(int maxDays)
-{
-    Q_UNUSED(maxDays)
-}
-
-// Deprecated
-void KCalendarSystem::setHasYear0(bool hasYear0)
-{
-    Q_UNUSED(hasYear0)
-}
diff --git a/kdecore/date/kcalendarsystem.h b/kdecore/date/kcalendarsystem.h
index 9aa7415..42cefd4 100644
--- a/kdecore/date/kcalendarsystem.h
+++ b/kdecore/date/kcalendarsystem.h
@@ -213,23 +213,6 @@ public:
     static QString calendarType(KLocale::CalendarSystem calendarSystem);
 
     /**
-     * Constructor of abstract calendar class. This will be called by derived classes.
-     *
-     * @param locale locale to use for translations. The global locale is used if null.
-     */
-    explicit KCalendarSystem(const KLocale *locale = 0);
-
-    /**
-     * Constructor of abstract calendar class. This will be called by derived classes.
-     *
-     * @param config a configuration file with a 'KCalendarSystem %calendarName' group detailing
-     *               locale-related preferences (such as era options).  The global config is used
-                     if null.
-     * @param locale locale to use for translations. The global locale is used if null.
-     */
-    explicit KCalendarSystem(const KSharedConfig::Ptr config, const KLocale *locale = 0);
-
-    /**
      * Destructor.
      */
     virtual ~KCalendarSystem();
@@ -1617,35 +1600,6 @@ protected:
     const KLocale *locale() const;
 
     /**
-     * @deprecated for internal use only
-     *
-     * Sets the maximum number of months in a year
-     *
-     * Only for internal calendar system use
-     */
-    KDECORE_DEPRECATED void setMaxMonthsInYear(int maxMonths);
-
-    /**
-     * @deprecated for internal use only
-     *
-     * Sets the maximum number of days in a week
-     *
-     * Only for internal calendar system use
-     */
-    KDECORE_DEPRECATED void setMaxDaysInWeek(int maxDays);
-
-    /**
-     * @deprecated for internal use only
-     *
-     * @since 4.4
-     *
-     * Sets if Calendar System has Year 0 or not
-     *
-     * Only for internal calendar system use
-     */
-    KDECORE_DEPRECATED void setHasYear0(bool hasYear0);
-
-    /**
      * Constructor of abstract calendar class. This will be called by derived classes.
      *
      * @param dd derived private d-pointer.
@@ -1654,9 +1608,7 @@ protected:
                      if null.
      * @param locale locale to use for translations. The global locale is used if null.
      */
-    KCalendarSystem(KCalendarSystemPrivate &dd,
-                    const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                    const KLocale *locale = 0);
+    KCalendarSystem(KCalendarSystemPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
     KCalendarSystemPrivate * const d_ptr;
 
diff --git a/kdecore/date/kcalendarsystemcoptic.cpp b/kdecore/date/kcalendarsystemcoptic.cpp
index 25f4f0d..c9a5b5a 100644
--- a/kdecore/date/kcalendarsystemcoptic.cpp
+++ b/kdecore/date/kcalendarsystemcoptic.cpp
@@ -392,12 +392,6 @@ QString KCalendarSystemCopticPrivate::weekDayName(int weekDay, KLocale::DateTime
 }
 
 
-KCalendarSystemCoptic::KCalendarSystemCoptic(const KLocale *locale)
-                     : KCalendarSystem(*new KCalendarSystemCopticPrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemCoptic::KCalendarSystemCoptic(const KSharedConfig::Ptr config, const KLocale *locale)
                      : KCalendarSystem(*new KCalendarSystemCopticPrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemcoptic_p.h b/kdecore/date/kcalendarsystemcoptic_p.h
index d7498a4..3d38186 100644
--- a/kdecore/date/kcalendarsystemcoptic_p.h
+++ b/kdecore/date/kcalendarsystemcoptic_p.h
@@ -37,8 +37,7 @@ class KCalendarSystemCopticPrivate;
 class KCalendarSystemCoptic: public KCalendarSystem
 {
 public:
-    explicit KCalendarSystemCoptic(const KLocale *locale = 0);
-    explicit KCalendarSystemCoptic(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemCoptic(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemCoptic();
 
     virtual QString calendarType() const;
@@ -68,8 +67,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemCoptic(KCalendarSystemCopticPrivate &dd, const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                          const KLocale *locale = 0);
+    KCalendarSystemCoptic(KCalendarSystemCopticPrivate &dd, const KSharedConfig::Ptr, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemCoptic)
diff --git a/kdecore/date/kcalendarsystemethiopian.cpp b/kdecore/date/kcalendarsystemethiopian.cpp
index d337003..43a2dbd 100644
--- a/kdecore/date/kcalendarsystemethiopian.cpp
+++ b/kdecore/date/kcalendarsystemethiopian.cpp
@@ -292,12 +292,6 @@ QString KCalendarSystemEthiopianPrivate::weekDayName(int weekDay, KLocale::DateT
 }
 
 
-KCalendarSystemEthiopian::KCalendarSystemEthiopian(const KLocale *locale)
-                        : KCalendarSystemCoptic(*new KCalendarSystemEthiopianPrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemEthiopian::KCalendarSystemEthiopian(const KSharedConfig::Ptr config, const KLocale *locale)
                         : KCalendarSystemCoptic(*new KCalendarSystemEthiopianPrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemethiopian_p.h b/kdecore/date/kcalendarsystemethiopian_p.h
index 8394f07..51e936e 100644
--- a/kdecore/date/kcalendarsystemethiopian_p.h
+++ b/kdecore/date/kcalendarsystemethiopian_p.h
@@ -38,8 +38,7 @@ class KCalendarSystemEthiopianPrivate;
 class KCalendarSystemEthiopian: public KCalendarSystemCoptic
 {
 public:
-    explicit KCalendarSystemEthiopian(const KLocale *locale = 0);
-    explicit KCalendarSystemEthiopian(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemEthiopian(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemEthiopian();
 
     virtual QString calendarType() const;
@@ -69,9 +68,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemEthiopian(KCalendarSystemEthiopianPrivate &dd,
-                             const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                             const KLocale *locale = 0);
+    KCalendarSystemEthiopian(KCalendarSystemEthiopianPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemEthiopian)
diff --git a/kdecore/date/kcalendarsystemgregorian.cpp b/kdecore/date/kcalendarsystemgregorian.cpp
index 92fd882..f605d11 100644
--- a/kdecore/date/kcalendarsystemgregorian.cpp
+++ b/kdecore/date/kcalendarsystemgregorian.cpp
@@ -384,12 +384,6 @@ QString KCalendarSystemGregorianPrivate::weekDayName(int weekDay, KLocale::DateT
 }
 
 
-KCalendarSystemGregorian::KCalendarSystemGregorian(const KLocale *locale)
-                        : KCalendarSystem(*new KCalendarSystemGregorianPrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemGregorian::KCalendarSystemGregorian(const KSharedConfig::Ptr config,
                                                                      const KLocale *locale)
                         : KCalendarSystem(*new KCalendarSystemGregorianPrivate(this), config, locale)
diff --git a/kdecore/date/kcalendarsystemgregorian_p.h b/kdecore/date/kcalendarsystemgregorian_p.h
index 2bc6a3b..bb3e8ff 100644
--- a/kdecore/date/kcalendarsystemgregorian_p.h
+++ b/kdecore/date/kcalendarsystemgregorian_p.h
@@ -42,8 +42,7 @@ class KCalendarSystemGregorianPrivate;
 class KCalendarSystemGregorian: public KCalendarSystem
 {
 public:
-    explicit KCalendarSystemGregorian(const KLocale *locale = 0);
-    explicit KCalendarSystemGregorian(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemGregorian(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemGregorian();
 
     virtual QString calendarType() const;
@@ -75,9 +74,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemGregorian(KCalendarSystemGregorianPrivate &dd,
-                                      const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                                      const KLocale *locale = 0);
+    KCalendarSystemGregorian(KCalendarSystemGregorianPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemGregorian)
diff --git a/kdecore/date/kcalendarsystemhebrew.cpp b/kdecore/date/kcalendarsystemhebrew.cpp
index 4ce7810..4097d1e 100644
--- a/kdecore/date/kcalendarsystemhebrew.cpp
+++ b/kdecore/date/kcalendarsystemhebrew.cpp
@@ -876,12 +876,6 @@ QString KCalendarSystemHebrewPrivate::weekDayName(int weekDay, KLocale::DateTime
 }
 
 
-KCalendarSystemHebrew::KCalendarSystemHebrew(const KLocale *locale)
-                     : KCalendarSystem(*new KCalendarSystemHebrewPrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemHebrew::KCalendarSystemHebrew(const KSharedConfig::Ptr config, const KLocale *locale)
                      : KCalendarSystem(*new KCalendarSystemHebrewPrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemhebrew_p.h b/kdecore/date/kcalendarsystemhebrew_p.h
index 3c3f7fb..0405797 100644
--- a/kdecore/date/kcalendarsystemhebrew_p.h
+++ b/kdecore/date/kcalendarsystemhebrew_p.h
@@ -41,8 +41,7 @@ class KCalendarSystemHebrewPrivate;
 class KCalendarSystemHebrew : public KCalendarSystem
 {
 public:
-    explicit KCalendarSystemHebrew(const KLocale * locale = 0);
-    explicit KCalendarSystemHebrew(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemHebrew(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemHebrew();
 
     virtual QString calendarType() const;
@@ -76,9 +75,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemHebrew(KCalendarSystemHebrewPrivate &dd,
-                          const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                          const KLocale *locale = 0);
+    KCalendarSystemHebrew(KCalendarSystemHebrewPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemHebrew)
diff --git a/kdecore/date/kcalendarsystemindiannational.cpp b/kdecore/date/kcalendarsystemindiannational.cpp
index f5b79f2..bf222f6 100644
--- a/kdecore/date/kcalendarsystemindiannational.cpp
+++ b/kdecore/date/kcalendarsystemindiannational.cpp
@@ -387,12 +387,6 @@ QString KCalendarSystemIndianNationalPrivate::weekDayName(int weekDay, KLocale::
 }
 
 
-KCalendarSystemIndianNational::KCalendarSystemIndianNational(const KLocale *locale)
-                             : KCalendarSystem(*new KCalendarSystemIndianNationalPrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemIndianNational::KCalendarSystemIndianNational(const KSharedConfig::Ptr config, const KLocale *locale)
                              : KCalendarSystem(*new KCalendarSystemIndianNationalPrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemindiannational_p.h b/kdecore/date/kcalendarsystemindiannational_p.h
index 0e8e036..409954c 100644
--- a/kdecore/date/kcalendarsystemindiannational_p.h
+++ b/kdecore/date/kcalendarsystemindiannational_p.h
@@ -41,8 +41,7 @@ class KCalendarSystemIndianNationalPrivate;
 class KCalendarSystemIndianNational: public KCalendarSystem
 {
 public:
-    explicit KCalendarSystemIndianNational(const KLocale *locale = 0);
-    explicit KCalendarSystemIndianNational(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemIndianNational(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemIndianNational();
 
     virtual QString calendarType() const;
@@ -72,9 +71,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemIndianNational(KCalendarSystemIndianNationalPrivate &dd,
-                                  const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                                  const KLocale *locale = 0);
+    KCalendarSystemIndianNational(KCalendarSystemIndianNationalPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemIndianNational)
diff --git a/kdecore/date/kcalendarsystemislamiccivil.cpp b/kdecore/date/kcalendarsystemislamiccivil.cpp
index 053ec55..f6c7c4b 100644
--- a/kdecore/date/kcalendarsystemislamiccivil.cpp
+++ b/kdecore/date/kcalendarsystemislamiccivil.cpp
@@ -393,12 +393,6 @@ QString KCalendarSystemIslamicCivilPrivate::weekDayName(int weekDay, KLocale::Da
 }
 
 
-KCalendarSystemIslamicCivil::KCalendarSystemIslamicCivil(const KLocale *locale)
-                           : KCalendarSystem(*new KCalendarSystemIslamicCivilPrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemIslamicCivil::KCalendarSystemIslamicCivil(const KSharedConfig::Ptr config, const KLocale *locale)
                            : KCalendarSystem(*new KCalendarSystemIslamicCivilPrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemislamiccivil_p.h b/kdecore/date/kcalendarsystemislamiccivil_p.h
index 59629cc..4f493e5 100644
--- a/kdecore/date/kcalendarsystemislamiccivil_p.h
+++ b/kdecore/date/kcalendarsystemislamiccivil_p.h
@@ -43,8 +43,7 @@ class KCalendarSystemIslamicCivilPrivate;
 class KCalendarSystemIslamicCivil : public KCalendarSystem
 {
 public:
-    explicit KCalendarSystemIslamicCivil(const KLocale *locale = 0);
-    explicit KCalendarSystemIslamicCivil(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemIslamicCivil(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemIslamicCivil();
 
     virtual QString calendarType() const;
@@ -74,9 +73,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemIslamicCivil(KCalendarSystemIslamicCivilPrivate &dd,
-                         const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                         const KLocale *locale = 0);
+    KCalendarSystemIslamicCivil(KCalendarSystemIslamicCivilPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemIslamicCivil)
diff --git a/kdecore/date/kcalendarsystemjalali.cpp b/kdecore/date/kcalendarsystemjalali.cpp
index 1aaa804..2ddadc2 100644
--- a/kdecore/date/kcalendarsystemjalali.cpp
+++ b/kdecore/date/kcalendarsystemjalali.cpp
@@ -399,12 +399,6 @@ QString KCalendarSystemJalaliPrivate::weekDayName(int weekDay, KLocale::DateTime
 }
 
 
-KCalendarSystemJalali::KCalendarSystemJalali(const KLocale *locale)
-                     : KCalendarSystem(*new KCalendarSystemJalaliPrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemJalali::KCalendarSystemJalali(const KSharedConfig::Ptr config, const KLocale *locale)
                      : KCalendarSystem(*new KCalendarSystemJalaliPrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemjalali_p.h b/kdecore/date/kcalendarsystemjalali_p.h
index 6ae44ea..8a8de09 100644
--- a/kdecore/date/kcalendarsystemjalali_p.h
+++ b/kdecore/date/kcalendarsystemjalali_p.h
@@ -32,8 +32,7 @@ class KCalendarSystemJalaliPrivate;
 class KCalendarSystemJalali : public KCalendarSystem
 {
 public:
-    explicit KCalendarSystemJalali(const KLocale * locale = 0);
-    explicit KCalendarSystemJalali(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemJalali(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemJalali();
 
     virtual QString calendarType() const;
@@ -63,9 +62,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemJalali(KCalendarSystemJalaliPrivate &dd,
-                          const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                          const KLocale *locale = 0);
+    KCalendarSystemJalali(KCalendarSystemJalaliPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemJalali)
diff --git a/kdecore/date/kcalendarsystemjapanese.cpp b/kdecore/date/kcalendarsystemjapanese.cpp
index 4d4e58a..138cab3 100644
--- a/kdecore/date/kcalendarsystemjapanese.cpp
+++ b/kdecore/date/kcalendarsystemjapanese.cpp
@@ -100,12 +100,6 @@ int KCalendarSystemJapanesePrivate::earliestValidYear() const
 }
 
 
-KCalendarSystemJapanese::KCalendarSystemJapanese(const KLocale *locale)
-                       : KCalendarSystemGregorian(*new KCalendarSystemJapanesePrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemJapanese::KCalendarSystemJapanese(const KSharedConfig::Ptr config, const KLocale *locale)
                        : KCalendarSystemGregorian(*new KCalendarSystemJapanesePrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemjapanese_p.h b/kdecore/date/kcalendarsystemjapanese_p.h
index 1781f8e..b60c2bc 100644
--- a/kdecore/date/kcalendarsystemjapanese_p.h
+++ b/kdecore/date/kcalendarsystemjapanese_p.h
@@ -38,8 +38,7 @@ class KCalendarSystemJapanesePrivate;
 class KCalendarSystemJapanese: public KCalendarSystemGregorian
 {
 public:
-    explicit KCalendarSystemJapanese(const KLocale *locale = 0);
-    explicit KCalendarSystemJapanese(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemJapanese(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemJapanese();
 
     virtual QString calendarType() const;
@@ -71,9 +70,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemJapanese(KCalendarSystemJapanesePrivate &dd,
-                            const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                            const KLocale *locale = 0);
+    KCalendarSystemJapanese(KCalendarSystemJapanesePrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemJapanese)
diff --git a/kdecore/date/kcalendarsystemjulian.cpp b/kdecore/date/kcalendarsystemjulian.cpp
index 5cd2180..cf891fd 100644
--- a/kdecore/date/kcalendarsystemjulian.cpp
+++ b/kdecore/date/kcalendarsystemjulian.cpp
@@ -74,7 +74,7 @@ void KCalendarSystemJulianPrivate::loadDefaultEraList()
 {
     QString name, shortName, format;
 
-    KConfigGroup cg(config(), QString::fromLatin1("KCalendarSystem %1").arg(q->calendarType(q->calendarSystem())));
+    KConfigGroup cg(config(), QString::fromLatin1("KCalendarSystem %1").arg(q->calendarType()));
     m_useCommonEra = cg.readEntry("UseCommonEra", false);
 
     if (m_useCommonEra) {
@@ -401,12 +401,6 @@ QString KCalendarSystemJulianPrivate::weekDayName(int weekDay, KLocale::DateTime
 }
 
 
-KCalendarSystemJulian::KCalendarSystemJulian(const KLocale *locale)
-                     : KCalendarSystem(*new KCalendarSystemJulianPrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemJulian::KCalendarSystemJulian(const KSharedConfig::Ptr config, const KLocale *locale)
                      : KCalendarSystem(*new KCalendarSystemJulianPrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemjulian_p.h b/kdecore/date/kcalendarsystemjulian_p.h
index ebcad4a..d6639e9 100644
--- a/kdecore/date/kcalendarsystemjulian_p.h
+++ b/kdecore/date/kcalendarsystemjulian_p.h
@@ -41,8 +41,7 @@ class KCalendarSystemJulianPrivate;
 class KCalendarSystemJulian: public KCalendarSystem
 {
 public:
-    explicit KCalendarSystemJulian(const KLocale *locale = 0);
-    explicit KCalendarSystemJulian(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemJulian(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemJulian();
 
     virtual QString calendarType() const;
@@ -72,9 +71,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemJulian(KCalendarSystemJulianPrivate &dd,
-                          const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                          const KLocale *locale = 0);
+    KCalendarSystemJulian(KCalendarSystemJulianPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemJulian)
diff --git a/kdecore/date/kcalendarsystemminguo.cpp b/kdecore/date/kcalendarsystemminguo.cpp
index 66aea58..97b420d 100644
--- a/kdecore/date/kcalendarsystemminguo.cpp
+++ b/kdecore/date/kcalendarsystemminguo.cpp
@@ -75,12 +75,6 @@ int KCalendarSystemMinguoPrivate::earliestValidYear() const
 }
 
 
-KCalendarSystemMinguo::KCalendarSystemMinguo(const KLocale *locale)
-                     : KCalendarSystemGregorian(*new KCalendarSystemMinguoPrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemMinguo::KCalendarSystemMinguo(const KSharedConfig::Ptr config, const KLocale *locale)
                      : KCalendarSystemGregorian(*new KCalendarSystemMinguoPrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemminguo_p.h b/kdecore/date/kcalendarsystemminguo_p.h
index 6e257af..4931d0f 100644
--- a/kdecore/date/kcalendarsystemminguo_p.h
+++ b/kdecore/date/kcalendarsystemminguo_p.h
@@ -38,8 +38,7 @@ class KCalendarSystemMinguoPrivate;
 class KCalendarSystemMinguo: public KCalendarSystemGregorian
 {
 public:
-    explicit KCalendarSystemMinguo(const KLocale *locale = 0);
-    explicit KCalendarSystemMinguo(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemMinguo(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemMinguo();
 
     virtual QString calendarType() const;
@@ -69,9 +68,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemMinguo(KCalendarSystemMinguoPrivate &dd,
-                          const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                          const KLocale *locale = 0);
+    KCalendarSystemMinguo(KCalendarSystemMinguoPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemMinguo)
diff --git a/kdecore/date/kcalendarsystemprivate_p.h b/kdecore/date/kcalendarsystemprivate_p.h
index 7550934..edb6af8 100644
--- a/kdecore/date/kcalendarsystemprivate_p.h
+++ b/kdecore/date/kcalendarsystemprivate_p.h
@@ -76,7 +76,6 @@ public:
     virtual QString stringFromInteger(int number, int padWidth, QChar padChar, KLocale::DigitSet digitSet) const;
 
     // Utility functions
-    bool setAnyDate(QDate &date, int year, int month, int day) const;
     int addYears(int startYear, int yearsToAdd) const;
     int differenceYearNumbers(int fromYear, int toYear) const;
     QDate invalidDate() const;
diff --git a/kdecore/date/kcalendarsystemqdate.cpp b/kdecore/date/kcalendarsystemqdate.cpp
index 4029433..9f85cb9 100644
--- a/kdecore/date/kcalendarsystemqdate.cpp
+++ b/kdecore/date/kcalendarsystemqdate.cpp
@@ -82,7 +82,7 @@ void KCalendarSystemQDatePrivate::loadDefaultEraList()
     QString name, shortName, format;
 
     KConfigGroup lcg(config(), QString::fromLatin1("Locale"));
-    KConfigGroup cg = lcg.group(QString::fromLatin1("KCalendarSystem %1").arg(q->calendarType(q->calendarSystem())));
+    KConfigGroup cg = lcg.group(QString::fromLatin1("KCalendarSystem %1").arg(q->calendarType()));
     m_useCommonEra = cg.readEntry("UseCommonEra", false);
 
     if (m_useCommonEra) {
@@ -387,12 +387,6 @@ QString KCalendarSystemQDatePrivate::weekDayName(int weekDay, KLocale::DateTimeC
 }
 
 
-KCalendarSystemQDate::KCalendarSystemQDate(const KLocale *locale)
-                    : KCalendarSystem(*new KCalendarSystemQDatePrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemQDate::KCalendarSystemQDate(const KSharedConfig::Ptr config, const KLocale *locale)
                     : KCalendarSystem(*new KCalendarSystemQDatePrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemqdate_p.h b/kdecore/date/kcalendarsystemqdate_p.h
index 5d86bd6..b82acbd 100644
--- a/kdecore/date/kcalendarsystemqdate_p.h
+++ b/kdecore/date/kcalendarsystemqdate_p.h
@@ -41,8 +41,7 @@ class KCalendarSystemQDatePrivate;
 class KCalendarSystemQDate: public KCalendarSystem
 {
 public:
-    explicit KCalendarSystemQDate(const KLocale *locale = 0);
-    explicit KCalendarSystemQDate(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemQDate(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemQDate();
 
     virtual QString calendarType() const;
@@ -82,9 +81,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemQDate(KCalendarSystemQDatePrivate &dd,
-                             const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                             const KLocale *locale = 0);
+    KCalendarSystemQDate(KCalendarSystemQDatePrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemQDate)
diff --git a/kdecore/date/kcalendarsystemthai.cpp b/kdecore/date/kcalendarsystemthai.cpp
index 9a1ca5a..fc050f9 100644
--- a/kdecore/date/kcalendarsystemthai.cpp
+++ b/kdecore/date/kcalendarsystemthai.cpp
@@ -81,12 +81,6 @@ int KCalendarSystemThaiPrivate::earliestValidYear() const
 }
 
 
-KCalendarSystemThai::KCalendarSystemThai(const KLocale *locale)
-                   : KCalendarSystemGregorian(*new KCalendarSystemThaiPrivate(this), KSharedConfig::Ptr(), locale)
-{
-    d_ptr->loadConfig(calendarType());
-}
-
 KCalendarSystemThai::KCalendarSystemThai(const KSharedConfig::Ptr config, const KLocale *locale)
                    : KCalendarSystemGregorian(*new KCalendarSystemThaiPrivate(this), config, locale)
 {
diff --git a/kdecore/date/kcalendarsystemthai_p.h b/kdecore/date/kcalendarsystemthai_p.h
index 9aa02a2..674fabc 100644
--- a/kdecore/date/kcalendarsystemthai_p.h
+++ b/kdecore/date/kcalendarsystemthai_p.h
@@ -38,8 +38,7 @@ class KCalendarSystemThaiPrivate;
 class KCalendarSystemThai: public KCalendarSystemGregorian
 {
 public:
-    explicit KCalendarSystemThai(const KLocale *locale = 0);
-    explicit KCalendarSystemThai(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+    explicit KCalendarSystemThai(const KSharedConfig::Ptr config, const KLocale *locale);
     virtual ~KCalendarSystemThai();
 
     virtual QString calendarType() const;
@@ -63,9 +62,7 @@ public:
 protected:
     virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
     virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
-    KCalendarSystemThai(KCalendarSystemThaiPrivate &dd,
-                        const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
-                        const KLocale *locale = 0);
+    KCalendarSystemThai(KCalendarSystemThaiPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale);
 
 private:
     Q_DECLARE_PRIVATE(KCalendarSystemThai)
-- 
1.7.10.4



More information about the Kde-frameworks-devel mailing list