Remove FMT dependency (#1472)

All occurrences of log() have been replaced with qDebug()

bonus meme: remove a bunch of std::string usages in the pubsub client

Fixes #1467
This commit is contained in:
pajlada
2020-01-03 20:51:37 +01:00
committed by GitHub
parent f02988b657
commit 3c8992cac1
57 changed files with 230 additions and 4920 deletions
-17
View File
@@ -1,16 +1,9 @@
#pragma once
#include <fmt/format.h>
#include <QString>
namespace chatterino {
template <typename... Args>
auto fS(Args &&... args)
{
return fmt::format(std::forward<Args>(args)...);
}
QString generateUuid();
QString formatRichLink(const QString &url, bool file = false);
@@ -21,13 +14,3 @@ QString formatRichNamedLink(const QString &url, const QString &name,
QString shortenString(const QString &str, unsigned maxWidth = 50);
} // namespace chatterino
namespace fmt {
// format_arg for QString
inline void format_arg(BasicFormatter<char> &f, const char *&, const QString &v)
{
f.writer().write("{}", v.toStdString());
}
} // namespace fmt
-2
View File
@@ -5,8 +5,6 @@
#include <QSettings>
#include <QVariant>
#include "debug/Log.hpp"
namespace chatterino {
namespace {
#ifdef Q_OS_WIN
+2 -3
View File
@@ -1,7 +1,6 @@
#include "util/StreamLink.hpp"
#include "Application.hpp"
#include "debug/Log.hpp"
#include "singletons/Settings.hpp"
#include "util/Helpers.hpp"
#include "widgets/dialogs/QualityPopup.hpp"
@@ -92,7 +91,7 @@ namespace {
}
else
{
log("Error occured {}", err);
qDebug() << "Error occured" << err;
}
p->deleteLater();
@@ -119,7 +118,7 @@ void getStreamQualities(const QString &channelURL,
[=](int res) {
if (res != 0)
{
log("Got error code {}", res);
qDebug() << "Got error code" << res;
// return;
}
QString lastLine = QString(p->readAllStandardOutput());