193 loc = loca |
193 loc = loca |
194 else: |
194 else: |
195 loc = None |
195 loc = None |
196 return loc |
196 return loc |
197 |
197 |
198 def simpleAppStartup(argv, appinfo, mwFactory, quitOnLastWindowClosed = True): |
198 def simpleAppStartup(argv, appinfo, mwFactory, quitOnLastWindowClosed = True, |
|
199 app = None): |
199 """ |
200 """ |
200 Module function to start up an application that doesn't need a specialized start up. |
201 Module function to start up an application that doesn't need a specialized start up. |
201 |
202 |
202 This function is used by all of eric5's helper programs. |
203 This function is used by all of eric5's helper programs. |
203 |
204 |
209 <dt>argv</dt> |
210 <dt>argv</dt> |
210 <dd>list of commandline parameters (list of strings)</dd> |
211 <dd>list of commandline parameters (list of strings)</dd> |
211 </dl> |
212 </dl> |
212 @keyparam quitOnLastWindowClosed flag indicating to quit the application, |
213 @keyparam quitOnLastWindowClosed flag indicating to quit the application, |
213 if the last window was closed (boolean) |
214 if the last window was closed (boolean) |
|
215 @keyparam app reference to the application object (QApplication or None) |
214 """ |
216 """ |
215 handleArgs(argv, appinfo) |
217 handleArgs(argv, appinfo) |
216 app = E5Application(argv) |
218 if app is None: |
|
219 app = E5Application(argv) |
217 app.setQuitOnLastWindowClosed(quitOnLastWindowClosed) |
220 app.setQuitOnLastWindowClosed(quitOnLastWindowClosed) |
218 |
221 |
219 setLibraryPaths() |
222 setLibraryPaths() |
220 initializeResourceSearchPath() |
223 initializeResourceSearchPath() |
221 QApplication.setWindowIcon(UI.PixmapCache.getIcon("eric.png")) |
224 QApplication.setWindowIcon(UI.PixmapCache.getIcon("eric.png")) |