Convert features.effects to QT_[REQUIRE_]CONFIG
Change-Id: I8421b5e81dc21e8f9f6bdd9f714fb3f535618a3c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
8a93f50695
commit
6380729c48
@ -80,7 +80,8 @@
|
|||||||
"effects": {
|
"effects": {
|
||||||
"label": "Effects",
|
"label": "Effects",
|
||||||
"purpose": "Provides special widget effects (e.g. fading and scrolling).",
|
"purpose": "Provides special widget effects (e.g. fading and scrolling).",
|
||||||
"section": "Kernel"
|
"section": "Kernel",
|
||||||
|
"output": [ "privateFeature" ]
|
||||||
},
|
},
|
||||||
"filesystemmodel": {
|
"filesystemmodel": {
|
||||||
"label": "QFileSystemModel",
|
"label": "QFileSystemModel",
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
# include <private/qcore_mac_p.h>
|
# include <private/qcore_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||||
|
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
#include <qdesktopwidget.h>
|
#include <qdesktopwidget.h>
|
||||||
#include <qevent.h>
|
#include <qevent.h>
|
||||||
@ -48,7 +50,9 @@
|
|||||||
#include <qstyleoption.h>
|
#include <qstyleoption.h>
|
||||||
#include <qstylepainter.h>
|
#include <qstylepainter.h>
|
||||||
#include <qtimer.h>
|
#include <qtimer.h>
|
||||||
|
#if QT_CONFIG(effects)
|
||||||
#include <private/qeffects_p.h>
|
#include <private/qeffects_p.h>
|
||||||
|
#endif
|
||||||
#include <qtextdocument.h>
|
#include <qtextdocument.h>
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
#include <private/qstylesheetstyle_p.h>
|
#include <private/qstylesheetstyle_p.h>
|
||||||
@ -285,7 +289,7 @@ void QTipLabel::timerEvent(QTimerEvent *e)
|
|||||||
|| e->timerId() == expireTimer.timerId()){
|
|| e->timerId() == expireTimer.timerId()){
|
||||||
hideTimer.stop();
|
hideTimer.stop();
|
||||||
expireTimer.stop();
|
expireTimer.stop();
|
||||||
#if 0 /* Used to be included in Qt4 for Q_WS_MAC */ && !defined(QT_NO_EFFECTS)
|
#if 0 /* Used to be included in Qt4 for Q_WS_MAC */ && QT_CONFIG(effects)
|
||||||
if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)){
|
if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)){
|
||||||
// Fade out tip on mac (makes it invisible).
|
// Fade out tip on mac (makes it invisible).
|
||||||
// The tip will not be deleted until a new tip is shown.
|
// The tip will not be deleted until a new tip is shown.
|
||||||
@ -505,7 +509,7 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
|
|||||||
QTipLabel::instance->setObjectName(QLatin1String("qtooltip_label"));
|
QTipLabel::instance->setObjectName(QLatin1String("qtooltip_label"));
|
||||||
|
|
||||||
|
|
||||||
#if !defined(QT_NO_EFFECTS) && !0 /* Used to be included in Qt4 for Q_WS_MAC */
|
#if QT_CONFIG(effects) && !0 /* Used to be included in Qt4 for Q_WS_MAC */
|
||||||
if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip))
|
if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip))
|
||||||
qFadeEffect(QTipLabel::instance);
|
qFadeEffect(QTipLabel::instance);
|
||||||
else if (QApplication::isEffectEnabled(Qt::UI_AnimateTooltip))
|
else if (QApplication::isEffectEnabled(Qt::UI_AnimateTooltip))
|
||||||
|
@ -70,12 +70,12 @@
|
|||||||
#include <private/qabstractscrollarea_p.h>
|
#include <private/qabstractscrollarea_p.h>
|
||||||
#include <private/qlineedit_p.h>
|
#include <private/qlineedit_p.h>
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
#if 0 /* Used to be included in Qt4 for Q_WS_MAC */ && !defined(QT_NO_EFFECTS) && QT_CONFIG(style_mac)
|
#if 0 /* Used to be included in Qt4 for Q_WS_MAC */ && QT_CONFIG(effetcts) && QT_CONFIG(style_mac)
|
||||||
#include <private/qcore_mac_p.h>
|
#include <private/qcore_mac_p.h>
|
||||||
#include <private/qmacstyle_mac_p.h>
|
#include <private/qmacstyle_mac_p.h>
|
||||||
#include <private/qt_cocoa_helpers_mac_p.h>
|
#include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef QT_NO_EFFECTS
|
#if QT_CONFIG(effects)
|
||||||
# include <private/qeffects_p.h>
|
# include <private/qeffects_p.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
@ -2731,7 +2731,7 @@ void QComboBox::showPopup()
|
|||||||
const bool updatesEnabled = container->updatesEnabled();
|
const bool updatesEnabled = container->updatesEnabled();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(QT_NO_EFFECTS)
|
#if QT_CONFIG(effects)
|
||||||
bool scrollDown = (listRect.topLeft() == below);
|
bool scrollDown = (listRect.topLeft() == below);
|
||||||
if (QApplication::isEffectEnabled(Qt::UI_AnimateCombo)
|
if (QApplication::isEffectEnabled(Qt::UI_AnimateCombo)
|
||||||
&& !style->styleHint(QStyle::SH_ComboBox_Popup, &opt, this) && !window()->testAttribute(Qt::WA_DontShowOnScreen))
|
&& !style->styleHint(QStyle::SH_ComboBox_Popup, &opt, this) && !window()->testAttribute(Qt::WA_DontShowOnScreen))
|
||||||
@ -2803,7 +2803,7 @@ void QComboBox::hidePopup()
|
|||||||
{
|
{
|
||||||
Q_D(QComboBox);
|
Q_D(QComboBox);
|
||||||
if (d->container && d->container->isVisible()) {
|
if (d->container && d->container->isVisible()) {
|
||||||
#if !defined(QT_NO_EFFECTS)
|
#if QT_CONFIG(effects)
|
||||||
QSignalBlocker modelBlocker(d->model);
|
QSignalBlocker modelBlocker(d->model);
|
||||||
QSignalBlocker viewBlocker(d->container->itemView());
|
QSignalBlocker viewBlocker(d->container->itemView());
|
||||||
QSignalBlocker containerBlocker(d->container);
|
QSignalBlocker containerBlocker(d->container);
|
||||||
@ -2847,7 +2847,7 @@ void QComboBox::hidePopup()
|
|||||||
modelBlocker.unblock();
|
modelBlocker.unblock();
|
||||||
|
|
||||||
if (!didFade)
|
if (!didFade)
|
||||||
#endif // QT_NO_EFFECTS
|
#endif // QT_CONFIG(effects)
|
||||||
// Fade should implicitly hide as well ;-)
|
// Fade should implicitly hide as well ;-)
|
||||||
d->container->hide();
|
d->container->hide();
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qapplication.h"
|
#include "qapplication.h"
|
||||||
#ifndef QT_NO_EFFECTS
|
|
||||||
#include "qdesktopwidget.h"
|
#include "qdesktopwidget.h"
|
||||||
#include "qeffects_p.h"
|
#include "qeffects_p.h"
|
||||||
#include "qevent.h"
|
#include "qevent.h"
|
||||||
@ -605,5 +604,3 @@ QT_END_NAMESPACE
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qeffects.moc"
|
#include "qeffects.moc"
|
||||||
|
|
||||||
#endif //QT_NO_EFFECTS
|
|
||||||
|
@ -53,8 +53,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "QtCore/qnamespace.h"
|
#include "QtCore/qnamespace.h"
|
||||||
|
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||||
|
|
||||||
#ifndef QT_NO_EFFECTS
|
QT_REQUIRE_CONFIG(effects);
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -77,6 +78,4 @@ extern void Q_WIDGETS_EXPORT qFadeEffect(QWidget*, int time = -1);
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_EFFECTS
|
|
||||||
|
|
||||||
#endif // QEFFECTS_P_H
|
#endif // QEFFECTS_P_H
|
||||||
|
@ -41,6 +41,8 @@
|
|||||||
|
|
||||||
#ifndef QT_NO_MENU
|
#ifndef QT_NO_MENU
|
||||||
|
|
||||||
|
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||||
|
|
||||||
#include "qdebug.h"
|
#include "qdebug.h"
|
||||||
#include "qstyle.h"
|
#include "qstyle.h"
|
||||||
#include "qevent.h"
|
#include "qevent.h"
|
||||||
@ -56,7 +58,7 @@
|
|||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
# include "qaccessible.h"
|
# include "qaccessible.h"
|
||||||
#endif
|
#endif
|
||||||
#ifndef QT_NO_EFFECTS
|
#if QT_CONFIG(effects)
|
||||||
# include <private/qeffects_p.h>
|
# include <private/qeffects_p.h>
|
||||||
#endif
|
#endif
|
||||||
#if QT_CONFIG(whatsthis)
|
#if QT_CONFIG(whatsthis)
|
||||||
@ -517,7 +519,7 @@ void QMenuPrivate::hideMenu(QMenu *menu)
|
|||||||
{
|
{
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
#if !defined(QT_NO_EFFECTS)
|
#if QT_CONFIG(effects)
|
||||||
QSignalBlocker blocker(menu);
|
QSignalBlocker blocker(menu);
|
||||||
aboutToHide = true;
|
aboutToHide = true;
|
||||||
// Flash item which is about to trigger (if any).
|
// Flash item which is about to trigger (if any).
|
||||||
@ -539,7 +541,7 @@ void QMenuPrivate::hideMenu(QMenu *menu)
|
|||||||
|
|
||||||
aboutToHide = false;
|
aboutToHide = false;
|
||||||
blocker.unblock();
|
blocker.unblock();
|
||||||
#endif // QT_NO_EFFECTS
|
#endif // QT_CONFIG(effects)
|
||||||
if (activeMenu == menu)
|
if (activeMenu == menu)
|
||||||
activeMenu = 0;
|
activeMenu = 0;
|
||||||
menu->d_func()->causedPopup.action = 0;
|
menu->d_func()->causedPopup.action = 0;
|
||||||
@ -670,7 +672,7 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason
|
|||||||
}
|
}
|
||||||
if (hideActiveMenu && previousAction != currentAction) {
|
if (hideActiveMenu && previousAction != currentAction) {
|
||||||
if (popup == -1) {
|
if (popup == -1) {
|
||||||
#ifndef QT_NO_EFFECTS
|
#if QT_CONFIG(effects)
|
||||||
// kill any running effect
|
// kill any running effect
|
||||||
qFadeEffect(0);
|
qFadeEffect(0);
|
||||||
qScrollEffect(0);
|
qScrollEffect(0);
|
||||||
@ -2475,7 +2477,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
setGeometry(QRect(pos, size));
|
setGeometry(QRect(pos, size));
|
||||||
#ifndef QT_NO_EFFECTS
|
#if QT_CONFIG(effects)
|
||||||
int hGuess = isRightToLeft() ? QEffects::LeftScroll : QEffects::RightScroll;
|
int hGuess = isRightToLeft() ? QEffects::LeftScroll : QEffects::RightScroll;
|
||||||
int vGuess = QEffects::DownScroll;
|
int vGuess = QEffects::DownScroll;
|
||||||
if (isRightToLeft()) {
|
if (isRightToLeft()) {
|
||||||
|
@ -38,7 +38,6 @@ HEADERS += \
|
|||||||
SOURCES += \
|
SOURCES += \
|
||||||
widgets/qbuttongroup.cpp \
|
widgets/qbuttongroup.cpp \
|
||||||
widgets/qabstractspinbox.cpp \
|
widgets/qabstractspinbox.cpp \
|
||||||
widgets/qeffects.cpp \
|
|
||||||
widgets/qframe.cpp \
|
widgets/qframe.cpp \
|
||||||
widgets/qlineedit_p.cpp \
|
widgets/qlineedit_p.cpp \
|
||||||
widgets/qlineedit.cpp \
|
widgets/qlineedit.cpp \
|
||||||
@ -133,6 +132,11 @@ qtConfig(dockwidget) {
|
|||||||
widgets/qdockarealayout.cpp
|
widgets/qdockarealayout.cpp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qtConfig(effects) {
|
||||||
|
HEADERS += widgets/qeffects_p.h
|
||||||
|
SOURCES += widgets/qeffects.cpp
|
||||||
|
}
|
||||||
|
|
||||||
qtConfig(fontcombobox) {
|
qtConfig(fontcombobox) {
|
||||||
HEADERS += widgets/qfontcombobox.h
|
HEADERS += widgets/qfontcombobox.h
|
||||||
SOURCES += widgets/qfontcombobox.cpp
|
SOURCES += widgets/qfontcombobox.cpp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user