From 2a51f2cba5cd11bb85ffb3259f13ac6b1e782fbf Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Mon, 30 Dec 2019 11:54:50 -0500 Subject: [PATCH] Fix compiler issues with Qt 5.14 * Remove deprecation warnings when not doing a DEV_BUILD. Qt 5.14 introduced several deprecation flags on basic function calls in QList and QSet that would require several #pragma ignores. Assuming this was in preparation to Qt 6.0. * Remove unnecessary assert in PasswordEditWidget that was hit in macOS debug builds. --- CMakeLists.txt | 3 +++ src/gui/masterkey/PasswordEditWidget.cpp | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 643e2f093..8d7b9a051 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -300,6 +300,9 @@ endif() if(WITH_DEV_BUILD) add_definitions(-DQT_DEPRECATED_WARNINGS -DGCRYPT_NO_DEPRECATED) +else() + add_definitions(-DQT_NO_DEPRECATED_WARNINGS) + add_gcc_compiler_cxxflags("-Wno-deprecated-declarations") endif() if(MINGW) diff --git a/src/gui/masterkey/PasswordEditWidget.cpp b/src/gui/masterkey/PasswordEditWidget.cpp index b27248d34..9353cbe7a 100644 --- a/src/gui/masterkey/PasswordEditWidget.cpp +++ b/src/gui/masterkey/PasswordEditWidget.cpp @@ -95,8 +95,6 @@ void PasswordEditWidget::initComponentEditWidget(QWidget* widget) void PasswordEditWidget::hideEvent(QHideEvent* event) { - Q_ASSERT(m_compUi->enterPasswordEdit); - if (!isVisible() && m_compUi->enterPasswordEdit) { m_compUi->enterPasswordEdit->setText(""); m_compUi->repeatPasswordEdit->setText("");