mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
parent
fa653bc078
commit
e89e65dc17
4 changed files with 14 additions and 9 deletions
|
@ -434,7 +434,7 @@ Cache::loadSecretsFromStore(
|
||||||
if (job->error() && job->error() != QKeychain::Error::EntryNotFound) {
|
if (job->error() && job->error() != QKeychain::Error::EntryNotFound) {
|
||||||
nhlog::db()->error("Restoring secret '{}' failed ({}): {}",
|
nhlog::db()->error("Restoring secret '{}' failed ({}): {}",
|
||||||
name.toStdString(),
|
name.toStdString(),
|
||||||
job->error(),
|
static_cast<int>(job->error()),
|
||||||
job->errorString().toStdString());
|
job->errorString().toStdString());
|
||||||
|
|
||||||
fatalSecretError();
|
fatalSecretError();
|
||||||
|
|
|
@ -37,7 +37,7 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
|
||||||
, deviceIds(std::move(deviceIds_))
|
, deviceIds(std::move(deviceIds_))
|
||||||
, model_(model)
|
, model_(model)
|
||||||
{
|
{
|
||||||
nhlog::crypto()->debug("CREATING NEW FLOW, {}, {}", flow_type, (void *)this);
|
nhlog::crypto()->debug("CREATING NEW FLOW, {}, {}", static_cast<int>(flow_type), (void *)this);
|
||||||
if (deviceIds.size() == 1)
|
if (deviceIds.size() == 1)
|
||||||
deviceId = deviceIds.front();
|
deviceId = deviceIds.front();
|
||||||
|
|
||||||
|
|
|
@ -1041,14 +1041,16 @@ MediaUpload::MediaUpload(std::unique_ptr<QIODevice> source_,
|
||||||
&QMediaPlayer::errorOccurred,
|
&QMediaPlayer::errorOccurred,
|
||||||
this,
|
this,
|
||||||
[](QMediaPlayer::Error error, QString errorString) {
|
[](QMediaPlayer::Error error, QString errorString) {
|
||||||
nhlog::ui()->debug(
|
nhlog::ui()->debug("Media player error {} and errorStr {}",
|
||||||
"Media player error {} and errorStr {}", error, errorString.toStdString());
|
static_cast<int>(error),
|
||||||
|
errorString.toStdString());
|
||||||
});
|
});
|
||||||
connect(mediaPlayer,
|
connect(mediaPlayer,
|
||||||
&QMediaPlayer::mediaStatusChanged,
|
&QMediaPlayer::mediaStatusChanged,
|
||||||
[mediaPlayer](QMediaPlayer::MediaStatus status) {
|
[mediaPlayer](QMediaPlayer::MediaStatus status) {
|
||||||
nhlog::ui()->debug(
|
nhlog::ui()->debug("Media player status {} and error {}",
|
||||||
"Media player status {} and error {}", status, mediaPlayer->error());
|
static_cast<int>(status),
|
||||||
|
static_cast<int>(mediaPlayer->error()));
|
||||||
});
|
});
|
||||||
connect(mediaPlayer, &QMediaPlayer::metaDataChanged, this, [this, mediaPlayer]() {
|
connect(mediaPlayer, &QMediaPlayer::metaDataChanged, this, [this, mediaPlayer]() {
|
||||||
nhlog::ui()->debug("Got metadata {}");
|
nhlog::ui()->debug("Got metadata {}");
|
||||||
|
|
|
@ -27,11 +27,14 @@ MxcMediaProxy::MxcMediaProxy(QObject *parent)
|
||||||
connect(this, &MxcMediaProxy::roomChanged, &MxcMediaProxy::startDownload);
|
connect(this, &MxcMediaProxy::roomChanged, &MxcMediaProxy::startDownload);
|
||||||
connect(
|
connect(
|
||||||
this, &QMediaPlayer::errorOccurred, this, [](QMediaPlayer::Error error, QString errorString) {
|
this, &QMediaPlayer::errorOccurred, this, [](QMediaPlayer::Error error, QString errorString) {
|
||||||
nhlog::ui()->debug(
|
nhlog::ui()->debug("Media player error {} and errorStr {}",
|
||||||
"Media player error {} and errorStr {}", error, errorString.toStdString());
|
static_cast<int>(error),
|
||||||
|
errorString.toStdString());
|
||||||
});
|
});
|
||||||
connect(this, &MxcMediaProxy::mediaStatusChanged, [this](QMediaPlayer::MediaStatus status) {
|
connect(this, &MxcMediaProxy::mediaStatusChanged, [this](QMediaPlayer::MediaStatus status) {
|
||||||
nhlog::ui()->info("Media player status {} and error {}", status, this->error());
|
nhlog::ui()->info("Media player status {} and error {}",
|
||||||
|
static_cast<int>(status),
|
||||||
|
static_cast<int>(this->error()));
|
||||||
});
|
});
|
||||||
connect(this, &MxcMediaProxy::metaDataChanged, [this]() { emit orientationChanged(); });
|
connect(this, &MxcMediaProxy::metaDataChanged, [this]() { emit orientationChanged(); });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue