ProjectModel::pathToIndex assert when path not found?
Niko Sams
niko.sams at gmail.com
Sat Jul 25 10:50:05 UTC 2009
On Sat, Jul 25, 2009 at 12:28, Andreas Pakulat<apaku at gmx.de> wrote:
> On 25.07.09 10:28:42, Niko Sams wrote:
>> Hi,
>>
>> When editing in a launch config the project target
>> ProjectModel::pathToIndex is called to
>> find the project item. As it's a lineedit invalid paths are possible
>> and while typing an assertion
>> in ProjectModel::pathToIndex triggers.
>
> Actually you cannot put invalid paths there AFAIK, because the validator
> will disallow typing a letter that won't match a path at the end. The
> problem is that this even triggers on typing valid paths.
I got the crash after entering the first character - at this point it is just
an incomplete path.
>
>> solution would be to simply remove the assertion and return an invalid
>> QModelIndex if the item
>> can't be found. (ProjectItemValidator actually checks already for that)
>
> I've seen the crash already and was going to check on that today. And no
> I don't think its ok to commit this as David said.
david fixed it already properly.
Niko
More information about the KDevelop-devel
mailing list