mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
app: detect and abort/core dump on Qt runtime version mismatch
Catch Qt binary incompatibility. Change-Id: I30e1de97bd658fc570ac89115d1aa8a37f53952a
This commit is contained in:
parent
0140f72d62
commit
a98faf95ec
1 changed files with 7 additions and 0 deletions
|
@ -80,6 +80,13 @@ ScreenInfo::setCurrentFocusWindow(QWindow* window)
|
|||
MainApplication::MainApplication(int& argc, char** argv)
|
||||
: QApplication(argc, argv)
|
||||
{
|
||||
const char* qtVersion = qVersion();
|
||||
qInfo() << "Using Qt runtime version:" << qtVersion << " - "
|
||||
<< strnlen(qtVersion, sizeof qtVersion);
|
||||
if (strncmp(qtVersion, QT_VERSION_STR, strnlen(qtVersion, sizeof qtVersion)) != 0) {
|
||||
qFatal(QString("Qt build version mismatch!(%1)").arg(QT_VERSION_STR).toLatin1());
|
||||
}
|
||||
|
||||
parseArguments();
|
||||
QObject::connect(this, &QApplication::aboutToQuit, [this] { cleanup(); });
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue