ソースを参照

Z991239-5349 #comment the dialog title add ENV mark

80374374 1 年間 前
コミット
d99690d5c9
1 ファイル変更16 行追加4 行削除
  1. 16 4
      Framework/spshell/Widgets/mainwindow.cpp

+ 16 - 4
Framework/spshell/Widgets/mainwindow.cpp

@@ -50,6 +50,18 @@
 
 #define STARTUP_SCRIPT "spexplorer.sh"
 
+#ifdef DEVOPS_ON_ST /*DevOps流水线编译,ST环境*/
+#define RVC_TITLE_STRING "RVC Terminal Application STver."
+#elif defined(DEVOPS_ON_UAT)/*DevOps流水线编译,UAT环境*/
+#define RVC_TITLE_STRING "RVC Terminal Application UATver."
+#elif defined(DEVOPS_ON_PRD)/*DevOps流水线编译,PRD环境*/
+#define RVC_TITLE_STRING "RVC Terminal Application"
+#elif defined(DEVOPS_ON_DEV)/*DevOps流水线编译,Dev环境*/
+#define RVC_TITLE_STRING "RVC Terminal Application DEVver."
+#else/*本地编译等非DevOps环境编译的版本*/
+#define RVC_TITLE_STRING "RVC Terminal Application"
+#endif
+
 void setRowBackground(const QBrush& brush, QAbstractItemModel* model, int row, const QModelIndex& parent = QModelIndex())
 {
     if (!model || row < 0 || row >= model->rowCount(parent))
@@ -83,7 +95,7 @@ MainWindow::MainWindow(QWidget* parent)
     , ui(new Ui::MainWindow), mSicon(nullptr), mSilent(false)
     , mIdleEntityCount(0), mTotalEntityCount(0), mFloatWidget(nullptr)
 {
-    this->Init("RVC Terminal Application");
+    this->Init(RVC_TITLE_STRING);
 }
 
 MainWindow::MainWindow(QString systemInfo, int totalEntityCount, QWidget* parent)
@@ -98,10 +110,10 @@ void MainWindow::Init(QString title)
 {
     ui->setupUi(this);
     setWindowIcon(QIcon(":/res/FavIcon.ico"));
-    if (title.startsWith("RVC Terminal Application")) {
+    if (title.startsWith(RVC_TITLE_STRING)) {
         setWindowTitle(title);
     } else {
-        setWindowTitle(QString("RVC Terminal Application [%1]").arg(title));
+        setWindowTitle(QString(RVC_TITLE_STRING " [%1]").arg(title));
     }
 
     QPropertyAnimation* animation = new QPropertyAnimation(this, "windowOpacity");
@@ -1339,7 +1351,7 @@ void MainWindow::Note(QString info, NoteSrcType srcType, QString srcEntity, bool
 
 #ifdef WITH_QT
     if (mSicon && (bForce || CanDisturb())) {
-        if (srcEntity.isEmpty()) srcEntity = "RVC Terminal Application";
+        if (srcEntity.isEmpty()) srcEntity = RVC_TITLE_STRING;
         int showDelayTime = 10000;
         if (srcType == BootStage) {
             showDelayTime = 15000;