From 08fb0f0acf3bc226271766f771a3dcb8042bfb77 Mon Sep 17 00:00:00 2001 From: Anton Kalmykov Date: Mon, 13 Apr 2015 22:51:52 +0300 Subject: [PATCH] Fix the forming of the plugin relative path --- src/manager/forms/linkdialog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/manager/forms/linkdialog.cpp b/src/manager/forms/linkdialog.cpp index 5f49b28..0f994a7 100644 --- a/src/manager/forms/linkdialog.cpp +++ b/src/manager/forms/linkdialog.cpp @@ -178,7 +178,11 @@ void LinkDialog::browsePlugin() } if(dialog.exec()) { - int length = prefixInfo.absoluteFilePath().length() + 1; // Take '/' into account + QString prefixPath = prefixInfo.absoluteFilePath(); + int length = prefixPath.length(); + if(!prefixPath.endsWith('/')) + length++; + targetEdit_->setText(dialog.selectedPath().mid(length)); QString name = dialog.selectedName();