mirror of
https://github.com/Palakis/obs-websocket.git
synced 2025-07-25 02:54:20 +00:00
ConnectInfo: Update QR code format
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
#include <QUrl>
|
||||||
#include <obs-module.h>
|
#include <obs-module.h>
|
||||||
|
|
||||||
#include "ConnectInfo.h"
|
#include "ConnectInfo.h"
|
||||||
@ -45,7 +46,7 @@ void ConnectInfo::showEvent(QShowEvent *event)
|
|||||||
QString serverPassword;
|
QString serverPassword;
|
||||||
if (conf->AuthRequired) {
|
if (conf->AuthRequired) {
|
||||||
ui->copyServerPasswordButton->setEnabled(true);
|
ui->copyServerPasswordButton->setEnabled(true);
|
||||||
serverPassword = conf->ServerPassword;
|
serverPassword = QUrl::toPercentEncoding(conf->ServerPassword);
|
||||||
} else {
|
} else {
|
||||||
ui->copyServerPasswordButton->setEnabled(false);
|
ui->copyServerPasswordButton->setEnabled(false);
|
||||||
serverPassword = obs_module_text("OBSWebSocket.ConnectInfo.ServerPasswordPlaceholderText");
|
serverPassword = obs_module_text("OBSWebSocket.ConnectInfo.ServerPasswordPlaceholderText");
|
||||||
@ -54,9 +55,9 @@ void ConnectInfo::showEvent(QShowEvent *event)
|
|||||||
|
|
||||||
QString connectString;
|
QString connectString;
|
||||||
if (conf->AuthRequired)
|
if (conf->AuthRequired)
|
||||||
connectString = QString("obswebsocket|%1:%2|%3").arg(serverIp).arg(serverPort).arg(serverPassword);
|
connectString = QString("obsws://%1:%2/%3").arg(serverIp).arg(serverPort).arg(serverPassword);
|
||||||
else
|
else
|
||||||
connectString = QString("obswebsocket|%1:%2").arg(serverIp).arg(serverPort);
|
connectString = QString("obsws://%1:%2").arg(serverIp).arg(serverPort);
|
||||||
DrawQr(connectString);
|
DrawQr(connectString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user