Fix unused-parameter warnings as reported by GCC

This commit is contained in:
Martin Flöser 2017-07-28 21:31:09 +02:00
parent e8a92361ae
commit 8527ac30dc
5 changed files with 8 additions and 4 deletions

View file

@ -74,6 +74,7 @@ Qt::GlobalColor TouchPointsEffect::colorForId(quint32 id)
bool TouchPointsEffect::touchDown(quint32 id, const QPointF &pos, quint32 time) bool TouchPointsEffect::touchDown(quint32 id, const QPointF &pos, quint32 time)
{ {
Q_UNUSED(time)
TouchPoint point; TouchPoint point;
point.pos = pos; point.pos = pos;
point.press = true; point.press = true;
@ -86,6 +87,7 @@ bool TouchPointsEffect::touchDown(quint32 id, const QPointF &pos, quint32 time)
bool TouchPointsEffect::touchMotion(quint32 id, const QPointF &pos, quint32 time) bool TouchPointsEffect::touchMotion(quint32 id, const QPointF &pos, quint32 time)
{ {
Q_UNUSED(time)
TouchPoint point; TouchPoint point;
point.pos = pos; point.pos = pos;
point.press = true; point.press = true;
@ -98,6 +100,7 @@ bool TouchPointsEffect::touchMotion(quint32 id, const QPointF &pos, quint32 time
bool TouchPointsEffect::touchUp(quint32 id, quint32 time) bool TouchPointsEffect::touchUp(quint32 id, quint32 time)
{ {
Q_UNUSED(time)
auto it = m_latestPositions.constFind(id); auto it = m_latestPositions.constFind(id);
if (it != m_latestPositions.constEnd()) { if (it != m_latestPositions.constEnd()) {
TouchPoint point; TouchPoint point;

View file

@ -245,7 +245,7 @@ bool processShortcut(Qt::KeyboardModifiers mods, T key, U &shortcuts)
return true; return true;
} }
bool GlobalShortcutsManager::processKey(Qt::KeyboardModifiers mods, uint32_t key, int keyQt) bool GlobalShortcutsManager::processKey(Qt::KeyboardModifiers mods, int keyQt)
{ {
if (m_kglobalAccelInterface) { if (m_kglobalAccelInterface) {
auto check = [this] (Qt::KeyboardModifiers mods, int keyQt) { auto check = [this] (Qt::KeyboardModifiers mods, int keyQt) {

View file

@ -79,11 +79,10 @@ public:
* @c false is returned. * @c false is returned.
* *
* @param modifiers The current hold modifiers * @param modifiers The current hold modifiers
* @param key The keysymbol which has been pressed
* @param keyQt The Qt::Key which got pressed * @param keyQt The Qt::Key which got pressed
* @return @c true if a shortcut triggered, @c false otherwise * @return @c true if a shortcut triggered, @c false otherwise
*/ */
bool processKey(Qt::KeyboardModifiers modifiers, uint32_t key, int keyQt); bool processKey(Qt::KeyboardModifiers modifiers, int keyQt);
bool processPointerPressed(Qt::KeyboardModifiers modifiers, Qt::MouseButtons pointerButtons); bool processPointerPressed(Qt::KeyboardModifiers modifiers, Qt::MouseButtons pointerButtons);
/** /**
* @brief Processes a pointer axis event to decide whether a shortcut needs to be triggered. * @brief Processes a pointer axis event to decide whether a shortcut needs to be triggered.

View file

@ -734,7 +734,7 @@ public:
} }
bool keyEvent(QKeyEvent *event) override { bool keyEvent(QKeyEvent *event) override {
if (event->type() == QEvent::KeyPress) { if (event->type() == QEvent::KeyPress) {
return input()->shortcuts()->processKey(static_cast<KeyEvent*>(event)->modifiersRelevantForGlobalShortcuts(), event->nativeVirtualKey(), event->key()); return input()->shortcuts()->processKey(static_cast<KeyEvent*>(event)->modifiersRelevantForGlobalShortcuts(), event->key());
} }
return false; return false;
} }
@ -1950,6 +1950,7 @@ Qt::KeyboardModifiers InputRedirection::modifiersRelevantForGlobalShortcuts() co
void InputRedirection::registerShortcut(const QKeySequence &shortcut, QAction *action) void InputRedirection::registerShortcut(const QKeySequence &shortcut, QAction *action)
{ {
Q_UNUSED(shortcut)
kwinApp()->platform()->setupActionForGlobalAccel(action); kwinApp()->platform()->setupActionForGlobalAccel(action);
} }

View file

@ -222,6 +222,7 @@ bool GLShader::link()
const QByteArray GLShader::prepareSource(GLenum shaderType, const QByteArray &source) const const QByteArray GLShader::prepareSource(GLenum shaderType, const QByteArray &source) const
{ {
Q_UNUSED(shaderType)
// Prepare the source code // Prepare the source code
QByteArray ba; QByteArray ba;
if (GLPlatform::instance()->isGLES() && GLPlatform::instance()->glslVersion() < kVersionNumber(3, 0)) { if (GLPlatform::instance()->isGLES() && GLPlatform::instance()->glslVersion() < kVersionNumber(3, 0)) {