From 5f649d6f85f739172309fe9b174314af3dafaf08 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Mon, 30 Jun 2014 19:50:55 +0200 Subject: [PATCH] Fix crash on windows (camera) --- widget/camera.cpp | 2 ++ widget/widget.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/widget/camera.cpp b/widget/camera.cpp index c115140dd..9fedc7cf3 100644 --- a/widget/camera.cpp +++ b/widget/camera.cpp @@ -10,11 +10,13 @@ Camera::Camera() camera->setCaptureMode(QCamera::CaptureVideo); camera->setViewfinder(this); + /* CRASHES ON WINDOWS ! QMediaService *m = camera->service(); QVideoEncoderSettingsControl *enc = m->requestControl(); QVideoEncoderSettings sets = enc->videoSettings(); sets.setResolution(640, 480); enc->setVideoSettings(sets); + */ connect(camera, SIGNAL(error(QCamera::Error)), this, SLOT(onCameraError(QCamera::Error))); diff --git a/widget/widget.cpp b/widget/widget.cpp index c947ef11a..6ad1f168b 100644 --- a/widget/widget.cpp +++ b/widget/widget.cpp @@ -44,6 +44,7 @@ Widget::Widget(QWidget *parent) : qRegisterMetaType("ToxFile::FileDirection"); core = new Core(camera); + core = new Core(nullptr); coreThread = new QThread(this); core->moveToThread(coreThread); connect(coreThread, &QThread::started, core, &Core::start);