void ResourceEditorPlugin::removeFileContextMenu() { ResourceFolderNode *rfn = static_cast<ResourceFolderNode *>(ProjectTree::currentNode()); QString path = rfn->filePath().toString(); FolderNode *parent = rfn->parentFolderNode(); if (!parent->removeFiles(QStringList() << path)) QMessageBox::warning(Core::ICore::mainWindow(), tr("File Removal Failed"), tr("Removing file %1 from the project failed.").arg(path)); }