Mir

Merge lp://qastaging/~afrantzis/mir/display-configuration-clone into lp://qastaging/mir

Proposed by Alexandros Frantzis
Status: Merged
Approved by: Alexandros Frantzis
Approved revision: no longer in the source branch.
Merged at revision: 3088
Proposed branch: lp://qastaging/~afrantzis/mir/display-configuration-clone
Merge into: lp://qastaging/mir
Diff against target: 916 lines (+305/-119)
21 files modified
include/platform/mir/graphics/display_configuration.h (+5/-1)
include/test/mir/test/doubles/mock_display_configuration.h (+57/-0)
include/test/mir/test/doubles/null_display_configuration.h (+4/-0)
include/test/mir/test/doubles/stub_display_configuration.h (+13/-0)
src/platforms/android/server/display_configuration.cpp (+5/-0)
src/platforms/android/server/display_configuration.h (+1/-0)
src/platforms/mesa/server/kms/real_kms_display_configuration.cpp (+5/-0)
src/platforms/mesa/server/kms/real_kms_display_configuration.h (+1/-0)
src/platforms/mesa/server/x11/graphics/display_configuration.cpp (+12/-0)
src/platforms/mesa/server/x11/graphics/display_configuration.h (+2/-0)
src/server/graphics/nested/nested_display_configuration.cpp (+29/-0)
src/server/graphics/nested/nested_display_configuration.h (+3/-1)
src/server/graphics/offscreen/display_configuration.cpp (+4/-0)
src/server/graphics/offscreen/display_configuration.h (+1/-0)
tests/mir_test/display_config_matchers.cpp (+12/-0)
tests/unit-tests/frontend/test_session_mediator.cpp (+2/-10)
tests/unit-tests/graphics/mesa/kms/test_cursor.cpp (+32/-29)
tests/unit-tests/graphics/nested/test_nested_display_configuration.cpp (+35/-0)
tests/unit-tests/graphics/test_default_display_configuration_policy.cpp (+31/-61)
tests/unit-tests/graphics/test_display.h (+46/-17)
tests/unit-tests/graphics/test_overlapping_output_grouping.cpp (+5/-0)
To merge this branch: bzr merge lp://qastaging/~afrantzis/mir/display-configuration-clone
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alan Griffiths Approve
Chris Halse Rogers Approve
Review via email: mp+276246@code.qastaging.launchpad.net

Commit message

platform: Add mg::DisplayConfiguration::clone() method

Description of the change

platform: Add mg::DisplayConfiguration::clone() method

clone() creates a new, independent configuration object matching the original configuration object. This is needed in some scenarios when we want to change a configuration, but want to avoid changing the original object.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Chris Halse Rogers (raof) wrote :

LGTM.

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

+mgx::DisplayConfiguration& mgx::DisplayConfiguration::operator=(DisplayConfiguration const& other)
+{
+ if (&other != this)

I'm always suspicious of assignments that test != this. In this case I don't see why there is an assignment operator.

review: Needs Information
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> In this case I don't see why there is an assignment operator.

I added them only for completeness, they are not currently needed. I don't mind either way, so I just removed them in the latest commit.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> > In this case I don't see why there is an assignment operator.
>
> I added them only for completeness, they are not currently needed. I don't
> mind either way, so I just removed them in the latest commit.

Assignment is unusual for a Clonable type, so I don't think it is needed.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches