Fix build with '-no-feature-action' configuration
Task-number: QTBUG-68353 Change-Id: Ia949e4a72a363df5fba86504e5f7e3ce8a3ad347 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>bb10
parent
9146432dc6
commit
21291d78c5
|
|
@ -99,6 +99,10 @@ static inline int themeDialogType(const QDialog *dialog)
|
|||
#if QT_CONFIG(errormessage)
|
||||
if (qobject_cast<const QErrorMessage *>(dialog))
|
||||
return QPlatformTheme::MessageDialog;
|
||||
#endif
|
||||
#if !QT_CONFIG(filedialog) && !QT_CONFIG(colordialog) && !QT_CONFIG(fontdialog) && \
|
||||
!QT_CONFIG(messagebox) && !QT_CONFIG(errormessage)
|
||||
Q_UNUSED(dialog);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@
|
|||
#include "qscreen.h"
|
||||
#include "qpainter.h"
|
||||
#include "qtimer.h"
|
||||
#if QT_CONFIG(action)
|
||||
#include "qaction.h"
|
||||
#endif // QT_CONFIG(action)
|
||||
#include "qcursor.h"
|
||||
#include "qbitmap.h"
|
||||
#include "qtextdocument.h"
|
||||
|
|
@ -366,7 +368,9 @@ class QWhatsThisPrivate : public QObject
|
|||
~QWhatsThisPrivate();
|
||||
static QWhatsThisPrivate *instance;
|
||||
bool eventFilter(QObject *, QEvent *) override;
|
||||
#if QT_CONFIG(action)
|
||||
QPointer<QAction> action;
|
||||
#endif // QT_CONFIG(action)
|
||||
static void say(QWidget *, const QString &, int x = 0, int y = 0);
|
||||
static void notifyToplevels(QEvent *e);
|
||||
bool leaveOnMouseRelease;
|
||||
|
|
@ -408,8 +412,10 @@ QWhatsThisPrivate::QWhatsThisPrivate()
|
|||
|
||||
QWhatsThisPrivate::~QWhatsThisPrivate()
|
||||
{
|
||||
#if QT_CONFIG(action)
|
||||
if (action)
|
||||
action->setChecked(false);
|
||||
#endif // QT_CONFIG(action)
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::restoreOverrideCursor();
|
||||
#endif
|
||||
|
|
@ -485,6 +491,7 @@ bool QWhatsThisPrivate::eventFilter(QObject *o, QEvent *e)
|
|||
return true;
|
||||
}
|
||||
|
||||
#if QT_CONFIG(action)
|
||||
class QWhatsThisAction: public QAction
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -516,6 +523,7 @@ void QWhatsThisAction::actionTriggered()
|
|||
QWhatsThisPrivate::instance->action = this;
|
||||
}
|
||||
}
|
||||
#endif // QT_CONFIG(action)
|
||||
|
||||
/*!
|
||||
This function switches the user interface into "What's This?"
|
||||
|
|
@ -672,10 +680,12 @@ void QWhatsThis::hideText()
|
|||
The returned QAction provides a convenient way to let users enter
|
||||
"What's This?" mode.
|
||||
*/
|
||||
#if QT_CONFIG(action)
|
||||
QAction *QWhatsThis::createAction(QObject *parent)
|
||||
{
|
||||
return new QWhatsThisAction(parent);
|
||||
}
|
||||
#endif // QT_CONFIG(action)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@ QT_REQUIRE_CONFIG(whatsthis);
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if QT_CONFIG(action)
|
||||
class QAction;
|
||||
#endif // QT_CONFIG(action)
|
||||
|
||||
class Q_WIDGETS_EXPORT QWhatsThis
|
||||
{
|
||||
|
|
@ -62,7 +64,9 @@ public:
|
|||
static void showText(const QPoint &pos, const QString &text, QWidget *w = nullptr);
|
||||
static void hideText();
|
||||
|
||||
#if QT_CONFIG(action)
|
||||
static QAction *createAction(QObject *parent = nullptr);
|
||||
#endif // QT_CONFIG(action)
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -523,6 +523,8 @@ QBalloonTip::QBalloonTip(const QIcon &icon, const QString &title,
|
|||
closeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
closeButton->setFixedSize(closeButtonSize, closeButtonSize);
|
||||
QObject::connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
|
||||
#else
|
||||
Q_UNUSED(closeButtonSize);
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(label)
|
||||
|
|
|
|||
|
|
@ -497,6 +497,8 @@ void QLineEdit::setClearButtonEnabled(bool enable)
|
|||
d->removeAction(clearAction);
|
||||
delete clearAction;
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(enable);
|
||||
#endif // QT_CONFIG(action)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -465,6 +465,8 @@ void QLineEditPrivate::setClearButtonEnabled(bool enabled)
|
|||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(enabled);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -482,6 +484,8 @@ void QLineEditPrivate::positionSideWidgets()
|
|||
#if QT_CONFIG(action)
|
||||
if (e.action->isVisible())
|
||||
widgetGeometry.moveLeft(widgetGeometry.left() + delta);
|
||||
#else
|
||||
Q_UNUSED(delta);
|
||||
#endif
|
||||
}
|
||||
widgetGeometry.moveLeft(contentRect.width() - p.widgetWidth - p.margin);
|
||||
|
|
@ -595,6 +599,8 @@ void QLineEditPrivate::removeAction(QAction *action)
|
|||
if (!hasSideWidgets()) // Last widget, remove connection
|
||||
QObject::disconnect(q, SIGNAL(textChanged(QString)), q, SLOT(_q_textChanged(QString)));
|
||||
q->update();
|
||||
#else
|
||||
Q_UNUSED(action);
|
||||
#endif // QT_CONFIG(action)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue