Commit Graph

33195 Commits

Author SHA1 Message Date
Thiago Macieira
9ca3443a37 Rename the "sys_auxv" feature to "getauxval"
Change-Id: I8d96dea9955d4c749b99fffd14cdbd1e69940d33
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-06 00:23:59 +00:00
Thiago Macieira
d38122f4a2 Rewrite QFileInfo::{created,lastModified,lastRead} using fileTime()
Better code reusal.

Change-Id: I8d96dea9955d4c749b99fffd14cd72a7f4e040c9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-06 00:23:57 +00:00
Thiago Macieira
11975fc9ec QFileInfo: use QFile::FileTime instead of our own enum
No need to duplicate the enum in two places.

Change-Id: I8d96dea9955d4c749b99fffd14cd6f887dd48a71
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-06 00:23:55 +00:00
Thiago Macieira
48e35e06ca QFSFileEngine: handle refreshing of file times better
Clear the known times when we write to it and always refresh for the
Access time.

Change-Id: I8d96dea9955d4c749b99fffd14cd6c03b4253197
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-06 00:23:53 +00:00
David Faure
f7aaff01de Fix Qt5DBusMacros.cmake for CMake 3.9
CMake gained support for running AUTOMOC on generated headers,
so we need to mark them with SKIP_AUTOMOC since we're generating
moc files for those already. Otherwise we get duplicated symbols.

Change-Id: Iabd387832cfc74809fc5e6ff4782f4fc83cc07d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2017-07-05 17:11:59 +00:00
Friedemann Kleint
c8602f45cc Remove WinCE-specific sipdialog example
Task-number: QTBUG-52590
Task-number: QTBUG-60635
Change-Id: Ie6d59d1431645faf93d1538fe9f5bf1bea9f3014
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-05 15:32:22 +00:00
Friedemann Kleint
5ed446102a Windows QPA: Take hasBorderInFullScreen into account when checking for fullscreen
Add a margin to the window geometry.

Task-number: QTBUG-61595
Change-Id: I12c557d7cfb1fe954a9845848c0777817c4cbf27
Reviewed-by: Thomas Sondergaard <thomas@sondergaard.cc>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-05 15:32:10 +00:00
Thiago Macieira
f6ac7379ae QFileSystemEngine:🆔 use the proper QT_STATBUF/QT_STAT
Just in case.

Change-Id: I1eba2b016de74620bfc8fffd14ccaa801805ae02
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-05 14:43:51 +00:00
Thiago Macieira
08a39ecf33 QFileSystemEngine/Unix: use fchmod(2) if the file is open
This protects against the file having been renamed or deleted. We'll
still operate on the open file, regardless the name it may have on the
filesystem.

Change-Id: I1eba2b016de74620bfc8fffd14cca85cfd672e6d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-05 14:43:46 +00:00
Thiago Macieira
fb13510681 QFileSystemEngine::fillMetaData: fix apparent use of dangling pointer
It's not dangling only because of QFileSystemMetaData's construction:
the nativeFilePath() function returns a member variable. Since
QByteArray COWs, the pointer that we stored would not be freed.

But this was dangerous, since any change to the "entry" variable could
cause it to invalidate the member variable and the pointer to become
dangling. This line is only as old as this entire file is.

Change-Id: I8d96dea9955d4c749b99fffd14cda4d8e2cc5e5b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-05 14:35:20 +00:00
Stephan Binner
f065d0f128 Fix Windows build without features.filesytemiterator
Task-number: QTBUG-61671
Change-Id: I65a96ca51efee303602c836e5b0177b1a63d1a7a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-05 14:03:09 +00:00
Stephan Binner
6a1046e176 Fix macOS build for -no-widgets
Task-number: QTBUG-61780
Change-Id: Icb337c4daeb976a6616dc289a5ffd0ec9345834f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-05 14:03:06 +00:00
Michael Winkelmann
7d42293d2f QVariant: Print a warning when deserialized user type is unknown
The deserialized user type is now shown to the user to figure which
QMetaType registration is missing.

