r25022 by jghali - More deprecated calls replacement

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 12 17:48:49 UTC 2022


Author: jghali
Date: Sat Mar 12 17:48:49 2022
New Revision: 25022

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25022
Log:
More deprecated calls replacement

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25022&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp	Sat Mar 12 17:48:49 2022
@@ -411,9 +411,9 @@
 		else if (PyUnicode_Check(objValue))
 		{
 			// Get a pointer to the internal buffer of the Py_Unicode object, which is UCS2 formatted
-			const unsigned short * ucs2Data = (const unsigned short *) PyUnicode_AS_UNICODE(objValue);
+			const char16_t* utf16Data = (const char16_t *) PyUnicode_AS_UNICODE(objValue);
 			// and make a new QString from it (the string is copied)
-			success = obj->setProperty(propertyName, QString::fromUtf16(ucs2Data));
+			success = obj->setProperty(propertyName, QString::fromUtf16(utf16Data));
 		}
 		else
 			matched = false;
@@ -431,7 +431,7 @@
 		else if (PyUnicode_Check(objValue))
 		{
 			// Get a pointer to the internal buffer of the Py_Unicode object, which is UCS2 formatted
-			const unsigned short * utf16Data = (const unsigned short *)PyUnicode_AS_UNICODE(objValue);
+			const char16_t* utf16Data = (const char16_t *) PyUnicode_AS_UNICODE(objValue);
 			// and make a new QString from it (the string is copied)
 			success = obj->setProperty(propertyName, QString::fromUtf16(utf16Data).toLatin1());
 		}

Modified: trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25022&path=/trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp	Sat Mar 12 17:48:49 2022
@@ -44,7 +44,7 @@
 	action_Open->setShortcut(tr("Ctrl+O"));
 	action_Save->setShortcut(tr("Ctrl+S"));
 	action_Run->setShortcut(Qt::Key_F9);
-	actionRun_As_Console->setShortcut(Qt::CTRL + Qt::Key_F9);
+	actionRun_As_Console->setShortcut(Qt::CTRL | Qt::Key_F9);
 
 	commandEdit->setTabStopDistance(qRound(commandEdit->fontPointSize() * 4));
 




More information about the scribus-commit mailing list