lyx_mirror/src/support
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
..
linkback #6961 correct the big-endian conversion of UInt32 2019-09-08 11:11:17 +02:00
tests Update to boost 1.72 2020-01-07 16:27:23 +01:00
.gitignore
AppleScript.h
AppleScript.m
AppleScriptProxy.cpp
AppleSpeller.h
AppleSpeller.m
bind.h
Cache.h Remove support for gcc 4.6 2019-06-12 15:03:18 +02:00
Changer.h Remove support for gcc 4.6 2019-06-12 15:03:18 +02:00
CMakeLists.txt
ConsoleApplication.cpp
ConsoleApplication.h
ConsoleApplicationPrivate.h
convert.cpp Fix warnings in support/. 2020-02-29 00:06:35 -05:00
convert.h Use HAVE_LONG_LONG_INT instead of LYX_USE_LONG_LONG 2019-03-21 14:18:17 +01:00
copied_ptr.h
debug.cpp Use HAVE_LONG_LONG_INT instead of LYX_USE_LONG_LONG 2019-03-21 14:18:17 +01:00
debug.h Use unsigned values for enum 2019-10-27 00:05:41 +02:00
docstream.cpp Fix warnings in support/. 2020-02-29 00:06:35 -05:00
docstream.h
docstring_list.h
docstring.cpp Use HAVE_LONG_LONG_INT instead of LYX_USE_LONG_LONG 2019-03-21 14:18:17 +01:00
docstring.h
environment.cpp
environment.h
ExceptionMessage.h
FileMonitor.cpp Fix segfault after deleting monitor 2018-12-04 00:05:01 -05:00
FileMonitor.h Fix segfault after deleting monitor 2018-12-04 00:05:01 -05:00
FileName.cpp Fix Qt deprecation warns for QTime 2020-03-15 22:47:08 -04:00
FileName.h typo 2018-12-08 00:04:04 +01:00
FileNameList.h Try yet again try to fix bug #9158. 2018-09-02 11:50:03 -04:00
filetools.cpp Fix warnings in support/. 2020-02-29 00:06:35 -05:00
filetools.h Restore custom tmp directory 2020-02-17 09:00:08 +01:00
ForkedCalls.cpp Fix warnings in support/. 2020-02-29 00:06:35 -05:00
ForkedCalls.h
functional.h
gettext.cpp
gettext.h
gzstream.cpp Fix warnings in support/. 2020-02-29 00:06:35 -05:00
gzstream.h
kill.cpp
lassert.cpp Fix warnings in support/. 2020-02-29 00:06:35 -05:00
lassert.h
limited_stack.h Follow some of the performance advice from cppcheck 2019-09-13 16:23:49 +02:00
lstrings.cpp Various fixes suggested by cppcheck 2019-09-13 22:37:16 +02:00
lstrings.h Various fixes suggested by cppcheck 2019-09-13 22:37:16 +02:00
lyxalgo.h
lyxlib.h
lyxmagic.h Fix compilation on case insensitive filesystems 2018-07-04 09:42:04 +02:00
lyxtime.cpp Fix warnings in support/. 2020-02-29 00:06:35 -05:00
lyxtime.h So long, date-insert! 2018-08-20 09:25:22 +02:00
Makefile.am Add -headerpad_max_install_names option to linker calls and make run path configuration consistent. 2018-09-21 21:46:47 +02:00
Messages.cpp Fix warning with --disable-nls 2020-01-27 15:34:27 +01:00
Messages.h Add a translator as a fallback to Qt inner one 2018-07-18 10:13:05 +02:00
mutex.cpp
mutex.h
numpunct_lyx_char_type.h
os_cygwin.cpp So long, date-insert! 2018-08-20 09:25:22 +02:00
os_unix.cpp update canAutoOpenFile/autoOpenFile implementation to new MacOSX API, avoid deprecated calls 2020-02-06 21:52:46 +01:00
os_win32.cpp Fix FileName::realPath() on Windows 2020-02-23 22:59:03 +01:00
os_win32.h Fix FileName::realPath() on Windows 2020-02-23 22:59:03 +01:00
os.cpp Fix FileName::realPath() on Windows 2020-02-23 22:59:03 +01:00
os.h So long, date-insert! 2018-08-20 09:25:22 +02:00
Package.cpp Various fixes suggested by cppcheck 2019-09-13 22:37:16 +02:00
Package.h
PathChanger.cpp
PathChanger.h
pmprof.h Update poor man's profiler to use C++11 std::chrono 2019-03-17 14:01:02 +01:00
ProgressInterface.h
qstring_helpers.cpp Compilation fix (with qt4 at least). 2018-10-19 10:02:02 +02:00
qstring_helpers.h Simplify the code that adds underlining to the layout combo. 2018-10-18 21:49:31 -04:00
RandomAccessList.h
RefChanger.h Remove support for gcc 4.6 2019-06-12 15:03:18 +02:00
regex.h
signals.h
socktools.cpp
socktools.h
strfwd.h Use <cstdint> instead of <boost/cstdint.hpp> 2019-06-17 16:19:31 +02:00
Systemcall.cpp Fix Qt deprecation warns for QTime 2020-03-15 22:47:08 -04:00
Systemcall.h Fix header. 2020-02-29 00:06:35 -05:00
SystemcallPrivate.h
TempFile.cpp Mark constructors with only one parameter as explicit 2019-09-16 00:01:48 +02:00
TempFile.h
textutils.h Consider EuropeanNumberTerminator property when determining text direction 2018-07-22 12:38:22 +02:00
Timeout.cpp
Timeout.h
Translator.h
trivstring.cpp
trivstring.h
types.h
unicode.cpp Null pointers. 2020-02-29 00:06:35 -05:00
unicode.h gcc 4.7 leftover 2020-02-20 09:25:00 +01:00
unique_ptr.h
userinfo.cpp Compile fix for mingw 2019-04-27 12:53:05 +02:00
userinfo.h Move initial values of LyXRC members to the header 2019-04-19 14:46:12 +02:00
weighted_btree.h