Convert features.textedit to QT_[REQUIRE_]CONFIG
Change-Id: I0fb0e658796484f374586d8d1f0f1b9167ab30d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
14e20bb474
commit
9833e68217
@ -167,7 +167,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
|
|||||||
} else if (classname == QLatin1String("QSplitterHandle")) {
|
} else if (classname == QLatin1String("QSplitterHandle")) {
|
||||||
iface = new QAccessibleWidget(widget, QAccessible::Grip);
|
iface = new QAccessibleWidget(widget, QAccessible::Grip);
|
||||||
#endif
|
#endif
|
||||||
#if !defined(QT_NO_TEXTEDIT) && !defined(QT_NO_CURSOR)
|
#if QT_CONFIG(textedit) && !defined(QT_NO_CURSOR)
|
||||||
} else if (classname == QLatin1String("QTextEdit")) {
|
} else if (classname == QLatin1String("QTextEdit")) {
|
||||||
iface = new QAccessibleTextEdit(widget);
|
iface = new QAccessibleTextEdit(widget);
|
||||||
} else if (classname == QLatin1String("QPlainTextEdit")) {
|
} else if (classname == QLatin1String("QPlainTextEdit")) {
|
||||||
|
@ -41,11 +41,13 @@
|
|||||||
#include "qabstracttextdocumentlayout.h"
|
#include "qabstracttextdocumentlayout.h"
|
||||||
#include "qapplication.h"
|
#include "qapplication.h"
|
||||||
#include "qclipboard.h"
|
#include "qclipboard.h"
|
||||||
#include "qtextedit.h"
|
|
||||||
#include "private/qtextedit_p.h"
|
|
||||||
#include "qtextdocument.h"
|
#include "qtextdocument.h"
|
||||||
#include "qtextobject.h"
|
#include "qtextobject.h"
|
||||||
|
#if QT_CONFIG(textedit)
|
||||||
#include "qplaintextedit.h"
|
#include "qplaintextedit.h"
|
||||||
|
#include "qtextedit.h"
|
||||||
|
#include "private/qtextedit_p.h"
|
||||||
|
#endif
|
||||||
#include "qtextboundaryfinder.h"
|
#include "qtextboundaryfinder.h"
|
||||||
#if QT_CONFIG(scrollbar)
|
#if QT_CONFIG(scrollbar)
|
||||||
#include "qscrollbar.h"
|
#include "qscrollbar.h"
|
||||||
@ -86,6 +88,7 @@
|
|||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#endif
|
#endif
|
||||||
#include <QFocusFrame>
|
#include <QFocusFrame>
|
||||||
|
#include <QMenu>
|
||||||
|
|
||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
|
|
||||||
@ -117,7 +120,7 @@ QList<QWidget*> childWidgets(const QWidget *widget)
|
|||||||
return widgets;
|
return widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QT_NO_TEXTEDIT) && !defined(QT_NO_CURSOR)
|
#if QT_CONFIG(textedit) && !defined(QT_NO_CURSOR)
|
||||||
|
|
||||||
QAccessiblePlainTextEdit::QAccessiblePlainTextEdit(QWidget* o)
|
QAccessiblePlainTextEdit::QAccessiblePlainTextEdit(QWidget* o)
|
||||||
:QAccessibleTextWidget(o)
|
:QAccessibleTextWidget(o)
|
||||||
@ -314,7 +317,7 @@ void QAccessibleTextEdit::scrollToSubstring(int startIndex, int endIndex)
|
|||||||
qWarning("AccessibleTextEdit::scrollToSubstring failed!");
|
qWarning("AccessibleTextEdit::scrollToSubstring failed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // QT_NO_TEXTEDIT && QT_NO_CURSOR
|
#endif // QT_CONFIG(textedit) && QT_NO_CURSOR
|
||||||
|
|
||||||
#if QT_CONFIG(stackedwidget)
|
#if QT_CONFIG(stackedwidget)
|
||||||
// ======================= QAccessibleStackedWidget ======================
|
// ======================= QAccessibleStackedWidget ======================
|
||||||
|
@ -132,7 +132,7 @@ protected:
|
|||||||
virtual QWidget *viewport() const = 0;
|
virtual QWidget *viewport() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
class QAccessiblePlainTextEdit : public QAccessibleTextWidget
|
class QAccessiblePlainTextEdit : public QAccessibleTextWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -184,7 +184,7 @@ protected:
|
|||||||
QTextDocument *textDocument() const Q_DECL_OVERRIDE;
|
QTextDocument *textDocument() const Q_DECL_OVERRIDE;
|
||||||
QWidget *viewport() const Q_DECL_OVERRIDE;
|
QWidget *viewport() const Q_DECL_OVERRIDE;
|
||||||
};
|
};
|
||||||
#endif // QT_NO_TEXTEDIT
|
#endif // QT_CONFIG(textedit)
|
||||||
#endif //QT_NO_CURSOR
|
#endif //QT_NO_CURSOR
|
||||||
|
|
||||||
class QAccessibleStackedWidget : public QAccessibleWidget
|
class QAccessibleStackedWidget : public QAccessibleWidget
|
||||||
|
@ -54,7 +54,9 @@
|
|||||||
#include <QtGui/qicon.h>
|
#include <QtGui/qicon.h>
|
||||||
#include <QtGui/qtextdocument.h>
|
#include <QtGui/qtextdocument.h>
|
||||||
#include <QtWidgets/qapplication.h>
|
#include <QtWidgets/qapplication.h>
|
||||||
|
#if QT_CONFIG(textedit)
|
||||||
#include <QtWidgets/qtextedit.h>
|
#include <QtWidgets/qtextedit.h>
|
||||||
|
#endif
|
||||||
#include <QtWidgets/qmenu.h>
|
#include <QtWidgets/qmenu.h>
|
||||||
#include "qdialog_p.h"
|
#include "qdialog_p.h"
|
||||||
#include <QtGui/qfont.h>
|
#include <QtGui/qfont.h>
|
||||||
@ -83,7 +85,7 @@ enum Button { Old_Ok = 1, Old_Cancel = 2, Old_Yes = 3, Old_No = 4, Old_Abort = 5
|
|||||||
NewButtonMask = 0xFFFFFC00 };
|
NewButtonMask = 0xFFFFFC00 };
|
||||||
|
|
||||||
enum DetailButtonLabel { ShowLabel = 0, HideLabel = 1 };
|
enum DetailButtonLabel { ShowLabel = 0, HideLabel = 1 };
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
class QMessageBoxDetailsText : public QWidget
|
class QMessageBoxDetailsText : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -152,7 +154,7 @@ private:
|
|||||||
bool copyAvailable;
|
bool copyAvailable;
|
||||||
TextEdit *textEdit;
|
TextEdit *textEdit;
|
||||||
};
|
};
|
||||||
#endif // QT_NO_TEXTEDIT
|
#endif // QT_CONFIG(textedit)
|
||||||
|
|
||||||
class DetailButton : public QPushButton
|
class DetailButton : public QPushButton
|
||||||
{
|
{
|
||||||
@ -192,7 +194,7 @@ class QMessageBoxPrivate : public QDialogPrivate
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
QMessageBoxPrivate() : escapeButton(0), defaultButton(0), checkbox(0), clickedButton(0), detailsButton(0),
|
QMessageBoxPrivate() : escapeButton(0), defaultButton(0), checkbox(0), clickedButton(0), detailsButton(0),
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
detailsText(0),
|
detailsText(0),
|
||||||
#endif
|
#endif
|
||||||
compatMode(false), autoAddOkButton(true),
|
compatMode(false), autoAddOkButton(true),
|
||||||
@ -242,7 +244,7 @@ public:
|
|||||||
QCheckBox *checkbox;
|
QCheckBox *checkbox;
|
||||||
QAbstractButton *clickedButton;
|
QAbstractButton *clickedButton;
|
||||||
DetailButton *detailsButton;
|
DetailButton *detailsButton;
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
QMessageBoxDetailsText *detailsText;
|
QMessageBoxDetailsText *detailsText;
|
||||||
#endif
|
#endif
|
||||||
bool compatMode;
|
bool compatMode;
|
||||||
@ -463,7 +465,7 @@ int QMessageBoxPrivate::execReturnCode(QAbstractButton *button)
|
|||||||
void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
|
void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
|
||||||
{
|
{
|
||||||
Q_Q(QMessageBox);
|
Q_Q(QMessageBox);
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
if (detailsButton && detailsText && button == detailsButton) {
|
if (detailsButton && detailsText && button == detailsButton) {
|
||||||
detailsButton->setLabel(detailsText->isHidden() ? HideLabel : ShowLabel);
|
detailsButton->setLabel(detailsText->isHidden() ? HideLabel : ShowLabel);
|
||||||
detailsText->setHidden(!detailsText->isHidden());
|
detailsText->setHidden(!detailsText->isHidden());
|
||||||
@ -1417,7 +1419,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
|
|||||||
|
|
||||||
#if !defined(QT_NO_CLIPBOARD) && !defined(QT_NO_SHORTCUT)
|
#if !defined(QT_NO_CLIPBOARD) && !defined(QT_NO_SHORTCUT)
|
||||||
|
|
||||||
#if !defined(QT_NO_TEXTEDIT)
|
#if QT_CONFIG(textedit)
|
||||||
if (e == QKeySequence::Copy) {
|
if (e == QKeySequence::Copy) {
|
||||||
if (d->detailsText && d->detailsText->isVisible() && d->detailsText->copy()) {
|
if (d->detailsText && d->detailsText->isVisible() && d->detailsText->copy()) {
|
||||||
e->setAccepted(true);
|
e->setAccepted(true);
|
||||||
@ -1428,7 +1430,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
|
|||||||
e->setAccepted(true);
|
e->setAccepted(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif // !QT_NO_TEXTEDIT
|
#endif // QT_CONFIG(textedit)
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
if (e == QKeySequence::Copy) {
|
if (e == QKeySequence::Copy) {
|
||||||
@ -1444,7 +1446,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
|
|||||||
for (const auto *button : buttons)
|
for (const auto *button : buttons)
|
||||||
textToCopy += button->text() + QLatin1String(" ");
|
textToCopy += button->text() + QLatin1String(" ");
|
||||||
textToCopy += QLatin1Char('\n') + separator;
|
textToCopy += QLatin1Char('\n') + separator;
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
if (d->detailsText)
|
if (d->detailsText)
|
||||||
textToCopy += d->detailsText->text() + QLatin1Char('\n') + separator;
|
textToCopy += d->detailsText->text() + QLatin1Char('\n') + separator;
|
||||||
#endif
|
#endif
|
||||||
@ -1982,7 +1984,7 @@ int QMessageBoxPrivate::showOldMessageBox(QWidget *parent, QMessageBox::Icon ico
|
|||||||
|
|
||||||
void QMessageBoxPrivate::retranslateStrings()
|
void QMessageBoxPrivate::retranslateStrings()
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
if (detailsButton)
|
if (detailsButton)
|
||||||
detailsButton->setLabel(detailsText->isHidden() ? ShowLabel : HideLabel);
|
detailsButton->setLabel(detailsText->isHidden() ? ShowLabel : HideLabel);
|
||||||
#endif
|
#endif
|
||||||
@ -2437,7 +2439,7 @@ void QMessageBox::setButtonText(int button, const QString &text)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
/*!
|
/*!
|
||||||
\property QMessageBox::detailedText
|
\property QMessageBox::detailedText
|
||||||
\brief the text to be displayed in the details area.
|
\brief the text to be displayed in the details area.
|
||||||
@ -2485,7 +2487,7 @@ void QMessageBox::setDetailedText(const QString &text)
|
|||||||
}
|
}
|
||||||
d->setupLayout();
|
d->setupLayout();
|
||||||
}
|
}
|
||||||
#endif // QT_NO_TEXTEDIT
|
#endif // QT_CONFIG(textedit)
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\property QMessageBox::informativeText
|
\property QMessageBox::informativeText
|
||||||
|
@ -61,7 +61,7 @@ class Q_WIDGETS_EXPORT QMessageBox : public QDialog
|
|||||||
Q_PROPERTY(QPixmap iconPixmap READ iconPixmap WRITE setIconPixmap)
|
Q_PROPERTY(QPixmap iconPixmap READ iconPixmap WRITE setIconPixmap)
|
||||||
Q_PROPERTY(Qt::TextFormat textFormat READ textFormat WRITE setTextFormat)
|
Q_PROPERTY(Qt::TextFormat textFormat READ textFormat WRITE setTextFormat)
|
||||||
Q_PROPERTY(StandardButtons standardButtons READ standardButtons WRITE setStandardButtons)
|
Q_PROPERTY(StandardButtons standardButtons READ standardButtons WRITE setStandardButtons)
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
Q_PROPERTY(QString detailedText READ detailedText WRITE setDetailedText)
|
Q_PROPERTY(QString detailedText READ detailedText WRITE setDetailedText)
|
||||||
#endif
|
#endif
|
||||||
Q_PROPERTY(QString informativeText READ informativeText WRITE setInformativeText)
|
Q_PROPERTY(QString informativeText READ informativeText WRITE setInformativeText)
|
||||||
@ -270,7 +270,7 @@ public:
|
|||||||
QString informativeText() const;
|
QString informativeText() const;
|
||||||
void setInformativeText(const QString &text);
|
void setInformativeText(const QString &text);
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
QString detailedText() const;
|
QString detailedText() const;
|
||||||
void setDetailedText(const QString &text);
|
void setDetailedText(const QString &text);
|
||||||
#endif
|
#endif
|
||||||
|
@ -56,7 +56,9 @@
|
|||||||
#if QT_CONFIG(lineedit)
|
#if QT_CONFIG(lineedit)
|
||||||
#include <QtWidgets/qlineedit.h>
|
#include <QtWidgets/qlineedit.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if QT_CONFIG(textedit)
|
||||||
#include <QtWidgets/qtextedit.h>
|
#include <QtWidgets/qtextedit.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -52,8 +52,10 @@
|
|||||||
#if QT_CONFIG(lineedit)
|
#if QT_CONFIG(lineedit)
|
||||||
#include <qlineedit.h>
|
#include <qlineedit.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if QT_CONFIG(textedit)
|
||||||
#include <qtextedit.h>
|
#include <qtextedit.h>
|
||||||
#include <qplaintextedit.h>
|
#include <qplaintextedit.h>
|
||||||
|
#endif
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
#include <qvalidator.h>
|
#include <qvalidator.h>
|
||||||
#include <private/qtextengine_p.h>
|
#include <private/qtextengine_p.h>
|
||||||
@ -435,7 +437,7 @@ QAbstractItemDelegatePrivate::QAbstractItemDelegatePrivate()
|
|||||||
|
|
||||||
static bool editorHandlesKeyEvent(QWidget *editor, const QKeyEvent *event)
|
static bool editorHandlesKeyEvent(QWidget *editor, const QKeyEvent *event)
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
// do not filter enter / return / tab / backtab for QTextEdit or QPlainTextEdit
|
// do not filter enter / return / tab / backtab for QTextEdit or QPlainTextEdit
|
||||||
if (qobject_cast<QTextEdit *>(editor) || qobject_cast<QPlainTextEdit *>(editor)) {
|
if (qobject_cast<QTextEdit *>(editor) || qobject_cast<QPlainTextEdit *>(editor)) {
|
||||||
switch (event->key()) {
|
switch (event->key()) {
|
||||||
@ -449,7 +451,7 @@ static bool editorHandlesKeyEvent(QWidget *editor, const QKeyEvent *event)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // QT_NO_TEXTEDIT
|
#endif // QT_CONFIG(textedit)
|
||||||
|
|
||||||
Q_UNUSED(editor);
|
Q_UNUSED(editor);
|
||||||
Q_UNUSED(event);
|
Q_UNUSED(event);
|
||||||
|
@ -45,8 +45,10 @@
|
|||||||
#if QT_CONFIG(lineedit)
|
#if QT_CONFIG(lineedit)
|
||||||
#include <qlineedit.h>
|
#include <qlineedit.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if QT_CONFIG(textedit)
|
||||||
#include <qtextedit.h>
|
#include <qtextedit.h>
|
||||||
#include <qplaintextedit.h>
|
#include <qplaintextedit.h>
|
||||||
|
#endif
|
||||||
#include <qpainter.h>
|
#include <qpainter.h>
|
||||||
#include <qpalette.h>
|
#include <qpalette.h>
|
||||||
#include <qpoint.h>
|
#include <qpoint.h>
|
||||||
|
@ -43,7 +43,9 @@
|
|||||||
#include "qpixmapstyle_p_p.h"
|
#include "qpixmapstyle_p_p.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#if QT_CONFIG(textedit)
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
|
#endif
|
||||||
#include <QStringBuilder>
|
#include <QStringBuilder>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QPixmapCache>
|
#include <QPixmapCache>
|
||||||
|
@ -60,8 +60,10 @@
|
|||||||
#include "qvariant.h"
|
#include "qvariant.h"
|
||||||
#include "qvector.h"
|
#include "qvector.h"
|
||||||
#include "qdebug.h"
|
#include "qdebug.h"
|
||||||
|
#if QT_CONFIG(textedit)
|
||||||
#include "qtextedit.h"
|
#include "qtextedit.h"
|
||||||
#include <private/qtextedit_p.h>
|
#include <private/qtextedit_p.h>
|
||||||
|
#endif
|
||||||
#include <private/qwidgettextcontrol_p.h>
|
#include <private/qwidgettextcontrol_p.h>
|
||||||
|
|
||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
|
@ -63,8 +63,6 @@
|
|||||||
#include <qtexttable.h>
|
#include <qtexttable.h>
|
||||||
#include <qvariant.h>
|
#include <qvariant.h>
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
static inline bool shouldEnableInputMethod(QPlainTextEdit *plaintextedit)
|
static inline bool shouldEnableInputMethod(QPlainTextEdit *plaintextedit)
|
||||||
@ -3194,5 +3192,3 @@ QT_END_NAMESPACE
|
|||||||
|
|
||||||
#include "moc_qplaintextedit.cpp"
|
#include "moc_qplaintextedit.cpp"
|
||||||
#include "moc_qplaintextedit_p.cpp"
|
#include "moc_qplaintextedit_p.cpp"
|
||||||
|
|
||||||
#endif // QT_NO_TEXTEDIT
|
|
||||||
|
@ -50,11 +50,10 @@
|
|||||||
#include <QtGui/qtextformat.h>
|
#include <QtGui/qtextformat.h>
|
||||||
#include <QtGui/qabstracttextdocumentlayout.h>
|
#include <QtGui/qabstracttextdocumentlayout.h>
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
QT_REQUIRE_CONFIG(textedit);
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
class QStyleSheet;
|
class QStyleSheet;
|
||||||
class QTextDocument;
|
class QTextDocument;
|
||||||
class QMenu;
|
class QMenu;
|
||||||
@ -329,7 +328,4 @@ private:
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
#endif // QT_NO_TEXTEDIT
|
|
||||||
|
|
||||||
#endif // QPLAINTEXTEDIT_H
|
#endif // QPLAINTEXTEDIT_H
|
||||||
|
@ -64,10 +64,10 @@
|
|||||||
#include "QtCore/qbasictimer.h"
|
#include "QtCore/qbasictimer.h"
|
||||||
#include "qplaintextedit.h"
|
#include "qplaintextedit.h"
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
|
||||||
|
|
||||||
#include "private/qwidgettextcontrol_p.h"
|
#include "private/qwidgettextcontrol_p.h"
|
||||||
|
|
||||||
|
QT_REQUIRE_CONFIG(textedit);
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QMimeData;
|
class QMimeData;
|
||||||
@ -187,6 +187,4 @@ public:
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_TEXTEDIT
|
|
||||||
|
|
||||||
#endif // QPLAINTEXTEDIT_P_H
|
#endif // QPLAINTEXTEDIT_P_H
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
#include "qtextbrowser.h"
|
#include "qtextbrowser.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
|
||||||
#include <qfont.h>
|
#include <qfont.h>
|
||||||
#include <qpainter.h>
|
#include <qpainter.h>
|
||||||
#include <qevent.h>
|
#include <qevent.h>
|
||||||
@ -71,12 +70,8 @@
|
|||||||
#include <qtexttable.h>
|
#include <qtexttable.h>
|
||||||
#include <qvariant.h>
|
#include <qvariant.h>
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
|
||||||
static inline bool shouldEnableInputMethod(QTextEdit *textedit)
|
static inline bool shouldEnableInputMethod(QTextEdit *textedit)
|
||||||
{
|
{
|
||||||
return !textedit->isReadOnly();
|
return !textedit->isReadOnly();
|
||||||
@ -2639,8 +2634,6 @@ void QTextEdit::ensureCursorVisible()
|
|||||||
(\a available is true) or unavailable (\a available is false).
|
(\a available is true) or unavailable (\a available is false).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif // QT_NO_TEXTEDIT
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#include "moc_qtextedit.cpp"
|
#include "moc_qtextedit.cpp"
|
||||||
|
@ -47,12 +47,10 @@
|
|||||||
#include <QtGui/qtextcursor.h>
|
#include <QtGui/qtextcursor.h>
|
||||||
#include <QtGui/qtextformat.h>
|
#include <QtGui/qtextformat.h>
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
QT_REQUIRE_CONFIG(textedit);
|
||||||
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
class QStyleSheet;
|
class QStyleSheet;
|
||||||
class QTextDocument;
|
class QTextDocument;
|
||||||
class QMenu;
|
class QMenu;
|
||||||
@ -321,6 +319,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QTextEdit::AutoFormatting)
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_TEXTEDIT
|
|
||||||
|
|
||||||
#endif // QTEXTEDIT_H
|
#endif // QTEXTEDIT_H
|
||||||
|
@ -65,10 +65,10 @@
|
|||||||
#include "QtCore/qurl.h"
|
#include "QtCore/qurl.h"
|
||||||
#include "qtextedit.h"
|
#include "qtextedit.h"
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
|
||||||
|
|
||||||
#include "private/qwidgettextcontrol_p.h"
|
#include "private/qwidgettextcontrol_p.h"
|
||||||
|
|
||||||
|
QT_REQUIRE_CONFIG(textedit);
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QMimeData;
|
class QMimeData;
|
||||||
@ -141,6 +141,4 @@ public:
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_TEXTEDIT
|
|
||||||
|
|
||||||
#endif // QTEXTEDIT_P_H
|
#endif // QTEXTEDIT_P_H
|
||||||
|
@ -53,7 +53,9 @@
|
|||||||
#include <qtimer.h>
|
#include <qtimer.h>
|
||||||
#include "private/qtextdocumentlayout_p.h"
|
#include "private/qtextdocumentlayout_p.h"
|
||||||
#include "private/qabstracttextdocumentlayout_p.h"
|
#include "private/qabstracttextdocumentlayout_p.h"
|
||||||
|
#if QT_CONFIG(textedit)
|
||||||
#include "private/qtextedit_p.h"
|
#include "private/qtextedit_p.h"
|
||||||
|
#endif
|
||||||
#include "qtextdocument.h"
|
#include "qtextdocument.h"
|
||||||
#include "private/qtextdocument_p.h"
|
#include "private/qtextdocument_p.h"
|
||||||
#include "qtextlist.h"
|
#include "qtextlist.h"
|
||||||
@ -1349,7 +1351,7 @@ process:
|
|||||||
|
|
||||||
QVariant QWidgetTextControl::loadResource(int type, const QUrl &name)
|
QVariant QWidgetTextControl::loadResource(int type, const QUrl &name)
|
||||||
{
|
{
|
||||||
#ifdef QT_NO_TEXTEDIT
|
#if !QT_CONFIG(textedit)
|
||||||
Q_UNUSED(type);
|
Q_UNUSED(type);
|
||||||
Q_UNUSED(name);
|
Q_UNUSED(name);
|
||||||
#else
|
#else
|
||||||
@ -2410,7 +2412,7 @@ void QWidgetTextControl::setAcceptRichText(bool accept)
|
|||||||
d->acceptRichText = accept;
|
d->acceptRichText = accept;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
|
|
||||||
void QWidgetTextControl::setExtraSelections(const QList<QTextEdit::ExtraSelection> &selections)
|
void QWidgetTextControl::setExtraSelections(const QList<QTextEdit::ExtraSelection> &selections)
|
||||||
{
|
{
|
||||||
@ -2474,7 +2476,7 @@ QList<QTextEdit::ExtraSelection> QWidgetTextControl::extraSelections() const
|
|||||||
return selections;
|
return selections;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // QT_NO_TEXTEDIT
|
#endif // QT_CONFIG(textedit)
|
||||||
|
|
||||||
void QWidgetTextControl::setTextWidth(qreal width)
|
void QWidgetTextControl::setTextWidth(qreal width)
|
||||||
{
|
{
|
||||||
@ -3295,7 +3297,7 @@ void QUnicodeControlCharacterMenu::menuActionTriggered()
|
|||||||
QChar c(qt_controlCharacters[idx].character);
|
QChar c(qt_controlCharacters[idx].character);
|
||||||
QString str(c);
|
QString str(c);
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
if (QTextEdit *edit = qobject_cast<QTextEdit *>(editWidget)) {
|
if (QTextEdit *edit = qobject_cast<QTextEdit *>(editWidget)) {
|
||||||
edit->insertPlainText(str);
|
edit->insertPlainText(str);
|
||||||
return;
|
return;
|
||||||
|
@ -56,7 +56,9 @@
|
|||||||
#include <QtGui/qtextoption.h>
|
#include <QtGui/qtextoption.h>
|
||||||
#include <QtGui/qtextcursor.h>
|
#include <QtGui/qtextcursor.h>
|
||||||
#include <QtGui/qtextformat.h>
|
#include <QtGui/qtextformat.h>
|
||||||
|
#if QT_CONFIG(textedit)
|
||||||
#include <QtWidgets/qtextedit.h>
|
#include <QtWidgets/qtextedit.h>
|
||||||
|
#endif
|
||||||
#include <QtWidgets/qmenu.h>
|
#include <QtWidgets/qmenu.h>
|
||||||
#include <QtCore/qrect.h>
|
#include <QtCore/qrect.h>
|
||||||
#include <QtGui/qabstracttextdocumentlayout.h>
|
#include <QtGui/qabstracttextdocumentlayout.h>
|
||||||
@ -148,7 +150,7 @@ public:
|
|||||||
bool acceptRichText() const;
|
bool acceptRichText() const;
|
||||||
void setAcceptRichText(bool accept);
|
void setAcceptRichText(bool accept);
|
||||||
|
|
||||||
#ifndef QT_NO_TEXTEDIT
|
#if QT_CONFIG(textedit)
|
||||||
void setExtraSelections(const QList<QTextEdit::ExtraSelection> &selections);
|
void setExtraSelections(const QList<QTextEdit::ExtraSelection> &selections);
|
||||||
QList<QTextEdit::ExtraSelection> extraSelections() const;
|
QList<QTextEdit::ExtraSelection> extraSelections() const;
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,8 +5,6 @@ HEADERS += \
|
|||||||
widgets/qframe_p.h \
|
widgets/qframe_p.h \
|
||||||
widgets/qmenu.h \
|
widgets/qmenu.h \
|
||||||
widgets/qmenu_p.h \
|
widgets/qmenu_p.h \
|
||||||
widgets/qtextedit.h \
|
|
||||||
widgets/qtextedit_p.h \
|
|
||||||
widgets/qtoolbar.h \
|
widgets/qtoolbar.h \
|
||||||
widgets/qtoolbar_p.h \
|
widgets/qtoolbar_p.h \
|
||||||
widgets/qtoolbarlayout_p.h \
|
widgets/qtoolbarlayout_p.h \
|
||||||
@ -15,22 +13,18 @@ HEADERS += \
|
|||||||
widgets/qabstractscrollarea_p.h \
|
widgets/qabstractscrollarea_p.h \
|
||||||
widgets/qfocusframe.h \
|
widgets/qfocusframe.h \
|
||||||
widgets/qwidgetanimator_p.h \
|
widgets/qwidgetanimator_p.h \
|
||||||
widgets/qtoolbararealayout_p.h \
|
widgets/qtoolbararealayout_p.h
|
||||||
widgets/qplaintextedit.h \
|
|
||||||
widgets/qplaintextedit_p.h
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
widgets/qframe.cpp \
|
widgets/qframe.cpp \
|
||||||
widgets/qmenu.cpp \
|
widgets/qmenu.cpp \
|
||||||
widgets/qtextedit.cpp \
|
|
||||||
widgets/qtoolbar.cpp \
|
widgets/qtoolbar.cpp \
|
||||||
widgets/qtoolbarlayout.cpp \
|
widgets/qtoolbarlayout.cpp \
|
||||||
widgets/qtoolbarseparator.cpp \
|
widgets/qtoolbarseparator.cpp \
|
||||||
widgets/qabstractscrollarea.cpp \
|
widgets/qabstractscrollarea.cpp \
|
||||||
widgets/qfocusframe.cpp \
|
widgets/qfocusframe.cpp \
|
||||||
widgets/qwidgetanimator.cpp \
|
widgets/qwidgetanimator.cpp \
|
||||||
widgets/qtoolbararealayout.cpp \
|
widgets/qtoolbararealayout.cpp
|
||||||
widgets/qplaintextedit.cpp
|
|
||||||
|
|
||||||
qtConfig(abstractbutton) {
|
qtConfig(abstractbutton) {
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
@ -305,6 +299,18 @@ qtConfig(tabbar) {
|
|||||||
SOURCES += widgets/qtabbar.cpp
|
SOURCES += widgets/qtabbar.cpp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qtConfig(textedit) {
|
||||||
|
HEADERS += \
|
||||||
|
widgets/qplaintextedit.h \
|
||||||
|
widgets/qplaintextedit_p.h \
|
||||||
|
widgets/qtextedit.h \
|
||||||
|
widgets/qtextedit_p.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
widgets/qplaintextedit.cpp \
|
||||||
|
widgets/qtextedit.cpp
|
||||||
|
}
|
||||||
|
|
||||||
qtConfig(textbrowser) {
|
qtConfig(textbrowser) {
|
||||||
HEADERS += widgets/qtextbrowser.h
|
HEADERS += widgets/qtextbrowser.h
|
||||||
SOURCES += widgets/qtextbrowser.cpp
|
SOURCES += widgets/qtextbrowser.cpp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user