diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-03-28 15:55:25 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-03-28 18:01:19 +0200 |
commit | 11e598d7153ec209bb208fafa0dcef9cab7c324b (patch) | |
tree | 34ea6e0ca9dd3cba4e638e612bfbf83b64630a5b /examples/webenginewidgets/simplebrowser/browserwindow.h | |
parent | de96e684275be9548252f874cbc515b81cd51cd8 (diff) |
Simple browser example: Use member initialization
As a drive-by, make constructors explicit.
Pick-to: 6.5
Change-Id: I5c8e3d8049504afa4aa5a0d7c1a85bb59eb3cd38
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'examples/webenginewidgets/simplebrowser/browserwindow.h')
-rw-r--r-- | examples/webenginewidgets/simplebrowser/browserwindow.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.h b/examples/webenginewidgets/simplebrowser/browserwindow.h index 47fdf6314..55eeb46c2 100644 --- a/examples/webenginewidgets/simplebrowser/browserwindow.h +++ b/examples/webenginewidgets/simplebrowser/browserwindow.h @@ -22,7 +22,8 @@ class BrowserWindow : public QMainWindow Q_OBJECT public: - BrowserWindow(Browser *browser, QWebEngineProfile *profile, bool forDevTools = false); + explicit BrowserWindow(Browser *browser, QWebEngineProfile *profile, + bool forDevTools = false); QSize sizeHint() const override; TabWidget *tabWidget() const; WebView *currentTab() const; @@ -55,14 +56,14 @@ private: Browser *m_browser; QWebEngineProfile *m_profile; TabWidget *m_tabWidget; - QProgressBar *m_progressBar; - QAction *m_historyBackAction; - QAction *m_historyForwardAction; - QAction *m_stopAction; - QAction *m_reloadAction; - QAction *m_stopReloadAction; - QLineEdit *m_urlLineEdit; - QAction *m_favAction; + QProgressBar *m_progressBar = nullptr; + QAction *m_historyBackAction = nullptr; + QAction *m_historyForwardAction = nullptr; + QAction *m_stopAction = nullptr; + QAction *m_reloadAction = nullptr; + QAction *m_stopReloadAction = nullptr; + QLineEdit *m_urlLineEdit = nullptr; + QAction *m_favAction = nullptr; QString m_lastSearch; }; |