I created a readable plain text file, selected it as template, but still the else branch is hit here:
|
QFile templateFile(templateFileName); |
|
#ifdef KTIKZ_USE_KDE |
|
KFileItem templateFileItem(QUrl::fromLocalFile(templateFileName)); |
|
if (templateFileItem.determineMimeType().parentMimeTypes().contains(QLatin1String("text/plain")) |
|
#else |
|
if (QFileInfo(templateFile).isFile() |
|
#endif |
|
&& templateFile.open(QIODevice::ReadOnly | QIODevice::Text) // if user-specified template file is readable |
|
&& !tikzReplaceText.isEmpty()) |
|
{ |
If I output the mime list, I get just ("application/octet-stream"), while I also get
$ file --mime-type Dev/TeX/ktikz-context.pgs
Dev/TeX/ktikz-context.pgs: text/plain
I assume if the file itself has the text/plain mime already, its parents only contain application/octet-stream.
I created a readable plain text file, selected it as template, but still the else branch is hit here:
ktikz/common/tikzpreviewgenerator.cpp
Lines 459 to 468 in 207af3e
If I output the mime list, I get just
("application/octet-stream"), while I also getI assume if the file itself has the
text/plainmime already, its parents only containapplication/octet-stream.