Commit 30294906 authored by Ingo Klöcker's avatar Ingo Klöcker Committed by Ingo Klöcker
Browse files

Avoid deprecation warning

Bitwise operation between different enumeration types has been deprecated
with C++20.
parent 4e9fd967
......@@ -50,7 +50,7 @@ public:
explicit HLine(QWidget *p = nullptr, Qt::WindowFlags f = {})
: QFrame(p, f)
{
setFrameStyle(QFrame::HLine | QFrame::Sunken);
setFrameStyle(static_cast<int>(QFrame::HLine) | static_cast<int>(QFrame::Sunken));
}
};
......
......@@ -14,6 +14,7 @@
#include "signingcertificateselectionwidget.h"
#include "utils/keys.h"
#include "utils/qt-cxx20-compat.h"
#include <KLocalizedString>
......
......@@ -13,6 +13,8 @@
#include "expirydialog.h"
#include "utils/qt-cxx20-compat.h"
#include <KLocalizedString>
#include <KStandardGuiItem>
......
......@@ -9,6 +9,7 @@
#include "gencardkeydialog.h"
#include "utils/qt-cxx20-compat.h"
#include "utils/userinfo.h"
#include <QDialogButtonBox>
......
......@@ -12,6 +12,8 @@
#include "ownertrustdialog.h"
#include "ui_ownertrustdialog.h"
#include "utils/qt-cxx20-compat.h"
#include <Libkleo/Formatting>
#include <KLocalizedString>
......
......@@ -9,6 +9,8 @@
#include "pivcardapplicationadministrationkeyinputdialog.h"
#include "utils/qt-cxx20-compat.h"
#include <QDialogButtonBox>
#include <QFontDatabase>
#include <QLabel>
......
......@@ -12,6 +12,8 @@
#include "kwatchgnupgconfig.h"
#include "kwatchgnupg.h"
#include "utils/qt-cxx20-compat.h"
#include <Libkleo/FileNameRequester>
#include <KLocalizedString>
......
......@@ -14,6 +14,8 @@
#include "kwatchgnupg.h"
#include "tray.h"
#include "utils/qt-cxx20-compat.h"
#include <QGpgME/Protocol>
#include <QGpgME/CryptoConfig>
......
......@@ -36,6 +36,7 @@
#include "utils/filedialog.h"
#include "utils/clipboardmenu.h"
#include "utils/gui-helper.h"
#include "utils/qt-cxx20-compat.h"
#include "dialogs/updatenotification.h"
......
/* -*- mode: c++; c-basic-offset:4 -*-
utils/qt-cxx20-compat.h
This file is part of Kleopatra, the KDE keymanager
SPDX-FileCopyrightText: 2022 g10 Code GmbH
SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <Qt>
// define some bitwise operators to avoid warning that bitwise operation between
// different enumeration types is deprecated
inline int operator|(Qt::Modifier modifier, Qt::Key key)
{
return static_cast<int>(modifier) | static_cast<int>(key);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment