Merge pull request #591 from G10h4ck/split_autologin

Made autologin optional at compile time
This commit is contained in:
csoler 2016-12-14 16:45:45 +01:00 committed by GitHub
commit 81dffbed84
10 changed files with 204 additions and 146 deletions

View file

@ -35,12 +35,17 @@ StartDialog::StartDialog(QWidget *parent)
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
#ifdef RS_AUTOLOGIN
connect(ui.autologin_checkbox, SIGNAL(clicked()), this, SLOT(notSecureWarning()));
#else
ui.autologin_checkbox->setHidden(true);
#endif
Settings->loadWidgetInformation(this);
ui.loadButton->setFocus();
connect(ui.loadButton, SIGNAL(clicked()), this, SLOT(loadPerson()));
connect(ui.autologin_checkbox, SIGNAL(clicked()), this, SLOT(notSecureWarning()));
/* get all available pgp private certificates....
* mark last one as default.
@ -115,6 +120,7 @@ bool StartDialog::requestedNewCert()
return reqNewCert;
}
#ifdef RS_AUTOLOGIN
void StartDialog::notSecureWarning()
{
/* some error msg */
@ -130,3 +136,4 @@ void StartDialog::notSecureWarning()
#endif
#endif
}
#endif // RS_AUTOLOGIN

View file

@ -40,10 +40,12 @@ protected:
private slots:
void loadPerson();
#ifdef RS_AUTOLOGIN
/**
* Warns the user that autologin is not secure
*/
void notSecureWarning();
#endif // RS_AUTOLOGIN
void on_labelProfile_linkActivated(QString link);

View file

@ -18,7 +18,16 @@
<normaloff>:/images/logo/logo_32.png</normaloff>:/images/logo/logo_32.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@ -198,6 +207,12 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string/>
</property>