[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: [Patch] kcalendarsystem consistency
From: Martin Koller <m.koller () surfeu ! at>
Date: 2003-08-17 20:11:07
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
the attached patch adds one non-virtual function to kcalendarsystem:
weeksInYear(), which has now a QDate as Parameter, as all other query-
functions (like monthsInYear(), etc.) in that class have.
Therefore, you can use this class-methods in a more consistent way.
If OK, please commit.
Thanks.
- --
Best regards/Schöne Grüße
Martin
Public key at:
http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0x8DFB0F86
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE/P+FbHmdPoI37D4YRAmwtAKCD82DPE2OCGUabGeNpNfZB0IEvYACgzQrJ
0j3pkOvdywTmtWQkWvTFp1k=
=9QUJ
-----END PGP SIGNATURE-----
["calsys.patch" (text/x-diff)]
Index: kcalendarsystem.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kcalendarsystem.cpp,v
retrieving revision 1.2
diff -u -3 -p -r1.2 kcalendarsystem.cpp
--- kcalendarsystem.cpp 3 Jan 2003 17:34:48 -0000 1.2
+++ kcalendarsystem.cpp 17 Aug 2003 20:06:53 -0000
@@ -50,3 +50,8 @@ const KLocale * KCalendarSystem::locale(
return KGlobal::locale();
}
+
+int KCalendarSystem::weeksInYear(const QDate & date) const
+{
+ return weeksInYear(year(date));
+}
Index: kcalendarsystem.h
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kcalendarsystem.h,v
retrieving revision 1.4
diff -u -3 -p -r1.4 kcalendarsystem.h
--- kcalendarsystem.h 1 Mar 2003 21:35:01 -0000 1.4
+++ kcalendarsystem.h 17 Aug 2003 20:06:54 -0000
@@ -160,9 +160,19 @@ public:
virtual int daysInMonth (const QDate & date) const = 0;
/**
+ * Gets specific calendar type number of weeks in year for a given date.
+ * This is the same as the method below, but has a QDate as parameter as
+ * all other methods here
+ *
+ * @param date Gregorian date equivalent to the specific one
+ * @return number of weeks in year
+ */
+ int weeksInYear(const QDate & date) const;
+
+ /**
* Gets the number of weeks in year
*
- * @param year the year
+ * @param year the year in calendarsystem specific number
* @return number of weeks in year
*/
virtual int weeksInYear(int year) const = 0;
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic