Check if widget inherits from QTextEdit when drawing the frame

There can be cases where the accessibility plugin is not available so
rather than have an incorrect style in those cases we check if the
widget inherits QTextEdit.

Change-Id: Ia514ce61f24ef016f56c6dce103f90f699b4048a
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
Andy Shaw 2013-07-11 06:03:46 +02:00 committed by The Qt Project
parent 7b9d6cf844
commit 30f19d904f

View File

@ -523,10 +523,11 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
case PE_Frame: {
#ifndef QT_NO_ACCESSIBILITY
if (QStyleHelper::isInstanceOf(option->styleObject, QAccessible::EditableText)
|| QStyleHelper::isInstanceOf(option->styleObject, QAccessible::StaticText)) {
|| QStyleHelper::isInstanceOf(option->styleObject, QAccessible::StaticText) ||
#else
if (false) {
if (
#endif
(widget && widget->inherits("QTextEdit"))) {
painter->save();
int stateId = ETS_NORMAL;
if (!(state & State_Enabled))