D18204: Make KCheckAccelerators less invasive for apps that don't directly link to KXmlGui

2019-01-12 Thread Albert Astals Cid
This revision was automatically updated to reflect the committed changes.
Closed by commit R263:02b523bad09a: Make KCheckAccelerators less invasive for 
apps that dont directly link to… (authored by aacid).

REPOSITORY
  R263 KXmlGui

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18204?vs=49340=49341

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

AFFECTED FILES
  src/kcheckaccelerators.cpp

To: aacid, anthonyfieroni
Cc: davidedmundson, anthonyfieroni, kde-frameworks-devel, michaelh, ngraham, 
bruns


D18204: Make KCheckAccelerators less invasive for apps that don't directly link to KXmlGui

2019-01-12 Thread Anthony Fieroni
anthonyfieroni accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R263 KXmlGui

BRANCH
  arcpatch-D18204

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

To: aacid, anthonyfieroni
Cc: davidedmundson, anthonyfieroni, kde-frameworks-devel, michaelh, ngraham, 
bruns


D18204: Make KCheckAccelerators less invasive for apps that don't directly link to KXmlGui

2019-01-12 Thread Albert Astals Cid
aacid updated this revision to Diff 49340.
aacid added a comment.


  Change style to make Anthony happy

REPOSITORY
  R263 KXmlGui

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18204?vs=49319=49340

BRANCH
  arcpatch-D18204

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

AFFECTED FILES
  src/kcheckaccelerators.cpp

To: aacid
Cc: davidedmundson, anthonyfieroni, kde-frameworks-devel, michaelh, ngraham, 
bruns


D18204: Make KCheckAccelerators less invasive for apps that don't directly link to KXmlGui

2019-01-12 Thread Anthony Fieroni
anthonyfieroni added inline comments.

INLINE COMMENTS

> kcheckaccelerators.cpp:87
> +static bool doCheckAccelerators = true;
> +
>  QCoreApplication *app = QCoreApplication::instance();

We can cheet here

  if (!doCheckAccelerators) {
  return;
  }

> kcheckaccelerators.cpp:114
> +
> +if (doCheckAccelerators) {
> +KCheckAcceleratorsInitializer *initializer = new 
> KCheckAcceleratorsInitializer(app);

Don't need check :)

REPOSITORY
  R263 KXmlGui

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

To: aacid
Cc: davidedmundson, anthonyfieroni, kde-frameworks-devel, michaelh, ngraham, 
bruns


D18204: Make KCheckAccelerators less invasive for apps that don't directly link to KXmlGui

2019-01-12 Thread Albert Astals Cid
aacid updated this revision to Diff 49319.
aacid added a comment.


  Review comments update

REPOSITORY
  R263 KXmlGui

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18204?vs=49308=49319

BRANCH
  arcpatch-D18204

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

AFFECTED FILES
  src/kcheckaccelerators.cpp

To: aacid
Cc: davidedmundson, anthonyfieroni, kde-frameworks-devel, michaelh, ngraham, 
bruns


D18204: Make KCheckAccelerators less invasive for apps that don't directly link to KXmlGui

2019-01-12 Thread David Edmundson
davidedmundson added a comment.


  That's bloody clever! 
  +1

REPOSITORY
  R263 KXmlGui

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

To: aacid
Cc: davidedmundson, anthonyfieroni, kde-frameworks-devel, michaelh, ngraham, 
bruns


D18204: Make KCheckAccelerators less invasive for apps that don't directly link to KXmlGui

2019-01-11 Thread Anthony Fieroni
anthonyfieroni added inline comments.

INLINE COMMENTS

> kcheckaccelerators.cpp:97
> +
> +if (!app->eventDispatcher()) {
> +// We are called with event dispatcher being null when KXmlGui is 
> being loaded

That's static member, you don't need instance. BTW can we check only for null 
app, i mean if it's not directly linked library qapp will be null, it's not 
checked.

REPOSITORY
  R263 KXmlGui

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

To: aacid
Cc: anthonyfieroni, kde-frameworks-devel, michaelh, ngraham, bruns


D18204: Make KCheckAccelerators less invasive for apps that don't directly link to KXmlGui

2019-01-11 Thread Albert Astals Cid
aacid created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
aacid requested review of this revision.

REVISION SUMMARY
  BUGS: 337491

TEST PLAN
  Ran qtcreator and it no longer has the & in Details
  Added some debug and checked that okular still gets the code called

REPOSITORY
  R263 KXmlGui

BRANCH
  master

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

AFFECTED FILES
  src/kcheckaccelerators.cpp

To: aacid
Cc: kde-frameworks-devel, michaelh, ngraham, bruns