forked from qt-creator/qt-creator
QmlDesigner: Ensure that cache directory exists
We write data to the cache directory and it is easier to ensure it at the initialization of the plugin than in multiple different places. Change-Id: I2b6e5d607e1b28b13ee4968842d21d4dad7aaf15 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -208,6 +208,8 @@ QmlDesignerPlugin::~QmlDesignerPlugin()
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage/* = 0*/)
|
bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage/* = 0*/)
|
||||||
{
|
{
|
||||||
|
QDir{}.mkpath(Core::ICore::cacheResourcePath());
|
||||||
|
|
||||||
if (!Utils::HostOsInfo::canCreateOpenGLContext(errorMessage))
|
if (!Utils::HostOsInfo::canCreateOpenGLContext(errorMessage))
|
||||||
return false;
|
return false;
|
||||||
d = new QmlDesignerPluginPrivate;
|
d = new QmlDesignerPluginPrivate;
|
||||||
|
Reference in New Issue
Block a user