// Retrieve history from CR
void CReferencePolicyPlugin::RetrieveHistoryL()
    {
    OstTraceFunctionEntry0( REF_CREFERENCEPOLICYPLUGIN_RETRIEVEHISTORYL_ENTRY );
    
    // Read history record number from CR
    TInt historyCount(0);
    User::LeaveIfError(
            iRepository->Get(KMaxHistoryCountUid, iMaxHistoryRecCount));
    User::LeaveIfError(iRepository->Get(KHistoryCountUid, historyCount));

    TUint32 historyRecordUid = KFirstHistoryUid;
    if (historyCount)
        {
        TPolicyMountRecord historyRecord;
        TPckg<TPolicyMountRecord> historyArray(historyRecord);        
        for (TInt index = 0; index < historyCount; index++)
            {
            User::LeaveIfError(iRepository->Get(historyRecordUid++, 
                    historyArray));
            TPolicyMountRecord* record = new (ELeave) TPolicyMountRecord;
            memcpy(record, &historyRecord, sizeof(TPolicyMountRecord));
            CleanupStack::PushL(record);
            iHistory.AppendL(record);
            CleanupStack::Pop(record);
            }
        }
    OstTraceFunctionExit0( REF_CREFERENCEPOLICYPLUGIN_RETRIEVEHISTORYL_EXIT );
    }
Beispiel #2
0
void CoreManager::addCommand(QUndoCommand *command)
{
    m_historyStack.push(command);
    emit historyCountChanged(historyCount());
}
Beispiel #3
0
void CoreManager::redo()
{
    qDebug() << "redo";
    m_historyStack.redo();
    emit historyCountChanged(historyCount());
}