src/gui_actions.cc

changeset 609
a8dc74a809c6
parent 606
3dd6f343ec06
child 610
f8244301110d
--- a/src/gui_actions.cc	Wed Jan 08 13:57:10 2014 +0200
+++ b/src/gui_actions.cc	Wed Jan 08 21:43:46 2014 +0200
@@ -388,11 +388,11 @@
 	if (!fname.length())
 		return;
 
-	File f (fname, File::Read);
+	QFile f (fname);
 
-	if (!f)
+	if (!f.open (QIODevice::ReadOnly))
 	{
-		critical (fmt ("Couldn't open %1 (%2)", fname, strerror (errno)));
+		critical (fmt ("Couldn't open %1 (%2)", fname, f.errorString()));
 		return;
 	}
 
@@ -429,7 +429,7 @@
 
 	if (!file.open (QIODevice::WriteOnly | QIODevice::Text))
 	{
-		critical (fmt ("Unable to open %1 for writing (%2)", fname, strerror (errno)));
+		critical (fmt ("Unable to open %1 for writing (%2)", fname, file.errorString()));
 		return;
 	}
 

mercurial