Commit e45db267 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Add () around '& Qt flags'

parent a2b6a81b
......@@ -2010,7 +2010,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
bool selected = _screenWindow->isSelected(pos.x(), pos.y());
// Drag only when the Control key is held
if ((!_ctrlRequiredForDrag || (ev->modifiers() & Qt::ControlModifier != 0u)) && selected) {
if ((!_ctrlRequiredForDrag || ((ev->modifiers() & Qt::ControlModifier) != 0u)) && selected) {
_dragInfo.state = diPending;
_dragInfo.start = ev->pos();
} else {
......@@ -2125,11 +2125,11 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
// key is being held down, which overrides this.
if (!_mouseMarks && !(ev->modifiers() & Qt::ShiftModifier)) {
int button = 3;
if (ev->buttons() & Qt::LeftButton != 0u)
if ((ev->buttons() & Qt::LeftButton) != 0u)
button = 0;
if (ev->buttons() & Qt::MidButton != 0u)
if ((ev->buttons() & Qt::MidButton) != 0u)
button = 1;
if (ev->buttons() & Qt::RightButton != 0u)
if ((ev->buttons() & Qt::RightButton) != 0u)
button = 2;
emit mouseSignal(button,
......@@ -2162,7 +2162,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
if (_actSel == 0) return;
// don't extend selection while pasting
if (ev->buttons() & Qt::MidButton != 0u) return;
if ((ev->buttons() & Qt::MidButton) != 0u) return;
extendSelection(ev->pos());
}
......@@ -2404,7 +2404,7 @@ void TerminalDisplay::updateLineProperties()
void TerminalDisplay::processMidButtonClick(QMouseEvent* ev)
{
if (_mouseMarks || ((ev->modifiers() & Qt::ShiftModifier) != 0u)) {
const bool appendEnter = ev->modifiers() & Qt::ControlModifier != 0u;
const bool appendEnter = (ev->modifiers() & Qt::ControlModifier) != 0u;
if (_middleClickPasteMode == Enum::PasteFromX11Selection) {
pasteFromX11Selection(appendEnter);
......
......@@ -1024,7 +1024,7 @@ void Vt102Emulation::sendKeyEvent(QKeyEvent* event)
states |= KeyboardTranslator::ApplicationKeypadState;
// check flow control state
if (modifiers & Qt::ControlModifier != 0u) {
if ((modifiers & Qt::ControlModifier) != 0u) {
switch (event->key()) {
case Qt::Key_S:
emit flowControlKeyPressed(true);
......@@ -1050,17 +1050,17 @@ void Vt102Emulation::sendKeyEvent(QKeyEvent* event)
// Alt+[Character] results in Esc+[Character] being sent
// (unless there is an entry defined for this particular combination
// in the keyboard modifier)
const bool wantsAltModifier = entry.modifiers() & entry.modifierMask() & Qt::AltModifier != 0u;
const bool wantsMetaModifier = entry.modifiers() & entry.modifierMask() & Qt::MetaModifier != 0u;
const bool wantsAnyModifier = entry.state() &
entry.stateMask() & KeyboardTranslator::AnyModifierState != 0;
const bool wantsAltModifier = ((entry.modifiers() & entry.modifierMask() & Qt::AltModifier) != 0u);
const bool wantsMetaModifier = ((entry.modifiers() & entry.modifierMask() & Qt::MetaModifier) != 0u);
const bool wantsAnyModifier = ((entry.state() &
entry.stateMask() & KeyboardTranslator::AnyModifierState) != 0);
if ( (modifiers & Qt::AltModifier != 0u) && !(wantsAltModifier || wantsAnyModifier)
if ( ((modifiers & Qt::AltModifier) != 0u) && !(wantsAltModifier || wantsAnyModifier)
&& !event->text().isEmpty() )
{
textToSend.prepend("\033");
}
if ( (modifiers & Qt::MetaModifier != 0u) && !(wantsMetaModifier || wantsAnyModifier)
if ( ((modifiers & Qt::MetaModifier) != 0u) && !(wantsMetaModifier || wantsAnyModifier)
&& !event->text().isEmpty() )
{
textToSend.prepend("\030@s");
......
Markdown is supported
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