mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 06:14:25 -04:00
Fixed slot for signal "filesPreModChanged" and "filesPostModChanged" on SharedFilesDialog.
The list of files is now updated also when the tab is visible. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6990 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
aff10a352c
commit
3e13311be0
5 changed files with 51 additions and 28 deletions
|
@ -49,7 +49,6 @@ RetroshareDirModel::RetroshareDirModel(bool mode, QObject *parent)
|
|||
RemoteMode(mode), nIndex(1), indexSet(1) /* ass zero index cant be used */
|
||||
{
|
||||
_visible = false ;
|
||||
_needs_update = true ;
|
||||
#if QT_VERSION < QT_VERSION_CHECK (5, 0, 0)
|
||||
setSupportedDragActions(Qt::CopyAction);
|
||||
#endif
|
||||
|
@ -64,7 +63,7 @@ Qt::DropActions RetroshareDirModel::supportedDragActions() const
|
|||
}
|
||||
#endif
|
||||
|
||||
void RetroshareDirModel::update()
|
||||
void FlatStyle_RDM::update()
|
||||
{
|
||||
if(_needs_update)
|
||||
{
|
||||
|
@ -845,34 +844,42 @@ Qt::ItemFlags RetroshareDirModel::flags( const QModelIndex & index ) const
|
|||
|
||||
|
||||
/* Callback from */
|
||||
void RetroshareDirModel::preMods()
|
||||
{
|
||||
void RetroshareDirModel::preMods()
|
||||
{
|
||||
reset();
|
||||
|
||||
#ifdef RDM_DEBUG
|
||||
std::cerr << "RetroshareDirModel::preMods()" << std::endl;
|
||||
#endif
|
||||
//modelAboutToBeReset();
|
||||
// reset();
|
||||
}
|
||||
|
||||
/* Callback from */
|
||||
void RetroshareDirModel::postMods()
|
||||
{
|
||||
emit layoutAboutToBeChanged();
|
||||
#if QT_VERSION >= 0x040600
|
||||
beginResetModel();
|
||||
#endif
|
||||
layoutAboutToBeChanged();
|
||||
|
||||
// QModelIndexList piList = persistentIndexList();
|
||||
// QModelIndexList empty;
|
||||
// for (int i = 0; i < piList.size(); i++) {
|
||||
// empty.append(QModelIndex());
|
||||
// }
|
||||
// changePersistentIndexList(piList, empty);
|
||||
|
||||
/* Clear caches */
|
||||
mCache.clear();
|
||||
}
|
||||
|
||||
/* Callback from */
|
||||
void RetroshareDirModel::postMods()
|
||||
{
|
||||
#ifdef RDM_DEBUG
|
||||
std::cerr << "RetroshareDirModel::postMods()" << std::endl;
|
||||
#endif
|
||||
//modelReset();
|
||||
layoutChanged();
|
||||
|
||||
#if QT_VERSION >= 0x040600
|
||||
endResetModel();
|
||||
#endif
|
||||
}
|
||||
emit layoutChanged();
|
||||
}
|
||||
|
||||
const DirDetailsVector *RetroshareDirModel::requestDirDetails(void *ref, bool remote) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue