diff --git a/src/main.cpp b/src/main.cpp
index 632ab4f..8b7d6e0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -160,7 +160,6 @@ int main(int argc, char *argv[])
*/
env += " --disable-gpu";
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", env.trimmed().toUtf8());
-
QSurfaceFormat format;
format.setRenderableType(QSurfaceFormat::OpenGLES);
QSurfaceFormat::setDefaultFormat(format);
@@ -172,15 +171,11 @@ int main(int argc, char *argv[])
qputenv("QMLSCENE_DEVICE", "softwarecontext");
DApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
}
-#endif
-
-
-
/**
* FIXME: 对于麒麟 CPU 设备,调用 QtWebEngine 会导致客户端崩溃;
* 暂时不对 CPU 进行判断,对 wayland 环境下统一处理
*/
- if (Utils::isWayland()) {
+ else {
QString env = QString::fromUtf8(qgetenv("QTWEBENGINE_CHROMIUM_FLAGS"));
env = env.trimmed();
/**
@@ -199,15 +194,26 @@ int main(int argc, char *argv[])
QSurfaceFormat format;
format.setRenderableType(QSurfaceFormat::OpenGLES);
QSurfaceFormat::setDefaultFormat(format);
+ }
+ if (Utils::isPhytium()){
+ QString env = QString::fromUtf8(qgetenv("QTWEBENGINE_CHROMIUM_FLAGS"));
+ env = env.trimmed();
+ env += " --single-process";
+ qputenv("QTWEBENGINE_CHROMIUM_FLAGS", env.trimmed().toUtf8());
+ }
+#endif
- /**
- * NOTE: https://zhuanlan.zhihu.com/p/550285855
- * 避免 wayland 环境下从 QtWebEngine 后退回到 QWidget 时黑屏闪烁
- */
+ /**
+ * NOTE: https://zhuanlan.zhihu.com/p/550285855
+ * 避免 wayland 环境下从 QtWebEngine 后退回到 QWidget 时黑屏闪烁
+ */
+ if (Utils::isWayland()) {
qputenv("QMLSCENE_DEVICE", "softwarecontext");
DApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
}
+
+
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
{
// 开启 Hidpi 支持
diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp
index e4c7c34..0d37237 100644
--- a/src/utils/utils.cpp
+++ b/src/utils/utils.cpp
@@ -73,6 +73,22 @@ bool Utils::isWayland()
return isWayland;
}
+bool Utils::isPhytium()
+{
+ bool isPhytium = false;
+ QProcess process;
+ process.start("lscpu");
+ process.waitForFinished();
+
+
+ QString output = process.readAllStandardOutput();
+ if (output.contains(QLatin1String("Phytium")))
+ {
+ isPhytium = true;
+ }
+
+ return isPhytium;
+}
/**
* @brief Utils::initConfig 初始化 config.ini 配置文件,去除废弃字段
*/
diff --git a/src/utils/utils.h b/src/utils/utils.h
index 4351c08..776fd90 100644
--- a/src/utils/utils.h
+++ b/src/utils/utils.h
@@ -12,6 +12,7 @@ public:
static bool isWayland();
static void initConfig();
static bool isUOS();
+ static bool isPhytium();
static QString initUUID();
static void setQPAPlatform();
static void checkUOSDeveloperMode();
diff --git a/translations/spark-store_en.ts b/translations/spark-store_en.ts
index b6627e1..5fe4de5 100644
--- a/translations/spark-store_en.ts
+++ b/translations/spark-store_en.ts
@@ -126,9 +126,9 @@
-
-
-
+
+
+ Download and Install
@@ -180,74 +180,74 @@
-
+ Developer Mode Disabled
-
-
-
+
+
+ Reinstall
-
+ Upgrade
-
-
+
+ Install
-
+ Installing
-
-
-
-
+
+
+
+ Warning
-
+ The current application does not support deepin, there may be problems
-
+ The current application does not support UOS, there may be problems
-
+ The current application does not support Ubuntu, there may be problems
-
+ The current application does not support current platform, there may be problems
-
-
+
+ Spark Store
-
+ Uninstall succeeded
-
+ The URL has been copied to the clipboard
diff --git a/translations/spark-store_es.ts b/translations/spark-store_es.ts
index 63330df..c2b1c62 100644
--- a/translations/spark-store_es.ts
+++ b/translations/spark-store_es.ts
@@ -126,9 +126,9 @@
-
-
-
+
+
+ Download and InstallDescargar e instalar
@@ -180,74 +180,74 @@
Haga clic en "abrir"
-
+ Developer Mode DisabledSe ha desactivado el modo desarrollador
-
-
-
+
+
+ ReinstallReinstalación
-
+ UpgradeActualización
-
-
+
+ InstallInstalación
-
+ InstallingSe está instalando
-
-
-
-
+
+
+
+ WarningAviso
-
+ The current application does not support deepin, there may be problemsLa aplicación actual no admite deepin, puede haber problemas
-
+ The current application does not support UOS, there may be problemsLa aplicación actual no admite uos, puede haber problemas
-
+ The current application does not support Ubuntu, there may be problemsLa aplicación actual no admite ubuntu, puede haber problemas
-
+ The current application does not support current platform, there may be problemsLa aplicación actual no admite la Plataforma actual, puede haber problemas
-
-
+
+ Spark StoreSPARK Store
-
+ Uninstall succeededDesinstalación exitosa
-
+ The URL has been copied to the clipboardLa URL ha sido copiada al portapapeles
diff --git a/translations/spark-store_fr.ts b/translations/spark-store_fr.ts
index dcb4b4b..35d4a9e 100644
--- a/translations/spark-store_fr.ts
+++ b/translations/spark-store_fr.ts
@@ -126,9 +126,9 @@
-
-
-
+
+
+ Download and InstallTélécharger et installer
@@ -180,74 +180,74 @@
Cliquez sur Ouvrir
-
+ Developer Mode DisabledMode développeur désactivé
-
-
-
+
+
+ ReinstallRéinstaller
-
+ UpgradeMise à niveau
-
-
+
+ InstallInstallation
-
+ InstallingInstallation en cours
-
-
-
-
+
+
+
+ WarningAvertissement
-
+ The current application does not support deepin, there may be problemsL'application actuelle ne supporte pas deepin, il peut y avoir un problème
-
+ The current application does not support UOS, there may be problemsL'application actuelle ne prend pas en charge uos, il peut y avoir un problème
-
+ The current application does not support Ubuntu, there may be problemsL'application actuelle ne supporte pas Ubuntu, il peut y avoir un problème
-
+ The current application does not support current platform, there may be problemsL'application actuelle ne prend pas en charge la plate - forme actuelle, il peut y avoir un problème
-
-
+
+ Spark StoreLe Spark store
-
+ Uninstall succeededDésinstallation réussie
-
+ The URL has been copied to the clipboardL'URL a été copiée dans le presse - papiers
diff --git a/translations/spark-store_zh_CN.ts b/translations/spark-store_zh_CN.ts
index 74246e2..3751fc4 100644
--- a/translations/spark-store_zh_CN.ts
+++ b/translations/spark-store_zh_CN.ts
@@ -121,9 +121,9 @@
-
-
-
+
+
+ Download and Install下载并安装
@@ -180,74 +180,74 @@
点击跳转
-
+ Developer Mode Disabled开发者模式未开启
-
-
-
+
+
+ Reinstall重新安装
-
+ Upgrade升级
-
-
+
+ Install安装
-
+ Installing正在安装
-
-
-
-
+
+
+
+ Warning警告
-
+ The current application does not support deepin, there may be problems当前应用不支持deepin,安装后可能会出现问题
-
+ The current application does not support UOS, there may be problems当前应用不支持UOS,安装后可能会出现问题
-
+ The current application does not support Ubuntu, there may be problems当前应用不支持Ubuntu,安装后可能会出现问题
-
+ The current application does not support current platform, there may be problems当前应用不支持平台,安装后可能会出现问题
-
-
+
+ Spark Store星火应用商店
-
+ Uninstall succeeded卸载成功
-
+ The URL has been copied to the clipboard链接已复制到剪贴板