Skip to content

Commit

Permalink
Format with clang formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannMG committed Oct 25, 2019
1 parent c41c329 commit 5125c60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions UI/url-push-button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ void UrlPushButton::mousePressEvent(QMouseEvent *event)
{
Q_UNUSED(event)
QUrl openUrl = m_targetUrl;
if (openUrl.isEmpty())
if (openUrl.isEmpty())
return;

QDesktopServices::openUrl(openUrl);
}
4 changes: 2 additions & 2 deletions UI/url-push-button.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ class UrlPushButton : public QPushButton {
Q_PROPERTY(QUrl targetUrl READ targetUrl WRITE setTargetUrl)

public:
inline UrlPushButton (QWidget *parent = nullptr) : QPushButton(parent) {}
inline UrlPushButton(QWidget *parent = nullptr) : QPushButton(parent) {}
void setTargetUrl(QUrl url);
QUrl targetUrl();

protected:
void mousePressEvent(QMouseEvent *event) override;

private:
private:
QUrl m_targetUrl;
};
19 changes: 11 additions & 8 deletions UI/window-basic-settings-stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,24 +180,27 @@ void OBSBasicSettings::SaveStream1Settings()
void OBSBasicSettings::UpdateKeyLink()
{
if (IsCustomService()) {
ui->getStreamKeyButton->hide();
return;
ui->getStreamKeyButton->hide();
return;
}

QString serviceName = ui->service->currentText();
QString streamKeyLink;
if (serviceName == "Twitch") {
streamKeyLink = QTStr("https://www.twitch.tv/broadcast/dashboard/streamkey");
if (serviceName == "Twitch") {
streamKeyLink = QTStr(
"https://www.twitch.tv/broadcast/dashboard/streamkey");
} else if (serviceName == "YouTube / YouTube Gaming") {
streamKeyLink = QTStr("https://www.youtube.com/live_dashboard");
} else if (serviceName.startsWith("Restream.io")) {
streamKeyLink = QTStr("https://restream.io/settings/streaming-setup?from=OBS");
streamKeyLink = QTStr(
"https://restream.io/settings/streaming-setup?from=OBS");
} else if (serviceName == "Facebook Live") {
streamKeyLink += QTStr("https://www.facebook.com/live/create?ref=OBS");
streamKeyLink +=
QTStr("https://www.facebook.com/live/create?ref=OBS");
} else if (serviceName.startsWith("Twitter")) {
streamKeyLink = QTStr("https://www.pscp.tv/account/producer");
}

if (QString(streamKeyLink).isNull()) {
ui->getStreamKeyButton->hide();
} else {
Expand Down

0 comments on commit 5125c60

Please sign in to comment.