diff --git a/spark-webapp-runtime/globaldefine.h b/spark-webapp-runtime/globaldefine.h index 1413827..49de701 100644 --- a/spark-webapp-runtime/globaldefine.h +++ b/spark-webapp-runtime/globaldefine.h @@ -16,4 +16,6 @@ #define DEFAULT_ROOT QString() #define DEFAULT_PORT 0 +#define CURRENT_VER (1.6) + #endif // GLOBALDEFINE_H diff --git a/spark-webapp-runtime/main.cpp b/spark-webapp-runtime/main.cpp index 4508629..b60da06 100644 --- a/spark-webapp-runtime/main.cpp +++ b/spark-webapp-runtime/main.cpp @@ -25,6 +25,7 @@ int main(int argc, char *argv[]) a.loadTranslator(); a.setAttribute(Qt::AA_UseHighDpiPixmaps); + a.setApplicationVersion(QString::number(CURRENT_VER)); a.setOrganizationName("spark-union"); // 添加组织名称,和商店主体的文件夹同在 ~/.local/share/spark-union 文件夹下 a.setApplicationName("SparkWebAppRuntime"); // 这里不要翻译,否则 ~/.local/share 中文件夹名也会被翻译 @@ -38,7 +39,7 @@ int main(int argc, char *argv[]) // ProductName dialog->setProductName(QString("<span>%1</span>").arg(DEFAULT_TITLE)); // Version - dialog->setVersion(DApplication::buildVersion(QString("%1 %2").arg(QObject::tr("Version")).arg("1.5"))); + dialog->setVersion(QString("%1 %2").arg(QObject::tr("Version:")).arg(CURRENT_VER)); // CompanyLogo dialog->setCompanyLogo(QPixmap(":/images/Logo-Spark.png")); // Description diff --git a/spark-webapp-runtime/translations/spark-webapp-runtime_zh_CN.qm b/spark-webapp-runtime/translations/spark-webapp-runtime_zh_CN.qm index b79bbcb..5ae136e 100644 Binary files a/spark-webapp-runtime/translations/spark-webapp-runtime_zh_CN.qm and b/spark-webapp-runtime/translations/spark-webapp-runtime_zh_CN.qm differ diff --git a/spark-webapp-runtime/translations/spark-webapp-runtime_zh_CN.ts b/spark-webapp-runtime/translations/spark-webapp-runtime_zh_CN.ts index 8dd6e90..e15294b 100644 --- a/spark-webapp-runtime/translations/spark-webapp-runtime_zh_CN.ts +++ b/spark-webapp-runtime/translations/spark-webapp-runtime_zh_CN.ts @@ -4,12 +4,12 @@ <context> <name>MainWindow</name> <message> - <location filename="../mainwindow.cpp" line="28"/> + <location filename="../mainwindow.cpp" line="27"/> <source>Fix Size</source> <translation>固定大小</translation> </message> <message> - <location filename="../mainwindow.cpp" line="29"/> + <location filename="../mainwindow.cpp" line="28"/> <source>Hide Buttons</source> <translation>隐藏按钮</translation> </message> @@ -17,87 +17,87 @@ <context> <name>QObject</name> <message> - <location filename="../main.cpp" line="48"/> + <location filename="../main.cpp" line="49"/> <source>Presented By Spark developers # HadesStudio</source> <translation>由 星火开发者联盟 @ 花心胡萝卜 提供</translation> </message> <message> - <location filename="../main.cpp" line="55"/> + <location filename="../main.cpp" line="56"/> <source>This program is open source under GPLv3</source> <translation>本程序按GPL第三版开源</translation> </message> <message> - <location filename="../main.cpp" line="41"/> - <source>Version</source> - <translation>版本</translation> + <location filename="../main.cpp" line="42"/> + <source>Version:</source> + <translation>版本:</translation> </message> <message> - <location filename="../main.cpp" line="59"/> + <location filename="../main.cpp" line="60"/> <source>Description: %1</source> <translation>描述:%1</translation> </message> <message> - <location filename="../main.cpp" line="64"/> + <location filename="../main.cpp" line="65"/> <source>Enable CommandLineParser. Default is false.</source> <translation>启用参数解析方式。默认顺序解析方式。</translation> </message> <message> - <location filename="../main.cpp" line="68"/> + <location filename="../main.cpp" line="69"/> <source>The Title of Application. Default is %1.</source> <translation>设置程序的运行标题。默认是 %1。</translation> </message> <message> - <location filename="../main.cpp" line="74"/> + <location filename="../main.cpp" line="75"/> <source>The target URL. Default is Blank.</source> <translation>设置要打开的目标 URL。默认是空。</translation> </message> <message> - <location filename="../main.cpp" line="80"/> + <location filename="../main.cpp" line="81"/> <source>The Width of Application. Default is %1.</source> <translation>设置应用的窗口宽度。默认是 %1。</translation> </message> <message> - <location filename="../main.cpp" line="86"/> + <location filename="../main.cpp" line="87"/> <source>The Height of Application. Default is %1.</source> <translation>设置应用的窗口高度。默认是 %1。</translation> </message> <message> - <location filename="../main.cpp" line="92"/> + <location filename="../main.cpp" line="93"/> <source>Fix Window Size. Default is false.</source> <translation>固定窗口大小。默认关闭该功能。</translation> </message> <message> - <location filename="../main.cpp" line="96"/> + <location filename="../main.cpp" line="97"/> <source>Hide Control Buttons. Default is false.</source> <translation>隐藏控制按钮。默认关闭该此功能。</translation> </message> <message> - <location filename="../main.cpp" line="100"/> + <location filename="../main.cpp" line="101"/> <source>The ICON of Application.</source> <translation>设置应用的图标。</translation> </message> <message> - <location filename="../main.cpp" line="106"/> + <location filename="../main.cpp" line="107"/> <source>The Description of Application.</source> <translation>设置应用的描述信息。</translation> </message> <message> - <location filename="../main.cpp" line="112"/> + <location filename="../main.cpp" line="113"/> <source>The Configuration file of Application.</source> <translation>设置应用的配置文件。</translation> </message> <message> - <location filename="../main.cpp" line="118"/> + <location filename="../main.cpp" line="119"/> <source>The root path of the program web service.</source> <translation>设置内置 WebServer 的根路径。</translation> </message> <message> - <location filename="../main.cpp" line="125"/> + <location filename="../main.cpp" line="126"/> <source>The port number of the program web service.</source> <translation>设置内置 WebServer 的监听端口号。</translation> </message> <message> - <location filename="../main.cpp" line="132"/> + <location filename="../main.cpp" line="133"/> <source>The ssl port number of the program web service.</source> <translation>设置内置 WebServer 的 SSL 协议的监听端口号。</translation> </message>