commented out the unused logspage
This commit is contained in:
@@ -1,48 +1,49 @@
|
|||||||
#include "logspage.hpp"
|
//#include "logspage.hpp"
|
||||||
|
|
||||||
#include "application.hpp"
|
//#include "application.hpp"
|
||||||
#include "singletons/pathmanager.hpp"
|
//#include "singletons/pathmanager.hpp"
|
||||||
|
|
||||||
#include <QFormLayout>
|
//#include <QFormLayout>
|
||||||
#include <QVBoxLayout>
|
//#include <QVBoxLayout>
|
||||||
|
|
||||||
#include "util/layoutcreator.hpp"
|
//#include "util/layoutcreator.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
// namespace chatterino {
|
||||||
namespace widgets {
|
// namespace widgets {
|
||||||
namespace settingspages {
|
// namespace settingspages {
|
||||||
|
|
||||||
inline QString CreateLink(const QString &url, bool file = false)
|
// inline QString CreateLink(const QString &url, bool file = false)
|
||||||
{
|
//{
|
||||||
if (file) {
|
// if (file) {
|
||||||
return QString("<a href=\"file:///" + url + "\"><span style=\"color: white;\">" + url +
|
// return QString("<a href=\"file:///" + url + "\"><span style=\"color: white;\">" + url +
|
||||||
"</span></a>");
|
// "</span></a>");
|
||||||
}
|
// }
|
||||||
|
|
||||||
return QString("<a href=\"" + url + "\"><span style=\"color: white;\">" + url + "</span></a>");
|
// return QString("<a href=\"" + url + "\"><span style=\"color: white;\">" + url +
|
||||||
}
|
// "</span></a>");
|
||||||
|
//}
|
||||||
|
|
||||||
LogsPage::LogsPage()
|
// LogsPage::LogsPage()
|
||||||
: SettingsPage("Logs", "")
|
// : SettingsPage("Logs", "")
|
||||||
{
|
//{
|
||||||
auto app = getApp();
|
// auto app = getApp();
|
||||||
|
|
||||||
util::LayoutCreator<LogsPage> layoutCreator(this);
|
// util::LayoutCreator<LogsPage> layoutCreator(this);
|
||||||
auto layout = layoutCreator.emplace<QVBoxLayout>().withoutMargin();
|
// auto layout = layoutCreator.emplace<QVBoxLayout>().withoutMargin();
|
||||||
|
|
||||||
auto logPath = app->paths->logsFolderPath;
|
// auto logPath = app->paths->logsFolderPath;
|
||||||
|
|
||||||
auto created = layout.emplace<QLabel>();
|
// auto created = layout.emplace<QLabel>();
|
||||||
created->setText("Logs are saved to " + CreateLink(logPath, true));
|
// created->setText("Logs are saved to " + CreateLink(logPath, true));
|
||||||
created->setTextFormat(Qt::RichText);
|
// created->setTextFormat(Qt::RichText);
|
||||||
created->setTextInteractionFlags(Qt::TextBrowserInteraction | Qt::LinksAccessibleByKeyboard |
|
// created->setTextInteractionFlags(Qt::TextBrowserInteraction | Qt::LinksAccessibleByKeyboard |
|
||||||
Qt::LinksAccessibleByKeyboard);
|
// Qt::LinksAccessibleByKeyboard);
|
||||||
created->setOpenExternalLinks(true);
|
// created->setOpenExternalLinks(true);
|
||||||
layout.append(this->createCheckBox("Enable logging", app->settings->enableLogging));
|
// layout.append(this->createCheckBox("Enable logging", app->settings->enableLogging));
|
||||||
|
|
||||||
layout->addStretch(1);
|
// layout->addStretch(1);
|
||||||
}
|
//}
|
||||||
|
|
||||||
} // namespace settingspages
|
//} // namespace settingspages
|
||||||
} // namespace widgets
|
//} // namespace widgets
|
||||||
} // namespace chatterino
|
//} // namespace chatterino
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
#pragma once
|
//#pragma once
|
||||||
|
|
||||||
#include "widgets/settingspages/settingspage.hpp"
|
//#include "widgets/settingspages/settingspage.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
// namespace chatterino {
|
||||||
namespace widgets {
|
// namespace widgets {
|
||||||
namespace settingspages {
|
// namespace settingspages {
|
||||||
|
|
||||||
class LogsPage : public SettingsPage
|
// class LogsPage : public SettingsPage
|
||||||
{
|
//{
|
||||||
public:
|
// public:
|
||||||
LogsPage();
|
// LogsPage();
|
||||||
};
|
//};
|
||||||
|
|
||||||
} // namespace settingspages
|
//} // namespace settingspages
|
||||||
} // namespace widgets
|
//} // namespace widgets
|
||||||
} // namespace chatterino
|
//} // namespace chatterino
|
||||||
|
|||||||
Reference in New Issue
Block a user