Commit d02c4391 authored by Eckhart Wörner's avatar Eckhart Wörner

krazy: Check for Qt classes that should not be used (4 issues)

* QTextEdit[KTextEdit]

svn path=/trunk/KDE/kdeedu/kmplot/; revision=902694
parent 763e9a7f
......@@ -15,7 +15,7 @@ void EquationEditWidget::setClearSelectionOnFocusOut(bool doIt) {
EquationEditWidget::EquationEditWidget(EquationEdit* parent)
: QTextEdit(parent)
: KTextEdit(parent)
{
m_clearSelectionOnFocusOut = true;
m_parent = parent;
......@@ -40,7 +40,7 @@ void EquationEditWidget::recalculateGeometry() {
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setWordWrapMode(QTextOption::NoWrap);
setLineWrapMode(QTextEdit::NoWrap);
setLineWrapMode(KTextEdit::NoWrap);
setTabChangesFocus(true);
}
......@@ -56,20 +56,20 @@ void EquationEditWidget::keyPressEvent(QKeyEvent* e) {
emit m_parent->editingFinished();
emit m_parent->returnPressed();
} else {
// Still pass these keys to QTextEdit, in case the user has to scroll
// Still pass these keys to KTextEdit, in case the user has to scroll
// up/down the text
if (e->key() == Qt::Key_Up)
emit m_parent->upPressed();
else if (e->key() == Qt::Key_Down)
emit m_parent->downPressed();
QTextEdit::keyPressEvent(e);
KTextEdit::keyPressEvent(e);
}
}
void EquationEditWidget::focusOutEvent(QFocusEvent* e) {
QTextEdit::focusOutEvent(e);
KTextEdit::focusOutEvent(e);
if (m_clearSelectionOnFocusOut)
clearSelection();
......@@ -80,7 +80,7 @@ void EquationEditWidget::focusOutEvent(QFocusEvent* e) {
void EquationEditWidget::focusInEvent(QFocusEvent* e) {
QTextEdit::focusOutEvent(e);
KTextEdit::focusOutEvent(e);
m_parent->reHighlight();
if (e->reason() == Qt::TabFocusReason)
......
......@@ -25,7 +25,7 @@
#ifndef EQUATIONEDITWIDGET_H
#define EQUATIONEDITWIDGET_H
#include <QtGui/QTextEdit>
#include <KTextEdit>
class EquationEdit;
......@@ -33,7 +33,7 @@ class EquationEdit;
/**
* The actual line edit.
*/
class EquationEditWidget : public QTextEdit
class EquationEditWidget : public KTextEdit
{
public:
EquationEditWidget(EquationEdit* parent);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment