Merge lp://staging/~alan-griffiths/qtmir/small-refactoring-of-MirWindowManager into lp://staging/qtmir

Proposed by Alan Griffiths
Status: Merged
Approved by: Gerry Boland
Approved revision: 358
Merged at revision: 392
Proposed branch: lp://staging/~alan-griffiths/qtmir/small-refactoring-of-MirWindowManager
Merge into: lp://staging/qtmir
Prerequisite: lp://staging/~alan-griffiths/qtmir/use-WindowManager
Diff against target: 261 lines (+99/-79)
4 files modified
CMakeLists.txt (+1/-1)
src/platforms/mirserver/mirserver.cpp (+2/-2)
src/platforms/mirserver/mirwindowmanager.cpp (+92/-41)
src/platforms/mirserver/mirwindowmanager.h (+4/-35)
To merge this branch: bzr merge lp://staging/~alan-griffiths/qtmir/small-refactoring-of-MirWindowManager
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+266698@code.staging.launchpad.net

Commit message

Opaquify MirWindowManager to control visibility of upcoming Window Management work

Description of the change

Opaquify MirWindowManager to control visibility of upcoming Window Management work

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
352. By Alan Griffiths

Also pass the focus controller (will need it later)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

+auto MirWindowManagerImpl::add_surface(
am not a fan of using "auto" unless the type is completely unmistakeably obvious. Here I can't quite deduce, is it a bool to say surface was added successfully? Or a shared/unique pointer to that new surface? Or a list of surfaces?

The C++ committee and I don't agree on some things just yet ;)

+auto MirWindowManager::create() -> std::unique_ptr<MirWindowManager>
For consistency I'd prefer you avoid this new C++ syntax. Few are comfortable with it at the moment IMO.

Are those the only reasons for using C++14?

I'm open to a good argument saying why it'll be good to use, but the only reason I can really see for using auto in function definitions is if we'd like to use duck-typing in C++, which isn't necessary here IMO.

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

> +auto MirWindowManagerImpl::add_surface(
> am not a fan of using "auto" unless the type is completely unmistakeably
> obvious. Here I can't quite deduce, is it a bool to say surface was added
> successfully? Or a shared/unique pointer to that new surface? Or a list of
> surfaces?
>
> The C++ committee and I don't agree on some things just yet ;)
>
> +auto MirWindowManager::create() -> std::unique_ptr<MirWindowManager>
> For consistency I'd prefer you avoid this new C++ syntax. Few are comfortable
> with it at the moment IMO.
>
> Are those the only reasons for using C++14?

No, those are all C++11. The use of C++14 is:

+ return std::make_unique<MirWindowManagerImpl>(displayLayout);

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

> +auto MirWindowManagerImpl::add_surface(
> am not a fan of using "auto" unless the type is completely unmistakeably
> obvious. Here I can't quite deduce, is it a bool to say surface was added
> successfully? Or a shared/unique pointer to that new surface? Or a list of
> surfaces?

FWIW That's preexisting - see line 98

353. By Alan Griffiths

merge --weave lp:qtmir

354. By Alan Griffiths

Old fashioned function definitions for Gerry

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
355. By Alan Griffiths

No change for Jenkns

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

The following packages have unmet dependencies:
 udev : Depends: libudev1 (= 225-1ubuntu1) but 225-1ubuntu2 is to be installed.

Revision history for this message
Gerry Boland (gerboland) wrote :

+ static auto create(
+ mir::shell::FocusController* focus_controller,
+ const std::shared_ptr<mir::shell::DisplayLayout> &displayLayout)
+ -> std::unique_ptr<MirWindowManager>;
We still have one new-fangled definition here.

review: Needs Fixing
356. By Alan Griffiths

If at first Gerry's not happy, try again...

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

> + static auto create(
> + mir::shell::FocusController* focus_controller,
> + const std::shared_ptr<mir::shell::DisplayLayout> &displayLayout)
> + -> std::unique_ptr<MirWindowManager>;
> We still have one new-fangled definition here.

that's a declaration. :^)

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

Gerry happy :)

review: Approve
357. By Alan Griffiths

merge lp:qtmir

358. By Alan Griffiths

merge lp:qtmir

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

LGTM

review: Approve

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