From 96cbb3d2c0d0ceb0d02252d48c4dab46dab2c17f Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 2 Dec 2021 10:12:35 +0100 Subject: [PATCH] TD: fix C++20 warning: bitwise operation between different enumeration types [-Wdeprecated-enum-enum-conversion] --- src/Mod/TechDraw/Gui/mrichtextedit.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Mod/TechDraw/Gui/mrichtextedit.cpp b/src/Mod/TechDraw/Gui/mrichtextedit.cpp index 7cc23e368c..ad136a9358 100644 --- a/src/Mod/TechDraw/Gui/mrichtextedit.cpp +++ b/src/Mod/TechDraw/Gui/mrichtextedit.cpp @@ -146,15 +146,15 @@ MRichTextEdit::MRichTextEdit(QWidget *parent, QString textIn) : QWidget(parent) // link - f_link->setShortcut(Qt::CTRL + Qt::Key_L); + f_link->setShortcut(QKeySequence(QString::fromUtf8("CTRL+L"))); connect(f_link, SIGNAL(clicked(bool)), this, SLOT(textLink(bool))); // bold, italic & underline - f_bold->setShortcut(Qt::CTRL + Qt::Key_B); - f_italic->setShortcut(Qt::CTRL + Qt::Key_I); - f_underline->setShortcut(Qt::CTRL + Qt::Key_U); + f_bold->setShortcut(QKeySequence(QString::fromUtf8("CTRL+B"))); + f_italic->setShortcut(QKeySequence(QString::fromUtf8("CTRL+I"))); + f_underline->setShortcut(QKeySequence(QString::fromUtf8("CTRL+U"))); connect(f_bold, SIGNAL(clicked()), this, SLOT(textBold())); connect(f_italic, SIGNAL(clicked()), this, SLOT(textItalic())); @@ -184,16 +184,16 @@ MRichTextEdit::MRichTextEdit(QWidget *parent, QString textIn) : QWidget(parent) // lists - f_list_bullet->setShortcut(Qt::CTRL + Qt::Key_Minus); - f_list_ordered->setShortcut(Qt::CTRL + Qt::Key_Equal); + f_list_bullet->setShortcut(QKeySequence(QString::fromUtf8("CTRL+-"))); + f_list_ordered->setShortcut(QKeySequence(QString::fromUtf8("CTRL+="))); connect(f_list_bullet, SIGNAL(clicked(bool)), this, SLOT(listBullet(bool))); connect(f_list_ordered, SIGNAL(clicked(bool)), this, SLOT(listOrdered(bool))); // indentation - f_indent_dec->setShortcut(Qt::CTRL + Qt::Key_Comma); - f_indent_inc->setShortcut(Qt::CTRL + Qt::Key_Period); + f_indent_dec->setShortcut(QKeySequence(QString::fromUtf8("CTRL+,"))); + f_indent_inc->setShortcut(QKeySequence(QString::fromUtf8("CTRL+."))); connect(f_indent_inc, SIGNAL(clicked()), this, SLOT(increaseIndentation())); connect(f_indent_dec, SIGNAL(clicked()), this, SLOT(decreaseIndentation()));