mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Remove getPaths() usage from LastRunCrashDialog
This commit is contained in:
parent
3f599ea609
commit
a2e91770e8
3 changed files with 7 additions and 7 deletions
|
@ -98,9 +98,9 @@ namespace {
|
|||
installCustomPalette();
|
||||
}
|
||||
|
||||
void showLastCrashDialog(const Args &args)
|
||||
void showLastCrashDialog(const Args &args, const Paths &paths)
|
||||
{
|
||||
auto *dialog = new LastRunCrashDialog(args);
|
||||
auto *dialog = new LastRunCrashDialog(args, paths);
|
||||
// Use exec() over open() to block the app from being loaded
|
||||
// and to be able to set the safe mode.
|
||||
dialog->exec();
|
||||
|
@ -233,7 +233,7 @@ void runGui(QApplication &a, const Paths &paths, Settings &settings,
|
|||
#ifdef Q_OS_WIN
|
||||
if (args.crashRecovery)
|
||||
{
|
||||
showLastCrashDialog(args);
|
||||
showLastCrashDialog(args, paths);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace chatterino {
|
|||
|
||||
using namespace literals;
|
||||
|
||||
LastRunCrashDialog::LastRunCrashDialog(const Args &args)
|
||||
LastRunCrashDialog::LastRunCrashDialog(const Args &args, const Paths &paths)
|
||||
{
|
||||
this->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||
this->setWindowTitle(u"Chatterino - " % randomMessage());
|
||||
|
@ -56,8 +56,7 @@ LastRunCrashDialog::LastRunCrashDialog(const Args &args)
|
|||
"<i>You can disable automatic restarts in the settings.</i><br><br>";
|
||||
|
||||
#ifdef CHATTERINO_WITH_CRASHPAD
|
||||
auto reportsDir =
|
||||
QDir(getPaths()->crashdumpDirectory).filePath(u"reports"_s);
|
||||
auto reportsDir = QDir(paths.crashdumpDirectory).filePath(u"reports"_s);
|
||||
text += u"A <b>crash report</b> has been saved to "
|
||||
"<a href=\"file:///" %
|
||||
reportsDir % u"\">" % reportsDir % u"</a>.<br>";
|
||||
|
|
|
@ -5,11 +5,12 @@
|
|||
namespace chatterino {
|
||||
|
||||
class Args;
|
||||
class Paths;
|
||||
|
||||
class LastRunCrashDialog : public QDialog
|
||||
{
|
||||
public:
|
||||
explicit LastRunCrashDialog(const Args &args);
|
||||
explicit LastRunCrashDialog(const Args &args, const Paths &paths);
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
Loading…
Reference in a new issue