aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/perforce
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-08-17 16:36:42 +0200
committerhjk <hjk@qt.io>2021-08-19 08:33:22 +0000
commit584217a52f23212d1d56a2beda95ea4438c33aeb (patch)
tree4703c37de7523a3149864bd9687862163417a762 /src/plugins/perforce
parent6e8c4aa835273d4bf4d5c35f54e3c613a3542420 (diff)
Use more FileUtils based file dialogs
Change-Id: I1e7ec0493c26afe58e17afb8923a2b1023f6dcd4 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/perforce')
-rw-r--r--src/plugins/perforce/perforceplugin.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp
index 6b5a85d5941..be00bbf30cd 100644
--- a/src/plugins/perforce/perforceplugin.cpp
+++ b/src/plugins/perforce/perforceplugin.cpp
@@ -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,