mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-09 15:24:34 +00:00
Prompt user explicitly to upload exact crash related files
Signed-off-by: Max Risuhin <risuhin.max@gmail.com>
This commit is contained in:
parent
e20af4d206
commit
aea75a2de0
@ -46,12 +46,6 @@ QProcess *g_nodeJsServerProcess = nullptr;
|
|||||||
const int MAIN_WINDOW_WIDTH = 1024;
|
const int MAIN_WINDOW_WIDTH = 1024;
|
||||||
const int MAIN_WINDOW_HEIGHT = 768;
|
const int MAIN_WINDOW_HEIGHT = 768;
|
||||||
const QString CRASH_REPORT_EXECUTABLE = QStringLiteral("reportApp");
|
const QString CRASH_REPORT_EXECUTABLE = QStringLiteral("reportApp");
|
||||||
const QString CRASH_REPORT_EXECUTABLE_RELATIVE_PATH =
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
QStringLiteral("");
|
|
||||||
#else
|
|
||||||
QStringLiteral("/../reportApp");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *ENABLE_LOG_FILE_ENV_VAR_NAME = "STATUS_LOG_FILE_ENABLED";
|
const char *ENABLE_LOG_FILE_ENV_VAR_NAME = "STATUS_LOG_FILE_ENABLED";
|
||||||
const char *LOG_FILE_PATH_ENV_VAR_NAME = "STATUS_LOG_PATH";
|
const char *LOG_FILE_PATH_ENV_VAR_NAME = "STATUS_LOG_PATH";
|
||||||
@ -253,7 +247,6 @@ int main(int argc, char **argv) {
|
|||||||
killZombieJsServer();
|
killZombieJsServer();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
appPath.append(CRASH_REPORT_EXECUTABLE_RELATIVE_PATH);
|
|
||||||
dataStoragePath = "";
|
dataStoragePath = "";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ Rectangle {
|
|||||||
Text {
|
Text {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
text: "Please report us crash log files to allow us fix the issue!"
|
text: "Please report us <b>crash.dmp</b> and <b>Status</b> executable files to allow us fix the issue!"
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pointSize: 20
|
font.pointSize: 20
|
||||||
}
|
}
|
||||||
@ -63,7 +63,8 @@ Rectangle {
|
|||||||
wrapMode: TextEdit.Wrap
|
wrapMode: TextEdit.Wrap
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
text: "Log files directory:\n" + reportPublisher.resolveDataStoragePath()
|
textFormat: TextEdit.RichText
|
||||||
|
text: "<div>Please upload both <b>crash.dmp</b> and <b>Status</b> executable files from the report directory:<br>" + reportPublisher.resolveDataStoragePath() + "</div>"
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
@ -36,17 +36,23 @@ void ReportPublisher::submit() {
|
|||||||
void ReportPublisher::restartAndQuit() {
|
void ReportPublisher::restartAndQuit() {
|
||||||
QString appPath = m_crashedExecutablePath;
|
QString appPath = m_crashedExecutablePath;
|
||||||
|
|
||||||
#ifdef Q_OS_MACOS
|
#if defined(Q_OS_MACOS) || defined(Q_OS_LINUX)
|
||||||
QFileInfo crashedExecutableFileInfo(m_crashedExecutablePath);
|
QFileInfo crashedExecutableFileInfo(m_crashedExecutablePath);
|
||||||
QString fullPath = crashedExecutableFileInfo.dir().absolutePath();
|
QString fullPath = crashedExecutableFileInfo.dir().absolutePath();
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
const QString bundleExtension = QStringLiteral(".app");
|
const QString bundleExtension = QStringLiteral(".app");
|
||||||
|
const QString cmdTemplate = QStringLiteral("open \"%1\"");
|
||||||
|
#else
|
||||||
|
const QString bundleExtension = QStringLiteral(".AppImage");
|
||||||
|
const QString cmdTemplate = QStringLiteral("\"%1\"");
|
||||||
|
#endif
|
||||||
if (fullPath.contains(bundleExtension)) {
|
if (fullPath.contains(bundleExtension)) {
|
||||||
appPath = fullPath.left(fullPath.indexOf(bundleExtension) +
|
appPath = fullPath.left(fullPath.indexOf(bundleExtension) +
|
||||||
bundleExtension.size());
|
bundleExtension.size());
|
||||||
}
|
}
|
||||||
QString cmd = QString("open %1").arg(appPath);
|
QString cmd = QString(cmdTemplate).arg(appPath);
|
||||||
#else
|
#else
|
||||||
QString cmd = appPath;
|
QString cmd = QString("\"%1\"").arg(appPath);;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QProcess::startDetached(cmd);
|
QProcess::startDetached(cmd);
|
||||||
@ -61,8 +67,8 @@ void ReportPublisher::showDirectory() {
|
|||||||
if (!m_logFilesPrepared) {
|
if (!m_logFilesPrepared) {
|
||||||
m_logFilesPrepared = prepareReportFiles(dataStoragePath);
|
m_logFilesPrepared = prepareReportFiles(dataStoragePath);
|
||||||
}
|
}
|
||||||
QDesktopServices::openUrl(
|
|
||||||
QUrl("file://" + dataStoragePath, QUrl::TolerantMode));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(dataStoragePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ReportPublisher::prepareReportFiles(QString reportDirPath) {
|
bool ReportPublisher::prepareReportFiles(QString reportDirPath) {
|
||||||
@ -101,5 +107,5 @@ QString ReportPublisher::resolveDataStoragePath() {
|
|||||||
if (!dir.exists()) {
|
if (!dir.exists()) {
|
||||||
dir.mkpath(".");
|
dir.mkpath(".");
|
||||||
}
|
}
|
||||||
return dataStoragePath;
|
return dir.path();
|
||||||
}
|
}
|
||||||
|
@ -4501,7 +4501,7 @@ glogg@^1.0.0:
|
|||||||
|
|
||||||
"google-breakpad@git+https://github.com/status-im/google-breakpad.git":
|
"google-breakpad@git+https://github.com/status-im/google-breakpad.git":
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "git+https://github.com/status-im/google-breakpad.git#9b6167b415d704c80a3303418a7c79d5ed0482ff"
|
resolved "git+https://github.com/status-im/google-breakpad.git#9fcfdc23010ce2b0742d276e2959ab13e7cf0dc7"
|
||||||
|
|
||||||
got@^5.0.0, got@^5.2.0:
|
got@^5.0.0, got@^5.2.0:
|
||||||
version "5.7.1"
|
version "5.7.1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user