mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
use setWindowFlags() instead of setWindowFlag on Qt<5.9
Fixes: src/gui/CloneDialog.cpp:32:5: error: use of undeclared identifier 'setWindowFlag' setWindowFlag(Qt::WindowContextHelpButtonHint, false); ^ void QWidget::setWindowFlag(Qt::WindowType flag, bool on = true) --> This function was introduced in Qt 5.9.
This commit is contained in:
parent
eddd97fbab
commit
d5d9a4c08c
@ -29,7 +29,11 @@ CloneDialog::CloneDialog(DatabaseWidget* parent, Database* db, Entry* entry)
|
|||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
window()->layout()->setSizeConstraint(QLayout::SetFixedSize);
|
window()->layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
|
||||||
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
|
#else
|
||||||
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
#endif
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(close()));
|
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(close()));
|
||||||
|
@ -36,7 +36,11 @@ DatabaseOpenDialog::DatabaseOpenDialog(QWidget* parent)
|
|||||||
{
|
{
|
||||||
setWindowTitle(tr("Unlock Database - KeePassXC"));
|
setWindowTitle(tr("Unlock Database - KeePassXC"));
|
||||||
setWindowFlags(Qt::Dialog);
|
setWindowFlags(Qt::Dialog);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
|
||||||
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
|
#else
|
||||||
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
#endif
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
// Linux requires this to overcome some Desktop Environments (also no Quick Unlock)
|
// Linux requires this to overcome some Desktop Environments (also no Quick Unlock)
|
||||||
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
|
@ -29,7 +29,11 @@ TotpSetupDialog::TotpSetupDialog(QWidget* parent, Entry* entry)
|
|||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
|
||||||
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
|
#else
|
||||||
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
#endif
|
||||||
setFixedSize(sizeHint());
|
setFixedSize(sizeHint());
|
||||||
|
|
||||||
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(close()));
|
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(close()));
|
||||||
|
Loading…
Reference in New Issue
Block a user