comparison common.cpp @ 105:1928f9b408e6

* Better-behaved comment dialog; avoid empty comments. Also ignore signals from closing ptys
author Chris Cannam
date Thu, 25 Nov 2010 17:21:32 +0000
parents 7ed57064f293
children 4bd17f36d059
comparison
equal deleted inserted replaced
104:af314dd436d5 105:1928f9b408e6
35 #include <unistd.h> 35 #include <unistd.h>
36 #include <sys/ioctl.h> 36 #include <sys/ioctl.h>
37 #include <sys/types.h> 37 #include <sys/types.h>
38 #include <sys/stat.h> 38 #include <sys/stat.h>
39 #include <fcntl.h> 39 #include <fcntl.h>
40 #include <signal.h>
40 #endif 41 #endif
41 42
42 QString findExecutable(QString name) 43 QString findExecutable(QString name)
43 { 44 {
44 bool found = false; 45 bool found = false;
180 } 181 }
181 182
182 #endif 183 #endif
183 } 184 }
184 185
186 void installSignalHandlers()
187 {
188 #ifndef Q_OS_WIN32
189 sigset_t sgnals;
190 sigemptyset (&sgnals);
191 sigaddset(&sgnals, SIGHUP);
192 sigaddset(&sgnals, SIGCONT);
193 pthread_sigmask(SIG_BLOCK, &sgnals, 0);
194 #endif
195 }
196
185 FolderStatus getFolderStatus(QString path) 197 FolderStatus getFolderStatus(QString path)
186 { 198 {
187 if (path != "/" && path.endsWith("/")) { 199 if (path != "/" && path.endsWith("/")) {
188 path = path.left(path.length()-1); 200 path = path.left(path.length()-1);
189 } 201 }