r20242 by craig - Fix use of deprecated QString::sprintf in Char table model

scribus-commit scribus-commit at lists.scribus.net
Thu Jul 9 22:59:58 UTC 2015


Author: craig
Date: Thu Jul  9 22:59:58 2015
New Revision: 20242

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20242
Log:
Fix use of deprecated QString::sprintf in Char table model

Modified:
    trunk/Scribus/scribus/chartablemodel.cpp

Modified: trunk/Scribus/scribus/chartablemodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20242&path=/trunk/Scribus/scribus/chartablemodel.cpp
==============================================================================
--- trunk/Scribus/scribus/chartablemodel.cpp (original)
+++ trunk/Scribus/scribus/chartablemodel.cpp Thu Jul  9 22:59:58 2015
@@ -56,11 +56,7 @@
 
 	// tooltip
 	if (role == Qt::ToolTipRole)
-	{
-		QString tmp;
-		tmp.sprintf("%04X", currentChar);
-		return "Unicode:\n0x"+tmp;
-	}
+		return QString("Unicode:\n0x%1").arg(currentChar, 4, 16, QChar('0'));
 
 	// pixmap
 	if (role == Qt::DecorationRole)




More information about the scribus-commit mailing list