[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:51:05 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit f1943b2daa43852c8a566da75f5bcfc1762bc897
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 24 03:56:14 2001 +0000
Forgot to submit qdatetime.h for first KWQDateTime submission
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/KWQDateTime.h b/WebCore/kwq/KWQDateTime.h
index 3570888..819e192 100644
--- a/WebCore/kwq/KWQDateTime.h
+++ b/WebCore/kwq/KWQDateTime.h
@@ -36,6 +36,8 @@
#include <_qdatetime.h>
#else
+#include <iostream>
+
// class QTime =================================================================
class QTime {
@@ -58,20 +60,31 @@ public:
// member functions --------------------------------------------------------
bool isNull() const;
- void start();
+ int hour() const;
+ int minute() const;
+ int second() const;
int msec() const;
- int elapsed() const;
+ void start();
+ int elapsed();
int restart();
-
+ int secsTo( const QTime & ) const;
+
// operators ---------------------------------------------------------------
- QTime &operator=(const QTime &);
+ //QTime &operator=(const QTime &);
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
-
+
+ uint getCurrentTime();
+ void setCurrentTime();
+ uint timeMS; // time is stored in milliseconds
+
+ friend class QDateTime;
+ friend ostream &operator<<( ostream &, const QTime & );
+
// add copy constructor
// this private declaration prevents copying
#ifdef _KWQ_PEDANTIC_
@@ -92,24 +105,43 @@ public:
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
+ QDate();
+ QDate(int, int, int);
- QDate(int y, int m, int d);
-
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QDate() {}
#endif
// member functions --------------------------------------------------------
+
+ int year() const;
+ int month() const;
+ int day() const;
+
+ int daysTo( const QDate & ) const;
+
// operators ---------------------------------------------------------------
- QDate &operator=(const QDate &);
-
+ //QDate &operator=(const QDate &);
+
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+protected:
+ uint greg2jul( int, int, int ) const;
+ void jul2greg( uint jd, int &y, int &m, int &d ) const;
+
private:
+ int dateDays; //date is stored in days
+
+ void setCurrentDate();
+
+ friend class QDateTime;
+ friend ostream &operator<<( ostream &, const QDate & );
+
// add copy constructor
// this private declaration prevents copying
#ifdef _KWQ_PEDANTIC_
@@ -133,9 +165,9 @@ public:
// constructors, copy constructors, and destructors ------------------------
QDateTime();
- QDateTime(QDate date, QTime time);
QDateTime(const QDateTime &);
-
+ QDateTime(const QDate &, const QTime &);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QDateTime() {}
@@ -145,7 +177,8 @@ public:
int secsTo(const QDateTime &) const;
QTime time() const;
-
+ void setTime_t( uint );
+
// operators ---------------------------------------------------------------
// this is not declared in the code, although assignment of this type
@@ -156,7 +189,12 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+private:
+ QTime timeDT;
+ QDate dateDT;
+
+ friend ostream &operator<<( ostream &, const QDateTime & );
}; // class QDateTime ==========================================================
#endif // USING_BORROWED_QDATETIME
diff --git a/WebCore/kwq/qt/qdatetime.h b/WebCore/kwq/qt/qdatetime.h
index 3570888..819e192 100644
--- a/WebCore/kwq/qt/qdatetime.h
+++ b/WebCore/kwq/qt/qdatetime.h
@@ -36,6 +36,8 @@
#include <_qdatetime.h>
#else
+#include <iostream>
+
// class QTime =================================================================
class QTime {
@@ -58,20 +60,31 @@ public:
// member functions --------------------------------------------------------
bool isNull() const;
- void start();
+ int hour() const;
+ int minute() const;
+ int second() const;
int msec() const;
- int elapsed() const;
+ void start();
+ int elapsed();
int restart();
-
+ int secsTo( const QTime & ) const;
+
// operators ---------------------------------------------------------------
- QTime &operator=(const QTime &);
+ //QTime &operator=(const QTime &);
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
-
+
+ uint getCurrentTime();
+ void setCurrentTime();
+ uint timeMS; // time is stored in milliseconds
+
+ friend class QDateTime;
+ friend ostream &operator<<( ostream &, const QTime & );
+
// add copy constructor
// this private declaration prevents copying
#ifdef _KWQ_PEDANTIC_
@@ -92,24 +105,43 @@ public:
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
+ QDate();
+ QDate(int, int, int);
- QDate(int y, int m, int d);
-
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QDate() {}
#endif
// member functions --------------------------------------------------------
+
+ int year() const;
+ int month() const;
+ int day() const;
+
+ int daysTo( const QDate & ) const;
+
// operators ---------------------------------------------------------------
- QDate &operator=(const QDate &);
-
+ //QDate &operator=(const QDate &);
+
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+protected:
+ uint greg2jul( int, int, int ) const;
+ void jul2greg( uint jd, int &y, int &m, int &d ) const;
+
private:
+ int dateDays; //date is stored in days
+
+ void setCurrentDate();
+
+ friend class QDateTime;
+ friend ostream &operator<<( ostream &, const QDate & );
+
// add copy constructor
// this private declaration prevents copying
#ifdef _KWQ_PEDANTIC_
@@ -133,9 +165,9 @@ public:
// constructors, copy constructors, and destructors ------------------------
QDateTime();
- QDateTime(QDate date, QTime time);
QDateTime(const QDateTime &);
-
+ QDateTime(const QDate &, const QTime &);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QDateTime() {}
@@ -145,7 +177,8 @@ public:
int secsTo(const QDateTime &) const;
QTime time() const;
-
+ void setTime_t( uint );
+
// operators ---------------------------------------------------------------
// this is not declared in the code, although assignment of this type
@@ -156,7 +189,12 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+private:
+ QTime timeDT;
+ QDate dateDT;
+
+ friend ostream &operator<<( ostream &, const QDateTime & );
}; // class QDateTime ==========================================================
#endif // USING_BORROWED_QDATETIME
diff --git a/WebCore/src/kwq/qt/qdatetime.h b/WebCore/src/kwq/qt/qdatetime.h
index 3570888..819e192 100644
--- a/WebCore/src/kwq/qt/qdatetime.h
+++ b/WebCore/src/kwq/qt/qdatetime.h
@@ -36,6 +36,8 @@
#include <_qdatetime.h>
#else
+#include <iostream>
+
// class QTime =================================================================
class QTime {
@@ -58,20 +60,31 @@ public:
// member functions --------------------------------------------------------
bool isNull() const;
- void start();
+ int hour() const;
+ int minute() const;
+ int second() const;
int msec() const;
- int elapsed() const;
+ void start();
+ int elapsed();
int restart();
-
+ int secsTo( const QTime & ) const;
+
// operators ---------------------------------------------------------------
- QTime &operator=(const QTime &);
+ //QTime &operator=(const QTime &);
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
-
+
+ uint getCurrentTime();
+ void setCurrentTime();
+ uint timeMS; // time is stored in milliseconds
+
+ friend class QDateTime;
+ friend ostream &operator<<( ostream &, const QTime & );
+
// add copy constructor
// this private declaration prevents copying
#ifdef _KWQ_PEDANTIC_
@@ -92,24 +105,43 @@ public:
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
+ QDate();
+ QDate(int, int, int);
- QDate(int y, int m, int d);
-
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QDate() {}
#endif
// member functions --------------------------------------------------------
+
+ int year() const;
+ int month() const;
+ int day() const;
+
+ int daysTo( const QDate & ) const;
+
// operators ---------------------------------------------------------------
- QDate &operator=(const QDate &);
-
+ //QDate &operator=(const QDate &);
+
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+protected:
+ uint greg2jul( int, int, int ) const;
+ void jul2greg( uint jd, int &y, int &m, int &d ) const;
+
private:
+ int dateDays; //date is stored in days
+
+ void setCurrentDate();
+
+ friend class QDateTime;
+ friend ostream &operator<<( ostream &, const QDate & );
+
// add copy constructor
// this private declaration prevents copying
#ifdef _KWQ_PEDANTIC_
@@ -133,9 +165,9 @@ public:
// constructors, copy constructors, and destructors ------------------------
QDateTime();
- QDateTime(QDate date, QTime time);
QDateTime(const QDateTime &);
-
+ QDateTime(const QDate &, const QTime &);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QDateTime() {}
@@ -145,7 +177,8 @@ public:
int secsTo(const QDateTime &) const;
QTime time() const;
-
+ void setTime_t( uint );
+
// operators ---------------------------------------------------------------
// this is not declared in the code, although assignment of this type
@@ -156,7 +189,12 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+private:
+ QTime timeDT;
+ QDate dateDT;
+
+ friend ostream &operator<<( ostream &, const QDateTime & );
}; // class QDateTime ==========================================================
#endif // USING_BORROWED_QDATETIME
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list