Example #1
0
 def __msgActionWarning(self, newAction: QAction, actionId: ItemId, oldAction: QAction or None):
     """
     :returns: a Warning text with the given Action's and ItemId's properties
     :param newAction: Action to take strings from
     :param  actionId: ItemId to take strings from
     """
     oldActionMsg = " {}/{}".format(oldAction.objectName(), oldAction.text()) if oldAction else ""
     msg = "addOverrideAction {}/{}: Action{} is already registered for context {} {}.".format(
         newAction.objectName(), newAction.text(), oldActionMsg, actionId.uniqueIdentifier, actionId.toSetting())
     return msg