@@ -37,6 +37,7 @@ Updater::Updater()
3737 m_changelog = " " ;
3838 m_downloadUrl = " " ;
3939 m_latestVersion = " " ;
40+ m_typeVersion = " Release" ;
4041 m_customAppcast = false ;
4142 m_notifyOnUpdate = true ;
4243 m_notifyOnFinish = false ;
@@ -141,6 +142,15 @@ QString Updater::latestVersion() const
141142 return m_latestVersion;
142143}
143144
145+ /* *
146+ * Returns the type version defined by the update definitions file.
147+ * \warning Must is <Alpha> <Beta> <Release>
148+ */
149+ QString Updater::typeVersion () const
150+ {
151+ return m_typeVersion;
152+ }
153+
144154/* *
145155 * Returns the user-agent header used by the client when communicating
146156 * with the server through HTTP
@@ -410,6 +420,10 @@ void Updater::onReply(QNetworkReply *reply)
410420 m_changelog = platform.value (" changelog" ).toString ();
411421 m_downloadUrl = platform.value (" download-url" ).toString ();
412422 m_latestVersion = platform.value (" latest-version" ).toString ();
423+ /* https://hexingxing.cn/alpha-beta-rc-release/ */
424+ /* <Alpha> <Beta> <Release> */
425+ m_typeVersion = platform.value (" type-version" ).toString ().isEmpty ()
426+ ? m_typeVersion : platform.value (" type-version" ).toString ();
413427 if (platform.contains (" mandatory-update" ))
414428 m_mandatoryUpdate = platform.value (" mandatory-update" ).toBool ();
415429
@@ -440,7 +454,7 @@ void Updater::setUpdateAvailable(const bool available)
440454 }
441455
442456 QString title
443- = " <h3>" + tr (" Version %1 of %2 has been released!" ).arg (latestVersion ()).arg (moduleName ()) + " </h3>" ;
457+ = " <h3>" + tr (" Version %1(%2) of %3 has been released!" ).arg (latestVersion ()). arg ( typeVersion ()).arg (moduleName ()) + " </h3>" ;
444458
445459 box.setText (title);
446460 box.setInformativeText (text);
0 commit comments