tslib: initialize members in declaration
Change-Id: I887d0c82a4819712ea3d908df745516186aa76f0 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
79f17db879
commit
a2fda801cc
@ -57,7 +57,7 @@ QTsLibMouseHandler::QTsLibMouseHandler(const QString &key,
|
||||
const QString &specification,
|
||||
QObject *parent)
|
||||
: QObject(parent),
|
||||
m_notify(0), m_x(0), m_y(0), m_pressed(0), m_rawMode(false)
|
||||
m_rawMode(!key.compare(QLatin1String("TslibRaw"), Qt::CaseInsensitive))
|
||||
{
|
||||
qCDebug(qLcTsLib) << "Initializing tslib plugin" << key << specification;
|
||||
setObjectName(QLatin1String("TSLib Mouse Handler"));
|
||||
@ -79,8 +79,6 @@ QTsLibMouseHandler::QTsLibMouseHandler(const QString &key,
|
||||
if (ts_config(m_dev))
|
||||
qErrnoWarning(errno, "ts_config() failed");
|
||||
|
||||
m_rawMode = !key.compare(QLatin1String("TslibRaw"), Qt::CaseInsensitive);
|
||||
|
||||
int fd = ts_fd(m_dev);
|
||||
if (fd >= 0) {
|
||||
qCDebug(qLcTsLib) << "tslib device is" << device;
|
||||
|
@ -71,11 +71,12 @@ private slots:
|
||||
void readMouseData();
|
||||
|
||||
private:
|
||||
QSocketNotifier * m_notify;
|
||||
QSocketNotifier * m_notify = nullptr;
|
||||
tsdev *m_dev;
|
||||
int m_x, m_y;
|
||||
bool m_pressed;
|
||||
bool m_rawMode;
|
||||
int m_x = 0;
|
||||
int m_y = 0;
|
||||
bool m_pressed = false;
|
||||
const bool m_rawMode;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
x
Reference in New Issue
Block a user