Implement the New Project creation wizard for QDS

Task-number: QDS-4490
Change-Id: Ie8073e8838ec14a7f11ad972acc6fca4456adf58
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Samuel Ghinet
2021-11-09 18:58:15 +02:00
parent e7d682e1b0
commit a850b1b866
44 changed files with 3164 additions and 9 deletions

View File

@@ -102,6 +102,14 @@ namespace Internal {
enum { debugMainWindow = 0 };
static bool isQtDesignStudio()
{
QSettings *settings = Core::ICore::settings();
const QString qdsStandaloneEntry = "QML/Designer/StandAloneMode"; //entry from qml settings
return settings->value(qdsStandaloneEntry, false).toBool();
}
MainWindow::MainWindow()
: AppMainWindow()
, m_coreImpl(new ICore(this))
@@ -519,7 +527,8 @@ void MainWindow::registerDefaultActions()
// New File Action
QIcon icon = QIcon::fromTheme(QLatin1String("document-new"), Utils::Icons::NEWFILE.icon());
m_newAction = new QAction(icon, tr("&New File or Project..."), this);
QString newActionText = isQtDesignStudio() ? tr("&New Project...") : tr("&New File or Project...");
m_newAction = new QAction(icon, newActionText, this);
cmd = ActionManager::registerAction(m_newAction, Constants::NEW);
cmd->setDefaultKeySequence(QKeySequence::New);
mfile->addAction(cmd, Constants::G_FILE_NEW);