diff --git a/project_fs/projectfilesystemplugin.cpp b/project_fs/projectfilesystemplugin.cpp index 6588643..9a6463b 100644 --- a/project_fs/projectfilesystemplugin.cpp +++ b/project_fs/projectfilesystemplugin.cpp @@ -64,7 +64,7 @@ namespace ProjectFilesystemPlugin { { Utils::globalMacroExpander()->registerPrefix("ProjectFilesystem", "Project filesystem plugin", [](QString v) -> QString {return v;} ); Utils::globalMacroExpander()->registerFileVariables("ProjectFilesystem", "Selected item", - []() -> QString { return projectfs_menu_target.absoluteFilePath();}); + []() -> Utils::FilePath { return Utils::FilePath::fromString(projectfs_menu_target.absoluteFilePath());}, true); // Retrieve objects from the plugin manager's object pool // In the extensionsInitialized function, a plugin can be sure that all // plugins that depend on it are completely initialized. diff --git a/project_fs/projectfilesystemwidget.cpp b/project_fs/projectfilesystemwidget.cpp index 3de59c7..3dde7f2 100644 --- a/project_fs/projectfilesystemwidget.cpp +++ b/project_fs/projectfilesystemwidget.cpp @@ -169,7 +169,7 @@ void ProjectFilesystemWidget::createTree(QTreeWidgetItem * ti, const QString & d } QTreeWidgetItem * ni = new QTreeWidgetItem(); ni->setText(0, nit); - ni->setIcon(0, Core::FileIconProvider::icon(i)); + ni->setIcon(0, Core::FileIconProvider::icon(Utils::FilePath::fromString(i.absoluteFilePath()))); ni->setData(0, roleFullPath, i.absoluteFilePath()); ni->setData(0, roleItemType, i.isDir() ? itDir : itFile); ni->setData(0, roleIsDir, i.isDir()); @@ -479,13 +479,13 @@ void ProjectFilesystemWidget::on_actionOpen_external_triggered() { void ProjectFilesystemWidget::on_actionShow_external_triggered() { if (projectfs_menu_target.path().isEmpty()) return; - Core::FileUtils::showInGraphicalShell(Core::ICore::mainWindow(), projectfs_menu_target.absoluteFilePath()); + Core::FileUtils::showInGraphicalShell(Core::ICore::mainWindow(), Utils::FilePath::fromString(projectfs_menu_target.absoluteFilePath())); } void ProjectFilesystemWidget::on_actionOpen_terminal_triggered() { if (projectfs_menu_target.path().isEmpty()) return; - Core::FileUtils::openTerminal(QDir(projectfs_menu_target.absoluteFilePath()).path()); + Core::FileUtils::openTerminal(Utils::FilePath::fromString(QDir(projectfs_menu_target.absoluteFilePath()).path())); } diff --git a/project_fs/projectfilesystemwidgetplugin.h b/project_fs/projectfilesystemwidgetplugin.h index 9c6853e..9517723 100644 --- a/project_fs/projectfilesystemwidgetplugin.h +++ b/project_fs/projectfilesystemwidgetplugin.h @@ -6,7 +6,6 @@ class ProjectFSWidgetFactory: public Core::INavigationWidgetFactory { - Q_OBJECT public: ProjectFSWidgetFactory(); ~ProjectFSWidgetFactory() {}