From b4c0c8f9212467fde37635e9ae2f5bf9aa6b92bc Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 12 Mar 2016 21:58:05 +0100 Subject: [PATCH] Changed: Use CServersModel --- .../client/ryzom_installer/src/profilesdialog.cpp | 12 ++++++------ .../client/ryzom_installer/src/profilesdialog.h | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp index a37180fb7..9632c69fe 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp @@ -17,6 +17,7 @@ #include "stdpch.h" #include "profilesdialog.h" #include "profilesmodel.h" +#include "serversmodel.h" #ifdef DEBUG_NEW #define new DEBUG_NEW @@ -32,16 +33,15 @@ CProfilesDialog::CProfilesDialog():QDialog(), m_currentProfileIndex(-1) connect(executableBrowseButton, SIGNAL(clicked()), SLOT(onExecutableBrowseClicked())); m_model = new CProfilesModel(this); + m_serversModel = new CServersModel(this); profilesListView->setModel(m_model); + serverComboBox->setModel(m_serversModel); - QStringList servers; - servers << "Atys"; - servers << "Yubo"; + int index = m_model->getIndexFromProfileID(CConfigFile::getInstance()->getDefaultProfile()); - QStringListModel *serversModel = new QStringListModel(servers, this); - - serverComboBox->setModel(serversModel); + profilesListView->setCurrentIndex(m_model->index(index, 0)); + displayProfile(index); } CProfilesDialog::~CProfilesDialog() diff --git a/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.h b/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.h index d4425d062..78fe14bbc 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.h +++ b/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.h @@ -20,6 +20,7 @@ #include "ui_profiles.h" class CProfilesModel; +class CServersModel; /** * Dialog displayed when editing existing profiles. @@ -51,6 +52,7 @@ private slots: private: CProfilesModel *m_model; + CServersModel *m_serversModel; int m_currentProfileIndex; };