git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@281 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
parent
19b5776ba4
commit
d2946cac3b
19
app/main.cpp
19
app/main.cpp
@ -7,8 +7,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
void my_handler(int s){
|
void my_handler(int s){
|
||||||
printf("Ctrl-C caught! Quitting application...\n");
|
printf("\nCtrl-C caught! Quitting application...\n");
|
||||||
QApplication::closeAllWindows();
|
|
||||||
QApplication::quit();
|
QApplication::quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,13 +132,15 @@ int main(int argc, char* argv[])
|
|||||||
mainWindow.startProcessing();
|
mainWindow.startProcessing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!guiMode)
|
||||||
// Catch ctrl-c to close the gui
|
{
|
||||||
struct sigaction sigIntHandler;
|
// Catch ctrl-c to close the gui
|
||||||
sigIntHandler.sa_handler = my_handler;
|
struct sigaction sigIntHandler;
|
||||||
sigemptyset(&sigIntHandler.sa_mask);
|
sigIntHandler.sa_handler = my_handler;
|
||||||
sigIntHandler.sa_flags = 0;
|
sigemptyset(&sigIntHandler.sa_mask);
|
||||||
sigaction(SIGINT, &sigIntHandler, NULL);
|
sigIntHandler.sa_flags = 0;
|
||||||
|
sigaction(SIGINT, &sigIntHandler, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,7 +76,7 @@ void CameraTcpClient::displayError(QAbstractSocket::SocketError socketError)
|
|||||||
|
|
||||||
void CameraTcpClient::connectionLost()
|
void CameraTcpClient::connectionLost()
|
||||||
{
|
{
|
||||||
printf("[WARNING] CameraTcp: Connection lost!\n");
|
//printf("[WARNING] CameraTcp: Connection lost!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
Camera::Camera(QObject * parent) :
|
Camera::Camera(QObject * parent) :
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user