Change-Id: I4b7624827e479b1bea67065ce3542183b7355165
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-05 13:52:11 +00:00
Timur Pocheptsov
594fe5c463 Convert features.localserver to QT_[REQUIRE_]CONFIG
Move all the logic into socket.pri and clean-up source
code. Build local socket/server only if feature 'localserver'
was enabled.

Task-number: QTBUG-61672
Change-Id: I9f9d1a262df4bb020c8706c7cb5a66b926e0240f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-05 13:44:59 +00:00
Thiago Macieira
d78fd6a1e5 QWinRTFileEngine: Property ItemDate is not the file's last access
The MSDN documentation says that it's a date that reflects the item
type, giving an example the date a photo was taken (probably as stored
in the EXIF metadata).

Change-Id: I8d96dea9955d4c749b99fffd14cd7616cc0da545
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-07-05 13:41:09 +00:00
Olivier Goffart
313c3cabe4 Prevent qmake to run moc on qobjectdefs.h
Change-Id: Ic453c88c36cbeb24f3dc4fa6b6b20aabe5d24e09
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-05 13:22:03 +00:00
Friedemann Kleint
d3d5c22ccb tst_QProcess/tst_QFile: Extend blacklisting to MSVC2017
Extend the blacklisting introduced by
0ebebeb983.

Task-number: QTBUG-48455
Task-number: QTBUG-48504
Change-Id: Idf44948a5ede433435a8d0b61fef6413bb0b69bc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-05 12:42:14 +00:00
Allan Sandfeld Jensen
d866617ea6 Fix polygon stroking with cosmetic pen
Fix a number of issues that caused polygons to not always be drawn
fully connected.

Ensures the original lastPixel is set when drawing closed polygons,
ensure we don't round away from the original starting point, and add
handling of edges that need to be rounded half a pixel sideways to line
up with endpoints.

Task-number: QTBUG-27053
Change-Id: Ib51ee5623a629996af51a0967096383f04e91e2f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-07-05 12:35:26 +00:00
Jarek Kobus
8e40050efe uic: Don't clear and readd combobox items in retranslateUi
Task-number: QTBUG-61778
Change-Id: If7a15ef69fcfe459f177ff8b671f53a6022ab335
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2017-07-05 12:20:09 +00:00
Edward Welbourne
8095c33bcd Use qRadiansToDegrees() and qDegreesToRadians() more widely
Especially in examples, where we should show off our convenience
functions, prefer calling these functions over doing arithmetic with
M_PI (or approximations thereto) and 180 (give or take simple
factors).  This incidentally documents what's going on, just by the
name of the function used (and reveals at least one place where
variables were misnamed; the return from atan is in radians, *not*
degrees).

Task-number: QTBUG-58083
Change-Id: I6e5d66721cafab423378f970af525400423e971e
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-05 10:15:34 +00:00
Jesus Fernandez
827e53540c Make QTcpServerPrivate exportable
It is needed to create private implementations of classes inheriting
from QTcpServer.

Change-Id: I623aa37a6f112dc5db761bf299978ac1ccd52a2f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-05 10:13:16 +00:00
Liang Qi
207253384b Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-07-05 08:54:21 +00:00
Simon Hausmann
03b4838cb5 Extend tst_macgui::nonModalOrder blacklist to include 10.12
Change-Id: I9cfe9e8d79a3223c9cdbb039cc3e243b173f5e9c
Task-number: QTQAINFRA-1333
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-04 20:03:41 +00:00
BogDan Vatra
4f7507c523 Forward Service.onBind notification to Qt
It is needed to implement Android Binder in Qt.

Change-Id: I8f6f8ef778f97a444a1b16d6f62e211e188b65cc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-07-04 18:38:19 +00:00
Richard J. Moore
cfbe03a6e0 QSslSocket: OpenSSL 1.1 backend
This patch-set implements a new QSslSocket backend based on OpenSSL 1.1.

1. General.

