Commit 9af85cd2 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Fix integer literal suffix 'u' is not upper-case

parent e3eba0b2
......@@ -62,7 +62,7 @@ bool AutoScrollHandler::eventFilter(QObject* watched, QEvent* event)
_timerId = 0;
} else {
if ((_timerId == 0) && ((mouseEvent->buttons() & Qt::LeftButton) != 0u)) {
if ((_timerId == 0) && ((mouseEvent->buttons() & Qt::LeftButton) != 0U)) {
_timerId = startTimer(100);
}
}
......@@ -71,7 +71,7 @@ bool AutoScrollHandler::eventFilter(QObject* watched, QEvent* event)
}
case QEvent::MouseButtonRelease: {
auto* mouseEvent = static_cast<QMouseEvent*>(event);
if ((_timerId != 0) && ((mouseEvent->buttons() & ~Qt::LeftButton) != 0u)) {
if ((_timerId != 0) && ((mouseEvent->buttons() & ~Qt::LeftButton) != 0U)) {
killTimer(_timerId);
_timerId = 0;
}
......
......@@ -1666,10 +1666,10 @@ void EditProfileDialog::setupAdvancedPage(const Profile::Ptr &profile)
// Setup the URL hints modifier checkboxes
{
auto modifiers = profile->property<int>(Profile::UrlHintsModifiers);
_advancedUi->urlHintsModifierShift->setChecked((modifiers &Qt::ShiftModifier) != 0u);
_advancedUi->urlHintsModifierCtrl->setChecked((modifiers &Qt::ControlModifier) != 0u);
_advancedUi->urlHintsModifierAlt->setChecked((modifiers &Qt::AltModifier) != 0u);
_advancedUi->urlHintsModifierMeta->setChecked((modifiers &Qt::MetaModifier) != 0u);
_advancedUi->urlHintsModifierShift->setChecked((modifiers &Qt::ShiftModifier) != 0U);
_advancedUi->urlHintsModifierCtrl->setChecked((modifiers &Qt::ControlModifier) != 0U);
_advancedUi->urlHintsModifierAlt->setChecked((modifiers &Qt::AltModifier) != 0U);
_advancedUi->urlHintsModifierMeta->setChecked((modifiers &Qt::MetaModifier) != 0U);
connect(_advancedUi->urlHintsModifierShift, &QCheckBox::toggled, this, &EditProfileDialog::updateUrlHintsModifier);
connect(_advancedUi->urlHintsModifierCtrl, &QCheckBox::toggled, this, &EditProfileDialog::updateUrlHintsModifier);
connect(_advancedUi->urlHintsModifierAlt, &QCheckBox::toggled, this, &EditProfileDialog::updateUrlHintsModifier);
......
......@@ -111,7 +111,7 @@ bool HistoryScrollFile::isWrappedLine(int lineno)
unsigned char flag = 0;
_lineflags.get(reinterpret_cast<char *>(&flag), sizeof(unsigned char),
(lineno)*sizeof(unsigned char));
return flag != 0u;
return flag != 0U;
}
return false;
}
......
......@@ -606,11 +606,11 @@ QByteArray KeyboardTranslator::Entry::unescape(const QByteArray &text) const
void KeyboardTranslator::Entry::insertModifier(QString &item, int modifier) const
{
if ((modifier & _modifierMask) == 0u) {
if ((modifier & _modifierMask) == 0U) {
return;
}
if ((modifier & _modifiers) != 0u) {
if ((modifier & _modifiers) != 0U) {
item += QLatin1Char('+');
} else {
item += QLatin1Char('-');
......
......@@ -294,7 +294,7 @@ void Part::overrideTerminalShortcut(QKeyEvent *event, bool &override)
// Shift+Insert is commonly used as the alternate shortcut for
// pasting in KDE apps(including konsole), so it deserves some
// special treatment.
if (((event->modifiers() & Qt::ShiftModifier) != 0u)
if (((event->modifiers() & Qt::ShiftModifier) != 0U)
&& (event->key() == Qt::Key_Insert)) {
override = false;
return;
......
......@@ -131,8 +131,8 @@ bool Pty::flowControlEnabled() const
if (pty()->masterFd() >= 0) {
struct ::termios ttmode;
pty()->tcGetAttr(&ttmode);
return ((ttmode.c_iflag & IXOFF) != 0u)
&& ((ttmode.c_iflag & IXON) != 0u);
return ((ttmode.c_iflag & IXOFF) != 0U)
&& ((ttmode.c_iflag & IXON) != 0U);
} else {
qCDebug(KonsoleDebug) << "Unable to get flow control status, terminal not connected.";
return _xonXoff;
......
......@@ -1245,7 +1245,7 @@ QString Screen::text(int startIndex, int endIndex, const DecodingOptions options
PlainTextDecoder plainTextDecoder;
TerminalCharacterDecoder *decoder;
if((options & ConvertToHtml) != 0u) {
if((options & ConvertToHtml) != 0U) {
decoder = &htmlDecoder;
} else {
decoder = &plainTextDecoder;
......@@ -1427,7 +1427,7 @@ int Screen::copyLineToStream(int line ,
}
}
if ((options & TrimLeadingWhitespace) != 0u) {
if ((options & TrimLeadingWhitespace) != 0U) {
int spacesCount = 0;
for (spacesCount = 0; spacesCount < count; spacesCount++) {
if (QChar::category(characterBuffer[spacesCount].character) != QChar::Category::Separator_Space) {
......
......@@ -291,20 +291,20 @@ void Vt102Emulation::initTokenizer()
for (i = 32; i < 256; ++i) {
charClass[i] |= CHR;
}
for (s = (quint8 *)"@ABCDEFGHILMPSTXZbcdfry"; *s != 0u; ++s) {
for (s = (quint8 *)"@ABCDEFGHILMPSTXZbcdfry"; *s != 0U; ++s) {
charClass[*s] |= CPN;
}
// resize = \e[8;<row>;<col>t
for (s = (quint8 *)"t"; *s != 0u; ++s) {
for (s = (quint8 *)"t"; *s != 0U; ++s) {
charClass[*s] |= CPS;
}
for (s = (quint8 *)"0123456789"; *s != 0u; ++s) {
for (s = (quint8 *)"0123456789"; *s != 0U; ++s) {
charClass[*s] |= DIG;
}
for (s = (quint8 *)"()+*%"; *s != 0u; ++s) {
for (s = (quint8 *)"()+*%"; *s != 0U; ++s) {
charClass[*s] |= SCS;
}
for (s = (quint8 *)"()+*#[]%"; *s != 0u; ++s) {
for (s = (quint8 *)"()+*#[]%"; *s != 0U; ++s) {
charClass[*s] |= GRP;
}
......@@ -1145,13 +1145,13 @@ void Vt102Emulation::sendKeyEvent(QKeyEvent *event)
if (getMode(MODE_AppScreen)) {
states |= KeyboardTranslator::AlternateScreenState;
}
if (getMode(MODE_AppKeyPad) && ((modifiers &Qt::KeypadModifier) != 0u)) {
if (getMode(MODE_AppKeyPad) && ((modifiers &Qt::KeypadModifier) != 0U)) {
states |= KeyboardTranslator::ApplicationKeypadState;
}
if (!isReadOnly) {
// check flow control state
if ((modifiers &Qt::ControlModifier) != 0u) {
if ((modifiers &Qt::ControlModifier) != 0U) {
switch (event->key()) {
case Qt::Key_S:
emit flowControlKeyPressed(true);
......@@ -1178,17 +1178,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 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