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 <QtCore/QObject>
|
||||
#include <QtCore/QScopedPointer>
|
||||
#if QT_CONFIG(shortcut)
|
||||
# include <QtGui/QKeySequence>
|
||||
|
@ -22,7 +22,9 @@
|
||||
#include <QtGui/qcolor.h>
|
||||
#include <QtGui/qpixmap.h>
|
||||
#include <QtGui/qimage.h>
|
||||
#if QT_CONFIG(shortcut)
|
||||
#include <QtGui/qkeysequence.h>
|
||||
#endif
|
||||
#include <QtGui/qregion.h>
|
||||
#include <QtGui/qvector2d.h>
|
||||
#include <QtGui/qvector3d.h>
|
||||
@ -104,10 +106,12 @@ template<> inline char *toString(const QVector4D &v)
|
||||
}
|
||||
#endif // !QT_NO_VECTOR4D
|
||||
|
||||
#if QT_CONFIG(shortcut)
|
||||
template<> inline char *toString(const QKeySequence &keySequence)
|
||||
{
|
||||
return toString(keySequence.toString());
|
||||
}
|
||||
#endif
|
||||
|
||||
inline bool qCompare(QIcon const &t1, QIcon const &t2, const char *actual, const char *expected,
|
||||
const char *file, int line)
|
||||
|
@ -3247,6 +3247,7 @@ QAction *QWidget::addAction(const QIcon &icon, const QString &text)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if QT_CONFIG(shortcut)
|
||||
QAction *QWidget::addAction(const QString &text, const QKeySequence &shortcut)
|
||||
{
|
||||
QAction *ret = addAction(text);
|
||||
@ -3260,6 +3261,7 @@ QAction *QWidget::addAction(const QIcon &icon, const QString &text, const QKeySe
|
||||
ret->setShortcut(shortcut);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\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;
|
||||
#endif
|
||||
default:
|
||||
#if QT_CONFIG(shortcut)
|
||||
if (d->container && d->container->isVisible() && e->matches(QKeySequence::Cancel)) {
|
||||
hidePopup();
|
||||
e->accept();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!d->lineEdit) {
|
||||
if (!e->text().isEmpty())
|
||||
|
Loading…
x
Reference in New Issue
Block a user