The code in this patch was organized to achieve these (somewhat contradicting)
objectives:
- keep the new code free of #if-ery, as far as possible;
- make it easy to clean away dead code when we're eventually able to retire
  out-dated OpenSSL versions;
- reduce the amount of code duplication.

If changes in some file/component were insignificant (~5 one-liners per file),
we still use pp-checks like: #if QT_CONFIG(opensslv11) ... #else ... #endif -
the logic is simple and it's still easy to clean the code if we remove the legacy
back-end. Where it saved #if-ery, we also introduced 'forward-compatible'
macros implementing equivalents of 1.1 functions using older OpenSSL.

In case some class contains a lot of version-specific ifdefs (particularly where
nested #if-ery was complex) we choose to split code into: "pre11" h/cpp files,
"shared" h/cpp files (they preserve their original names, e.g qsslsocket_openssl.cpp)
and "11" h/cpp files. If in future we remove the legacy back-end, "pre11" should be
removed; "shared" and "11" parts - merged.

2. Configuration.

We introduced a new feature 'opensslv11' which complements the pre-existing
'openssl' and 'openssl-linked' features. The 'opensslv11' feature is enabled
by a simple test which either compiles successfully or ends in a compilation
error, depending on a value of the OPENSSL_VERSION_NUMBER constant. If the
feature was enabled, we also append an additional compilation flag
-DOPENSSL_API_COMPAT=0x10100000L to make sure our new code does not contain
deprecated structures, function calls, macro-invocations from OpenSSL < 1.1.

Change-Id: I2064efbe9685def5d2bb2233a66f7581954fb74a
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-07-04 18:03:59 +00:00
Liang Qi
c2b224a758 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qprocess_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/widgets/util/util.pri
	tests/auto/corelib/thread/qthread/qthread.pro
	tests/auto/corelib/thread/qthread/tst_qthread.cpp

Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
2017-07-04 16:05:53 +02:00
Timur Pocheptsov
0d97babf2f QSslSocket - fix two memory management issues (Secure Transport)
I noticed we never release 'items' imported by SecPKCS12Import.
But looking at the actual code (SecImportExport.c), it appears
we own these 'items' and must release them. And this leads to a crash
(on over-release) which reveals  another bug: a value from a dictionary
obtained with 'Get' method should follow the 'get rule' - we do not
own it and QCFType RAII object is not needed.

Change-Id: I219015fadedb256c401e50cf7e955f3d7e0a6c5f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-04 05:02:11 +00:00
Thiago Macieira
2f8a08f31b Make qt_check_pointer more OOM-safe
First, it can never return, so we can mark it Q_NORETURN and add an
std::termianate at the end. Though if it did, we'd end up in a null-
pointer dereference crash in the caller.

Second, add Q_DECL_NOTHROW to it. It can't throw, but it terminates
execution. This also prevents both puts and fprintf from escaping via
pthread asynchronous cancellation on Linux/glibc.

Third, don't use QMessageLogger, since that allocates memory and
actually uses QString. If we really are in an OOM situation, then
QString's failed allocation would recurse back into qt_check_pointer.
We'd compound the OOM situation with a stack overflow...

Change-Id: Ia53158e207a94bf49489fffd14c81c47971f4e82
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-03 16:01:14 +00:00
Thiago Macieira
2b991efc47 Use QMessageLogger context properly in qglobal.cpp redirects
qt_assert and qt_check_pointer get the function name and line number
from the caller (the functions are called from the Q_ASSERT and
Q_CHECK_PTR macros, respectively), so we don't need to capture the
context from those two functions. Instead, pass the context to
QMessageLogger for proper logging.

I've left the file name and line number in the assertions, for users who
did not add them to their message log pattern, but I've removed from the
almost never used qt_check_pointer function.

Note: how useful is it that we allocate memory in response to failing to
allocate memory?

Change-Id: Ia53158e207a94bf49489fffd14c81b359c5b6537
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2017-07-03 16:01:10 +00:00
Thiago Macieira
fb046c932f Fix build with MSVC 2015 Update 2 if constexpr is enabled
This compiler seems to require explicit initialization of all member
variables in a constexpr constructor, even if they have an implicit
default constructor of their own. We probably fixed the rest of Qt a
couple of years ago, but not these two places because they were arrays
and those require the C++11 syntax for uniform initialization.

All compilers that support constexpr do support uniform initialization.
MSVC 2015 fixed our issues with it on the same update.

Change-Id: Ibc1eb23e3ae093f5c6928ded3a041be35eb9baae
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-03 16:01:07 +00:00
Thiago Macieira
d3590d32a5 Disable the -Wstringop-overflow warning from GCC 7
It prints the warning even if we surround the affected code with
QT_WARNING_DISABLE_GCC("-Wstringop-overflow") (see e4eaa62943),
so we have no alternative other than to disable the warning completely.

Change-Id: Ia3e896da908f42939148fffd14c488c4006040e6
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-03 16:01:04 +00:00
Thiago Macieira
8616b2112c Fix parsing of 0E+1 and 0E-1 (capital 'E')
Since the result is an actual zero, this section of code looking for
underflows kicks in. But we forgot to take the capital letter into
account when parsing the number.

Task-number: QTBUG-61350
Change-Id: Ia53158e207a94bf49489fffd14c6abbd21f0bac0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-07-03 16:01:01 +00:00
Friedemann Kleint
c854fc5a6b Windows QPA: Correctly check for fixed sized windows in WM_DPICHANGED
Use Qt's flags instead of WS_DLGFRAME which matches WS_CAPTION as
well (WS_BORDER | WS_DLGFRAME).

Amends 886ce572d6.

Task-number: QTBUG-58959
Change-Id: Ifdc106667d67cc6f5d3611806aae1035742fb882
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2017-07-03 14:46:15 +00:00
Christian Strømme
50a7da53a4 Android: Replace QMutex with QBasicMutex in androidjnimain
QBasicMutex is sufficient and provides reduced initialization cost.

Change-Id: I79ae61daaed4f5edd9b21d913f78e78e7ba14c94
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-07-03 14:38:08 +00:00
Christian Stromme
5dcd949145 Android: Add lock to protect access to the platform interface
Fixes dubious lock protecting the platform interface handle, and makes
sure that we lock and hold a valid reference to the platform
interface before accessing it. Since the platform interface is exposed
we also need to expose the mutex protecting it.

Change-Id: I1ec1219a75c589bc793676369b11fb403de20102
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-07-03 14:38:01 +00:00
Dmitry Shachnev
5c144a72d5 Fix capitalization of x11-xcb pkg-config module name
$ pkg-config --exists X11-xcb && echo True
$ pkg-config --exists x11-xcb && echo True
True

See https://cgit.freedesktop.org/xorg/lib/libX11/tree/x11-xcb.pc.in.

Change-Id: I1485f124e2926bb1c6a2b5eb83c4963c095d0f12
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-03 13:33:30 +00:00
David Faure
df06926b8a QMimeDatabase::mimeTypeForUrl: skip content check for remote URLs
The code was trying to open a local file with the same path
as the remote URL, which is unnecessary and wrong in the unlikely
case where such a file would exist.

Spotted by Christoph Feck when reading the code.

Change-Id: I1d77e5781cf606b025d2877f48a9914dd1e36b1d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2017-07-03 13:18:03 +00:00
Friedemann Kleint
f2df5c64bd QFileSystemEntry: Export static helper function checking for the root path
This provides a helper function which does the check on the string.
QFileInfo::isRoot() in addition checks for the existence of
the directory, which can cause hangs with network drives.
Use the new function in appropriate places in QtWidgets.

Task-number: QTBUG-6039
Change-Id: I54d0d860713e82b28fa4069a5345b042337f9c52
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-03 12:44:00 +00:00
Daniel Teske
00b8050d68 QLineEdit: Document that []{} are reserved in Input Masks
They don't have any meaning, seems like they were meant for a future
extension. Documenting them, documents that they need to be escaped.

Change-Id: I90079766ffd45fab8c4676f7a9212ff6dec4a732
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 12:28:35 +00:00
Nico Vertriest
db6e357d48 Doc: Add list with widgets examples using layouts
Change-Id: I585cd63f68220467de1beed3346cdaa12af2b34b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 11:51:23 +00:00
Alexander Volkov
46312b611b xcb: Use QT_CONFIG macro to check for xcb-sm, xcb-render, and xcb-glx
And remove the corresponding defines.
Note that XCB_USE_GLX and XCB_HAS_XCB_GLX were used as synonyms
because QGLXBufferSwapComplete was wrapped in #if defined(XCB_USE_GLX)
and at the same time it was used only when XCB_HAS_XCB_GLX
was defined.

Change-Id: I6c04b0ccfd5369b78b3e8af2ec39d38ae5c311dc
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-07-03 11:40:35 +00:00
Simon Hausmann
5ac03a14bf Blacklist tst_QWindow::positioning on macOS 10.12
Change-Id: I41f46e8387519a691d3df9a4fdcc577916e6d247
Task-number: QTQAINFRA-1332
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-07-03 11:29:30 +00:00
Nico Vertriest
3fe032ad91 Doc: minor correction in list
Removed unnecessary periods in list

Change-Id: Ic6e029a3271bf34db2e0b77005f58dd8b2337537
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 11:18:04 +00:00
Nico Vertriest
b7c33df724 Doc: add tutorials to overview page Qt Widgets
Change-Id: I62037ce2190689b2e9c8d62a9d67e1d477e1be42
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 10:35:44 +00:00
Gatis Paeglis
ce9a806336 doc: cleanup raster window example
Documentation does not match the sample code. There is no explicit
call to QWindow::create(). It is called implicitly by QWindow::show().

Furthermore, QWindow::create() documentation states: "Note that it is
not usually necessary to call this function directly, as it will be
implicitly called by show(), setVisible(), and other functions that
require access to the platform resources.".

Change-Id: I632da86438f7f88c1fd8359b9fd6d52f329291cb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 10:20:37 +00:00
Kai Koehne
87229adca8 Change MinGW link to MinGW-w64
We're only supporting builds with MinGW-w64 these days.

Change-Id: I1198551ba85132c3f0f81e32f11aa149126ca61f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 10:16:44 +00:00
Eike Ziller
2a9f678f59 Fix navigation with offline style
When the switching to the non-simple offline style is done after
document load, the navigation to anchors completely breaks. So, do
the switch without the additional delay.

Task-number: QTCREATORBUG-18448
Change-Id: I5abbc3bbe1c743d2a5e493bb9e0916c5d092942a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-03 10:08:33 +00:00
Andy Shaw
3e8ebea95b Cocoa: Reset the target + action for a menuitem after showing a dialog
To make it more reliable and efficient we now do the reverse of what we
are doing when redirecting the items. This will ensure that the actions
are correctly reset to the original target and action. The original
approach of updateMenubarImmediately() was not always doing this and it
also does other unnecessary things as a result when all we need is to
just reset the things we changed.

Change-Id: Icefa38d47ec9434894f05caeed75fbf8bdfecb93
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-03 09:42:13 +00:00
Daniel Teske
9b91784987 QLineEdit: Tweak selectionStart() documentation
Change-Id: I55defa5ed182373f435b06c92770da5b05c01459
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-03 09:41:25 +00:00
Edward Welbourne
f881120fd0 Fix offset calculation to be valid at the correct time
tst_QLocale::macDefaultLocale() was determining local-time's current
offset from UTC and using it when working out what to expect the
offset at 1:2:3 today to be.  When a transition happens after 1:2:3 on
its day (which is usual for DST changes in Europe), this lead to using
the new offset to test a time before the transition; the test was thus
wrong and failed.

Use the time to be tested (and current date) to compute the offset to
use, instead of using the current date-time.

Change-Id: I1c02a5579bca859e1d1aeb4f45b24871a08287af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-03 09:03:28 +00:00