You cannot pass parameters in that way. I would suggest to do the following:
connect(action, SIGNAL(triggered()), this, SLOT(openFile()));
And in your openFile()
slot just do:
void MyClass::openFile()
{
QObject *obj = sender();
QString objName = obj->objectName();
[..]
}