diff --git a/Config.cpp b/Config.cpp
index 32a9e1a0..037658ec 100644
--- a/Config.cpp
+++ b/Config.cpp
@@ -43,7 +43,8 @@ Config::Config() :
AuthRequired(false),
Secret(""),
Salt(""),
- SettingsLoaded(false) {
+ SettingsLoaded(false)
+{
// OBS Config defaults
config_t* obs_config = obs_frontend_get_global_config();
if (obs_config) {
@@ -57,11 +58,11 @@ Config::Config() :
config_set_default_bool(obs_config,
SECTION_NAME, PARAM_ALERT, AlertsEnabled);
- config_set_default_bool(obs_config,
+ config_set_default_bool(obs_config,
SECTION_NAME, PARAM_AUTHREQUIRED, AuthRequired);
- config_set_default_string(obs_config,
+ config_set_default_string(obs_config,
SECTION_NAME, PARAM_SECRET, Secret);
- config_set_default_string(obs_config,
+ config_set_default_string(obs_config,
SECTION_NAME, PARAM_SALT, Salt);
}
diff --git a/WSRequestHandler.h b/WSRequestHandler.h
index c22ccba3..2fb63010 100644
--- a/WSRequestHandler.h
+++ b/WSRequestHandler.h
@@ -20,7 +20,7 @@ with this program. If not, see
#ifndef WSREQUESTHANDLER_H
#define WSREQUESTHANDLER_H
-#include
+#include
#include
#include
@@ -42,7 +42,7 @@ class WSRequestHandler : public QObject {
const char* _requestType;
obs_data_t* data;
- QMap messageMap;
+ QHash messageMap;
QSet authNotRequired;
void SendOKResponse(obs_data_t* additionalFields = NULL);
@@ -116,7 +116,7 @@ class WSRequestHandler : public QObject {
static void HandleEnableStudioMode(WSRequestHandler* req);
static void HandleDisableStudioMode(WSRequestHandler* req);
static void HandleToggleStudioMode(WSRequestHandler* req);
-
+
static void HandleSetTextGDIPlusProperties(WSRequestHandler* req);
static void HandleGetTextGDIPlusProperties(WSRequestHandler* req);
static void HandleSetBrowserSourceProperties(WSRequestHandler* req);
diff --git a/WSServer.cpp b/WSServer.cpp
index 6881f565..38d8b51a 100644
--- a/WSServer.cpp
+++ b/WSServer.cpp
@@ -34,7 +34,8 @@ WSServer::WSServer(QObject* parent)
: QObject(parent),
_wsServer(Q_NULLPTR),
_clients(),
- _clMutex(QMutex::Recursive) {
+ _clMutex(QMutex::Recursive)
+{
_wsServer = new QWebSocketServer(
QStringLiteral("obs-websocket"),
QWebSocketServer::NonSecureMode);
diff --git a/forms/settings-dialog.cpp b/forms/settings-dialog.cpp
index 69b06db6..33be8370 100644
--- a/forms/settings-dialog.cpp
+++ b/forms/settings-dialog.cpp
@@ -41,13 +41,12 @@ SettingsDialog::SettingsDialog(QWidget* parent) :
AuthCheckboxChanged();
}
-void SettingsDialog::showEvent(QShowEvent* event)
-{
+void SettingsDialog::showEvent(QShowEvent* event) {
Config* conf = Config::Current();
ui->serverEnabled->setChecked(conf->ServerEnabled);
ui->serverPort->setValue(conf->ServerPort);
-
+
ui->debugEnabled->setChecked(conf->DebugEnabled);
ui->alertsEnabled->setChecked(conf->AlertsEnabled);
@@ -55,29 +54,26 @@ void SettingsDialog::showEvent(QShowEvent* event)
ui->password->setText(CHANGE_ME);
}
-void SettingsDialog::ToggleShowHide()
-{
+void SettingsDialog::ToggleShowHide() {
if (!isVisible())
setVisible(true);
else
setVisible(false);
}
-void SettingsDialog::AuthCheckboxChanged()
-{
+void SettingsDialog::AuthCheckboxChanged() {
if (ui->authRequired->isChecked())
ui->password->setEnabled(true);
else
ui->password->setEnabled(false);
}
-void SettingsDialog::FormAccepted()
-{
+void SettingsDialog::FormAccepted() {
Config* conf = Config::Current();
conf->ServerEnabled = ui->serverEnabled->isChecked();
conf->ServerPort = ui->serverPort->value();
-
+
conf->DebugEnabled = ui->debugEnabled->isChecked();
conf->AlertsEnabled = ui->alertsEnabled->isChecked();
@@ -109,7 +105,6 @@ void SettingsDialog::FormAccepted()
WSServer::Instance->Stop();
}
-SettingsDialog::~SettingsDialog()
-{
+SettingsDialog::~SettingsDialog() {
delete ui;
}