[kdevplatform] project: Don't let the ProjectModel to be accessed from different threads

Andreas Pakulat apaku at gmx.de
Wed Sep 11 07:00:06 UTC 2013


Hi,

On Wed, Sep 11, 2013 at 1:09 AM, Aleix Pol <aleixpol at kde.org> wrote:

> Git commit 010d7bbb3f157faacdc65bab114d6e74c99afd08 by Aleix Pol.
> Committed on 10/09/2013 at 22:45.
> Pushed by apol into branch 'master'.
>
> Don't let the ProjectModel to be accessed from different threads
>
> Experience showed that it didn't work that well, especially since
> there's no aboutToChangeData().
> @@ -199,7 +185,7 @@ ProjectBaseItem* ProjectBaseItem::takeRow(int row)
>      Q_ASSERT(row >= 0 && row < d->children.size());
>
>      if( model() ) {
> -        QMetaObject::invokeMethod( model(), "rowsAboutToBeRemoved",
> getConnectionTypeForSignalDelivery( model() ), Q_ARG(QModelIndex, index()),
> Q_ARG(int, row), Q_ARG(int, row) );
> +        QMetaObject::invokeMethod( model(), "rowsAboutToBeRemoved",
> Qt::DirectConnection, Q_ARG(QModelIndex, index()), Q_ARG(int, row),
> Q_ARG(int, row) );
>

Shouldn't this be changed to a direct function call for easier
understanding of the code (and all other cases too)?

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130911/f8415fb4/attachment.html>


More information about the KDevelop-devel mailing list