From: Konrad Rosenbaum Date: Sun, 7 Aug 2016 19:55:09 +0000 (+0200) Subject: fix preselection of default profile X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=0c59b1d73fbf2f0a5eb25a2c73268862c688d8e0;p=web%2Fkonrad%2Fsmoke.git fix preselection of default profile --- diff --git a/sessman/login.cpp b/sessman/login.cpp index be42348..6c22591 100644 --- a/sessman/login.cpp +++ b/sessman/login.cpp @@ -94,12 +94,17 @@ MLogin::MLogin(MSessionManager*sm) void MLogin::initProfiles() { QSettings set; + int defpronum=-1; + const QString defpro=set.value("defaultprofile").toString(); set.beginGroup("profiles"); QStringList prf=set.childGroups(); profiles->clear(); for(int i=0;iaddItem(set.value(prf[i]+"/name").toString(),prf[i]); } + if(defpronum>=0) + profiles->setCurrentIndex(defpronum); } void MLogin::loadProfile()