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:
Marco Bubke
2020-10-26 09:22:11 +01:00
parent 98d7b5b6e5
commit 553929f322

View File

@@ -208,6 +208,8 @@ QmlDesignerPlugin::~QmlDesignerPlugin()
////////////////////////////////////////////////////
bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage/* = 0*/)
{
QDir{}.mkpath(Core::ICore::cacheResourcePath());
if (!Utils::HostOsInfo::canCreateOpenGLContext(errorMessage))
return false;
d = new QmlDesignerPluginPrivate;