ProjectManager: Make Open Project dialog open in default folder

Move open project dialog handling into ProjectExplorer and make it
use its list of project file patterns. Same in Checkout wizards.

Task-number: QTCREATORBUG-1759
Reviewed-by: dt
This commit is contained in:
Friedemann Kleint
2010-06-28 14:34:30 +02:00
parent eaf8d2692e
commit a945f8b5fd
8 changed files with 43 additions and 21 deletions

View File

@@ -128,9 +128,7 @@ static inline QString msgNoProjectFiles(const QDir &dir, const QStringList &patt
// Try to find the project files in a project directory with some smartness
static QFileInfoList findProjectFiles(const QDir &projectDir, QString *errorMessage)
{
// Hardcoded: Find *.pro/Cmakefiles
QStringList projectFilePatterns;
projectFilePatterns << QLatin1String("*.pro") << QLatin1String("CMakeLists.txt");
const QStringList projectFilePatterns = ProjectExplorer::ProjectExplorerPlugin::projectFilePatterns();
// Project directory
QFileInfoList projectFiles = projectDir.entryInfoList(projectFilePatterns, QDir::Files|QDir::NoDotAndDotDot|QDir::Readable);
if (!projectFiles.empty())