diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-06-02 01:37:53 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-06-08 22:32:08 +0200 |
commit | de8522a185f9d62eaefb37d0f1a5e2e77c73c175 (patch) | |
tree | f97226408199f2f66c1815c71f7ef0e571d3fafc /src/ui | |
parent | Get rid of scrollhelper (diff) | |
download | nheko-de8522a185f9d62eaefb37d0f1a5e2e77c73c175.tar.xz |
lint
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/MxcMediaProxy.cpp | 22 | ||||
-rw-r--r-- | src/ui/MxcMediaProxy.h | 4 | ||||
-rw-r--r-- | src/ui/NhekoGlobalObject.cpp | 21 | ||||
-rw-r--r-- | src/ui/Theme.cpp | 1 |
4 files changed, 24 insertions, 24 deletions
diff --git a/src/ui/MxcMediaProxy.cpp b/src/ui/MxcMediaProxy.cpp index dd5d81a9..2adf2538 100644 --- a/src/ui/MxcMediaProxy.cpp +++ b/src/ui/MxcMediaProxy.cpp @@ -25,22 +25,15 @@ MxcMediaProxy::MxcMediaProxy(QObject *parent) { connect(this, &MxcMediaProxy::eventIdChanged, &MxcMediaProxy::startDownload); connect(this, &MxcMediaProxy::roomChanged, &MxcMediaProxy::startDownload); - connect(this, -&QMediaPlayer::errorOccurred, - this, - [](QMediaPlayer::Error error, QString errorString) { - nhlog::ui()->debug("Media player error {} and errorStr {}", - error, - errorString.toStdString()); - }); + connect( + this, &QMediaPlayer::errorOccurred, this, [](QMediaPlayer::Error error, QString errorString) { + nhlog::ui()->debug( + "Media player error {} and errorStr {}", error, errorString.toStdString()); + }); connect(this, &MxcMediaProxy::mediaStatusChanged, [this](QMediaPlayer::MediaStatus status) { nhlog::ui()->info("Media player status {} and error {}", status, this->error()); }); - connect(this, - &MxcMediaProxy::metaDataChanged, - [this]() { - emit orientationChanged(); - }); + connect(this, &MxcMediaProxy::metaDataChanged, [this]() { emit orientationChanged(); }); connect(ChatPage::instance()->timelineManager()->rooms(), &RoomlistModel::currentRoomChanged, @@ -51,7 +44,8 @@ MxcMediaProxy::MxcMediaProxy(QObject *parent) int MxcMediaProxy::orientation() const { - //nhlog::ui()->debug("metadata: {}", availableMetaData().join(QStringLiteral(",")).toStdString()); + // nhlog::ui()->debug("metadata: {}", + // availableMetaData().join(QStringLiteral(",")).toStdString()); auto orientation = metaData().value(QMediaMetaData::Orientation).toInt(); nhlog::ui()->debug("Video orientation: {}", orientation); return orientation; diff --git a/src/ui/MxcMediaProxy.h b/src/ui/MxcMediaProxy.h index 7b7947e9..5c2eac33 100644 --- a/src/ui/MxcMediaProxy.h +++ b/src/ui/MxcMediaProxy.h @@ -4,13 +4,13 @@ #pragma once -#include <QVideoSink> #include <QBuffer> -#include <QUrl> #include <QMediaPlayer> #include <QObject> #include <QPointer> #include <QString> +#include <QUrl> +#include <QVideoSink> #include "Logging.h" diff --git a/src/ui/NhekoGlobalObject.cpp b/src/ui/NhekoGlobalObject.cpp index 8f410dae..0bdb45f4 100644 --- a/src/ui/NhekoGlobalObject.cpp +++ b/src/ui/NhekoGlobalObject.cpp @@ -5,8 +5,8 @@ #include "NhekoGlobalObject.h" #include <QApplication> -#include <QGuiApplication> #include <QDesktopServices> +#include <QGuiApplication> #include <QStyle> #include <QUrl> #include <QWindow> @@ -184,9 +184,11 @@ Nheko::createRoom(bool space, void Nheko::setWindowRole([[maybe_unused]] QWindow *win, [[maybe_unused]] QString newRole) const { - const QNativeInterface::QX11Application *x11Interface = qGuiApp->nativeInterface<QNativeInterface::QX11Application>(); + const QNativeInterface::QX11Application *x11Interface = + qGuiApp->nativeInterface<QNativeInterface::QX11Application>(); - if (!x11Interface) return; + if (!x11Interface) + return; auto connection = x11Interface->connection(); @@ -195,10 +197,15 @@ Nheko::setWindowRole([[maybe_unused]] QWindow *win, [[maybe_unused]] QString new char WM_WINDOW_ROLE[] = "WM_WINDOW_ROLE"; auto cookie = xcb_intern_atom(connection, false, std::size(WM_WINDOW_ROLE) - 1, WM_WINDOW_ROLE); xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(connection, cookie, nullptr); - auto atom = reply ->atom; + auto atom = reply->atom; free(reply); - xcb_change_property(connection, XCB_PROP_MODE_REPLACE, win->winId(), - atom, XCB_ATOM_STRING, 8, - role.size(), role.data()); + xcb_change_property(connection, + XCB_PROP_MODE_REPLACE, + win->winId(), + atom, + XCB_ATOM_STRING, + 8, + role.size(), + role.data()); } diff --git a/src/ui/Theme.cpp b/src/ui/Theme.cpp index 8cf38548..159fc2ae 100644 --- a/src/ui/Theme.cpp +++ b/src/ui/Theme.cpp @@ -4,7 +4,6 @@ #include "Theme.h" - QPalette Theme::paletteFromTheme(QStringView theme) { |