Changeset View
Changeset View
Standalone View
Standalone View
plugins/appwizard/appwizardplugin.cpp
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Line(s) | 87 | { | |||
---|---|---|---|---|---|
93 | { | 93 | { | ||
94 | QString project = createProject( dlg.appInfo() ); | 94 | QString project = createProject( dlg.appInfo() ); | ||
95 | if (!project.isEmpty()) | 95 | if (!project.isEmpty()) | ||
96 | { | 96 | { | ||
97 | core()->projectController()->openProject(QUrl::fromLocalFile(project)); | 97 | core()->projectController()->openProject(QUrl::fromLocalFile(project)); | ||
98 | 98 | | |||
99 | KConfig templateConfig(dlg.appInfo().appTemplate); | 99 | KConfig templateConfig(dlg.appInfo().appTemplate); | ||
100 | KConfigGroup general(&templateConfig, "General"); | 100 | KConfigGroup general(&templateConfig, "General"); | ||
101 | QString file = general.readEntry("ShowFilesAfterGeneration"); | 101 | const QStringList fileArgs = general.readEntry("ShowFilesAfterGeneration").split(QLatin1Char(','), QString::SkipEmptyParts); | ||
102 | if (!file.isEmpty()) | 102 | for (const auto& fileArg : fileArgs) { | ||
103 | { | 103 | QString file = KMacroExpander::expandMacros(fileArg.trimmed(), m_variables); | ||
104 | file = KMacroExpander::expandMacros(file, m_variables); | 104 | if (QDir::isRelativePath(file)) { | ||
105 | file = m_variables[QStringLiteral("PROJECTDIR")] + QLatin1Char('/') + file; | ||||
106 | } | ||||
105 | core()->documentController()->openDocument(QUrl::fromUserInput(file)); | 107 | core()->documentController()->openDocument(QUrl::fromUserInput(file)); | ||
106 | } | 108 | } | ||
107 | } else { | 109 | } else { | ||
108 | KMessageBox::error( ICore::self()->uiController()->activeMainWindow(), i18n("Could not create project from template\n"), i18n("Failed to create project") ); | 110 | KMessageBox::error( ICore::self()->uiController()->activeMainWindow(), i18n("Could not create project from template\n"), i18n("Failed to create project") ); | ||
109 | } | 111 | } | ||
110 | } | 112 | } | ||
111 | } | 113 | } | ||
112 | 114 | | |||
▲ Show 20 Lines • Show All 403 Lines • Show Last 20 Lines |