Fix bug in tst_licenses.pl when the license type does not exist
Fix bug in tst_licenses.pl when the license type does not exist

If the $licenseType does not exist (e.g. the old $QT_BEGIN_LICENSE:LGPL$
declaration is used) then the array @{$licenseTexts{$licenseType}} that
should contain the license text (from qtbase/header.*) is undefined because,
e.g., qtbase/header.LGPL does not exist, making the license script to fail
producing an error like:

  Can't use an undefined value as an ARRAY reference at /work/build/_qtqa_latest/tests/prebuild/license/tst_licenses.pl line 364.
  # Looks like your test exited with 255 before it could output anything.
  /work/build/_qtqa_latest/tests/prebuild/license/tst_licenses.pl ..
  Dubious, test returned 255 (wstat 65280, 0xff00)
  Failed 3/3 subtests

Change the validation to check if the array is undefined and replacing it
with an empty array if so, which should produce a more readable message
instead of making the script fail, something like:

 ...
 not ok 45 - No reference text for license type LGPL in src/doc/src/qtcanvas3d.qdoc, line 8
 #   Failed test 'No reference text for license type LGPL in src/doc/src/qtcanvas3d.qdoc, line 8'
 #   at ../qtqa/tests/prebuild/license/tst_licenses.pl line 365.
 ...

Change-Id: Iee0cb8783ee6e38d5a30b1c417543e9fa1723561
Reviewed-by: Oswald Buddenhagen <6a8868beda3e139b5ac22b2534a23d3e6ba81819@theqtcompany.com>

tsarajar/qtqa,tsarajar/qtqa,tsarajar/qtqa,tsarajar/qtqa