Scott Kostyshak 24e0bd3afe Fix Qt deprecation warns for QTime
This commit fixes a couple of warnings from Qt 5.14 like the
following one:

  error: ‘int QTime::restart()’ is deprecated: Use QElapsedTimer instead [-Werror=deprecated-declarations]

This commit changes two uses of QTime to QElapsedTimer, one used
only when the "files" debug flag is set, and the other for timing
whether a script (e.g., knitr) takes longer than a certain amount of
time to run.

QElapsedTimer is superior for these two use cases in that it uses a
monotonic clock if possible, and is thus more robust to certain
changes (e.g., daylight savings changes) [1]. Similarly, the commit
in Qt Base that makes this deprecation [2] mentions the following in
the commit message:

  QElapsedTimer does the job better and without the DST kludges.

Note that QElapsedTimer class was introduced in Qt 4.7, so no
conditioning on Qt version is necessary.

Not all methods of QTime are deprecated and we still use some of
the non-deprecated methods in our code (e.g., to get the current
wall clock time in GuiProgress::currentTime()).

[1] https://doc.qt.io/qt-5/qelapsedtimer.html
[2] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=ed99a591a83a399458f12341d0a1c0b3152f247a
2020-03-15 22:47:08 -04:00
..
2020-01-07 16:27:23 +01:00
2017-07-03 13:46:30 -04:00
2019-06-12 15:03:18 +02:00
2019-06-12 15:03:18 +02:00
2017-07-03 13:46:30 -04:00
2020-02-29 00:06:35 -05:00
2019-10-27 00:05:41 +02:00
2020-02-29 00:06:35 -05:00
2017-07-11 13:43:32 +02:00
2018-12-08 00:04:04 +01:00
2020-02-29 00:06:35 -05:00
2020-02-17 09:00:08 +01:00
2020-02-29 00:06:35 -05:00
2020-02-29 00:06:35 -05:00
2017-02-25 00:20:51 +01:00
2020-02-29 00:06:35 -05:00
2017-07-03 13:46:30 -04:00
2019-09-13 22:37:16 +02:00
2020-02-29 00:06:35 -05:00
2018-08-20 09:25:22 +02:00
2020-01-27 15:34:27 +01:00
2018-01-08 11:19:15 +01:00
2017-07-03 13:46:30 -04:00
2018-08-20 09:25:22 +02:00
2020-02-23 22:59:03 +01:00
2020-02-23 22:59:03 +01:00
2018-08-20 09:25:22 +02:00
2019-06-12 15:03:18 +02:00
2020-02-29 00:06:35 -05:00
2020-02-29 00:06:35 -05:00
2020-02-20 09:25:00 +01:00
2019-04-27 12:53:05 +02:00
2017-07-03 13:46:30 -04:00