mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Address another deprecation warning.
One left to go.
This commit is contained in:
parent
1a35afbe8f
commit
26459a2cf5
@ -106,6 +106,9 @@
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
#include <QRandomGenerator>
|
||||
#endif
|
||||
#include <QRegExp>
|
||||
#include <QSessionManager>
|
||||
#include <QSettings>
|
||||
@ -1085,8 +1088,11 @@ GuiApplication::GuiApplication(int & argc, char ** argv)
|
||||
setDesktopFileName(lyx_package);
|
||||
#endif
|
||||
|
||||
// FIXME Deprecated. Should use QRandomGenerator since 5.10
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QRandomGenerator(QDateTime::currentDateTime().toTime_t());
|
||||
#else
|
||||
qsrand(QDateTime::currentDateTime().toTime_t());
|
||||
#endif
|
||||
|
||||
// Install LyX translator for missing Qt translations
|
||||
installTranslator(&d->gui_trans_);
|
||||
|
@ -16,6 +16,9 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
#include <QTimer>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
#include <QRandomGenerator>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -38,7 +41,11 @@ public:
|
||||
setOrganizationDomain("lyx.org");
|
||||
setApplicationName(toqstr(app));
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QRandomGenerator(QDateTime::currentDateTime().toTime_t());
|
||||
#else
|
||||
qsrand(QDateTime::currentDateTime().toTime_t());
|
||||
#endif
|
||||
}
|
||||
int execute()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user