diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2012-05-31 08:53:24 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-31 17:49:50 +0200 |
commit | 115f45ff41095057d44a174a7437c3ac1a8a3762 (patch) | |
tree | 58d6e55c4995bde1f174e781d6d9ecd3fb9ff1bc /src/plugins/generic | |
parent | 56cfd5d83f4108c8f470d8776d323321592e8255 (diff) |
Prevent evdevkeyboard file opening from failing
On many systems the device nodes will not be writable normally. There
is no reason to open for writing in any case. Also switched back to
non-blocking I/O.
Change-Id: I9290e6b1ce7e3bc6cb0e75069b3968f647ffbeee
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src/plugins/generic')
-rw-r--r-- | src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.cpp index 5574457fac..c963606305 100644 --- a/src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.cpp +++ b/src/plugins/generic/evdevkeyboard/qevdevkeyboardhandler.cpp @@ -124,7 +124,7 @@ QEvdevKeyboardHandler *QEvdevKeyboardHandler::create(const QString &device, cons #endif int fd; - fd = qt_safe_open(device.toLocal8Bit().constData(), O_RDWR, 0); + fd = qt_safe_open(device.toLocal8Bit().constData(), O_RDONLY | O_NDELAY, 0); if (fd >= 0) { if (repeatDelay > 0 && repeatRate > 0) { int kbdrep[2] = { repeatDelay, repeatRate }; |