[qet] qet/qet: [4731] Fix bug 0000086: Unable to open elements directory with the elements

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4731
Author:   scorpio810
Date:     2016-10-04 02:54:13 +0200 (Tue, 04 Oct 2016)
Log Message:
-----------
Fix bug 0000086: Unable to open elements directory with the elements
panel in new KF5 with  
QUrl("file:///" translated to smb://

Modified Paths:
--------------
    trunk/sources/ElementsCollection/elementscollectionwidget.cpp

Modified: trunk/sources/ElementsCollection/elementscollectionwidget.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementscollectionwidget.cpp	2016-10-02 22:05:19 UTC (rev 4730)
+++ trunk/sources/ElementsCollection/elementscollectionwidget.cpp	2016-10-04 00:54:13 UTC (rev 4731)
@@ -260,9 +260,20 @@
 	if (!eci) return;
 
 	if (eci->type() == FileElementCollectionItem::Type)
+	
+#ifdef Q_OS_WIN32
 		QDesktopServices::openUrl(QUrl("file:///" + static_cast<FileElementCollectionItem*>(eci)->dirPath()));
+#else
+		QDesktopServices::openUrl(static_cast<FileElementCollectionItem*>(eci)->dirPath());
+#endif
 	else if (eci->type() == XmlProjectElementCollectionItem::Type)
+	
+#ifdef Q_OS_WIN32
 		QDesktopServices::openUrl(QUrl("file:///" + static_cast<XmlProjectElementCollectionItem*>(eci)->project()->currentDir()));
+#else
+		QDesktopServices::openUrl(static_cast<XmlProjectElementCollectionItem*>(eci)->project()->currentDir());
+#endif
+
 }
 
 /**


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/