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

@@ -34,12 +34,13 @@
#include <QApplication>
#include <QDir>
#include <QFile>
#include <QFileDialog>
#include <QFileInfo>
#include <QMessageBox>
#include <QProcess>
#include <QStandardPaths>
using namespace Utils;
namespace QSsh {
SshKeyCreationDialog::SshKeyCreationDialog(QWidget *parent)
@@ -112,9 +113,9 @@ void SshKeyCreationDialog::generateKeys()
void SshKeyCreationDialog::handleBrowseButtonClicked()
{
const QString filePath = QFileDialog::getSaveFileName(this, tr("Choose Private Key File Name"));
const FilePath filePath = FileUtils::getSaveFilePath(this, tr("Choose Private Key File Name"));
if (!filePath.isEmpty())
setPrivateKeyFile(filePath);
setPrivateKeyFile(filePath.toString());
}
void SshKeyCreationDialog::setPrivateKeyFile(const QString &filePath)