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
-1
View File
@@ -1,5 +1,4 @@
#include "widgets/AccountSwitchPopup.hpp"
#include "debug/Log.hpp"
#include "widgets/dialogs/SettingsDialog.hpp"
#include <QHBoxLayout>
-1
View File
@@ -2,7 +2,6 @@
#include "BaseSettings.hpp"
#include "BaseTheme.hpp"
#include "debug/Log.hpp"
#include "widgets/BaseWindow.hpp"
#include <QChildEvent>
+2 -3
View File
@@ -3,7 +3,6 @@
#include "BaseSettings.hpp"
#include "BaseTheme.hpp"
#include "boost/algorithm/algorithm.hpp"
#include "debug/Log.hpp"
#include "util/PostToThread.hpp"
#include "util/Shortcut.hpp"
#include "util/WindowsHelper.hpp"
@@ -385,7 +384,7 @@ void BaseWindow::mousePressEvent(QMouseEvent *event)
if (!recursiveCheckMouseTracking(widget))
{
log("Start moving");
qDebug() << "Start moving";
this->moving = true;
}
}
@@ -402,7 +401,7 @@ void BaseWindow::mouseReleaseEvent(QMouseEvent *event)
{
if (this->moving)
{
log("Stop moving");
qDebug() << "Stop moving";
this->moving = false;
}
}
-1
View File
@@ -1,7 +1,6 @@
#include "widgets/Notebook.hpp"
#include "Application.hpp"
#include "debug/Log.hpp"
#include "singletons/Settings.hpp"
#include "singletons/Theme.hpp"
#include "singletons/WindowManager.hpp"
+1 -1
View File
@@ -65,7 +65,7 @@ namespace {
// messageBox.setIcon(QMessageBox::Information);
// messageBox.setText("Successfully logged in with user <b>" +
// qS(username) + "</b>!");
auto basePath = fS("/accounts/uid{}", userID);
std::string basePath = "/accounts/uid" + userID.toStdString();
pajlada::Settings::Setting<QString>::set(basePath + "/username",
username);
pajlada::Settings::Setting<QString>::set(basePath + "/userID", userID);
+1 -2
View File
@@ -3,7 +3,6 @@
#include "IrcMessage"
#include "common/Channel.hpp"
#include "common/NetworkRequest.hpp"
#include "debug/Log.hpp"
#include "messages/Message.hpp"
#include "providers/twitch/PartialTwitchUser.hpp"
#include "providers/twitch/TwitchChannel.hpp"
@@ -70,7 +69,7 @@ void LogsPopup::getLogs()
return;
}
log("Unable to get logs, no channel name or something specified");
qDebug() << "Unable to get logs, no channel name or something specified";
}
void LogsPopup::setMessages(std::vector<MessagePtr> &messages)
+1 -2
View File
@@ -1,5 +1,4 @@
#include "QualityPopup.hpp"
#include "debug/Log.hpp"
#include "util/StreamLink.hpp"
namespace chatterino {
@@ -50,7 +49,7 @@ void QualityPopup::okButtonClicked()
}
catch (const Exception &ex)
{
log("Exception caught trying to open streamlink: {}", ex.what());
qDebug() << "Exception caught trying to open streamlink:" << ex.what();
}
this->close();
+2 -4
View File
@@ -16,7 +16,6 @@
#include "common/Common.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "debug/Benchmark.hpp"
#include "debug/Log.hpp"
#include "messages/Emote.hpp"
#include "messages/LimitedQueueSnapshot.hpp"
#include "messages/Message.hpp"
@@ -740,9 +739,8 @@ void ChannelView::messageReplaced(size_t index, MessagePtr &replacement)
auto snapshot = this->messages_.getSnapshot();
if (index >= snapshot.size())
{
log("Tried to replace out of bounds message. Index: {}. "
"Length: {}",
index, snapshot.size());
qDebug() << "Tried to replace out of bounds message. Index:" << index
<< ". Length:" << snapshot.size();
return;
}
-1
View File
@@ -2,7 +2,6 @@
#include "Application.hpp"
#include "common/Common.hpp"
#include "debug/Log.hpp"
#include "singletons/Fonts.hpp"
#include "singletons/Settings.hpp"
#include "singletons/Theme.hpp"
+1 -4
View File
@@ -2,7 +2,6 @@
#include "common/Modes.hpp"
#include "common/Version.hpp"
#include "debug/Log.hpp"
#include "util/LayoutCreator.hpp"
#include "util/RemoveScrollAreaBackground.hpp"
#include "widgets/helper/SignalLabel.hpp"
@@ -102,8 +101,6 @@ AboutPage::AboutPage()
":/licenses/qt_lgpl-3.0.txt");
addLicense(form.getElement(), "Boost", "https://www.boost.org/",
":/licenses/boost_boost.txt");
addLicense(form.getElement(), "Fmt", "http://fmtlib.net/",
":/licenses/fmt_bsd2.txt");
addLicense(form.getElement(), "LibCommuni",
"https://github.com/communi/libcommuni",
":/licenses/libcommuni_BSD3.txt");
@@ -166,7 +163,7 @@ AboutPage::AboutPage()
if (contributorParts.size() != 4)
{
log("Missing parts in line '{}'", line);
qDebug() << "Missing parts in line" << line;
continue;
}
@@ -5,7 +5,6 @@
#include "controllers/highlights/HighlightController.hpp"
#include "controllers/highlights/HighlightModel.hpp"
#include "controllers/highlights/UserHighlightModel.hpp"
#include "debug/Log.hpp"
#include "singletons/Settings.hpp"
#include "util/LayoutCreator.hpp"
#include "util/StandardItemHelper.hpp"
+1 -2
View File
@@ -3,7 +3,6 @@
#include "common/Common.hpp"
#include "common/NetworkRequest.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "debug/Log.hpp"
#include "providers/twitch/EmoteValue.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
@@ -530,7 +529,7 @@ void Split::openInStreamlink()
}
catch (const Exception &ex)
{
log("Error in doOpenStreamlink: {}", ex.what());
qDebug() << "Error in doOpenStreamlink:" << ex.what();
}
}