From f31a74a6a834589312ed8b20fe19b6f3c6a550d9 Mon Sep 17 00:00:00 2001 From: IsmayilMirzali Date: Thu, 21 May 2020 00:44:34 +0300 Subject: Add option to open logs folder --- src/loglist.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/loglist.cpp') diff --git a/src/loglist.cpp b/src/loglist.cpp index 31f1817f..a4868ed4 100644 --- a/src/loglist.cpp +++ b/src/loglist.cpp @@ -214,6 +214,12 @@ void LogList::clear() static_cast(model())->clear(); } +void LogList::openLogsFolder() +{ + QString logsPath = qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::logPath()); + shell::Explore(logsPath); +} + QMenu* LogList::createMenu(QWidget* parent) { auto* menu = new QMenu(parent); @@ -221,6 +227,7 @@ QMenu* LogList::createMenu(QWidget* parent) menu->addAction(tr("&Copy all"), [&]{ copyToClipboard(); }); menu->addSeparator(); menu->addAction(tr("C&lear all"), [&]{ clear(); }); + menu->addAction(tr("&Open logs folder"), [&]{ openLogsFolder(); }); auto* levels = new QMenu(tr("&Level")); menu->addMenu(levels); -- cgit v1.3.1