[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-desktop/amourphious/keyboard] kcms/keyboard: removed addDevices from xinput_helper
From: shivam makkar <amourphious1992 () gmail ! com>
Date: 2014-06-01 7:41:06
Message-ID: E1Wr0OA-0000SN-K1 () scm ! kde ! org
[Download RAW message or body]
Git commit bba459772c8e65ecdbb3d5b1844d94183f707b4e by shivam makkar.
Committed on 01/06/2014 at 13:10.
Pushed by makkar into branch 'amourphious/keyboard'.
removed addDevices from xinput_helper
M +2 -2 kcms/keyboard/kcm_keyboard_widget.cpp
M +2 -8 kcms/keyboard/xinput_helper.cpp
http://commits.kde.org/plasma-desktop/bba459772c8e65ecdbb3d5b1844d94183f707b4e
diff --git a/kcms/keyboard/kcm_keyboard_widget.cpp \
b/kcms/keyboard/kcm_keyboard_widget.cpp index 2840e26..9b0f584 100644
--- a/kcms/keyboard/kcm_keyboard_widget.cpp
+++ b/kcms/keyboard/kcm_keyboard_widget.cpp
@@ -21,7 +21,6 @@
#include <kactioncollection.h>
#include <kaction.h>
#include <kaboutdata.h>
-#include <kdebug.h>
#include <klocale.h>
#include <kglobalsettings.h>
#include <KGlobalAccel>
@@ -32,6 +31,7 @@
#include <QPixmap>
#include <QVBoxLayout>
#include <QX11Info>
+#include <QDebug>
#include "keyboard_config.h"
#include "preview/keyboardpainter.h"
@@ -608,7 +608,7 @@ void KCMKeyboardWidget::updateXkbShortcutButton(const QString& \
groupName, QPushB const OptionGroupInfo* optionGroupInfo = \
rules->getOptionGroupInfo(groupName); const OptionInfo* optionInfo = \
optionGroupInfo->getOptionInfo(option); if( optionInfo == NULL || \
optionInfo->description == NULL ) {
- kError() << "Could not find option info for " << option;
+ qDebug() << "Could not find option info for " << option;
button->setText(grpOptions.first());
}
else {
diff --git a/kcms/keyboard/xinput_helper.cpp b/kcms/keyboard/xinput_helper.cpp
index 1c9604b..2b374ae 100644
--- a/kcms/keyboard/xinput_helper.cpp
+++ b/kcms/keyboard/xinput_helper.cpp
@@ -38,7 +38,6 @@ static int DEVICE_NONE = 0;
static int DEVICE_KEYBOARD = 1;
static int DEVICE_POINTER = 2;
static int connectedDevices;
-static int addedDevices = 0;
XInputEventNotifier::XInputEventNotifier(QWidget* parent):
@@ -103,8 +102,7 @@ int \
XInputEventNotifier::getNewDeviceEventType(xcb_generic_event_t* event) int \
newDeviceType = DEVICE_NONE; int ndevices;
XDeviceInfo *devices = XListInputDevices(QX11Info::display(), &ndevices);
- if((ndevices > connectedDevices && addedDevices < 20)){
- addedDevices++;
+ if((ndevices > connectedDevices)){
qDebug() << "id:" << devices[ndevices - 1].id << "name:" << devices[ndevices \
- 1].name << "used as:" << devices[ndevices-1].use;
if( devices[ndevices - 1].use == IsXKeyboard || devices[ndevices - 1].use == \
IsXExtensionKeyboard ) { if( isRealKeyboard(devices[ndevices - 1].name) ) {
@@ -116,14 +114,10 @@ int \
XInputEventNotifier::getNewDeviceEventType(xcb_generic_event_t* event) newDeviceType \
= DEVICE_POINTER;
qDebug() << "new pointer device, id:" << devices[ndevices - 1].id << \
"name:" << devices[ndevices - 1].name << "used as:" << devices[ndevices - 1].use; }
- }
- else{
connectedDevices = ndevices;
- addedDevices = 0;
}
- if(addedDevices == 20){
+ else{
connectedDevices = ndevices;
- addedDevices = 0;
}
return newDeviceType;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic