Switch to QT Category logging (#2206)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
#include "common/QLogging.hpp"
|
||||
|
||||
#ifdef USEWINSDK
|
||||
# include "util/WindowsHelper.hpp"
|
||||
@@ -192,7 +193,8 @@ void AttachedWindow::attachToHwnd(void *_attachedPtr)
|
||||
!qfilename.endsWith("brave.exe"))
|
||||
|
||||
{
|
||||
qDebug() << "NM Illegal caller" << qfilename;
|
||||
qCWarning(chatterinoWidget)
|
||||
<< "NM Illegal caller" << qfilename;
|
||||
this->timer_.stop();
|
||||
this->deleteLater();
|
||||
return;
|
||||
@@ -241,7 +243,7 @@ void AttachedWindow::updateWindowRect(void *_attachedPtr)
|
||||
|
||||
if (::GetLastError() != 0)
|
||||
{
|
||||
qDebug() << "NM GetLastError()" << ::GetLastError();
|
||||
qCWarning(chatterinoWidget) << "NM GetLastError()" << ::GetLastError();
|
||||
|
||||
this->timer_.stop();
|
||||
this->deleteLater();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "widgets/Notebook.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "singletons/Theme.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
@@ -153,7 +154,7 @@ void Notebook::select(QWidget *page)
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug()
|
||||
qCDebug(chatterinoWidget)
|
||||
<< "Notebook: selected child of page doesn't exist anymore";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "widgets/Scrollbar.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "singletons/Theme.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
@@ -228,11 +229,12 @@ void Scrollbar::setCurrentValue(qreal value)
|
||||
|
||||
void Scrollbar::printCurrentState(const QString &prefix) const
|
||||
{
|
||||
qDebug() << prefix //
|
||||
<< "Current value: " << this->getCurrentValue() //
|
||||
<< ". Maximum: " << this->getMaximum() //
|
||||
<< ". Minimum: " << this->getMinimum() //
|
||||
<< ". Large change: " << this->getLargeChange(); //
|
||||
qCDebug(chatterinoWidget)
|
||||
<< prefix //
|
||||
<< "Current value: " << this->getCurrentValue() //
|
||||
<< ". Maximum: " << this->getMaximum() //
|
||||
<< ". Minimum: " << this->getMinimum() //
|
||||
<< ". Large change: " << this->getLargeChange(); //
|
||||
}
|
||||
|
||||
void Scrollbar::paintEvent(QPaintEvent *)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Application.hpp"
|
||||
#include "common/Common.hpp"
|
||||
#include "common/NetworkRequest.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "util/Helpers.hpp"
|
||||
|
||||
@@ -108,11 +109,11 @@ BasicLoginWidget::BasicLoginWidget()
|
||||
this->ui_.layout.addWidget(&this->ui_.unableToOpenBrowserHelper);
|
||||
|
||||
connect(&this->ui_.loginButton, &QPushButton::clicked, [this, logInLink]() {
|
||||
qDebug() << "open login in browser";
|
||||
qCDebug(chatterinoWidget) << "open login in browser";
|
||||
auto res = QDesktopServices::openUrl(QUrl(logInLink));
|
||||
if (!res)
|
||||
{
|
||||
qDebug() << "open login in browser failed";
|
||||
qCWarning(chatterinoWidget) << "open login in browser failed";
|
||||
this->ui_.unableToOpenBrowserHelper.show();
|
||||
}
|
||||
});
|
||||
@@ -152,7 +153,7 @@ BasicLoginWidget::BasicLoginWidget()
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "Unknown key in code: " << key;
|
||||
qCWarning(chatterinoWidget) << "Unknown key in code: " << key;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "QualityPopup.hpp"
|
||||
#include "Application.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/StreamLink.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
@@ -55,7 +56,8 @@ void QualityPopup::okButtonClicked()
|
||||
}
|
||||
catch (const Exception &ex)
|
||||
{
|
||||
qDebug() << "Exception caught trying to open streamlink:" << ex.what();
|
||||
qCWarning(chatterinoWidget)
|
||||
<< "Exception caught trying to open streamlink:" << ex.what();
|
||||
}
|
||||
|
||||
this->close();
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/Common.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/commands/CommandController.hpp"
|
||||
#include "debug/Benchmark.hpp"
|
||||
@@ -892,8 +893,9 @@ void ChannelView::messageReplaced(size_t index, MessagePtr &replacement)
|
||||
auto snapshot = this->messages_.getSnapshot();
|
||||
if (index >= snapshot.size())
|
||||
{
|
||||
qDebug() << "Tried to replace out of bounds message. Index:" << index
|
||||
<< ". Length:" << snapshot.size();
|
||||
qCDebug(chatterinoWidget)
|
||||
<< "Tried to replace out of bounds message. Index:" << index
|
||||
<< ". Length:" << snapshot.size();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "AboutPage.hpp"
|
||||
|
||||
#include "common/Modes.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "common/Version.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "util/RemoveScrollAreaBackground.hpp"
|
||||
@@ -166,7 +167,8 @@ AboutPage::AboutPage()
|
||||
|
||||
if (contributorParts.size() != 4)
|
||||
{
|
||||
qDebug() << "Missing parts in line" << line;
|
||||
qCDebug(chatterinoWidget)
|
||||
<< "Missing parts in line" << line;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <boost/variant.hpp>
|
||||
#include "Application.hpp"
|
||||
#include "common/ChatterinoSetting.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "widgets/helper/SignalLabel.hpp"
|
||||
|
||||
@@ -190,7 +191,7 @@ public:
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *ev) override
|
||||
{
|
||||
qDebug() << ev->size();
|
||||
qCDebug(chatterinoWidget) << ev->size();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "common/Common.hpp"
|
||||
#include "common/Env.hpp"
|
||||
#include "common/NetworkRequest.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "providers/twitch/EmoteValue.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
@@ -639,7 +640,8 @@ void Split::openInStreamlink()
|
||||
}
|
||||
catch (const Exception &ex)
|
||||
{
|
||||
qDebug() << "Error in doOpenStreamlink:" << ex.what();
|
||||
qCWarning(chatterinoWidget)
|
||||
<< "Error in doOpenStreamlink:" << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user