summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-02-05 19:37:19 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-02-05 19:37:19 (GMT)
commitf4c0ef8d600844973fed21be5be522bf4dc4c319 (patch)
treeb690e5fc6e2cda6153200258a2ba2ffc1074e891 /src
parent4dcf39fb5b61d633ac3982011ace355ec1b27abc (diff)
downloadDoxygen-f4c0ef8d600844973fed21be5be522bf4dc4c319.zip
Doxygen-f4c0ef8d600844973fed21be5be522bf4dc4c319.tar.gz
Doxygen-f4c0ef8d600844973fed21be5be522bf4dc4c319.tar.bz2
Refactoring: qtools cleanup + remove QDateTime use from rtfgen.cpp
Diffstat (limited to 'src')
-rw-r--r--src/doxygen.h2
-rw-r--r--src/index.cpp1
-rw-r--r--src/rtfgen.cpp12
3 files changed, 9 insertions, 6 deletions
diff --git a/src/doxygen.h b/src/doxygen.h
index 5c8ad1b..227efcc 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -16,8 +16,6 @@
#ifndef DOXYGEN_H
#define DOXYGEN_H
-#include <qdatetime.h>
-
#include "containers.h"
#include "ftextstream.h"
#include "membergroup.h"
diff --git a/src/index.cpp b/src/index.cpp
index 4791ed5..cddd18f 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -25,7 +25,6 @@
#include <assert.h>
#include <qtextstream.h>
-#include <qdatetime.h>
#include <qdir.h>
#include <qregexp.h>
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index f04fb38..65a5258 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -17,6 +17,8 @@
*
*/
+#include <chrono>
+#include <ctime>
#include <stdlib.h>
#include <qdir.h>
@@ -48,16 +50,20 @@
#include "filename.h"
#include "namespacedef.h"
+
//#define DBG_RTF(x) x;
#define DBG_RTF(x)
static QCString dateToRTFDateString()
{
- const QDateTime &d = QDateTime::currentDateTime();
+ auto now = std::chrono::system_clock::now();
+ auto time = std::chrono::system_clock::to_time_t(now);
+ auto tm = *localtime(&time);
+
QCString result;
result.sprintf("\\yr%d\\mo%d\\dy%d\\hr%d\\min%d\\sec%d",
- d.date().year(), d.date().month(), d.date().day(),
- d.time().hour(),d.time().minute(),d.time().second());
+ tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
+ tm.tm_hour, tm.tm_min, tm.tm_sec);
return result;
}