Ubuntu Pastebin

Paste from a at Wed, 18 Feb 2015 09:28:15 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
=== modified file 'kde/apport-kde'
--- kde/apport-kde	2015-02-06 07:42:03 +0000
+++ kde/apport-kde	2015-02-18 09:26:49 +0000
@@ -17,16 +17,10 @@
 
 try:
     import apport
-    from PyQt4.QtCore import *
-    from PyQt4.QtGui import (QDialog, QLabel, QCheckBox, QRadioButton,
-                             QTreeWidget, QTreeWidgetItem, QFileDialog,
-                             QDialogButtonBox, QProgressBar, QLineEdit,
-                             QPushButton, QIcon, QPainter, QMovie)
-    from PyQt4 import uic
-    from PyKDE4.kdecore import (ki18n, KAboutData, KCmdLineArgs,
-                                KLocalizedString)
-    from PyKDE4.kdeui import (KApplication, KMessageBox, KIcon,
-                              KStandardGuiItem)
+    from PyQt5.QtCore import *
+    from PyQt5.QtGui import *
+    from PyQt5.QtWidgets import *
+    from PyQt5 import uic
     import apport.ui
     from apport import unicode_gettext as _
     import sip
@@ -396,13 +390,13 @@
             self.progress.set()
             self.progress.show()
 
-        KApplication.processEvents()
+        QApplication.processEvents()
 
     def ui_pulse_info_collection_progress(self):
         if self.progress:
             self.progress.set()
         # for a spinner we just need to handle events
-        KApplication.processEvents()
+        QApplication.processEvents()
 
     def ui_stop_info_collection_progress(self):
         if self.progress:
@@ -412,7 +406,7 @@
             self.dialog.movie.stop()
             self.dialog.spinner.hide()
 
-        KApplication.processEvents()
+        QApplication.processEvents()
 
     def ui_start_upload_progress(self):
         self.progress = ProgressDialog(
@@ -427,7 +421,7 @@
             self.progress.set(progress)
         else:
             self.progress.set()
-        KApplication.processEvents()
+        QApplication.processEvents()
 
     def ui_stop_upload_progress(self):
         self.progress.hide()
@@ -504,27 +498,10 @@
     if not os.environ.get('DISPLAY'):
         apport.fatal('This program needs a running X session. Please see "man apport-cli" for a command line version of Apport.')
 
-    appName = 'apport-kde'
-    catalog = 'apport'
-    programName = ki18n(b'Apport KDE')
-    version = '1.0'
-    description = ki18n(b'KDE 4 frontend for the apport crash report system')
-    license = KAboutData.License_GPL
-    copyright = ki18n(b'2009 Canonical Ltd.')
-    text = KLocalizedString()
-    homePage = 'https://wiki.ubuntu.com/Apport'
-    bugEmail = 'kubuntu-devel@lists.ubuntu.com'
-
-    aboutData = KAboutData(appName, catalog, programName, version, description,
-                           license, copyright, text, homePage, bugEmail)
-
-    aboutData.addAuthor(ki18n(b'Richard A. Johnson'), ki18n(b'Author'))
-    aboutData.addAuthor(ki18n(b'Michael Hofmann'), ki18n(b'Original Qt4 Author'))
-
-    KCmdLineArgs.init([''], aboutData)
-
-    app = KApplication()
-    app.setWindowIcon(KIcon('apport'))
+    app = QApplication(sys.argv)
+    app.applicationName = 'apport-kde'
+    app.applicationDisplayName = _('Apport')
+    app.windowIcon = QIcon.fromTheme('apport')
 
     UserInterface = MainUserInterface()
     sys.exit(UserInterface.run_argv())
Download as text