Add static_cast to show conversions

wilder-portage
Kurt Hindenburg 9 years ago
parent e4b9622372
commit 49f6216e6a
  1. 6
      src/ColorScheme.cpp
  2. 2
      src/Emulation.cpp
  3. 2
      src/ProcessInfo.cpp
  4. 2
      src/TerminalDisplay.cpp

@ -368,9 +368,9 @@ void ColorScheme::readColorEntry(const KConfig& config , int index)
setColorTableEntry(index , entry);
const quint16 hue = configGroup.readEntry("MaxRandomHue", 0);
const quint8 value = configGroup.readEntry("MaxRandomValue", 0);
const quint8 saturation = configGroup.readEntry("MaxRandomSaturation", 0);
const quint16 hue = static_cast<quint16>(configGroup.readEntry("MaxRandomHue", 0));
const quint8 value = static_cast<quint8>(configGroup.readEntry("MaxRandomValue", 0));
const quint8 saturation = static_cast<quint8>(configGroup.readEntry("MaxRandomSaturation", 0));
if (hue != 0 || value != 0 || saturation != 0)
setRandomizationRange(index , hue , saturation , value);

@ -187,7 +187,7 @@ void Emulation::receiveChar(int c)
case '\n' : _currentScreen->newLine(); break;
case '\r' : _currentScreen->toStartOfLine(); break;
case 0x07 : emit stateSet(NOTIFYBELL); break;
default : _currentScreen->displayCharacter(c); break;
default : _currentScreen->displayCharacter(static_cast<unsigned short int>(c)); break;
}
}

@ -406,7 +406,7 @@ protected:
char path_buffer[MAXPATHLEN + 1];
path_buffer[MAXPATHLEN] = 0;
QByteArray procCwd = QFile::encodeName(QStringLiteral("/proc/%1/cwd").arg(aPid));
const int length = readlink(procCwd.constData(), path_buffer, MAXPATHLEN);
const int length = static_cast<int>(readlink(procCwd.constData(), path_buffer, MAXPATHLEN));
if (length == -1) {
setError(UnknownError);
return false;

@ -2512,7 +2512,7 @@ void TerminalDisplay::wheelEvent(QWheelEvent* ev)
// of mouse wheel rotation. Mouse wheels typically move in steps of 15 degrees,
// giving a scroll of 3 lines
const int lines = _scrollWheelState.consumeSteps(_fontHeight * qApp->devicePixelRatio(), ScrollState::degreesToAngle(5));
const int lines = _scrollWheelState.consumeSteps(static_cast<int>(_fontHeight * qApp->devicePixelRatio()), ScrollState::degreesToAngle(5));
const int keyCode = lines > 0 ? Qt::Key_Up : Qt::Key_Down;
QKeyEvent keyEvent(QEvent::KeyPress, keyCode, Qt::NoModifier);

Loading…
Cancel
Save