mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Provide useful warning when we can't find an XSLT file
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9b2c1df8e6
commit
c28acce938
1 changed files with 6 additions and 3 deletions
|
@ -304,9 +304,12 @@ int dive_getUniqID(struct dive *d)
|
||||||
static xmlDocPtr get_stylesheet_doc(const xmlChar *uri, xmlDictPtr, int, void *, xsltLoadType)
|
static xmlDocPtr get_stylesheet_doc(const xmlChar *uri, xmlDictPtr, int, void *, xsltLoadType)
|
||||||
{
|
{
|
||||||
QFile f(QLatin1String(":/xslt/") + (const char *)uri);
|
QFile f(QLatin1String(":/xslt/") + (const char *)uri);
|
||||||
if (!f.open(QIODevice::ReadOnly))
|
if (!f.open(QIODevice::ReadOnly)) {
|
||||||
return NULL;
|
if (verbose > 0) {
|
||||||
|
qDebug() << "cannot open stylesheet" << QLatin1String(":/xslt/") + (const char *)uri;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
/* Load and parse the data */
|
/* Load and parse the data */
|
||||||
QByteArray source = f.readAll();
|
QByteArray source = f.readAll();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue