Windows: initialize COM in internal thread
The QWindowsDialogThread uses COM APIs, so we need to initialize COM. Task-number: QTBUG-111625 Pick-to: 6.5 6.2 Change-Id: Ief136ee70671034cb8996ab2f5b113e3884d2953 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
f7ea9b36b7
commit
d115aa90a2
@ -31,6 +31,7 @@
|
|||||||
#include <QtCore/qmutex.h>
|
#include <QtCore/qmutex.h>
|
||||||
#include <QtCore/quuid.h>
|
#include <QtCore/quuid.h>
|
||||||
#include <QtCore/qtemporaryfile.h>
|
#include <QtCore/qtemporaryfile.h>
|
||||||
|
#include <QtCore/private/qfunctions_win_p.h>
|
||||||
#include <QtCore/private/qsystemerror_p.h>
|
#include <QtCore/private/qsystemerror_p.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -257,6 +258,7 @@ private:
|
|||||||
void QWindowsDialogThread::run()
|
void QWindowsDialogThread::run()
|
||||||
{
|
{
|
||||||
qCDebug(lcQpaDialogs) << '>' << __FUNCTION__;
|
qCDebug(lcQpaDialogs) << '>' << __FUNCTION__;
|
||||||
|
QComHelper comInit(COINIT_APARTMENTTHREADED);
|
||||||
m_dialog->exec(m_owner);
|
m_dialog->exec(m_owner);
|
||||||
qCDebug(lcQpaDialogs) << '<' << __FUNCTION__;
|
qCDebug(lcQpaDialogs) << '<' << __FUNCTION__;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user