enthought/pyface

Unify QApplication.instance() checks

Open

#242 opened on Dec 13, 2016

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Python (54 forks)auto 404
Good First Issuetype: enhancement

Repository metrics

Stars
 (115 stars)
PR merge metrics
 (PR metrics pending)

Description

There are a number of places where we do something like the following:

app = QApplication.instance()
if app is None:
    app = QApplication(*args, **kwargs)

We should refactor so that all such calls go through get_app_qt4 (https://github.com/enthought/pyface/blob/master/pyface/util/guisupport.py#L111) or something similar.

Contributor guide