"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/plugins/projectexplorer/projectwindow.cpp" between
qt-creator-opensource-src-4.15.0.tar.xz and qt-creator-opensource-src-4.15.1.tar.xz

About: Qt Creator is a cross-platform, complete IDE (integrated development environment) tailored to the needs of Qt developers.

projectwindow.cpp  (qt-creator-opensource-src-4.15.0.tar.xz):projectwindow.cpp  (qt-creator-opensource-src-4.15.1.tar.xz)
skipping to change at line 622 skipping to change at line 622
} }
} }
if (lastTarget && lastBc) { if (lastTarget && lastBc) {
SessionManager::setActiveBuildConfiguration(lastTarget, lastBc, SetA ctive::Cascade); SessionManager::setActiveBuildConfiguration(lastTarget, lastBc, SetA ctive::Cascade);
SessionManager::setActiveTarget(project, lastTarget, SetActive::Casc ade); SessionManager::setActiveTarget(project, lastTarget, SetActive::Casc ade);
} }
} }
void setPanel(QWidget *panel) void setPanel(QWidget *panel)
{ {
q->savePersistentSettings();
if (QWidget *widget = q->centralWidget()) { if (QWidget *widget = q->centralWidget()) {
q->takeCentralWidget(); q->takeCentralWidget();
widget->hide(); // Don't delete. widget->hide(); // Don't delete.
} }
if (panel) { if (panel) {
q->setCentralWidget(panel); q->setCentralWidget(panel);
panel->show(); panel->show();
if (q->hasFocus()) // we get assigned focus from setFocusToCurrentMo de, pass that on if (q->hasFocus()) // we get assigned focus from setFocusToCurrentMo de, pass that on
panel->setFocus(); panel->setFocus();
} }
q->loadPersistentSettings();
} }
ProjectWindow *q; ProjectWindow *q;
ProjectsModel m_projectsModel; ProjectsModel m_projectsModel;
ComboBoxModel m_comboBoxModel; ComboBoxModel m_comboBoxModel;
SelectorDelegate m_selectorDelegate; SelectorDelegate m_selectorDelegate;
QComboBox *m_projectSelection; QComboBox *m_projectSelection;
SelectorTree *m_selectorTree; SelectorTree *m_selectorTree;
QPushButton *m_importBuild; QPushButton *m_importBuild;
QPushButton *m_manageKits; QPushButton *m_manageKits;
skipping to change at line 672 skipping to change at line 674
void ProjectWindow::hideEvent(QHideEvent *event) void ProjectWindow::hideEvent(QHideEvent *event)
{ {
savePersistentSettings(); savePersistentSettings();
FancyMainWindow::hideEvent(event); FancyMainWindow::hideEvent(event);
} }
void ProjectWindow::showEvent(QShowEvent *event) void ProjectWindow::showEvent(QShowEvent *event)
{ {
FancyMainWindow::showEvent(event); FancyMainWindow::showEvent(event);
loadPersistentSettings();
// Delay appears to be necessary for the target setup page to have the corre
ct layout.
QTimer::singleShot(0, this, &ProjectWindow::loadPersistentSettings);
} }
ProjectWindow::~ProjectWindow() = default; ProjectWindow::~ProjectWindow() = default;
const char PROJECT_WINDOW_KEY[] = "ProjectExplorer.ProjectWindow"; const char PROJECT_WINDOW_KEY[] = "ProjectExplorer.ProjectWindow";
void ProjectWindow::savePersistentSettings() const void ProjectWindow::savePersistentSettings() const
{ {
if (!centralWidget())
return;
QSettings * const settings = ICore::settings(); QSettings * const settings = ICore::settings();
settings->beginGroup(PROJECT_WINDOW_KEY); settings->beginGroup(PROJECT_WINDOW_KEY);
saveSettings(settings); saveSettings(settings);
settings->endGroup(); settings->endGroup();
} }
void ProjectWindow::loadPersistentSettings() void ProjectWindow::loadPersistentSettings()
{ {
if (!centralWidget())
return;
QSettings * const settings = ICore::settings(); QSettings * const settings = ICore::settings();
settings->beginGroup(PROJECT_WINDOW_KEY); settings->beginGroup(PROJECT_WINDOW_KEY);
restoreSettings(settings); restoreSettings(settings);
settings->endGroup(); settings->endGroup();
} }
QSize SelectorDelegate::sizeHint(const QStyleOptionViewItem &option, const QMode lIndex &index) const QSize SelectorDelegate::sizeHint(const QStyleOptionViewItem &option, const QMode lIndex &index) const
{ {
QSize s = QStyledItemDelegate::sizeHint(option, index); QSize s = QStyledItemDelegate::sizeHint(option, index);
auto model = static_cast<const ProjectsModel *>(index.model()); auto model = static_cast<const ProjectsModel *>(index.model());
 End of changes. 5 change blocks. 
4 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)