[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    D14050: Fwupd Backend For Review and Improvement
From:       Aleix Pol Gonzalez <noreply () phabricator ! kde ! org>
Date:       2018-07-29 23:54:45
Message-ID: 01bbc8443cd0bd500b13d3488fa846f3 () localhost ! localdomain
[Download RAW message or body]

[Attachment #2 (text/plain)]

apol added a comment.


  Please, do some review yourself, you should be able to see most of these things \
yourself

INLINE COMMENTS

> FwupdSourcesBackend.cpp:151
> +{
> +    return  m_actions ;
> +}

`return {}` and remove the unused attribute.

> FwupdSourcesBackend.h:46
> +    bool supportsAdding() const override { return false; }
> +    void eulaRequired(const QString& remoteName , const QString& \
> licenseAgreement); +    void populateSources();

There's no space before a coma.

> FwupdSourcesBackend.h:54
> +    FwupdSourcesModel* m_sources;
> +    QList<QAction*> m_actions;
> +};

Remove.

> FwupdTransaction.cpp:99
> +        QNetworkAccessManager *manager = new QNetworkAccessManager(this);
> +        connect(manager, SIGNAL(finished(QNetworkReply*)),this, \
> SLOT(fwupdInstall(QNetworkReply*))); +        manager->get(QNetworkRequest(uri));

Use proper connect syntax.

> FwupdTransaction.cpp:160
> +
> +void FwupdTransaction::iterateTransaction()
> +{

Give it a name that says what it does, this is just copied from the dummy and thus it \
has a meaningless name.

REPOSITORY
  R134 Discover Software Store

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

To: abhijeet2096, apol, davidedmundson
Cc: zzag, anthonyfieroni, plasma-devel, ragreen, ixoos, Pitel, ZrenBot, lesliezhai, \
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


[Attachment #3 (text/html)]

<table><tr><td style="">apol added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D14050">View Revision</a></tr></table><br \
/><div><div><p>Please, do some review yourself, you should be able to see most of \
these things yourself</p></div></div><br /><div><strong>INLINE \
COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px \
solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; \
border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div \
style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a \
style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D14050#inline-76298">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">FwupdSourcesBackend.cpp:151</span></div> \
<div style="font: 11px/15px &quot;Menlo&quot;, &quot;Consolas&quot;, \
&quot;Monaco&quot;, monospace; white-space: pre-wrap; clear: both; padding: 4px 0; \
margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, \
151, .6);"><span class="p">{</span> </div><div style="padding: 0 8px; margin: 0 4px; \
background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">return</span>  \
<span class="n">m_actions</span> <span class="p">;</span> </div><div style="padding: \
0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">}</span> \
</div></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; \
margin: 8px;"><tt style="background: #ebebeb; font-size: 13px;">return {}</tt> and \
remove the unused attribute.</p></div></div><br /><div style="border: 1px solid \
#C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; \
border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div \
style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a \
style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D14050#inline-76300">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">FwupdSourcesBackend.h:46</span></div> <div \
style="font: 11px/15px &quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, \
monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span \
style="color: #aa4000">bool</span> <span style="color: \
#004012">supportsAdding</span><span class="p">()</span> <span style="color: \
#aa4000">const</span> <span class="n">override</span> <span class="p">{</span> <span \
style="color: #aa4000">return</span> <span style="color: #304a96">false</span><span \
class="p">;</span> <span class="p">}</span> </div><div style="padding: 0 8px; margin: \
0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: \
#aa4000">void</span> <span style="color: #004012">eulaRequired</span><span \
class="p">(</span><span style="color: #aa4000">const</span> <span \
class="n">QString</span><span style="color: #aa2211">&amp;</span> <span \
class="n">remoteName</span> <span class="p">,</span> <span style="color: \
#aa4000">const</span> <span class="n">QString</span><span style="color: \
#aa2211">&amp;</span> <span class="n">licenseAgreement</span><span \
class="p">);</span> </div><div style="padding: 0 8px; margin: 0 4px; background: \
rgba(151, 234, 151, .6);">    <span style="color: #aa4000">void</span> <span \
style="color: #004012">populateSources</span><span class="p">();</span> \
</div></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; \
margin: 8px;">There&#039;s no space before a coma.</p></div></div><br /><div \
style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; \
background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 \
1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; \
overflow: hidden;"><a style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D14050#inline-76301">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">FwupdSourcesBackend.h:54</span></div> <div \
style="font: 11px/15px &quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, \
monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span \
class="n">FwupdSourcesModel</span><span style="color: #aa2211">*</span> <span \
class="n">m_sources</span><span class="p">;</span> </div><div style="padding: 0 8px; \
margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span \
class="n">QList</span><span style="color: #aa2211">&lt;</span><span \
class="n">QAction</span><span style="color: #aa2211">*&gt;</span> <span \
class="n">m_actions</span><span class="p">;</span> </div><div style="padding: 0 8px; \
margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">};</span> \
</div></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; \
margin: 8px;">Remove.</p></div></div><br /><div style="border: 1px solid #C7CCD9; \
border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: \
#e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: \
#74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: \
right; text-decoration: none;" \
href="https://phabricator.kde.org/D14050#inline-76302">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">FwupdTransaction.cpp:99</span></div> <div \
style="font: 11px/15px &quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, \
monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        \
<span class="n">QNetworkAccessManager</span> <span style="color: \
#aa2211">*</span><span class="n">manager</span> <span style="color: #aa2211">=</span> \
<span style="color: #aa4000">new</span> <span \
class="n">QNetworkAccessManager</span><span class="p">(</span><span style="color: \
#aa4000">this</span><span class="p">);</span> </div><div style="padding: 0 8px; \
margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span \
class="n">connect</span><span class="p">(</span><span class="n">manager</span><span \
class="p">,</span> <span class="n">SIGNAL</span><span class="p">(</span><span \
class="n">finished</span><span class="p">(</span><span \
class="n">QNetworkReply</span><span style="color: #aa2211">*</span><span \
class="p">)),</span><span style="color: #aa4000">this</span><span class="p">,</span> \
<span class="n">SLOT</span><span class="p">(</span><span \
class="n">fwupdInstall</span><span class="p">(</span><span \
class="n">QNetworkReply</span><span style="color: #aa2211">*</span><span \
class="p">)));</span> </div><div style="padding: 0 8px; margin: 0 4px; background: \
rgba(151, 234, 151, .6);">        <span class="n">manager</span><span style="color: \
#aa2211">-&gt;</span><span class="n">get</span><span class="p">(</span><span \
class="n">QNetworkRequest</span><span class="p">(</span><span \
class="n">uri</span><span class="p">));</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Use \
proper connect syntax.</p></div></div><br /><div style="border: 1px solid #C7CCD9; \
border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: \
#e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: \
#74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: \
right; text-decoration: none;" \
href="https://phabricator.kde.org/D14050#inline-76299">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">FwupdTransaction.cpp:160</span></div> <div \
style="font: 11px/15px &quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, \
monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span \
style="color: #aa4000">void</span> <span class="n">FwupdTransaction</span><span \
style="color: #aa2211">::</span><span class="n">iterateTransaction</span><span \
class="p">()</span> </div><div style="padding: 0 8px; margin: 0 4px; background: \
rgba(151, 234, 151, .6);"><span class="p">{</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Give \
it a name that says what it does, this is just copied from the dummy and thus it has \
a meaningless name.</p></div></div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R134 Discover Software \
Store</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D14050">https://phabricator.kde.org/D14050</a></div></div><br \
/><div><strong>To: </strong>abhijeet2096, apol, davidedmundson<br /><strong>Cc: \
</strong>zzag, anthonyfieroni, plasma-devel, ragreen, ixoos, Pitel, ZrenBot, \
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic