Use more FileUtils based file dialogs

Change-Id: I1e7ec0493c26afe58e17afb8923a2b1023f6dcd4
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2021-08-17 16:36:42 +02:00
parent 6e8c4aa835
commit 584217a52f
33 changed files with 226 additions and 226 deletions

View File

@@ -106,6 +106,8 @@
#include <algorithm>
using namespace Utils;
namespace ModelEditor {
namespace Internal {
@@ -595,10 +597,10 @@ void ModelEditor::exportToImage(bool selectedElements)
#ifndef QT_NO_SVG
filter += tr(";;SVG (*.svg)");
#endif // QT_NO_SVG
QString fileName = QFileDialog::getSaveFileName(
Core::ICore::dialogParent(),
QString fileName = FileUtils::getSaveFilePath(
nullptr,
selectedElements ? tr("Export Selected Elements") : tr("Export Diagram"),
d->lastExportDirPath, filter);
FilePath::fromString(d->lastExportDirPath), filter).toString();
if (!fileName.isEmpty()) {
qmt::DocumentController *documentController = d->document->documentController();
qmt::DiagramSceneModel *sceneModel = documentController->diagramsManager()->diagramSceneModel(diagram);