diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp index 01b8798426..696b378195 100644 --- a/apps/launcher/datafilespage.cpp +++ b/apps/launcher/datafilespage.cpp @@ -251,7 +251,7 @@ void DataFilesPage::setupConfig() } // Add a default profile - if (mProfilesComboBox->count() == 0) { + if (mProfilesComboBox->findText(QString("Default")) == -1) { mProfilesComboBox->addItem(QString("Default")); } @@ -359,6 +359,8 @@ bool DataFilesPage::setupDataFiles() ("fs-strict", boost::program_options::value()->implicit_value(true)->default_value(false)) ("encoding", boost::program_options::value()->default_value("win1252")); + //boost::program_options::notify(variables); + mCfgMgr.readConfiguration(variables, desc); // Put the paths in a boost::filesystem vector to use with Files::Collections diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp index 3ce418ddf8..674ccdf672 100644 --- a/apps/launcher/maindialog.cpp +++ b/apps/launcher/maindialog.cpp @@ -141,11 +141,11 @@ void MainDialog::createPages() connect(mPlayPage->mProfilesComboBox, SIGNAL(currentIndexChanged(int)), - this, SLOT(profileChanged(int))); + mDataFilesPage->mProfilesComboBox, SLOT(setCurrentIndex(int))); connect(mDataFilesPage->mProfilesComboBox, SIGNAL(currentIndexChanged(int)), - this, SLOT(profileChanged(int))); + mPlayPage->mProfilesComboBox, SLOT(setCurrentIndex(int))); } @@ -196,23 +196,6 @@ bool MainDialog::setup() return true; } -void MainDialog::profileChanged(int index) -{ - // Just to be sure, should always have a selection - if (!mIconWidget->selectionModel()->hasSelection()) { - return; - } - - QString currentPage = mIconWidget->currentItem()->data(Qt::DisplayRole).toString(); - if (currentPage == QLatin1String("Play")) { - mDataFilesPage->mProfilesComboBox->setCurrentIndex(index); - } - - if (currentPage == QLatin1String("Data Files")) { - mPlayPage->mProfilesComboBox->setCurrentIndex(index); - } -} - void MainDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous) { if (!current) diff --git a/apps/launcher/maindialog.hpp b/apps/launcher/maindialog.hpp index 683cd58c26..bf98011cc4 100644 --- a/apps/launcher/maindialog.hpp +++ b/apps/launcher/maindialog.hpp @@ -27,7 +27,6 @@ public: public slots: void changePage(QListWidgetItem *current, QListWidgetItem *previous); void play(); - void profileChanged(int index); bool setup(); private: