Review Request 127979: [WIP] Implement color scheme selection from these installed in the system using KColorSchemeManager
Alexander Zhigalin
alexander at zhigalin.tk
Mon May 30 17:18:11 UTC 2016
> On Май 21, 2016, 7:31 п.п., Aleix Pol Gonzalez wrote:
> > shell/thememanager.cpp, line 137
> > <https://git.reviewboard.kde.org/r/127979/diff/1/?file=465305#file465305line137>
> >
> > The only reason we are passing the QApplication is so that `d->manager` has a parent?
> >
> > I'd rather manage it within ThemeManager by using QScopedPointer or such. `d->manager` can be initialized the first time it's used. Or `this`.
>
> Alexander Zhigalin wrote:
> >The only reason we are passing the QApplication is so that d->manager has a parent?
>
> I think KColorSchemeManager wants the main application object as his parent.
> >I'd rather manage it within ThemeManager by using QScopedPointer or such. d->manager can be initialized the first time it's used. Or this.
>
> Can you please explain?
>
> Aleix Pol Gonzalez wrote:
> http://api.kde.org/frameworks-api/frameworks5-apidocs/frameworks/kconfigwidgets/html/classKColorSchemeManager.html
>
> If KColorSchemeManager needed a QApplication, it would request a QApplication. Also the QApplication is a global object after all, so I don't see a reason why it would need it as mandatory.
I have tried passing KDevelop::MainWindow but it just refused to work.
Scheme list was generated correctly but there was no scheme change.
> On Май 21, 2016, 7:31 п.п., Aleix Pol Gonzalez wrote:
> > shell/thememanager.cpp, line 155
> > <https://git.reviewboard.kde.org/r/127979/diff/1/?file=465305#file465305line155>
> >
> > Again QScopedPointer.
>
> Alexander Zhigalin wrote:
> Again, explain please.
>
> Aleix Pol Gonzalez wrote:
> In modern C++ it's preferred to use smart pointers rather than managing memory explicitly (i.e. one shouldn't need to write `delete`, as a rough naif rule).
>
> Some pointers (badumts!): https://wiki.qt.io/Smart_Pointers
So you mean I must write `QScopedPoiter<KActionGroup> themeMenuActionGroup` instead of `KActionGroup themeMenuActionGroup`?
If so, where this has to be used and where it has not to be used?
If not, please explain better, I'm a novice in C++/QT/KF.
- Alexander
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127979/#review95679
-----------------------------------------------------------
On Май 20, 2016, 7:44 п.п., Alexander Zhigalin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127979/
> -----------------------------------------------------------
>
> (Updated Май 20, 2016, 7:44 п.п.)
>
>
> Review request for KDevelop and Kevin Funk.
>
>
> Bugs: 279592
> http://bugs.kde.org/show_bug.cgi?id=279592
>
>
> Repository: kdevplatform
>
>
> Description
> -------
>
> [WIP] Implement color scheme selection from these installed in the system using KColorSchemeManager
>
>
> Diffs
> -----
>
> CMakeLists.txt ec521ab8f5dcdd1cc175809f56169259e241ea34
> shell/CMakeLists.txt 752c435b81d60e6bf9d438a0367662a8be346a33
> shell/mainwindow.h 8340064ee7e1a3b95695b430270cc848ac69eeac
> shell/mainwindow.cpp cf1b15d99365a1274f49bbde18bf3c5c17ba7ccb
> shell/mainwindow_p.cpp 70b56db7bed09aeea7a0e57307fb870f65471574
> shell/thememanager.h PRE-CREATION
> shell/thememanager.cpp PRE-CREATION
>
> Diff: https://git.reviewboard.kde.org/r/127979/diff/
>
>
> Testing
> -------
>
> Not tested yet
>
>
> Thanks,
>
> Alexander Zhigalin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160530/ec5fad15/attachment-0001.html>
More information about the KDevelop-devel
mailing list