/**
* Gets specific calendar type month name for a given month number
- * If an invalid month is specified, QString::null is returned.
+ * If an invalid month is specified, QString() is returned.
*
* @param month The month number
* @param year The year the month belongs to
* Returns a string containing the possessive form of the month name.
* ("of January", "of February", etc.)
* It's needed in long format dates in some languages.
- * If an invalid month is specified, QString::null is returned.
+ * If an invalid month is specified, QString() is returned.
*
* @param month The month number
* @param year The year the month belongs to
/**
* Gets specific calendar type week day name
- * If an invalid week day is specified, QString::null is returned.
+ * If an invalid week day is specified, QString() is returned.
*
* @param weekDay number of day in week (1 -> Monday)
* @param shortName short or complete day name
return locale()->translate("December");
}
- return QString::null;
+ return QString();
}
QString ExtCalendarSystemGregorian::monthNamePossessive(int month, int year,
return locale()->translate("of December");
}
- return QString::null;
+ return QString();
}
bool ExtCalendarSystemGregorian::setYMD(ExtDate & date, int y, int m, int d) const
{
QString a_format;
- if ( ! isValid() ) return QString::null;
+ if ( ! isValid() ) return QString();
switch (f)
{
QString ExtDate::toString( const QString& format ) const
{
- if ( ! isValid() ) return QString::null;
+ if ( ! isValid() ) return QString();
//We use the KDE Date format specs.
//Replace occurences of the following tokens with their
QString ExtDateTime::toString( Qt::DateFormat f ) const
{
if ( !isValid() )
- return QString::null;
+ return QString();
if ( f == Qt::ISODate ) {
return d.toString( Qt::ISODate ) + "T" + t.toString( Qt::ISODate );
+ " " + KGlobal::locale()->timeFormat() );
}
- return QString::null;
+ return QString();
}
#endif
QString ExtDateTime::toString( const QString& format ) const
{
if ( !isValid() )
- return QString::null;
+ return QString();
//Parse the date portion of the format string
QString result = date().toString( format );