Fix build with -no-feature-shortcut
qplatformtheme.h complains about Q_GADGET without <QtCore/QKeySequence> Change-Id: I7561bd3e2484c44842cd25ab12aacb9c00ebedfd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e0a5915f88a780ba0791bce5ed042e92036a4900) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
7c43c13455
commit
8c17fa89d3
@ -14,6 +14,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include <QtGui/qtguiglobal.h>
|
#include <QtGui/qtguiglobal.h>
|
||||||
|
#include <QtCore/QObject>
|
||||||
#include <QtCore/QScopedPointer>
|
#include <QtCore/QScopedPointer>
|
||||||
#if QT_CONFIG(shortcut)
|
#if QT_CONFIG(shortcut)
|
||||||
# include <QtGui/QKeySequence>
|
# include <QtGui/QKeySequence>
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
#include <QtGui/qcolor.h>
|
#include <QtGui/qcolor.h>
|
||||||
#include <QtGui/qpixmap.h>
|
#include <QtGui/qpixmap.h>
|
||||||
#include <QtGui/qimage.h>
|
#include <QtGui/qimage.h>
|
||||||
|
#if QT_CONFIG(shortcut)
|
||||||
#include <QtGui/qkeysequence.h>
|
#include <QtGui/qkeysequence.h>
|
||||||
|
#endif
|
||||||
#include <QtGui/qregion.h>
|
#include <QtGui/qregion.h>
|
||||||
#include <QtGui/qvector2d.h>
|
#include <QtGui/qvector2d.h>
|
||||||
#include <QtGui/qvector3d.h>
|
#include <QtGui/qvector3d.h>
|
||||||
@ -104,10 +106,12 @@ template<> inline char *toString(const QVector4D &v)
|
|||||||
}
|
}
|
||||||
#endif // !QT_NO_VECTOR4D
|
#endif // !QT_NO_VECTOR4D
|
||||||
|
|
||||||
|
#if QT_CONFIG(shortcut)
|
||||||
template<> inline char *toString(const QKeySequence &keySequence)
|
template<> inline char *toString(const QKeySequence &keySequence)
|
||||||
{
|
{
|
||||||
return toString(keySequence.toString());
|
return toString(keySequence.toString());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline bool qCompare(QIcon const &t1, QIcon const &t2, const char *actual, const char *expected,
|
inline bool qCompare(QIcon const &t1, QIcon const &t2, const char *actual, const char *expected,
|
||||||
const char *file, int line)
|
const char *file, int line)
|
||||||
|
@ -3247,6 +3247,7 @@ QAction *QWidget::addAction(const QIcon &icon, const QString &text)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(shortcut)
|
||||||
QAction *QWidget::addAction(const QString &text, const QKeySequence &shortcut)
|
QAction *QWidget::addAction(const QString &text, const QKeySequence &shortcut)
|
||||||
{
|
{
|
||||||
QAction *ret = addAction(text);
|
QAction *ret = addAction(text);
|
||||||
@ -3260,6 +3261,7 @@ QAction *QWidget::addAction(const QIcon &icon, const QString &text, const QKeySe
|
|||||||
ret->setShortcut(shortcut);
|
ret->setShortcut(shortcut);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QAction *QWidget::addAction(const QString &text, const QObject *receiver, const char* member, Qt::ConnectionType type)
|
\fn QAction *QWidget::addAction(const QString &text, const QObject *receiver, const char* member, Qt::ConnectionType type)
|
||||||
|
@ -3216,10 +3216,12 @@ void QComboBox::keyPressEvent(QKeyEvent *e)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
#if QT_CONFIG(shortcut)
|
||||||
if (d->container && d->container->isVisible() && e->matches(QKeySequence::Cancel)) {
|
if (d->container && d->container->isVisible() && e->matches(QKeySequence::Cancel)) {
|
||||||
hidePopup();
|
hidePopup();
|
||||||
e->accept();
|
e->accept();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!d->lineEdit) {
|
if (!d->lineEdit) {
|
||||||
if (!e->text().isEmpty())
|
if (!e->text().isEmpty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user