File indexing completed on 2024-06-16 04:16:26

0001 /*
0002  * SPDX-FileCopyrightText: 2022 Sharaf Zaman <shzam@sdf.org>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 #include "DlgCrashLog.h"
0008 
0009 #include <QStandardPaths>
0010 
0011 DlgCrashLog::DlgCrashLog(QWidget *parent)
0012     : DlgBugInfo(parent)
0013 {
0014     initialize();
0015 }
0016 
0017 QString DlgCrashLog::defaultNewFileName() { return "KritaCrashLog.txt"; }
0018 
0019 QString DlgCrashLog::originalFileName()
0020 {
0021 #ifdef Q_OS_WIN
0022     return QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation).replace(L'/', L'\\')
0023          + QStringLiteral("\\kritacrash.log");
0024 #elif defined(Q_OS_ANDROID)
0025     return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/kritacrashlog.txt";
0026 #else
0027     // since we only have crash log for windows and android
0028     return QString();
0029 #endif
0030 }
0031 
0032 QString DlgCrashLog::captionText()
0033 {
0034     return i18nc("Caption of the dialog with crash log for bug reports",
0035                  "Krita Crash Log: please paste this information to the bug report");
0036 }
0037 
0038 QString DlgCrashLog::replacementWarningText() { return "No Crashes!\n"; }