Fixed #5585 (GUI: Project file -dialog lists all .cfg files as config libraries)

This commit is contained in:
Daniel Marjamäki 2014-06-14 21:17:04 +02:00
parent 5471185781
commit e3c45334d9
1 changed files with 7 additions and 0 deletions

View File

@ -60,6 +60,13 @@ ProjectFileDialog::ProjectFileDialog(const QString &path, QWidget *parent)
dir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
foreach(QFileInfo item, dir.entryInfoList()) {
QString library = item.fileName();
{
Library lib;
const QString fullfilename = sp + "/" + library;
const Library::Error err = lib.load(nullptr, fullfilename.toLatin1());
if (err.errorcode != Library::OK)
continue;
}
library.chop(4);
if (library.compare("std", Qt::CaseInsensitive) == 0)
continue;