]> git.lyx.org Git - features.git/commit
Refactor code showing error dialogs
authorScott Kostyshak <skostysh@lyx.org>
Sun, 8 Apr 2018 21:35:09 +0000 (17:35 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Sat, 14 Apr 2018 17:45:31 +0000 (13:45 -0400)
commit7900e9957c7ac608d1b8f72f629a3592e33928a6
tree999a987ccc7753ec930136701f85c8b5bd61ea1c
parentd10317978a28839ac1567f78d13abc46920f59a1
Refactor code showing error dialogs

This commit follows 8d2b121e and is not expected to change
functionality (e.g., I confirmed that the cases of #7330 and #11106
are still fixed). The advantages of this refactoring are the
following:

- Remove some preprocessor directives:
  processingThreadFinished() is only called in the case that
  EXPORT_in_THREAD is 1, so by moving some code up in the call list,
  the directives are not needed.

- If errors() is called when there is no error, there will not be unexpected
  behavior (e.g., as was the case before 8d2b121e).
  Note that errors() is still only called by the code touched by this commit
  if there is an error, but that is for efficiency and readability.

- The "from_master" argument now has a constant meaning. Before, it
  could be the case that "from_master" was set to false but that the
  master's error dialog was shown.
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiView.h