mirror of
https://github.com/redis/RedisDesktopManager.git
synced 2026-10-29 19:51:51 +08:00
@@ -7,6 +7,7 @@
|
||||
#include <QSettings>
|
||||
#include <QMessageBox>
|
||||
#include <QQuickWindow>
|
||||
#include <QNetworkProxyFactory>
|
||||
#include <easylogging++.h>
|
||||
#include <qredisclient/redisclient.h>
|
||||
|
||||
@@ -102,6 +103,12 @@ void Application::initAppFonts()
|
||||
QApplication::setFont(defaultFont);
|
||||
}
|
||||
|
||||
void Application::initProxySettings()
|
||||
{
|
||||
QSettings settings;
|
||||
QNetworkProxyFactory::setUseSystemConfiguration(settings.value("app/useSystemProxy", false).toBool());
|
||||
}
|
||||
|
||||
void Application::registerQmlTypes()
|
||||
{
|
||||
qmlRegisterType<SortFilterProxyModel>("rdm.models", 1, 0, "SortFilterProxyModel");
|
||||
|
||||
+2
-1
@@ -30,7 +30,8 @@ public:
|
||||
|
||||
private:
|
||||
void initAppInfo();
|
||||
void initAppFonts();
|
||||
void initAppFonts();
|
||||
void initProxySettings();
|
||||
void registerQmlTypes();
|
||||
void registerQmlRootObjects();
|
||||
void initLog();
|
||||
|
||||
@@ -59,6 +59,17 @@ Dialog {
|
||||
description: qsTr("Application restart is needed to apply this setting.")
|
||||
}
|
||||
|
||||
BoolOption {
|
||||
id: systemProxy
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
|
||||
value: false
|
||||
label: qsTr("Use system proxy settings")
|
||||
description: qsTr("Application restart is needed to apply this setting.")
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("Connections Tree")
|
||||
font.pixelSize: 18
|
||||
@@ -110,8 +121,7 @@ Dialog {
|
||||
value: 10
|
||||
label: qsTr("Live update interval (in seconds)")
|
||||
description: ""
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("Custom Value View Formatters")
|
||||
@@ -170,6 +180,7 @@ Dialog {
|
||||
property alias appFont: appFont.value
|
||||
property alias appFontSize: appFontSize.value
|
||||
property alias locale: appLang.value
|
||||
property alias useSystemProxy: systemProxy.value
|
||||
}
|
||||
|
||||
Settings {
|
||||
|
||||
Reference in New Issue
Block a user