diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp index 3c1bab17af..eb0efc53d8 100644 --- a/src/tools/qdoc/doc.cpp +++ b/src/tools/qdoc/doc.cpp @@ -113,7 +113,6 @@ enum { CMD_ENDSIDEBAR, CMD_ENDTABLE, CMD_ENDTOPICREF, - CMD_EXPIRE, CMD_FOOTNOTE, CMD_GENERATELIST, CMD_GRANULARITY, @@ -231,7 +230,6 @@ static struct { { "endsidebar", CMD_ENDSIDEBAR, 0 }, { "endtable", CMD_ENDTABLE, 0 }, { "endtopicref", CMD_ENDTOPICREF, 0 }, - { "expire", CMD_EXPIRE, 0 }, { "footnote", CMD_FOOTNOTE, 0 }, { "generatelist", CMD_GENERATELIST, 0 }, { "granularity", CMD_GRANULARITY, 0 }, // ### don't document for now @@ -462,7 +460,6 @@ private: Location& location(); QString detailsUnknownCommand(const QSet& metaCommandSet, const QString& str); - void checkExpiry(const QString& date); void insertBaseName(const QString &baseName); void insertTarget(const QString& target, bool keyword); void include(const QString& fileName, const QString& identifier); @@ -859,9 +856,6 @@ void DocParser::parse(const QString& source, append(Atom::TableRight); } break; - case CMD_EXPIRE: - checkExpiry(getArgument()); - break; case CMD_FOOTNOTE: if (openCommand(cmd)) { enterPara(); @@ -1662,43 +1656,6 @@ QString DocParser::detailsUnknownCommand(const QSet &metaCommandSet, return tr("Maybe you meant '\\%1'?").arg(best); } -void DocParser::checkExpiry(const QString& date) -{ - QRegExp ymd("(\\d{4})(?:-(\\d{2})(?:-(\\d{2})))"); - - if (ymd.exactMatch(date)) { - int y = ymd.cap(1).toInt(); - int m = ymd.cap(2).toInt(); - int d = ymd.cap(3).toInt(); - - if (m == 0) - m = 1; - if (d == 0) - d = 1; - QDate expiryDate(y, m, d); - if (expiryDate.isValid()) { - int days = expiryDate.daysTo(QDate::currentDate()); - if (days == 0) { - location().warning(tr("Documentation expires today")); - } - else if (days == 1) { - location().warning(tr("Documentation expired yesterday")); - } - else if (days >= 2) { - location().warning(tr("Documentation expired %1 days ago") - .arg(days)); - } - } - else { - location().warning(tr("Date '%1' invalid").arg(date)); - } - } - else { - location().warning(tr("Date '%1' not in YYYY-MM-DD format") - .arg(date)); - } -} - void DocParser::insertBaseName(const QString &baseName) { priv->constructExtra(); diff --git a/src/tools/qdoc/doc/qdoc-manual.qdoc b/src/tools/qdoc/doc/qdoc-manual.qdoc index fa3301e072..6983f6345f 100644 --- a/src/tools/qdoc/doc/qdoc-manual.qdoc +++ b/src/tools/qdoc/doc/qdoc-manual.qdoc @@ -256,7 +256,6 @@ \li \l {04-qdoc-commands-textmarkup.html#e-command} {\\e} \span {class="newStuff"} {(new 5/3/2012)} \li \l {12-0-qdoc-commands-miscellaneous.html#else-command} {\\else} \li \l {12-0-qdoc-commands-miscellaneous.html#endif-command} {\\endif} - \li \l {12-0-qdoc-commands-miscellaneous.html#expire-command} {\\expire} \li \l {11-qdoc-commands-specialcontent.html#footnote-command} {\\footnote} \li \l {12-0-qdoc-commands-miscellaneous.html#generatelist-command} {\\generatelist} \li \l {10-qdoc-commands-tablesandlists.html#header-command} {\\header} @@ -3506,41 +3505,6 @@ visual appearance of the documentation, and to the process of generating the documentation. - \target expire-command - \section1 \\expire - - The \\expire command allows you to define an expiration - date for your documentation. - - When using the \\expire command, QDoc will emit a warning when the - current date is larger than the specified date. The command - accepts one argument; the argument's format is yyyy-mm-dd. For - example: - - \code - / *! - \page porting.html - - \title Porting to Qt 3.x - - \expire 2004-12-31 - - This document describes porting applications from Qt - 2.x to Qt 3.x. - - The Qt 3.x series is not binary compatible with the - 2.x series. - ... - * / - \endcode - - If you run QDoc on 4 July 2005, it will emit the warning - - \quotation - porting.qdoc:6: Documentation expired 185 days ago - \endquotation - - \target annotatedlist-command \section1 \\annotatedlist @@ -8673,7 +8637,6 @@ \li \l {12-0-qdoc-commands-miscellaneous.html#endif-command} {\\endif} \li \l {13-qdoc-commands-topics.html#enum-command} {\\enum} \li \l {13-qdoc-commands-topics.html#example-command} {\\example} - \li \l {12-0-qdoc-commands-miscellaneous.html#expire-command} {\\expire} \li \l {13-qdoc-commands-topics.html#externalpage-command} {\\externalpage} \li \l {13-qdoc-commands-topics.html#fn-command} {\\fn} \li \l {11-qdoc-commands-specialcontent.html#footnote-command} {\\footnote}