D27764: Update L2TP to NetworkManager-l2tp 1.8.0 features

Jan Grulich noreply at phabricator.kde.org
Mon Mar 2 15:11:35 GMT 2020


jgrulich accepted this revision.
jgrulich added a comment.
This revision is now accepted and ready to land.


  Only nitpicking, otherwise it looks good to me.

INLINE COMMENTS

> l2tpauth.cpp:34
> +#include "nm-l2tp-service.h"
> +#include "debug.h"
> +

This include doesn't seem to be used.

> l2tpipsecwidget.cpp:127
> +        if (!dataMap[NM_L2TP_KEY_IPSEC_IKELIFETIME].isEmpty()) {
> +            int totalSeconds = dataMap[NM_L2TP_KEY_IPSEC_IKELIFETIME].toInt();
> +            int hours = totalSeconds / 3600;

const? Same for variables below.

> l2tpipsecwidget.cpp:133
> +
> +	    m_ui->ikelifetime->setTime(lifetime);
> +            m_ui->ikelifetime->setEnabled(true);

Missing indentation.

> l2tpipsecwidget.cpp:143
> +        if (!dataMap[NM_L2TP_KEY_IPSEC_SALIFETIME].isEmpty()) {
> +            int totalSeconds = dataMap[NM_L2TP_KEY_IPSEC_SALIFETIME].toInt();
> +            int hours = totalSeconds / 3600;

const? Same for variables below.

> l2tpipsecwidget.cpp:170
> +            if (dataMap[NM_L2TP_KEY_IPSEC_PFS] == noString ) {
> +                m_ui->cbPFS->setChecked(true);
> +            } else {

This can be simplified using:

  m_ui->cbIPComp->setChecked(dataMap[NM_L2TP_KEY_IPSEC_IPCOMP] == yesString)

Same above.

> l2tpipsecwidget.cpp:259
> +        if (m_ui->cbIkelifetime->isChecked()) {
> +            int totalSeconds = m_ui->ikelifetime->time().hour() * 3600 + m_ui->ikelifetime->time().minute() * 60 + m_ui->ikelifetime->time().second();
> +

const?

> l2tpipsecwidget.cpp:265
> +        if (m_ui->cbSalifetime->isChecked()) {
> +            int totalSeconds = m_ui->salifetime->time().hour() * 3600 + m_ui->salifetime->time().minute() * 60 + m_ui->salifetime->time().second();
> +            result.insert(NM_L2TP_KEY_IPSEC_SALIFETIME, QString::number(totalSeconds));

const?

> l2tpipsecwidget.cpp:304
> +    requesters << m_ui->machineCA << m_ui->machineCert << m_ui->machineKey;
> +    bool isP12 = url.toString().endsWith(QLatin1String(".p12"));
> +

const?

> l2tppppwidget.cpp:60
> +        // Authentication options
> +        bool refuse_pap = (dataMap[NM_L2TP_KEY_REFUSE_PAP] == yesString);
> +        bool refuse_chap = (dataMap[NM_L2TP_KEY_REFUSE_CHAP] == yesString);

const? Same for variables below.

REPOSITORY
  R116 Plasma Network Management Applet

REVISION DETAIL
  https://phabricator.kde.org/D27764

To: dkosovic, jgrulich
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200302/0c2ddf01/attachment-0001.html>


More information about the Plasma-devel mailing list