[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Review Request: Verify QVariant is valid before casting to Client*
From: "Commit Hook" <null () kde ! org>
Date: 2012-08-17 15:54:44
Message-ID: 20120817155444.3554.86698 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105935/#review17609
-----------------------------------------------------------
This review has been submitted with commit ee12ed430639afbfce3e5e6904b850abbf31f3f1 \
by Martin Gräßlin to branch KDE/4.9.
- Commit Hook
On Aug. 8, 2012, 8:39 p.m., Martin Gräßlin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105935/
> -----------------------------------------------------------
>
> (Updated Aug. 8, 2012, 8:39 p.m.)
>
>
> Review request for kwin.
>
>
> Description
> -------
>
> If the ClientModel does not contain any Clients, which can
> happen if there is no desktop window, accessing the data of a
> ModelIndex returns an invalid QVariant. Because of that it
> needs to be ensured that the QVariant is valid before trying to
> cast it to a Client Pointer.
>
>
> This addresses bug 304620.
> http://bugs.kde.org/show_bug.cgi?id=304620
>
>
> Diffs
> -----
>
> kwin/tabbox/tabboxhandler.cpp 242dcb3
> kwin/tabbox/tests/CMakeLists.txt 3478e99
> kwin/tabbox/tests/test_tabbox_handler.cpp PRE-CREATION
>
> Diff: http://git.reviewboard.kde.org/r/105935/diff/
>
>
> Testing
> -------
>
> see attached unit test and also manual test (crash before, no crash after change)
>
>
> Thanks,
>
> Martin Gräßlin
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/105935/">http://git.reviewboard.kde.org/r/105935/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been \
submitted with commit ee12ed430639afbfce3e5e6904b850abbf31f3f1 by Martin Gräßlin to \
branch KDE/4.9.</pre> <br />
<p>- Commit</p>
<br />
<p>On August 8th, 2012, 8:39 p.m., Martin Gräßlin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for kwin.</div>
<div>By Martin Gräßlin.</div>
<p style="color: grey;"><i>Updated Aug. 8, 2012, 8:39 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">If the ClientModel does not contain any Clients, which can happen if \
there is no desktop window, accessing the data of a ModelIndex returns an invalid \
QVariant. Because of that it needs to be ensured that the QVariant is valid before \
trying to cast it to a Client Pointer.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">see attached unit test and also manual test (crash before, no crash \
after change)</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=304620">304620</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kwin/tabbox/tabboxhandler.cpp <span style="color: grey">(242dcb3)</span></li>
<li>kwin/tabbox/tests/CMakeLists.txt <span style="color: grey">(3478e99)</span></li>
<li>kwin/tabbox/tests/test_tabbox_handler.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/105935/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic