1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

remove useless code

opencv uses exceptions for error handling
This commit is contained in:
sudden6 2015-05-11 15:01:09 +02:00 committed by tux3
parent 1506a9a30e
commit e3eb4ea503

View File

@ -87,14 +87,6 @@ void logMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QSt
#endif
}
int opencvErrorHandler(int status, const char* func_name, const char* err_msg,
const char* file_name, int line, void*)
{
qWarning() << "OpenCV: ERROR ("<<status<<") in "
<<file_name<<":"<<line<<":"<<func_name<<": "<<err_msg;
return 0;
}
int main(int argc, char *argv[])
{
qInstallMessageHandler(logMessageHandler); // Enable log as early as possible
@ -163,9 +155,6 @@ int main(int argc, char *argv[])
qDebug() << "built on: " << __TIME__ << __DATE__ << "(" << TIMESTAMP << ")";
qDebug() << "commit: " << GIT_VERSION << "\n";
cvSetErrMode(CV_ErrModeParent);
cvRedirectError(opencvErrorHandler);
#if defined(Q_OS_MACX) && defined(QT_RELEASE)
if (qApp->applicationDirPath() != "/Applications/qtox.app/Contents/MacOS") {
qDebug() << "OS X: Not in Applications folder";