~mterry/+junk/u8

« back to all changes in this revision

Viewing changes to tests/mocks/Utils/windowstatestorage.cpp

Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    m_geometry[windowId] = rect;
42
42
}
43
43
 
44
 
QRect WindowStateStorage::getGeometry(const QString &windowId, const QRect &defaultValue)
 
44
QRect WindowStateStorage::getGeometry(const QString &windowId, const QRect &defaultValue) const
45
45
{
46
46
    if (!m_geometry.contains(windowId)) return defaultValue;
47
47
    return m_geometry.value(windowId).toRect();
53
53
    Q_EMIT stageSaved(appId, stage);
54
54
}
55
55
 
56
 
int WindowStateStorage::getStage(const QString &appId) const
 
56
int WindowStateStorage::getStage(const QString &appId, int defaultValue) const
57
57
{
58
 
    return m_stage.value(appId, unity::shell::application::ApplicationInfoInterface::MainStage);
 
58
    return m_stage.value(appId, defaultValue);
59
59
}
60
60
 
61
61
void WindowStateStorage::clear()
70
70
    m_state[windowId] = state;
71
71
}
72
72
 
73
 
WindowStateStorage::WindowState WindowStateStorage::getState(const QString &windowId, WindowStateStorage::WindowState defaultValue)
 
73
WindowStateStorage::WindowState WindowStateStorage::getState(const QString &windowId, WindowStateStorage::WindowState defaultValue) const
74
74
{
75
75
    if (!m_state.contains(windowId)) return defaultValue;
76
76
    return m_state.value(windowId);