diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-12-17 18:10:12 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-12-20 13:44:09 +0000 |
commit | 9b23e0c8fb1fc2ec92478f1aec595313851a40b7 (patch) | |
tree | e89e9461b80306d591fc8b1826d25e51d8b58704 /examples/multimedia/audiosource/main.cpp | |
parent | 6144b257499d30248952078654420de6cfc63875 (diff) |
Polish the audiosource example
- Use a QWidget instead of a QMainWindow since no QMainWindow
functionality is used and the controls are wrongly parented
- Change the update signal of AudioInfo to levelChanged(level),
removing the need for a lamba
- Streamline the code
Change-Id: Ic03a5414ee5da4841532ad23db112d0594f458e5
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit a71362d9ef7098c1d7869b3768a0990a61474980)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/multimedia/audiosource/main.cpp')
-rw-r--r-- | examples/multimedia/audiosource/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/multimedia/audiosource/main.cpp b/examples/multimedia/audiosource/main.cpp index 1f6ae63a6..e45c2bd67 100644 --- a/examples/multimedia/audiosource/main.cpp +++ b/examples/multimedia/audiosource/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. @@ -48,17 +48,17 @@ ** ****************************************************************************/ -#include <QtWidgets> - #include "audiosource.h" +#include <QtWidgets/QApplication> + int main(int argv, char **args) { QApplication app(argv, args); - app.setApplicationName("Audio Source Test"); + QCoreApplication::setApplicationName("Audio Source Test"); InputTest input; input.show(); - return app.exec(); + return QCoreApplication::exec(); } |