Update bug reporter: Automate OS version, require best chumhandle
This commit is contained in:
parent
884a736c23
commit
17b8b70b66
2 changed files with 18 additions and 7 deletions
|
@ -26,6 +26,7 @@ CHANGELOG
|
||||||
* Chumroll notifications on chum sign-in/out - Kiooeht [evacipatedBox]
|
* Chumroll notifications on chum sign-in/out - Kiooeht [evacipatedBox]
|
||||||
* Chum notes - Kiooeht [evacipatedBox]
|
* Chum notes - Kiooeht [evacipatedBox]
|
||||||
* Customizable name alerts - Kiooeht [evacipatedBox]
|
* Customizable name alerts - Kiooeht [evacipatedBox]
|
||||||
|
* Update bug reporter - Kiooeht [evacipatedBox]
|
||||||
* Bug fixes
|
* Bug fixes
|
||||||
* Don't delete random chum when blocking someone not on chumroll - Kiooeht [evacipatedBox]
|
* Don't delete random chum when blocking someone not on chumroll - Kiooeht [evacipatedBox]
|
||||||
* Openning global userlist doesn't reset OP status of memo users - Kiooeht [evacipatedBox]
|
* Openning global userlist doesn't reset OP status of memo users - Kiooeht [evacipatedBox]
|
||||||
|
|
24
bugreport.py
24
bugreport.py
|
@ -1,5 +1,6 @@
|
||||||
from PyQt4 import QtGui, QtCore
|
from PyQt4 import QtGui, QtCore
|
||||||
import urllib
|
import urllib
|
||||||
|
import ostools
|
||||||
import version
|
import version
|
||||||
|
|
||||||
class BugReporter(QtGui.QDialog):
|
class BugReporter(QtGui.QDialog):
|
||||||
|
@ -15,10 +16,15 @@ class BugReporter(QtGui.QDialog):
|
||||||
layout_0 = QtGui.QVBoxLayout()
|
layout_0 = QtGui.QVBoxLayout()
|
||||||
layout_0.addWidget(self.title)
|
layout_0.addWidget(self.title)
|
||||||
|
|
||||||
layout_0.addWidget(QtGui.QLabel("Operating System (ex. Windows 7, Ubuntu 10.10):"))
|
layout_0.addWidget(QtGui.QLabel("Chumhandle:"))
|
||||||
self.os = QtGui.QLineEdit(self)
|
handleLabel = QtGui.QLabel("The best chumhandle to contact you at for further information.")
|
||||||
self.os.setStyleSheet("background:white; font-weight:bold; color:black; font-size: 10pt;")
|
font = handleLabel.font()
|
||||||
layout_0.addWidget(self.os)
|
font.setPointSize(8)
|
||||||
|
handleLabel.setFont(font)
|
||||||
|
layout_0.addWidget(handleLabel)
|
||||||
|
self.name = QtGui.QLineEdit(self)
|
||||||
|
self.name.setStyleSheet("background:white; font-weight:bold; color:black; font-size: 10pt;")
|
||||||
|
layout_0.addWidget(self.name)
|
||||||
|
|
||||||
layout_0.addWidget(QtGui.QLabel("Description of bug:"))
|
layout_0.addWidget(QtGui.QLabel("Description of bug:"))
|
||||||
descLabel = QtGui.QLabel("Include as much information as possible\n(theme, related options, what you were doing at the time, etc.)")
|
descLabel = QtGui.QLabel("Include as much information as possible\n(theme, related options, what you were doing at the time, etc.)")
|
||||||
|
@ -50,10 +56,14 @@ class BugReporter(QtGui.QDialog):
|
||||||
@QtCore.pyqtSlot()
|
@QtCore.pyqtSlot()
|
||||||
def sendReport(self):
|
def sendReport(self):
|
||||||
name = unicode(self.mainwindow.profile().handle)
|
name = unicode(self.mainwindow.profile().handle)
|
||||||
os = unicode(self.os.text())
|
bestname = unicode(self.name.text())
|
||||||
|
os = ostools.osVer()
|
||||||
|
full = ostools.platform.platform()
|
||||||
|
python = ostools.platform.python_version()
|
||||||
|
qt = QtCore.qVersion()
|
||||||
msg = unicode(self.textarea.toPlainText())
|
msg = unicode(self.textarea.toPlainText())
|
||||||
|
|
||||||
if len(os) <= 0 or len(msg) <= 0:
|
if len(bestname) <= 0 or len(msg) <= 0:
|
||||||
msgbox = QtGui.QMessageBox()
|
msgbox = QtGui.QMessageBox()
|
||||||
msgbox.setStyleSheet(self.mainwindow.theme["main/defaultwindow/style"])
|
msgbox.setStyleSheet(self.mainwindow.theme["main/defaultwindow/style"])
|
||||||
msgbox.setText("You must fill out all fields first!")
|
msgbox.setText("You must fill out all fields first!")
|
||||||
|
@ -62,7 +72,7 @@ class BugReporter(QtGui.QDialog):
|
||||||
return
|
return
|
||||||
|
|
||||||
QtGui.QDialog.accept(self)
|
QtGui.QDialog.accept(self)
|
||||||
data = urllib.urlencode({"name":name, "version": version._pcVersion, "os":os, "msg":msg})
|
data = urllib.urlencode({"name":name, "version": version._pcVersion, "bestname":bestname, "os":os, "platform":full, "python":python, "qt":qt, "msg":msg})
|
||||||
print "Sending..."
|
print "Sending..."
|
||||||
f = urllib.urlopen("http://distantsphere.com/pc/reporter.php", data)
|
f = urllib.urlopen("http://distantsphere.com/pc/reporter.php", data)
|
||||||
text = f.read()
|
text = f.read()
|
||||||
|
|
Loading…
Reference in a new issue