Editor: Do not assign unknown style to text style.

Just return the last style sentinel.

Change-Id: I2bd1a6e12913e0c208b11efae3baae87c183f39a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
David Schulz
2015-05-04 09:40:41 +02:00
parent 8b833b8261
commit 68a00c12a3

View File

@@ -110,7 +110,7 @@ TextStyle styleFromName(const char *name)
if (qstrcmp(name, nameForStyle(TextStyle(i))) == 0) if (qstrcmp(name, nameForStyle(TextStyle(i))) == 0)
return TextStyle(i); return TextStyle(i);
} }
return TextStyle(); return C_LAST_STYLE_SENTINEL;
} }
} // namespace Constants } // namespace Constants