QbsProjectManager: Reduce calls to mime database.

Qbs already has some definite information about file types.

Change-Id: I024feeae3e6df5ec5462924ffedc7332e585f6b7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Christian Kandeler
2016-02-22 15:47:39 +01:00
parent af16e87608
commit 537125155d
3 changed files with 49 additions and 12 deletions

View File

@@ -31,6 +31,8 @@
#include "projectinfo.h"
#include "projectpart.h"
#include <functional>
namespace ProjectExplorer {
class ToolChain;
}
@@ -53,7 +55,10 @@ public:
void setDisplayName(const QString &displayName);
void setConfigFileName(const QString &configFileName);
QList<Core::Id> createProjectPartsForFiles(const QStringList &files);
using FileClassifier = std::function<ProjectFile::Kind (const QString &filePath)>;
QList<Core::Id> createProjectPartsForFiles(const QStringList &files,
FileClassifier fileClassifier = FileClassifier());
static void evaluateProjectPartToolchain(ProjectPart *projectPart,
const ProjectExplorer::ToolChain *toolChain,