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

@@ -841,11 +841,9 @@ void PerforcePluginPrivate::annotateCurrentFile()
void PerforcePluginPrivate::annotateFile()
{
const QString file = QFileDialog::getOpenFileName(ICore::dialogParent(), tr("p4 annotate"));
if (!file.isEmpty()) {
const QFileInfo fi(file);
annotate(FilePath::fromString(fi.absolutePath()), fi.fileName());
}
const FilePath filePath = FileUtils::getOpenFilePath(nullptr, tr("p4 annotate"));
if (!filePath.isEmpty())
annotate(filePath.parentDir(), filePath.fileName());
}
void PerforcePluginPrivate::annotate(const FilePath &workingDir,