r24501 by jghali - Fix several Qt deprecation warnings

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 18 11:21:31 UTC 2021


Author: jghali
Date: Thu Feb 18 11:21:31 2021
New Revision: 24501

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24501
Log:
Fix several Qt deprecation warnings

Modified:
    trunk/Scribus/scribus/scprintengine_pdf.cpp
    trunk/Scribus/scribus/scprintengine_ps.cpp

Modified: trunk/Scribus/scribus/scprintengine_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24501&path=/trunk/Scribus/scribus/scprintengine_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_pdf.cpp	(original)
+++ trunk/Scribus/scribus/scprintengine_pdf.cpp	Thu Feb 18 11:21:31 2021
@@ -52,22 +52,22 @@
 	QByteArray cmd;
 	if (options.useAltPrintCommand)
 	{
-		cmd += options.printerCommand;
+		cmd += options.printerCommand.toLocal8Bit();
 		cmd += " ";
-		cmd += "\"" + fileName + "\"";
+		cmd += "\"" + fileName.toLocal8Bit() + "\"";
 		system(cmd.data());
 	}
 	else
 	{
 		QByteArray cc;
 		cmd += "lpr -P '";
-		cmd += options.printer;
+		cmd += options.printer.toLocal8Bit();
 		cmd += "'";
 		if (options.copies > 1)
 			cmd += " -#" + cc.setNum(options.copies);
-		cmd += options.printerOptions;
+		cmd += options.printerOptions.toLocal8Bit();
 		cmd += " ";
-		cmd += "\"" + fileName + "\"";
+		cmd += "\"" + fileName.toLocal8Bit() + "\"";
 		system(cmd.data());
 	}
 	// Disabled that for now, as kprinter won't work otherwise

Modified: trunk/Scribus/scribus/scprintengine_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24501&path=/trunk/Scribus/scribus/scprintengine_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_ps.cpp	(original)
+++ trunk/Scribus/scribus/scprintengine_ps.cpp	Thu Feb 18 11:21:31 2021
@@ -59,22 +59,22 @@
 	QByteArray cmd;
 	if (options.useAltPrintCommand)
 	{
-		cmd += options.printerCommand;
+		cmd += options.printerCommand.toLocal8Bit();
 		cmd += " ";
-		cmd += "\"" + filename + "\"";
+		cmd += "\"" + filename.toLocal8Bit() + "\"";
 		system(cmd.data());
 	}
 	else
 	{
 		QByteArray cc;
 		cmd += "lpr -P '";
-		cmd += options.printer;
+		cmd += options.printer.toLocal8Bit();
 		cmd += "'";
 		if (options.copies > 1)
 			cmd += " -#" + cc.setNum(options.copies);
-		cmd += options.printerOptions;
+		cmd += options.printerOptions.toLocal8Bit();
 		cmd += " ";
-		cmd += "\"" + filename + "\"";
+		cmd += "\"" + filename.toLocal8Bit() + "\"";
 		system(cmd.data());
 	}
 	// Disabled that for now, as kprinter won't work otherwise




More information about the scribus-commit mailing list