Commit 498ce988 authored by Jan Möbius's avatar Jan Möbius

Fixed problem loading files with multiple dots in their filename

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10696 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 8d718324
......@@ -202,13 +202,17 @@ int Core::loadObject ( QString _filename ) {
} else {
QFileInfo fi(_filename);
for (int i=0; i < (int)supportedTypes_.size(); i++){
QString filters = supportedTypes_[i].plugin->getLoadFilters();
//check extension
if ( ! filters.contains( "*." + fi.completeSuffix() , Qt::CaseInsensitive) )
continue;
if ( ! filters.contains( "*." + fi.suffix() , Qt::CaseInsensitive) ) {
continue;
} else {
emit log(LOGWARN,"Found supported datatype but only the suffix is matched not the complete suffix!");
}
if ( OpenFlipper::Options::gui() ) {
coreWidget_->statusMessage( tr("Loading %1 ... ").arg(_filename));
......@@ -252,7 +256,7 @@ int Core::loadObject( DataType _type, QString _filename) {
/** \todo this function has to be checked. test for the plugin which can handle
the given file and then use it.
*/
if (_type == DATA_UNKNOWN)
return loadObject(_filename);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment