Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.14.0
-
None
Description
qnetconmonitor_win.cpp uses CoInitialize while qwindowstheme.cpp uses CoInitializeEx. The result is "Cannot change thread mode after it is set".
I found a commit (https://github.com/qt/qtbase/commit/19e45ee4c1007ddb9de4c0be9c4423e75ebe9330) which changed the qnetconmonitor_win.cpp code from CoInitializeEx to CoInitialize for precisely the reason of matching it to the qwindowstheme.cpp code. I'm guessing (haven't looked up the other commit) that someone thought of doing the same in the other file, and the result is a mismatch in the other direction.
Would be nice to make a decision about which style to use and use that consistently.
Edit: Upon looking further, it looks like qwindowstheme.cpp itself uses CoInitializeEx in run() and CoInitialize in QWindowsFileIconEngine::filePixmap.