| 265 | } |
| 266 | |
| 267 | void GetWritePath( |
| 268 | QPointer<QWidget> parent, |
| 269 | const QString &caption, |
| 270 | const QString &filter, |
| 271 | const QString &initialPath, |
| 272 | Fn<void(QString &&result)> callback, |
| 273 | Fn<void()> failed) { |
| 274 | InvokeQueued(QCoreApplication::instance(), [=] { |
| 275 | auto file = QString(); |
| 276 | if (filedialogGetSaveFile(parent, file, caption, filter, initialPath)) { |
| 277 | if (callback) { |
| 278 | callback(std::move(file)); |
| 279 | } |
| 280 | } else if (failed) { |
| 281 | failed(); |
| 282 | } |
| 283 | }); |
| 284 | } |
| 285 | |
| 286 | void GetFolder( |
| 287 | QPointer<QWidget> parent, |
no test coverage detected