diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp
index a7d9797e..f0d23e21 100644
--- a/src/TextInputWidget.cpp
+++ b/src/TextInputWidget.cpp
@@ -779,8 +779,7 @@ void
TextInputWidget::changeCallButtonState(webrtc::State state)
{
QIcon icon;
- if (state == webrtc::State::ICEFAILED ||
- state == webrtc::State::DISCONNECTED) {
+ if (state == webrtc::State::ICEFAILED || state == webrtc::State::DISCONNECTED) {
callBtn_->setToolTip(tr("Place a call"));
icon.addFile(":/icons/icons/ui/place-call.png");
} else {
diff --git a/src/WebRTCSession.cpp b/src/WebRTCSession.cpp
index 8f877c41..b4eaadab 100644
--- a/src/WebRTCSession.cpp
+++ b/src/WebRTCSession.cpp
@@ -1,5 +1,5 @@
-#include <cctype>
#include <QQmlEngine>
+#include <cctype>
#include "Logging.h"
#include "WebRTCSession.h"
@@ -21,15 +21,10 @@ using webrtc::State;
WebRTCSession::WebRTCSession()
: QObject()
-{
+{
qRegisterMetaType<webrtc::State>();
qmlRegisterUncreatableMetaObject(
- webrtc::staticMetaObject,
- "im.nheko",
- 1,
- 0,
- "WebRTCState",
- "Can't instantiate enum");
+ webrtc::staticMetaObject, "im.nheko", 1, 0, "WebRTCState", "Can't instantiate enum");
connect(this, &WebRTCSession::stateChanged, this, &WebRTCSession::setState);
init();
@@ -257,12 +252,10 @@ iceGatheringStateChanged(GstElement *webrtc,
nhlog::ui()->debug("WebRTC: GstWebRTCICEGatheringState -> Complete");
if (isoffering_) {
emit WebRTCSession::instance().offerCreated(localsdp_, localcandidates_);
- emit WebRTCSession::instance().stateChanged(
- State::OFFERSENT);
+ emit WebRTCSession::instance().stateChanged(State::OFFERSENT);
} else {
emit WebRTCSession::instance().answerCreated(localsdp_, localcandidates_);
- emit WebRTCSession::instance().stateChanged(
- State::ANSWERSENT);
+ emit WebRTCSession::instance().stateChanged(State::ANSWERSENT);
}
}
}
@@ -366,8 +359,7 @@ linkNewPad(GstElement *decodebin G_GNUC_UNUSED, GstPad *newpad, GstElement *pipe
if (GST_PAD_LINK_FAILED(gst_pad_link(newpad, queuepad)))
nhlog::ui()->error("WebRTC: unable to link new pad");
else {
- emit WebRTCSession::instance().stateChanged(
- State::CONNECTED);
+ emit WebRTCSession::instance().stateChanged(State::CONNECTED);
}
gst_object_unref(queuepad);
}
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index 3a308be8..09ab8cf8 100644
--- a/src/timeline/TimelineViewManager.cpp
+++ b/src/timeline/TimelineViewManager.cpp
@@ -141,8 +141,10 @@ TimelineViewManager::TimelineViewManager(QSharedPointer<UserSettings> userSettin
isInitialSync_ = true;
emit initialSyncChanged(true);
});
- connect(
- &WebRTCSession::instance(), &WebRTCSession::stateChanged, this, &TimelineViewManager::callStateChanged);
+ connect(&WebRTCSession::instance(),
+ &WebRTCSession::stateChanged,
+ this,
+ &TimelineViewManager::callStateChanged);
}
void
diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h
index fdf1603d..243927ef 100644
--- a/src/timeline/TimelineViewManager.h
+++ b/src/timeline/TimelineViewManager.h
@@ -34,8 +34,7 @@ class TimelineViewManager : public QObject
bool isInitialSync MEMBER isInitialSync_ READ isInitialSync NOTIFY initialSyncChanged)
Q_PROPERTY(
bool isNarrowView MEMBER isNarrowView_ READ isNarrowView NOTIFY narrowViewChanged)
- Q_PROPERTY(
- webrtc::State callState READ callState NOTIFY callStateChanged)
+ Q_PROPERTY(webrtc::State callState READ callState NOTIFY callStateChanged)
public:
TimelineViewManager(QSharedPointer<UserSettings> userSettings,
@@ -52,7 +51,10 @@ public:
Q_INVOKABLE bool isInitialSync() const { return isInitialSync_; }
bool isNarrowView() const { return isNarrowView_; }
webrtc::State callState() const { return WebRTCSession::instance().state(); }
- Q_INVOKABLE bool toggleMuteAudioSource() { return WebRTCSession::instance().toggleMuteAudioSource(); }
+ Q_INVOKABLE bool toggleMuteAudioSource()
+ {
+ return WebRTCSession::instance().toggleMuteAudioSource();
+ }
Q_INVOKABLE void openImageOverlay(QString mxcUrl, QString eventId) const;
Q_INVOKABLE QColor userColor(QString id, QColor background);
Q_INVOKABLE QString escapeEmoji(QString str) const;
|