1 Commits
master ... v6

Author SHA1 Message Date
57d5b83daf ported to v6 2022-01-15 04:32:04 +03:00
3 changed files with 4 additions and 5 deletions

View File

@@ -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.

View File

@@ -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()));
}

View File

@@ -6,7 +6,6 @@
class ProjectFSWidgetFactory: public Core::INavigationWidgetFactory
{
Q_OBJECT
public:
ProjectFSWidgetFactory();
~ProjectFSWidgetFactory() {}