eric7/Toolbox/Startup.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
11 import sys 11 import sys
12 12
13 from PyQt6.QtCore import QTranslator, QLocale, QLibraryInfo, QDir 13 from PyQt6.QtCore import QTranslator, QLocale, QLibraryInfo, QDir
14 from PyQt6.QtWidgets import QApplication 14 from PyQt6.QtWidgets import QApplication
15 15
16 from E5Gui.E5Application import E5Application 16 from E5Gui.EricApplication import EricApplication
17 17
18 import Globals 18 import Globals
19 19
20 import UI.PixmapCache 20 import UI.PixmapCache
21 21
116 def initializeResourceSearchPath(application): 116 def initializeResourceSearchPath(application):
117 """ 117 """
118 Module function to initialize the default mime source factory. 118 Module function to initialize the default mime source factory.
119 119
120 @param application reference to the application object 120 @param application reference to the application object
121 @type E5Application 121 @type EricApplication
122 """ 122 """
123 import Preferences 123 import Preferences
124 124
125 defaultIconPaths = getDefaultIconPaths(application) 125 defaultIconPaths = getDefaultIconPaths(application)
126 iconPaths = Preferences.getIcons("Path") 126 iconPaths = Preferences.getIcons("Path")
135 def getDefaultIconPaths(application): 135 def getDefaultIconPaths(application):
136 """ 136 """
137 Module function to determine the default icon paths. 137 Module function to determine the default icon paths.
138 138
139 @param application reference to the application object 139 @param application reference to the application object
140 @type E5Application 140 @type EricApplication
141 @return list of default icon paths 141 @return list of default icon paths
142 @rtype list of str 142 @rtype list of str
143 """ 143 """
144 import Preferences 144 import Preferences
145 145
251 251
252 handleArgs(argv, appinfo) 252 handleArgs(argv, appinfo)
253 if app is None: 253 if app is None:
254 # set the library paths for plugins 254 # set the library paths for plugins
255 setLibraryPaths() 255 setLibraryPaths()
256 app = E5Application(argv) 256 app = EricApplication(argv)
257 application = app 257 application = app
258 app.setQuitOnLastWindowClosed(quitOnLastWindowClosed) 258 app.setQuitOnLastWindowClosed(quitOnLastWindowClosed)
259 259
260 # the following code depends upon a valid application object 260 # the following code depends upon a valid application object
261 import Preferences 261 import Preferences
280 if raiseIt: 280 if raiseIt:
281 w.raise_() 281 w.raise_()
282 282
283 if installErrorHandler: 283 if installErrorHandler:
284 # generate a graphical error handler 284 # generate a graphical error handler
285 from E5Gui import E5ErrorMessage 285 from E5Gui import EricErrorMessage
286 eMsg = E5ErrorMessage.qtHandler() 286 eMsg = EricErrorMessage.qtHandler()
287 eMsg.setMinimumSize(600, 400) 287 eMsg.setMinimumSize(600, 400)
288 288
289 return app.exec() 289 return app.exec()
290 290
291 # 291 #

eric ide

mercurial