From 68a00c12a37f69441af73c7caba62499cf3acf1c Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 4 May 2015 09:40:41 +0200 Subject: [PATCH] Editor: Do not assign unknown style to text style. Just return the last style sentinel. Change-Id: I2bd1a6e12913e0c208b11efae3baae87c183f39a Reviewed-by: Christian Stenger Reviewed-by: Eike Ziller --- src/plugins/texteditor/texteditorconstants.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/texteditorconstants.cpp b/src/plugins/texteditor/texteditorconstants.cpp index ae67b142449..c7740c6c5b5 100644 --- a/src/plugins/texteditor/texteditorconstants.cpp +++ b/src/plugins/texteditor/texteditorconstants.cpp @@ -110,7 +110,7 @@ TextStyle styleFromName(const char *name) if (qstrcmp(name, nameForStyle(TextStyle(i))) == 0) return TextStyle(i); } - return TextStyle(); + return C_LAST_STYLE_SENTINEL; } } // namespace Constants