logic: enviroment variable handling
* expanding env vars for existsens check * expand source paths in filemanager
This commit is contained in:
@@ -76,13 +76,13 @@ void QtListItemWidget::handleButtonPress()
|
||||
|
||||
QListView *l = dialog.findChild<QListView*>("listView");
|
||||
if (l)
|
||||
{
|
||||
l->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
}
|
||||
QTreeView *t = dialog.findChild<QTreeView*>();
|
||||
{
|
||||
l->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
}
|
||||
QTreeView *t = dialog.findChild<QTreeView*>();
|
||||
if (t)
|
||||
{
|
||||
t->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
t->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
}
|
||||
|
||||
if (dialog.exec())
|
||||
|
||||
@@ -98,7 +98,6 @@ void QtStartScreen::updateButtons()
|
||||
button->setProjectPath(recentProjects[i]);
|
||||
button->setFixedWidth(button->fontMetrics().width(button->text()) + 45);
|
||||
connect(button, SIGNAL(clicked()), button, SLOT(handleButtonClick()));
|
||||
//button->setGeometry(292, button->pos().y(), button->fontMetrics().width(button->text()) + 45, 40);
|
||||
if (button->projectExists())
|
||||
{
|
||||
button->setObjectName("recentButton");
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "qt/element/QtDirectoryListBox.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
#include "utility/file/FileManager.h"
|
||||
#include "utility/file/FileSystem.h"
|
||||
#include "utility/headerSearch/StandardHeaderDetection.h"
|
||||
#include "utility/utility.h"
|
||||
@@ -207,6 +208,25 @@ bool QtProjectWizzardContentPathsSource::check()
|
||||
msgBox.exec();
|
||||
return false;
|
||||
}
|
||||
QString missingPaths;
|
||||
for(FilePath f : m_list->getList())
|
||||
{
|
||||
if(!f.exists())
|
||||
{
|
||||
if(!missingPaths.isEmpty())
|
||||
{
|
||||
missingPaths.append("\n");
|
||||
}
|
||||
missingPaths.append(f.expandEnvironmentVariables().str().c_str());
|
||||
}
|
||||
if(!missingPaths.isEmpty())
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("The following paths do not exist:\n" + missingPaths );
|
||||
msgBox.exec();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user