Changeset View
Changeset View
Standalone View
Standalone View
tests/kfilewidgettest_gui.cpp
Show All 25 Lines | |||||
26 | { | 26 | { | ||
27 | QApplication app(argc, argv); | 27 | QApplication app(argc, argv); | ||
28 | 28 | | |||
29 | KFileWidget* fileWidget = new KFileWidget(QUrl(QStringLiteral("kfiledialog:///OpenDialog")), nullptr); | 29 | KFileWidget* fileWidget = new KFileWidget(QUrl(QStringLiteral("kfiledialog:///OpenDialog")), nullptr); | ||
30 | fileWidget->setMode(KFile::Files | KFile::ExistingOnly); | 30 | fileWidget->setMode(KFile::Files | KFile::ExistingOnly); | ||
31 | fileWidget->setAttribute(Qt::WA_DeleteOnClose); | 31 | fileWidget->setAttribute(Qt::WA_DeleteOnClose); | ||
32 | fileWidget->show(); | 32 | fileWidget->show(); | ||
33 | 33 | | |||
34 | QObject::connect(fileWidget, &KFileWidget::destroyed, &app, &QApplication::quit); | ||||
apol: No need to lambda:
`QObject::connect(fileWidget, &KFileWidget::destroyed, &app… | |||||
35 | | ||||
34 | return app.exec(); | 36 | return app.exec(); | ||
35 | } | 37 | } | ||
36 | 38 | | |||
ngraham: Unnecessary whitespace change. |
No need to lambda:
QObject::connect(fileWidget, &KFileWidget::destroyed, &app, &QCoreApplication::exit);