From f15664cc8f45c0772b33c8b0174573102ded20b5 Mon Sep 17 00:00:00 2001 From: scorpio810 Date: Tue, 4 Oct 2016 00:54:13 +0000 Subject: [PATCH] Fix bug 0000086: Unable to open elements directory with the elements panel in new KF5 with QUrl("file:///" translated to smb:// git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4731 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- .../ElementsCollection/elementscollectionwidget.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sources/ElementsCollection/elementscollectionwidget.cpp b/sources/ElementsCollection/elementscollectionwidget.cpp index c5eae80ae..b21d2d377 100644 --- a/sources/ElementsCollection/elementscollectionwidget.cpp +++ b/sources/ElementsCollection/elementscollectionwidget.cpp @@ -260,9 +260,20 @@ void ElementsCollectionWidget::openDir() if (!eci) return; if (eci->type() == FileElementCollectionItem::Type) + +#ifdef Q_OS_WIN32 QDesktopServices::openUrl(QUrl("file:///" + static_cast(eci)->dirPath())); +#else + QDesktopServices::openUrl(static_cast(eci)->dirPath()); +#endif else if (eci->type() == XmlProjectElementCollectionItem::Type) + +#ifdef Q_OS_WIN32 QDesktopServices::openUrl(QUrl("file:///" + static_cast(eci)->project()->currentDir())); +#else + QDesktopServices::openUrl(static_cast(eci)->project()->currentDir()); +#endif + } /**