| 137 | } |
| 138 | |
| 139 | bool VectorBLFFilter::isValid(const QString& filename) { |
| 140 | #ifdef HAVE_VECTOR_BLF |
| 141 | try { |
| 142 | Vector::BLF::File f; |
| 143 | f.open(filename.toLocal8Bit().data()); |
| 144 | if (!f.is_open()) |
| 145 | return false; // No file |
| 146 | f.close(); |
| 147 | return true; |
| 148 | } catch (const Vector::BLF::Exception& e) { |
| 149 | return false; // Signature was invalid or something else |
| 150 | } |
| 151 | #else |
| 152 | Q_UNUSED(filename) |
| 153 | #endif |
| 154 | return false; |
| 155 | } |
| 156 | |
| 157 | // ##################################################################### |
| 158 | // ################### Private implementation ########################## |
no test coverage detected