Add KWindowSystem::setMainWindow(QWindow *) overload
ClosedPublic

Authored by dfaure on Aug 12 2019, 9:47 AM.

Details

Summary

All QWidget-based API is now deprecated in this module.

Test Plan

Builds.

Diff Detail

Repository
R278 KWindowSystem
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15203
Build 15221: arc lint + arc unit
dfaure created this revision.Aug 12 2019, 9:47 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 12 2019, 9:47 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
dfaure requested review of this revision.Aug 12 2019, 9:47 AM
zzag added inline comments.Aug 13 2019, 9:43 PM
src/kwindowsystem.h
247

and normally use the QWidget parent.

I think this statement is inaccurate. Documentation needs more love. :-)

dfaure updated this revision to Diff 63893.Sat, Aug 17, 8:36 AM

Adjust documentation

zzag added inline comments.Tue, Aug 20, 7:05 PM
src/kwindowsystem.cpp
458

Coding style: For pointers or references, use a single space before '*' or '&', but not after.

https://techbase.kde.org/Policies/Frameworks_Coding_Style#Whitespace

490

Each time this method is called a new foreign QWindow object will be created. Can you please explain why leaking those objects is okay?

dfaure marked 3 inline comments as done.Thu, Aug 22, 8:40 AM
dfaure added inline comments.
src/kwindowsystem.cpp
490

Ah I didn't realize that QWindow::fromWinId was allocating a QWindow [IMHO it should have been called createFromWinId, then], but indeed it's logical.

Fixed.

dfaure updated this revision to Diff 64270.Thu, Aug 22, 8:40 AM
dfaure marked an inline comment as done.

Fix memory leak in new overload

zzag accepted this revision.Thu, Aug 22, 9:32 AM

Looks good to me.

This revision is now accepted and ready to land.Thu, Aug 22, 9:32 AM
dfaure closed this revision.Thu, Aug 22, 12:01 PM