GUI: handle 'cancel' in open dialog
This commit is contained in:
parent
ca2f59a6d4
commit
f316e0d572
|
@ -190,9 +190,10 @@ void ProjectFileDialog::BrowseImportProject()
|
||||||
const QFileInfo inf(mFilePath);
|
const QFileInfo inf(mFilePath);
|
||||||
const QDir &dir = inf.absoluteDir();
|
const QDir &dir = inf.absoluteDir();
|
||||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Import Project"),
|
QString fileName = QFileDialog::getOpenFileName(this, tr("Import Project"),
|
||||||
dir.canonicalPath(),
|
dir.canonicalPath(),
|
||||||
tr("Visual Studio (*.sln *.vcxproj);;Compile database (compile_database.json)"));
|
tr("Visual Studio (*.sln *.vcxproj);;Compile database (compile_database.json)"));
|
||||||
mUI.mEditImportProject->setText(dir.relativeFilePath(fileName));
|
if (!fileName.isEmpty())
|
||||||
|
mUI.mEditImportProject->setText(dir.relativeFilePath(fileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectFileDialog::AddIncludeDir(const QString &dir)
|
void ProjectFileDialog::AddIncludeDir(const QString &dir)
|
||||||
|
|
Loading…
Reference in New Issue