Fix potential crash.

Use the lfun for breaking the paragraph here, such that the metrics
are updated before the call to the next dispatch.
Correct the check for a command.
Simplify the test for inserting a parbreak separator.

Instead of simply taking into account the layout of the previous
paragraph, it is better considering the layout of the environment
in which the previous paragraph may be nested. This makes the test
simpler and, at the same time, more robust.
Fix another crash similar to #9030

This one occured after the fix for bug #9030 if the cursor is in a math inset
and the edit menu is opened.
Fix another glitch with on-screen indentation.

If a new paragraph is created just before a nested environment,
the indentation of the nested environment is not computed
correctly because the parindent of the previous layout would
also be erroneously taken into account. This would cause the
nested environment to move back and forth when something is
added to the new paragraph.
Cmake export tests: Parse also for nameless layouts in lyx-files
Fix up logic of BibTeXInfo::getInfo. We don't need to process the
richtext stuff unless we actually need it.
Add some const-ref-ness, and remove some default arguments that are
never treated as defaults.
Fix bug #9131 for development branch. There are two parts to the fix.

The firs tinvolves a thinko in BibTeXInfo::expandFormat. We were previously
counting passes through this routine, which means: one for every character,
more or less. So long strings would hit the "recursion limit". But what
we are worried about is an infinite loop caused by misues of macros, so that
is what we need to count.

This prevents the error we were previously getting, but it reveals a huge
slowdown when one tries to open a citation inset with a large nubmer of keys.
So we also limit the number of keys we try to process, and the length of the
string we try to display, when we are generating citation information.

I'm convinced that there is a deeper problem in how citation information is
generated (see the bug tracker for more info), but that will require major
surgery and a file format change
Add a FIXME.
Add Sumatra as a PDF reader

It currently does not make a difference that it is before
Adobe Reader in configure.py because as Enrico points out
on Windows the default viewer configured in the OS is used.
Make: improve detection of X11 with Qt 5

In collaboration with Scott Kostyshak:
With Qt 4 we could use Q_WS_X11, defined by FindQt4.cmake. In Qt 5,
there is no FindQt5.cmake. Instead we now define our own variable,
QT_USES_X11 by using class QX11Info available only on X11.
(http://qt-project.org/doc/qt-5/QX11Info.html)

The main consequence of this improved support is that now the keytests
can be run (ctest -R "keytest") when LyX is compiled with Qt 5.
Before, with Qt 5 we did not know if X11 was available, which is
needed by xvkbd, so the tests were not enabled. Note, however, that
many tests fail with Qt version 5.2.1 because there was a change in
the event handling mechanism in Qt that causes xvkbd to be unable to
pass capital letters (so case sensitive greps in the tests fail). This
needs to be investigated and reported.
Fixes in the beamer block routine

This makes beamerlyxexample1 open after the roundtrip, but the file does not compile yet (remaining issues in other routines)
In collorary conversion, support argument delimiters spread over several ERTs

The roundtrip still has issues.
Support spreaded argument delimiters in beamer block conversion
Clean up empty ERTs that are produced in comples beamer argument conversions