1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

Error reports are now dropped by FTP on drop.hardcoded.net

This commit is contained in:
Virgil Dupras
2014-01-26 15:03:24 -05:00
parent f66db94ffd
commit 1104e24408
2 changed files with 27 additions and 6 deletions

View File

@@ -10,12 +10,12 @@ import traceback
import sys
import os
from PyQt5.QtCore import Qt, QUrl, QCoreApplication, QSize
from PyQt5.QtGui import QDesktopServices
from PyQt5.QtCore import Qt, QCoreApplication, QSize
from PyQt5.QtWidgets import (QDialog, QVBoxLayout, QHBoxLayout, QLabel, QPlainTextEdit, QPushButton,
QApplication)
from hscommon.trans import trget
from hscommon.error_report import send_error_report
from .util import horizontalSpacer
tr = trget('qtlib')
@@ -27,7 +27,7 @@ class ErrorReportDialog(QDialog):
self._setupUi()
name = QCoreApplication.applicationName()
version = QCoreApplication.applicationVersion()
errorText = "Application Name: {0}\nVersion: {1}\n\n{2}".format(name, version, error)
errorText = "Application Name: {}\nVersion: {}\n\n{}".format(name, version, error)
# Under windows, we end up with an error report without linesep if we don't mangle it
errorText = errorText.replace('\n', os.linesep)
self.errorTextEdit.setPlainText(errorText)
@@ -65,9 +65,7 @@ class ErrorReportDialog(QDialog):
self.verticalLayout.addLayout(self.horizontalLayout)
def accept(self):
text = self.errorTextEdit.toPlainText()
url = QUrl("mailto:support@hardcoded.net?SUBJECT=Error Report&BODY=%s" % text)
QDesktopServices.openUrl(url)
send_error_report(self.errorTextEdit.toPlainText())
super().accept()