Qt 4.8
Classes | Public Types | Public Functions | Static Public Functions | Protected Functions | Static Protected Functions | Protected Variables | Private Types | Static Private Functions | List of all members
QPatternist::AbstractDateTime Class Reference

Base class for classes implementing values related to time, date or both. More...

#include <qabstractdatetime_p.h>

Inheritance diagram for QPatternist::AbstractDateTime:
QPatternist::AtomicValue QSharedData QPatternist::CppCastingHelper< AtomicValue > QPatternist::Date QPatternist::DateTime QPatternist::GDay QPatternist::GMonth QPatternist::GMonthDay QPatternist::GYear QPatternist::GYearMonth QPatternist::SchemaTime

Classes

class  CaptureTable
 Acts as a mapping table for AbstractDateTime::create() and describes where certain fields in a QRegExp pattern can be found for a particular W3C XML Schema date/time type. More...
 

Public Types

enum  { DefaultYear = 2000, DefaultMonth = 1, DefaultDay = 1 }
 
typedef QExplicitlySharedDataPointer< AbstractDateTimePtr
 
- Public Types inherited from QPatternist::AtomicValue
typedef QList< AtomicValue::PtrList
 
typedef QExplicitlySharedDataPointer< AtomicValuePtr
 

Public Functions

 AbstractDateTime (const QDateTime &dateTime)
 
QString dateToString () const
 
virtual Item fromValue (const QDateTime &dt) const
 
QString timeToString () const
 
const QDateTimetoDateTime () const
 
- Public Functions inherited from QPatternist::AtomicValue
virtual bool evaluateEBV (const QExplicitlySharedDataPointer< DynamicContext > &context) const
 
virtual bool hasError () const
 
virtual QString stringValue () const =0
 
virtual ItemType::Ptr type () const =0
 
virtual ~AtomicValue ()
 
- Public Functions inherited from QSharedData
 QSharedData ()
 Constructs a QSharedData object with a reference count of 0. More...
 
 QSharedData (const QSharedData &)
 Constructs a QSharedData object with reference count 0. More...
 
- Public Functions inherited from QPatternist::CppCastingHelper< AtomicValue >
const TCastTarget * as () const
 
TCastTarget * as ()
 

Static Public Functions

static bool isRangeValid (const QDate &date, QString &message)
 
static QString serializeMSeconds (const MSecondProperty msecs)
 
- Static Public Functions inherited from QPatternist::AtomicValue
static ItemType::Ptr qtToXDMType (const QXmlItem &item)
 
static QVariant toQt (const AtomicValue *const value)
 
static QVariant toQt (const AtomicValue::Ptr &value)
 
static Item toXDM (const QVariant &value)
 

Protected Functions

QString zoneOffsetToString () const
 
- Protected Functions inherited from QPatternist::AtomicValue
 AtomicValue ()
 
- Protected Functions inherited from QPatternist::CppCastingHelper< AtomicValue >
 CppCastingHelper ()
 

Static Protected Functions

static void copyTimeSpec (const QDateTime &from, QDateTime &to)
 Makes the QDateTime::timeSpec() and QDateTime::zoneOffset() of ot * consistent to from. More...
 
static QDateTime create (AtomicValue::Ptr &errorMessage, const QString &lexicalSource, const CaptureTable &captTable)
 

Protected Variables

const QDateTime m_dateTime
 

Private Types

enum  ZoneOffsetParseResult { Error, Offset, LocalTime, UTC }
 

Static Private Functions

static ZOTotal parseZoneOffset (ZoneOffsetParseResult &result, const QStringList &capts, const CaptureTable &captTable)
 Parses the zone offset. All types use zone offsets. More...
 
static void setUtcOffset (QDateTime &result, const ZoneOffsetParseResult zoResult, const int zoOffset)
 

Additional Inherited Members

- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Base class for classes implementing values related to time, date or both.

See also
XML Schema Part 2: Datatypes Second Edition, 3.2.7 dateTime
XQuery 1.0 and XPath 2.0 Data Model (XDM), 3.3.2 Dates and Times
A summary of the international standard date and time notation, Markus Kuhn
ISO 8601, From Wikipedia, the free encyclopedia
Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 80 of file qabstractdatetime_p.h.

