author | zecke <zecke> | 2002-10-15 13:02:56 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-15 13:02:56 (UTC) |
commit | 09ba4d2c79a41b185902519639032a49c85deadb (patch) (unidiff) | |
tree | f1d9676bf3401bb93e527c8608a9307bf4adf244 /noncore/apps/opie-console/MyPty.cpp | |
parent | b555d0c687db83cde89f1a75fccbd59723878621 (diff) | |
download | opie-09ba4d2c79a41b185902519639032a49c85deadb.zip opie-09ba4d2c79a41b185902519639032a49c85deadb.tar.gz opie-09ba4d2c79a41b185902519639032a49c85deadb.tar.bz2 |
Add a Feature Support BitArray to the IOLayer
This way we know what an IOLayer supports
Adjust IOSerial and MyPty to that change
Fix the after close window the previous session
window is empty bug
in Mainwindow::remove we had a problem
first we removed the currentSession from the tab and then
deleted the session
The problem is that removePage on OTabWidget does signal currentChanged
so we did not delete the session intended but the wrong one
because m_curSession got adjusted after a removePage...
3rd fix the close and reopen bug in MyPty
Diffstat (limited to 'noncore/apps/opie-console/MyPty.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/MyPty.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp index b6ae1d9..565d03f 100644 --- a/noncore/apps/opie-console/MyPty.cpp +++ b/noncore/apps/opie-console/MyPty.cpp | |||
@@ -119,3 +119,5 @@ void MyPty::donePty() | |||
119 | delete m_sn_e; | 119 | delete m_sn_e; |
120 | delete m_sn_r; | ||
120 | m_sn_e = 0l; | 121 | m_sn_e = 0l; |
122 | m_sn_r = 0l; | ||
121 | } | 123 | } |
@@ -123,2 +125,3 @@ void MyPty::donePty() | |||
123 | m_cpid = 0; | 125 | m_cpid = 0; |
126 | m_fd = -1; | ||
124 | // emit done(status); | 127 | // emit done(status); |
@@ -187,6 +190,7 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int) | |||
187 | // parent - continue as a widget | 190 | // parent - continue as a widget |
188 | QSocketNotifier* sn_r = new QSocketNotifier(m_fd,QSocketNotifier::Read,this); | 191 | delete m_sn_r; |
192 | m_sn_r = new QSocketNotifier(m_fd,QSocketNotifier::Read,this); | ||
189 | delete m_sn_e; | 193 | delete m_sn_e; |
190 | m_sn_e = new QSocketNotifier(m_fd,QSocketNotifier::Exception,this); | 194 | m_sn_e = new QSocketNotifier(m_fd,QSocketNotifier::Exception,this); |
191 | connect(sn_r,SIGNAL(activated(int)),this,SLOT(readPty())); | 195 | connect(m_sn_r,SIGNAL(activated(int)),this,SLOT(readPty())); |
192 | connect(m_sn_e,SIGNAL(activated(int)),this,SLOT(error())); | 196 | connect(m_sn_e,SIGNAL(activated(int)),this,SLOT(error())); |
@@ -223,3 +227,3 @@ int MyPty::openPty() | |||
223 | if ( ptyfd < 0 ) { | 227 | if ( ptyfd < 0 ) { |
224 | qApp->exit(1); | 228 | //qApp->exit(1); |
225 | return -1; | 229 | return -1; |
@@ -236,2 +240,3 @@ MyPty::MyPty(const Profile&) : m_cpid(0) | |||
236 | m_sn_e = 0l; | 240 | m_sn_e = 0l; |
241 | m_sn_r = 0l; | ||
237 | m_fd = openPty(); | 242 | m_fd = openPty(); |
@@ -256,2 +261,5 @@ QString MyPty::name()const{ | |||
256 | bool MyPty::open() { | 261 | bool MyPty::open() { |
262 | if (m_fd < 0) | ||
263 | m_fd = openPty(); | ||
264 | |||
257 | start(); | 265 | start(); |
@@ -261,2 +269,3 @@ void MyPty::close() { | |||
261 | donePty(); | 269 | donePty(); |
270 | m_fd = openPty(); | ||
262 | } | 271 | } |
@@ -288,3 +297,2 @@ void MyPty::readPty() | |||
288 | donePty(); | 297 | donePty(); |
289 | delete sender(); | ||
290 | return; | 298 | return; |
@@ -308,2 +316,9 @@ void MyPty::readPty() | |||
308 | } | 316 | } |
317 | QBitArray MyPty::supports()const { | ||
318 | QBitArray ar(3); | ||
319 | ar[0] = 1; | ||
320 | ar[1] = 0; | ||
321 | ar[2] = 0; | ||
309 | 322 | ||
323 | return ar; | ||
324 | } | ||