Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25349

ActionManager does not propagate Action changes in same event cycle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • Qt Creator 4.13.3
    • All Other Issues
    • None

    Description

      We are developing our own plugins for QtCreator and Action status has stopped working for us after merging your latest changes.

       

      We register the action in IPlugin::initialize and also set the action enabled or not.

      bool Plugin::initialize(const QStringList &arguments, QString *errorString)
      {
          auto cmd = ActionManager::registerAction(m_action, Constants::CONNECT);
          m_action->setEnabled(true);
      

      We read the action from Plugin::extensionsInitialized in another plugin:

      void Plugin::extensionsInitialized()   
          if (auto cmd = ActionManager::command(Constants::CONNECT))
              m_enabled = cmd->action()->isEnabled();
      

      The problem is that m_enabled is false in extensionsInitialized even if it was set true in initialize.

      The reason is QueueConnection in ProxyAction::connectAction.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            con Eike Ziller
            arminr Armin Riiet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes