Fix missing signal connect + some speed optimizations for KAMD submenu reveals.

wilder-5.17
Eike Hein 11 years ago
parent 8d7c1538b1
commit 17561b0c9f
  1. 6
      forwardingmodel.cpp
  2. 2
      funnelmodel.cpp
  3. 6
      recentappsmodel.cpp
  4. 7
      recentcontactsmodel.cpp
  5. 6
      recentdocsmodel.cpp

@ -40,10 +40,10 @@ void ForwardingModel::setSourceModel(QAbstractItemModel *sourceModel)
m_sourceModel = sourceModel;
endResetModel();
connectSignals();
endResetModel();
emit countChanged();
emit sourceModelChanged();
@ -174,6 +174,8 @@ void ForwardingModel::connectSignals()
Qt::UniqueConnection);
connect(m_sourceModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SIGNAL(countChanged()), Qt::UniqueConnection);
connect(m_sourceModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(foo(QModelIndex,int,int)), Qt::UniqueConnection);
connect(m_sourceModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
this, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
Qt::UniqueConnection);

@ -46,6 +46,8 @@ void FunnelModel::setSourceModel(QAbstractItemModel *model)
m_sourceModel = model;
connectSignals();
emit endResetModel();
emit countChanged();

@ -166,6 +166,12 @@ void RecentAppsModel::refresh()
ResultModel *model = new ResultModel(query);
model->setItemCountLimit(15);
QModelIndex index;
if (model->canFetchMore(index)) {
model->fetchMore(index);
}
setSourceModel(model);
delete oldModel;

@ -162,7 +162,12 @@ void RecentContactsModel::refresh()
ResultModel *model = new ResultModel(query);
model->setItemCountLimit(15);
model->fetchMore(QModelIndex());
QModelIndex index;
if (model->canFetchMore(index)) {
model->fetchMore(index);
}
// FIXME TODO: Don't wipe entire cache on transactions.
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),

@ -134,6 +134,12 @@ void RecentDocsModel::refresh()
ResultModel *model = new ResultModel(query);
model->setItemCountLimit(15);
QModelIndex index;
if (model->canFetchMore(index)) {
model->fetchMore(index);
}
setSourceModel(model);
delete oldModel;

Loading…
Cancel
Save