In catata-tags.exe set unhandled exception handler, to prevent windows crash dialog appearing.

BUG: 550
This commit is contained in:
craig.p.drummond
2014-10-04 21:17:36 +00:00
parent a732e10219
commit 8be4bf5ccf
2 changed files with 15 additions and 0 deletions

View File

@@ -74,6 +74,8 @@
52. Fix auto-marking of played downloaded podcasts when connected via a local
socket.
53. Fix playback of local files by inbuilt HTTP server.
54. In catata-tags.exe set unhandled exception handler, to prevent windows
crash dialog appearing.
1.4.2
-----

View File

@@ -29,6 +29,15 @@
#include "tags.h"
#include "taghelper.h"
#ifdef Q_OS_WIN
#include <windows.h>
static long __stdcall exceptionHandler(EXCEPTION_POINTERS *p)
{
Q_UNUSED(p)
::exit(0);
}
#endif
static QString logFileName;
static bool firstMsg=true;
#if QT_VERSION < 0x050000
@@ -50,6 +59,10 @@ static void cantataQtMsgHandler(QtMsgType, const QMessageLogContext &, const QSt
int main(int argc, char *argv[])
{
#ifdef Q_OS_WIN
// Prevent windows crash dialog from appearing...
SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)exceptionHandler);
#endif
QCoreApplication app(argc, argv);
if (3==app.arguments().length() || 4==app.arguments().length()) {
if (4==app.arguments().length()) {