Utils: Rename ParameterAction into Action

It became the defacto-type for action when ActionBuilder started
creating them as default.

Change-Id: I1008d60b78ea83919ce1c80a7ef828527fe9902c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2024-01-26 14:52:54 +01:00
parent fe35ee5c38
commit 66b50438d8
22 changed files with 232 additions and 231 deletions

View File

@@ -4,10 +4,10 @@
#include "parameteraction.h"
/*!
\class Utils::ParameterAction
\class Utils::Action
\inmodule QtCreator
\brief The ParameterAction class is intended for actions that act on a 'current',
\brief The Action class is intended for actions that act on a 'current',
string-type parameter (typically a file name), for example 'Save file %1'.
The action has 2 states:
@@ -24,11 +24,11 @@
namespace Utils {
ParameterAction::ParameterAction(QObject *parent)
: ParameterAction({}, {}, AlwaysEnabled, parent)
Action::Action(QObject *parent)
: Action({}, {}, AlwaysEnabled, parent)
{}
ParameterAction::ParameterAction(const QString &emptyText,
Action::Action(const QString &emptyText,
const QString &parameterText,
EnablingMode mode,
QObject *parent)
@@ -39,37 +39,37 @@ ParameterAction::ParameterAction(const QString &emptyText,
{
}
QString ParameterAction::emptyText() const
QString Action::emptyText() const
{
return m_emptyText;
}
void ParameterAction::setEmptyText(const QString &t)
void Action::setEmptyText(const QString &t)
{
m_emptyText = t;
}
QString ParameterAction::parameterText() const
QString Action::parameterText() const
{
return m_parameterText;
}
void ParameterAction::setParameterText(const QString &t)
void Action::setParameterText(const QString &t)
{
m_parameterText = t;
}
ParameterAction::EnablingMode ParameterAction::enablingMode() const
Action::EnablingMode Action::enablingMode() const
{
return m_enablingMode;
}
void ParameterAction::setEnablingMode(EnablingMode m)
void Action::setEnablingMode(EnablingMode m)
{
m_enablingMode = m;
}
void ParameterAction::setParameter(const QString &p)
void Action::setParameter(const QString &p)
{
const bool enabled = !p.isEmpty();
if (enabled)

View File

@@ -9,18 +9,19 @@
namespace Utils {
class QTCREATOR_UTILS_EXPORT ParameterAction : public QAction
class QTCREATOR_UTILS_EXPORT Action : public QAction
{
Q_PROPERTY(QString emptyText READ emptyText WRITE setEmptyText)
Q_PROPERTY(QString parameterText READ parameterText WRITE setParameterText)
Q_PROPERTY(EnablingMode enablingMode READ enablingMode WRITE setEnablingMode)
Q_OBJECT
public:
enum EnablingMode { AlwaysEnabled, EnabledWithParameter };
Q_ENUM(EnablingMode)
explicit ParameterAction(QObject *parent = nullptr);
ParameterAction(const QString &emptyText,
explicit Action(QObject *parent = nullptr);
Action(const QString &emptyText,
const QString &parameterText,
EnablingMode em = AlwaysEnabled,
QObject *parent = nullptr);

View File

@@ -222,13 +222,13 @@ public:
QList<QAction *> m_repositoryActionList;
// Menu Items (file actions)
ParameterAction *m_addAction = nullptr;
ParameterAction *m_deleteAction = nullptr;
ParameterAction *m_annotateFile = nullptr;
ParameterAction *m_diffFile = nullptr;
ParameterAction *m_logFile = nullptr;
ParameterAction *m_revertFile = nullptr;
ParameterAction *m_statusFile = nullptr;
Action *m_addAction = nullptr;
Action *m_deleteAction = nullptr;
Action *m_annotateFile = nullptr;
Action *m_diffFile = nullptr;
Action *m_logFile = nullptr;
Action *m_revertFile = nullptr;
Action *m_statusFile = nullptr;
QAction *m_menuAction = nullptr;

View File

@@ -62,7 +62,7 @@ private:
void generateCompilationDB();
void createCompilationDBAction();
Utils::ParameterAction *m_generateCompilationDBAction = nullptr;
Utils::Action *m_generateCompilationDBAction = nullptr;
QFutureWatcher<GenerateCompilationDbResult> m_generatorWatcher;
};

View File

@@ -299,18 +299,18 @@ public:
QString m_diffPrefix;
CommandLocator *m_commandLocator = nullptr;
ParameterAction *m_checkOutAction = nullptr;
ParameterAction *m_checkInCurrentAction = nullptr;
ParameterAction *m_undoCheckOutAction = nullptr;
ParameterAction *m_undoHijackAction = nullptr;
ParameterAction *m_diffCurrentAction = nullptr;
ParameterAction *m_historyCurrentAction = nullptr;
ParameterAction *m_annotateCurrentAction = nullptr;
ParameterAction *m_addFileAction = nullptr;
Action *m_checkOutAction = nullptr;
Action *m_checkInCurrentAction = nullptr;
Action *m_undoCheckOutAction = nullptr;
Action *m_undoHijackAction = nullptr;
Action *m_diffCurrentAction = nullptr;
Action *m_historyCurrentAction = nullptr;
Action *m_annotateCurrentAction = nullptr;
Action *m_addFileAction = nullptr;
QAction *m_diffActivityAction = nullptr;
QAction *m_updateIndexAction = nullptr;
ParameterAction *m_updateViewAction = nullptr;
ParameterAction *m_checkInActivityAction = nullptr;
Action *m_updateViewAction = nullptr;
Action *m_checkInActivityAction = nullptr;
QAction *m_checkInAllAction = nullptr;
QAction *m_statusAction = nullptr;

View File

@@ -72,7 +72,7 @@ private:
QAction *m_rescanProjectAction;
QAction *m_buildFileContextMenu;
QAction *m_reloadCMakePresetsAction;
Utils::ParameterAction *m_buildFileAction;
Utils::Action *m_buildFileAction;
QAction *m_cmakeProfilerAction;
QAction *m_cmakeDebuggerAction;
QAction *m_cmakeDebuggerSeparator;

View File

@@ -49,10 +49,10 @@ public:
// This can't be stand-alone yet as it registers in the plugin object pool
CMakeToolManager cmakeToolManager;
ParameterAction buildTargetContextAction{
Action buildTargetContextAction{
Tr::tr("Build"),
Tr::tr("Build \"%1\""),
ParameterAction::AlwaysEnabled/*handled manually*/
Action::AlwaysEnabled/*handled manually*/
};
CMakeSettingsPage settingsPage;
@@ -114,7 +114,7 @@ class CMakeProjectPlugin final : public ExtensionSystem::IPlugin
connect(ProjectTree::instance(), &ProjectTree::currentNodeChanged,
this, &CMakeProjectPlugin::updateContextActions);
connect(&d->buildTargetContextAction, &ParameterAction::triggered, this, [] {
connect(&d->buildTargetContextAction, &Action::triggered, this, [] {
if (auto bs = qobject_cast<CMakeBuildSystem *>(ProjectTree::currentBuildSystem())) {
auto targetNode = dynamic_cast<const CMakeTargetNode *>(ProjectTree::currentNode());
bs->buildCMakeTarget(targetNode ? targetNode->displayName() : QString());

View File

@@ -87,16 +87,16 @@ public:
ActionManager::registerAction(contextAction(), actionId, context, scriptable);
}
ParameterAction *contextAction()
Action *contextAction()
{
if (!m_contextAction) {
QTC_CHECK(m_parent);
m_contextAction = new ParameterAction(m_parent);
m_contextAction = new Action(m_parent);
}
return m_contextAction;
}
void adopt(ParameterAction *action)
void adopt(Action *action)
{
QTC_ASSERT(!m_contextAction,
qWarning() << QLatin1String("Cannot adopt context action for \"%1\"after it "
@@ -117,7 +117,7 @@ public:
private:
QObject *m_parent = nullptr;
ParameterAction *m_contextAction = nullptr;
Action *m_contextAction = nullptr;
};
/*!
@@ -171,7 +171,7 @@ ActionBuilder::~ActionBuilder()
lifetime itself, and for example there is no QObject that can be
the parent of an automatically created context action.
*/
ActionBuilder &ActionBuilder::adopt(Utils::ParameterAction *action)
ActionBuilder &ActionBuilder::adopt(Utils::Action *action)
{
d->adopt(action);
return *this;
@@ -335,8 +335,8 @@ ActionBuilder &ActionBuilder::setParameterText(const QString &parameterText,
d->contextAction()->setEmptyText(emptyText);
d->contextAction()->setParameterText(parameterText);
d->contextAction()->setEnablingMode(mode == AlwaysEnabled
? ParameterAction::AlwaysEnabled
: ParameterAction::EnabledWithParameter);
? Action::AlwaysEnabled
: Action::EnabledWithParameter);
d->contextAction()->setText(emptyText);
return *this;
}
@@ -361,7 +361,7 @@ QAction *ActionBuilder::contextAction() const
return d->contextAction();
}
ParameterAction *ActionBuilder::contextParameterAction() const
Action *ActionBuilder::contextParameterAction() const
{
return d->contextAction();
}
@@ -373,7 +373,7 @@ ActionBuilder &ActionBuilder::bindContextAction(QAction **dest)
return *this;
}
ActionBuilder &ActionBuilder::bindContextAction(Utils::ParameterAction **dest)
ActionBuilder &ActionBuilder::bindContextAction(Utils::Action **dest)
{
QTC_ASSERT(dest, return *this);
*dest = d->contextAction();

View File

@@ -12,7 +12,7 @@
#include <functional>
namespace Utils { class ParameterAction; }
namespace Utils { class Action; }
namespace Core {
@@ -31,7 +31,7 @@ public:
ActionBuilder(QObject *contextActionParent, const Utils::Id actionId);
~ActionBuilder();
ActionBuilder &adopt(Utils::ParameterAction *action);
ActionBuilder &adopt(Utils::Action *action);
ActionBuilder &setContext(const Utils::Id id);
ActionBuilder &setContext(const Core::Context &context);
@@ -92,14 +92,14 @@ public:
EnablingMode mode = EnabledWithParameter);
ActionBuilder &bindContextAction(QAction **dest);
ActionBuilder &bindContextAction(Utils::ParameterAction **dest);
ActionBuilder &bindContextAction(Utils::Action **dest);
ActionBuilder &augmentActionWithShortcutToolTip();
Utils::Id id() const;
Command *command() const;
QAction *commandAction() const;
QAction *contextAction() const;
Utils::ParameterAction *contextParameterAction() const;
Utils::Action *contextParameterAction() const;
private:
class ActionBuilderPrivate *d = nullptr;

View File

@@ -294,26 +294,26 @@ private:
FilePath m_commitRepository;
Core::CommandLocator *m_commandLocator = nullptr;
Utils::ParameterAction *m_addAction = nullptr;
Utils::ParameterAction *m_deleteAction = nullptr;
Utils::ParameterAction *m_revertAction = nullptr;
Utils::ParameterAction *m_editCurrentAction = nullptr;
Utils::ParameterAction *m_uneditCurrentAction = nullptr;
Utils::Action *m_addAction = nullptr;
Utils::Action *m_deleteAction = nullptr;
Utils::Action *m_revertAction = nullptr;
Utils::Action *m_editCurrentAction = nullptr;
Utils::Action *m_uneditCurrentAction = nullptr;
QAction *m_uneditRepositoryAction = nullptr;
Utils::ParameterAction *m_diffProjectAction = nullptr;
Utils::ParameterAction *m_diffCurrentAction = nullptr;
Utils::ParameterAction *m_logProjectAction = nullptr;
Utils::Action *m_diffProjectAction = nullptr;
Utils::Action *m_diffCurrentAction = nullptr;
Utils::Action *m_logProjectAction = nullptr;
QAction *m_logRepositoryAction = nullptr;
QAction *m_commitAllAction = nullptr;
QAction *m_revertRepositoryAction = nullptr;
Utils::ParameterAction *m_commitCurrentAction = nullptr;
Utils::ParameterAction *m_filelogCurrentAction = nullptr;
Utils::ParameterAction *m_annotateCurrentAction = nullptr;
Utils::ParameterAction *m_statusProjectAction = nullptr;
Utils::ParameterAction *m_updateProjectAction = nullptr;
Utils::ParameterAction *m_commitProjectAction = nullptr;
Utils::ParameterAction *m_updateDirectoryAction = nullptr;
Utils::ParameterAction *m_commitDirectoryAction = nullptr;
Utils::Action *m_commitCurrentAction = nullptr;
Utils::Action *m_filelogCurrentAction = nullptr;
Utils::Action *m_annotateCurrentAction = nullptr;
Utils::Action *m_statusProjectAction = nullptr;
Utils::Action *m_updateProjectAction = nullptr;
Utils::Action *m_commitProjectAction = nullptr;
Utils::Action *m_updateDirectoryAction = nullptr;
Utils::Action *m_commitDirectoryAction = nullptr;
QAction *m_diffRepositoryAction = nullptr;
QAction *m_updateRepositoryAction = nullptr;
QAction *m_statusRepositoryAction = nullptr;
@@ -489,7 +489,7 @@ CvsPluginPrivate::CvsPluginPrivate()
Command *command;
m_diffCurrentAction = new ParameterAction(Tr::tr("Diff Current File"), Tr::tr("Diff \"%1\""), ParameterAction::EnabledWithParameter, this);
m_diffCurrentAction = new Action(Tr::tr("Diff Current File"), Tr::tr("Diff \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_diffCurrentAction,
CMD_ID_DIFF_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
@@ -498,7 +498,7 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_filelogCurrentAction = new ParameterAction(Tr::tr("Filelog Current File"), Tr::tr("Filelog \"%1\""), ParameterAction::EnabledWithParameter, this);
m_filelogCurrentAction = new Action(Tr::tr("Filelog Current File"), Tr::tr("Filelog \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_filelogCurrentAction,
CMD_ID_FILELOG_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
@@ -506,7 +506,7 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_annotateCurrentAction = new ParameterAction(Tr::tr("Annotate Current File"), Tr::tr("Annotate \"%1\""), ParameterAction::EnabledWithParameter, this);
m_annotateCurrentAction = new Action(Tr::tr("Annotate Current File"), Tr::tr("Annotate \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_annotateCurrentAction,
CMD_ID_ANNOTATE_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
@@ -516,7 +516,7 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addSeparator(context);
m_addAction = new ParameterAction(Tr::tr("Add"), Tr::tr("Add \"%1\""), ParameterAction::EnabledWithParameter, this);
m_addAction = new Action(Tr::tr("Add"), Tr::tr("Add \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_addAction, CMD_ID_ADD,
context);
command->setAttribute(Command::CA_UpdateText);
@@ -525,7 +525,7 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_commitCurrentAction = new ParameterAction(Tr::tr("Commit Current File"), Tr::tr("Commit \"%1\""), ParameterAction::EnabledWithParameter, this);
m_commitCurrentAction = new Action(Tr::tr("Commit Current File"), Tr::tr("Commit \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_commitCurrentAction,
CMD_ID_COMMIT_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
@@ -534,7 +534,7 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_deleteAction = new ParameterAction(Tr::tr("Delete..."), Tr::tr("Delete \"%1\"..."), ParameterAction::EnabledWithParameter, this);
m_deleteAction = new Action(Tr::tr("Delete..."), Tr::tr("Delete \"%1\"..."), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_deleteAction, CMD_ID_DELETE_FILE,
context);
command->setAttribute(Command::CA_UpdateText);
@@ -542,7 +542,7 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_revertAction = new ParameterAction(Tr::tr("Revert..."), Tr::tr("Revert \"%1\"..."), ParameterAction::EnabledWithParameter, this);
m_revertAction = new Action(Tr::tr("Revert..."), Tr::tr("Revert \"%1\"..."), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_revertAction, CMD_ID_REVERT,
context);
command->setAttribute(Command::CA_UpdateText);
@@ -552,14 +552,14 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addSeparator(context);
m_editCurrentAction = new ParameterAction(Tr::tr("Edit"), Tr::tr("Edit \"%1\""), ParameterAction::EnabledWithParameter, this);
m_editCurrentAction = new Action(Tr::tr("Edit"), Tr::tr("Edit \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_editCurrentAction, CMD_ID_EDIT_FILE, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_editCurrentAction, &QAction::triggered, this, &CvsPluginPrivate::editCurrentFile);
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_uneditCurrentAction = new ParameterAction(Tr::tr("Unedit"), Tr::tr("Unedit \"%1\""), ParameterAction::EnabledWithParameter, this);
m_uneditCurrentAction = new Action(Tr::tr("Unedit"), Tr::tr("Unedit \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_uneditCurrentAction, CMD_ID_UNEDIT_FILE, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_uneditCurrentAction, &QAction::triggered, this, &CvsPluginPrivate::uneditCurrentFile);
@@ -574,7 +574,7 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addSeparator(context);
m_diffProjectAction = new ParameterAction(Tr::tr("Diff Project"), Tr::tr("Diff Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_diffProjectAction = new Action(Tr::tr("Diff Project"), Tr::tr("Diff Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_diffProjectAction, CMD_ID_DIFF_PROJECT,
context);
command->setAttribute(Command::CA_UpdateText);
@@ -582,7 +582,7 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_statusProjectAction = new ParameterAction(Tr::tr("Project Status"), Tr::tr("Status of Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_statusProjectAction = new Action(Tr::tr("Project Status"), Tr::tr("Status of Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_statusProjectAction, CMD_ID_STATUS,
context);
command->setAttribute(Command::CA_UpdateText);
@@ -590,21 +590,21 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_logProjectAction = new ParameterAction(Tr::tr("Log Project"), Tr::tr("Log Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_logProjectAction = new Action(Tr::tr("Log Project"), Tr::tr("Log Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_logProjectAction, CMD_ID_PROJECTLOG, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_logProjectAction, &QAction::triggered, this, &CvsPluginPrivate::logProject);
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_updateProjectAction = new ParameterAction(Tr::tr("Update Project"), Tr::tr("Update Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_updateProjectAction = new Action(Tr::tr("Update Project"), Tr::tr("Update Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_updateProjectAction, CMD_ID_UPDATE, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_updateProjectAction, &QAction::triggered, this, &CvsPluginPrivate::updateProject);
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_commitProjectAction = new ParameterAction(Tr::tr("Commit Project"), Tr::tr("Commit Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_commitProjectAction = new Action(Tr::tr("Commit Project"), Tr::tr("Commit Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_commitProjectAction, CMD_ID_PROJECTCOMMIT, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_commitProjectAction, &QAction::triggered, this, &CvsPluginPrivate::commitProject);
@@ -613,14 +613,14 @@ CvsPluginPrivate::CvsPluginPrivate()
cvsMenu->addSeparator(context);
m_updateDirectoryAction = new ParameterAction(Tr::tr("Update Directory"), Tr::tr("Update Directory \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
m_updateDirectoryAction = new Action(Tr::tr("Update Directory"), Tr::tr("Update Directory \"%1\""), Utils::Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_updateDirectoryAction, CMD_ID_UPDATE_DIRECTORY, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_updateDirectoryAction, &QAction::triggered, this, &CvsPluginPrivate::updateDirectory);
cvsMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_commitDirectoryAction = new ParameterAction(Tr::tr("Commit Directory"), Tr::tr("Commit Directory \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
m_commitDirectoryAction = new Action(Tr::tr("Commit Directory"), Tr::tr("Commit Directory \"%1\""), Utils::Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_commitDirectoryAction,
CMD_ID_COMMIT_DIRECTORY, context);
command->setAttribute(Command::CA_UpdateText);

View File

@@ -210,13 +210,13 @@ public:
QList<QAction *> m_repositoryActionList;
// Menu Items (file actions)
ParameterAction *m_addAction = nullptr;
ParameterAction *m_deleteAction = nullptr;
ParameterAction *m_annotateFile = nullptr;
ParameterAction *m_diffFile = nullptr;
ParameterAction *m_logFile = nullptr;
ParameterAction *m_revertFile = nullptr;
ParameterAction *m_statusFile = nullptr;
Action *m_addAction = nullptr;
Action *m_deleteAction = nullptr;
Action *m_annotateFile = nullptr;
Action *m_diffFile = nullptr;
Action *m_logFile = nullptr;
Action *m_revertFile = nullptr;
Action *m_statusFile = nullptr;
QAction *m_createRepositoryAction = nullptr;
@@ -288,16 +288,16 @@ void FossilPluginPrivate::createFileActions(const Context &context)
{
Command *command;
m_annotateFile = new ParameterAction(Tr::tr("Annotate Current File"), Tr::tr("Annotate \"%1\""),
ParameterAction::EnabledWithParameter, this);
m_annotateFile = new Action(Tr::tr("Annotate Current File"), Tr::tr("Annotate \"%1\""),
Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_annotateFile, Constants::ANNOTATE, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_annotateFile, &QAction::triggered, this, &FossilPluginPrivate::annotateCurrentFile);
m_fossilContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_diffFile = new ParameterAction(Tr::tr("Diff Current File"), Tr::tr("Diff \"%1\""),
ParameterAction::EnabledWithParameter, this);
m_diffFile = new Action(Tr::tr("Diff Current File"), Tr::tr("Diff \"%1\""),
Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_diffFile, Constants::DIFF, context);
command->setAttribute(Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? Tr::tr("Meta+I,Meta+D")
@@ -306,8 +306,8 @@ void FossilPluginPrivate::createFileActions(const Context &context)
m_fossilContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_logFile = new ParameterAction(Tr::tr("Timeline Current File"), Tr::tr("Timeline \"%1\""),
ParameterAction::EnabledWithParameter, this);
m_logFile = new Action(Tr::tr("Timeline Current File"), Tr::tr("Timeline \"%1\""),
Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_logFile, Constants::LOG, context);
command->setAttribute(Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? Tr::tr("Meta+I,Meta+L")
@@ -316,8 +316,8 @@ void FossilPluginPrivate::createFileActions(const Context &context)
m_fossilContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_statusFile = new ParameterAction(Tr::tr("Status Current File"), Tr::tr("Status \"%1\""),
ParameterAction::EnabledWithParameter, this);
m_statusFile = new Action(Tr::tr("Status Current File"), Tr::tr("Status \"%1\""),
Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_statusFile, Constants::STATUS, context);
command->setAttribute(Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? Tr::tr("Meta+I,Meta+S")
@@ -328,24 +328,24 @@ void FossilPluginPrivate::createFileActions(const Context &context)
m_fossilContainer->addSeparator(context);
m_addAction = new ParameterAction(Tr::tr("Add Current File"), Tr::tr("Add \"%1\""),
ParameterAction::EnabledWithParameter, this);
m_addAction = new Action(Tr::tr("Add Current File"), Tr::tr("Add \"%1\""),
Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_addAction, Constants::ADD, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_addAction, &QAction::triggered, this, &FossilPluginPrivate::addCurrentFile);
m_fossilContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_deleteAction = new ParameterAction(Tr::tr("Delete Current File..."), Tr::tr("Delete \"%1\"..."),
ParameterAction::EnabledWithParameter, this);
m_deleteAction = new Action(Tr::tr("Delete Current File..."), Tr::tr("Delete \"%1\"..."),
Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_deleteAction, Constants::DELETE, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_deleteAction, &QAction::triggered, this, &FossilPluginPrivate::deleteCurrentFile);
m_fossilContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_revertFile = new ParameterAction(Tr::tr("Revert Current File..."), Tr::tr("Revert \"%1\"..."),
ParameterAction::EnabledWithParameter, this);
m_revertFile = new Action(Tr::tr("Revert Current File..."), Tr::tr("Revert \"%1\"..."),
Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_revertFile, Constants::REVERT, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_revertFile, &QAction::triggered, this, &FossilPluginPrivate::revertCurrentFile);

View File

@@ -299,7 +299,7 @@ public:
const Context &context, bool addToLocator,
const std::function<void()> &callback, const QKeySequence &keys);
ParameterAction *createParameterAction(ActionContainer *ac,
Action *createParameterAction(ActionContainer *ac,
const QString &defaultText, const QString &parameterText,
Id id, const Context &context, bool addToLocator,
const std::function<void()> &callback,
@@ -356,10 +356,10 @@ public:
QAction *m_fixupCommitAction = nullptr;
QAction *m_interactiveRebaseAction = nullptr;
QList<ParameterAction *> m_fileActions;
QList<ParameterAction *> m_projectActions;
QList<Action *> m_fileActions;
QList<Action *> m_projectActions;
QList<QAction *> m_repositoryActions;
ParameterAction *m_applyCurrentFilePatchAction = nullptr;
Action *m_applyCurrentFilePatchAction = nullptr;
Gerrit::Internal::GerritPlugin m_gerritPlugin;
@@ -524,13 +524,13 @@ Command *GitPluginPrivate::createCommand(QAction *action, ActionContainer *ac, I
}
// Create a parameter action
ParameterAction *GitPluginPrivate::createParameterAction(ActionContainer *ac,
Action *GitPluginPrivate::createParameterAction(ActionContainer *ac,
const QString &defaultText, const QString &parameterText,
Id id, const Context &context,
bool addToLocator, const std::function<void()> &callback,
const QKeySequence &keys)
{
auto action = new ParameterAction(defaultText, parameterText, ParameterAction::EnabledWithParameter, this);
auto action = new Action(defaultText, parameterText, Action::EnabledWithParameter, this);
Command *command = createCommand(action, ac, id, context, addToLocator, callback, keys);
command->setAttribute(Command::CA_UpdateText);
return action;
@@ -543,7 +543,7 @@ QAction *GitPluginPrivate::createFileAction(ActionContainer *ac,
const std::function<void()> &callback,
const QKeySequence &keys)
{
ParameterAction *action = createParameterAction(ac, defaultText, parameterText, id, context,
Action *action = createParameterAction(ac, defaultText, parameterText, id, context,
addToLocator, callback, keys);
m_fileActions.push_back(action);
return action;
@@ -554,7 +554,7 @@ QAction *GitPluginPrivate::createProjectAction(ActionContainer *ac, const QStrin
bool addToLocator, void (GitPluginPrivate::*func)(),
const QKeySequence &keys)
{
ParameterAction *action = createParameterAction(ac, defaultText, parameterText, id, context,
Action *action = createParameterAction(ac, defaultText, parameterText, id, context,
addToLocator, std::bind(func, this), keys);
m_projectActions.push_back(action);
return action;
@@ -1641,12 +1641,12 @@ void GitPluginPrivate::updateActions(VcsBasePluginPrivate::ActionState as)
// Note: This menu is visible if there is no repository. Only
// 'Create Repository'/'Show' actions should be available.
const QString fileName = Utils::quoteAmpersands(state.currentFileName());
for (ParameterAction *fileAction : std::as_const(m_fileActions))
for (Action *fileAction : std::as_const(m_fileActions))
fileAction->setParameter(fileName);
// If the current file looks like a patch, offer to apply
m_applyCurrentFilePatchAction->setParameter(state.currentPatchFileDisplayName());
const QString projectName = state.currentProjectName();
for (ParameterAction *projectAction : std::as_const(m_projectActions))
for (Action *projectAction : std::as_const(m_projectActions))
projectAction->setParameter(projectName);
for (QAction *repositoryAction : std::as_const(m_repositoryActions))

View File

@@ -177,13 +177,13 @@ private:
QList<QAction *> m_repositoryActionList;
// Menu items (file actions)
ParameterAction *m_addAction = nullptr;
ParameterAction *m_deleteAction = nullptr;
ParameterAction *annotateFile = nullptr;
ParameterAction *diffFile = nullptr;
ParameterAction *logFile = nullptr;
ParameterAction *revertFile = nullptr;
ParameterAction *statusFile = nullptr;
Action *m_addAction = nullptr;
Action *m_deleteAction = nullptr;
Action *annotateFile = nullptr;
Action *diffFile = nullptr;
Action *logFile = nullptr;
Action *revertFile = nullptr;
Action *statusFile = nullptr;
QAction *m_createRepositoryAction = nullptr;
QAction *m_menuAction = nullptr;
@@ -263,14 +263,14 @@ void MercurialPluginPrivate::createFileActions(const Core::Context &context)
{
Core::Command *command;
annotateFile = new ParameterAction(Tr::tr("Annotate Current File"), Tr::tr("Annotate \"%1\""), ParameterAction::EnabledWithParameter, this);
annotateFile = new Action(Tr::tr("Annotate Current File"), Tr::tr("Annotate \"%1\""), Action::EnabledWithParameter, this);
command = Core::ActionManager::registerAction(annotateFile, Utils::Id(Constants::ANNOTATE), context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(annotateFile, &QAction::triggered, this, &MercurialPluginPrivate::annotateCurrentFile);
m_mercurialContainer->addAction(command);
m_commandLocator->appendCommand(command);
diffFile = new ParameterAction(Tr::tr("Diff Current File"), Tr::tr("Diff \"%1\""), ParameterAction::EnabledWithParameter, this);
diffFile = new Action(Tr::tr("Diff Current File"), Tr::tr("Diff \"%1\""), Action::EnabledWithParameter, this);
command = Core::ActionManager::registerAction(diffFile, Utils::Id(Constants::DIFF), context);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? Tr::tr("Meta+H,Meta+D") : Tr::tr("Alt+G,Alt+D")));
@@ -278,7 +278,7 @@ void MercurialPluginPrivate::createFileActions(const Core::Context &context)
m_mercurialContainer->addAction(command);
m_commandLocator->appendCommand(command);
logFile = new ParameterAction(Tr::tr("Log Current File"), Tr::tr("Log \"%1\""), ParameterAction::EnabledWithParameter, this);
logFile = new Action(Tr::tr("Log Current File"), Tr::tr("Log \"%1\""), Action::EnabledWithParameter, this);
command = Core::ActionManager::registerAction(logFile, Utils::Id(Constants::LOG), context);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? Tr::tr("Meta+H,Meta+L") : Tr::tr("Alt+G,Alt+L")));
@@ -286,7 +286,7 @@ void MercurialPluginPrivate::createFileActions(const Core::Context &context)
m_mercurialContainer->addAction(command);
m_commandLocator->appendCommand(command);
statusFile = new ParameterAction(Tr::tr("Status Current File"), Tr::tr("Status \"%1\""), ParameterAction::EnabledWithParameter, this);
statusFile = new Action(Tr::tr("Status Current File"), Tr::tr("Status \"%1\""), Action::EnabledWithParameter, this);
command = Core::ActionManager::registerAction(statusFile, Utils::Id(Constants::STATUS), context);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? Tr::tr("Meta+H,Meta+S") : Tr::tr("Alt+G,Alt+S")));
@@ -296,21 +296,21 @@ void MercurialPluginPrivate::createFileActions(const Core::Context &context)
m_mercurialContainer->addSeparator(context);
m_addAction = new ParameterAction(Tr::tr("Add"), Tr::tr("Add \"%1\""), ParameterAction::EnabledWithParameter, this);
m_addAction = new Action(Tr::tr("Add"), Tr::tr("Add \"%1\""), Action::EnabledWithParameter, this);
command = Core::ActionManager::registerAction(m_addAction, Utils::Id(Constants::ADD), context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_addAction, &QAction::triggered, this, &MercurialPluginPrivate::addCurrentFile);
m_mercurialContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_deleteAction = new ParameterAction(Tr::tr("Delete..."), Tr::tr("Delete \"%1\"..."), ParameterAction::EnabledWithParameter, this);
m_deleteAction = new Action(Tr::tr("Delete..."), Tr::tr("Delete \"%1\"..."), Action::EnabledWithParameter, this);
command = Core::ActionManager::registerAction(m_deleteAction, Utils::Id(Constants::DELETE), context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_deleteAction, &QAction::triggered, this, &MercurialPluginPrivate::promptToDeleteCurrentFile);
m_mercurialContainer->addAction(command);
m_commandLocator->appendCommand(command);
revertFile = new ParameterAction(Tr::tr("Revert Current File..."), Tr::tr("Revert \"%1\"..."), ParameterAction::EnabledWithParameter, this);
revertFile = new Action(Tr::tr("Revert Current File..."), Tr::tr("Revert \"%1\"..."), Action::EnabledWithParameter, this);
command = Core::ActionManager::registerAction(revertFile, Utils::Id(Constants::REVERT), context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(revertFile, &QAction::triggered, this, &MercurialPluginPrivate::revertCurrentFile);

View File

@@ -61,7 +61,7 @@ MesonActionsManager::MesonActionsManager()
this,
&MesonActionsManager::updateContextActions);
connect(&buildTargetContextAction, &Utils::ParameterAction::triggered, this, [] {
connect(&buildTargetContextAction, &Utils::Action::triggered, this, [] {
auto bs = qobject_cast<MesonBuildSystem *>(
ProjectExplorer::ProjectTree::currentBuildSystem());
if (bs) {

View File

@@ -13,10 +13,10 @@ namespace Internal {
class MesonActionsManager : public QObject
{
Q_OBJECT
Utils::ParameterAction buildTargetContextAction{
Utils::Action buildTargetContextAction{
QCoreApplication::translate("QtC::MesonProjectManager", "Build"),
QCoreApplication::translate("QtC::MesonProjectManager", "Build \"%1\""),
Utils::ParameterAction::AlwaysEnabled /*handled manually*/
Utils::Action::AlwaysEnabled /*handled manually*/
};
QAction configureActionMenu;
QAction configureActionContextMenu;

View File

@@ -306,25 +306,25 @@ public:
bool managesDirectoryFstat(const FilePath &directory);
CommandLocator *m_commandLocator = nullptr;
ParameterAction *m_editAction = nullptr;
ParameterAction *m_addAction = nullptr;
ParameterAction *m_deleteAction = nullptr;
Action *m_editAction = nullptr;
Action *m_addAction = nullptr;
Action *m_deleteAction = nullptr;
QAction *m_openedAction = nullptr;
ParameterAction *m_revertFileAction = nullptr;
ParameterAction *m_diffFileAction = nullptr;
ParameterAction *m_diffProjectAction = nullptr;
ParameterAction *m_updateProjectAction = nullptr;
ParameterAction *m_revertProjectAction = nullptr;
ParameterAction *m_revertUnchangedAction = nullptr;
Action *m_revertFileAction = nullptr;
Action *m_diffFileAction = nullptr;
Action *m_diffProjectAction = nullptr;
Action *m_updateProjectAction = nullptr;
Action *m_revertProjectAction = nullptr;
Action *m_revertUnchangedAction = nullptr;
QAction *m_diffAllAction = nullptr;
ParameterAction *m_submitProjectAction = nullptr;
Action *m_submitProjectAction = nullptr;
QAction *m_pendingAction = nullptr;
QAction *m_describeAction = nullptr;
ParameterAction *m_annotateCurrentAction = nullptr;
Action *m_annotateCurrentAction = nullptr;
QAction *m_annotateAction = nullptr;
ParameterAction *m_filelogCurrentAction = nullptr;
Action *m_filelogCurrentAction = nullptr;
QAction *m_filelogAction = nullptr;
ParameterAction *m_logProjectAction = nullptr;
Action *m_logProjectAction = nullptr;
QAction *m_logRepositoryAction = nullptr;
QAction *m_updateAllAction = nullptr;
QString m_commitMessageFileName;
@@ -380,7 +380,7 @@ PerforcePluginPrivate::PerforcePluginPrivate()
Command *command;
m_diffFileAction = new ParameterAction(Tr::tr("Diff Current File"), Tr::tr("Diff \"%1\""), ParameterAction::EnabledWithParameter, this);
m_diffFileAction = new Action(Tr::tr("Diff Current File"), Tr::tr("Diff \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_diffFileAction, CMD_ID_DIFF_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
command->setDescription(Tr::tr("Diff Current File"));
@@ -388,7 +388,7 @@ PerforcePluginPrivate::PerforcePluginPrivate()
perforceContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_annotateCurrentAction = new ParameterAction(Tr::tr("Annotate Current File"), Tr::tr("Annotate \"%1\""), ParameterAction::EnabledWithParameter, this);
m_annotateCurrentAction = new Action(Tr::tr("Annotate Current File"), Tr::tr("Annotate \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_annotateCurrentAction, CMD_ID_ANNOTATE_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
command->setDescription(Tr::tr("Annotate Current File"));
@@ -396,7 +396,7 @@ PerforcePluginPrivate::PerforcePluginPrivate()
perforceContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_filelogCurrentAction = new ParameterAction(Tr::tr("Filelog Current File"), Tr::tr("Filelog \"%1\""), ParameterAction::EnabledWithParameter, this);
m_filelogCurrentAction = new Action(Tr::tr("Filelog Current File"), Tr::tr("Filelog \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_filelogCurrentAction, CMD_ID_FILELOG_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+P,Meta+F") : Tr::tr("Alt+P,Alt+F")));
@@ -407,7 +407,7 @@ PerforcePluginPrivate::PerforcePluginPrivate()
perforceContainer->addSeparator(context);
m_editAction = new ParameterAction(Tr::tr("Edit"), Tr::tr("Edit \"%1\""), ParameterAction::EnabledWithParameter, this);
m_editAction = new Action(Tr::tr("Edit"), Tr::tr("Edit \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_editAction, CMD_ID_EDIT, context);
command->setAttribute(Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+P,Meta+E") : Tr::tr("Alt+P,Alt+E")));
@@ -416,7 +416,7 @@ PerforcePluginPrivate::PerforcePluginPrivate()
perforceContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_addAction = new ParameterAction(Tr::tr("Add"), Tr::tr("Add \"%1\""), ParameterAction::EnabledWithParameter, this);
m_addAction = new Action(Tr::tr("Add"), Tr::tr("Add \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_addAction, CMD_ID_ADD, context);
command->setAttribute(Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+P,Meta+A") : Tr::tr("Alt+P,Alt+A")));
@@ -425,7 +425,7 @@ PerforcePluginPrivate::PerforcePluginPrivate()
perforceContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_deleteAction = new ParameterAction(Tr::tr("Delete..."), Tr::tr("Delete \"%1\"..."), ParameterAction::EnabledWithParameter, this);
m_deleteAction = new Action(Tr::tr("Delete..."), Tr::tr("Delete \"%1\"..."), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_deleteAction, CMD_ID_DELETE_FILE, context);
command->setAttribute(Command::CA_UpdateText);
command->setDescription(Tr::tr("Delete File"));
@@ -433,7 +433,7 @@ PerforcePluginPrivate::PerforcePluginPrivate()
perforceContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_revertFileAction = new ParameterAction(Tr::tr("Revert"), Tr::tr("Revert \"%1\""), ParameterAction::EnabledWithParameter, this);
m_revertFileAction = new Action(Tr::tr("Revert"), Tr::tr("Revert \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_revertFileAction, CMD_ID_REVERT, context);
command->setAttribute(Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+P,Meta+R") : Tr::tr("Alt+P,Alt+R")));
@@ -445,7 +445,7 @@ PerforcePluginPrivate::PerforcePluginPrivate()
perforceContainer->addSeparator(context);
const QString diffProjectDefaultText = Tr::tr("Diff Current Project/Session");
m_diffProjectAction = new ParameterAction(diffProjectDefaultText, Tr::tr("Diff Project \"%1\""), ParameterAction::AlwaysEnabled, this);
m_diffProjectAction = new Action(diffProjectDefaultText, Tr::tr("Diff Project \"%1\""), Action::AlwaysEnabled, this);
command = ActionManager::registerAction(m_diffProjectAction, CMD_ID_DIFF_PROJECT, context);
command->setAttribute(Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+P,Meta+D") : Tr::tr("Alt+P,Alt+D")));
@@ -454,14 +454,14 @@ PerforcePluginPrivate::PerforcePluginPrivate()
perforceContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_logProjectAction = new ParameterAction(Tr::tr("Log Project"), Tr::tr("Log Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_logProjectAction = new Action(Tr::tr("Log Project"), Tr::tr("Log Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_logProjectAction, CMD_ID_PROJECTLOG, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_logProjectAction, &QAction::triggered, this, &PerforcePluginPrivate::logProject);
perforceContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_submitProjectAction = new ParameterAction(Tr::tr("Submit Project"), Tr::tr("Submit Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_submitProjectAction = new Action(Tr::tr("Submit Project"), Tr::tr("Submit Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_submitProjectAction, CMD_ID_SUBMIT, context);
command->setAttribute(Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+P,Meta+S") : Tr::tr("Alt+P,Alt+S")));
@@ -470,7 +470,7 @@ PerforcePluginPrivate::PerforcePluginPrivate()
m_commandLocator->appendCommand(command);
const QString updateProjectDefaultText = Tr::tr("Update Current Project");
m_updateProjectAction = new ParameterAction(updateProjectDefaultText, Tr::tr("Update Project \"%1\""), ParameterAction::AlwaysEnabled, this);
m_updateProjectAction = new Action(updateProjectDefaultText, Tr::tr("Update Project \"%1\""), Action::AlwaysEnabled, this);
command = ActionManager::registerAction(m_updateProjectAction, CMD_ID_UPDATE_PROJECT, context);
command->setDescription(updateProjectDefaultText);
command->setAttribute(Command::CA_UpdateText);
@@ -478,14 +478,14 @@ PerforcePluginPrivate::PerforcePluginPrivate()
perforceContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_revertUnchangedAction = new ParameterAction(Tr::tr("Revert Unchanged"), Tr::tr("Revert Unchanged Files of Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_revertUnchangedAction = new Action(Tr::tr("Revert Unchanged"), Tr::tr("Revert Unchanged Files of Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_revertUnchangedAction, CMD_ID_REVERT_UNCHANGED_PROJECT, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_revertUnchangedAction, &QAction::triggered, this, &PerforcePluginPrivate::revertUnchangedCurrentProject);
perforceContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_revertProjectAction = new ParameterAction(Tr::tr("Revert Project"), Tr::tr("Revert Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_revertProjectAction = new Action(Tr::tr("Revert Project"), Tr::tr("Revert Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_revertProjectAction, CMD_ID_REVERT_PROJECT, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_revertProjectAction, &QAction::triggered, this, &PerforcePluginPrivate::revertCurrentProject);

View File

@@ -550,14 +550,14 @@ public:
QAction *m_newAction;
QAction *m_loadAction;
ParameterAction *m_unloadAction;
ParameterAction *m_unloadActionContextMenu;
ParameterAction *m_unloadOthersActionContextMenu;
Action *m_unloadAction;
Action *m_unloadActionContextMenu;
Action *m_unloadOthersActionContextMenu;
QAction *m_closeAllProjects;
QAction *m_buildProjectOnlyAction;
ParameterAction *m_buildProjectForAllConfigsAction;
ParameterAction *m_buildAction;
ParameterAction *m_buildForRunConfigAction;
Action *m_buildProjectForAllConfigsAction;
Action *m_buildAction;
Action *m_buildForRunConfigAction;
ProxyAction *m_modeBarBuildAction;
QAction *m_buildActionContextMenu;
QAction *m_buildDependenciesActionContextMenu;
@@ -601,15 +601,15 @@ public:
QAction *m_projectTreeCollapseAllAction;
QAction *m_projectTreeExpandAllAction;
QAction *m_projectTreeExpandNodeAction = nullptr;
ParameterAction *m_closeProjectFilesActionFileMenu;
ParameterAction *m_closeProjectFilesActionContextMenu;
Action *m_closeProjectFilesActionFileMenu;
Action *m_closeProjectFilesActionContextMenu;
QAction *m_searchOnFileSystem;
QAction *m_showInGraphicalShell;
QAction *m_showFileSystemPane;
QAction *m_openTerminalHere;
QAction *m_openTerminalHereBuildEnv;
QAction *m_openTerminalHereRunEnv;
ParameterAction *m_setStartupProjectAction;
Action *m_setStartupProjectAction;
QAction *m_projectSelectorAction;
QAction *m_projectSelectorActionMenu;
QAction *m_projectSelectorActionQuick;
@@ -1163,16 +1163,16 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd, &ProjectExplorerPluginPrivate::updateRecentProjectMenu);
// unload action
dd->m_unloadAction = new ParameterAction(Tr::tr("Close Project"), Tr::tr("Close Pro&ject \"%1\""),
ParameterAction::AlwaysEnabled, this);
dd->m_unloadAction = new Action(Tr::tr("Close Project"), Tr::tr("Close Pro&ject \"%1\""),
Action::AlwaysEnabled, this);
cmd = ActionManager::registerAction(dd->m_unloadAction, Constants::UNLOAD);
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(dd->m_unloadAction->text());
mfile->addAction(cmd, Core::Constants::G_FILE_PROJECT);
dd->m_closeProjectFilesActionFileMenu = new ParameterAction(
dd->m_closeProjectFilesActionFileMenu = new Action(
Tr::tr("Close All Files in Project"), Tr::tr("Close All Files in Project \"%1\""),
ParameterAction::AlwaysEnabled, this);
Action::AlwaysEnabled, this);
cmd = ActionManager::registerAction(dd->m_closeProjectFilesActionFileMenu,
"ProjectExplorer.CloseProjectFilesFileMenu");
cmd->setAttribute(Command::CA_UpdateText);
@@ -1257,8 +1257,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
msessionContextMenu->addAction(cmd, Constants::G_SESSION_REBUILD);
// build action
dd->m_buildAction = new ParameterAction(Tr::tr("Build Project"), Tr::tr("Build Project \"%1\""),
ParameterAction::AlwaysEnabled, this);
dd->m_buildAction = new Action(Tr::tr("Build Project"), Tr::tr("Build Project \"%1\""),
Action::AlwaysEnabled, this);
dd->m_buildAction->setIcon(buildIcon);
cmd = ActionManager::registerAction(dd->m_buildAction, Constants::BUILD);
cmd->setAttribute(Command::CA_UpdateText);
@@ -1267,9 +1267,9 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mbuild->addAction(cmd, Constants::G_BUILD_PROJECT);
dd->m_buildProjectForAllConfigsAction
= new ParameterAction(Tr::tr("Build Project for All Configurations"),
= new Action(Tr::tr("Build Project for All Configurations"),
Tr::tr("Build Project \"%1\" for All Configurations"),
ParameterAction::AlwaysEnabled, this);
Action::AlwaysEnabled, this);
dd->m_buildProjectForAllConfigsAction->setIcon(buildIcon);
cmd = ActionManager::registerAction(dd->m_buildProjectForAllConfigsAction,
Constants::BUILDALLCONFIGS);
@@ -1287,9 +1287,9 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
ModeManager::addAction(dd->m_modeBarBuildAction, Constants::P_ACTION_BUILDPROJECT);
// build for run config
dd->m_buildForRunConfigAction = new ParameterAction(
dd->m_buildForRunConfigAction = new Action(
Tr::tr("Build for &Run Configuration"), Tr::tr("Build for &Run Configuration \"%1\""),
ParameterAction::EnabledWithParameter, this);
Action::EnabledWithParameter, this);
dd->m_buildForRunConfigAction->setIcon(buildIcon);
cmd = ActionManager::registerAction(dd->m_buildForRunConfigAction,
"ProjectExplorer.BuildForRunConfig");
@@ -1484,9 +1484,9 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
dd->m_closeProjectFilesActionContextMenu = new ParameterAction(
dd->m_closeProjectFilesActionContextMenu = new Action(
Tr::tr("Close All Files"), Tr::tr("Close All Files in Project \"%1\""),
ParameterAction::EnabledWithParameter, this);
Action::EnabledWithParameter, this);
cmd = ActionManager::registerAction(dd->m_closeProjectFilesActionContextMenu,
"ProjectExplorer.CloseAllFilesInProjectContextMenu");
cmd->setAttribute(Command::CA_UpdateText);
@@ -1494,15 +1494,15 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_CLOSE);
// unload project again, in right position
dd->m_unloadActionContextMenu = new ParameterAction(Tr::tr("Close Project"), Tr::tr("Close Project \"%1\""),
ParameterAction::EnabledWithParameter, this);
dd->m_unloadActionContextMenu = new Action(Tr::tr("Close Project"), Tr::tr("Close Project \"%1\""),
Action::EnabledWithParameter, this);
cmd = ActionManager::registerAction(dd->m_unloadActionContextMenu, Constants::UNLOADCM);
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(dd->m_unloadActionContextMenu->text());
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_CLOSE);
dd->m_unloadOthersActionContextMenu = new ParameterAction(Tr::tr("Close Other Projects"), Tr::tr("Close All Projects Except \"%1\""),
ParameterAction::EnabledWithParameter, this);
dd->m_unloadOthersActionContextMenu = new Action(Tr::tr("Close Other Projects"), Tr::tr("Close All Projects Except \"%1\""),
Action::EnabledWithParameter, this);
cmd = ActionManager::registerAction(dd->m_unloadOthersActionContextMenu, Constants::UNLOADOTHERSCM);
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(dd->m_unloadOthersActionContextMenu->text());
@@ -1558,9 +1558,9 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// mproject->addAction(cmd, Constants::G_FOLDER_FILES);
// set startup project action
dd->m_setStartupProjectAction = new ParameterAction(Tr::tr("Set as Active Project"),
dd->m_setStartupProjectAction = new Action(Tr::tr("Set as Active Project"),
Tr::tr("Set \"%1\" as Active Project"),
ParameterAction::AlwaysEnabled, this);
Action::AlwaysEnabled, this);
cmd = ActionManager::registerAction(dd->m_setStartupProjectAction, Constants::SETSTARTUP,
projectTreeContext);
cmd->setAttribute(Command::CA_UpdateText);

View File

@@ -130,8 +130,8 @@ private:
QAction *m_buildSubprojectCtx = nullptr;
QAction *m_cleanSubprojectCtx = nullptr;
QAction *m_rebuildSubprojectCtx = nullptr;
ParameterAction *m_buildFile = nullptr;
ParameterAction *m_buildProduct = nullptr;
Action *m_buildFile = nullptr;
Action *m_buildProduct = nullptr;
QAction *m_cleanProduct = nullptr;
QAction *m_rebuildProduct = nullptr;
};
@@ -189,8 +189,8 @@ void QbsProjectManagerPlugin::initialize()
connect(m_buildFileCtx, &QAction::triggered,
this, &QbsProjectManagerPlugin::buildFileContextMenu);
m_buildFile = new Utils::ParameterAction(Tr::tr("Build File"), Tr::tr("Build File \"%1\""),
Utils::ParameterAction::AlwaysEnabled, this);
m_buildFile = new Utils::Action(Tr::tr("Build File"), Tr::tr("Build File \"%1\""),
Utils::Action::AlwaysEnabled, this);
command = Core::ActionManager::registerAction(m_buildFile, Constants::ACTION_BUILD_FILE);
command->setAttribute(Core::Command::CA_Hide);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -206,8 +206,8 @@ void QbsProjectManagerPlugin::initialize()
connect(m_buildProductCtx, &QAction::triggered,
this, &QbsProjectManagerPlugin::buildProductContextMenu);
m_buildProduct = new Utils::ParameterAction(Tr::tr("Build Product"), Tr::tr("Build Product \"%1\""),
Utils::ParameterAction::AlwaysEnabled, this);
m_buildProduct = new Utils::Action(Tr::tr("Build Product"), Tr::tr("Build Product \"%1\""),
Utils::Action::AlwaysEnabled, this);
command = Core::ActionManager::registerAction(m_buildProduct, Constants::ACTION_BUILD_PRODUCT);
command->setAttribute(Core::Command::CA_Hide);
command->setAttribute(Core::Command::CA_UpdateText);

View File

@@ -81,15 +81,15 @@ public:
QAction *m_runQMakeAction = nullptr;
QAction *m_runQMakeActionContextMenu = nullptr;
ParameterAction *m_buildSubProjectContextMenu = nullptr;
Action *m_buildSubProjectContextMenu = nullptr;
QAction *m_subProjectRebuildSeparator = nullptr;
QAction *m_rebuildSubProjectContextMenu = nullptr;
QAction *m_cleanSubProjectContextMenu = nullptr;
QAction *m_buildFileContextMenu = nullptr;
ParameterAction *m_buildSubProjectAction = nullptr;
Action *m_buildSubProjectAction = nullptr;
QAction *m_rebuildSubProjectAction = nullptr;
QAction *m_cleanSubProjectAction = nullptr;
ParameterAction *m_buildFileAction = nullptr;
Action *m_buildFileAction = nullptr;
QAction *m_addLibraryAction = nullptr;
QAction *m_addLibraryActionContextMenu = nullptr;
@@ -157,8 +157,8 @@ void QmakeProjectManagerPlugin::initialize()
//register actions
Command *command = nullptr;
d->m_buildSubProjectContextMenu = new ParameterAction(Tr::tr("Build"), Tr::tr("Build \"%1\""),
ParameterAction::AlwaysEnabled/*handled manually*/,
d->m_buildSubProjectContextMenu = new Action(Tr::tr("Build"), Tr::tr("Build \"%1\""),
Action::AlwaysEnabled/*handled manually*/,
this);
command = ActionManager::registerAction(d->m_buildSubProjectContextMenu, Constants::BUILDSUBDIRCONTEXTMENU, projectContext);
command->setAttribute(Command::CA_Hide);
@@ -203,8 +203,8 @@ void QmakeProjectManagerPlugin::initialize()
connect(d->m_buildFileContextMenu, &QAction::triggered,
d, &QmakeProjectManagerPluginPrivate::buildFileContextMenu);
d->m_buildSubProjectAction = new ParameterAction(Tr::tr("Build &Subproject"), Tr::tr("Build &Subproject \"%1\""),
ParameterAction::AlwaysEnabled, this);
d->m_buildSubProjectAction = new Action(Tr::tr("Build &Subproject"), Tr::tr("Build &Subproject \"%1\""),
Action::AlwaysEnabled, this);
command = ActionManager::registerAction(d->m_buildSubProjectAction, Constants::BUILDSUBDIR, projectContext);
command->setAttribute(Command::CA_Hide);
command->setAttribute(Command::CA_UpdateText);
@@ -240,8 +240,8 @@ void QmakeProjectManagerPlugin::initialize()
connect(d->m_cleanSubProjectAction, &QAction::triggered,
d, &QmakeProjectManagerPluginPrivate::cleanSubDirContextMenu);
d->m_buildFileAction = new ParameterAction(Tr::tr("Build File"), Tr::tr("Build File \"%1\""),
ParameterAction::AlwaysEnabled, this);
d->m_buildFileAction = new Action(Tr::tr("Build File"), Tr::tr("Build File \"%1\""),
Action::AlwaysEnabled, this);
command = ActionManager::registerAction(d->m_buildFileAction, Constants::BUILDFILE, projectContext);
command->setAttribute(Command::CA_Hide);
command->setAttribute(Command::CA_UpdateText);

View File

@@ -128,8 +128,8 @@ class ResourceEditorPlugin final : public ExtensionSystem::IPlugin
QMenu *m_openWithMenu = nullptr;
// file context menu
ParameterAction *m_copyPath = nullptr;
ParameterAction *m_copyUrl = nullptr;
Action *m_copyPath = nullptr;
Action *m_copyUrl = nullptr;
};
void ResourceEditorPlugin::initialize()

View File

@@ -267,24 +267,24 @@ private:
FilePath m_commitRepository;
Core::CommandLocator *m_commandLocator = nullptr;
Utils::ParameterAction *m_addAction = nullptr;
Utils::ParameterAction *m_deleteAction = nullptr;
Utils::ParameterAction *m_revertAction = nullptr;
Utils::ParameterAction *m_diffProjectAction = nullptr;
Utils::ParameterAction *m_diffCurrentAction = nullptr;
Utils::ParameterAction *m_logProjectAction = nullptr;
Utils::Action *m_addAction = nullptr;
Utils::Action *m_deleteAction = nullptr;
Utils::Action *m_revertAction = nullptr;
Utils::Action *m_diffProjectAction = nullptr;
Utils::Action *m_diffCurrentAction = nullptr;
Utils::Action *m_logProjectAction = nullptr;
QAction *m_logRepositoryAction = nullptr;
QAction *m_commitAllAction = nullptr;
QAction *m_revertRepositoryAction = nullptr;
QAction *m_diffRepositoryAction = nullptr;
QAction *m_statusRepositoryAction = nullptr;
QAction *m_updateRepositoryAction = nullptr;
Utils::ParameterAction *m_commitCurrentAction = nullptr;
Utils::ParameterAction *m_filelogCurrentAction = nullptr;
Utils::ParameterAction *m_annotateCurrentAction = nullptr;
Utils::ParameterAction *m_statusProjectAction = nullptr;
Utils::ParameterAction *m_updateProjectAction = nullptr;
Utils::ParameterAction *m_commitProjectAction = nullptr;
Utils::Action *m_commitCurrentAction = nullptr;
Utils::Action *m_filelogCurrentAction = nullptr;
Utils::Action *m_annotateCurrentAction = nullptr;
Utils::Action *m_statusProjectAction = nullptr;
Utils::Action *m_updateProjectAction = nullptr;
Utils::Action *m_commitProjectAction = nullptr;
QAction *m_describeAction = nullptr;
QAction *m_menuAction = nullptr;
@@ -361,7 +361,7 @@ SubversionPluginPrivate::SubversionPluginPrivate()
m_menuAction = subversionMenu->menu()->menuAction();
Command *command;
m_diffCurrentAction = new ParameterAction(Tr::tr("Diff Current File"), Tr::tr("Diff \"%1\""), ParameterAction::EnabledWithParameter, this);
m_diffCurrentAction = new Action(Tr::tr("Diff Current File"), Tr::tr("Diff \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_diffCurrentAction,
CMD_ID_DIFF_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
@@ -370,7 +370,7 @@ SubversionPluginPrivate::SubversionPluginPrivate()
subversionMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_filelogCurrentAction = new ParameterAction(Tr::tr("Filelog Current File"), Tr::tr("Filelog \"%1\""), ParameterAction::EnabledWithParameter, this);
m_filelogCurrentAction = new Action(Tr::tr("Filelog Current File"), Tr::tr("Filelog \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_filelogCurrentAction,
CMD_ID_FILELOG_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
@@ -378,7 +378,7 @@ SubversionPluginPrivate::SubversionPluginPrivate()
subversionMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_annotateCurrentAction = new ParameterAction(Tr::tr("Annotate Current File"), Tr::tr("Annotate \"%1\""), ParameterAction::EnabledWithParameter, this);
m_annotateCurrentAction = new Action(Tr::tr("Annotate Current File"), Tr::tr("Annotate \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_annotateCurrentAction,
CMD_ID_ANNOTATE_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
@@ -388,7 +388,7 @@ SubversionPluginPrivate::SubversionPluginPrivate()
subversionMenu->addSeparator(context);
m_addAction = new ParameterAction(Tr::tr("Add"), Tr::tr("Add \"%1\""), ParameterAction::EnabledWithParameter, this);
m_addAction = new Action(Tr::tr("Add"), Tr::tr("Add \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_addAction, CMD_ID_ADD,
context);
command->setAttribute(Command::CA_UpdateText);
@@ -397,7 +397,7 @@ SubversionPluginPrivate::SubversionPluginPrivate()
subversionMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_commitCurrentAction = new ParameterAction(Tr::tr("Commit Current File"), Tr::tr("Commit \"%1\""), ParameterAction::EnabledWithParameter, this);
m_commitCurrentAction = new Action(Tr::tr("Commit Current File"), Tr::tr("Commit \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_commitCurrentAction,
CMD_ID_COMMIT_CURRENT, context);
command->setAttribute(Command::CA_UpdateText);
@@ -406,7 +406,7 @@ SubversionPluginPrivate::SubversionPluginPrivate()
subversionMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_deleteAction = new ParameterAction(Tr::tr("Delete..."), Tr::tr("Delete \"%1\"..."), ParameterAction::EnabledWithParameter, this);
m_deleteAction = new Action(Tr::tr("Delete..."), Tr::tr("Delete \"%1\"..."), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_deleteAction, CMD_ID_DELETE_FILE,
context);
command->setAttribute(Command::CA_UpdateText);
@@ -414,7 +414,7 @@ SubversionPluginPrivate::SubversionPluginPrivate()
subversionMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_revertAction = new ParameterAction(Tr::tr("Revert..."), Tr::tr("Revert \"%1\"..."), ParameterAction::EnabledWithParameter, this);
m_revertAction = new Action(Tr::tr("Revert..."), Tr::tr("Revert \"%1\"..."), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_revertAction, CMD_ID_REVERT,
context);
command->setAttribute(Command::CA_UpdateText);
@@ -424,7 +424,7 @@ SubversionPluginPrivate::SubversionPluginPrivate()
subversionMenu->addSeparator(context);
m_diffProjectAction = new ParameterAction(Tr::tr("Diff Project"), Tr::tr("Diff Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_diffProjectAction = new Action(Tr::tr("Diff Project"), Tr::tr("Diff Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_diffProjectAction, CMD_ID_DIFF_PROJECT,
context);
command->setAttribute(Command::CA_UpdateText);
@@ -432,7 +432,7 @@ SubversionPluginPrivate::SubversionPluginPrivate()
subversionMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_statusProjectAction = new ParameterAction(Tr::tr("Project Status"), Tr::tr("Status of Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_statusProjectAction = new Action(Tr::tr("Project Status"), Tr::tr("Status of Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_statusProjectAction, CMD_ID_STATUS,
context);
command->setAttribute(Command::CA_UpdateText);
@@ -440,21 +440,21 @@ SubversionPluginPrivate::SubversionPluginPrivate()
subversionMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_logProjectAction = new ParameterAction(Tr::tr("Log Project"), Tr::tr("Log Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_logProjectAction = new Action(Tr::tr("Log Project"), Tr::tr("Log Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_logProjectAction, CMD_ID_PROJECTLOG, context);
command->setAttribute(Command::CA_UpdateText);
connect(m_logProjectAction, &QAction::triggered, this, &SubversionPluginPrivate::logProject);
subversionMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_updateProjectAction = new ParameterAction(Tr::tr("Update Project"), Tr::tr("Update Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_updateProjectAction = new Action(Tr::tr("Update Project"), Tr::tr("Update Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_updateProjectAction, CMD_ID_UPDATE, context);
connect(m_updateProjectAction, &QAction::triggered, this, &SubversionPluginPrivate::updateProject);
command->setAttribute(Command::CA_UpdateText);
subversionMenu->addAction(command);
m_commandLocator->appendCommand(command);
m_commitProjectAction = new ParameterAction(Tr::tr("Commit Project"), Tr::tr("Commit Project \"%1\""), ParameterAction::EnabledWithParameter, this);
m_commitProjectAction = new Action(Tr::tr("Commit Project"), Tr::tr("Commit Project \"%1\""), Action::EnabledWithParameter, this);
command = ActionManager::registerAction(m_commitProjectAction, CMD_ID_COMMIT_PROJECT, context);
connect(m_commitProjectAction, &QAction::triggered, this, &SubversionPluginPrivate::startCommitProject);
command->setAttribute(Command::CA_UpdateText);

View File

@@ -18,13 +18,13 @@ public:
private:
TextEditor::TextEditorActionHandler m_actionHandler;
Utils::ParameterAction m_emphasisAction;
Utils::ParameterAction m_strongAction;
Utils::ParameterAction m_inlineCodeAction;
Utils::ParameterAction m_linkAction;
Utils::ParameterAction m_toggleEditorAction;
Utils::ParameterAction m_togglePreviewAction;
Utils::ParameterAction m_swapAction;
Utils::Action m_emphasisAction;
Utils::Action m_strongAction;
Utils::Action m_inlineCodeAction;
Utils::Action m_linkAction;
Utils::Action m_toggleEditorAction;
Utils::Action m_togglePreviewAction;
Utils::Action m_swapAction;
};
} // TextEditor::Internal