Message ID | 20200206150504.24204-3-kieran.bingham@ideasonboard.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Kieran, Thank you for the patch. On Thu, Feb 06, 2020 at 03:05:00PM +0000, Kieran Bingham wrote: > Provide a method to facilitate clean shutdowns. > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Provided this is useful in a subsequent patch, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> But I think you can squash it with the patch that uses it. > --- > src/qcam/main_window.cpp | 9 +++++++-- > src/qcam/main_window.h | 1 + > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp > index 38bc04a23b86..b51a16de199d 100644 > --- a/src/qcam/main_window.cpp > +++ b/src/qcam/main_window.cpp > @@ -41,8 +41,7 @@ MainWindow::MainWindow(CameraManager *cm, const OptionsParser::Options &options) > } > > if (ret < 0) > - QTimer::singleShot(0, QCoreApplication::instance(), > - &QCoreApplication::quit); > + quit(); > } > > MainWindow::~MainWindow() > @@ -54,6 +53,12 @@ MainWindow::~MainWindow() > } > } > > +void MainWindow::quit() > +{ > + QTimer::singleShot(0, QCoreApplication::instance(), > + &QCoreApplication::quit); > +} > + > void MainWindow::updateTitle() > { > unsigned int duration = frameRateInterval_.elapsed(); > diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h > index 04fb9e3ea869..a11443b30b37 100644 > --- a/src/qcam/main_window.h > +++ b/src/qcam/main_window.h > @@ -41,6 +41,7 @@ public: > ~MainWindow(); > > private Q_SLOTS: > + void quit(); > void updateTitle(); > > private: > -- > 2.20.1 > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 38bc04a23b86..b51a16de199d 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -41,8 +41,7 @@ MainWindow::MainWindow(CameraManager *cm, const OptionsParser::Options &options) } if (ret < 0) - QTimer::singleShot(0, QCoreApplication::instance(), - &QCoreApplication::quit); + quit(); } MainWindow::~MainWindow() @@ -54,6 +53,12 @@ MainWindow::~MainWindow() } } +void MainWindow::quit() +{ + QTimer::singleShot(0, QCoreApplication::instance(), + &QCoreApplication::quit); +} + void MainWindow::updateTitle() { unsigned int duration = frameRateInterval_.elapsed(); diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h index 04fb9e3ea869..a11443b30b37 100644 --- a/src/qcam/main_window.h +++ b/src/qcam/main_window.h @@ -41,6 +41,7 @@ public: ~MainWindow(); private Q_SLOTS: + void quit(); void updateTitle(); private:
Provide a method to facilitate clean shutdowns. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- src/qcam/main_window.cpp | 9 +++++++-- src/qcam/main_window.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-)