forked from qt-creator/qt-creator
Add "Install Plugin" button
Shows a wizard. Select a library file or zip file, and if you want to install in user location or Qt Creator install. For zip files it requires "unzip", "7z" or "cmake" in the PATH. Change-Id: I191079046cbd2cb6ab181bc044a00488af41b349 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -356,8 +356,26 @@ QString ICore::cacheResourcePath()
|
||||
|
||||
QString ICore::installerResourcePath()
|
||||
{
|
||||
return QFileInfo(settings(QSettings::SystemScope)->fileName()).path() + '/'
|
||||
+ Constants::IDE_ID;
|
||||
return QFileInfo(settings(QSettings::SystemScope)->fileName()).path() + '/' + Constants::IDE_ID;
|
||||
}
|
||||
|
||||
QString ICore::pluginPath()
|
||||
{
|
||||
return QDir::cleanPath(QCoreApplication::applicationDirPath() + '/' + RELATIVE_PLUGIN_PATH);
|
||||
}
|
||||
|
||||
QString ICore::userPluginPath()
|
||||
{
|
||||
QString pluginPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
|
||||
if (Utils::HostOsInfo::isAnyUnixHost() && !Utils::HostOsInfo::isMacHost())
|
||||
pluginPath += "/data";
|
||||
pluginPath += '/' + QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR) + '/';
|
||||
pluginPath += QLatin1String(Utils::HostOsInfo::isMacHost() ? Core::Constants::IDE_DISPLAY_NAME
|
||||
: Core::Constants::IDE_ID);
|
||||
pluginPath += "/plugins/";
|
||||
pluginPath += QString::number(IDE_VERSION_MAJOR) + '.' + QString::number(IDE_VERSION_MINOR)
|
||||
+ '.' + QString::number(IDE_VERSION_RELEASE);
|
||||
return pluginPath;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user