@@ -871,7 +871,9 @@ void QAppImageUpdatePrivate::handleGUIUpdateCheck(QJsonObject info) {
871871 bool showNoUpdateDialog = n_GuiFlag & GuiFlag::NotifyWhenNoUpdateIsAvailable;
872872 bool noConfirmTorrentUsage = n_GuiFlag & GuiFlag::NoConfirmTorrentUsage;
873873 m_UpdaterDialog->setWindowTitle (QString::fromUtf8 (" Updating " ) +
874- QFileInfo (localAppImagePath).baseName ());
874+ (m_ApplicationName.isEmpty () ?
875+ QFileInfo (localAppImagePath).baseName () :
876+ m_ApplicationName));
875877
876878 bool isUpdateAvailable = (localAppImageSHA1Hash != remoteTargetFileSHA1Hash);
877879
@@ -886,7 +888,8 @@ void QAppImageUpdatePrivate::handleGUIUpdateCheck(QJsonObject info) {
886888 box.setText (
887889 QString::fromUtf8 (
888890 " It seems that the author of " ) +
889- QFileInfo (localAppImagePath).baseName () +
891+ (m_ApplicationName.isEmpty () ? QFileInfo (localAppImagePath).baseName () :
892+ m_ApplicationName) +
890893 QString::fromUtf8 (" supports decentralized update via Bittorrent." ) +
891894 QString::fromUtf8 (
892895 " Do you agree to <b>use Bittorrent for decentralized update?</b> This is completely optional." ) +
@@ -923,8 +926,9 @@ void QAppImageUpdatePrivate::handleGUIUpdateCheck(QJsonObject info) {
923926 QMessageBox box (m_UpdaterDialog.data ());
924927 box.setWindowTitle (QString::fromUtf8 (" No Updates Available!" ));
925928 box.setText (
926- QString::fromUtf8 (" You are currently using the lastest version of " ) +
927- QFileInfo (localAppImagePath).fileName () +
929+ QString::fromUtf8 (" You are currently using the lastest version of " ) +\
930+ (m_ApplicationName.isEmpty () ? QFileInfo (localAppImagePath).fileName ()
931+ : m_ApplicationName ) +
928932 QString::fromUtf8 (" ." ));
929933 box.exec ();
930934 }
@@ -1135,7 +1139,7 @@ void QAppImageUpdatePrivate::handleGUIUpdateError(short ecode) {
11351139 box.setWindowTitle (QString::fromUtf8 (" Update Failed" ));
11361140 box.setIcon (QMessageBox::Critical);
11371141 box.setText (QString::fromUtf8 (" Update failed for '" ) +
1138- QFileInfo (m_CurrentAppImagePath).fileName () +
1142+ (m_ApplicationName. isEmpty () ? QFileInfo (m_CurrentAppImagePath).fileName () : m_ApplicationName ) +
11391143 QString::fromUtf8 (" ': " ) + errorString);
11401144 box.exec ();
11411145 }
@@ -1223,7 +1227,7 @@ void QAppImageUpdatePrivate::handleGUIUpdateFinished(QJsonObject info, QString o
12231227 QString::fromUtf8 (" New version is saved at: " ) +
12241228 result[" NewVersionPath" ].toString ());
12251229 box.setText (QString::fromUtf8 (" Update completed successfully for <b>" ) +
1226- currentAppImageName +
1230+ (m_ApplicationName. isEmpty () ? currentAppImageName : m_ApplicationName) +
12271231 QString::fromUtf8 (" </b>, do you want to launch the new version? View details for more information." ));
12281232 box.addButton (QMessageBox::Yes);
12291233 box.addButton (QMessageBox::No);
0 commit comments