aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorLibravatar Keshav Bhatt <keshavnrj@gmail.com>2022-02-19 20:15:32 +0530
committerLibravatar Keshav Bhatt <keshavnrj@gmail.com>2022-02-19 20:15:32 +0530
commit03b1d9393be94775f8564120c11d0e118fcc7a8a (patch)
tree0e78aeaee5ea89e275bdd4f2c7ff253f72e6241e /src/main.cpp
parent87416a981c4fdb553935125f71be11ae16c90ff2 (diff)
downloadwhatsie-03b1d9393be94775f8564120c11d0e118fcc7a8a.tar.gz
whatsie-03b1d9393be94775f8564120c11d0e118fcc7a8a.zip
make whatsie single process, disable logging, EnableHighDpiScaling before qapp init
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 679b18e..1b3881e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -14,9 +14,6 @@
int main(int argc, char *argv[])
{
- QApplication app(argc, argv);
- app.setWindowIcon(QIcon(":/icons/app/icon-256.png"));
-
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
static const char ENV_VAR_QT_DEVICE_PIXEL_RATIO[] = "QT_DEVICE_PIXEL_RATIO";
if (!qEnvironmentVariableIsSet(ENV_VAR_QT_DEVICE_PIXEL_RATIO)
@@ -25,6 +22,9 @@ int main(int argc, char *argv[])
&& !qEnvironmentVariableIsSet("QT_SCREEN_SCALE_FACTORS")) {
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
}
+
+ QApplication app(argc, argv);
+ app.setWindowIcon(QIcon(":/icons/app/icon-256.png"));
QApplication::setApplicationName("WhatSie");
QApplication::setOrganizationName("org.keshavnrj.ubuntu");
@@ -41,6 +41,11 @@ int main(int argc, char *argv[])
}
#endif
+ qputenv("QTWEBENGINE_CHROMIUM_FLAGS","--single-process");
+#ifdef QT_DEBUG
+ qputenv("QTWEBENGINE_CHROMIUM_FLAGS","--remote-debugging-port=9421");
+#endif
+ qputenv("QTWEBENGINE_CHROMIUM_FLAGS","--disable-logging");
QWebEngineSettings::defaultSettings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);
QWebEngineSettings::defaultSettings()->setAttribute(QWebEngineSettings::DnsPrefetchEnabled, true);