mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
fixed SEGV due to calling layout change in the wrong place
This commit is contained in:
parent
d8a24c8c3a
commit
5194287645
@ -443,7 +443,11 @@ int p3FileDatabase::RequestDirDetails(void *ref, DirDetails& d, FileSearchFlags
|
||||
}
|
||||
else
|
||||
{
|
||||
d.prow = storage->parentRow(e) ;
|
||||
if(d.parent == 0) // child of root node
|
||||
d.prow = (flags & RS_FILE_HINTS_LOCAL)?0:(fi-1);
|
||||
else
|
||||
d.prow = storage->parentRow(e) ;
|
||||
|
||||
convertEntryIndexToPointer((intptr_t)d.parent,fi,d.parent) ;
|
||||
}
|
||||
|
||||
@ -480,7 +484,10 @@ uint32_t p3FileDatabase::getType(void *ref) const
|
||||
if(e == 0)
|
||||
return DIR_TYPE_PERSON ;
|
||||
|
||||
return mRemoteDirectories[fi]->getEntryType(e) ;
|
||||
if(fi == 0)
|
||||
return mLocalSharedDirs->getEntryType(e) ;
|
||||
else
|
||||
return mRemoteDirectories[fi-1]->getEntryType(e) ;
|
||||
}
|
||||
|
||||
void p3FileDatabase::forceDirectoryCheck() // Force re-sweep the directories and see what's changed
|
||||
|
@ -862,6 +862,7 @@ Qt::ItemFlags RetroshareDirModel::flags( const QModelIndex & index ) const
|
||||
/* Callback from */
|
||||
void RetroshareDirModel::preMods()
|
||||
{
|
||||
emit layoutAboutToBeChanged();
|
||||
#if QT_VERSION < 0x050000
|
||||
reset();
|
||||
#else
|
||||
@ -877,7 +878,7 @@ void RetroshareDirModel::preMods()
|
||||
/* Callback from */
|
||||
void RetroshareDirModel::postMods()
|
||||
{
|
||||
emit layoutAboutToBeChanged();
|
||||
// emit layoutAboutToBeChanged();
|
||||
#if QT_VERSION >= 0x040600
|
||||
beginResetModel();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user