Utils: Initialize all members of ShellCommandPage

Change-Id: I6f6d06f4e6be8b6a8c3b5f7c4b2072660b099699
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tim Jenssen
2016-12-05 20:01:41 +01:00
parent c163240611
commit f061c8a53a
3 changed files with 6 additions and 8 deletions

View File

@@ -48,9 +48,7 @@ namespace Utils {
ShellCommandPage::ShellCommandPage(QWidget *parent) : ShellCommandPage::ShellCommandPage(QWidget *parent) :
WizardPage(parent), WizardPage(parent),
m_startedStatus(tr("Command started...")), m_startedStatus(tr("Command started..."))
m_overwriteOutput(false),
m_state(Idle)
{ {
resize(264, 200); resize(264, 200);
auto verticalLayout = new QVBoxLayout(this); auto verticalLayout = new QVBoxLayout(this);

View File

@@ -68,11 +68,11 @@ private:
OutputFormatter *m_formatter; OutputFormatter *m_formatter;
QLabel *m_statusLabel; QLabel *m_statusLabel;
ShellCommand *m_command; ShellCommand *m_command = nullptr;
QString m_startedStatus; QString m_startedStatus;
bool m_overwriteOutput; bool m_overwriteOutput = false;
State m_state; State m_state = Idle;
}; };
} // namespace Utils } // namespace Utils

View File

@@ -117,7 +117,7 @@ void JsonKitsPage::setupProjectFiles(const JsonWizard::GeneratorFiles &files)
continue; continue;
auto manager = Utils::findOrDefault(managerList, Utils::equal(&IProjectManager::mimeType, mt.name())); auto manager = Utils::findOrDefault(managerList, Utils::equal(&IProjectManager::mimeType, mt.name()));
project = manager ? manager->openProject(path, &errorMessage) : 0; project = manager ? manager->openProject(path, &errorMessage) : nullptr;
if (project) { if (project) {
if (setupProject(project)) if (setupProject(project))
project->saveSettings(); project->saveSettings();