Compare commits

..

3 Commits

Author SHA1 Message Date
31145f191b chore: Upgrade plugin to 0.4.9
Some checks failed
Build plugin / ${{ matrix.config.name }} (map[artifact:Linux-x64 cc:gcc cxx:g++ name:Ubuntu Latest GCC os:ubuntu-latest platform:linux_x64]) (push) Has been cancelled
Build plugin / ${{ matrix.config.name }} (map[artifact:Linux-x64(Ubuntu-22.04-experimental) cc:gcc cxx:g++ name:Ubuntu 22.04 GCC os:ubuntu-22.04 platform:linux_x64]) (push) Has been cancelled
Build plugin / ${{ matrix.config.name }} (map[artifact:Windows-x64 cc:cl cxx:cl environment_script:C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat name:Windows Latest MSVC os:windows-latest platform:windows_x64]) (push) Has been cancelled
Build plugin / ${{ matrix.config.name }} (map[artifact:macOS-universal cc:clang cxx:clang++ name:macOS Latest Clang os:macos-latest platform:mac_x64]) (push) Has been cancelled
Build plugin / update_json (push) Has been cancelled
Build plugin / release (push) Has been cancelled
2025-01-24 18:27:07 +01:00
9096adde6f fix: Remove installing plugin from update dialog 2025-01-24 18:23:11 +01:00
b8e578d2d7 chore: Update plugin to QtCreator 15.0.1
* fix: Additional check qtc version
* build: Upgrade plugin to QtC 15.0.1
* chore: Upgrade plugin version to 0.4.8
2025-01-24 13:29:44 +01:00
6 changed files with 21 additions and 23 deletions

View File

@ -13,8 +13,8 @@ on:
env:
PLUGIN_NAME: QodeAssist
QT_VERSION: 6.8.1
QT_CREATOR_VERSION: 15.0.0
QT_CREATOR_VERSION_INTERNAL: 15.0.0
QT_CREATOR_VERSION: 15.0.1
QT_CREATOR_VERSION_INTERNAL: 15.0.1
MACOS_DEPLOYMENT_TARGET: "11.0"
CMAKE_VERSION: "3.29.6"
NINJA_VERSION: "1.12.1"

View File

@ -1,7 +1,7 @@
{
"Id" : "qodeassist",
"Name" : "QodeAssist",
"Version" : "0.4.7",
"Version" : "0.4.9",
"Vendor" : "Petr Mironychev",
"VendorId" : "petrmironychev",
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} Petr Mironychev, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",

View File

@ -155,7 +155,9 @@ private:
void handleUpdateCheckResult(const PluginUpdater::UpdateInfo &info)
{
if (!info.isUpdateAvailable)
if (!info.isUpdateAvailable
|| QVersionNumber::fromString(info.currentIdeVersion)
> QVersionNumber::fromString(info.targetIdeVersion))
return;
if (m_statusWidget)

View File

@ -159,9 +159,7 @@ void PluginUpdater::handleDownloadFinished()
return;
}
QString downloadPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)
+ QDir::separator() + "qodeassisttemp";
QDir().mkpath(downloadPath);
QString downloadPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
QString filePath = downloadPath + "/" + m_lastUpdateInfo.fileName;
QFile file(filePath);
@ -175,16 +173,7 @@ void PluginUpdater::handleDownloadFinished()
file.write(reply->readAll());
file.close();
if (!Core::executePluginInstallWizard(Utils::FilePath::fromString(filePath))) {
emit downloadError(tr("Failed to install the update"));
} else {
emit downloadFinished(filePath);
}
auto tempDir = QDir(downloadPath);
if (tempDir.exists()) {
tempDir.removeRecursively();
}
emit downloadFinished(filePath);
reply->deleteLater();
}

View File

@ -60,6 +60,12 @@ UpdateDialog::UpdateDialog(QWidget *parent)
m_versionLabel->setAlignment(Qt::AlignCenter);
m_layout->addWidget(m_versionLabel);
m_releaseLink = new QLabel(this);
m_releaseLink->setOpenExternalLinks(true);
m_releaseLink->setTextFormat(Qt::RichText);
m_releaseLink->setAlignment(Qt::AlignCenter);
m_layout->addWidget(m_releaseLink);
if (!m_changelogLabel) {
m_changelogLabel = new QLabel(tr("Release Notes:"), this);
m_layout->addWidget(m_changelogLabel);
@ -75,7 +81,7 @@ UpdateDialog::UpdateDialog(QWidget *parent)
m_layout->addWidget(m_progress);
auto *buttonLayout = new QHBoxLayout;
m_downloadButton = new QPushButton(tr("Download and Install"), this);
m_downloadButton = new QPushButton(tr("Download"), this);
m_downloadButton->setEnabled(false);
buttonLayout->addWidget(m_downloadButton);
@ -104,6 +110,10 @@ void UpdateDialog::checkForUpdatesAndShow(QWidget *parent)
void UpdateDialog::handleUpdateInfo(const PluginUpdater::UpdateInfo &info)
{
m_releaseLink->setText(
tr("<a href='https://github.com/Palm1r/QodeAssist/releases'>You can also download "
"from GitHub Releases</a>"));
if (info.incompatibleIdeVersion) {
m_titleLabel->setText(tr("Incompatible Qt Creator Version"));
m_versionLabel->setText(tr("This update requires Qt Creator %1, current is %2.\n"
@ -156,11 +166,7 @@ void UpdateDialog::updateProgress(qint64 received, qint64 total)
void UpdateDialog::handleDownloadFinished(const QString &path)
{
m_progress->setVisible(false);
QMessageBox::information(
this,
tr("Update Successful"),
tr("Update has been downloaded and installed. "
"Please restart Qt Creator to apply changes."));
QMessageBox::information(this, tr("Update Successful"), tr("Update has been downloaded."));
accept();
}

View File

@ -52,6 +52,7 @@ private:
QVBoxLayout *m_layout;
QLabel *m_titleLabel;
QLabel *m_versionLabel;
QLabel *m_releaseLink;
QLabel *m_changelogLabel{nullptr};
QTextEdit *m_changelogText{nullptr};
QProgressBar *m_progress;