Move qrc, rcc and CMakeLists.txt generating menu option to file menu

Task-number: QDS-5903
Change-Id: I42cba21eaecaf5580c40dab8ce32bbf12c37f13f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Tapani Mattila
2022-01-12 13:17:11 +02:00
parent 54e7d41726
commit c57573708a
2 changed files with 8 additions and 8 deletions

View File

@@ -81,12 +81,12 @@ QVector<GeneratableFile> queuedFiles;
void generateMenuEntry() void generateMenuEntry()
{ {
Core::ActionContainer *buildMenu = Core::ActionContainer *menu =
Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT); Core::ActionManager::actionContainer(Core::Constants::M_FILE);
auto action = new QAction(QCoreApplication::translate("QmlDesigner::GenerateCmake", "Generate CMakeLists.txt Files")); auto action = new QAction(QCoreApplication::translate("QmlDesigner::GenerateCmake", "Export to Qt Creator (CMake)"));
QObject::connect(action, &QAction::triggered, GenerateCmake::onGenerateCmakeLists); QObject::connect(action, &QAction::triggered, GenerateCmake::onGenerateCmakeLists);
Core::Command *cmd = Core::ActionManager::registerAction(action, "QmlProject.CreateCMakeLists"); Core::Command *cmd = Core::ActionManager::registerAction(action, "QmlProject.CreateCMakeLists");
buildMenu->addAction(cmd, ProjectExplorer::Constants::G_BUILD_RUN); menu->addAction(cmd, Core::Constants::G_FILE_EXPORT);
action->setEnabled(ProjectExplorer::SessionManager::startupProject() != nullptr); action->setEnabled(ProjectExplorer::SessionManager::startupProject() != nullptr);
QObject::connect(ProjectExplorer::SessionManager::instance(), QObject::connect(ProjectExplorer::SessionManager::instance(),

View File

@@ -195,8 +195,8 @@ QList<GenerateResource::ResourceFile> getFilesFromQrc(QFile *file, bool inProjec
void GenerateResource::generateMenuEntry() void GenerateResource::generateMenuEntry()
{ {
Core::ActionContainer *buildMenu = Core::ActionContainer *menu =
Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT); Core::ActionManager::actionContainer(Core::Constants::M_FILE);
const Core::Context projectContext(QmlProjectManager::Constants::QML_PROJECT_ID); const Core::Context projectContext(QmlProjectManager::Constants::QML_PROJECT_ID);
// ToDo: move this to QtCreator and add tr to the string then // ToDo: move this to QtCreator and add tr to the string then
@@ -573,8 +573,8 @@ void GenerateResource::generateMenuEntry()
} }
} }
}); });
buildMenu->addAction(cmd, ProjectExplorer::Constants::G_BUILD_RUN); menu->addAction(cmd, Core::Constants::G_FILE_EXPORT);
buildMenu->addAction(cmd2, ProjectExplorer::Constants::G_BUILD_RUN); menu->addAction(cmd2, Core::Constants::G_FILE_EXPORT);
} }
} // namespace QmlDesigner } // namespace QmlDesigner