summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-04-24 13:52:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-25 17:56:26 +0200
commit7a1cdac05264204d01f729bb2e1201e08bb9fe3e (patch)
tree4aaf75fde76f26993d63b883e59fda5d777409c1 /src
parentda55d48ad731ee2499467b3e93e11eb3b53df89d (diff)
Cocoa: Remove dead code in QCocoaMenu*
Change-Id: I56136594f073295ced645d06f657187a54e84384 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm5
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenuitem.mm17
3 files changed, 2 insertions, 22 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.h b/src/plugins/platforms/cocoa/qcocoamenu.h
index 439b7f1a75..65f31a33c2 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.h
+++ b/src/plugins/platforms/cocoa/qcocoamenu.h
@@ -81,8 +81,6 @@ public:
void setMinimumWidth(int width);
void setFont(const QFont &font);
- void setParentItem(QCocoaMenuItem* item);
-
inline NSMenu *nsMenu() const
{ return m_nativeMenu; }
inline NSMenuItem *nsMenuItem() const
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm
index bde9ded14f..2b4c2eaaab 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenu.mm
@@ -289,11 +289,6 @@ void QCocoaMenu::syncSeparatorsCollapsible(bool enable)
}
}
-void QCocoaMenu::setParentItem(QCocoaMenuItem *item)
-{
- Q_UNUSED(item);
-}
-
void QCocoaMenu::setEnabled(bool enabled)
{
m_enabled = enabled;
diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm
index 2a17ea3dec..d6f0d06be7 100644
--- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm
@@ -128,7 +128,6 @@ void QCocoaMenuItem::setMenu(QPlatformMenu *menu)
QCocoaAutoReleasePool pool;
m_menu = static_cast<QCocoaMenu *>(menu);
if (m_menu) {
- m_menu->setParentItem(this);
} else {
// we previously had a menu, but no longer
// 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 setHidden:YES];
-// [m_native setHidden:NO];
[m_native setHidden: !m_isVisible];
[m_native setEnabled: m_enabled];
- QString text = m_text;
- QKeySequence accel = m_shortcut;
-
- {
- int st = text.lastIndexOf(QLatin1Char('\t'));
- if (st != -1) {
- accel = QKeySequence(text.right(text.length()-(st+1)));
- text.remove(st, text.length()-st);
- }
- }
- text = mergeText();
- accel = mergeAccel();
+ QString text = mergeText();
+ QKeySequence accel = mergeAccel();
// Show multiple key sequences as part of the menu text.
if (accel.count() > 1)