diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-03-14 18:07:20 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-03-14 18:08:26 -0700 |
commit | c28acce93826c28f174accdbce325e21804016f8 (patch) | |
tree | 002e22ce82c1f432edc8094a8590436210eeb407 /qthelper.cpp | |
parent | 9b2c1df8e62f88118ca236ed19fbed5552d1e48b (diff) | |
download | subsurface-c28acce93826c28f174accdbce325e21804016f8.tar.gz |
Provide useful warning when we can't find an XSLT file
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.cpp')
-rw-r--r-- | qthelper.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/qthelper.cpp b/qthelper.cpp index 189d47ed3..104ed00f1 100644 --- a/qthelper.cpp +++ b/qthelper.cpp @@ -304,9 +304,12 @@ int dive_getUniqID(struct dive *d) static xmlDocPtr get_stylesheet_doc(const xmlChar *uri, xmlDictPtr, int, void *, xsltLoadType) { QFile f(QLatin1String(":/xslt/") + (const char *)uri); - if (!f.open(QIODevice::ReadOnly)) - return NULL; - + if (!f.open(QIODevice::ReadOnly)) { + if (verbose > 0) { + qDebug() << "cannot open stylesheet" << QLatin1String(":/xslt/") + (const char *)uri; + return NULL; + } + } /* Load and parse the data */ QByteArray source = f.readAll(); |