Typedefs

◆ Ptr

Definition at line 83 of file qabstractdatetime_p.h.

Enumerations

◆ anonymous enum

anonymous enum
Enumerator
DefaultYear 
DefaultMonth 
DefaultDay 

Definition at line 87 of file qabstractdatetime_p.h.

◆ ZoneOffsetParseResult

Enumerator
Error 

syntax or logical error was encountered.

Offset 

It's a valid offset from UTC.

LocalTime 

No zone offset was specified, it's an implementation defined zone offset.

UTC 

Definition at line 221 of file qabstractdatetime_p.h.

Constructors and Destructors

◆ AbstractDateTime()

AbstractDateTime::AbstractDateTime ( const QDateTime dateTime)

Definition at line 55 of file qabstractdatetime.cpp.

55  : m_dateTime(dateTime)
56 {
57  Q_ASSERT(dateTime.isValid());
58 }
bool isValid() const
Returns true if both the date and the time are valid; otherwise returns false.
Definition: qdatetime.cpp:2346
#define Q_ASSERT(cond)
Definition: qglobal.h:1823

Functions

◆ copyTimeSpec()

void AbstractDateTime::copyTimeSpec ( const QDateTime from,
QDateTime to 
)
staticprotected

Makes the QDateTime::timeSpec() and QDateTime::zoneOffset() of ot * consistent to from.

Definition at line 373 of file qabstractdatetime.cpp.

Referenced by QPatternist::Date::fromDateTime(), QPatternist::GDay::fromDateTime(), QPatternist::GYearMonth::fromDateTime(), QPatternist::GYear::fromDateTime(), QPatternist::GMonthDay::fromDateTime(), QPatternist::GMonth::fromDateTime(), and QPatternist::SchemaTime::fromDateTime().

375 {
376  switch(from.timeSpec())
377  {
378  case Qt::UTC:
379  /* Fallthrough. */
380  case Qt::LocalTime:
381  {
382  to.setTimeSpec(from.timeSpec());
383  return;
384  }
385  case Qt::OffsetFromUTC:
386  {
387  to.setUtcOffset(from.utcOffset());
389  return;
390  }
391  }
392 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
int utcOffset() const
Definition: qdatetime.cpp:3449
void setTimeSpec(Qt::TimeSpec spec)
Sets the time specification used in this datetime to spec.
Definition: qdatetime.cpp:2431
Qt::TimeSpec timeSpec() const
Returns the time specification of the datetime.
Definition: qdatetime.cpp:2379
void setUtcOffset(int seconds)
Definition: qdatetime.cpp:3416

◆ create()

QDateTime AbstractDateTime::create ( AtomicValue::Ptr errorMessage,
const QString lexicalSource,
const CaptureTable captTable 
)
staticprotected

Definition at line 64 of file qabstractdatetime.cpp.

Referenced by QPatternist::Date::fromLexical(), QPatternist::GDay::fromLexical(), QPatternist::GMonthDay::fromLexical(), QPatternist::GYearMonth::fromLexical(), QPatternist::GYear::fromLexical(), QPatternist::GMonth::fromLexical(), QPatternist::SchemaTime::fromLexical(), and QPatternist::DateTime::fromLexical().

67 {
68  QRegExp myExp(captTable.regExp);
69 
70  if(!myExp.exactMatch(lexicalSource))
71  {
72  badData(QString());
73  }
74 
75  const QStringList capts(myExp.capturedTexts());
76  const QString yearStr(getCapt(year));
77 
78  if(yearStr.size() > 4 && yearStr.at(0) == QLatin1Char('0'))
79  {
80  badData(QtXmlPatterns::tr("Year %1 is invalid because it begins with %2.")
81  .arg(formatData(yearStr)).arg(formatData("0")));
82  }
83 
84  /* If the strings are empty, load default values which are
85  * guranteed to pass the validness tests. */
86  const QString monthStr(getCapt(month));
87  const QString dayStr(getCapt(day));
88  YearProperty year = yearStr.isEmpty() ? DefaultYear : yearStr.toInt();
89  if(getCapt(yearSign) == QChar::fromLatin1('-'))
90  year = -year;
91  const MonthProperty month = monthStr.isEmpty() ? DefaultMonth : monthStr.toInt();
92  const MonthProperty day = dayStr.isEmpty() ? DefaultDay : dayStr.toInt();
93 
94  if(!QDate::isValid(year, month, day))
95  {
96  /* Try to give an intelligent message. */
97  if(day > 31 || day < 1)
98  {
99  badData(QtXmlPatterns::tr("Day %1 is outside the range %2..%3.")
100  .arg(formatData(QString::number(day)))
101  .arg(formatData("01"))
102  .arg(formatData("31")));
103  }
104  else if(month > 12 || month < -12 || month == 0)
105  {
106  badData(QtXmlPatterns::tr("Month %1 is outside the range %2..%3.")
107  .arg(month)
108  .arg(formatData("01"))
109  .arg(formatData("12")));
110 
111  }
112  else if(QDate::isValid(DefaultYear, month, day))
113  {
114  /* We can't use the badData() macro here because we need a different
115  * error code: FODT0001 instead of FORG0001. */
116  errorMessage = ValidationError::createError(QtXmlPatterns::tr(
117  "Overflow: Can't represent date %1.")
118  .arg(formatData(QLatin1String("%1-%2-%3"))
119  .arg(year).arg(month).arg(day)),
121  return QDateTime();
122  }
123  else
124  {
125  badData(QtXmlPatterns::tr("Day %1 is invalid for month %2.")
126  .arg(formatData(QString::number(day)))
127  .arg(formatData(QString::number(month))));
128  }
129  }
130 
131  /* Parse the zone offset. */
132  ZoneOffsetParseResult zoResult;
133  const ZOTotal offset = parseZoneOffset(zoResult, capts, captTable);
134 
135  if(zoResult == Error)
136  {
137  errorMessage = ValidationError::createError();
138  /* We encountered an error, so stop processing. */
139  return QDateTime();
140  }
141 
142  QDate date(year, month, day);
143 
144  /* Only deal with time if time is needed. */
145  if(captTable.hour == -1)
146  {
147  QDateTime result(date);
148  setUtcOffset(result, zoResult, offset);
149  return result;
150  }
151  else
152  {
153  /* Now, it's time for the time-part.
154  *
155  * If the strings are empty, toInt() will return 0, which
156  * in all cases is valid properties. */
157  const QString hourStr(getCapt(hour));
158  const QString minutesStr(getCapt(minutes));
159  const QString secondsStr(getCapt(seconds));
160  HourProperty hour = hourStr.toInt();
161  const MinuteProperty mins = minutesStr.toInt();
162  const SecondProperty secs = secondsStr.toInt();
163 
164  QString msecondsStr(getSafeCapt(mseconds));
165  if(!msecondsStr.isEmpty())
166  msecondsStr = msecondsStr.leftJustified(3, QLatin1Char('0'), true);
167  const MSecondProperty msecs = msecondsStr.toInt();
168 
169  if(hour == 24)
170  {
171  /* 24:00:00.00 is an invalid time for QTime, so handle it here. */
172  if(mins != 0 || secs != 0 || msecs != 0)
173  {
174  badData(QtXmlPatterns::tr("Time 24:%1:%2.%3 is invalid. "
175  "Hour is 24, but minutes, seconds, "
176  "and milliseconds are not all 0; ")
177  .arg(mins).arg(secs).arg(msecs));
178  }
179  else
180  {
181  hour = 0;
182  date = date.addDays(1);
183  }
184  }
185  else if(!QTime::isValid(hour, mins, secs, msecs))
186  {
187  badData(QtXmlPatterns::tr("Time %1:%2:%3.%4 is invalid.")
188  .arg(hour).arg(mins).arg(secs).arg(msecs));
189  }
190 
191  const QTime time(hour, mins, secs, msecs);
192  Q_ASSERT(time.isValid());
193 
194  QDateTime result(date, time);
195  setUtcOffset(result, zoResult, offset);
196  return result;
197  }
198 }
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qstring.cpp:6448
#define getCapt(sym)
The QRegExp class provides pattern matching using regular expressions.
Definition: qregexp.h:61
bool isValid() const
Returns true if this date is valid; otherwise returns false.
Definition: qdatetime.cpp:340
static AtomicValue::Ptr createError(const QString &description=QString(), const ReportContext::ErrorCode=ReportContext::FORG0001)
#define badData(msg)
qint8 MinuteProperty
qint32 SecondProperty
The QDate class provides date functions.
Definition: qdatetime.h:55
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static void setUtcOffset(QDateTime &result, const ZoneOffsetParseResult zoResult, const int zoOffset)
qint8 MonthProperty
The QTime class provides clock time functions.
Definition: qdatetime.h:148
#define getSafeCapt(sym)
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
static QChar fromLatin1(char c)
Converts the Latin-1 character c to its equivalent QChar.
Definition: qchar.h:378
static QString formatData(const QString &data)
static ZOTotal parseZoneOffset(ZoneOffsetParseResult &result, const QStringList &capts, const CaptureTable &captTable)
Parses the zone offset. All types use zone offsets.
qint8 HourProperty
qint32 YearProperty
The QDateTime class provides date and time functions.
Definition: qdatetime.h:216
qint16 MSecondProperty
qint32 ZOTotal
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
bool isValid() const
Returns true if the time is valid; otherwise returns false.
Definition: qdatetime.cpp:1566

◆ dateToString()

QString AbstractDateTime::dateToString ( ) const
Returns
m_dateTime's date part converted to string. This is for example "2004-05-12" or "-2004-05-12".

Definition at line 307 of file qabstractdatetime.cpp.

Referenced by QPatternist::Date::stringValue(), and QPatternist::DateTime::stringValue().

308 {
309  return m_dateTime.toString(QLatin1String("yyyy-MM-dd"));
310 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QString toString(Qt::DateFormat f=Qt::TextDate) const
Returns the datetime as a string in the format given.
Definition: qdatetime.cpp:2628

◆ fromValue()

Item AbstractDateTime::fromValue ( const QDateTime dt) const
virtual

A factory function for creating instances that are of the dynamic type of this class, that represents dt.

The default implementation performs an assert() call. This function is not pure virtual because all sub-classes do not use it.

Reimplemented in QPatternist::DateTime, QPatternist::SchemaTime, and QPatternist::Date.

Definition at line 394 of file qabstractdatetime.cpp.

395 {
396  Q_ASSERT_X(false, Q_FUNC_INFO,
397  "Calling AbstractDateTime::fromDateTime() makes no sense.");
398  return Item();
399 }
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
Represents an item in the XPath 2.0 Data Model.
Definition: qitem_p.h:182
#define Q_FUNC_INFO
Definition: qglobal.h:1871

◆ isRangeValid()

bool AbstractDateTime::isRangeValid ( const QDate date,
QString message 
)
static

Determines whether dt is a date-time that can be represented, and isn't too early or too late. If it is valid, true is returned. Otherwise, false is returned and message is set to contain a translated message for human consumption, describing the error.

Definition at line 295 of file qabstractdatetime.cpp.

Referenced by QPatternist::DateTimeDurationMathematician::calculate().

297 {
298  if(date.isValid())
299  return true;
300  else
301  {
302  message = QtXmlPatterns::tr("Overflow: Date can't be represented.");
303  return false;
304  }
305 }
bool isValid() const
Returns true if this date is valid; otherwise returns false.
Definition: qdatetime.cpp:340

◆ parseZoneOffset()

ZOTotal AbstractDateTime::parseZoneOffset ( ZoneOffsetParseResult result,
const QStringList capts,
const CaptureTable captTable 
)
staticprivate

Parses the zone offset. All types use zone offsets.

If result is set to Offset, the offset is returned, otherwise the return value is undefined.

The offset is in seconds.

Definition at line 200 of file qabstractdatetime.cpp.

Referenced by create().

203 {
204  const QString zoneOffsetSignStr(getCapt(zoneOffsetSign));
205 
206  if(zoneOffsetSignStr.isEmpty())
207  {
208  const QString zoneOffsetUTCStr(getCapt(zoneOffsetUTCSymbol));
209  Q_ASSERT(zoneOffsetUTCStr.isEmpty() || zoneOffsetUTCStr == QLatin1String("Z"));
210 
211  if(zoneOffsetUTCStr.isEmpty())
212  result = LocalTime;
213  else
214  result = UTC;
215 
216  return 0;
217  }
218 
219  Q_ASSERT(zoneOffsetSignStr == QLatin1String("-") || zoneOffsetSignStr == QLatin1String("+"));
220 
221  const QString zoneOffsetHourStr(getCapt(zoneOffsetHour));
222  Q_ASSERT(!zoneOffsetHourStr.isEmpty());
223  const ZOHourProperty zoHour = zoneOffsetHourStr.toInt();
224 
225  if(zoHour > 14 || zoHour < -14)
226  {
227  result = Error;
228  return 0;
229  /*
230  badZOData(QtXmlPatterns::tr("%1 it is not a valid hour property in a zone offset. "
231  "It must be less than or equal to 14.").arg(zoHour));
232  */
233  }
234 
235  const QString zoneOffsetMinuteStr(getCapt(zoneOffsetMinute));
236  Q_ASSERT(!zoneOffsetMinuteStr.isEmpty());
237  const ZOHourProperty zoMins = zoneOffsetMinuteStr.toInt();
238 
239  if(zoHour == 14 && zoMins != 0)
240  {
241  /*
242  badZOData(QtXmlPatterns::tr("When the hour property in a zone offset is 14, the minute property "
243  "must be 0, not %1.").arg(zoMins));
244  */
245  result = Error;
246  return 0;
247  }
248  else if(zoMins > 59 || zoMins < -59)
249  {
250  /*
251  badZOData(QtXmlPatterns::tr("The minute property in a zone offset cannot be larger than 59. "
252  "%1 is therefore invalid.").arg(zoMins));
253  */
254  result = Error;
255  return 0;
256  }
257 
258  if(zoHour == 0 && zoMins == 0) /* "-00:00" and "+00:00" is equal to 'Z'. */
259  {
260  result = UTC;
261  return 0;
262  }
263  else
264  {
265  ZOTotal zoneOffset = (zoHour * 60 + zoMins) * 60;
266 
267  if(zoneOffsetSignStr == QChar::fromLatin1('-'))
268  zoneOffset = -zoneOffset;
269 
270  result = Offset;
271  return zoneOffset;
272  }
273 }
#define getCapt(sym)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
qint8 ZOHourProperty
static QChar fromLatin1(char c)
Converts the Latin-1 character c to its equivalent QChar.
Definition: qchar.h:378
qint32 ZOTotal

◆ serializeMSeconds()

QString AbstractDateTime::serializeMSeconds ( const MSecondProperty  msecs)
static

Serializes the milli seconds msecs into a string representation. For example, if msecs is 1, ".001" is returned; if msecs is 100 then is ".1" returned.

Definition at line 312 of file qabstractdatetime.cpp.

Referenced by timeToString().

313 {
314  QString retval;
315  retval.append(QLatin1Char('.'));
316  int div = 100;
317  MSecondProperty msecs = mseconds;
318 
319  while(msecs > 0)
320  {
321  int d = msecs / div;
322  retval.append(QLatin1Char(d + '0'));
323  msecs = msecs % div;
324  div = div / 10;
325  }
326 
327  return retval;
328 }
double d
Definition: qnumeric_p.h:62
The QString class provides a Unicode character string.
Definition: qstring.h:83
QString & append(QChar c)
Definition: qstring.cpp:1777
qint16 MSecondProperty
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55

◆ setUtcOffset()

void AbstractDateTime::setUtcOffset ( QDateTime result,
const ZoneOffsetParseResult  zoResult,
const int  zoOffset 
)
inlinestaticprivate

Definition at line 276 of file qabstractdatetime.cpp.

Referenced by create().

279 {
280  if(zoResult == UTC)
281  result.setTimeSpec(Qt::UTC);
282  else if(zoResult == LocalTime)
283  result.setTimeSpec(Qt::LocalTime);
284  else
285  {
286  Q_ASSERT(zoResult == Offset);
287  result.setUtcOffset(zoOffset);
288  }
289 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void setTimeSpec(Qt::TimeSpec spec)
Sets the time specification used in this datetime to spec.
Definition: qdatetime.cpp:2431
quint16 Offset
void setUtcOffset(int seconds)
Definition: qdatetime.cpp:3416

◆ timeToString()

QString AbstractDateTime::timeToString ( ) const
Returns
m_dateTime's time part converted to string. This is for example "12" or "01.023".

Definition at line 330 of file qabstractdatetime.cpp.

Referenced by QPatternist::SchemaTime::stringValue(), and QPatternist::DateTime::stringValue().

331 {
333  const MSecondProperty msecs = m_dateTime.time().msec();
334 
335  if(msecs)
336  base.append(serializeMSeconds(msecs));
337 
338  return base;
339 }
int msec() const
Returns the millisecond part (0 to 999) of the time.
Definition: qdatetime.cpp:1611
The QString class provides a Unicode character string.
Definition: qstring.h:83
static const uint base
Definition: qurl.cpp:268
QString toString(Qt::DateFormat f=Qt::TextDate) const
Returns the datetime as a string in the format given.
Definition: qdatetime.cpp:2628
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
QTime time() const
Returns the time part of the datetime.
Definition: qdatetime.cpp:2368
qint16 MSecondProperty
static QString serializeMSeconds(const MSecondProperty msecs)

◆ toDateTime()

const QDateTime& QPatternist::AbstractDateTime::toDateTime ( ) const
inline

◆ zoneOffsetToString()

QString AbstractDateTime::zoneOffsetToString ( ) const
protected
Returns
m_dateTime' zone offset converted to string, as per the the W3C XML Schema types. This is for example "Z" or "+12.00"(depending on m_dateTime).

Definition at line 341 of file qabstractdatetime.cpp.

Referenced by QPatternist::Date::stringValue(), QPatternist::GDay::stringValue(), QPatternist::GYear::stringValue(), QPatternist::GYearMonth::stringValue(), QPatternist::GMonth::stringValue(), QPatternist::GMonthDay::stringValue(), QPatternist::SchemaTime::stringValue(), and QPatternist::DateTime::stringValue().

342 {
343  switch(m_dateTime.timeSpec())
344  {
345  case Qt::LocalTime:
346  return QString();
347  case Qt::UTC:
348  return QLatin1String("Z");
349  default:
350  {
352 
353  const int zoneOffset = m_dateTime.utcOffset();
354  Q_ASSERT(zoneOffset != 0);
355  const int posZoneOffset = qAbs(zoneOffset);
356 
357  /* zoneOffset is in seconds. */
358  const int hours = posZoneOffset/(60 * 60);
359  const int minutes = (posZoneOffset % (60 * 60)) / 60;
360 
361  QString result;
362  result.reserve(6);
363 
364  result.append(zoneOffset < 0 ? QLatin1Char('-') : QLatin1Char('+'));
365  result.append(QString::number(hours).rightJustified(2, QLatin1Char('0')));
366  result.append(QLatin1Char(':'));
367  result.append(QString::number(minutes).rightJustified(2, QLatin1Char('0')));
368  return result;
369  }
370  }
371 }
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qstring.cpp:6448
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83
Q_DECL_CONSTEXPR T qAbs(const T &t)
Definition: qglobal.h:1201
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
int utcOffset() const
Definition: qdatetime.cpp:3449
void reserve(int size)
Attempts to allocate memory for at least size characters.
Definition: qstring.h:881
QString & append(QChar c)
Definition: qstring.cpp:1777
Qt::TimeSpec timeSpec() const
Returns the time specification of the datetime.
Definition: qdatetime.cpp:2379
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55

Properties

◆ m_dateTime

const QDateTime QPatternist::AbstractDateTime::m_dateTime
protected

The documentation for this class was generated from the following files: