signal_handler: add version and OS info

This commit is contained in:
tobtoht 2023-02-28 12:32:02 +01:00
parent a88595b42e
commit 4fe4136441
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -44,6 +44,8 @@ void signal_handler(int signum) {
if (config()->get(Config::writeStackTraceToDisk).toBool()) {
QString crashLogPath{Config::defaultConfigDir().path() + "/crash_report.txt"};
std::ofstream out(crashLogPath.toStdString());
out << QString("Version: %1-%2\n").arg(FEATHER_VERSION, FEATHER_COMMIT).toStdString();
out << QString("OS: %1\n").arg(QSysInfo::prettyProductName()).toStdString();
out << keyStream.str();
out.close();
}