~ubuntu-branches/ubuntu/utopic/kde4libs/utopic

« back to all changes in this revision

Viewing changes to nepomuk/core/nepomukmainmodel.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-08-01 16:16:35 UTC
  • mfrom: (1.14.20)
  • Revision ID: package-import@ubuntu.com-20120801161635-qewual50h0fwfeju
Tags: 4:4.9.0a-0ubuntu1
New tar from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
 
79
79
        // we may get disconnected from the server but we don't want to try
80
80
        // to connect every time the model is requested
81
 
        if ( forced || (!m_socketConnectFailed && !localSocketClient.isConnected()) ) {
82
 
            delete localSocketModel;
 
81
        if ( !m_socketConnectFailed && !localSocketClient.isConnected() ) {
 
82
            // ###### FIXME
 
83
            // Cannot delete the model, other threads might still be using it.
 
84
            // With the API that returns iterators, the only way to do this right would be to
 
85
            // use shared pointers, for refcounting the use of the model.
 
86
            // Meanwhile, better leak (on rare occasions) than crash.
 
87
            //delete localSocketModel;
83
88
            localSocketModel = 0;
84
89
            localSocketClient.disconnect();
85
90
            QString socketName = KGlobal::dirs()->locateLocal( "socket", "nepomuk-socket" );
137
142
      d( new Private(this) )
138
143
{
139
144
    setParent( parent );
140
 
    init();
141
145
}
142
146
 
143
147