mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
ktouchpadenabler: compiler warning fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9b1959830c
commit
e62863f60d
1 changed files with 11 additions and 2 deletions
|
@ -39,12 +39,12 @@ class TouchpadEnablerDaemonPrivate : public QWidget
|
|||
TouchpadEnablerDaemonPrivate();
|
||||
~TouchpadEnablerDaemonPrivate();
|
||||
|
||||
bool initSuccessful() const { return m_keyCode != 0; }
|
||||
bool initSuccessful() const;
|
||||
|
||||
bool x11Event(XEvent *event);
|
||||
|
||||
private:
|
||||
enum TouchpadKey { ToggleKey = 0, OnKey, OffKey };
|
||||
enum TouchpadKey { ToggleKey = 0, OnKey = 1, OffKey = 2 };
|
||||
static const int nKeys = OffKey + 1;
|
||||
|
||||
bool getEnabled(bool *currentValue) const;
|
||||
|
@ -144,6 +144,15 @@ TouchpadEnablerDaemonPrivate::~TouchpadEnablerDaemonPrivate()
|
|||
}
|
||||
}
|
||||
|
||||
bool TouchpadEnablerDaemonPrivate::initSuccessful() const {
|
||||
for (int i = 0; i < nKeys; ++i) {
|
||||
if (m_keyCode[i] == 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TouchpadEnablerDaemonPrivate::x11Event(XEvent *event)
|
||||
{
|
||||
if (event->type == KeyPress) {
|
||||
|
|
Loading…
Add table
Reference in a new issue