Diffstat (limited to 'noncore/net/wellenreiter/gui') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index dd8a365..09a44e6 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -103,13 +103,13 @@ Wellenreiter::Wellenreiter( QWidget* parent ) } else { int flags; flags = fcntl( daemon_fd, F_GETFL, 0 ); fcntl( daemon_fd, F_SETFL, flags | O_NONBLOCK ); - QSocketNotifier *sn = new QSocketNotifier( daemon_fd, QSocketNotifier::Read, parent ); + QSocketNotifier *sn = new QSocketNotifier( daemon_fd, QSocketNotifier::Read, this ); connect( sn, SIGNAL( activated( int ) ), this, SLOT( dataReceived() ) ); } // setup GUI netview->setColumnWidthMode( 1, QListView::Manual ); @@ -121,24 +121,19 @@ Wellenreiter::Wellenreiter( QWidget* parent ) Wellenreiter::~Wellenreiter() { // no need to delete child widgets, Qt does it all for us delete manufacturerdb; - // X11-only - Hmm... Closing the socket here segfaults on exit, - // Maybe because the notifier still has a handle to it!? Seems not to - // occur on Qt/Embedded - - #ifdef QWS if ( daemon_fd != -1 ) { qDebug( "closing comm socket" ); - close( daemon_fd ); + ::shutdown( daemon_fd, 0 ); + ::close( daemon_fd ); + qDebug( "comm socket closed." ); } - #endif - } void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) { configwindow = cw; } |