summaryrefslogtreecommitdiffstats
path: root/examples/multimediawidgets/camera/camera.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-23 15:18:22 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-26 13:26:53 +0000
commite8e9f40ebc0d822fe639bed75d185800ff16b452 (patch)
treebd1123b5c358b39b18b28b69b3c0fa2d8eb3b528 /examples/multimediawidgets/camera/camera.h
parent019dc4d39ab87966d6f3e1c8f1d941a6d113f44b (diff)
Camera example: Brush up to C++11
Use Qt 5 signal/slot syntax, range based for, member initialization. Add message for captured images and fix some minor issues. Task-number: QTBUG-60627 Change-Id: I1011fc95d928a9d2edaad16120acb0dc41f987d9 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'examples/multimediawidgets/camera/camera.h')
-rw-r--r--examples/multimediawidgets/camera/camera.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/multimediawidgets/camera/camera.h b/examples/multimediawidgets/camera/camera.h
index 3db1347b..45a73176 100644
--- a/examples/multimediawidgets/camera/camera.h
+++ b/examples/multimediawidgets/camera/camera.h
@@ -56,7 +56,7 @@ class Camera : public QMainWindow
Q_OBJECT
public:
- Camera(QWidget *parent = 0);
+ explicit Camera(QWidget *parent = nullptr);
~Camera();
private slots:
@@ -107,16 +107,16 @@ protected:
private:
Ui::Camera *ui;
- QCamera *camera;
- QCameraImageCapture *imageCapture;
- QMediaRecorder* mediaRecorder;
+ QCamera *camera = nullptr;
+ QCameraImageCapture *imageCapture = nullptr;
+ QMediaRecorder* mediaRecorder = nullptr;
QImageEncoderSettings imageSettings;
QAudioEncoderSettings audioSettings;
QVideoEncoderSettings videoSettings;
QString videoContainerFormat;
- bool isCapturingImage;
- bool applicationExiting;
+ bool isCapturingImage = false;
+ bool applicationExiting = false;
};
#endif