ProjectExplorer: return back actions text

for Add New, Rename and Remove File actions.

FolderNavigationWidgetFactory::registerActions with empty action text is
called before ProjectExplorerPlugin::initialize with proper action
registration

Change-Id: I719f58735d672ad0831162a5f0cccebf73354976
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Nikita Baryshnikov
2018-03-08 09:34:17 +03:00
committed by hjk
parent 6010fd855d
commit 3eb71d95f8
2 changed files with 6 additions and 6 deletions

View File

@@ -850,21 +850,21 @@ void FolderNavigationWidgetFactory::registerActions()
{
Core::Context context(C_FOLDERNAVIGATIONWIDGET);
auto add = new QAction(this);
auto add = new QAction(tr("Add New..."), this);
Core::ActionManager::registerAction(add, Constants::ADDNEWFILE, context);
connect(add, &QAction::triggered, Core::ICore::instance(), [] {
if (auto navWidget = currentFolderNavigationWidget())
navWidget->addNewItem();
});
auto rename = new QAction(this);
auto rename = new QAction(tr("Rename..."), this);
Core::ActionManager::registerAction(rename, Constants::RENAMEFILE, context);
connect(rename, &QAction::triggered, Core::ICore::instance(), [] {
if (auto navWidget = currentFolderNavigationWidget())
navWidget->editCurrentItem();
});
auto remove = new QAction(this);
auto remove = new QAction(tr("Remove..."), this);
Core::ActionManager::registerAction(remove, Constants::REMOVEFILE, context);
connect(remove, &QAction::triggered, Core::ICore::instance(), [] {
if (auto navWidget = currentFolderNavigationWidget())