--- a/src/gui/text/qtextformat.cpp Tue Jul 06 15:10:48 2010 +0300
+++ b/src/gui/text/qtextformat.cpp Wed Aug 18 10:37:55 2010 +0300
@@ -900,11 +900,14 @@
*/
int QTextFormat::intProperty(int propertyId) const
{
+ // required, since the default layout direction has to be LayoutDirectionAuto, which is not integer 0
+ int def = (propertyId == QTextFormat::LayoutDirection) ? int(Qt::LayoutDirectionAuto) : 0;
+
if (!d)
- return 0;
+ return def;
const QVariant prop = d->property(propertyId);
if (prop.userType() != QVariant::Int)
- return 0;
+ return def;
return prop.toInt();
}