Apply clang-format

This commit is contained in:
Martchus 2021-05-27 18:16:56 +02:00
parent 0c475f5b7e
commit 93f59ebf8a
3 changed files with 6 additions and 3 deletions

View File

@ -699,7 +699,8 @@ DateTime SyncthingConnection::parseTimeStamp(const QJsonValue &jsonValue, const
const auto [localTime, utcOffset] = DateTime::fromIsoString(utf8.data());
return !greaterThanEpoch || (localTime - utcOffset) > DateTime::unixEpochStart() ? localTime : defaultValue;
} catch (const ConversionException &e) {
emit error(tr("Unable to parse timestamp \"%1\" (%2): %3").arg(utf16, context, QString::fromUtf8(e.what())), SyncthingErrorCategory::Parsing, QNetworkReply::NoError);
emit error(tr("Unable to parse timestamp \"%1\" (%2): %3").arg(utf16, context, QString::fromUtf8(e.what())), SyncthingErrorCategory::Parsing,
QNetworkReply::NoError);
}
return defaultValue;
}

View File

@ -345,7 +345,8 @@ private:
bool pauseResumeDirectory(const QStringList &dirIds, bool paused);
SyncthingDir *addDirInfo(std::vector<SyncthingDir> &dirs, const QString &dirId);
SyncthingDev *addDevInfo(std::vector<SyncthingDev> &devs, const QString &devId);
CppUtilities::DateTime parseTimeStamp(const QJsonValue &jsonValue, const QString &context, CppUtilities::DateTime defaultValue = CppUtilities::DateTime(), bool greaterThanEpoch = false);
CppUtilities::DateTime parseTimeStamp(const QJsonValue &jsonValue, const QString &context,
CppUtilities::DateTime defaultValue = CppUtilities::DateTime(), bool greaterThanEpoch = false);
QString m_syncthingUrl;
QByteArray m_apiKey;

View File

@ -83,7 +83,8 @@ void InternalErrorsDialog::addError(InternalError &&newError)
void InternalErrorsDialog::internalAddError(const InternalError &error)
{
const QString url = error.url.toString();
browser()->append(QString::fromUtf8(error.when.toString(DateTimeOutputFormat::DateAndTime, true).data()) % QChar(':') % QChar(' ') % error.message);
browser()->append(
QString::fromUtf8(error.when.toString(DateTimeOutputFormat::DateAndTime, true).data()) % QChar(':') % QChar(' ') % error.message);
if (!url.isEmpty()) {
browser()->append(m_request % QChar(' ') % url);
}