[Pkg-gnupg-commit] [gpgme] 93/103: qt: Don't use QDateTime::toSecsSinceEpoch
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Dec 14 18:53:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gpgme.
commit b61d0fbb74f04408dfe8637c719b97217e061a3c
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Mon Dec 11 17:07:10 2017 +0100
qt: Don't use QDateTime::toSecsSinceEpoch
* lang/qt/src/qgpgmequickjob.cpp (addSubkeyWorker)
(createWorker): Use toMSecsSinceEpoch instead toSecsSinceEpoch.
--
toSecsSinceEpoch was only introduced in Qt 5.8.
---
lang/qt/src/qgpgmequickjob.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lang/qt/src/qgpgmequickjob.cpp b/lang/qt/src/qgpgmequickjob.cpp
index 13ec0a9..93027d9 100644
--- a/lang/qt/src/qgpgmequickjob.cpp
+++ b/lang/qt/src/qgpgmequickjob.cpp
@@ -59,7 +59,7 @@ static QGpgMEQuickJob::result_type createWorker(GpgME::Context *ctx,
auto err = ctx->createKey(uid.toUtf8().constData(),
algo,
0,
- expires.isValid() ? (unsigned long) expires.toSecsSinceEpoch() : 0,
+ expires.isValid() ? (unsigned long) (expires.toMSecsSinceEpoch() / 1000) : 0,
key,
flags);
return std::make_tuple(err, QString(), Error());
@@ -72,7 +72,7 @@ static QGpgMEQuickJob::result_type addSubkeyWorker(GpgME::Context *ctx,
unsigned int flags)
{
auto err = ctx->createSubkey(key, algo, 0,
- expires.isValid() ? (unsigned long) expires.toSecsSinceEpoch() : 0,
+ expires.isValid() ? (unsigned long) (expires.toMSecsSinceEpoch() / 1000): 0,
flags);
return std::make_tuple(err, QString(), Error());
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list