forked from qt-creator/qt-creator
JsonProjectPage: Pick right directory
Pick the correct directory when the wizard is started via the context menu of an project node. Change-Id: Ib2ebba5f796381217673c9030a7b279b6d764a59 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
#include <coreplugin/documentmanager.h>
|
#include <coreplugin/documentmanager.h>
|
||||||
|
|
||||||
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
@@ -43,12 +45,9 @@ JsonProjectPage::JsonProjectPage(QWidget *parent) :
|
|||||||
|
|
||||||
void JsonProjectPage::initializePage()
|
void JsonProjectPage::initializePage()
|
||||||
{
|
{
|
||||||
if (Core::DocumentManager::useProjectsDirectory()) {
|
JsonWizard *wiz = qobject_cast<JsonWizard *>(wizard());
|
||||||
setPath(Core::DocumentManager::projectsDirectory());
|
QTC_ASSERT(wiz, return);
|
||||||
} else {
|
setPath(wiz->value(QLatin1String("InitialPath")).toString());
|
||||||
if (JsonWizard *wiz = qobject_cast<JsonWizard *>(wizard()))
|
|
||||||
setPath(wiz->value(QLatin1String("InitialPath")).toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
setProjectName(uniqueProjectName(path()));
|
setProjectName(uniqueProjectName(path()));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user