mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
parent
ea7c3a9a80
commit
641fc8c776
11
src/main.cpp
11
src/main.cpp
|
@ -30,6 +30,7 @@
|
|||
#include <QFontDatabase>
|
||||
#include <QMutexLocker>
|
||||
#include <QProcess>
|
||||
#include <opencv2/core/core.hpp>
|
||||
|
||||
#include <sodium.h>
|
||||
|
||||
|
@ -61,6 +62,14 @@ void myMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QStr
|
|||
}
|
||||
#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[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
@ -128,6 +137,8 @@ int main(int argc, char *argv[])
|
|||
qDebug() << "built on: " << __TIME__ << __DATE__ << "(" << TIMESTAMP << ")";
|
||||
qDebug() << "commit: " << GIT_VERSION << "\n";
|
||||
|
||||
cv::redirectError(opencvErrorHandler);
|
||||
|
||||
#ifdef Q_OS_MACX
|
||||
if (qApp->applicationDirPath() != "/Applications/qtox.app/Contents/MacOS") {
|
||||
qDebug() << "OS X: Not in Applications folder";
|
||||
|
|
Loading…
Reference in New Issue
Block a user