summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index 91864b6608..3448bf8228 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -80,6 +80,7 @@
#include <qstyleoption.h>
#include <QtWidgets/qlineedit.h>
#include <QtGui/qaccessible.h>
+#include <QtCore/qmetaobject.h>
#ifndef QT_NO_SHORTCUT
#include "private/qapplication_p.h"
@@ -453,8 +454,8 @@ void QWidgetTextControlPrivate::setContent(Qt::TextFormat format, const QString
doc->setUndoRedoEnabled(false);
//Saving the index save some time.
- static int contentsChangedIndex = QTextDocument::staticMetaObject.indexOfSignal("contentsChanged()");
- static int textChangedIndex = QWidgetTextControl::staticMetaObject.indexOfSignal("textChanged()");
+ static int contentsChangedIndex = QMetaMethod::fromSignal(&QTextDocument::contentsChanged).methodIndex();
+ static int textChangedIndex = QMetaMethod::fromSignal(&QWidgetTextControl::textChanged).methodIndex();
// avoid multiple textChanged() signals being emitted
QMetaObject::disconnect(doc, contentsChangedIndex, q, textChangedIndex);