mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-07-14 02:54:48 -04:00
feat: Update dialog offer open plugin folder
This commit is contained in:
@ -159,11 +159,19 @@ void PluginUpdater::handleDownloadFinished()
|
||||
return;
|
||||
}
|
||||
|
||||
QString downloadPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
|
||||
QString downloadPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)
|
||||
+ QDir::separator() + "QodeAssist_v" + m_lastUpdateInfo.version;
|
||||
QDir().mkpath(downloadPath);
|
||||
|
||||
QString filePath = downloadPath + QDir::separator() + m_lastUpdateInfo.fileName;
|
||||
|
||||
if (QFile::exists(filePath)) {
|
||||
emit downloadError(tr("Update file already exists: %1").arg(filePath));
|
||||
reply->deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
QString filePath = downloadPath + "/" + m_lastUpdateInfo.fileName;
|
||||
QFile file(filePath);
|
||||
|
||||
if (!file.open(QIODevice::WriteOnly)) {
|
||||
emit downloadError(tr("Could not save the update file"));
|
||||
reply->deleteLater();
|
||||
@ -174,7 +182,6 @@ void PluginUpdater::handleDownloadFinished()
|
||||
file.close();
|
||||
|
||||
emit downloadFinished(filePath);
|
||||
|
||||
reply->deleteLater();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user