Commit 71ad41a0 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Show warning when no builds were imported

Tasknumber: QTCREATORBUG-1148
parent 9b2a6d80
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <QtGui/QHeaderView> #include <QtGui/QHeaderView>
#include <QtGui/QLabel> #include <QtGui/QLabel>
#include <QtGui/QLayout> #include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include <QtGui/QPushButton> #include <QtGui/QPushButton>
#include <QtGui/QTreeWidget> #include <QtGui/QTreeWidget>
...@@ -391,9 +392,17 @@ void TargetSetupPage::addShadowBuildLocation() ...@@ -391,9 +392,17 @@ void TargetSetupPage::addShadowBuildLocation()
if (!dir.exists() || !dir.isDir()) if (!dir.exists() || !dir.isDir())
return; return;
QList<ImportInfo> tmp = m_infos; QList<ImportInfo> tmp;
m_infos.clear(); // Clear m_infos without deleting temporary QtVersions!
tmp.append(recursivelyCheckDirectoryForBuild(dir.absoluteFilePath(), m_proFilePath)); tmp.append(recursivelyCheckDirectoryForBuild(dir.absoluteFilePath(), m_proFilePath));
if (tmp.isEmpty()) {
QMessageBox::warning(this, tr("No builds found!"),
tr("No builds for project file \"%1\" were found in directory \"%2\".",
"%1: pro-file, %2: directory that was checked.").
arg(m_proFilePath, dir.absoluteFilePath()));
return;
}
tmp.append(m_infos);
m_infos.clear(); // Clear m_infos without deleting temporary QtVersions!
setImportInfos(tmp); setImportInfos(tmp);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment