Skip to content

Commit

Permalink
Make GRASS shell usable on Mac:
Browse files Browse the repository at this point in the history
- Don't close pty descriptor in child process; it make the shell ignore input.
- Don't set Q3TextEdit readOnly since this processes keys as keyboard shortcuts.
Fix for bug #739.


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7707 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Dec 3, 2007
1 parent 1085c7c commit f4915a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/grass/qgsgrassshell.cpp
Expand Up @@ -107,7 +107,10 @@ QDialog(parent), QgsGrassShellBase(), mTools(tools)

mAppDir = mTools->appDir();

#ifndef Q_WS_MAC
// Qt4.3.2/Mac Q3TextEdit readOnly property causes keys to be processed as keyboard actions
mText->setReadOnly(TRUE);
#endif
//mText->setFocusPolicy ( QWidget::NoFocus ); // To get key press directly

#ifndef HAVE_OPENPTY
Expand Down Expand Up @@ -180,7 +183,10 @@ QDialog(parent), QgsGrassShellBase(), mTools(tools)
#endif

// TODO close all opened file descriptors - close(0)???
#ifndef Q_OS_DARWIN
// Makes child process unusable on Mac
close ( mFdMaster );
#endif

//close ( fdSlave ); // -> freeze

Expand Down

0 comments on commit f4915a5

Please sign in to comment.