Convert features.lineedit to QT_[REQUIRE_]CONFIG
Change-Id: I509977994b11a7fc0c109bfcc83aadeee6c9b0b8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>bb10
parent
df99fbdbed
commit
710a9180c1
|
|
@ -52,7 +52,9 @@
|
|||
#if QT_CONFIG(combobox)
|
||||
#include <qcombobox.h>
|
||||
#endif
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
#endif
|
||||
#include <qstyle.h>
|
||||
#include <qstyleoption.h>
|
||||
#include <qtooltip.h>
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
|
|||
return iface;
|
||||
|
||||
if (false) {
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
} else if (classname == QLatin1String("QLineEdit")) {
|
||||
if (widget->objectName() == QLatin1String("qt_spinbox_lineedit"))
|
||||
iface = 0;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,9 @@
|
|||
#include <qstyleoption.h>
|
||||
#include <qdebug.h>
|
||||
#include <qglobal.h>
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <QtWidgets/qlineedit.h>
|
||||
#endif
|
||||
#include <qmath.h>
|
||||
#include <private/qmath_p.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -70,8 +70,10 @@
|
|||
#if QT_CONFIG(lcdnumber)
|
||||
#include <qlcdnumber.h>
|
||||
#endif
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
#include <private/qlineedit_p.h>
|
||||
#endif
|
||||
#include <qstyle.h>
|
||||
#include <qstyleoption.h>
|
||||
#include <qtextdocument.h>
|
||||
|
|
@ -659,7 +661,7 @@ QStringList QAccessibleGroupBox::keyBindingsForAction(const QString &) const
|
|||
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
/*!
|
||||
\class QAccessibleLineEdit
|
||||
\brief The QAccessibleLineEdit class implements the QAccessibleInterface for widgets with editable text
|
||||
|
|
@ -896,7 +898,7 @@ void QAccessibleLineEdit::replaceText(int startOffset, int endOffset, const QStr
|
|||
lineEdit()->setText(lineEdit()->text().replace(startOffset, endOffset - startOffset, text));
|
||||
}
|
||||
|
||||
#endif // QT_NO_LINEEDIT
|
||||
#endif // QT_CONFIG(lineedit)
|
||||
|
||||
#if QT_CONFIG(progressbar)
|
||||
QAccessibleProgressBar::QAccessibleProgressBar(QWidget *o)
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ private:
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
class QAccessibleLineEdit : public QAccessibleWidget, public QAccessibleTextInterface, public QAccessibleEditableTextInterface
|
||||
{
|
||||
public:
|
||||
|
|
@ -188,7 +188,7 @@ protected:
|
|||
QLineEdit *lineEdit() const;
|
||||
friend class QAccessibleAbstractSpinBox;
|
||||
};
|
||||
#endif // QT_NO_LINEEDIT
|
||||
#endif // QT_CONFIG(lineedit)
|
||||
|
||||
#if QT_CONFIG(progressbar)
|
||||
class QAccessibleProgressBar : public QAccessibleDisplay, public QAccessibleValueInterface
|
||||
|
|
|
|||
|
|
@ -51,7 +51,9 @@
|
|||
#include "qevent.h"
|
||||
#include "qframe.h"
|
||||
#include "qlabel.h"
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include "qlineedit.h"
|
||||
#endif
|
||||
#include "qpainter.h"
|
||||
#include "qwindow.h"
|
||||
#include "qpushbutton.h"
|
||||
|
|
@ -3682,7 +3684,7 @@ bool QWizardPage::isComplete() const
|
|||
if (value == field.initialValue)
|
||||
return false;
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(field.object)) {
|
||||
if (!lineEdit->hasAcceptableInput())
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,9 @@
|
|||
#include <QtGui/qpainter.h>
|
||||
#include <QtWidgets/qstyleoption.h>
|
||||
#include <QtWidgets/qgraphicsview.h>
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <QtWidgets/qlineedit.h>
|
||||
#endif
|
||||
#include <QtWidgets/qtextedit.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -49,7 +49,9 @@
|
|||
#include <qevent.h>
|
||||
#include <qstring.h>
|
||||
#include <qdebug.h>
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
#endif
|
||||
#include <qtextedit.h>
|
||||
#include <qplaintextedit.h>
|
||||
#include <qapplication.h>
|
||||
|
|
@ -536,7 +538,7 @@ bool QAbstractItemDelegatePrivate::editorEventFilter(QObject *object, QEvent *ev
|
|||
|
||||
bool QAbstractItemDelegatePrivate::tryFixup(QWidget *editor)
|
||||
{
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
if (QLineEdit *e = qobject_cast<QLineEdit*>(editor)) {
|
||||
if (!e->hasAcceptableInput()) {
|
||||
#if QT_CONFIG(validator)
|
||||
|
|
@ -551,7 +553,7 @@ bool QAbstractItemDelegatePrivate::tryFixup(QWidget *editor)
|
|||
}
|
||||
#else
|
||||
Q_UNUSED(editor)
|
||||
#endif // QT_NO_LINEEDIT
|
||||
#endif // QT_CONFIG(lineedit)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,9 @@
|
|||
#include <qscrollbar.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qdatetime.h>
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
#endif
|
||||
#if QT_CONFIG(spinbox)
|
||||
#include <qspinbox.h>
|
||||
#endif
|
||||
|
|
@ -4217,7 +4219,7 @@ QWidget *QAbstractItemViewPrivate::editor(const QModelIndex &index,
|
|||
QWidget *focusWidget = w;
|
||||
while (QWidget *fp = focusWidget->focusProxy())
|
||||
focusWidget = fp;
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
if (QLineEdit *le = qobject_cast<QLineEdit*>(focusWidget))
|
||||
le->selectAll();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@
|
|||
#if QT_CONFIG(label)
|
||||
#include <qlabel.h>
|
||||
#endif
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
#endif
|
||||
#if QT_CONFIG(spinbox)
|
||||
#include <qspinbox.h>
|
||||
#endif
|
||||
|
|
@ -284,7 +286,7 @@ QWidget *QDefaultItemEditorFactory::createEditor(int userType, QWidget *parent)
|
|||
sb->setMaximum(DBL_MAX);
|
||||
return sb; }
|
||||
#endif
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
case QVariant::String:
|
||||
default: {
|
||||
// the default editor is a lineedit
|
||||
|
|
@ -537,7 +539,7 @@ QItemEditorCreatorBase::~QItemEditorCreatorBase()
|
|||
\reimp
|
||||
*/
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
|
||||
QExpandingLineEdit::QExpandingLineEdit(QWidget *parent)
|
||||
: QLineEdit(parent), originalWidth(-1), widgetOwnsGeometry(false)
|
||||
|
|
@ -597,7 +599,7 @@ void QExpandingLineEdit::resizeToContents()
|
|||
}
|
||||
}
|
||||
|
||||
#endif // QT_NO_LINEEDIT
|
||||
#endif // QT_CONFIG(lineedit)
|
||||
|
||||
#if QT_CONFIG(combobox)
|
||||
|
||||
|
|
@ -622,7 +624,7 @@ bool QBooleanComboBox::value() const
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#if !defined(QT_NO_LINEEDIT) || QT_CONFIG(combobox)
|
||||
#if QT_CONFIG(lineedit) || QT_CONFIG(combobox)
|
||||
#include "qitemeditorfactory.moc"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@
|
|||
|
||||
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include <qlineedit.h>
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
|
|
@ -89,6 +89,6 @@ private:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_LINEEDIT
|
||||
#endif // QT_CONFIG(lineedit)
|
||||
|
||||
#endif //QITEMEDITORFACTORY_P_H
|
||||
|
|
|
|||
|
|
@ -42,7 +42,9 @@
|
|||
#include <qabstractitemmodel.h>
|
||||
#include <qapplication.h>
|
||||
#include <qbrush.h>
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
#endif
|
||||
#include <qtextedit.h>
|
||||
#include <qplaintextedit.h>
|
||||
#include <qpainter.h>
|
||||
|
|
@ -501,7 +503,7 @@ void QStyledItemDelegate::updateEditorGeometry(QWidget *editor,
|
|||
// let the editor take up all available space
|
||||
//if the editor is not a QLineEdit
|
||||
//or it is in a QTableView
|
||||
#if QT_CONFIG(tableview) && !defined(QT_NO_LINEEDIT)
|
||||
#if QT_CONFIG(tableview) && QT_CONFIG(lineedit)
|
||||
if (qobject_cast<QExpandingLineEdit*>(editor) && !qobject_cast<const QTableView*>(widget))
|
||||
opt.showDecorationSelected = editor->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, 0, editor);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -611,7 +611,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
|||
}
|
||||
break;
|
||||
#endif // QT_CONFIG(tabbar)
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
case PE_PanelLineEdit:
|
||||
if (const QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
|
||||
p->fillRect(panel->rect.adjusted(panel->lineWidth, panel->lineWidth, -panel->lineWidth, -panel->lineWidth),
|
||||
|
|
@ -621,7 +621,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
|||
proxy()->drawPrimitive(PE_FrameLineEdit, panel, p, widget);
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_LINEEDIT
|
||||
#endif // QT_CONFIG(lineedit)
|
||||
#if QT_CONFIG(columnview)
|
||||
case PE_IndicatorColumnViewArrow: {
|
||||
if (const QStyleOptionViewItem *viewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,9 @@
|
|||
#include <qgroupbox.h>
|
||||
#include <qhash.h>
|
||||
#include <qheaderview.h>
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
#endif
|
||||
#if QT_CONFIG(mainwindow)
|
||||
#include <qmainwindow.h>
|
||||
#endif
|
||||
|
|
@ -679,7 +681,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
|
|||
else if (qobject_cast<const QProgressBar *>(widg))
|
||||
ct = QStyle::CT_ProgressBar;
|
||||
#endif
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
else if (qobject_cast<const QLineEdit *>(widg))
|
||||
ct = QStyle::CT_LineEdit;
|
||||
#endif
|
||||
|
|
@ -3573,7 +3575,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
|
|||
// Draw the focus frame for widgets other than QLineEdit (e.g. for line edits in Webkit).
|
||||
// Focus frame is drawn outside the rectangle passed in the option-rect.
|
||||
if (const QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
if ((opt->state & State_HasFocus) && !qobject_cast<const QLineEdit*>(w)) {
|
||||
int vmargin = pixelMetric(QStyle::PM_FocusFrameVMargin);
|
||||
int hmargin = pixelMetric(QStyle::PM_FocusFrameHMargin);
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@
|
|||
#include <qhash.h>
|
||||
#include <qheaderview.h>
|
||||
#include <qlayout.h>
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
#endif
|
||||
#if QT_CONFIG(listview)
|
||||
#include <qlistview.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -51,7 +51,9 @@
|
|||
#endif
|
||||
#include <qpainter.h>
|
||||
#include <qstyleoption.h>
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
#endif
|
||||
#include <private/qwindowsstyle_p.h>
|
||||
#if QT_CONFIG(combobox)
|
||||
#include <qcombobox.h>
|
||||
|
|
@ -2040,7 +2042,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
|
|||
|
||||
}
|
||||
#endif
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
// LineEdit sets Sunken flag to indicate Sunken frame (argh)
|
||||
if (const QLineEdit *lineEdit = qobject_cast<const QLineEdit *>(obj)) {
|
||||
state &= ~QStyle::State_Sunken;
|
||||
|
|
@ -2388,7 +2390,7 @@ static QWidget *embeddedWidget(QWidget *w)
|
|||
*/
|
||||
static QWidget *containerWidget(const QWidget *w)
|
||||
{
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
if (qobject_cast<const QLineEdit *>(w)) {
|
||||
//if the QLineEdit is an embeddedWidget, we need the rule of the real widget
|
||||
#if QT_CONFIG(combobox)
|
||||
|
|
@ -2400,7 +2402,7 @@ static QWidget *containerWidget(const QWidget *w)
|
|||
return w->parentWidget();
|
||||
#endif
|
||||
}
|
||||
#endif // QT_NO_LINEEDIT
|
||||
#endif // QT_CONFIG(lineedit)
|
||||
|
||||
#if QT_CONFIG(scrollarea)
|
||||
if (const QAbstractScrollArea *sa = qobject_cast<const QAbstractScrollArea *>(w->parentWidget())) {
|
||||
|
|
@ -2461,7 +2463,7 @@ static quint64 extendedPseudoClass(const QWidget *w)
|
|||
pc |= (combo->isEditable() ? PseudoClass_Editable : PseudoClass_ReadOnly);
|
||||
} else
|
||||
#endif
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
if (const QLineEdit *edit = qobject_cast<const QLineEdit *>(w)) {
|
||||
pc |= (edit->isReadOnly() ? PseudoClass_ReadOnly : PseudoClass_Editable);
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -2292,11 +2292,11 @@ void QWindowsVistaStyle::polish(QApplication *app)
|
|||
void QWindowsVistaStyle::polish(QWidget *widget)
|
||||
{
|
||||
QWindowsXPStyle::polish(widget);
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
if (qobject_cast<QLineEdit*>(widget))
|
||||
widget->setAttribute(Qt::WA_Hover);
|
||||
else
|
||||
#endif // QT_NO_LINEEDIT
|
||||
#endif // QT_CONFIG(lineedit)
|
||||
if (qobject_cast<QGroupBox*>(widget))
|
||||
widget->setAttribute(Qt::WA_Hover);
|
||||
else if (qobject_cast<QCommandLinkButton*>(widget)) {
|
||||
|
|
@ -2353,11 +2353,11 @@ void QWindowsVistaStyle::unpolish(QWidget *widget)
|
|||
|
||||
d->stopAnimation(widget);
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
if (qobject_cast<QLineEdit*>(widget))
|
||||
widget->setAttribute(Qt::WA_Hover, false);
|
||||
else
|
||||
#endif // QT_NO_LINEEDIT
|
||||
#endif // QT_CONFIG(lineedit)
|
||||
if (qobject_cast<QGroupBox*>(widget))
|
||||
widget->setAttribute(Qt::WA_Hover, false);
|
||||
else if (qobject_cast<QMessageBox *> (widget)) {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,9 @@
|
|||
#include <qpushbutton.h>
|
||||
#endif
|
||||
#include <qradiobutton.h>
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <qlineedit.h>
|
||||
#endif
|
||||
#include <qgroupbox.h>
|
||||
#if QT_CONFIG(toolbutton)
|
||||
#include <qtoolbutton.h>
|
||||
|
|
|
|||
|
|
@ -158,7 +158,9 @@
|
|||
#include "QtWidgets/qapplication.h"
|
||||
#include "QtGui/qevent.h"
|
||||
#include "QtWidgets/qdesktopwidget.h"
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include "QtWidgets/qlineedit.h"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
#include "qlineedit.h"
|
||||
#include "qlineedit_p.h"
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#include "qaction.h"
|
||||
#include "qapplication.h"
|
||||
#include "qclipboard.h"
|
||||
|
|
@ -2217,5 +2216,3 @@ void QLineEdit::changeEvent(QEvent *ev)
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qlineedit.cpp"
|
||||
|
||||
#endif // QT_NO_LINEEDIT
|
||||
|
|
|
|||
|
|
@ -46,11 +46,10 @@
|
|||
#include <QtCore/qstring.h>
|
||||
#include <QtCore/qmargins.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(lineedit);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
|
||||
class QValidator;
|
||||
class QMenu;
|
||||
class QLineEditPrivate;
|
||||
|
|
@ -262,8 +261,6 @@ private:
|
|||
Q_PRIVATE_SLOT(d_func(), void _q_clearButtonClicked())
|
||||
};
|
||||
|
||||
#endif // QT_NO_LINEEDIT
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QLINEEDIT_H
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@
|
|||
#include "qlineedit.h"
|
||||
#include "qlineedit_p.h"
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
|
||||
#include "qvariant.h"
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include "qabstractitemview.h"
|
||||
|
|
@ -625,5 +623,3 @@ int QLineEditPrivate::effectiveRightTextMargin() const
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qlineedit_p.cpp"
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@
|
|||
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#include "private/qwidget_p.h"
|
||||
#include "QtWidgets/qlineedit.h"
|
||||
#if QT_CONFIG(toolbutton)
|
||||
|
|
@ -73,6 +72,8 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
QT_REQUIRE_CONFIG(lineedit);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QLineEditPrivate;
|
||||
|
|
@ -256,8 +257,6 @@ private:
|
|||
Q_DECLARE_TYPEINFO(QLineEditPrivate::SideWidgetEntry, Q_PRIMITIVE_TYPE);
|
||||
Q_DECLARE_TYPEINFO(QLineEditPrivate::SideWidgetLocation, Q_PRIMITIVE_TYPE);
|
||||
|
||||
#endif // QT_NO_LINEEDIT
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QLINEEDIT_P_H
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "qtextedit_p.h"
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include "qlineedit.h"
|
||||
#endif
|
||||
#if QT_CONFIG(textbrowser)
|
||||
#include "qtextbrowser.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "qwidgetlinecontrol_p.h"
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include "qabstractitemview.h"
|
||||
#endif
|
||||
|
|
@ -1975,5 +1973,3 @@ bool QWidgetLineControl::isRedoAvailable() const
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qwidgetlinecontrol_p.cpp"
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@
|
|||
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#include "private/qwidget_p.h"
|
||||
#include "QtWidgets/qlineedit.h"
|
||||
#include "QtGui/qtextlayout.h"
|
||||
|
|
@ -76,8 +75,9 @@
|
|||
# undef DrawText
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(lineedit);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_WIDGETS_EXPORT QWidgetLineControl : public QInputControl
|
||||
{
|
||||
|
|
@ -564,6 +564,4 @@ private:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_LINEEDIT
|
||||
|
||||
#endif // QWIDGETLINECONTROL_P_H
|
||||
|
|
|
|||
|
|
@ -79,7 +79,9 @@
|
|||
#include <qinputmethod.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qstyleoption.h>
|
||||
#if QT_CONFIG(lineedit)
|
||||
#include <QtWidgets/qlineedit.h>
|
||||
#endif
|
||||
#include <QtGui/qaccessible.h>
|
||||
#include <QtCore/qmetaobject.h>
|
||||
|
||||
|
|
@ -3302,7 +3304,7 @@ void QUnicodeControlCharacterMenu::menuActionTriggered()
|
|||
if (QWidgetTextControl *control = qobject_cast<QWidgetTextControl *>(editWidget)) {
|
||||
control->insertPlainText(str);
|
||||
}
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
#if QT_CONFIG(lineedit)
|
||||
if (QLineEdit *edit = qobject_cast<QLineEdit *>(editWidget)) {
|
||||
edit->insert(str);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
HEADERS += \
|
||||
widgets/qframe.h \
|
||||
widgets/qframe_p.h \
|
||||
widgets/qlineedit.h \
|
||||
widgets/qlineedit_p.h \
|
||||
widgets/qmenu.h \
|
||||
widgets/qmenu_p.h \
|
||||
widgets/qslider.h \
|
||||
|
|
@ -18,15 +16,12 @@ HEADERS += \
|
|||
widgets/qabstractscrollarea_p.h \
|
||||
widgets/qfocusframe.h \
|
||||
widgets/qwidgetanimator_p.h \
|
||||
widgets/qwidgetlinecontrol_p.h \
|
||||
widgets/qtoolbararealayout_p.h \
|
||||
widgets/qplaintextedit.h \
|
||||
widgets/qplaintextedit_p.h
|
||||
|
||||
SOURCES += \
|
||||
widgets/qframe.cpp \
|
||||
widgets/qlineedit_p.cpp \
|
||||
widgets/qlineedit.cpp \
|
||||
widgets/qmenu.cpp \
|
||||
widgets/qslider.cpp \
|
||||
widgets/qtextedit.cpp \
|
||||
|
|
@ -36,7 +31,6 @@ SOURCES += \
|
|||
widgets/qabstractscrollarea.cpp \
|
||||
widgets/qfocusframe.cpp \
|
||||
widgets/qwidgetanimator.cpp \
|
||||
widgets/qwidgetlinecontrol.cpp \
|
||||
widgets/qtoolbararealayout.cpp \
|
||||
widgets/qplaintextedit.cpp
|
||||
|
||||
|
|
@ -160,6 +154,18 @@ qtConfig(lcdnumber) {
|
|||
widgets/qlcdnumber.cpp
|
||||
}
|
||||
|
||||
qtConfig(lineedit) {
|
||||
HEADERS += \
|
||||
widgets/qlineedit.h \
|
||||
widgets/qlineedit_p.h \
|
||||
widgets/qwidgetlinecontrol_p.h
|
||||
|
||||
SOURCES += \
|
||||
widgets/qlineedit_p.cpp \
|
||||
widgets/qlineedit.cpp \
|
||||
widgets/qwidgetlinecontrol.cpp
|
||||
}
|
||||
|
||||
qtConfig(mainwindow) {
|
||||
HEADERS += \
|
||||
widgets/qmainwindow.h \
|
||||
|
|
|
|||
Loading…
Reference in New Issue