2016-08-25 00:45:32 +02:00
|
|
|
#include "./settings.h"
|
2017-03-17 00:38:42 +01:00
|
|
|
#include "../../connector/syncthingprocess.h"
|
2016-09-01 16:34:30 +02:00
|
|
|
|
2017-04-23 18:27:31 +02:00
|
|
|
// use meta-data of syncthingtray application here
|
|
|
|
#include "resources/../../tray/resources/config.h"
|
2017-02-20 19:41:34 +01:00
|
|
|
|
2016-08-25 00:45:32 +02:00
|
|
|
#include <qtutilities/settingsdialog/qtsettings.h>
|
2016-12-11 17:58:58 +01:00
|
|
|
#ifdef QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS
|
2017-05-01 03:34:43 +02:00
|
|
|
#include <qtutilities/misc/dbusnotification.h>
|
2016-12-11 17:58:58 +01:00
|
|
|
#endif
|
2016-08-25 00:45:32 +02:00
|
|
|
|
|
|
|
#include <QApplication>
|
2017-05-01 03:34:43 +02:00
|
|
|
#include <QFile>
|
|
|
|
#include <QMessageBox>
|
2016-08-25 00:45:32 +02:00
|
|
|
#include <QSettings>
|
2016-09-03 20:14:52 +02:00
|
|
|
#include <QSslCertificate>
|
|
|
|
#include <QSslError>
|
2017-05-01 03:34:43 +02:00
|
|
|
#include <QStringBuilder>
|
2016-08-25 00:45:32 +02:00
|
|
|
|
2017-03-17 00:38:42 +01:00
|
|
|
#include <unordered_map>
|
|
|
|
|
2016-09-03 20:14:52 +02:00
|
|
|
using namespace std;
|
2016-09-29 21:19:54 +02:00
|
|
|
using namespace Data;
|
2016-12-11 17:58:58 +01:00
|
|
|
#ifdef QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS
|
|
|
|
using namespace MiscUtils;
|
|
|
|
#endif
|
2016-08-25 00:45:32 +02:00
|
|
|
|
2017-03-17 00:38:42 +01:00
|
|
|
namespace std {
|
|
|
|
|
2017-05-01 03:34:43 +02:00
|
|
|
template <> struct hash<QString> {
|
2017-03-17 00:38:42 +01:00
|
|
|
std::size_t operator()(const QString &str) const
|
|
|
|
{
|
|
|
|
return qHash(str);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2016-08-25 00:45:32 +02:00
|
|
|
namespace Settings {
|
|
|
|
|
2017-03-17 00:38:42 +01:00
|
|
|
/*!
|
|
|
|
* \brief Contains the processes for launching extra tools.
|
|
|
|
* \remarks Using std::unordered_map instead of QHash because SyncthingProcess can not be copied.
|
|
|
|
*/
|
|
|
|
static unordered_map<QString, SyncthingProcess> toolProcesses;
|
|
|
|
|
2016-11-02 20:03:38 +01:00
|
|
|
QString Launcher::syncthingCmd() const
|
2016-09-01 16:34:30 +02:00
|
|
|
{
|
2016-11-02 20:03:38 +01:00
|
|
|
return syncthingPath % QChar(' ') % syncthingArgs;
|
2016-09-01 16:34:30 +02:00
|
|
|
}
|
|
|
|
|
2017-03-17 00:38:42 +01:00
|
|
|
QString Launcher::toolCmd(const QString &tool) const
|
|
|
|
{
|
|
|
|
const ToolParameter toolParams = tools.value(tool);
|
2017-05-01 03:34:43 +02:00
|
|
|
if (toolParams.path.isEmpty()) {
|
2017-03-17 00:38:42 +01:00
|
|
|
return QString();
|
|
|
|
}
|
|
|
|
return toolParams.path % QChar(' ') % toolParams.args;
|
|
|
|
}
|
|
|
|
|
|
|
|
SyncthingProcess &Launcher::toolProcess(const QString &tool)
|
|
|
|
{
|
|
|
|
return toolProcesses[tool];
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Starts all processes (Syncthing and tools) if autostart is enabled.
|
|
|
|
*/
|
|
|
|
void Launcher::autostart() const
|
|
|
|
{
|
2017-05-01 03:34:43 +02:00
|
|
|
if (enabled && !syncthingPath.isEmpty()) {
|
2017-03-17 00:38:42 +01:00
|
|
|
syncthingProcess().startSyncthing(syncthingCmd());
|
|
|
|
}
|
2017-05-01 03:34:43 +02:00
|
|
|
for (auto i = tools.cbegin(), end = tools.cend(); i != end; ++i) {
|
2017-03-17 00:38:42 +01:00
|
|
|
const ToolParameter &toolParams = i.value();
|
2017-05-01 03:34:43 +02:00
|
|
|
if (toolParams.autostart && !toolParams.path.isEmpty()) {
|
2017-03-17 00:38:42 +01:00
|
|
|
toolProcesses[i.key()].startSyncthing(toolParams.path % QChar(' ') % toolParams.args);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Launcher::terminate()
|
|
|
|
{
|
|
|
|
syncthingProcess().stopSyncthing();
|
2017-05-01 03:34:43 +02:00
|
|
|
for (auto &process : toolProcesses) {
|
2017-03-17 00:38:42 +01:00
|
|
|
process.second.stopSyncthing();
|
|
|
|
}
|
|
|
|
syncthingProcess().waitForFinished();
|
2017-05-01 03:34:43 +02:00
|
|
|
for (auto &process : toolProcesses) {
|
2017-03-17 00:38:42 +01:00
|
|
|
process.second.waitForFinished();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-02 20:03:38 +01:00
|
|
|
Settings &values()
|
2016-08-25 00:45:32 +02:00
|
|
|
{
|
2016-11-02 20:03:38 +01:00
|
|
|
static Settings settings;
|
|
|
|
return settings;
|
2016-08-25 00:45:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void restore()
|
|
|
|
{
|
2017-02-20 19:41:34 +01:00
|
|
|
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QStringLiteral(PROJECT_NAME));
|
|
|
|
// move old config to new location
|
2017-05-01 03:34:43 +02:00
|
|
|
const QString oldConfig
|
|
|
|
= QSettings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(), QApplication::applicationName()).fileName();
|
2017-02-20 19:41:34 +01:00
|
|
|
QFile::rename(oldConfig, settings.fileName()) || QFile::remove(oldConfig);
|
|
|
|
settings.sync();
|
2016-11-02 20:03:38 +01:00
|
|
|
Settings &v = values();
|
2016-08-25 00:45:32 +02:00
|
|
|
|
|
|
|
settings.beginGroup(QStringLiteral("tray"));
|
2016-09-03 20:14:52 +02:00
|
|
|
const int connectionCount = settings.beginReadArray(QStringLiteral("connections"));
|
2016-11-02 20:03:38 +01:00
|
|
|
auto &primaryConnectionSettings = v.connection.primary;
|
2017-05-01 03:34:43 +02:00
|
|
|
if (connectionCount > 0) {
|
2016-11-02 20:03:38 +01:00
|
|
|
auto &secondaryConnectionSettings = v.connection.secondary;
|
|
|
|
secondaryConnectionSettings.clear();
|
|
|
|
secondaryConnectionSettings.reserve(static_cast<size_t>(connectionCount));
|
2017-05-01 03:34:43 +02:00
|
|
|
for (int i = 0; i < connectionCount; ++i) {
|
2016-09-29 21:19:54 +02:00
|
|
|
SyncthingConnectionSettings *connectionSettings;
|
2017-05-01 03:34:43 +02:00
|
|
|
if (i == 0) {
|
2016-11-02 20:03:38 +01:00
|
|
|
connectionSettings = &primaryConnectionSettings;
|
2016-09-03 20:14:52 +02:00
|
|
|
} else {
|
2016-11-02 20:03:38 +01:00
|
|
|
secondaryConnectionSettings.emplace_back();
|
|
|
|
connectionSettings = &secondaryConnectionSettings.back();
|
2016-09-03 20:14:52 +02:00
|
|
|
}
|
|
|
|
settings.setArrayIndex(i);
|
|
|
|
connectionSettings->label = settings.value(QStringLiteral("label")).toString();
|
2017-05-01 03:34:43 +02:00
|
|
|
if (connectionSettings->label.isEmpty()) {
|
2016-09-03 20:14:52 +02:00
|
|
|
connectionSettings->label = (i == 0 ? QStringLiteral("Primary instance") : QStringLiteral("Secondary instance %1").arg(i));
|
|
|
|
}
|
|
|
|
connectionSettings->syncthingUrl = settings.value(QStringLiteral("syncthingUrl"), connectionSettings->syncthingUrl).toString();
|
|
|
|
connectionSettings->authEnabled = settings.value(QStringLiteral("authEnabled"), connectionSettings->authEnabled).toBool();
|
|
|
|
connectionSettings->userName = settings.value(QStringLiteral("userName")).toString();
|
|
|
|
connectionSettings->password = settings.value(QStringLiteral("password")).toString();
|
|
|
|
connectionSettings->apiKey = settings.value(QStringLiteral("apiKey")).toByteArray();
|
2017-05-01 03:34:43 +02:00
|
|
|
connectionSettings->trafficPollInterval
|
|
|
|
= settings.value(QStringLiteral("trafficPollInterval"), connectionSettings->trafficPollInterval).toInt();
|
|
|
|
connectionSettings->devStatsPollInterval
|
|
|
|
= settings.value(QStringLiteral("devStatsPollInterval"), connectionSettings->devStatsPollInterval).toInt();
|
|
|
|
connectionSettings->errorsPollInterval
|
|
|
|
= settings.value(QStringLiteral("errorsPollInterval"), connectionSettings->errorsPollInterval).toInt();
|
|
|
|
connectionSettings->reconnectInterval
|
|
|
|
= settings.value(QStringLiteral("reconnectInterval"), connectionSettings->reconnectInterval).toInt();
|
2016-09-03 20:14:52 +02:00
|
|
|
connectionSettings->httpsCertPath = settings.value(QStringLiteral("httpsCertPath")).toString();
|
2017-05-01 03:34:43 +02:00
|
|
|
if (!connectionSettings->loadHttpsCert()) {
|
|
|
|
QMessageBox::critical(nullptr, QCoreApplication::applicationName(),
|
|
|
|
QCoreApplication::translate("Settings::restore", "Unable to load certificate \"%1\" when restoring settings.")
|
|
|
|
.arg(connectionSettings->httpsCertPath));
|
2016-09-03 20:14:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
2016-11-02 20:03:38 +01:00
|
|
|
v.firstLaunch = true;
|
|
|
|
primaryConnectionSettings.label = QStringLiteral("Primary instance");
|
2016-09-03 20:14:52 +02:00
|
|
|
}
|
|
|
|
settings.endArray();
|
|
|
|
|
2016-11-02 20:03:38 +01:00
|
|
|
auto ¬ifyOn = v.notifyOn;
|
|
|
|
notifyOn.disconnect = settings.value(QStringLiteral("notifyOnDisconnect"), notifyOn.disconnect).toBool();
|
|
|
|
notifyOn.internalErrors = settings.value(QStringLiteral("notifyOnErrors"), notifyOn.internalErrors).toBool();
|
|
|
|
notifyOn.syncComplete = settings.value(QStringLiteral("notifyOnSyncComplete"), notifyOn.syncComplete).toBool();
|
|
|
|
notifyOn.syncthingErrors = settings.value(QStringLiteral("showSyncthingNotifications"), notifyOn.syncthingErrors).toBool();
|
2016-12-11 17:58:58 +01:00
|
|
|
#ifdef QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS
|
|
|
|
v.dbusNotifications = settings.value(QStringLiteral("dbusNotifications"), DBusNotification::isAvailable()).toBool();
|
|
|
|
#endif
|
2017-01-14 02:12:38 +01:00
|
|
|
v.ignoreInavailabilityAfterStart = settings.value(QStringLiteral("ignoreInavailabilityAfterStart"), v.ignoreInavailabilityAfterStart).toUInt();
|
2016-11-02 20:03:38 +01:00
|
|
|
auto &appearance = v.appearance;
|
|
|
|
appearance.showTraffic = settings.value(QStringLiteral("showTraffic"), appearance.showTraffic).toBool();
|
|
|
|
appearance.trayMenuSize = settings.value(QStringLiteral("trayMenuSize"), appearance.trayMenuSize).toSize();
|
|
|
|
appearance.frameStyle = settings.value(QStringLiteral("frameStyle"), appearance.frameStyle).toInt();
|
|
|
|
appearance.tabPosition = settings.value(QStringLiteral("tabPos"), appearance.tabPosition).toInt();
|
2016-11-02 21:05:32 +01:00
|
|
|
appearance.brightTextColors = settings.value(QStringLiteral("brightTextColors"), appearance.brightTextColors).toBool();
|
2016-09-03 19:39:43 +02:00
|
|
|
settings.endGroup();
|
|
|
|
|
|
|
|
settings.beginGroup(QStringLiteral("startup"));
|
2016-11-02 20:03:38 +01:00
|
|
|
auto &launcher = v.launcher;
|
2017-03-17 00:38:42 +01:00
|
|
|
launcher.enabled = settings.value(QStringLiteral("syncthingAutostart"), launcher.enabled).toBool();
|
2016-11-02 20:03:38 +01:00
|
|
|
launcher.syncthingPath = settings.value(QStringLiteral("syncthingPath"), launcher.syncthingPath).toString();
|
|
|
|
launcher.syncthingArgs = settings.value(QStringLiteral("syncthingArgs"), launcher.syncthingArgs).toString();
|
2017-03-17 00:38:42 +01:00
|
|
|
settings.beginGroup(QStringLiteral("tools"));
|
2017-05-01 03:34:43 +02:00
|
|
|
for (const QString &tool : settings.childGroups()) {
|
2017-03-17 00:38:42 +01:00
|
|
|
settings.beginGroup(tool);
|
|
|
|
ToolParameter &toolParams = launcher.tools[tool];
|
|
|
|
toolParams.autostart = settings.value(QStringLiteral("autostart"), toolParams.autostart).toBool();
|
|
|
|
toolParams.path = settings.value(QStringLiteral("path"), toolParams.path).toString();
|
|
|
|
toolParams.args = settings.value(QStringLiteral("args"), toolParams.args).toString();
|
|
|
|
settings.endGroup();
|
|
|
|
}
|
2017-05-01 03:34:43 +02:00
|
|
|
for (auto i = launcher.tools.cbegin(), end = launcher.tools.cend(); i != end; ++i) {
|
2017-03-17 00:38:42 +01:00
|
|
|
}
|
|
|
|
settings.endGroup();
|
2016-12-18 16:50:35 +01:00
|
|
|
#ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD
|
|
|
|
auto &systemd = v.systemd;
|
|
|
|
systemd.syncthingUnit = settings.value(QStringLiteral("syncthingUnit"), systemd.syncthingUnit).toString();
|
|
|
|
systemd.showButton = settings.value(QStringLiteral("showButton"), systemd.showButton).toBool();
|
2016-12-27 16:16:12 +01:00
|
|
|
systemd.considerForReconnect = settings.value(QStringLiteral("considerForReconnect"), systemd.considerForReconnect).toBool();
|
2016-12-18 16:50:35 +01:00
|
|
|
#endif
|
2016-08-25 00:45:32 +02:00
|
|
|
settings.endGroup();
|
|
|
|
|
2017-04-23 18:27:31 +02:00
|
|
|
#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) || defined(SYNCTHINGWIDGETS_USE_WEBKIT)
|
2016-08-25 00:45:32 +02:00
|
|
|
settings.beginGroup(QStringLiteral("webview"));
|
2016-11-02 20:03:38 +01:00
|
|
|
auto &webView = v.webView;
|
2017-01-07 16:15:13 +01:00
|
|
|
webView.disabled = settings.value(QStringLiteral("disabled"), webView.disabled).toBool();
|
2016-11-02 20:03:38 +01:00
|
|
|
webView.zoomFactor = settings.value(QStringLiteral("zoomFactor"), webView.zoomFactor).toDouble();
|
|
|
|
webView.geometry = settings.value(QStringLiteral("geometry")).toByteArray();
|
|
|
|
webView.keepRunning = settings.value(QStringLiteral("keepRunning"), webView.keepRunning).toBool();
|
2016-08-25 00:45:32 +02:00
|
|
|
settings.endGroup();
|
|
|
|
#endif
|
|
|
|
|
2016-11-02 20:03:38 +01:00
|
|
|
v.qt.restore(settings);
|
2016-08-25 00:45:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void save()
|
|
|
|
{
|
2017-02-20 19:41:34 +01:00
|
|
|
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QStringLiteral(PROJECT_NAME));
|
|
|
|
|
2016-11-02 20:03:38 +01:00
|
|
|
const Settings &v = values();
|
2016-08-25 00:45:32 +02:00
|
|
|
|
|
|
|
settings.beginGroup(QStringLiteral("tray"));
|
2016-11-02 20:03:38 +01:00
|
|
|
const auto &primaryConnectionSettings = v.connection.primary;
|
|
|
|
const auto &secondaryConnectionSettings = v.connection.secondary;
|
|
|
|
const int connectionCount = static_cast<int>(1 + secondaryConnectionSettings.size());
|
2016-09-03 20:14:52 +02:00
|
|
|
settings.beginWriteArray(QStringLiteral("connections"), connectionCount);
|
2017-05-01 03:34:43 +02:00
|
|
|
for (int i = 0; i < connectionCount; ++i) {
|
|
|
|
const SyncthingConnectionSettings *connectionSettings
|
|
|
|
= (i == 0 ? &primaryConnectionSettings : &secondaryConnectionSettings[static_cast<size_t>(i - 1)]);
|
2016-09-03 20:14:52 +02:00
|
|
|
settings.setArrayIndex(i);
|
|
|
|
settings.setValue(QStringLiteral("label"), connectionSettings->label);
|
|
|
|
settings.setValue(QStringLiteral("syncthingUrl"), connectionSettings->syncthingUrl);
|
|
|
|
settings.setValue(QStringLiteral("authEnabled"), connectionSettings->authEnabled);
|
|
|
|
settings.setValue(QStringLiteral("userName"), connectionSettings->userName);
|
|
|
|
settings.setValue(QStringLiteral("password"), connectionSettings->password);
|
|
|
|
settings.setValue(QStringLiteral("apiKey"), connectionSettings->apiKey);
|
2016-09-25 20:54:09 +02:00
|
|
|
settings.setValue(QStringLiteral("trafficPollInterval"), connectionSettings->trafficPollInterval);
|
|
|
|
settings.setValue(QStringLiteral("devStatsPollInterval"), connectionSettings->devStatsPollInterval);
|
2017-01-12 22:38:36 +01:00
|
|
|
settings.setValue(QStringLiteral("errorsPollInterval"), connectionSettings->errorsPollInterval);
|
2016-10-07 15:11:25 +02:00
|
|
|
settings.setValue(QStringLiteral("reconnectInterval"), connectionSettings->reconnectInterval);
|
2016-09-03 20:14:52 +02:00
|
|
|
settings.setValue(QStringLiteral("httpsCertPath"), connectionSettings->httpsCertPath);
|
|
|
|
}
|
|
|
|
settings.endArray();
|
|
|
|
|
2016-11-02 20:03:38 +01:00
|
|
|
const auto ¬ifyOn = v.notifyOn;
|
|
|
|
settings.setValue(QStringLiteral("notifyOnDisconnect"), notifyOn.disconnect);
|
|
|
|
settings.setValue(QStringLiteral("notifyOnErrors"), notifyOn.internalErrors);
|
|
|
|
settings.setValue(QStringLiteral("notifyOnSyncComplete"), notifyOn.syncComplete);
|
|
|
|
settings.setValue(QStringLiteral("showSyncthingNotifications"), notifyOn.syncthingErrors);
|
2016-12-11 17:58:58 +01:00
|
|
|
#ifdef QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS
|
|
|
|
settings.setValue(QStringLiteral("dbusNotifications"), v.dbusNotifications);
|
|
|
|
#endif
|
2017-01-14 02:12:38 +01:00
|
|
|
settings.setValue(QStringLiteral("ignoreInavailabilityAfterStart"), v.ignoreInavailabilityAfterStart);
|
2016-11-02 20:03:38 +01:00
|
|
|
const auto &appearance = v.appearance;
|
|
|
|
settings.setValue(QStringLiteral("showTraffic"), appearance.showTraffic);
|
|
|
|
settings.setValue(QStringLiteral("trayMenuSize"), appearance.trayMenuSize);
|
|
|
|
settings.setValue(QStringLiteral("frameStyle"), appearance.frameStyle);
|
|
|
|
settings.setValue(QStringLiteral("tabPos"), appearance.tabPosition);
|
2016-11-02 21:05:32 +01:00
|
|
|
settings.setValue(QStringLiteral("brightTextColors"), appearance.brightTextColors);
|
2016-09-03 19:39:43 +02:00
|
|
|
settings.endGroup();
|
|
|
|
|
|
|
|
settings.beginGroup(QStringLiteral("startup"));
|
2016-11-02 20:03:38 +01:00
|
|
|
const auto &launcher = v.launcher;
|
2017-03-17 00:38:42 +01:00
|
|
|
settings.setValue(QStringLiteral("syncthingAutostart"), launcher.enabled);
|
2016-11-02 20:03:38 +01:00
|
|
|
settings.setValue(QStringLiteral("syncthingPath"), launcher.syncthingPath);
|
|
|
|
settings.setValue(QStringLiteral("syncthingArgs"), launcher.syncthingArgs);
|
2017-03-17 00:38:42 +01:00
|
|
|
settings.beginGroup(QStringLiteral("tools"));
|
2017-05-01 03:34:43 +02:00
|
|
|
for (auto i = launcher.tools.cbegin(), end = launcher.tools.cend(); i != end; ++i) {
|
2017-03-17 00:38:42 +01:00
|
|
|
const ToolParameter &toolParams = i.value();
|
|
|
|
settings.beginGroup(i.key());
|
|
|
|
settings.setValue(QStringLiteral("autostart"), toolParams.autostart);
|
|
|
|
settings.setValue(QStringLiteral("path"), toolParams.path);
|
|
|
|
settings.setValue(QStringLiteral("args"), toolParams.args);
|
|
|
|
settings.endGroup();
|
|
|
|
}
|
|
|
|
settings.endGroup();
|
2016-12-18 16:50:35 +01:00
|
|
|
#ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD
|
|
|
|
const auto &systemd = v.systemd;
|
|
|
|
settings.setValue(QStringLiteral("syncthingUnit"), systemd.syncthingUnit);
|
|
|
|
settings.setValue(QStringLiteral("showButton"), systemd.showButton);
|
2016-12-27 16:16:12 +01:00
|
|
|
settings.setValue(QStringLiteral("considerForReconnect"), systemd.considerForReconnect);
|
2016-12-18 16:50:35 +01:00
|
|
|
#endif
|
2016-08-25 00:45:32 +02:00
|
|
|
settings.endGroup();
|
|
|
|
|
2017-04-23 18:27:31 +02:00
|
|
|
#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE) || defined(SYNCTHINGWIDGETS_USE_WEBKIT)
|
2016-08-25 00:45:32 +02:00
|
|
|
settings.beginGroup(QStringLiteral("webview"));
|
2016-11-02 20:03:38 +01:00
|
|
|
const auto &webView = v.webView;
|
|
|
|
settings.setValue(QStringLiteral("disabled"), webView.disabled);
|
|
|
|
settings.setValue(QStringLiteral("zoomFactor"), webView.zoomFactor);
|
|
|
|
settings.setValue(QStringLiteral("geometry"), webView.geometry);
|
|
|
|
settings.setValue(QStringLiteral("keepRunning"), webView.keepRunning);
|
2016-08-25 00:45:32 +02:00
|
|
|
settings.endGroup();
|
|
|
|
#endif
|
|
|
|
|
2016-11-02 20:03:38 +01:00
|
|
|
v.qt.save(settings);
|
2016-08-25 00:45:32 +02:00
|
|
|
}
|
|
|
|
}
|