I will try that approach.
But the code that does each are almost identical:
From BookBrowser:
Code:
void BookBrowser::ValidateStylesheetWithW3C()
{
QList <Resource *> resources = ValidSelectedResources(Resource::CSSResourceType);
foreach(Resource * resource, resources) {
CSSResource *css_resource = qobject_cast<CSSResource *>(resource);
Q_ASSERT(css_resource);
css_resource->ValidateStylesheetWithW3C();
}
}
And from MainWindow
Code:
bool MainWindow::ValidateStylesheetsWithW3C()
{
SaveTabData();
QList<Resource *> css_resources = m_BookBrowser->AllCSSResources();
if (css_resources.isEmpty()) {
ShowMessageOnStatusBar(tr("This EPUB does not contain any CSS stylesheets to validate."));
return true;
}
foreach(Resource * resource, css_resources) {
CSSResource *css_resource = qobject_cast<CSSResource *>(resource);
css_resource->ValidateStylesheetWithW3C();
}
return true;
}
So I realy can not see why one would work and the other one not.
I tried this on MacOS and it worked properly all the time, both ways.
When I get a chance I will try it on Linux and report back.