Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.4.0
-
None
-
Windows 7 Professional, Microsoft Visual Studio 2012, x64, built from primary GIT 3.4.0 master branch using QMAKE and JOM from x64 visual studio command prompt.
-
9724cf6891f7b2812713c89dc89782ca5ad60314
Description
Re: Visual Studio 2012, x64 build of Qt Creator 3.4.0 (otherwise I would just use a prepackaged binary). Possible bug in help plugin source, helpplugin.cpp
My current task requires me to build without the qt web kit. Therefore line 385 of helpplugin.cpp assures that a default contstructed factory that does nothing will be used... that results in a crash on line 390 when the functor of a NULL pointer is used.
I.E.
Line 385 constructs a default factory object. (That's what QHash::value() does when something isn't in the map) Therefore when testing on 386, the if(!factory) test fails and a TextBrowserHelpViewer() factory is never assigned to the factory function pointer. Furthermore, the QTC_ASSERT macro fails to capture the error as well since the map instanced a valid ViewerFactory base instance that does nothing.
Suggest using safer if(!factory && factories.contains(QLatin1String("qtwebkit")) instead of if(!factory) on line 384. It makes no sense to attempt to ask for a factory object from something that may not be in the hash map by instancing a generic one.