Cocoa: Remove dead code in QCocoaMenu*
Change-Id: I56136594f073295ced645d06f657187a54e84384 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
da55d48ad7
commit
7a1cdac052
@ -81,8 +81,6 @@ public:
|
|||||||
void setMinimumWidth(int width);
|
void setMinimumWidth(int width);
|
||||||
void setFont(const QFont &font);
|
void setFont(const QFont &font);
|
||||||
|
|
||||||
void setParentItem(QCocoaMenuItem* item);
|
|
||||||
|
|
||||||
inline NSMenu *nsMenu() const
|
inline NSMenu *nsMenu() const
|
||||||
{ return m_nativeMenu; }
|
{ return m_nativeMenu; }
|
||||||
inline NSMenuItem *nsMenuItem() const
|
inline NSMenuItem *nsMenuItem() const
|
||||||
|
@ -289,11 +289,6 @@ void QCocoaMenu::syncSeparatorsCollapsible(bool enable)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QCocoaMenu::setParentItem(QCocoaMenuItem *item)
|
|
||||||
{
|
|
||||||
Q_UNUSED(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QCocoaMenu::setEnabled(bool enabled)
|
void QCocoaMenu::setEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
m_enabled = enabled;
|
m_enabled = enabled;
|
||||||
|
@ -128,7 +128,6 @@ void QCocoaMenuItem::setMenu(QPlatformMenu *menu)
|
|||||||
QCocoaAutoReleasePool pool;
|
QCocoaAutoReleasePool pool;
|
||||||
m_menu = static_cast<QCocoaMenu *>(menu);
|
m_menu = static_cast<QCocoaMenu *>(menu);
|
||||||
if (m_menu) {
|
if (m_menu) {
|
||||||
m_menu->setParentItem(this);
|
|
||||||
} else {
|
} else {
|
||||||
// we previously had a menu, but no longer
|
// we previously had a menu, but no longer
|
||||||
// clear out our item so the nexy sync() call builds a new one
|
// clear out our item so the nexy sync() call builds a new one
|
||||||
@ -254,23 +253,11 @@ NSMenuItem *QCocoaMenuItem::sync()
|
|||||||
[m_native setTag:reinterpret_cast<NSInteger>(this)];
|
[m_native setTag:reinterpret_cast<NSInteger>(this)];
|
||||||
}
|
}
|
||||||
|
|
||||||
// [m_native setHidden:YES];
|
|
||||||
// [m_native setHidden:NO];
|
|
||||||
[m_native setHidden: !m_isVisible];
|
[m_native setHidden: !m_isVisible];
|
||||||
[m_native setEnabled: m_enabled];
|
[m_native setEnabled: m_enabled];
|
||||||
QString text = m_text;
|
|
||||||
QKeySequence accel = m_shortcut;
|
|
||||||
|
|
||||||
{
|
QString text = mergeText();
|
||||||
int st = text.lastIndexOf(QLatin1Char('\t'));
|
QKeySequence accel = mergeAccel();
|
||||||
if (st != -1) {
|
|
||||||
accel = QKeySequence(text.right(text.length()-(st+1)));
|
|
||||||
text.remove(st, text.length()-st);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
text = mergeText();
|
|
||||||
accel = mergeAccel();
|
|
||||||
|
|
||||||
// Show multiple key sequences as part of the menu text.
|
// Show multiple key sequences as part of the menu text.
|
||||||
if (accel.count() > 1)
|
if (accel.count() > 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user