mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-09 20:50:43 +00:00
Skip login screen take #2
This commit is contained in:
parent
16cb50cbb2
commit
9094888227
11
main.cpp
11
main.cpp
@ -96,7 +96,8 @@ int main(int argc, char *argv[])
|
||||
ResmedLoader::Register();
|
||||
Profiles::Scan();
|
||||
PREF["AppName"]="SleepyHead";
|
||||
bool skip_login=(!PREF.ExistsAndTrue("SkipLoginScreen")) || force_login_screen;
|
||||
bool skip_login=(PREF.ExistsAndTrue("SkipLoginScreen"));
|
||||
if (force_login_screen) skip_login=false;
|
||||
|
||||
QString Version=QString("%1.%2.%3").arg(major_version).arg(minor_version).arg(revision_number);
|
||||
|
||||
@ -139,11 +140,15 @@ int main(int argc, char *argv[])
|
||||
check_updates=false;
|
||||
}
|
||||
}
|
||||
ProfileSelect profsel(0);
|
||||
if (skip_login) {
|
||||
profsel.QuickLogin();
|
||||
if (profsel.result()==ProfileSelect::Rejected) {
|
||||
exit(1);
|
||||
}
|
||||
p_profile=Profiles::Get(PREF["Profile"].toString());
|
||||
} else p_profile=NULL;
|
||||
if (p_profile) {
|
||||
ProfileSelect profsel(0);
|
||||
if (!p_profile) {
|
||||
if (profsel.exec()==ProfileSelect::Rejected) {
|
||||
exit(1);
|
||||
}
|
||||
|
@ -159,6 +159,10 @@ void ProfileSelect::deleteProfile()
|
||||
}
|
||||
}
|
||||
}
|
||||
void ProfileSelect::QuickLogin()
|
||||
{
|
||||
on_listView_activated(ui->listView->currentIndex());
|
||||
}
|
||||
|
||||
void ProfileSelect::on_selectButton_clicked()
|
||||
{
|
||||
|
@ -18,6 +18,7 @@ public:
|
||||
~ProfileSelect();
|
||||
|
||||
QString selectedProfile();
|
||||
void QuickLogin();
|
||||
private slots:
|
||||
void on_selectButton_clicked();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user