summaryrefslogtreecommitdiffstats
path: root/src/core/type_conversion.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/type_conversion.h')
-rw-r--r--src/core/type_conversion.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index 5e489353c..5d5dc356d 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -43,11 +43,13 @@
#define TYPE_CONVERSION_H
#include <QColor>
+#include <QDateTime>
#include <QMatrix4x4>
#include <QRect>
#include <QString>
#include <QUrl>
#include "base/files/file_path.h"
+#include "base/time/time.h"
#include "third_party/skia/include/utils/SkMatrix44.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/rect.h"
@@ -126,6 +128,11 @@ inline QMatrix4x4 toQt(const SkMatrix44 &m)
m.get(3, 0), m.get(3, 1), m.get(3, 2), m.get(3, 3));
}
+inline QDateTime toQt(base::Time time)
+{
+ return QDateTime::fromMSecsSinceEpoch(time.ToJavaTime());
+}
+
inline base::FilePath::StringType toFilePathString(const QString &str)
{
#if defined(OS_WIN)