diff options
author | Casper van Donderen <[email protected]> | 2012-05-06 18:18:24 +0200 |
---|---|---|
committer | Qt by Nokia <[email protected]> | 2012-05-08 06:59:23 +0200 |
commit | 427fe6c2fdd33d86a254af937cf12df2a7ad28ec (patch) | |
tree | da9b882badb3ecfd306a986cc76ada332eb9f4a5 /src/tools/qdoc/doc.cpp | |
parent | 27ca259fb64681d8539c70ddba9d62bbf8fb34f2 (diff) |
QDoc: Remove the unused \expire command.
Change-Id: I17108dee0a619cbff7627c86cddb8391857e169c
Reviewed-by: Martin Smith <[email protected]>
Diffstat (limited to 'src/tools/qdoc/doc.cpp')
-rw-r--r-- | src/tools/qdoc/doc.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp index 3c1bab17af9..eb0efc53d83 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<QString>& 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<QString> &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(); |