MCPcopy Create free account
hub / github.com/KDE/labplot / isValid

Method isValid

src/backend/datasources/filters/VectorBLFFilter.cpp:139–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139bool 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 ##########################

Callers 1

Calls 4

openMethod · 0.45
dataMethod · 0.45
is_openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected