1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-19 18:26:34 +01:00

[Mac] Fixed, actions were not triggered.

This commit is contained in:
S. Razi Alavizadeh 2013-02-09 03:47:58 +03:30
parent a1ff0799cb
commit 05a8b7fcc5
3 changed files with 12 additions and 6 deletions

View File

@ -182,9 +182,6 @@ private:
#endif
DatabaseWriter* m_dbWriter;
UserAgentManager* m_uaManager;
#ifdef Q_OS_MAC
MacMenuReceiver* m_macMenuReceiver;
#endif
QList<QPointer<QupZilla> > m_mainWindows;
QString m_activeProfil;
@ -203,6 +200,9 @@ private:
#ifdef Q_OS_WIN
RegisterQAppAssociation* m_registerQAppAssociation;
#endif
#ifdef Q_OS_MAC
MacMenuReceiver* m_macMenuReceiver;
#endif
};
#endif // MAINAPPLICATION_H

View File

@ -1076,7 +1076,9 @@ void QupZilla::aboutToShowViewMenu()
void QupZilla::aboutToHideViewMenu()
{
#ifndef Q_OS_MAC
m_actionPageSource->setEnabled(false);
#endif
}
void QupZilla::aboutToShowEditMenu()
@ -1095,9 +1097,11 @@ void QupZilla::aboutToShowEditMenu()
void QupZilla::aboutToHideEditMenu()
{
#ifndef Q_OS_MAC
foreach(QAction * act, m_menuEdit->actions()) {
act->setEnabled(false);
}
#endif
m_menuEdit->actions().at(8)->setEnabled(true);
m_actionPreferences->setEnabled(true);
@ -1110,7 +1114,9 @@ void QupZilla::aboutToShowToolsMenu()
void QupZilla::aboutToHideToolsMenu()
{
#ifndef Q_OS_MAC
m_actionPageInfo->setEnabled(false);
#endif
}
void QupZilla::aboutToShowEncodingMenu()

View File

@ -29,8 +29,8 @@
MacMenuReceiver::MacMenuReceiver(QObject* parent)
: QObject(parent)
, m_macMenuBar(0)
, m_menuBookmarksAction(0)
, m_bookmarksMenuChanged(true)
, m_menuBookmarksAction(0)
{
}
@ -49,7 +49,7 @@ void MacMenuReceiver::setEnabledSelectedMenuActions(QMenu* menu, const QList<int
}
foreach (int index, indexList) {
Q_ASSERT(index < 0 || index >= menu->actions().size());
Q_ASSERT(index >= 0 && index < menu->actions().size());
menu->actions().at(index)->setEnabled(true);
}
}
@ -69,7 +69,7 @@ void MacMenuReceiver::setDisabledSelectedMenuActions(QMenu* menu, const QList<in
}
foreach (int index, indexList) {
Q_ASSERT(index < 0 || index >= menu->actions().size());
Q_ASSERT(index >= 0 && index < menu->actions().size());
menu->actions().at(index)->setDisabled(true);
}
}