r20317 by jghali - fix drag and drop issue on main window on Windows

scribus-commit scribus-commit at lists.scribus.net
Wed Aug 12 22:28:11 UTC 2015


Author: jghali
Date: Wed Aug 12 22:28:11 2015
New Revision: 20317

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20317
Log:
fix drag and drop issue on main window on Windows

Modified:
    branches/Version14x/Scribus/scribus/scribus.cpp

Modified: branches/Version14x/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20317&path=/branches/Version14x/Scribus/scribus/scribus.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribus.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribus.cpp Wed Aug 12 22:28:11 2015
@@ -9608,18 +9608,18 @@
 void ScribusMainWindow::dropEvent ( QDropEvent * e)
 {
 	bool accepted = false;
-	if ( e->mimeData()->hasFormat("text/uri-list"))
+	if (e->mimeData()->hasFormat("text/uri-list"))
 	{
 		QString fileUrl;
 		QList<QUrl> fileUrls = e->mimeData()->urls();
-		for( int i = 0; i < fileUrls.count(); ++i )
+		for (int i = 0; i < fileUrls.count(); ++i )
 		{
 			fileUrl = fileUrls[i].toLocalFile().toLower();
-			if ( fileUrl.endsWith(".sla") || fileUrl.endsWith(".sla.gz") )
+			if (fileUrl.endsWith(".sla") || fileUrl.endsWith(".sla.gz"))
 			{
 				QUrl url( fileUrls[i] );
-				QFileInfo fi(url.path());
-				if ( fi.exists() )
+				QFileInfo fi(url.toLocalFile());
+				if (fi.exists())
 				{
 					accepted = true;
 					loadDoc( fi.absoluteFilePath() );
@@ -9628,13 +9628,13 @@
 			else
 			{
 				QUrl url( fileUrls[i] );
-				FileLoader *fileLoader = new FileLoader(url.path());
+				FileLoader *fileLoader = new FileLoader(url.toLocalFile());
 				int testResult = fileLoader->testFile();
 				delete fileLoader;
 				if ((testResult != -1) && (testResult >= FORMATID_ODGIMPORT))
 				{
 					QFileInfo fi(url.path());
-					if ( fi.exists() )
+					if (fi.exists())
 					{
 						accepted = true;
 						loadDoc( fi.absoluteFilePath() );




More information about the scribus-commit mailing list