summaryrefslogtreecommitdiffstats
path: root/examples/multimediawidgets/player/main.cpp
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-09-14 09:56:30 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-09-28 14:00:26 +0000
commit62d72daf70fed1d7fa1c38bd52468b6536ec6cad (patch)
tree867428c277ac8cc0fcfa5c15003d6ad5b43f03cd /examples/multimediawidgets/player/main.cpp
parent61b0771e832cad41c726995aafd7bea705909bdd (diff)
Modernize the Player example
Fixed memory leak. Renamed members, avoided passing args by copy. Changed the style of member initialization. Changed 0 to nullptr. Changed to new signal/slot style if possible. Removed Q_WS_SIMULATOR ifdef. Changed signal/slot connection style. Task-number: QTBUG-60627 Change-Id: I85bd6e56fe87f4e17f3c9964d6d1fdcb8202c519 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'examples/multimediawidgets/player/main.cpp')
-rw-r--r--examples/multimediawidgets/player/main.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/examples/multimediawidgets/player/main.cpp b/examples/multimediawidgets/player/main.cpp
index a3dabe15d..af8013502 100644
--- a/examples/multimediawidgets/player/main.cpp
+++ b/examples/multimediawidgets/player/main.cpp
@@ -63,16 +63,11 @@ int main(int argc, char *argv[])
if (!parser.positionalArguments().isEmpty() && player.isPlayerAvailable()) {
QList<QUrl> urls;
- foreach (const QString &a, parser.positionalArguments())
+ for (auto &a: parser.positionalArguments())
urls.append(QUrl::fromUserInput(a, QDir::currentPath(), QUrl::AssumeLocalFile));
player.addToPlaylist(urls);
}
-#if defined(Q_WS_SIMULATOR)
- player.setAttribute(Qt::WA_LockLandscapeOrientation);
- player.showMaximized();
-#else
player.show();
-#endif
return app.exec();
}