D22403: qobject_cast rather than dynamic_cast

2019-07-12 Thread Harald Sitter
This revision was automatically updated to reflect the committed changes.
Closed by commit R871:ec63673c3695: qobject_cast rather than dynamic_cast 
(authored by sitter).

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D22403?vs=61599=61649

REVISION DETAIL
  https://phabricator.kde.org/D22403

AFFECTED FILES
  src/bugzillaintegration/reportassistantdialog.cpp

To: sitter, #plasma, broulik
Cc: broulik, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, 
Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D22403: qobject_cast rather than dynamic_cast

2019-07-11 Thread Harald Sitter
sitter added inline comments.

INLINE COMMENTS

> broulik wrote in reportassistantdialog.cpp:285
> Why does it check for `page` here but not down below? (Unrelated question to 
> this patch)

the entire class is a hot mess WRT pointer management I think

REPOSITORY
  R871 DrKonqi

BRANCH
  qobjectcast

REVISION DETAIL
  https://phabricator.kde.org/D22403

To: sitter, #plasma, broulik
Cc: broulik, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, 
Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D22403: qobject_cast rather than dynamic_cast

2019-07-11 Thread Kai Uwe Broulik
broulik accepted this revision.
broulik added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> reportassistantdialog.cpp:285
> +ReportAssistantPage *page = qobject_cast *>(currentPage()->widget());
> +if (page && !page->showNextPage()) {
> +return;

Why does it check for `page` here but not down below? (Unrelated question to 
this patch)

REPOSITORY
  R871 DrKonqi

BRANCH
  qobjectcast

REVISION DETAIL
  https://phabricator.kde.org/D22403

To: sitter, #plasma, broulik
Cc: broulik, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, 
Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D22403: qobject_cast rather than dynamic_cast

2019-07-11 Thread Harald Sitter
sitter created this revision.
sitter added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.

REVISION SUMMARY
  doesn't require RTTI and is faster
  
  (I am not sure why there are casts at all instead of pointer members...)

TEST PLAN
  builds

REPOSITORY
  R871 DrKonqi

BRANCH
  qobjectcast

REVISION DETAIL
  https://phabricator.kde.org/D22403

AFFECTED FILES
  src/bugzillaintegration/reportassistantdialog.cpp

To: sitter, #plasma
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, 
ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, 
apol, mart