Merge branch 'master' into autocomplete-fix

This commit is contained in:
pajlada
2026-02-14 12:43:27 +01:00
committed by GitHub
5 changed files with 39 additions and 5 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
fetch-depth: 0 # allows for tags access
- name: Download artifact
uses: dawidd6/action-download-artifact@v12
uses: dawidd6/action-download-artifact@v14
with:
workflow: build.yml
name: chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip
+1
View File
@@ -55,6 +55,7 @@
- Bugfix: Fix highlight mentions not updating when username changes. (#6723, #6739)
- Bugfix: Fixed Return and Enter being treated as different keys on Mac OS. (#6726)
- Bugfix: Fixed incorrect deletion length in tab autocomplete when completion included emojis. (#6800)
- Bugfix: Fixed portable updates not showing an error if the updater is not present. (#6801)
- Dev: Nightly builds are now defined through a build flag rather than the Modes file. (#6798)
- Dev: Update release documentation. (#6498)
- Dev: Make code sanitizers opt in with the `CHATTERINO_SANITIZER_SUPPORT` CMake option. After that's enabled, use the `SANITIZE_*` flag to enable individual sanitizers. (#6493)
+21 -4
View File
@@ -198,10 +198,19 @@ void Updates::installUpdates()
file.flush();
file.close();
QProcess::startDetached(
combinePath(QCoreApplication::applicationDirPath(),
"updater.1/ChatterinoUpdater.exe"),
{filename, "restart"});
auto updaterPath = Updates::portableUpdaterPath();
if (!QFile::exists(updaterPath))
{
this->setStatus_(MissingPortableUpdater);
return;
}
bool ok =
QProcess::startDetached(updaterPath, {filename, "restart"});
if (!ok)
{
this->setStatus_(RunUpdaterFailed);
return;
}
QApplication::exit(0);
})
@@ -399,6 +408,12 @@ Updates::Status Updates::getStatus() const
return this->status_;
}
QString Updates::portableUpdaterPath()
{
return combinePath(QCoreApplication::applicationDirPath(),
"updater.1/ChatterinoUpdater.exe");
}
bool Updates::shouldShowUpdateButton() const
{
switch (this->getStatus())
@@ -422,6 +437,8 @@ bool Updates::isError() const
case SearchFailed:
case DownloadFailed:
case WriteFileFailed:
case MissingPortableUpdater:
case RunUpdaterFailed:
return true;
default:
+4
View File
@@ -36,6 +36,8 @@ public:
Downloading,
DownloadFailed,
WriteFileFailed,
MissingPortableUpdater,
RunUpdaterFailed,
};
static bool isDowngradeOf(const QString &online, const QString &current);
@@ -51,6 +53,8 @@ public:
void installUpdates();
Status getStatus() const;
static QString portableUpdaterPath();
bool shouldShowUpdateButton() const;
bool isError() const;
bool isDowngrade() const;
+12
View File
@@ -97,6 +97,18 @@ void UpdateDialog::updateStatusChanged(Updates::Status status)
}
break;
case Updates::MissingPortableUpdater: {
this->ui_.label->setText("The portable updater (expected in " %
Updates::portableUpdaterPath() %
") was not found.");
}
break;
case Updates::RunUpdaterFailed: {
this->ui_.label->setText("Failed to run the updater.");
}
break;
default:;
}
}