-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119973/#review65432
-----------------------------------------------------------



kded/secretagent.cpp
<https://git.reviewboard.kde.org/r/119973/#comment45714>

    You can improve this by creating a temporary const variable with the 
correct secret flag to use. That way you do not need this if clause and the if 
clause some lines below. Something like:
    
    // Reset flags, we can't...
    NEtworkManager::Setting::SecretFlags secretFlags; = walletEnabled ? 
N::S::AgentOwned : N::S::None;
    ...
    foreach (...)
        if (key.endsWith(QLatin1String("-flags))) {
            vpnData.insert(key, QString::number((int)secretFlags));
        }
    }



kded/secretagent.cpp
<https://git.reviewboard.kde.org/r/119973/#comment45713>

    I prefer to use iterators here to avoid creating a temporary QList:
    
    QMap<QString, QString>::const_iterator it = secrets.begin();
    QMap<QString, QString>::const_iterator end = secrets.end();
    for (; it != end; ++it) {
    tmpSetting.insert(it.key(), it.value();
    }


- Lamarque Souza


On Aug. 28, 2014, 12:25 p.m., Jan Grulich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119973/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2014, 12:25 p.m.)
> 
> 
> Review request for Network Management and Lamarque Souza.
> 
> 
> Repository: plasma-nm
> 
> 
> Description
> -------
> 
> In the new release of plasma-nm we dropped support for plaintext files and 
> the only option where to store secrets with our secret agent is now KWallet, 
> but with dropping it, we kinda broke it for users who have secrets stored in 
> plaintext file. I wrote a patch which should re-save/migrate secrets stored 
> in plaintext files and save them either to KWallet (if enabled) or directly 
> to NetworkManager.
> 
> 
> Diffs
> -----
> 
>   kded/secretagent.h e821f59 
>   kded/secretagent.cpp 26f8faa 
> 
> Diff: https://git.reviewboard.kde.org/r/119973/diff/
> 
> 
> Testing
> -------
> 
> I tried to create a file with secrets (for vpn, wifi, gsm) manually and they 
> were successfuly transfered to KWallet.
> 
> 
> Thanks,
> 
> Jan Grulich
> 
>

_______________________________________________
kde-networkmanager mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-networkmanager

Reply via email to