QWidgetTextControl: share setActionIcon() with QLineEdit
... unbreaking -unity-build-batch-size 103. Task-number: QTBUG-115031 Change-Id: I004163000a422b05ee0c882f065286c043d58206 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 5f9ab113e32fb6ba81eab58acd9f99186af80534) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
d0a9b93324
commit
9cded930f0
@ -2183,13 +2183,6 @@ void QLineEdit::contextMenuEvent(QContextMenuEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void setActionIcon(QAction *action, const QString &name)
|
||||
{
|
||||
const QIcon icon = QIcon::fromTheme(name);
|
||||
if (!icon.isNull())
|
||||
action->setIcon(icon);
|
||||
}
|
||||
|
||||
/*! This function creates the standard context menu which is shown
|
||||
when the user clicks on the line edit with the right mouse
|
||||
button. It is called from the default contextMenuEvent() handler.
|
||||
|
@ -2304,7 +2304,7 @@ void QWidgetTextControlPrivate::editFocusEvent(QEvent *e)
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_CONTEXTMENU
|
||||
static inline void setActionIcon(QAction *action, const QString &name)
|
||||
void setActionIcon(QAction *action, const QString &name)
|
||||
{
|
||||
const QIcon icon = QIcon::fromTheme(name);
|
||||
if (!icon.isNull())
|
||||
|
@ -276,6 +276,11 @@ private:
|
||||
mutable QTextDocumentFragment fragment;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_CONTEXTMENU
|
||||
// also used by QLineEdit
|
||||
void setActionIcon(QAction *action, const QString &name);
|
||||
#endif // QT_NO_CONTEXTMENU
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QWidgetTextControl_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user