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