Fixed #5585 (GUI: Project file -dialog lists all .cfg files as config libraries)
This commit is contained in:
parent
5471185781
commit
e3c45334d9
|
@ -60,6 +60,13 @@ ProjectFileDialog::ProjectFileDialog(const QString &path, QWidget *parent)
|
||||||
dir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
|
dir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
|
||||||
foreach(QFileInfo item, dir.entryInfoList()) {
|
foreach(QFileInfo item, dir.entryInfoList()) {
|
||||||
QString library = item.fileName();
|
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);
|
library.chop(4);
|
||||||
if (library.compare("std", Qt::CaseInsensitive) == 0)
|
if (library.compare("std", Qt::CaseInsensitive) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue