Diffstat (limited to 'noncore/apps/opie-console/io_serial.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/io_serial.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp index 03f1b1a..a4a6f0b 100644 --- a/noncore/apps/opie-console/io_serial.cpp +++ b/noncore/apps/opie-console/io_serial.cpp | |||
@@ -27,7 +27,6 @@ void IOSerial::send(const QByteArray &data) { | |||
27 | } | 27 | } |
28 | 28 | ||
29 | void IOSerial::close() { | 29 | void IOSerial::close() { |
30 | qWarning("closing!"); | ||
31 | if (m_fd) { | 30 | if (m_fd) { |
32 | delete m_read; | 31 | delete m_read; |
33 | delete m_error; | 32 | delete m_error; |
@@ -39,13 +38,10 @@ void IOSerial::close() { | |||
39 | } | 38 | } |
40 | 39 | ||
41 | bool IOSerial::open() { | 40 | bool IOSerial::open() { |
42 | qWarning("open"); | ||
43 | if (!m_fd) { | 41 | if (!m_fd) { |
44 | qWarning("going to open %s", m_device.latin1()); | ||
45 | struct termios tty; | 42 | struct termios tty; |
46 | m_fd = ::open(m_device, O_RDWR | O_NOCTTY | O_NONBLOCK); | 43 | m_fd = ::open(m_device, O_RDWR | O_NOCTTY | O_NONBLOCK); |
47 | if (m_fd < 0) { | 44 | if (m_fd < 0) { |
48 | qWarning(" fd < 0 "); | ||
49 | emit error(CouldNotOpen, strerror(errno)); | 45 | emit error(CouldNotOpen, strerror(errno)); |
50 | return FALSE; | 46 | return FALSE; |
51 | } | 47 | } |
@@ -54,7 +50,6 @@ bool IOSerial::open() { | |||
54 | /* Baud rate */ | 50 | /* Baud rate */ |
55 | int speed = baud(m_baud); | 51 | int speed = baud(m_baud); |
56 | if (speed == -1) { | 52 | if (speed == -1) { |
57 | qWarning("speed -1"); | ||
58 | emit error(Refuse, tr("Invalid baud rate")); | 53 | emit error(Refuse, tr("Invalid baud rate")); |
59 | } | 54 | } |
60 | cfsetospeed(&tty, speed); | 55 | cfsetospeed(&tty, speed); |
@@ -118,7 +113,6 @@ bool IOSerial::open() { | |||
118 | connect(m_error, SIGNAL(activated(int)), this, SLOT(errorOccured())); | 113 | connect(m_error, SIGNAL(activated(int)), this, SLOT(errorOccured())); |
119 | return TRUE; | 114 | return TRUE; |
120 | } else { | 115 | } else { |
121 | qWarning(" already opened"); | ||
122 | emit error(Refuse, tr("Device is already connected")); | 116 | emit error(Refuse, tr("Device is already connected")); |
123 | m_fd = 0; | 117 | m_fd = 0; |
124 | return FALSE; | 118 | return FALSE; |
@@ -127,8 +121,6 @@ bool IOSerial::open() { | |||
127 | 121 | ||
128 | void IOSerial::reload(const Profile &config) { | 122 | void IOSerial::reload(const Profile &config) { |
129 | m_device = config.readEntry("Device", SERIAL_DEFAULT_DEVICE); | 123 | m_device = config.readEntry("Device", SERIAL_DEFAULT_DEVICE); |
130 | qWarning( "Dev" +m_device ); | ||
131 | qWarning( "Conf:" +config.readEntry("Device") ); | ||
132 | m_baud = config.readNumEntry("Speed", SERIAL_DEFAULT_BAUD); | 124 | m_baud = config.readNumEntry("Speed", SERIAL_DEFAULT_BAUD); |
133 | m_parity = config.readNumEntry("Parity", SERIAL_DEFAULT_PARITY); | 125 | m_parity = config.readNumEntry("Parity", SERIAL_DEFAULT_PARITY); |
134 | m_dbits = config.readNumEntry("DataBits", SERIAL_DEFAULT_DBITS); | 126 | m_dbits = config.readNumEntry("DataBits", SERIAL_DEFAULT_DBITS); |