From b1a73990e60a5ef9f2ea189ea9891dedad8425f0 Mon Sep 17 00:00:00 2001 From: peri4 Date: Tue, 30 Sep 2025 14:26:26 +0300 Subject: [PATCH] first try for v18 --- project_fs/projectfilesystemplugin.cpp | 7 +++---- project_fs/projectfilesystemplugin.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/project_fs/projectfilesystemplugin.cpp b/project_fs/projectfilesystemplugin.cpp index 9a6463b..0182d75 100644 --- a/project_fs/projectfilesystemplugin.cpp +++ b/project_fs/projectfilesystemplugin.cpp @@ -30,7 +30,7 @@ namespace ProjectFilesystemPlugin { // Delete members } - bool ProjectFilesystemPluginPlugin::initialize(const QStringList &arguments, QString *errorString) + Utils::Result<> ProjectFilesystemPluginPlugin::initialize(const QStringList &arguments) { // Register objects in the plugin manager's object pool // Load settings @@ -40,7 +40,6 @@ namespace ProjectFilesystemPlugin { // depends on have initialized their members. Q_UNUSED(arguments) - Q_UNUSED(errorString) /*auto action = new QAction(tr("ProjectFilesystemPlugin Action"), this); Core::Command *cmd = Core::ActionManager::registerAction(action, Constants::ACTION_ID, @@ -57,12 +56,12 @@ namespace ProjectFilesystemPlugin { //addAutoReleasedObject(new ProjectFSWidgetFactory()); (new ProjectFSWidgetFactory())->setParent(this); - return true; + return Utils::ResultOk; } void ProjectFilesystemPluginPlugin::extensionsInitialized() { - Utils::globalMacroExpander()->registerPrefix("ProjectFilesystem", "Project filesystem plugin", [](QString v) -> QString {return v;} ); + Utils::globalMacroExpander()->registerPrefix("ProjectFilesystem", "ProjectFilesystem", "Project filesystem plugin", [](QString v) -> QString {return v;} ); Utils::globalMacroExpander()->registerFileVariables("ProjectFilesystem", "Selected item", []() -> Utils::FilePath { return Utils::FilePath::fromString(projectfs_menu_target.absoluteFilePath());}, true); // Retrieve objects from the plugin manager's object pool diff --git a/project_fs/projectfilesystemplugin.h b/project_fs/projectfilesystemplugin.h index 62801ad..121d8a1 100644 --- a/project_fs/projectfilesystemplugin.h +++ b/project_fs/projectfilesystemplugin.h @@ -17,7 +17,7 @@ namespace ProjectFilesystemPlugin { ProjectFilesystemPluginPlugin(); ~ProjectFilesystemPluginPlugin(); - bool initialize(const QStringList &arguments, QString *errorString) override; + Utils::Result<> initialize(const QStringList &arguments) override; void extensionsInitialized() override; ShutdownFlag aboutToShutdown() override;