[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: [Differential] [Commented On] D1722: Import next-gen libtaskmanager.
From: graesslin_(Martin_Gräßlin) <noreply () phabricator ! kde ! or
Date: 2016-06-01 5:49:27
Message-ID: 20160601054927.27159.8481.B9CFC1AA () phabricator ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
graesslin added inline comments.
INLINE COMMENTS
> TODO.txt:1
> +Larger outstanding tasks:
> +- Implement missing kwayland bits (e.g. transient handling, virtual desktop \
> logic).
do you really want to add a TODO.txt? My suggestion would be to add tasks to \
maniphest here
> abstracttasksmodel.cpp:33-35
> +AbstractTasksModel::~AbstractTasksModel()
> +{
> +}
AbstractTaskModel::~AbstractTaskModel() = default;
> abstracttasksmodel.h:92
> +
> + virtual QModelIndex index(int row, int column = 0, const QModelIndex &parent = \
> QModelIndex()) const; +
This looks weird. There is a virtual method QAbstractItemModel::index which has \
column not optional. So you are maybe hiding a virtual method. I suggest to use \
override here and make column not optional.
> abstracttasksmodel.h:94-102
> + /**
> + * Request activation of the task at the given index. Derived classes are
> + * free to interpret the meaning of "activate" themselves depending on
> + * the nature and state of the task, e.g. launch or raise a window task.
> + *
> + * This base implementation does nothing.
> + *
why copy all the documentation? It's already documented in AbstractTasksModelIface. \
That yells like "will diverge" to me ;-)
> abstracttasksmodel.h:103
> + **/
> + virtual void requestActivate(const QModelIndex &index);
> +
please use override for these methods as well. They are defined in \
AbstractTasksModelIface after all.
> abstracttasksmodeliface.h:2
> +/********************************************************************
> +Copyright 2016 Eike Hein <hein.org>
> +
your email address in the copy right headers is not a valid email address (seems to \
be consistent over all header files)
REPOSITORY
rPLASMAWORKSPACE Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D1722
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: hein, Plasma
Cc: graesslin, broulik, davidedmundson, plasma-devel, sebas
[Attachment #5 (text/html)]
<div>graesslin added inline comments.</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/D1722#inline-6751" rel="noreferrer">View \
Inline</a><span style="color: #4b4d51; font-weight: bold;">TODO.txt:1</span></div> \
<div style="font: 11px/15px "Menlo", "Consolas", \
"Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; \
margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">Larger \
outstanding tasks: </div><div style="padding: 0 8px; margin: 0 4px; background: \
#d0ffd0;">- Implement missing kwayland bits (e.g. transient handling, virtual desktop \
logic). </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">do \
you really want to add a TODO.txt? My suggestion would be to add tasks to maniphest \
here</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/D1722#inline-6753" \
rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: \
bold;">abstracttasksmodel.cpp:33-35</span></div> <div style="font: 11px/15px \
"Menlo", "Consolas", "Monaco", monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; background: #d0ffd0;"><span class="n">AbstractTasksModel</span><span \
style="color: #aa2211">::~</span><span class="n">AbstractTasksModel</span><span \
class="p">()</span> </div><div style="padding: 0 8px; margin: 0 4px; background: \
#d0ffd0;"><span class="p">{</span> </div><div style="padding: 0 8px; margin: 0 4px; \
background: #d0ffd0;"><span class="p">}</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: \
8px;">AbstractTaskModel::~AbstractTaskModel() = default;</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/D1722#inline-6752" rel="noreferrer">View \
Inline</a><span style="color: #4b4d51; font-weight: \
bold;">abstracttasksmodel.h:92</span></div> <div style="font: 11px/15px \
"Menlo", "Consolas", "Monaco", monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; background: #d0ffd0;"> <span class="n">virtual</span> <span \
class="n">QModelIndex</span> <span class="n">index</span><span \
class="p">(</span><span style="color: #aa4000">int</span> <span \
class="n">row</span><span class="p">,</span> <span style="color: #aa4000">int</span> \
<span class="n">column</span> <span style="color: #aa2211">=</span> <span \
style="color: #601200">0</span><span class="p">,</span> <span style="color: \
#aa4000">const</span> <span class="n">QModelIndex</span> <span style="color: \
#aa2211">&</span><span class="n">parent</span> <span style="color: \
#aa2211">=</span> <span class="n">QModelIndex</span><span class="p">())</span> <span \
style="color: #aa4000">const</span><span class="p">;</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">This \
looks weird. There is a virtual method QAbstractItemModel::index which has column \
not optional. So you are maybe hiding a virtual method. I suggest to use override \
here and make column not optional.</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/D1722#inline-6755" rel="noreferrer">View \
Inline</a><span style="color: #4b4d51; font-weight: \
bold;">abstracttasksmodel.h:94-102</span></div> <div style="font: 11px/15px \
"Menlo", "Consolas", "Monaco", monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; background: #d0ffd0;"> <span style="color: #74777d">/**</span> \
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span \
style="color: #74777d"> * Request activation of the task at the given index. \
Derived classes are</span> </div><div style="padding: 0 8px; margin: 0 4px; \
background: #d0ffd0;"><span style="color: #74777d"> * free to interpret the \
meaning of "activate" themselves depending on</span> </div><div \
style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span style="color: \
#74777d"> * the nature and state of the task, e.g. launch or raise a window \
task.</span> </div><div style="padding: 0 8px; margin: 0 4px; background: \
#d0ffd0;"><span style="color: #74777d"> *</span> </div><div style="padding: 0 \
8px; margin: 0 4px; background: #d0ffd0;"><span style="color: #74777d"> * This \
base implementation does nothing.</span> </div><div style="padding: 0 8px; margin: 0 \
4px; background: #d0ffd0;"><span style="color: #74777d"> *</span> \
</div></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; \
margin: 8px;">why copy all the documentation? It's already documented in \
AbstractTasksModelIface. That yells like "will diverge" to me \
;-)</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/D1722#inline-6754" \
rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: \
bold;">abstracttasksmodel.h:103</span></div> <div style="font: 11px/15px \
"Menlo", "Consolas", "Monaco", monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; background: #d0ffd0;"><span style="color: #74777d"> **/</span> \
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"> <span \
class="n">virtual</span> <span style="color: #aa4000">void</span> <span style="color: \
#004012">requestActivate</span><span class="p">(</span><span style="color: \
#aa4000">const</span> <span class="n">QModelIndex</span> <span style="color: \
#aa2211">&</span><span class="n">index</span><span class="p">);</span> \
</div></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; \
margin: 8px;">please use override for these methods as well. They are defined in \
AbstractTasksModelIface after all.</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/D1722#inline-6756" rel="noreferrer">View \
Inline</a><span style="color: #4b4d51; font-weight: \
bold;">abstracttasksmodeliface.h:2</span></div> <div style="font: 11px/15px \
"Menlo", "Consolas", "Monaco", monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; background: #d0ffd0;"><span style="color: \
#74777d">/********************************************************************</span> \
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;"><span \
style="color: #74777d">Copyright 2016 Eike Hein <hein.org></span> \
</div></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; \
margin: 8px;">your email address in the copy right headers is not a valid email \
address (seems to be consistent over all header \
files)</p></div></div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>rPLASMAWORKSPACE Plasma \
Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D1722" \
rel="noreferrer">https://phabricator.kde.org/D1722</a></div></div><br \
/><div><strong>EMAIL PREFERENCES</strong><div><a \
href="https://phabricator.kde.org/settings/panel/emailpreferences/" \
rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br \
/><div><strong>To: </strong>hein, Plasma<br /><strong>Cc: </strong>graesslin, \
broulik, davidedmundson, plasma-devel, sebas<br /></div>
[Attachment #6 (text/plain)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic