changeset 31540:ce5b4a00b022

maint: Merge stable to default
author Arun Giridhar <arungiridhar@gmail.com>
date Thu, 24 Nov 2022 16:16:52 -0500
parents e3256a6e2e8e (current diff) fa254b08f949 (diff)
children 2f08a53e0a23 72ef3d097059
files
diffstat 92 files changed, 46807 insertions(+), 388 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/languages/be_BY.ts	Thu Nov 24 06:30:22 2022 -0800
+++ b/libgui/languages/be_BY.ts	Thu Nov 24 16:16:52 2022 -0500
@@ -4,7 +4,7 @@
 <context>
     <name>QColorDialog</name>
     <message>
-        <location filename="../../../octave-qt/qcolordialog.cpp" line="+1378"/>
+        <location filename="build_ts/octave-qt/qcolordialog.cpp" line="+1378"/>
         <source>Hu&amp;e:</source>
         <translation>Ад&amp;ценне:</translation>
     </message>
@@ -62,7 +62,7 @@
 <context>
     <name>QDialog</name>
     <message>
-        <location filename="../../../octave-qt/qdialog.cpp" line="+528"/>
+        <location filename="build_ts/octave-qt/qdialog.cpp" line="+528"/>
         <source>Done</source>
         <translation>Выканана</translation>
     </message>
@@ -75,7 +75,7 @@
 <context>
     <name>QDialogButtonBox</name>
     <message>
-        <location filename="../../../octave-qt/qmessagebox.cpp" line="+1936"/>
+        <location filename="build_ts/octave-qt/qmessagebox.cpp" line="+1936"/>
         <location line="+446"/>
         <source>OK</source>
         <translation>Добра</translation>
@@ -84,7 +84,7 @@
 <context>
     <name>QErrorMessage</name>
     <message>
-        <location filename="../../../octave-qt/qerrormessage.cpp" line="+208"/>
+        <location filename="build_ts/octave-qt/qerrormessage.cpp" line="+208"/>
         <source>Debug Message:</source>
         <translation>Адладачнае паведамленне:</translation>
     </message>
@@ -112,8 +112,8 @@
 <context>
     <name>QFileDialog</name>
     <message>
-        <location filename="../../../octave-qt/qfiledialog.cpp" line="+557"/>
-        <location filename="../../../octave-qt/qfiledialog_symbian.cpp" line="+192"/>
+        <location filename="build_ts/octave-qt/qfiledialog.cpp" line="+557"/>
+        <location filename="build_ts/octave-qt/qfiledialog_symbian.cpp" line="+192"/>
         <source>Find Directory</source>
         <translation>Знайсці каталог</translation>
     </message>
@@ -248,7 +248,7 @@
         <translation>Ранейшыя месцы</translation>
     </message>
     <message>
-        <location filename="../../../octave-qt/qfiledialog_win.cpp" line="+131"/>
+        <location filename="build_ts/octave-qt/qfiledialog_win.cpp" line="+131"/>
         <source>All Files (*.*)</source>
         <translation>Усе файлы (*.*)</translation>
     </message>
@@ -256,7 +256,7 @@
 <context>
     <name>QFileSystemModel</name>
     <message>
-        <location filename="../../../octave-qt/qfilesystemmodel.cpp" line="+763"/>
+        <location filename="build_ts/octave-qt/qfilesystemmodel.cpp" line="+763"/>
         <source>%1 TB</source>
         <translation>%1 ТБ</translation>
     </message>
@@ -281,12 +281,13 @@
         <translation>%1 байтаў</translation>
     </message>
     <message>
-        <location line="+90"/>
+        <location filename="../src/files-dock-widget.cc" line="+138"/>
+        <location filename="build_ts/octave-qt/qfilesystemmodel.cpp" line="+90"/>
         <source>Invalid filename</source>
         <translation>Памылковая назва файла</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location filename="build_ts/octave-qt/qfilesystemmodel.cpp" line="+1"/>
         <source>&lt;b&gt;The name &quot;%1&quot; can not be used.&lt;/b&gt;&lt;p&gt;Try using another name, with fewer characters or no punctuations marks.</source>
         <translation>&lt;b&gt;Назву &quot;%1&quot; нельга выкарыстаць.&lt;/b&gt;&lt;p&gt;Паспрабуйце іншую, з меншай колькасцю сімвалаў або без знакаў прыпынку.</translation>
     </message>
@@ -321,7 +322,7 @@
 <context>
     <name>QFontDialog</name>
     <message>
-        <location filename="../../../octave-qt/qfontdialog.cpp" line="+183"/>
+        <location filename="build_ts/octave-qt/qfontdialog.cpp" line="+183"/>
         <source>Select Font</source>
         <translation>Пазначыць шрыфт</translation>
     </message>
@@ -369,7 +370,7 @@
 <context>
     <name>QHelpSearchQueryWidget</name>
     <message>
-        <location filename="../../../octave-qt/qhelpsearchquerywidget.cpp" line="+124"/>
+        <location filename="build_ts/octave-qt/qhelpsearchquerywidget.cpp" line="+124"/>
         <source>Search for:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -422,7 +423,7 @@
 <context>
     <name>QInputDialog</name>
     <message>
-        <location filename="../../../octave-qt/qinputdialog.cpp" line="+223"/>
+        <location filename="build_ts/octave-qt/qinputdialog.cpp" line="+223"/>
         <source>Enter a value:</source>
         <translation>Задайце значэнне:</translation>
     </message>
@@ -430,7 +431,7 @@
 <context>
     <name>QMessageBox</name>
     <message>
-        <location filename="../../../octave-qt/qmessagebox.cpp" line="-2243"/>
+        <location filename="build_ts/octave-qt/qmessagebox.cpp" line="-2243"/>
         <source>Show Details...</source>
         <translation>Падрабязнасці...</translation>
     </message>
@@ -469,7 +470,7 @@
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+845"/>
+        <location filename="../src/settings-dialog.cc" line="+879"/>
         <source>Difference to the default size</source>
         <translation type="unfinished">Розніца ад стандартнага памеру</translation>
     </message>
@@ -500,7 +501,7 @@
 <context>
     <name>QPPDOptionsModel</name>
     <message>
-        <location filename="../../../octave-qt/qprintdialog_unix.cpp" line="+1238"/>
+        <location filename="build_ts/octave-qt/qprintdialog_unix.cpp" line="+1238"/>
         <source>Name</source>
         <translation>Назва</translation>
     </message>
@@ -513,7 +514,7 @@
 <context>
     <name>QPageSetupWidget</name>
     <message>
-        <location filename="../../../octave-qt/qpagesetupdialog_unix.cpp" line="+304"/>
+        <location filename="build_ts/octave-qt/qpagesetupdialog_unix.cpp" line="+304"/>
         <source>Centimeters (cm)</source>
         <translation>Сантыметры (см)</translation>
     </message>
@@ -536,7 +537,7 @@
 <context>
     <name>QPlatformTheme</name>
     <message>
-        <location filename="../../../octave-qt/qplatformtheme.cpp" line="+710"/>
+        <location filename="build_ts/octave-qt/qplatformtheme.cpp" line="+710"/>
         <source>OK</source>
         <translation type="unfinished">Добра</translation>
     </message>
@@ -629,14 +630,14 @@
 <context>
     <name>QPrintDialog</name>
     <message>
-        <location filename="../../../octave-qt/qabstractprintdialog.cpp" line="+116"/>
+        <location filename="build_ts/octave-qt/qabstractprintdialog.cpp" line="+116"/>
         <location line="+13"/>
-        <location filename="../../../octave-qt/qprintdialog_win.cpp" line="+272"/>
+        <location filename="build_ts/octave-qt/qprintdialog_win.cpp" line="+272"/>
         <source>Print</source>
         <translation>Друк</translation>
     </message>
     <message>
-        <location filename="../../../octave-qt/qpagesetupdialog_unix.cpp" line="-232"/>
+        <location filename="build_ts/octave-qt/qpagesetupdialog_unix.cpp" line="-232"/>
         <source>A0</source>
         <translation>A0</translation>
     </message>
@@ -791,7 +792,7 @@
         <translation>Адмысловы</translation>
     </message>
     <message>
-        <location filename="../../../octave-qt/qprintdialog_qws.cpp" line="+148"/>
+        <location filename="build_ts/octave-qt/qprintdialog_qws.cpp" line="+148"/>
         <source>File exists</source>
         <translation>Файл існуе</translation>
     </message>
@@ -971,7 +972,7 @@
         <translation>Друкаваць бягучую старонку</translation>
     </message>
     <message>
-        <location filename="../../../octave-qt/qprintdialog_unix.cpp" line="-844"/>
+        <location filename="build_ts/octave-qt/qprintdialog_unix.cpp" line="-844"/>
         <location line="+68"/>
         <source>&amp;Options &gt;&gt;</source>
         <translation>&amp;Настаўленні &gt;&gt;</translation>
@@ -1033,7 +1034,7 @@
 Перапісаць яго?</translation>
     </message>
     <message>
-        <location filename="../../../octave-qt/qprintdialog_win.cpp" line="+1"/>
+        <location filename="build_ts/octave-qt/qprintdialog_win.cpp" line="+1"/>
         <source>The &apos;From&apos; value cannot be greater than the &apos;To&apos; value.</source>
         <translation>Значэнне &apos;З&apos; не можа перавышаць значэнне &apos;Да&apos;.</translation>
     </message>
@@ -1046,7 +1047,7 @@
 <context>
     <name>QPrintPreviewDialog</name>
     <message>
-        <location filename="../../../octave-qt/qabstractpagesetupdialog.cpp" line="+68"/>
+        <location filename="build_ts/octave-qt/qabstractpagesetupdialog.cpp" line="+68"/>
         <location line="+12"/>
         <source>Page Setup</source>
         <translation>Настаўленні старонкі</translation>
@@ -1118,7 +1119,7 @@
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1786"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1782"/>
         <source>copied selection to clipboard</source>
         <translation>вылучэнне скапіявана ў буфер абмену</translation>
     </message>
@@ -1126,7 +1127,7 @@
 <context>
     <name>QsciLexerBash</name>
     <message>
-        <location filename="../../../qsci/qscilexerbash.cpp" line="+203"/>
+        <location filename="build_ts/octave-qsci/qscilexerbash.cpp" line="+203"/>
         <source>Default</source>
         <translation>Стандартны</translation>
     </message>
@@ -1199,7 +1200,7 @@
 <context>
     <name>QsciLexerBatch</name>
     <message>
-        <location filename="../../../qsci/qscilexerbatch.cpp" line="+174"/>
+        <location filename="build_ts/octave-qsci/qscilexerbatch.cpp" line="+174"/>
         <source>Default</source>
         <translation>Стандартны</translation>
     </message>
@@ -1242,7 +1243,7 @@
 <context>
     <name>QsciLexerCPP</name>
     <message>
-        <location filename="../../../qsci/qscilexercpp.cpp" line="+364"/>
+        <location filename="build_ts/octave-qsci/qscilexercpp.cpp" line="+364"/>
         <source>Default</source>
         <translation>Стандартны</translation>
     </message>
@@ -1525,7 +1526,7 @@
 <context>
     <name>QsciLexerDiff</name>
     <message>
-        <location filename="../../../qsci/qscilexerdiff.cpp" line="+106"/>
+        <location filename="build_ts/octave-qsci/qscilexerdiff.cpp" line="+106"/>
         <source>Default</source>
         <translation>Стандартны</translation>
     </message>
@@ -1588,7 +1589,7 @@
 <context>
     <name>QsciLexerMatlab</name>
     <message>
-        <location filename="../../../qsci/qscilexermatlab.cpp" line="+133"/>
+        <location filename="build_ts/octave-qsci/qscilexermatlab.cpp" line="+133"/>
         <source>Default</source>
         <translation>Стандартны</translation>
     </message>
@@ -1636,7 +1637,7 @@
 <context>
     <name>QsciLexerPerl</name>
     <message>
-        <location filename="../../../qsci/qscilexerperl.cpp" line="+328"/>
+        <location filename="build_ts/octave-qsci/qscilexerperl.cpp" line="+328"/>
         <source>Default</source>
         <translation>Стандартны</translation>
     </message>
@@ -1844,7 +1845,7 @@
 <context>
     <name>QsciScintilla</name>
     <message>
-        <location filename="../../../qsci/qsciscintilla.cpp" line="+4475"/>
+        <location filename="build_ts/octave-qsci/qsciscintilla.cpp" line="+4475"/>
         <source>&amp;Undo</source>
         <translation>&amp;Адрабіць</translation>
     </message>
@@ -2073,7 +2074,7 @@
 <context>
     <name>octave::command_widget</name>
     <message>
-        <location filename="../src/command-widget.cc" line="+57"/>
+        <location filename="../src/command-widget.cc" line="+58"/>
         <source>Pause</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2087,21 +2088,11 @@
         <source>Continue</source>
         <translation type="unfinished">Працягваць</translation>
     </message>
-    <message>
-        <location line="+2"/>
-        <source>Command Input</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+9"/>
-        <source>Command Output</source>
-        <translation type="unfinished"></translation>
-    </message>
 </context>
 <context>
     <name>octave::community_news</name>
     <message>
-        <location filename="../src/community-news.cc" line="+70"/>
+        <location filename="../src/community-news.cc" line="+71"/>
         <source>Octave Community News</source>
         <translation type="unfinished">Навіны супольнасці Octave</translation>
     </message>
@@ -2109,7 +2100,7 @@
 <context>
     <name>octave::documentation</name>
     <message>
-        <location filename="../src/documentation.cc" line="+112"/>
+        <location filename="../src/documentation.cc" line="+113"/>
         <location line="+14"/>
         <location line="+735"/>
         <source>Octave Documentation</source>
@@ -2316,7 +2307,7 @@
         <location line="+9"/>
         <source>The file
 %1
-is not a valid XBEL file verison 1.0.</source>
+is not a valid XBEL file version 1.0.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -2328,7 +2319,7 @@
 <context>
     <name>octave::documentation_dock_widget</name>
     <message>
-        <location filename="../src/documentation-dock-widget.cc" line="+42"/>
+        <location filename="../src/documentation-dock-widget.cc" line="+41"/>
         <source>Documentation</source>
         <translation type="unfinished">Дакументацыя</translation>
     </message>
@@ -2390,16 +2381,16 @@
 <context>
     <name>octave::file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+1081"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+1097"/>
         <location line="+28"/>
-        <location line="+549"/>
+        <location line="+540"/>
         <location line="+18"/>
         <location line="+25"/>
         <source>Octave Editor</source>
         <translation type="unfinished">Рэдактар Octave</translation>
     </message>
     <message>
-        <location line="-619"/>
+        <location line="-610"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
@@ -2413,7 +2404,7 @@
         <translation type="unfinished">Асацыяваная картка рэдактара знікла.</translation>
     </message>
     <message>
-        <location line="+549"/>
+        <location line="+540"/>
         <source>Could not open file
 %1
 for read: %2.</source>
@@ -2450,7 +2441,7 @@
 на запіс: %2.</translation>
     </message>
     <message>
-        <location line="+240"/>
+        <location line="+251"/>
         <source>&amp;File</source>
         <translation type="unfinished">&amp;Файл</translation>
     </message>
@@ -2755,7 +2746,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+6"/>
         <source>&amp;Sort Tabs Alphabetically</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2790,7 +2781,7 @@
         <translation type="unfinished">&amp;Выканаць</translation>
     </message>
     <message>
-        <location line="-2066"/>
+        <location line="-2085"/>
         <source>Save File and Run</source>
         <translation type="unfinished">Захаваць і выканаць файл</translation>
     </message>
@@ -2800,7 +2791,7 @@
         <translation type="unfinished">Працягваць</translation>
     </message>
     <message>
-        <location line="+2080"/>
+        <location line="+2099"/>
         <source>Save File and Run / Continue</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2835,7 +2826,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+16"/>
         <source>Editor</source>
         <translation type="unfinished">Рэдактар</translation>
     </message>
@@ -2843,7 +2834,7 @@
 <context>
     <name>octave::file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+159"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+160"/>
         <source>line:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2873,11 +2864,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+62"/>
-        <location line="+1152"/>
+        <location line="+73"/>
+        <location line="+1179"/>
         <location line="+132"/>
-        <location line="+376"/>
-        <location line="+188"/>
+        <location line="+391"/>
+        <location line="+66"/>
+        <location line="+126"/>
         <location line="+26"/>
         <location line="+38"/>
         <location line="+38"/>
@@ -2887,13 +2879,13 @@
         <translation type="unfinished">Рэдактар Octave</translation>
     </message>
     <message>
-        <location line="-2070"/>
+        <location line="-2116"/>
         <source>Cannot add breakpoint to modified or unnamed file.
 Save and add breakpoint, or cancel?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+828"/>
+        <location line="+855"/>
         <source>Goto line</source>
         <translation type="unfinished">Перайсці да радка</translation>
     </message>
@@ -2949,13 +2941,13 @@
     </message>
     <message>
         <location line="+1"/>
-        <location line="+39"/>
+        <location line="+38"/>
         <source>Chan&amp;ge encoding</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-38"/>
-        <location line="+31"/>
+        <location line="-37"/>
+        <location line="+30"/>
         <source>&amp;Close</source>
         <translation type="unfinished">&amp;Закрыць</translation>
     </message>
@@ -2985,14 +2977,20 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+167"/>
+        <location line="+183"/>
         <source>Could not open file %1 for write:
 %2.</source>
         <translation type="unfinished">Не выйшла адкрыць файл %1 на запіс:
 %2.</translation>
     </message>
     <message>
-        <location line="+214"/>
+        <location line="+66"/>
+        <source>The changes could not be saved to the file
+%1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+152"/>
         <source>The current encoding %1
 can not be applied.
 
@@ -3063,7 +3061,7 @@
 <context>
     <name>octave::files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+77"/>
+        <location filename="../src/files-dock-widget.cc" line="+47"/>
         <source>File Browser</source>
         <translation type="unfinished">Файлавы агляднік</translation>
     </message>
@@ -3138,35 +3136,35 @@
         <translation type="unfinished">Перайсці да хатняга каталогу</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Set Browser Directory...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+4"/>
-        <location line="+422"/>
+        <location line="+440"/>
         <source>Find Files...</source>
         <translation type="unfinished">Шукаць файлы...</translation>
     </message>
     <message>
-        <location line="-418"/>
-        <location line="+431"/>
+        <location line="-436"/>
+        <location line="+448"/>
         <source>New File...</source>
         <translation type="unfinished">Новы файл...</translation>
     </message>
     <message>
-        <location line="-428"/>
-        <location line="+430"/>
+        <location line="-445"/>
+        <location line="+447"/>
         <source>New Directory...</source>
         <translation type="unfinished">Новы каталог...</translation>
     </message>
     <message>
-        <location line="-375"/>
+        <location line="-392"/>
         <source>Double-click to open file/folder, right click for alternatives</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+314"/>
+        <location line="+332"/>
         <source>Open</source>
         <translation type="unfinished">Адкрыць</translation>
     </message>
@@ -3223,45 +3221,22 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="-356"/>
         <source>Rename...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+371"/>
         <source>Delete...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+117"/>
-        <source>Rename file/directory</source>
-        <translation type="unfinished">Пераназваць файл ці каталог</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Rename file/directory:
-</source>
-        <translation type="unfinished">Пераназваць файл/каталог:</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>
- to: </source>
-        <translation type="unfinished">
- як: </translation>
-    </message>
-    <message>
-        <location line="+12"/>
-        <source>Rename error</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="-579"/>
         <source>Could not rename file &quot;%1&quot; to &quot;%2&quot;.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+712"/>
         <location line="+11"/>
         <location line="+17"/>
         <source>Delete file/directory</source>
@@ -3393,7 +3368,7 @@
     </message>
     <message>
         <location line="+3"/>
-        <location filename="../src/m-editor/find-dialog.cc" line="+3"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+2"/>
         <source>Find &amp;what:</source>
         <translation type="unfinished">Што &amp;шукаць:</translation>
     </message>
@@ -3489,7 +3464,7 @@
     </message>
     <message>
         <location line="+179"/>
-        <location filename="../src/m-editor/find-dialog.cc" line="+179"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+173"/>
         <source>Search from end</source>
         <translation type="unfinished">Шукаць ад канца</translation>
     </message>
@@ -3733,7 +3708,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+4"/>
         <source>Command History</source>
         <translation type="unfinished">Гісторыя загадаў</translation>
     </message>
@@ -3772,7 +3747,7 @@
 <context>
     <name>octave::label_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+79"/>
+        <location filename="../src/octave-dock-widget.cc" line="+83"/>
         <source>Undock widget</source>
         <translation type="unfinished">Адчапіць віджэт</translation>
     </message>
@@ -3785,7 +3760,7 @@
 <context>
     <name>octave::main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="+658"/>
+        <location filename="../src/main-window.cc" line="+673"/>
         <source>Save Workspace As</source>
         <translation type="unfinished">Захаваць прастору зменных як</translation>
     </message>
@@ -3795,34 +3770,34 @@
         <translation type="unfinished">Загрузіць прастору зменных</translation>
     </message>
     <message>
-        <location line="+204"/>
-        <location line="+1606"/>
+        <location line="+203"/>
+        <location line="+1656"/>
         <source>About Octave</source>
         <translation type="unfinished">Пра Octave</translation>
     </message>
     <message>
-        <location line="-1993"/>
+        <location line="-2042"/>
         <source>Octave</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-344"/>
+        <location line="-355"/>
         <source>Profiler</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+345"/>
+        <location line="+356"/>
         <source>Are you sure you want to exit Octave?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+553"/>
-        <location line="+1513"/>
+        <location line="+575"/>
+        <location line="+1540"/>
         <source>Browse directories</source>
         <translation type="unfinished">Агляд каталогаў</translation>
     </message>
     <message>
-        <location line="-1260"/>
+        <location line="-1280"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation type="unfinished">Файлы Octave (*.m);;Усе файлы (*)</translation>
     </message>
@@ -3854,7 +3829,7 @@
         <translation type="unfinished">Рэдактар Octave</translation>
     </message>
     <message>
-        <location line="+689"/>
+        <location line="+709"/>
         <source>&amp;File</source>
         <translation type="unfinished">&amp;Файл</translation>
     </message>
@@ -4242,12 +4217,12 @@
         <translation type="unfinished">Схаваць віджэт</translation>
     </message>
     <message>
-        <location line="+82"/>
+        <location line="+84"/>
         <source>Dock widget</source>
         <translation type="unfinished">Прычапіць віджэт</translation>
     </message>
     <message>
-        <location line="+59"/>
+        <location line="+58"/>
         <source>Undock widget</source>
         <translation type="unfinished">Адчапіць віджэт</translation>
     </message>
@@ -4255,7 +4230,7 @@
 <context>
     <name>octave::octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+298"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+297"/>
         <source>Help on</source>
         <translation type="unfinished">Даведка пра</translation>
     </message>
@@ -4289,7 +4264,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+286"/>
+        <location line="+292"/>
         <source>Press &apos;%1&apos; to replace all occurrences of &apos;%2&apos; with &apos;%3&apos;.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4360,7 +4335,7 @@
 <context>
     <name>octave::release_notes</name>
     <message>
-        <location filename="../src/release-notes.cc" line="+80"/>
+        <location filename="../src/release-notes.cc" line="+84"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation type="unfinished">Файл заўваг да выпуску &apos;%1&apos; пусты.</translation>
     </message>
@@ -4378,7 +4353,7 @@
 <context>
     <name>octave::resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+442"/>
+        <location filename="../src/resource-manager.cc" line="+486"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -4486,7 +4461,7 @@
 <context>
     <name>octave::settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.cc" line="-767"/>
+        <location filename="../src/settings-dialog.cc" line="-801"/>
         <source>Octave Preferences</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4498,12 +4473,12 @@
     <message>
         <location line="+16"/>
         <location line="+5"/>
-        <location line="+892"/>
+        <location line="+931"/>
         <source>System setting</source>
         <translation type="unfinished">Сістэмная</translation>
     </message>
     <message>
-        <location line="-651"/>
+        <location line="-687"/>
         <source>IBeam Cursor</source>
         <translation type="unfinished">IBeam</translation>
     </message>
@@ -4518,7 +4493,12 @@
         <translation type="unfinished">Падкрэсленне</translation>
     </message>
     <message>
-        <location line="+168"/>
+        <location line="+121"/>
+        <source>Color of highlighted current line (magenta (255,0,255) for automatic color)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+63"/>
         <source>Set Octave Startup Directory</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4528,7 +4508,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+707"/>
+        <location line="+727"/>
         <source>Enable attribute colors</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4558,7 +4538,7 @@
         <translation type="unfinished">курсор</translation>
     </message>
     <message>
-        <location filename="../src/gui-preferences-ed.h" line="+205"/>
+        <location filename="../src/gui-preferences-ed.h" line="+212"/>
         <source>Top</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4618,12 +4598,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/gui-preferences-global.h" line="+149"/>
+        <location filename="../src/gui-preferences-global.h" line="+186"/>
         <source>Environment Variables</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/gui-settings.h" line="+132"/>
+        <location filename="../src/gui-settings.h" line="+133"/>
         <source>Second color mode (light/dark)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -5289,7 +5269,13 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-335"/>
+        <location line="+129"/>
+        <source>Add Shift modifier
+(allows one to enter number keys)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-464"/>
         <source>Zoom In</source>
         <translation type="unfinished"></translation>
     </message>
@@ -5450,13 +5436,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Add Shift modifier
-(allows to enter number keys)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+20"/>
         <source>Actual shortcut</source>
         <translation type="unfinished"></translation>
     </message>
@@ -5490,7 +5470,7 @@
 <context>
     <name>octave::terminal_dock_widget</name>
     <message>
-        <location filename="../src/terminal-dock-widget.cc" line="+87"/>
+        <location filename="../src/terminal-dock-widget.cc" line="+97"/>
         <source>Command Window</source>
         <translation type="unfinished">Загаднае акно</translation>
     </message>
@@ -5498,7 +5478,7 @@
 <context>
     <name>octave::variable_dock_widget</name>
     <message>
-        <location filename="../src/variable-editor.cc" line="+175"/>
+        <location filename="../src/variable-editor.cc" line="+177"/>
         <source>Dock widget</source>
         <translation type="unfinished">Прычапіць віджэт</translation>
     </message>
@@ -5508,7 +5488,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+15"/>
         <source>Undock widget</source>
         <translation type="unfinished">Адчапіць віджэт</translation>
     </message>
@@ -5536,7 +5516,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+548"/>
+        <location line="+547"/>
         <source>Variable Editor Toolbar</source>
         <translation type="unfinished"></translation>
     </message>
@@ -5623,7 +5603,7 @@
 <context>
     <name>octave::variable_editor_stack</name>
     <message>
-        <location line="-1241"/>
+        <location line="-1240"/>
         <source>Save Variable %1 As</source>
         <translation type="unfinished"></translation>
     </message>
@@ -5736,7 +5716,7 @@
 <context>
     <name>octave::workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+59"/>
+        <location filename="../src/workspace-view.cc" line="+58"/>
         <source>Workspace</source>
         <translation type="unfinished">Прастора зменных</translation>
     </message>
@@ -5825,13 +5805,13 @@
     <name>settings_dialog</name>
     <message>
         <location filename="../src/settings-dialog.ui" line="+45"/>
-        <location line="+831"/>
-        <location line="+1905"/>
+        <location line="+834"/>
+        <location line="+1909"/>
         <source>General</source>
         <translation>Агульныя</translation>
     </message>
     <message>
-        <location line="-2606"/>
+        <location line="-2390"/>
         <source>Octave logo only</source>
         <translation>Толькі эмблема Octave</translation>
     </message>
@@ -5842,12 +5822,12 @@
         <translation>Літарныя значкі</translation>
     </message>
     <message>
-        <location line="-74"/>
+        <location line="-334"/>
         <source>Dock widget title bar</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+72"/>
         <source>Small</source>
         <translation type="unfinished"></translation>
     </message>
@@ -5857,7 +5837,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+170"/>
+        <location line="+105"/>
         <source>Custom style</source>
         <translation type="unfinished"></translation>
     </message>
@@ -5867,7 +5847,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+511"/>
+        <location line="+558"/>
         <source>Editor</source>
         <translation>Рэдактар</translation>
     </message>
@@ -6056,43 +6036,38 @@
     </message>
     <message>
         <location line="-123"/>
-        <location line="+1859"/>
+        <location line="+1863"/>
         <source>Font</source>
         <translation>Шрыфт</translation>
     </message>
     <message>
-        <location line="-1569"/>
+        <location line="-1573"/>
         <source>Show line numbers</source>
         <translation>Паказваць нумары радкоў</translation>
     </message>
     <message>
-        <location line="+152"/>
-        <source>Highlight current line</source>
-        <translation>Фарбаваць дзейны радок</translation>
-    </message>
-    <message>
-        <location line="-1008"/>
+        <location line="-859"/>
         <source>Interface</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+418"/>
+        <location line="+421"/>
         <source>Confirm before exiting</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-292"/>
+        <location line="-72"/>
         <source>Graphic icons</source>
         <translation>Графічныя значкі</translation>
     </message>
     <message>
-        <location line="+272"/>
+        <location line="+52"/>
         <location line="+439"/>
         <source>Show status bar</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-630"/>
+        <location line="-677"/>
         <source>Text inactive</source>
         <translation type="unfinished"></translation>
     </message>
@@ -6108,18 +6083,18 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+171"/>
+        <location line="+218"/>
         <source>Octave Startup</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+46"/>
-        <location line="+1687"/>
+        <location line="+1691"/>
         <source>Browse</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-1294"/>
+        <location line="-1298"/>
         <source>Show whitespace</source>
         <translation>Паказваць прагальныя знакі</translation>
     </message>
@@ -6155,7 +6130,7 @@
     </message>
     <message>
         <location line="+52"/>
-        <location line="+1749"/>
+        <location line="+1753"/>
         <source>Font size</source>
         <translation>Памер шрыфту</translation>
     </message>
@@ -6165,12 +6140,12 @@
         <translation>Файлавы агляднік</translation>
     </message>
     <message>
-        <location line="-2031"/>
+        <location line="-2017"/>
         <source>Normal</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+370"/>
+        <location line="+352"/>
         <source>These preferences are applied after any .octaverc startup files.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -6190,42 +6165,47 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-1802"/>
+        <location line="-1805"/>
         <source>Preferences</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+66"/>
+        <location line="+351"/>
         <source>(requires restart)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+355"/>
+        <location line="+73"/>
         <source>Use native file dialogs</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-280"/>
-        <source>Use system icon theme if available (requires restart)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+50"/>
+        <location line="-98"/>
         <source>Toolbar Icons</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+179"/>
+        <location line="-224"/>
         <source>Language</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+34"/>
+        <location line="-41"/>
+        <source>Dock widgets window icons</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Style</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+43"/>
+        <source>Icon theme (requires restart)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+380"/>
         <source>Initial working directory of Octave interpreter</source>
         <translation type="unfinished"></translation>
     </message>
@@ -6260,7 +6240,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+93"/>
+        <location line="+79"/>
+        <source>Highlight current line (color adjustable below with editor styles)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <source>Highlight all occurrences of a word selected by a double click</source>
         <translation type="unfinished"></translation>
     </message>
@@ -6380,12 +6365,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+39"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+62"/>
         <source>Behavior</source>
         <translation type="unfinished"></translation>
     </message>
@@ -6415,12 +6400,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+117"/>
-        <source>Disable menu accelerators of main window menus when Commmand Window has focus</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+37"/>
+        <location line="+154"/>
         <source>Import shortcut set</source>
         <translation type="unfinished"></translation>
     </message>
@@ -6514,12 +6494,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-2360"/>
-        <source>Icon set for dock widgets</source>
-        <translation>Набор значкоў для віджэтаў</translation>
-    </message>
-    <message>
-        <location line="+1968"/>
+        <location line="-392"/>
         <source>Synchronize Octave working directory with file browser</source>
         <translation>Сінхранізаваць дзейны каталог Octave з файлавым агляднікам</translation>
     </message>
@@ -6540,7 +6515,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+4"/>
+        <source>Disable menu accelerators of main window menus when Command Window has focus</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+50"/>
         <source>Export</source>
         <translation type="unfinished"></translation>
     </message>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/README.md	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,22 @@
+# Updating language files for the Octave GUI
+
+## Why updating and when?
+
+Before a new release of Octave, the language files  `libgui/languages/*.ts` have to be updated with changed or new strings in the source files in order to add translations aferwards.
+
+## How to update the files
+
+ The update is carried out by the Qt-tool `lupdate` which collect strings in source files found in the search path(s) provided as input argument to `lupdate`. The tool `lupdate`is called from the script
+
+- `libgui/languages/build_ts/update_ts_files`
+
+which also determines the required search paths for each language. 
+
+Besides source folders within `libgui`, the search path is extended by some qt and qsci files, collected in `libgui/build_ts/octave-qt` and `libgui/build_ts/octave-qsci` respectively, whenever there are no translation files for the language from Qt or QsciScintilla.
+
+The Following steps are required in order to update the language files `libgui/languages/*.ts`:
+
+1. Change into `libgui/languages`
+2. Start the update by calling `build_ts/update_ts_files`
+3. Select the language files that should be updated
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qsciabstractapis.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,90 @@
+// This module defines interface to the QsciAbstractAPIs class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCIABSTRACTAPIS_H
+#define QSCIABSTRACTAPIS_H
+
+#include <QList>
+#include <QObject>
+#include <QStringList>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qsciscintilla.h>
+
+
+class QsciLexer;
+
+
+//! \brief The QsciAbstractAPIs class represents the interface to the textual
+//! API information used in call tips and for auto-completion.  A sub-class
+//! will provide the actual implementation of the interface.
+//!
+//! API information is specific to a particular language lexer but can be
+//! shared by multiple instances of the lexer.
+class QSCINTILLA_EXPORT QsciAbstractAPIs : public QObject
+{
+    Q_OBJECT
+
+public:
+    //! Constructs a QsciAbstractAPIs instance attached to lexer \a lexer.  \a
+    //! lexer becomes the instance's parent object although the instance can
+    //! also be subsequently attached to other lexers.
+    QsciAbstractAPIs(QsciLexer *lexer);
+
+    //! Destroy the QsciAbstractAPIs instance.
+    virtual ~QsciAbstractAPIs();
+
+    //! Return the lexer that the instance is attached to.
+    QsciLexer *lexer() const;
+
+    //! Update the list \a list with API entries derived from \a context.  \a
+    //! context is the list of words in the text preceding the cursor position.
+    //! The characters that make up a word and the characters that separate
+    //! words are defined by the lexer.  The last word is a partial word and
+    //! may be empty if the user has just entered a word separator.
+    virtual void updateAutoCompletionList(const QStringList &context,
+            QStringList &list) = 0;
+
+    //! This is called when the user selects the entry \a selection from the
+    //! auto-completion list.  A sub-class can use this as a hint to provide
+    //! more specific API entries in future calls to
+    //! updateAutoCompletionList().  The default implementation does nothing.
+    virtual void autoCompletionSelected(const QString &selection);
+
+    //! Return the call tips valid for the context \a context.  (Note that the
+    //! last word of the context will always be empty.)  \a commas is the number
+    //! of commas the user has typed after the context and before the cursor
+    //! position.  The exact position of the list of call tips can be adjusted
+    //! by specifying a corresponding left character shift in \a shifts.  This
+    //! is normally done to correct for any displayed context according to \a
+    //! style.
+    //!
+    //! \sa updateAutoCompletionList()
+    virtual QStringList callTips(const QStringList &context, int commas,
+            QsciScintilla::CallTipsStyle style, QList<int> &shifts) = 0;
+
+private:
+    QsciLexer *lex;
+
+    QsciAbstractAPIs(const QsciAbstractAPIs &);
+    QsciAbstractAPIs &operator=(const QsciAbstractAPIs &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qsciapis.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,213 @@
+// This module defines interface to the QsciAPIs class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCIAPIS_H
+#define QSCIAPIS_H
+
+#include <QList>
+#include <QObject>
+#include <QPair>
+#include <QStringList>
+
+#include <Qsci/qsciabstractapis.h>
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qsciscintilla.h>
+
+
+class QsciAPIsPrepared;
+class QsciAPIsWorker;
+class QsciLexer;
+
+
+//! \brief The QsciAPIs class provies an implementation of the textual API
+//! information used in call tips and for auto-completion.
+//!
+//! Raw API information is read from one or more files.  Each API function is
+//! described by a single line of text comprising the function's name, followed
+//! by the function's optional comma separated parameters enclosed in
+//! parenthesis, and finally followed by optional explanatory text.
+//!
+//! A function name may be followed by a `?' and a number.  The number is used
+//! by auto-completion to display a registered QPixmap with the function name.
+//!
+//! All function names are used by auto-completion, but only those that include
+//! function parameters are used in call tips.
+//!
+//! QScintilla only deals with prepared API information and not the raw
+//! information described above.  This is done so that large APIs can be
+//! handled while still being responsive to user input.  The conversion of raw
+//! information to prepared information is time consuming (think tens of
+//! seconds) and implemented in a separate thread.  Prepared information can
+//! be quickly saved to and loaded from files.  Such files are portable between
+//! different architectures.
+//!
+//! QScintilla based applications that want to support large APIs would
+//! normally provide the user with the ability to specify a set of, possibly
+//! project specific, raw API files and convert them to prepared files that are
+//! loaded quickly when the application is invoked.
+class QSCINTILLA_EXPORT QsciAPIs : public QsciAbstractAPIs
+{
+    Q_OBJECT
+
+public:
+    //! Constructs a QsciAPIs instance attached to lexer \a lexer.  \a lexer
+    //! becomes the instance's parent object although the instance can also be
+    //! subsequently attached to other lexers.
+    QsciAPIs(QsciLexer *lexer);
+
+    //! Destroy the QsciAPIs instance.
+    virtual ~QsciAPIs();
+
+    //! Add the single raw API entry \a entry to the current set.
+    //!
+    //! \sa clear(), load(), remove()
+    void add(const QString &entry);
+
+    //! Deletes all raw API information.
+    //!
+    //! \sa add(), load(), remove()
+    void clear();
+
+    //! Load the API information from the file named \a filename, adding it to
+    //! the current set.  Returns true if successful, otherwise false.
+    bool load(const QString &filename);
+
+    //! Remove the single raw API entry \a entry from the current set.
+    //!
+    //! \sa add(), clear(), load()
+    void remove(const QString &entry);
+
+    //! Convert the current raw API information to prepared API information.
+    //! This is implemented by a separate thread.
+    //!
+    //! \sa cancelPreparation()
+    void prepare();
+
+    //! Cancel the conversion of the current raw API information to prepared
+    //! API information.
+    //!
+    //! \sa prepare()
+    void cancelPreparation();
+
+    //! Return the default name of the prepared API information file.  It is
+    //! based on the name of the associated lexer and in the directory defined
+    //! by the QSCIDIR environment variable.  If the environment variable isn't
+    //! set then $HOME/.qsci is used.
+    QString defaultPreparedName() const;
+
+    //! Check to see is a prepared API information file named \a filename
+    //! exists.  If \a filename is empty then the value returned by
+    //! defaultPreparedName() is used.  Returns true if successful, otherwise
+    //! false.
+    //!
+    //! \sa defaultPreparedName()
+    bool isPrepared(const QString &filename = QString()) const;
+
+    //! Load the prepared API information from the file named \a filename.  If
+    //! \a filename is empty then a name is constructed based on the name of
+    //! the associated lexer and saved in the directory defined by the QSCIDIR
+    //! environment variable.  If the environment variable isn't set then
+    //! $HOME/.qsci is used.  Returns true if successful, otherwise false.
+    bool loadPrepared(const QString &filename = QString());
+
+    //! Save the prepared API information to the file named \a filename.  If
+    //! \a filename is empty then a name is constructed based on the name of
+    //! the associated lexer and saved in the directory defined by the QSCIDIR
+    //! environment variable.  If the environment variable isn't set then
+    //! $HOME/.qsci is used.  Returns true if successful, otherwise false.
+    bool savePrepared(const QString &filename = QString()) const;
+
+    //! \reimp
+    virtual void updateAutoCompletionList(const QStringList &context,
+            QStringList &list);
+
+    //! \reimp
+    virtual void autoCompletionSelected(const QString &sel);
+
+    //! \reimp
+    virtual QStringList callTips(const QStringList &context, int commas,
+            QsciScintilla::CallTipsStyle style, QList<int> &shifts);
+
+    //! \internal Reimplemented to receive termination events from the worker
+    //! thread.
+    virtual bool event(QEvent *e);
+
+    //! Return a list of the installed raw API file names for the associated
+    //! lexer.
+    QStringList installedAPIFiles() const;
+
+signals:
+    //! This signal is emitted when the conversion of raw API information to
+    //! prepared API information has been cancelled.
+    //!
+    //! \sa apiPreparationFinished(), apiPreparationStarted()
+    void apiPreparationCancelled();
+
+    //! This signal is emitted when the conversion of raw API information to
+    //! prepared API information starts and can be used to give some visual
+    //! feedback to the user.
+    //!
+    //! \sa apiPreparationCancelled(), apiPreparationFinished()
+    void apiPreparationStarted();
+    
+    //! This signal is emitted when the conversion of raw API information to
+    //! prepared API information has finished.
+    //!
+    //! \sa apiPreparationCancelled(), apiPreparationStarted()
+    void apiPreparationFinished();
+
+private:
+    friend class QsciAPIsPrepared;
+    friend class QsciAPIsWorker;
+
+    // This indexes a word in a set of raw APIs.  The first part indexes the
+    // entry in the set, the second part indexes the word within the entry.
+    typedef QPair<quint32, quint32> WordIndex;
+
+    // This is a list of word indexes.
+    typedef QList<WordIndex> WordIndexList;
+
+    QsciAPIsWorker *worker;
+    QStringList old_context;
+    QStringList::const_iterator origin;
+    int origin_len;
+    QString unambiguous_context;
+    QStringList apis;
+    QsciAPIsPrepared *prep;
+
+    static bool enoughCommas(const QString &s, int commas);
+
+    QStringList positionOrigin(const QStringList &context, QString &path);
+    bool originStartsWith(const QString &path, const QString &wsep);
+    const WordIndexList *wordIndexOf(const QString &word) const;
+    void lastCompleteWord(const QString &word, QStringList &with_context,
+            bool &unambig);
+    void lastPartialWord(const QString &word, QStringList &with_context,
+            bool &unambig);
+    void addAPIEntries(const WordIndexList &wl, bool complete,
+            QStringList &with_context, bool &unambig);
+    QString prepName(const QString &filename, bool mkpath = false) const;
+    void deleteWorker();
+
+    QsciAPIs(const QsciAPIs &);
+    QsciAPIs &operator=(const QsciAPIs &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscicommand.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,408 @@
+// This defines the interface to the QsciCommand class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCICOMMAND_H
+#define QSCICOMMAND_H
+
+#include <qstring.h>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qsciscintillabase.h>
+
+
+class QsciScintilla;
+
+
+//! \brief The QsciCommand class represents an internal editor command that may
+//! have one or two keys bound to it.
+//!
+//! Methods are provided to change the keys bound to the command and to remove
+//! a key binding.  Each command has a user friendly description of the command
+//! for use in key mapping dialogs.
+class QSCINTILLA_EXPORT QsciCommand
+{
+public:
+    //! This enum defines the different commands that can be assigned to a key.
+    enum Command {
+        //! Move down one line.
+        LineDown = QsciScintillaBase::SCI_LINEDOWN,
+
+        //! Extend the selection down one line.
+        LineDownExtend = QsciScintillaBase::SCI_LINEDOWNEXTEND,
+
+        //! Extend the rectangular selection down one line.
+        LineDownRectExtend = QsciScintillaBase::SCI_LINEDOWNRECTEXTEND,
+
+        //! Scroll the view down one line.
+        LineScrollDown = QsciScintillaBase::SCI_LINESCROLLDOWN,
+
+        //! Move up one line.
+        LineUp = QsciScintillaBase::SCI_LINEUP,
+
+        //! Extend the selection up one line.
+        LineUpExtend = QsciScintillaBase::SCI_LINEUPEXTEND,
+
+        //! Extend the rectangular selection up one line.
+        LineUpRectExtend = QsciScintillaBase::SCI_LINEUPRECTEXTEND,
+
+        //! Scroll the view up one line.
+        LineScrollUp = QsciScintillaBase::SCI_LINESCROLLUP,
+
+        //! Scroll to the start of the document.
+        ScrollToStart = QsciScintillaBase::SCI_SCROLLTOSTART,
+
+        //! Scroll to the end of the document.
+        ScrollToEnd = QsciScintillaBase::SCI_SCROLLTOEND,
+
+        //! Scroll vertically to centre the current line.
+        VerticalCentreCaret = QsciScintillaBase::SCI_VERTICALCENTRECARET,
+
+        //! Move down one paragraph.
+        ParaDown = QsciScintillaBase::SCI_PARADOWN,
+
+        //! Extend the selection down one paragraph.
+        ParaDownExtend = QsciScintillaBase::SCI_PARADOWNEXTEND,
+
+        //! Move up one paragraph.
+        ParaUp = QsciScintillaBase::SCI_PARAUP,
+
+        //! Extend the selection up one paragraph.
+        ParaUpExtend = QsciScintillaBase::SCI_PARAUPEXTEND,
+
+        //! Move left one character.
+        CharLeft = QsciScintillaBase::SCI_CHARLEFT,
+
+        //! Extend the selection left one character.
+        CharLeftExtend = QsciScintillaBase::SCI_CHARLEFTEXTEND,
+
+        //! Extend the rectangular selection left one character.
+        CharLeftRectExtend = QsciScintillaBase::SCI_CHARLEFTRECTEXTEND,
+
+        //! Move right one character.
+        CharRight = QsciScintillaBase::SCI_CHARRIGHT,
+
+        //! Extend the selection right one character.
+        CharRightExtend = QsciScintillaBase::SCI_CHARRIGHTEXTEND,
+
+        //! Extend the rectangular selection right one character.
+        CharRightRectExtend = QsciScintillaBase::SCI_CHARRIGHTRECTEXTEND,
+
+        //! Move left one word.
+        WordLeft = QsciScintillaBase::SCI_WORDLEFT,
+
+        //! Extend the selection left one word.
+        WordLeftExtend = QsciScintillaBase::SCI_WORDLEFTEXTEND,
+
+        //! Move right one word.
+        WordRight = QsciScintillaBase::SCI_WORDRIGHT,
+
+        //! Extend the selection right one word.
+        WordRightExtend = QsciScintillaBase::SCI_WORDRIGHTEXTEND,
+
+        //! Move to the end of the previous word.
+        WordLeftEnd = QsciScintillaBase::SCI_WORDLEFTEND,
+
+        //! Extend the selection to the end of the previous word.
+        WordLeftEndExtend = QsciScintillaBase::SCI_WORDLEFTENDEXTEND,
+
+        //! Move to the end of the next word.
+        WordRightEnd = QsciScintillaBase::SCI_WORDRIGHTEND,
+
+        //! Extend the selection to the end of the next word.
+        WordRightEndExtend = QsciScintillaBase::SCI_WORDRIGHTENDEXTEND,
+
+        //! Move left one word part.
+        WordPartLeft = QsciScintillaBase::SCI_WORDPARTLEFT,
+
+        //! Extend the selection left one word part.
+        WordPartLeftExtend = QsciScintillaBase::SCI_WORDPARTLEFTEXTEND,
+
+        //! Move right one word part.
+        WordPartRight = QsciScintillaBase::SCI_WORDPARTRIGHT,
+
+        //! Extend the selection right one word part.
+        WordPartRightExtend = QsciScintillaBase::SCI_WORDPARTRIGHTEXTEND,
+
+        //! Move to the start of the document line.
+        Home = QsciScintillaBase::SCI_HOME,
+
+        //! Extend the selection to the start of the document line.
+        HomeExtend = QsciScintillaBase::SCI_HOMEEXTEND,
+
+        //! Extend the rectangular selection to the start of the document line.
+        HomeRectExtend = QsciScintillaBase::SCI_HOMERECTEXTEND,
+
+        //! Move to the start of the displayed line.
+        HomeDisplay = QsciScintillaBase::SCI_HOMEDISPLAY,
+
+        //! Extend the selection to the start of the displayed line.
+        HomeDisplayExtend = QsciScintillaBase::SCI_HOMEDISPLAYEXTEND,
+
+        //! Move to the start of the displayed or document line.
+        HomeWrap = QsciScintillaBase::SCI_HOMEWRAP,
+
+        //! Extend the selection to the start of the displayed or document
+        //! line.
+        HomeWrapExtend = QsciScintillaBase::SCI_HOMEWRAPEXTEND,
+
+        //! Move to the first visible character in the document line.
+        VCHome = QsciScintillaBase::SCI_VCHOME,
+
+        //! Extend the selection to the first visible character in the document
+        //! line.
+        VCHomeExtend = QsciScintillaBase::SCI_VCHOMEEXTEND,
+
+        //! Extend the rectangular selection to the first visible character in
+        //! the document line.
+        VCHomeRectExtend = QsciScintillaBase::SCI_VCHOMERECTEXTEND,
+
+        //! Move to the first visible character of the displayed or document
+        //! line.
+        VCHomeWrap = QsciScintillaBase::SCI_VCHOMEWRAP,
+
+        //! Extend the selection to the first visible character of the
+        //! displayed or document line.
+        VCHomeWrapExtend = QsciScintillaBase::SCI_VCHOMEWRAPEXTEND,
+
+        //! Move to the end of the document line.
+        LineEnd = QsciScintillaBase::SCI_LINEEND,
+
+        //! Extend the selection to the end of the document line.
+        LineEndExtend = QsciScintillaBase::SCI_LINEENDEXTEND,
+
+        //! Extend the rectangular selection to the end of the document line.
+        LineEndRectExtend = QsciScintillaBase::SCI_LINEENDRECTEXTEND,
+
+        //! Move to the end of the displayed line.
+        LineEndDisplay = QsciScintillaBase::SCI_LINEENDDISPLAY,
+
+        //! Extend the selection to the end of the displayed line.
+        LineEndDisplayExtend = QsciScintillaBase::SCI_LINEENDDISPLAYEXTEND,
+
+        //! Move to the end of the displayed or document line.
+        LineEndWrap = QsciScintillaBase::SCI_LINEENDWRAP,
+
+        //! Extend the selection to the end of the displayed or document line.
+        LineEndWrapExtend = QsciScintillaBase::SCI_LINEENDWRAPEXTEND,
+
+        //! Move to the start of the document.
+        DocumentStart = QsciScintillaBase::SCI_DOCUMENTSTART,
+
+        //! Extend the selection to the start of the document.
+        DocumentStartExtend = QsciScintillaBase::SCI_DOCUMENTSTARTEXTEND,
+
+        //! Move to the end of the document.
+        DocumentEnd = QsciScintillaBase::SCI_DOCUMENTEND,
+
+        //! Extend the selection to the end of the document.
+        DocumentEndExtend = QsciScintillaBase::SCI_DOCUMENTENDEXTEND,
+
+        //! Move up one page.
+        PageUp = QsciScintillaBase::SCI_PAGEUP,
+
+        //! Extend the selection up one page.
+        PageUpExtend = QsciScintillaBase::SCI_PAGEUPEXTEND,
+
+        //! Extend the rectangular selection up one page.
+        PageUpRectExtend = QsciScintillaBase::SCI_PAGEUPRECTEXTEND,
+
+        //! Move down one page.
+        PageDown = QsciScintillaBase::SCI_PAGEDOWN,
+
+        //! Extend the selection down one page.
+        PageDownExtend = QsciScintillaBase::SCI_PAGEDOWNEXTEND,
+
+        //! Extend the rectangular selection down one page.
+        PageDownRectExtend = QsciScintillaBase::SCI_PAGEDOWNRECTEXTEND,
+
+        //! Stuttered move up one page.
+        StutteredPageUp = QsciScintillaBase::SCI_STUTTEREDPAGEUP,
+
+        //! Stuttered extend the selection up one page.
+        StutteredPageUpExtend = QsciScintillaBase::SCI_STUTTEREDPAGEUPEXTEND,
+
+        //! Stuttered move down one page.
+        StutteredPageDown = QsciScintillaBase::SCI_STUTTEREDPAGEDOWN,
+
+        //! Stuttered extend the selection down one page.
+        StutteredPageDownExtend = QsciScintillaBase::SCI_STUTTEREDPAGEDOWNEXTEND,
+
+        //! Delete the current character.
+        Delete = QsciScintillaBase::SCI_CLEAR,
+
+        //! Delete the previous character.
+        DeleteBack = QsciScintillaBase::SCI_DELETEBACK,
+
+        //! Delete the previous character if not at start of line.
+        DeleteBackNotLine = QsciScintillaBase::SCI_DELETEBACKNOTLINE,
+
+        //! Delete the word to the left.
+        DeleteWordLeft = QsciScintillaBase::SCI_DELWORDLEFT,
+
+        //! Delete the word to the right.
+        DeleteWordRight = QsciScintillaBase::SCI_DELWORDRIGHT,
+
+        //! Delete right to the end of the next word.
+        DeleteWordRightEnd = QsciScintillaBase::SCI_DELWORDRIGHTEND,
+
+        //! Delete the line to the left.
+        DeleteLineLeft = QsciScintillaBase::SCI_DELLINELEFT,
+
+        //! Delete the line to the right.
+        DeleteLineRight = QsciScintillaBase::SCI_DELLINERIGHT,
+
+        //! Delete the current line.
+        LineDelete = QsciScintillaBase::SCI_LINEDELETE,
+
+        //! Cut the current line to the clipboard.
+        LineCut = QsciScintillaBase::SCI_LINECUT,
+
+        //! Copy the current line to the clipboard.
+        LineCopy = QsciScintillaBase::SCI_LINECOPY,
+
+        //! Transpose the current and previous lines.
+        LineTranspose = QsciScintillaBase::SCI_LINETRANSPOSE,
+
+        //! Duplicate the current line.
+        LineDuplicate = QsciScintillaBase::SCI_LINEDUPLICATE,
+
+        //! Select the whole document.
+        SelectAll = QsciScintillaBase::SCI_SELECTALL,
+
+        //! Move the selected lines up one line.
+        MoveSelectedLinesUp = QsciScintillaBase::SCI_MOVESELECTEDLINESUP,
+
+        //! Move the selected lines down one line.
+        MoveSelectedLinesDown = QsciScintillaBase::SCI_MOVESELECTEDLINESDOWN,
+
+        //! Duplicate the selection.
+        SelectionDuplicate = QsciScintillaBase::SCI_SELECTIONDUPLICATE,
+
+        //! Convert the selection to lower case.
+        SelectionLowerCase = QsciScintillaBase::SCI_LOWERCASE,
+
+        //! Convert the selection to upper case.
+        SelectionUpperCase = QsciScintillaBase::SCI_UPPERCASE,
+
+        //! Cut the selection to the clipboard.
+        SelectionCut = QsciScintillaBase::SCI_CUT,
+
+        //! Copy the selection to the clipboard.
+        SelectionCopy = QsciScintillaBase::SCI_COPY,
+
+        //! Paste from the clipboard.
+        Paste = QsciScintillaBase::SCI_PASTE,
+
+        //! Toggle insert/overtype.
+        EditToggleOvertype = QsciScintillaBase::SCI_EDITTOGGLEOVERTYPE,
+
+        //! Insert a platform dependent newline.
+        Newline = QsciScintillaBase::SCI_NEWLINE,
+
+        //! Insert a formfeed.
+        Formfeed = QsciScintillaBase::SCI_FORMFEED,
+
+        //! Indent one level.
+        Tab = QsciScintillaBase::SCI_TAB,
+
+        //! De-indent one level.
+        Backtab = QsciScintillaBase::SCI_BACKTAB,
+
+        //! Cancel any current operation.
+        Cancel = QsciScintillaBase::SCI_CANCEL,
+
+        //! Undo the last command.
+        Undo = QsciScintillaBase::SCI_UNDO,
+
+        //! Redo the last command.
+        Redo = QsciScintillaBase::SCI_REDO,
+
+        //! Zoom in.
+        ZoomIn = QsciScintillaBase::SCI_ZOOMIN,
+
+        //! Zoom out.
+        ZoomOut = QsciScintillaBase::SCI_ZOOMOUT,
+
+        //! Reverse the selected lines.
+        ReverseLines = QsciScintillaBase::SCI_LINEREVERSE,
+    };
+
+    //! Return the command that will be executed by this instance.
+    Command command() const {return scicmd;}
+
+    //! Execute the command.
+    void execute();
+
+    //! Binds the key \a key to the command.  If \a key is 0 then the key
+    //! binding is removed.  If \a key is invalid then the key binding is
+    //! unchanged.  Valid keys are any visible or control character or any
+    //! of \c Qt::Key_Down, \c Qt::Key_Up, \c Qt::Key_Left, \c Qt::Key_Right,
+    //! \c Qt::Key_Home, \c Qt::Key_End, \c Qt::Key_PageUp,
+    //! \c Qt::Key_PageDown, \c Qt::Key_Delete, \c Qt::Key_Insert,
+    //! \c Qt::Key_Escape, \c Qt::Key_Backspace, \c Qt::Key_Tab,
+    //! \c Qt::Key_Backtab, \c Qt::Key_Return, \c Qt::Key_Enter,
+    //! \c Qt::Key_Super_L, \c Qt::Key_Super_R or \c Qt::Key_Menu.  Keys may be
+    //! modified with any combination of \c Qt::ShiftModifier,
+    //! \c Qt::ControlModifier, \c Qt::AltModifier and \c Qt::MetaModifier.
+    //!
+    //! \sa key(), setAlternateKey(), validKey()
+    void setKey(int key);
+
+    //! Binds the alternate key \a altkey to the command.  If \a key is 0
+    //! then the alternate key binding is removed.
+    //!
+    //! \sa alternateKey(), setKey(), validKey()
+    void setAlternateKey(int altkey);
+
+    //! The key that is currently bound to the command is returned.
+    //!
+    //! \sa setKey(), alternateKey()
+    int key() const {return qkey;}
+
+    //! The alternate key that is currently bound to the command is
+    //! returned.
+    //!
+    //! \sa setAlternateKey(), key()
+    int alternateKey() const {return qaltkey;}
+
+    //! If the key \a key is valid then true is returned.
+    static bool validKey(int key);
+
+    //! The user friendly description of the command is returned.
+    QString description() const;
+
+private:
+    friend class QsciCommandSet;
+
+    QsciCommand(QsciScintilla *qs, Command cmd, int key, int altkey,
+            const char *desc);
+
+    void bindKey(int key,int &qk,int &scik);
+
+    QsciScintilla *qsCmd;
+    Command scicmd;
+    int qkey, scikey, qaltkey, scialtkey;
+    const char *descCmd;
+
+    QsciCommand(const QsciCommand &);
+    QsciCommand &operator=(const QsciCommand &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscicommandset.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,89 @@
+// This defines the interface to the QsciCommandSet class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCICOMMANDSET_H
+#define QSCICOMMANDSET_H
+
+#include <qglobal.h>
+
+#include <QList>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscicommand.h>
+
+
+QT_BEGIN_NAMESPACE
+class QSettings;
+QT_END_NAMESPACE
+
+class QsciScintilla;
+
+
+//! \brief The QsciCommandSet class represents the set of all internal editor
+//! commands that may have keys bound.
+//!
+//! Methods are provided to access the individual commands and to read and
+//! write the current bindings from and to settings files.
+class QSCINTILLA_EXPORT QsciCommandSet
+{
+public:
+    //! The key bindings for each command in the set are read from the
+    //! settings \a qs.  \a prefix is prepended to the key of each entry.
+    //! true is returned if there was no error.
+    //!
+    //! \sa writeSettings()
+    bool readSettings(QSettings &qs, const char *prefix = "/Scintilla");
+
+    //! The key bindings for each command in the set are written to the
+    //! settings \a qs.  \a prefix is prepended to the key of each entry.
+    //! true is returned if there was no error.
+    //!
+    //! \sa readSettings()
+    bool writeSettings(QSettings &qs, const char *prefix = "/Scintilla");
+
+    //! The commands in the set are returned as a list.
+    QList<QsciCommand *> &commands() {return cmds;}
+
+    //! The primary keys bindings for all commands are removed.
+    void clearKeys();
+
+    //! The alternate keys bindings for all commands are removed.
+    void clearAlternateKeys();
+
+    // Find the command that is bound to \a key.
+    QsciCommand *boundTo(int key) const;
+
+    // Find a specific command \a command.
+    QsciCommand *find(QsciCommand::Command command) const;
+
+private:
+    friend class QsciScintilla;
+
+    QsciCommandSet(QsciScintilla *qs);
+    ~QsciCommandSet();
+
+    QsciScintilla *qsci;
+    QList<QsciCommand *> cmds;
+
+    QsciCommandSet(const QsciCommandSet &);
+    QsciCommandSet &operator=(const QsciCommandSet &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscidocument.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,61 @@
+// This defines the interface to the QsciDocument class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCIDOCUMENT_H
+#define QSCIDOCUMENT_H
+
+#include <Qsci/qsciglobal.h>
+
+
+class QsciScintillaBase;
+class QsciDocumentP;
+
+
+//! \brief The QsciDocument class represents a document to be edited.
+//!
+//! It is an opaque class that can be attached to multiple instances of
+//! QsciScintilla to create different simultaneous views of the same document.
+//! QsciDocument uses implicit sharing so that copying class instances is a
+//! cheap operation.
+class QSCINTILLA_EXPORT QsciDocument
+{
+public:
+    //! Create a new unattached document.
+    QsciDocument();
+    virtual ~QsciDocument();
+
+    QsciDocument(const QsciDocument &);
+    QsciDocument &operator=(const QsciDocument &);
+
+private:
+    friend class QsciScintilla;
+
+    void attach(const QsciDocument &that);
+    void detach();
+    void display(QsciScintillaBase *qsb, const QsciDocument *from);
+    void undisplay(QsciScintillaBase *qsb);
+
+    bool isModified() const;
+    void setModified(bool m);
+
+    QsciDocumentP *pdoc;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qsciglobal.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,48 @@
+// This module defines various things common to all of the Scintilla Qt port.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCIGLOBAL_H
+#define QSCIGLOBAL_H
+
+#include <qglobal.h>
+
+
+#define QSCINTILLA_VERSION      0x020b04
+#define QSCINTILLA_VERSION_STR  "2.11.4"
+
+
+// Define QSCINTILLA_MAKE_DLL to create a QScintilla shared library, or
+// define QSCINTILLA_DLL to link against a QScintilla shared library, or define
+// neither to either build or link against a static QScintilla library.
+#if defined(QSCINTILLA_DLL)
+#define QSCINTILLA_EXPORT       Q_DECL_IMPORT
+#elif defined(QSCINTILLA_MAKE_DLL)
+#define QSCINTILLA_EXPORT       Q_DECL_EXPORT
+#else
+#define QSCINTILLA_EXPORT
+#endif
+
+
+#if !defined(QT_BEGIN_NAMESPACE)
+#define QT_BEGIN_NAMESPACE
+#define QT_END_NAMESPACE
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexer.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,350 @@
+// This defines the interface to the QsciLexer class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXER_H
+#define QSCILEXER_H
+
+#include <QColor>
+#include <QFont>
+#include <QMap>
+#include <QObject>
+#include <QString>
+
+#include <Qsci/qsciglobal.h>
+
+
+QT_BEGIN_NAMESPACE
+class QSettings;
+QT_END_NAMESPACE
+
+class QsciAbstractAPIs;
+class QsciScintilla;
+
+
+//! \brief The QsciLexer class is an abstract class used as a base for language
+//! lexers.
+//!
+//! A lexer scans the text breaking it up into separate language objects, e.g.
+//! keywords, strings, operators.  The lexer then uses a different style to
+//! draw each object.  A style is identified by a style number and has a number
+//! of attributes, including colour and font.  A specific language lexer will
+//! implement appropriate default styles which can be overriden by an
+//! application by further sub-classing the specific language lexer.
+//!
+//! A lexer may provide one or more sets of words to be recognised as keywords.
+//! Most lexers only provide one set, but some may support languages embedded
+//! in other languages and provide several sets.
+//!
+//! QsciLexer provides convenience methods for saving and restoring user
+//! preferences for fonts and colours.
+//!
+//! If you want to write a lexer for a new language then you can add it to the
+//! underlying Scintilla code and implement a corresponding QsciLexer sub-class
+//! to manage the different styles used.  Alternatively you can implement a
+//! sub-class of QsciLexerCustom.
+class QSCINTILLA_EXPORT QsciLexer : public QObject
+{
+    Q_OBJECT
+
+public:
+    //! Construct a QsciLexer with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexer(QObject *parent = 0);
+
+    //! Destroy the QSciLexer.
+    virtual ~QsciLexer();
+
+    //! Returns the name of the language.  It must be re-implemented by a
+    //! sub-class.
+    virtual const char *language() const = 0;
+
+    //! Returns the name of the lexer.  If 0 is returned then the lexer's
+    //! numeric identifier is used.  The default implementation returns 0.
+    //!
+    //! \sa lexerId()
+    virtual const char *lexer() const;
+
+    //! Returns the identifier (i.e. a QsciScintillaBase::SCLEX_* value) of the
+    //! lexer.  This is only used if lexer() returns 0.  The default
+    //! implementation returns QsciScintillaBase::SCLEX_CONTAINER.
+    //!
+    //! \sa lexer()
+    virtual int lexerId() const;
+
+    //! Returns the current API set or 0 if there isn't one.
+    //!
+    //! \sa setAPIs()
+    QsciAbstractAPIs *apis() const;
+
+    //! Returns the characters that can fill up auto-completion.
+    virtual const char *autoCompletionFillups() const;
+
+    //! Returns the list of character sequences that can separate
+    //! auto-completion words.  The first in the list is assumed to be the
+    //! sequence used to separate words in the lexer's API files.
+    virtual QStringList autoCompletionWordSeparators() const;
+
+    //! Returns the auto-indentation style.  The default is 0 if the
+    //! language is block structured, or QsciScintilla::AiMaintain if not.
+    //!
+    //! \sa setAutoIndentStyle(), QsciScintilla::AiMaintain,
+    //! QsciScintilla::AiOpening, QsciScintilla::AiClosing
+    int autoIndentStyle();
+
+    //! Returns a space separated list of words or characters in a particular
+    //! style that define the end of a block for auto-indentation.  The style
+    //! is returned via \a style.
+    virtual const char *blockEnd(int *style = 0) const;
+
+    //! Returns the number of lines prior to the current one when determining
+    //! the scope of a block when auto-indenting.
+    virtual int blockLookback() const;
+
+    //! Returns a space separated list of words or characters in a particular
+    //! style that define the start of a block for auto-indentation.  The style
+    //! is returned via \a style.
+    virtual const char *blockStart(int *style = 0) const;
+
+    //! Returns a space separated list of keywords in a particular style that
+    //! define the start of a block for auto-indentation.  The style is
+    //! returned via \a style.
+    virtual const char *blockStartKeyword(int *style = 0) const;
+
+    //! Returns the style used for braces for brace matching.
+    virtual int braceStyle() const;
+
+    //! Returns true if the language is case sensitive.  The default is true.
+    virtual bool caseSensitive() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //! The default colour is that returned by defaultColor().
+    //!
+    //! \sa defaultColor(), paper()
+    virtual QColor color(int style) const;
+
+    //! Returns the end-of-line for style number \a style.  The default is
+    //! false.
+    virtual bool eolFill(int style) const;
+
+    //! Returns the font for style number \a style.  The default font is
+    //! that returned by defaultFont().
+    //!
+    //! \sa defaultFont()
+    virtual QFont font(int style) const;
+
+    //! Returns the view used for indentation guides.
+    virtual int indentationGuideView() const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.  Keyword sets are numbered
+    //! from 1.  0 is returned if there is no such set.
+    virtual const char *keywords(int set) const;
+
+    //! Returns the number of the style used for whitespace.  The default
+    //! implementation returns 0 which is the convention adopted by most
+    //! lexers.
+    virtual int defaultStyle() const;
+
+    //! Returns the descriptive name for style number \a style.  For a valid
+    //! style number for this language a non-empty QString must be returned.
+    //! If the style number is invalid then an empty QString must be returned.
+    //! This is intended to be used in user preference dialogs.
+    virtual QString description(int style) const = 0;
+
+    //! Returns the background colour of the text for style number
+    //! \a style.
+    //!
+    //! \sa defaultPaper(), color()
+    virtual QColor paper(int style) const;
+
+    //! Returns the default text colour.
+    //!
+    //! \sa setDefaultColor()
+    QColor defaultColor() const;
+
+    //! Returns the default text colour for style number \a style.
+    virtual QColor defaultColor(int style) const;
+
+    //! Returns the default end-of-line for style number \a style.  The default
+    //! is false.
+    virtual bool defaultEolFill(int style) const;
+
+    //! Returns the default font.
+    //!
+    //! \sa setDefaultFont()
+    QFont defaultFont() const;
+
+    //! Returns the default font for style number \a style.
+    virtual QFont defaultFont(int style) const;
+
+    //! Returns the default paper colour.
+    //!
+    //! \sa setDefaultPaper()
+    QColor defaultPaper() const;
+
+    //! Returns the default paper colour for style number \a style.
+    virtual QColor defaultPaper(int style) const;
+
+    //! Returns the QsciScintilla instance that the lexer is currently attached
+    //! to or 0 if it is unattached.
+    QsciScintilla *editor() const {return attached_editor;}
+
+    //! The current set of APIs is set to \a apis.  If \a apis is 0 then any
+    //! existing APIs for this lexer are removed.
+    //!
+    //! \sa apis()
+    void setAPIs(QsciAbstractAPIs *apis);
+
+    //! The default text colour is set to \a c.
+    //!
+    //! \sa defaultColor(), color()
+    void setDefaultColor(const QColor &c);
+
+    //! The default font is set to \a f.
+    //!
+    //! \sa defaultFont(), font()
+    void setDefaultFont(const QFont &f);
+
+    //! The default paper colour is set to \a c.
+    //!
+    //! \sa defaultPaper(), paper()
+    void setDefaultPaper(const QColor &c);
+
+    //! \internal Set the QsciScintilla instance that the lexer is attached to.
+    virtual void setEditor(QsciScintilla *editor);
+
+    //! The colour, paper, font and end-of-line for each style number, and
+    //! all lexer specific properties are read from the settings \a qs.
+    //! \a prefix is prepended to the key of each entry.  true is returned
+    //! if there was no error.
+    //!
+    //! \sa writeSettings(), QsciScintilla::setLexer()
+    bool readSettings(QSettings &qs,const char *prefix = "/Scintilla");
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    virtual void refreshProperties();
+
+    //! Returns the number of style bits needed by the lexer.  Normally this
+    //! should only be re-implemented by custom lexers.  This is deprecated and
+    //! no longer has any effect.
+    virtual int styleBitsNeeded() const;
+
+    //! Returns the string of characters that comprise a word.  The default is
+    //! 0 which implies the upper and lower case alphabetic characters and
+    //! underscore.
+    virtual const char *wordCharacters() const;
+
+    //! The colour, paper, font and end-of-line for each style number, and
+    //! all lexer specific properties are written to the settings \a qs.
+    //! \a prefix is prepended to the key of each entry.  true is returned
+    //! if there was no error.
+    //!
+    //! \sa readSettings()
+    bool writeSettings(QSettings &qs,
+               const char *prefix = "/Scintilla") const;
+
+public slots:
+    //! The auto-indentation style is set to \a autoindentstyle.
+    //!
+    //! \sa autoIndentStyle(), QsciScintilla::AiMaintain,
+    //! QsciScintilla::AiOpening, QsciScintilla::AiClosing
+    virtual void setAutoIndentStyle(int autoindentstyle);
+
+    //! The foreground colour for style number \a style is set to \a c.  If
+    //! \a style is -1 then the colour is set for all styles.
+    virtual void setColor(const QColor &c,int style = -1);
+
+    //! The end-of-line fill for style number \a style is set to
+    //! \a eoffill.  If \a style is -1 then the fill is set for all styles.
+    virtual void setEolFill(bool eoffill,int style = -1);
+
+    //! The font for style number \a style is set to \a f.  If \a style is
+    //! -1 then the font is set for all styles.
+    virtual void setFont(const QFont &f,int style = -1);
+
+    //! The background colour for style number \a style is set to \a c.  If
+    //! \a style is -1 then the colour is set for all styles.
+    virtual void setPaper(const QColor &c,int style = -1);
+
+signals:
+    //! This signal is emitted when the foreground colour of style number
+    //! \a style has changed.  The new colour is \a c.
+    void colorChanged(const QColor &c,int style);
+
+    //! This signal is emitted when the end-of-file fill of style number
+    //! \a style has changed.  The new fill is \a eolfilled.
+    void eolFillChanged(bool eolfilled,int style);
+
+    //! This signal is emitted when the font of style number \a style has
+    //! changed.  The new font is \a f.
+    void fontChanged(const QFont &f,int style);
+
+    //! This signal is emitted when the background colour of style number
+    //! \a style has changed.  The new colour is \a c.
+    void paperChanged(const QColor &c,int style);
+
+    //! This signal is emitted when the value of the lexer property \a prop
+    //! needs to be changed.  The new value is \a val.
+    void propertyChanged(const char *prop, const char *val);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    virtual bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    virtual bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    struct StyleData {
+        QFont font;
+        QColor color;
+        QColor paper;
+        bool eol_fill;
+    };
+
+    struct StyleDataMap {
+        bool style_data_set;
+        QMap<int, StyleData> style_data;
+    };
+
+    StyleDataMap *style_map;
+
+    int autoIndStyle;
+    QFont defFont;
+    QColor defColor;
+    QColor defPaper;
+    QsciAbstractAPIs *apiSet;
+    QsciScintilla *attached_editor;
+
+    void setStyleDefaults() const;
+    StyleData &styleData(int style) const;
+
+    QsciLexer(const QsciLexer &);
+    QsciLexer &operator=(const QsciLexer &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexeravs.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,174 @@
+// This defines the interface to the QsciLexerAVS class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERAVS_H
+#define QSCILEXERAVS_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerAVS class encapsulates the Scintilla AVS lexer.
+class QSCINTILLA_EXPORT QsciLexerAVS : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! AVS lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A block comment.
+        BlockComment = 1,
+
+        //! A nested block comment.
+        NestedBlockComment = 2,
+
+        //! A line comment.
+        LineComment = 3,
+
+        //! A number.
+        Number = 4,
+
+        //! An operator.
+        Operator = 5,
+
+        //! An identifier
+        Identifier = 6,
+
+        //! A string.
+        String = 7,
+
+        //! A triple quoted string.
+        TripleString = 8,
+
+        //! A keyword (as defined by keyword set number 1)..
+        Keyword = 9,
+
+        //! A filter (as defined by keyword set number 2).
+        Filter = 10,
+
+        //! A plugin (as defined by keyword set number 3).
+        Plugin = 11,
+
+        //! A function (as defined by keyword set number 4).
+        Function = 12,
+
+        //! A clip property (as defined by keyword set number 5).
+        ClipProperty = 13,
+
+        //! A keyword defined in keyword set number 6.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet6 = 14
+    };
+
+    //! Construct a QsciLexerAVS with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexerAVS(QObject *parent = 0);
+
+    //! Destroys the QsciLexerAVS instance.
+    virtual ~QsciLexerAVS();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the propertyChanged()
+    //! signal as required.
+    void refreshProperties();
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const;
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+public slots:
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCommentProp();
+    void setCompactProp();
+
+    bool fold_comments;
+    bool fold_compact;
+
+    QsciLexerAVS(const QsciLexerAVS &);
+    QsciLexerAVS &operator=(const QsciLexerAVS &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerbash.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,178 @@
+// This defines the interface to the QsciLexerBash class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERBASH_H
+#define QSCILEXERBASH_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerBash class encapsulates the Scintilla Bash lexer.
+class QSCINTILLA_EXPORT QsciLexerBash : public QsciLexer
+{
+	Q_OBJECT
+
+public:
+	//! This enum defines the meanings of the different styles used by the
+	//! Bash lexer.
+	enum {
+		//! The default.
+		Default = 0,
+
+		//! An error.
+		Error = 1,
+
+		//! A comment.
+		Comment = 2,
+
+		//! A number.
+		Number = 3,
+
+		//! A keyword.
+		Keyword = 4,
+
+		//! A double-quoted string.
+		DoubleQuotedString = 5,
+
+		//! A single-quoted string.
+		SingleQuotedString = 6,
+
+		//! An operator.
+		Operator = 7,
+
+		//! An identifier
+		Identifier = 8,
+
+		//! A scalar.
+		Scalar = 9,
+
+		//! Parameter expansion.
+		ParameterExpansion = 10,
+
+		//! Backticks.
+		Backticks = 11,
+
+		//! A here document delimiter.
+		HereDocumentDelimiter = 12,
+
+		//! A single quoted here document.
+		SingleQuotedHereDocument = 13
+	};
+
+	//! Construct a QsciLexerBash with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+	QsciLexerBash(QObject *parent = 0);
+
+	//! Destroys the QsciLexerBash instance.
+	virtual ~QsciLexerBash();
+
+	//! Returns the name of the language.
+	const char *language() const;
+
+	//! Returns the name of the lexer.  Some lexers support a number of
+	//! languages.
+	const char *lexer() const;
+
+	//! \internal Returns the style used for braces for brace matching.
+	int braceStyle() const;
+
+	//! Returns the string of characters that comprise a word.
+	const char *wordCharacters() const;
+
+	//! Returns the foreground colour of the text for style number \a style.
+	//!
+	//! \sa defaultPaper()
+	QColor defaultColor(int style) const;
+
+	//! Returns the end-of-line fill for style number \a style.
+	bool defaultEolFill(int style) const;
+
+	//! Returns the font for style number \a style.
+	QFont defaultFont(int style) const;
+
+	//! Returns the background colour of the text for style number \a style.
+	//!
+	//! \sa defaultColor()
+	QColor defaultPaper(int style) const;
+
+	//! Returns the set of keywords for the keyword set \a set recognised
+	//! by the lexer as a space separated string.
+	const char *keywords(int set) const;
+
+	//! Returns the descriptive name for style number \a style.  If the
+	//! style is invalid for this language then an empty QString is returned.
+	//! This is intended to be used in user preference dialogs.
+	QString description(int style) const;
+
+	//! Causes all properties to be refreshed by emitting the
+	//! propertyChanged() signal as required.
+	void refreshProperties();
+
+	//! Returns true if multi-line comment blocks can be folded.
+	//!
+	//! \sa setFoldComments()
+	bool foldComments() const;
+
+	//! Returns true if trailing blank lines are included in a fold block.
+	//!
+	//! \sa setFoldCompact()
+	bool foldCompact() const;
+
+public slots:
+	//! If \a fold is true then multi-line comment blocks can be folded.
+	//! The default is false.
+	//!
+	//! \sa foldComments()
+	virtual void setFoldComments(bool fold);
+
+	//! If \a fold is true then trailing blank lines are included in a fold
+	//! block. The default is true.
+	//!
+	//! \sa foldCompact()
+	virtual void setFoldCompact(bool fold);
+
+protected:
+	//! The lexer's properties are read from the settings \a qs.  \a prefix
+	//! (which has a trailing '/') should be used as a prefix to the key of
+	//! each setting.  true is returned if there is no error.
+	//!
+	bool readProperties(QSettings &qs,const QString &prefix);
+
+	//! The lexer's properties are written to the settings \a qs.
+	//! \a prefix (which has a trailing '/') should be used as a prefix to
+	//! the key of each setting.  true is returned if there is no error.
+	//!
+	bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+	void setCommentProp();
+	void setCompactProp();
+
+	bool fold_comments;
+	bool fold_compact;
+
+	QsciLexerBash(const QsciLexerBash &);
+	QsciLexerBash &operator=(const QsciLexerBash &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerbatch.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,115 @@
+// This defines the interface to the QsciLexerBatch class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERBATCH_H
+#define QSCILEXERBATCH_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerBatch class encapsulates the Scintilla batch file
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerBatch : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! batch file lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A keyword.
+        Keyword = 2,
+
+        //! A label.
+        Label = 3,
+
+        //! An hide command character.
+        HideCommandChar = 4,
+
+        //! An external command .
+        ExternalCommand = 5,
+
+        //! A variable.
+        Variable = 6,
+        
+        //! An operator
+        Operator = 7
+    };
+
+    //! Construct a QsciLexerBatch with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerBatch(QObject *parent = 0);
+
+    //! Destroys the QsciLexerBatch instance.
+    virtual ~QsciLexerBatch();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! \internal Returns true if the language is case sensitive.
+    bool caseSensitive() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+private:
+    QsciLexerBatch(const QsciLexerBatch &);
+    QsciLexerBatch &operator=(const QsciLexerBatch &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexercmake.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,160 @@
+// This defines the interface to the QsciLexerCMake class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERCMAKE_H
+#define QSCILEXERCMAKE_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerCMake class encapsulates the Scintilla CMake lexer.
+class QSCINTILLA_EXPORT QsciLexerCMake : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! CMake lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A string.
+        String = 2,
+
+        //! A left quoted string.
+        StringLeftQuote = 3,
+
+        //! A right quoted string.
+        StringRightQuote = 4,
+
+        //! A function.  (Defined by keyword set number 1.)
+        Function = 5,
+
+        //! A variable. (Defined by keyword set number 2.)
+        Variable = 6,
+
+        //! A label.
+        Label = 7,
+
+        //! A keyword defined in keyword set number 3.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet3 = 8,
+
+        //! A WHILE block.
+        BlockWhile = 9,
+
+        //! A FOREACH block.
+        BlockForeach = 10,
+
+        //! An IF block.
+        BlockIf = 11,
+
+        //! A MACRO block.
+        BlockMacro = 12,
+
+        //! A variable within a string.
+        StringVariable = 13,
+
+        //! A number.
+        Number = 14
+    };
+
+    //! Construct a QsciLexerCMake with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerCMake(QObject *parent = 0);
+
+    //! Destroys the QsciLexerCMake instance.
+    virtual ~QsciLexerCMake();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the propertyChanged()
+    //! signal as required.
+    void refreshProperties();
+
+    //! Returns true if ELSE blocks can be folded.
+    //!
+    //! \sa setFoldAtElse()
+    bool foldAtElse() const;
+
+public slots:
+    //! If \a fold is true then ELSE blocks can be folded.  The default is
+    //! false.
+    //!
+    //! \sa foldAtElse()
+    virtual void setFoldAtElse(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setAtElseProp();
+
+    bool fold_atelse;
+
+    QsciLexerCMake(const QsciLexerCMake &);
+    QsciLexerCMake &operator=(const QsciLexerCMake &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexercoffeescript.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,264 @@
+// This defines the interface to the QsciLexerCoffeeScript class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERCOFFEESCRIPT_H
+#define QSCILEXERCOFFEESCRIPT_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerCoffeeScript class encapsulates the Scintilla
+//! CoffeeScript lexer.
+class QSCINTILLA_EXPORT QsciLexerCoffeeScript : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! C++ lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A C-style comment.
+        Comment = 1,
+
+        //! A C++-style comment line.
+        CommentLine = 2,
+
+        //! A JavaDoc/Doxygen C-style comment.
+        CommentDoc = 3,
+
+        //! A number.
+        Number = 4,
+
+        //! A keyword.
+        Keyword = 5,
+
+        //! A double-quoted string.
+        DoubleQuotedString = 6,
+
+        //! A single-quoted string.
+        SingleQuotedString = 7,
+
+        //! An IDL UUID.
+        UUID = 8,
+
+        //! A pre-processor block.
+        PreProcessor = 9,
+
+        //! An operator.
+        Operator = 10,
+
+        //! An identifier
+        Identifier = 11,
+
+        //! The end of a line where a string is not closed.
+        UnclosedString = 12,
+
+        //! A C# verbatim string.
+        VerbatimString = 13,
+
+        //! A regular expression.
+        Regex = 14,
+
+        //! A JavaDoc/Doxygen C++-style comment line.
+        CommentLineDoc = 15,
+
+        //! A keyword defined in keyword set number 2.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet2 = 16,
+
+        //! A JavaDoc/Doxygen keyword.
+        CommentDocKeyword = 17,
+
+        //! A JavaDoc/Doxygen keyword error defined in keyword set number 3.
+        //! The class must be sub-classed and re-implement keywords() to make
+        //! use of this style.
+        CommentDocKeywordError = 18,
+
+        //! A global class defined in keyword set number 4.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        GlobalClass = 19,
+
+        //! A block comment.
+        CommentBlock = 22,
+
+        //! A block regular expression.
+        BlockRegex = 23,
+
+        //! A block regular expression comment.
+        BlockRegexComment = 24,
+
+        //! An instance property.
+        InstanceProperty = 25,
+    };
+
+    //! Construct a QsciLexerCoffeeScript with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerCoffeeScript(QObject *parent = 0);
+
+    //! Destroys the QsciLexerCoffeeScript instance.
+    virtual ~QsciLexerCoffeeScript();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the character sequences that can separate
+    //! auto-completion words.
+    QStringList autoCompletionWordSeparators() const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the end of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockEnd(int *style = 0) const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStart(int *style = 0) const;
+
+    //! \internal Returns a space separated list of keywords in a
+    //! particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStartKeyword(int *style = 0) const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.  Set 1 is normally used for
+    //! primary keywords and identifiers.  Set 2 is normally used for secondary
+    //! keywords and identifiers.  Set 3 is normally used for documentation
+    //! comment keywords.  Set 4 is normally used for global classes and
+    //! typedefs.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! Returns true if '$' characters are allowed in identifier names.
+    //!
+    //! \sa setDollarsAllowed()
+    bool dollarsAllowed() const {return dollars;}
+
+    //! If \a allowed is true then '$' characters are allowed in identifier
+    //! names.  The default is true.
+    //!
+    //! \sa dollarsAllowed()
+    void setDollarsAllowed(bool allowed);
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const {return fold_comments;}
+
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    void setFoldComments(bool fold);
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const {return fold_compact;}
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    void setFoldCompact(bool fold);
+
+    //! Returns true if preprocessor lines (after the preprocessor
+    //! directive) are styled.
+    //!
+    //! \sa setStylePreprocessor()
+    bool stylePreprocessor() const {return style_preproc;}
+
+    //! If \a style is true then preprocessor lines (after the preprocessor
+    //! directive) are styled.  The default is false.
+    //!
+    //! \sa stylePreprocessor()
+    void setStylePreprocessor(bool style);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    //! \sa writeProperties()
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    //! \sa readProperties()
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCommentProp();
+    void setCompactProp();
+    void setStylePreprocProp();
+    void setDollarsProp();
+
+    bool fold_comments;
+    bool fold_compact;
+    bool style_preproc;
+    bool dollars;
+
+    QsciLexerCoffeeScript(const QsciLexerCoffeeScript &);
+    QsciLexerCoffeeScript &operator=(const QsciLexerCoffeeScript &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexercpp.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,398 @@
+// This defines the interface to the QsciLexerCPP class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERCPP_H
+#define QSCILEXERCPP_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerCPP class encapsulates the Scintilla C++
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerCPP : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! C++ lexer.
+    enum {
+        //! The default.
+        Default = 0,
+        InactiveDefault = Default + 64,
+
+        //! A C comment.
+        Comment = 1,
+        InactiveComment = Comment + 64,
+
+        //! A C++ comment line.
+        CommentLine = 2,
+        InactiveCommentLine = CommentLine + 64,
+
+        //! A JavaDoc/Doxygen style C comment.
+        CommentDoc = 3,
+        InactiveCommentDoc = CommentDoc + 64,
+
+        //! A number.
+        Number = 4,
+        InactiveNumber = Number + 64,
+
+        //! A keyword.
+        Keyword = 5,
+        InactiveKeyword = Keyword + 64,
+
+        //! A double-quoted string.
+        DoubleQuotedString = 6,
+        InactiveDoubleQuotedString = DoubleQuotedString + 64,
+
+        //! A single-quoted string.
+        SingleQuotedString = 7,
+        InactiveSingleQuotedString = SingleQuotedString + 64,
+
+        //! An IDL UUID.
+        UUID = 8,
+        InactiveUUID = UUID + 64,
+
+        //! A pre-processor block.
+        PreProcessor = 9,
+        InactivePreProcessor = PreProcessor + 64,
+
+        //! An operator.
+        Operator = 10,
+        InactiveOperator = Operator + 64,
+
+        //! An identifier
+        Identifier = 11,
+        InactiveIdentifier = Identifier + 64,
+
+        //! The end of a line where a string is not closed.
+        UnclosedString = 12,
+        InactiveUnclosedString = UnclosedString + 64,
+
+        //! A C# verbatim string.
+        VerbatimString = 13,
+        InactiveVerbatimString = VerbatimString + 64,
+
+        //! A JavaScript regular expression.
+        Regex = 14,
+        InactiveRegex = Regex + 64,
+
+        //! A JavaDoc/Doxygen style C++ comment line.
+        CommentLineDoc = 15,
+        InactiveCommentLineDoc = CommentLineDoc + 64,
+
+        //! A keyword defined in keyword set number 2.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet2 = 16,
+        InactiveKeywordSet2 = KeywordSet2 + 64,
+
+        //! A JavaDoc/Doxygen keyword.
+        CommentDocKeyword = 17,
+        InactiveCommentDocKeyword = CommentDocKeyword + 64,
+
+        //! A JavaDoc/Doxygen keyword error.
+        CommentDocKeywordError = 18,
+        InactiveCommentDocKeywordError = CommentDocKeywordError + 64,
+
+        //! A global class or typedef defined in keyword set number 5.  The
+        //! class must be sub-classed and re-implement keywords() to make use
+        //! of this style.
+        GlobalClass = 19,
+        InactiveGlobalClass = GlobalClass + 64,
+
+        //! A C++ raw string.
+        RawString = 20,
+        InactiveRawString = RawString + 64,
+
+        //! A Vala triple-quoted verbatim string.
+        TripleQuotedVerbatimString = 21,
+        InactiveTripleQuotedVerbatimString = TripleQuotedVerbatimString + 64,
+
+        //! A Pike hash-quoted string.
+        HashQuotedString = 22,
+        InactiveHashQuotedString = HashQuotedString + 64,
+
+        //! A pre-processor stream comment.
+        PreProcessorComment = 23,
+        InactivePreProcessorComment = PreProcessorComment + 64,
+
+        //! A JavaDoc/Doxygen style pre-processor comment.
+        PreProcessorCommentLineDoc = 24,
+        InactivePreProcessorCommentLineDoc = PreProcessorCommentLineDoc + 64,
+
+        //! A user-defined literal.
+        UserLiteral = 25,
+        InactiveUserLiteral = UserLiteral + 64,
+
+        //! A task marker.
+        TaskMarker = 26,
+        InactiveTaskMarker = TaskMarker + 64,
+
+        //! An escape sequence.
+        EscapeSequence = 27,
+        InactiveEscapeSequence = EscapeSequence + 64,
+    };
+
+    //! Construct a QsciLexerCPP with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.  \a caseInsensitiveKeywords is true if the
+    //! lexer ignores the case of keywords.
+    QsciLexerCPP(QObject *parent = 0, bool caseInsensitiveKeywords = false);
+
+    //! Destroys the QsciLexerCPP instance.
+    virtual ~QsciLexerCPP();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the character sequences that can separate
+    //! auto-completion words.
+    QStringList autoCompletionWordSeparators() const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the end of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockEnd(int *style = 0) const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStart(int *style = 0) const;
+
+    //! \internal Returns a space separated list of keywords in a
+    //! particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStartKeyword(int *style = 0) const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.  Set 1 is normally used for
+    //! primary keywords and identifiers.  Set 2 is normally used for secondary
+    //! keywords and identifiers.  Set 3 is normally used for documentation
+    //! comment keywords.  Set 4 is normally used for global classes and
+    //! typedefs.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! Returns true if "} else {" lines can be folded.
+    //!
+    //! \sa setFoldAtElse()
+    bool foldAtElse() const {return fold_atelse;}
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const {return fold_comments;}
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const {return fold_compact;}
+
+    //! Returns true if preprocessor blocks can be folded.
+    //!
+    //! \sa setFoldPreprocessor()
+    bool foldPreprocessor() const {return fold_preproc;}
+
+    //! Returns true if preprocessor lines (after the preprocessor
+    //! directive) are styled.
+    //!
+    //! \sa setStylePreprocessor()
+    bool stylePreprocessor() const {return style_preproc;}
+
+    //! If \a allowed is true then '$' characters are allowed in identifier
+    //! names.  The default is true.
+    //!
+    //! \sa dollarsAllowed()
+    void setDollarsAllowed(bool allowed);
+
+    //! Returns true if '$' characters are allowed in identifier names.
+    //!
+    //! \sa setDollarsAllowed()
+    bool dollarsAllowed() const {return dollars;}
+
+    //! If \a enabled is true then triple quoted strings are highlighted.  The
+    //! default is false.
+    //!
+    //! \sa highlightTripleQuotedStrings()
+    void setHighlightTripleQuotedStrings(bool enabled);
+
+    //! Returns true if triple quoted strings should be highlighted.
+    //!
+    //! \sa setHighlightTripleQuotedStrings()
+    bool highlightTripleQuotedStrings() const {return highlight_triple;}
+
+    //! If \a enabled is true then hash quoted strings are highlighted.  The
+    //! default is false.
+    //!
+    //! \sa highlightHashQuotedStrings()
+    void setHighlightHashQuotedStrings(bool enabled);
+
+    //! Returns true if hash quoted strings should be highlighted.
+    //!
+    //! \sa setHighlightHashQuotedStrings()
+    bool highlightHashQuotedStrings() const {return highlight_hash;}
+
+    //! If \a enabled is true then back-quoted raw strings are highlighted.
+    //! The default is false.
+    //!
+    //! \sa highlightBackQuotedStrings()
+    void setHighlightBackQuotedStrings(bool enabled);
+
+    //! Returns true if back-quoted raw strings should be highlighted.
+    //!
+    //! \sa setHighlightBackQuotedStrings()
+    bool highlightBackQuotedStrings() const {return highlight_back;}
+
+    //! If \a enabled is true then escape sequences in strings are highlighted.
+    //! The default is false.
+    //!
+    //! \sa highlightEscapeSequences()
+    void setHighlightEscapeSequences(bool enabled);
+
+    //! Returns true if escape sequences in strings should be highlighted.
+    //!
+    //! \sa setHighlightEscapeSequences()
+    bool highlightEscapeSequences() const {return highlight_escape;}
+
+    //! If \a allowed is true then escape sequences are allowed in verbatim
+    //! strings.  The default is false.
+    //!
+    //! \sa verbatimStringEscapeSequencesAllowed()
+    void setVerbatimStringEscapeSequencesAllowed(bool allowed);
+
+    //! Returns true if hash quoted strings should be highlighted.
+    //!
+    //! \sa setVerbatimStringEscapeSequencesAllowed()
+    bool verbatimStringEscapeSequencesAllowed() const {return vs_escape;}
+
+public slots:
+    //! If \a fold is true then "} else {" lines can be folded.  The
+    //! default is false.
+    //!
+    //! \sa foldAtElse()
+    virtual void setFoldAtElse(bool fold);
+
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+    //! If \a fold is true then preprocessor blocks can be folded.  The
+    //! default is true.
+    //!
+    //! \sa foldPreprocessor()
+    virtual void setFoldPreprocessor(bool fold);
+
+    //! If \a style is true then preprocessor lines (after the preprocessor
+    //! directive) are styled.  The default is false.
+    //!
+    //! \sa stylePreprocessor()
+    virtual void setStylePreprocessor(bool style);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    //! \sa writeProperties()
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    //! \sa readProperties()
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setAtElseProp();
+    void setCommentProp();
+    void setCompactProp();
+    void setPreprocProp();
+    void setStylePreprocProp();
+    void setDollarsProp();
+    void setHighlightTripleProp();
+    void setHighlightHashProp();
+    void setHighlightBackProp();
+    void setHighlightEscapeProp();
+    void setVerbatimStringEscapeProp();
+
+    bool fold_atelse;
+    bool fold_comments;
+    bool fold_compact;
+    bool fold_preproc;
+    bool style_preproc;
+    bool dollars;
+    bool highlight_triple;
+    bool highlight_hash;
+    bool highlight_back;
+    bool highlight_escape;
+    bool vs_escape;
+
+    bool nocase;
+
+    QsciLexerCPP(const QsciLexerCPP &);
+    QsciLexerCPP &operator=(const QsciLexerCPP &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexercsharp.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,77 @@
+// This defines the interface to the QsciLexerCSharp class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERCSHARP_H
+#define QSCILEXERCSHARP_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexercpp.h>
+
+
+//! \brief The QsciLexerCSharp class encapsulates the Scintilla C#
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerCSharp : public QsciLexerCPP
+{
+    Q_OBJECT
+
+public:
+    //! Construct a QsciLexerCSharp with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerCSharp(QObject *parent = 0);
+
+    //! Destroys the QsciLexerCSharp instance.
+    virtual ~QsciLexerCSharp();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+private:
+    QsciLexerCSharp(const QsciLexerCSharp &);
+    QsciLexerCSharp &operator=(const QsciLexerCSharp &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexercss.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,252 @@
+// This defines the interface to the QsciLexerCSS class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERCSS_H
+#define QSCILEXERCSS_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerCSS class encapsulates the Scintilla CSS lexer.
+class QSCINTILLA_EXPORT QsciLexerCSS : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! CSS lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A tag.
+        Tag = 1,
+
+        //! A class selector.
+        ClassSelector = 2,
+
+        //! A pseudo class.  The list of pseudo classes is defined by keyword
+        //! set 2.
+        PseudoClass = 3,
+
+        //! An unknown pseudo class.
+        UnknownPseudoClass = 4,
+
+        //! An operator.
+        Operator = 5,
+
+        //! A CSS1 property.  The list of CSS1 properties is defined by keyword
+        //! set 1.
+        CSS1Property = 6,
+
+        //! An unknown property.
+        UnknownProperty = 7,
+
+        //! A value.
+        Value = 8,
+
+        //! A comment.
+        Comment = 9,
+
+        //! An ID selector.
+        IDSelector = 10,
+
+        //! An important value.
+        Important = 11,
+
+        //! An @-rule.
+        AtRule = 12,
+
+        //! A double-quoted string.
+        DoubleQuotedString = 13,
+
+        //! A single-quoted string.
+        SingleQuotedString = 14,
+
+        //! A CSS2 property.  The list of CSS2 properties is defined by keyword
+        //! set 3.
+        CSS2Property = 15,
+
+        //! An attribute.
+        Attribute = 16,
+
+        //! A CSS3 property.  The list of CSS3 properties is defined by keyword
+        //! set 4.
+        CSS3Property = 17,
+
+        //! A pseudo element.  The list of pseudo elements is defined by
+        //! keyword set 5.
+        PseudoElement = 18,
+
+        //! An extended (browser specific) CSS property.  The list of extended
+        //! CSS properties is defined by keyword set 6.
+        ExtendedCSSProperty = 19,
+
+        //! An extended (browser specific) pseudo class.  The list of extended
+        //! pseudo classes is defined by keyword set 7.
+        ExtendedPseudoClass = 20,
+
+        //! An extended (browser specific) pseudo element.  The list of
+        //! extended pseudo elements is defined by keyword set 8.
+        ExtendedPseudoElement = 21,
+
+        //! A media rule.
+        MediaRule = 22,
+
+        //! A variable.
+        Variable = 23,
+    };
+
+    //! Construct a QsciLexerCSS with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexerCSS(QObject *parent = 0);
+
+    //! Destroys the QsciLexerCSS instance.
+    virtual ~QsciLexerCSS();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the end of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockEnd(int *style = 0) const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStart(int *style = 0) const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    QColor defaultColor(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const;
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+    //! If \a enabled is true then support for HSS is enabled.  The default is
+    //! false.
+    //!
+    //! \sa HSSLanguage()
+    void setHSSLanguage(bool enabled);
+
+    //! Returns true if support for HSS is enabled.
+    //!
+    //! \sa setHSSLanguage()
+    bool HSSLanguage() const {return hss_language;}
+
+    //! If \a enabled is true then support for Less CSS is enabled.  The
+    //! default is false.
+    //!
+    //! \sa LessLanguage()
+    void setLessLanguage(bool enabled);
+
+    //! Returns true if support for Less CSS is enabled.
+    //!
+    //! \sa setLessLanguage()
+    bool LessLanguage() const {return less_language;}
+
+    //! If \a enabled is true then support for Sassy CSS is enabled.  The
+    //! default is false.
+    //!
+    //! \sa SCSSLanguage()
+    void setSCSSLanguage(bool enabled);
+
+    //! Returns true if support for Sassy CSS is enabled.
+    //!
+    //! \sa setSCSSLanguage()
+    bool SCSSLanguage() const {return scss_language;}
+
+public slots:
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCommentProp();
+    void setCompactProp();
+    void setHSSProp();
+    void setLessProp();
+    void setSCSSProp();
+
+    bool fold_comments;
+    bool fold_compact;
+    bool hss_language;
+    bool less_language;
+    bool scss_language;
+
+    QsciLexerCSS(const QsciLexerCSS &);
+    QsciLexerCSS &operator=(const QsciLexerCSS &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexercustom.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,100 @@
+// This defines the interface to the QsciLexerCustom class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERCUSTOM_H
+#define QSCILEXERCUSTOM_H
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+class QsciScintilla;
+class QsciStyle;
+
+
+//! \brief The QsciLexerCustom class is an abstract class used as a base for
+//! new language lexers.
+//!
+//! The advantage of implementing a new lexer this way (as opposed to adding
+//! the lexer to the underlying Scintilla code) is that it does not require the
+//! QScintilla library to be re-compiled.  It also makes it possible to
+//! integrate external lexers.
+//!
+//! All that is necessary to implement a new lexer is to define appropriate
+//! styles and to re-implement the styleText() method.
+class QSCINTILLA_EXPORT QsciLexerCustom : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! Construct a QsciLexerCustom with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerCustom(QObject *parent = 0);
+
+    //! Destroy the QSciLexerCustom.
+    virtual ~QsciLexerCustom();
+
+    //! The next \a length characters starting from the current styling
+    //! position have their style set to style number \a style.  The current
+    //! styling position is moved.  The styling position is initially set by
+    //! calling startStyling().
+    //!
+    //! \sa startStyling(), styleText()
+    void setStyling(int length, int style);
+
+    //! The next \a length characters starting from the current styling
+    //! position have their style set to style \a style.  The current styling
+    //! position is moved.  The styling position is initially set by calling
+    //! startStyling().
+    //!
+    //! \sa startStyling(), styleText()
+    void setStyling(int length, const QsciStyle &style);
+
+    //! The styling position is set to \a start.  \a styleBits is unused.
+    //!
+    //! \sa setStyling(), styleBitsNeeded(), styleText()
+    void startStyling(int pos, int styleBits = 0);
+
+    //! This is called when the section of text beginning at position \a start
+    //! and up to position \a end needs to be styled.  \a start will always be
+    //! at the start of a line.  The text is styled by calling startStyling()
+    //! followed by one or more calls to setStyling().  It must be
+    //! re-implemented by a sub-class.
+    //!
+    //! \sa setStyling(), startStyling(), QsciScintilla::bytes(),
+    //! QsciScintilla::text()
+    virtual void styleText(int start, int end) = 0;
+
+    //! \reimp
+    virtual void setEditor(QsciScintilla *editor);
+
+    //! \reimp This re-implementation returns 5 as the number of style bits
+    //! needed.
+    virtual int styleBitsNeeded() const;
+
+private slots:
+    void handleStyleNeeded(int pos);
+
+private:
+    QsciLexerCustom(const QsciLexerCustom &);
+    QsciLexerCustom &operator=(const QsciLexerCustom &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerd.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,242 @@
+// This defines the interface to the QsciLexerD class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERD_H
+#define QSCILEXERD_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerD class encapsulates the Scintilla D lexer.
+class QSCINTILLA_EXPORT QsciLexerD : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the D
+    //! lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A comment line.
+        CommentLine = 2,
+
+        //! A JavaDoc and Doxygen comment.
+        CommentDoc = 3,
+
+        //! A nested comment.
+        CommentNested = 4,
+
+        //! A number.
+        Number = 5,
+
+        //! A keyword.
+        Keyword = 6,
+
+        //! A secondary keyword.
+        KeywordSecondary = 7,
+
+        //! A doc keyword
+        KeywordDoc = 8,
+        
+        //! Typedefs and aliases
+        Typedefs = 9,
+        
+        //! A string.
+        String = 10,
+
+        //! The end of a line where a string is not closed.
+        UnclosedString = 11,
+        
+        //! A character
+        Character = 12,
+
+        //! An operator.
+        Operator = 13,
+
+        //! An identifier
+        Identifier = 14,
+
+        //! A JavaDoc and Doxygen line.
+        CommentLineDoc = 15,
+
+        //! A JavaDoc and Doxygen  keyword.
+        CommentDocKeyword = 16,
+
+        //! A JavaDoc and Doxygen keyword error.
+        CommentDocKeywordError = 17,
+
+        //! A backquoted string.
+        BackquoteString = 18,
+
+        //! A raw, hexadecimal or delimited string.
+        RawString = 19,
+
+        //! A keyword defined in keyword set number 5.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet5 = 20,
+
+        //! A keyword defined in keyword set number 6.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet6 = 21,
+
+        //! A keyword defined in keyword set number 7.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet7 = 22,
+    };
+
+    //! Construct a QsciLexerD with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexerD(QObject *parent = 0);
+
+    //! Destroys the QsciLexerD instance.
+    virtual ~QsciLexerD();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the character sequences that can separate
+    //! auto-completion words.
+    QStringList autoCompletionWordSeparators() const;
+
+    //! \internal Returns a space separated list of words or characters in a
+    //! particular style that define the end of a block for auto-indentation.
+    //! The styles is returned via \a style.
+    const char *blockEnd(int *style = 0) const;
+
+    //! \internal Returns a space separated list of words or characters in a
+    //! particular style that define the start of a block for auto-indentation.
+    //! The styles is returned via \a style.
+    const char *blockStart(int *style = 0) const;
+
+    //! \internal Returns a space separated list of keywords in a particular
+    //! style that define the start of a block for auto-indentation.  The
+    //! styles is returned via \a style.
+    const char *blockStartKeyword(int *style = 0) const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised by
+    //! the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the style
+    //! is invalid for this language then an empty QString is returned.  This
+    //! is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the propertyChanged()
+    //! signal as required.
+    void refreshProperties();
+
+    //! Returns true if "} else {" lines can be folded.
+    //!
+    //! \sa setFoldAtElse()
+    bool foldAtElse() const;
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const;
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+public slots:
+    //! If \a fold is true then "} else {" lines can be folded.  The default is
+    //! false.
+    //!
+    //! \sa foldAtElse()
+    virtual void setFoldAtElse(bool fold);
+
+    //! If \a fold is true then multi-line comment blocks can be folded.  The
+    //! default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    //! \sa writeProperties()
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    //! \sa readProperties()
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setAtElseProp();
+    void setCommentProp();
+    void setCompactProp();
+
+    bool fold_atelse;
+    bool fold_comments;
+    bool fold_compact;
+
+    QsciLexerD(const QsciLexerD &);
+    QsciLexerD &operator=(const QsciLexerD &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerdiff.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,107 @@
+// This defines the interface to the QsciLexerDiff class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERDIFF_H
+#define QSCILEXERDIFF_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerDiff class encapsulates the Scintilla Diff
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerDiff : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Diff lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A command.
+        Command = 2,
+
+        //! A header.
+        Header = 3,
+
+        //! A position.
+        Position = 4,
+
+        //! A line removed.
+        LineRemoved = 5,
+
+        //! A line added.
+        LineAdded = 6,
+
+        //! A line changed.
+        LineChanged = 7,
+
+        //! An adding patch added.
+        AddingPatchAdded = 8,
+
+        //! A removing patch added.
+        RemovingPatchAdded = 9,
+
+        //! An adding patch added.
+        AddingPatchRemoved = 10,
+
+        //! A removing patch added.
+        RemovingPatchRemoved = 11,
+    };
+
+    //! Construct a QsciLexerDiff with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerDiff(QObject *parent = 0);
+
+    //! Destroys the QsciLexerDiff instance.
+    virtual ~QsciLexerDiff();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    QColor defaultColor(int style) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+private:
+    QsciLexerDiff(const QsciLexerDiff &);
+    QsciLexerDiff &operator=(const QsciLexerDiff &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexeredifact.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,96 @@
+// This defines the interface to the QsciLexerEDIFACT class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXEREDIFACT_H
+#define QSCILEXEREDIFACT_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerEDIFACT class encapsulates the Scintilla EDIFACT lexer.
+class QSCINTILLA_EXPORT QsciLexerEDIFACT : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! EDIFACT lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A segment start.
+        SegmentStart = 1,
+
+        //! A segment end.
+        SegmentEnd = 2,
+
+        //! An element separator.
+        ElementSeparator = 3,
+
+        //! A composite separator.
+        CompositeSeparator = 4,
+
+        //! A release separator.
+        ReleaseSeparator = 5,
+
+        //! A UNA segment header.
+        UNASegmentHeader = 6,
+
+        //! A UNH segment header.
+        UNHSegmentHeader = 7,
+
+        //! A bad segment.
+        BadSegment = 8,
+    };
+
+    //! Construct a QsciLexerEDIFACT with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerEDIFACT(QObject *parent = 0);
+
+    //! Destroys the QsciLexerEDIFACT instance.
+    virtual ~QsciLexerEDIFACT();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+private:
+    QsciLexerEDIFACT(const QsciLexerEDIFACT &);
+    QsciLexerEDIFACT &operator=(const QsciLexerEDIFACT &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerfortran.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,59 @@
+// This defines the interface to the QsciLexerFortran class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERFORTRAN_H
+#define QSCILEXERFORTRAN_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexerfortran77.h>
+
+
+//! \brief The QsciLexerFortran class encapsulates the Scintilla Fortran lexer.
+class QSCINTILLA_EXPORT QsciLexerFortran : public QsciLexerFortran77
+{
+    Q_OBJECT
+
+public:
+    //! Construct a QsciLexerFortran with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerFortran(QObject *parent = 0);
+
+    //! Destroys the QsciLexerFortran instance.
+    virtual ~QsciLexerFortran();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+private:
+    QsciLexerFortran(const QsciLexerFortran &);
+    QsciLexerFortran &operator=(const QsciLexerFortran &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerfortran77.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,168 @@
+// This defines the interface to the QsciLexerFortran77 class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERFORTRAN77_H
+#define QSCILEXERFORTRAN77_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerFortran77 class encapsulates the Scintilla Fortran77
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerFortran77 : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Fortran77 lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A number.
+        Number = 2,
+
+        //! A single-quoted string.
+        SingleQuotedString = 3,
+
+        //! A double-quoted string.
+        DoubleQuotedString = 4,
+
+        //! The end of a line where a string is not closed.
+        UnclosedString = 5,
+
+        //! An operator.
+        Operator = 6,
+
+        //! An identifier
+        Identifier = 7,
+
+        //! A keyword.
+        Keyword = 8,
+
+        //! An intrinsic function.
+        IntrinsicFunction = 9,
+
+        //! An extended, non-standard or user defined function.
+        ExtendedFunction = 10,
+
+        //! A pre-processor block.
+        PreProcessor = 11,
+
+        //! An operator in .NAME. format.
+        DottedOperator = 12,
+
+        //! A label.
+        Label = 13,
+
+        //! A continuation.
+        Continuation = 14
+    };
+
+    //! Construct a QsciLexerFortran77 with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerFortran77(QObject *parent = 0);
+
+    //! Destroys the QsciLexerFortran77 instance.
+    virtual ~QsciLexerFortran77();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+public slots:
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    //! \sa writeProperties()
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    //! \sa readProperties()
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCompactProp();
+
+    bool fold_compact;
+
+    QsciLexerFortran77(const QsciLexerFortran77 &);
+    QsciLexerFortran77 &operator=(const QsciLexerFortran77 &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerhtml.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,532 @@
+// This defines the interface to the QsciLexerHTML class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERHTML_H
+#define QSCILEXERHTML_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerHTML class encapsulates the Scintilla HTML lexer.
+class QSCINTILLA_EXPORT QsciLexerHTML : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! HTML lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A tag.
+        Tag = 1,
+
+        //! An unknown tag.
+        UnknownTag = 2,
+
+        //! An attribute.
+        Attribute = 3,
+
+        //! An unknown attribute.
+        UnknownAttribute = 4,
+
+        //! An HTML number.
+        HTMLNumber = 5,
+
+        //! An HTML double-quoted string.
+        HTMLDoubleQuotedString = 6,
+
+        //! An HTML single-quoted string.
+        HTMLSingleQuotedString = 7,
+
+        //! Other text within a tag.
+        OtherInTag = 8,
+
+        //! An HTML comment.
+        HTMLComment = 9,
+
+        //! An entity.
+        Entity = 10,
+
+        //! The end of an XML style tag.
+        XMLTagEnd = 11,
+
+        //! The start of an XML fragment.
+        XMLStart = 12,
+
+        //! The end of an XML fragment.
+        XMLEnd = 13,
+
+        //! A script tag.
+        Script = 14,
+
+        //! The start of an ASP fragment with @.
+        ASPAtStart = 15,
+
+        //! The start of an ASP fragment.
+        ASPStart = 16,
+
+        //! CDATA.
+        CDATA = 17,
+
+        //! The start of a PHP fragment.
+        PHPStart = 18,
+
+        //! An unquoted HTML value.
+        HTMLValue = 19,
+
+        //! An ASP X-Code comment.
+        ASPXCComment = 20,
+
+        //! The default for SGML.
+        SGMLDefault = 21,
+
+        //! An SGML command.
+        SGMLCommand = 22,
+
+        //! The first parameter of an SGML command.
+        SGMLParameter = 23,
+
+        //! An SGML double-quoted string.
+        SGMLDoubleQuotedString = 24,
+
+        //! An SGML single-quoted string.
+        SGMLSingleQuotedString = 25,
+
+        //! An SGML error.
+        SGMLError = 26,
+
+        //! An SGML special entity.
+        SGMLSpecial = 27,
+
+        //! An SGML entity.
+        SGMLEntity = 28,
+
+        //! An SGML comment.
+        SGMLComment = 29,
+
+        //! A comment with the first parameter of an SGML command.
+        SGMLParameterComment = 30,
+
+        //! The default for an SGML block.
+        SGMLBlockDefault = 31,
+
+        //! The start of a JavaScript fragment.
+        JavaScriptStart = 40,
+
+        //! The default for JavaScript.
+        JavaScriptDefault = 41,
+
+        //! A JavaScript comment.
+        JavaScriptComment = 42,
+
+        //! A JavaScript line comment.
+        JavaScriptCommentLine = 43,
+
+        //! A JavaDoc style JavaScript comment.
+        JavaScriptCommentDoc = 44,
+
+        //! A JavaScript number.
+        JavaScriptNumber = 45,
+
+        //! A JavaScript word.
+        JavaScriptWord = 46,
+
+        //! A JavaScript keyword.
+        JavaScriptKeyword = 47,
+
+        //! A JavaScript double-quoted string.
+        JavaScriptDoubleQuotedString = 48,
+
+        //! A JavaScript single-quoted string.
+        JavaScriptSingleQuotedString = 49,
+
+        //! A JavaScript symbol.
+        JavaScriptSymbol = 50,
+
+        //! The end of a JavaScript line where a string is not closed.
+        JavaScriptUnclosedString = 51,
+
+        //! A JavaScript regular expression.
+        JavaScriptRegex = 52,
+
+        //! The start of an ASP JavaScript fragment.
+        ASPJavaScriptStart = 55,
+
+        //! The default for ASP JavaScript.
+        ASPJavaScriptDefault = 56,
+
+        //! An ASP JavaScript comment.
+        ASPJavaScriptComment = 57,
+
+        //! An ASP JavaScript line comment.
+        ASPJavaScriptCommentLine = 58,
+
+        //! An ASP JavaDoc style JavaScript comment.
+        ASPJavaScriptCommentDoc = 59,
+
+        //! An ASP JavaScript number.
+        ASPJavaScriptNumber = 60,
+
+        //! An ASP JavaScript word.
+        ASPJavaScriptWord = 61,
+
+        //! An ASP JavaScript keyword.
+        ASPJavaScriptKeyword = 62,
+
+        //! An ASP JavaScript double-quoted string.
+        ASPJavaScriptDoubleQuotedString = 63,
+
+        //! An ASP JavaScript single-quoted string.
+        ASPJavaScriptSingleQuotedString = 64,
+
+        //! An ASP JavaScript symbol.
+        ASPJavaScriptSymbol = 65,
+
+        //! The end of an ASP JavaScript line where a string is not
+        //! closed.
+        ASPJavaScriptUnclosedString = 66,
+
+        //! An ASP JavaScript regular expression.
+        ASPJavaScriptRegex = 67,
+
+        //! The start of a VBScript fragment.
+        VBScriptStart = 70,
+
+        //! The default for VBScript.
+        VBScriptDefault = 71,
+
+        //! A VBScript comment.
+        VBScriptComment = 72,
+
+        //! A VBScript number.
+        VBScriptNumber = 73,
+
+        //! A VBScript keyword.
+        VBScriptKeyword = 74,
+
+        //! A VBScript string.
+        VBScriptString = 75,
+
+        //! A VBScript identifier.
+        VBScriptIdentifier = 76,
+
+        //! The end of a VBScript line where a string is not closed.
+        VBScriptUnclosedString = 77,
+
+        //! The start of an ASP VBScript fragment.
+        ASPVBScriptStart = 80,
+
+        //! The default for ASP VBScript.
+        ASPVBScriptDefault = 81,
+
+        //! An ASP VBScript comment.
+        ASPVBScriptComment = 82,
+
+        //! An ASP VBScript number.
+        ASPVBScriptNumber = 83,
+
+        //! An ASP VBScript keyword.
+        ASPVBScriptKeyword = 84,
+
+        //! An ASP VBScript string.
+        ASPVBScriptString = 85,
+
+        //! An ASP VBScript identifier.
+        ASPVBScriptIdentifier = 86,
+
+        //! The end of an ASP VBScript line where a string is not
+        //! closed.
+        ASPVBScriptUnclosedString = 87,
+
+        //! The start of a Python fragment.
+        PythonStart = 90,
+
+        //! The default for Python.
+        PythonDefault = 91,
+
+        //! A Python comment.
+        PythonComment = 92,
+
+        //! A Python number.
+        PythonNumber = 93,
+
+        //! A Python double-quoted string.
+        PythonDoubleQuotedString = 94,
+
+        //! A Python single-quoted string.
+        PythonSingleQuotedString = 95,
+
+        //! A Python keyword.
+        PythonKeyword = 96,
+
+        //! A Python triple single-quoted string.
+        PythonTripleSingleQuotedString = 97,
+
+        //! A Python triple double-quoted string.
+        PythonTripleDoubleQuotedString = 98,
+
+        //! The name of a Python class.
+        PythonClassName = 99,
+
+        //! The name of a Python function or method.
+        PythonFunctionMethodName = 100,
+
+        //! A Python operator.
+        PythonOperator = 101,
+
+        //! A Python identifier.
+        PythonIdentifier = 102,
+
+        //! The start of an ASP Python fragment.
+        ASPPythonStart = 105,
+
+        //! The default for ASP Python.
+        ASPPythonDefault = 106,
+
+        //! An ASP Python comment.
+        ASPPythonComment = 107,
+
+        //! An ASP Python number.
+        ASPPythonNumber = 108,
+
+        //! An ASP Python double-quoted string.
+        ASPPythonDoubleQuotedString = 109,
+
+        //! An ASP Python single-quoted string.
+        ASPPythonSingleQuotedString = 110,
+
+        //! An ASP Python keyword.
+        ASPPythonKeyword = 111,
+
+        //! An ASP Python triple single-quoted string.
+        ASPPythonTripleSingleQuotedString = 112,
+
+        //! An ASP Python triple double-quoted string.
+        ASPPythonTripleDoubleQuotedString = 113,
+
+        //! The name of an ASP Python class.
+        ASPPythonClassName = 114,
+
+        //! The name of an ASP Python function or method.
+        ASPPythonFunctionMethodName = 115,
+
+        //! An ASP Python operator.
+        ASPPythonOperator = 116,
+
+        //! An ASP Python identifier
+        ASPPythonIdentifier = 117,
+
+        //! The default for PHP.
+        PHPDefault = 118,
+
+        //! A PHP double-quoted string.
+        PHPDoubleQuotedString = 119,
+
+        //! A PHP single-quoted string.
+        PHPSingleQuotedString = 120,
+
+        //! A PHP keyword.
+        PHPKeyword = 121,
+
+        //! A PHP number.
+        PHPNumber = 122,
+
+        //! A PHP variable.
+        PHPVariable = 123,
+
+        //! A PHP comment.
+        PHPComment = 124,
+
+        //! A PHP line comment.
+        PHPCommentLine = 125,
+
+        //! A PHP double-quoted variable.
+        PHPDoubleQuotedVariable = 126,
+
+        //! A PHP operator.
+        PHPOperator = 127
+    };
+
+    //! Construct a QsciLexerHTML with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerHTML(QObject *parent = 0);
+
+    //! Destroys the QsciLexerHTML instance.
+    virtual ~QsciLexerHTML();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the auto-completion fillup characters.
+    const char *autoCompletionFillups() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! Returns true if tags are case sensitive.
+    //!
+    //! \sa setCaseSensitiveTags()
+    bool caseSensitiveTags() const {return case_sens_tags;}
+
+    //! If \a enabled is true then Django templates are enabled.  The default
+    //! is false.
+    //!
+    //! \sa djangoTemplates()
+    void setDjangoTemplates(bool enabled);
+
+    //! Returns true if support for Django templates is enabled.
+    //!
+    //! \sa setDjangoTemplates()
+    bool djangoTemplates() const {return django_templates;}
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const {return fold_compact;}
+
+    //! Returns true if preprocessor blocks can be folded.
+    //!
+    //! \sa setFoldPreprocessor()
+    bool foldPreprocessor() const {return fold_preproc;}
+
+    //! If \a fold is true then script comments can be folded.  The default is
+    //! false.
+    //!
+    //! \sa foldScriptComments()
+    void setFoldScriptComments(bool fold);
+
+    //! Returns true if script comments can be folded.
+    //!
+    //! \sa setFoldScriptComments()
+    bool foldScriptComments() const {return fold_script_comments;}
+
+    //! If \a fold is true then script heredocs can be folded.  The default is
+    //! false.
+    //!
+    //! \sa foldScriptHeredocs()
+    void setFoldScriptHeredocs(bool fold);
+
+    //! Returns true if script heredocs can be folded.
+    //!
+    //! \sa setFoldScriptHeredocs()
+    bool foldScriptHeredocs() const {return fold_script_heredocs;}
+
+    //! If \a enabled is true then Mako templates are enabled.  The default is
+    //! false.
+    //!
+    //! \sa makoTemplates()
+    void setMakoTemplates(bool enabled);
+
+    //! Returns true if support for Mako templates is enabled.
+    //!
+    //! \sa setMakoTemplates()
+    bool makoTemplates() const {return mako_templates;}
+
+public slots:
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+    //! If \a fold is true then preprocessor blocks can be folded.  The
+    //! default is false.
+    //!
+    //! \sa foldPreprocessor()
+    virtual void setFoldPreprocessor(bool fold);
+
+    //! If \a sens is true then tags are case sensitive.  The default is false.
+    //!
+    //! \sa caseSensitiveTags()
+    virtual void setCaseSensitiveTags(bool sens);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCompactProp();
+    void setPreprocProp();
+    void setCaseSensTagsProp();
+    void setScriptCommentsProp();
+    void setScriptHeredocsProp();
+    void setDjangoProp();
+    void setMakoProp();
+
+    bool fold_compact;
+    bool fold_preproc;
+    bool case_sens_tags;
+    bool fold_script_comments;
+    bool fold_script_heredocs;
+    bool django_templates;
+    bool mako_templates;
+
+    QsciLexerHTML(const QsciLexerHTML &);
+    QsciLexerHTML &operator=(const QsciLexerHTML &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexeridl.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,64 @@
+// This defines the interface to the QsciLexerIDL class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERIDL_H
+#define QSCILEXERIDL_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexercpp.h>
+
+
+//! \brief The QsciLexerIDL class encapsulates the Scintilla IDL
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerIDL : public QsciLexerCPP
+{
+    Q_OBJECT
+
+public:
+    //! Construct a QsciLexerIDL with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexerIDL(QObject *parent = 0);
+
+    //! Destroys the QsciLexerIDL instance.
+    virtual ~QsciLexerIDL();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    QColor defaultColor(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+private:
+    QsciLexerIDL(const QsciLexerIDL &);
+    QsciLexerIDL &operator=(const QsciLexerIDL &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerjava.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,55 @@
+// This defines the interface to the QsciLexerJava class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERJAVA_H
+#define QSCILEXERJAVA_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexercpp.h>
+
+
+//! \brief The QsciLexerJava class encapsulates the Scintilla Java lexer.
+class QSCINTILLA_EXPORT QsciLexerJava : public QsciLexerCPP
+{
+    Q_OBJECT
+
+public:
+    //! Construct a QsciLexerJava with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerJava(QObject *parent = 0);
+
+    //! Destroys the QsciLexerJava instance.
+    virtual ~QsciLexerJava();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+private:
+    QsciLexerJava(const QsciLexerJava &);
+    QsciLexerJava &operator=(const QsciLexerJava &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerjavascript.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,81 @@
+// This defines the interface to the QsciLexerJavaScript class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERJSCRIPT_H
+#define QSCILEXERJSCRIPT_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexercpp.h>
+
+
+//! \brief The QsciLexerJavaScript class encapsulates the Scintilla JavaScript
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerJavaScript : public QsciLexerCPP
+{
+    Q_OBJECT
+
+public:
+    //! Construct a QsciLexerJavaScript with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerJavaScript(QObject *parent = 0);
+
+    //! Destroys the QsciLexerJavaScript instance.
+    virtual ~QsciLexerJavaScript();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+private:
+    friend class QsciLexerHTML;
+
+    static const char *keywordClass;
+
+    QsciLexerJavaScript(const QsciLexerJavaScript &);
+    QsciLexerJavaScript &operator=(const QsciLexerJavaScript &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerjson.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,184 @@
+// This defines the interface to the QsciLexerJSON class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERJSON_H
+#define QSCILEXERJSON_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerJSON class encapsulates the Scintilla JSON lexer.
+class QSCINTILLA_EXPORT QsciLexerJSON : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! JSON lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A number.
+        Number = 1,
+
+        //! A string.
+        String = 2,
+
+        //! An unclosed string.
+        UnclosedString = 3,
+
+        //! A property.
+        Property = 4,
+
+        //! An escape sequence.
+        EscapeSequence = 5,
+
+        //! A line comment.
+        CommentLine = 6,
+
+        //! A block comment.
+        CommentBlock = 7,
+
+        //! An operator.
+        Operator = 8,
+
+        //! An Internationalised Resource Identifier (IRI).
+        IRI = 9,
+
+        //! A JSON-LD compact IRI.
+        IRICompact = 10,
+
+        //! A JSON keyword.
+        Keyword = 11,
+
+        //! A JSON-LD keyword.
+        KeywordLD = 12,
+
+        //! A parsing error.
+        Error = 13,
+    };
+
+    //! Construct a QsciLexerJSON with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerJSON(QObject *parent = 0);
+
+    //! Destroys the QsciLexerJSON instance.
+    virtual ~QsciLexerJSON();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! If \a highlight is true then line and block comments will be
+    //! highlighted.  The default is true.
+    //!
+    //! \sa hightlightComments()
+    void setHighlightComments(bool highlight);
+
+    //! Returns true if line and block comments are highlighted
+    //!
+    //! \sa setHightlightComments()
+    bool highlightComments() const {return allow_comments;}
+
+    //! If \a highlight is true then escape sequences in strings are
+    //! highlighted.  The default is true.
+    //!
+    //! \sa highlightEscapeSequences()
+    void setHighlightEscapeSequences(bool highlight);
+
+    //! Returns true if escape sequences in strings are highlighted.
+    //!
+    //! \sa setHighlightEscapeSequences()
+    bool highlightEscapeSequences() const {return escape_sequence;}
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    void setFoldCompact(bool fold);
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const {return fold_compact;}
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+	void setAllowCommentsProp();
+	void setEscapeSequenceProp();
+	void setCompactProp();
+
+	bool allow_comments;
+	bool escape_sequence;
+	bool fold_compact;
+
+    QsciLexerJSON(const QsciLexerJSON &);
+    QsciLexerJSON &operator=(const QsciLexerJSON &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerlua.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,194 @@
+// This defines the interface to the QsciLexerLua class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERLUA_H
+#define QSCILEXERLUA_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerLua class encapsulates the Scintilla Lua
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerLua : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Lua lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A block comment.
+        Comment = 1,
+
+        //! A line comment.
+        LineComment = 2,
+
+        //! A number.
+        Number = 4,
+
+        //! A keyword.
+        Keyword = 5,
+
+        //! A string.
+        String = 6,
+
+        //! A character.
+        Character = 7,
+
+        //! A literal string.
+        LiteralString = 8,
+
+        //! Preprocessor
+        Preprocessor = 9,
+
+        //! An operator.
+        Operator = 10,
+
+        //! An identifier
+        Identifier = 11,
+
+        //! The end of a line where a string is not closed.
+        UnclosedString = 12,
+
+        //! Basic functions.
+        BasicFunctions = 13,
+
+        //! String, table and maths functions.
+        StringTableMathsFunctions = 14,
+
+        //! Coroutines, I/O and system facilities.
+        CoroutinesIOSystemFacilities = 15,
+
+        //! A keyword defined in keyword set number 5.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet5 = 16,
+
+        //! A keyword defined in keyword set number 6.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet6 = 17,
+
+        //! A keyword defined in keyword set number 7.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet7 = 18,
+
+        //! A keyword defined in keyword set number 8.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet8 = 19,
+
+        //! A label.
+        Label = 20
+    };
+
+    //! Construct a QsciLexerLua with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexerLua(QObject *parent = 0);
+
+    //! Destroys the QsciLexerLua instance.
+    virtual ~QsciLexerLua();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the character sequences that can separate
+    //! auto-completion words.
+    QStringList autoCompletionWordSeparators() const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStart(int *style = 0) const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+public slots:
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCompactProp();
+
+    bool fold_compact;
+
+    QsciLexerLua(const QsciLexerLua &);
+    QsciLexerLua &operator=(const QsciLexerLua &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexermakefile.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,105 @@
+// This defines the interface to the QsciLexerMakefile class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERMAKEFILE_H
+#define QSCILEXERMAKEFILE_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerMakefile class encapsulates the Scintilla
+//! Makefile lexer.
+class QSCINTILLA_EXPORT QsciLexerMakefile : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Makefile lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A pre-processor directive.
+        Preprocessor = 2,
+
+        //! A variable.
+        Variable = 3,
+
+        //! An operator.
+        Operator = 4,
+
+        //! A target.
+        Target = 5,
+
+        //! An error.
+        Error = 9
+    };
+
+    //! Construct a QsciLexerMakefile with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerMakefile(QObject *parent = 0);
+
+    //! Destroys the QsciLexerMakefile instance.
+    virtual ~QsciLexerMakefile();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+private:
+    QsciLexerMakefile(const QsciLexerMakefile &);
+    QsciLexerMakefile &operator=(const QsciLexerMakefile &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexermarkdown.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,148 @@
+// This defines the interface to the QsciLexerMarkdown class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERMARKDOWN_H
+#define QSCILEXERMARKDOWN_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerMarkdown class encapsulates the Scintilla Markdown
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerMarkdown : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Markdown lexer.
+
+    // Note that some values are omitted (ie. LINE_BEGIN and PRECHAR) as these
+    // seem to be internal state information rather than indicating that text
+    // should be styled differently.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! Special (e.g. end-of-line codes if enabled).
+        Special = 1,
+
+        //! Strong emphasis using double asterisks.
+        StrongEmphasisAsterisks = 2,
+
+        //! Strong emphasis using double underscores.
+        StrongEmphasisUnderscores = 3,
+
+        //! Emphasis using single asterisks.
+        EmphasisAsterisks = 4,
+
+        //! Emphasis using single underscores.
+        EmphasisUnderscores = 5,
+
+        //! A level 1 header.
+        Header1 = 6,
+
+        //! A level 2 header.
+        Header2 = 7,
+
+        //! A level 3 header.
+        Header3 = 8,
+
+        //! A level 4 header.
+        Header4 = 9,
+
+        //! A level 5 header.
+        Header5 = 10,
+
+        //! A level 6 header.
+        Header6 = 11,
+
+        //! Pre-char (up to three indent spaces, e.g. for a sub-list).
+        Prechar = 12,
+
+        //! An unordered list item.
+        UnorderedListItem = 13,
+
+        //! An ordered list item.
+        OrderedListItem = 14,
+
+        //! A block quote.
+        BlockQuote = 15,
+
+        //! Strike out.
+        StrikeOut = 16,
+
+        //! A horizontal rule.
+        HorizontalRule = 17,
+
+        //! A link.
+        Link = 18,
+
+        //! Code between backticks.
+        CodeBackticks = 19,
+
+        //! Code between double backticks.
+        CodeDoubleBackticks = 20,
+
+        //! A code block.
+        CodeBlock = 21,
+    };
+
+    //! Construct a QsciLexerMarkdown with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerMarkdown(QObject *parent = 0);
+
+    //! Destroys the QsciLexerMarkdown instance.
+    virtual ~QsciLexerMarkdown();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+private:
+    QsciLexerMarkdown(const QsciLexerMarkdown &);
+    QsciLexerMarkdown &operator=(const QsciLexerMarkdown &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexermatlab.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,104 @@
+// This defines the interface to the QsciLexerMatlab class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERMATLAB_H
+#define QSCILEXERMATLAB_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerMatlab class encapsulates the Scintilla Matlab file
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerMatlab : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Matlab file lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A command.
+        Command = 2,
+
+        //! A number.
+        Number = 3,
+
+        //! A keyword.
+        Keyword = 4,
+
+        //! A single quoted string.
+        SingleQuotedString = 5,
+
+        //! An operator
+        Operator = 6,
+
+        //! An identifier.
+        Identifier = 7,
+
+        //! A double quoted string.
+        DoubleQuotedString = 8
+    };
+
+    //! Construct a QsciLexerMatlab with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerMatlab(QObject *parent = 0);
+
+    //! Destroys the QsciLexerMatlab instance.
+    virtual ~QsciLexerMatlab();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+private:
+    QsciLexerMatlab(const QsciLexerMatlab &);
+    QsciLexerMatlab &operator=(const QsciLexerMatlab &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexeroctave.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,60 @@
+// This defines the interface to the QsciLexerOctave class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXEROCTAVE_H
+#define QSCILEXEROCTAVE_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexermatlab.h>
+
+
+//! \brief The QsciLexerOctave class encapsulates the Scintilla Octave file
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerOctave : public QsciLexerMatlab
+{
+    Q_OBJECT
+
+public:
+    //! Construct a QsciLexerOctave with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerOctave(QObject *parent = 0);
+
+    //! Destroys the QsciLexerOctave instance.
+    virtual ~QsciLexerOctave();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+private:
+    QsciLexerOctave(const QsciLexerOctave &);
+    QsciLexerOctave &operator=(const QsciLexerOctave &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerpascal.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,227 @@
+// This defines the interface to the QsciLexerPascal class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERPASCAL_H
+#define QSCILEXERPASCAL_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerPascal class encapsulates the Scintilla Pascal lexer.
+class QSCINTILLA_EXPORT QsciLexerPascal : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! C++ lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! An identifier
+        Identifier = 1,
+
+        //! A '{ ... }' style comment.
+        Comment = 2,
+
+        //! A '(* ... *)' style comment.
+        CommentParenthesis = 3,
+
+        //! A comment line.
+        CommentLine = 4,
+
+        //! A '{$ ... }' style pre-processor block.
+        PreProcessor = 5,
+
+        //! A '(*$ ... *)' style pre-processor block.
+        PreProcessorParenthesis = 6,
+
+        //! A number.
+        Number = 7,
+
+        //! A hexadecimal number.
+        HexNumber = 8,
+
+        //! A keyword.
+        Keyword = 9,
+
+        //! A single-quoted string.
+        SingleQuotedString = 10,
+
+        //! The end of a line where a string is not closed.
+        UnclosedString = 11,
+
+        //! A character.
+        Character = 12,
+
+        //! An operator.
+        Operator = 13,
+
+        //! Inline Asm.
+        Asm = 14
+    };
+
+    //! Construct a QsciLexerPascal with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerPascal(QObject *parent = 0);
+
+    //! Destroys the QsciLexerPascal instance.
+    virtual ~QsciLexerPascal();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the character sequences that can separate
+    //! auto-completion words.
+    QStringList autoCompletionWordSeparators() const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the end of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockEnd(int *style = 0) const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStart(int *style = 0) const;
+
+    //! \internal Returns a space separated list of keywords in a
+    //! particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStartKeyword(int *style = 0) const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const;
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+    //! Returns true if preprocessor blocks can be folded.
+    //!
+    //! \sa setFoldPreprocessor()
+    bool foldPreprocessor() const;
+
+    //! If \a enabled is true then some keywords will only be highlighted in an
+    //! appropriate context (similar to how the Delphi IDE works).  The default
+    //! is true.
+    //!
+    //! \sa smartHighlighting()
+    void setSmartHighlighting(bool enabled);
+
+    //! Returns true if some keywords will only be highlighted in an
+    //! appropriate context (similar to how the Delphi IDE works).
+    //!
+    //! \sa setSmartHighlighting()
+    bool smartHighlighting() const;
+
+public slots:
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+    //! If \a fold is true then preprocessor blocks can be folded.  The
+    //! default is true.
+    //!
+    //! \sa foldPreprocessor()
+    virtual void setFoldPreprocessor(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    //! \sa writeProperties()
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    //! \sa readProperties()
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCommentProp();
+    void setCompactProp();
+    void setPreprocProp();
+    void setSmartHighlightProp();
+
+    bool fold_comments;
+    bool fold_compact;
+    bool fold_preproc;
+    bool smart_highlight;
+
+    QsciLexerPascal(const QsciLexerPascal &);
+    QsciLexerPascal &operator=(const QsciLexerPascal &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerperl.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,312 @@
+// This defines the interface to the QsciLexerPerl class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERPERL_H
+#define QSCILEXERPERL_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerPerl class encapsulates the Scintilla Perl
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerPerl : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Perl lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! An error.
+        Error = 1,
+
+        //! A comment.
+        Comment = 2,
+
+        //! A POD.
+        POD = 3,
+
+        //! A number.
+        Number = 4,
+
+        //! A keyword.
+        Keyword = 5,
+
+        //! A double-quoted string.
+        DoubleQuotedString = 6,
+
+        //! A single-quoted string.
+        SingleQuotedString = 7,
+
+        //! An operator.
+        Operator = 10,
+
+        //! An identifier
+        Identifier = 11,
+
+        //! A scalar.
+        Scalar = 12,
+
+        //! An array.
+        Array = 13,
+
+        //! A hash.
+        Hash = 14,
+
+        //! A symbol table.
+        SymbolTable = 15,
+
+        //! A regular expression.
+        Regex = 17,
+
+        //! A substitution.
+        Substitution = 18,
+
+        //! Backticks.
+        Backticks = 20,
+
+        //! A data section.
+        DataSection = 21,
+
+        //! A here document delimiter.
+        HereDocumentDelimiter = 22,
+
+        //! A single quoted here document.
+        SingleQuotedHereDocument = 23,
+
+        //! A double quoted here document.
+        DoubleQuotedHereDocument = 24,
+
+        //! A backtick here document.
+        BacktickHereDocument = 25,
+
+        //! A quoted string (q).
+        QuotedStringQ = 26,
+
+        //! A quoted string (qq).
+        QuotedStringQQ = 27,
+
+        //! A quoted string (qx).
+        QuotedStringQX = 28,
+
+        //! A quoted string (qr).
+        QuotedStringQR = 29,
+
+        //! A quoted string (qw).
+        QuotedStringQW = 30,
+
+        //! A verbatim POD.
+        PODVerbatim = 31,
+
+        //! A Subroutine prototype.
+        SubroutinePrototype = 40,
+
+        //! A format identifier.
+        FormatIdentifier = 41,
+
+        //! A format body.
+        FormatBody = 42,
+
+        //! A double-quoted string (interpolated variable).
+        DoubleQuotedStringVar = 43,
+
+        //! A translation.
+        Translation = 44,
+
+        //! A regular expression (interpolated variable).
+        RegexVar = 54,
+
+        //! A substitution (interpolated variable).
+        SubstitutionVar = 55,
+
+        //! Backticks (interpolated variable).
+        BackticksVar = 57,
+
+        //! A double quoted here document (interpolated variable).
+        DoubleQuotedHereDocumentVar = 61,
+
+        //! A backtick here document (interpolated variable).
+        BacktickHereDocumentVar = 62,
+
+        //! A quoted string (qq, interpolated variable).
+        QuotedStringQQVar = 64,
+
+        //! A quoted string (qx, interpolated variable).
+        QuotedStringQXVar = 65,
+
+        //! A quoted string (qr, interpolated variable).
+        QuotedStringQRVar = 66
+    };
+
+    //! Construct a QsciLexerPerl with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerPerl(QObject *parent = 0);
+
+    //! Destroys the QsciLexerPerl instance.
+    virtual ~QsciLexerPerl();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the character sequences that can separate
+    //! auto-completion words.
+    QStringList autoCompletionWordSeparators() const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the end of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockEnd(int *style = 0) const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStart(int *style = 0) const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number
+    //! \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! If \a fold is true then "} else {" lines can be folded.  The default is
+    //! false.
+    //!
+    //! \sa foldAtElse()
+    void setFoldAtElse(bool fold);
+
+    //! Returns true if "} else {" lines can be folded.
+    //!
+    //! \sa setFoldAtElse()
+    bool foldAtElse() const {return fold_atelse;}
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const;
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+    //! If \a fold is true then packages can be folded.  The default is true.
+    //!
+    //! \sa foldPackages()
+    void setFoldPackages(bool fold);
+
+    //! Returns true if packages can be folded.
+    //!
+    //! \sa setFoldPackages()
+    bool foldPackages() const;
+
+    //! If \a fold is true then POD blocks can be folded.  The default is true.
+    //!
+    //! \sa foldPODBlocks()
+    void setFoldPODBlocks(bool fold);
+
+    //! Returns true if POD blocks can be folded.
+    //!
+    //! \sa setFoldPODBlocks()
+    bool foldPODBlocks() const;
+
+public slots:
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setAtElseProp();
+    void setCommentProp();
+    void setCompactProp();
+    void setPackagesProp();
+    void setPODBlocksProp();
+
+    bool fold_atelse;
+    bool fold_comments;
+    bool fold_compact;
+    bool fold_packages;
+    bool fold_pod_blocks;
+
+    QsciLexerPerl(const QsciLexerPerl &);
+    QsciLexerPerl &operator=(const QsciLexerPerl &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerpo.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,163 @@
+// This defines the interface to the QsciLexerPO class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERPO_H
+#define QSCILEXERPO_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerPO class encapsulates the Scintilla PO lexer.
+class QSCINTILLA_EXPORT QsciLexerPO : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! PO lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A message identifier.
+        MessageId = 2,
+
+        //! The text of a message identifier.
+        MessageIdText = 3,
+
+        //! A message string.
+        MessageString = 4,
+
+        //! The text of a message string.
+        MessageStringText = 5,
+
+        //! A message context.
+        MessageContext = 6,
+
+        //! The text of a message context.
+        MessageContextText = 7,
+
+        //! The "fuzzy" flag.
+        Fuzzy = 8,
+
+        //! A programmer comment.
+        ProgrammerComment = 9,
+
+        //! A reference.
+        Reference = 10,
+
+        //! A flag.
+        Flags = 11,
+
+        //! A message identifier text end-of-line.
+        MessageIdTextEOL = 12,
+
+        //! A message string text end-of-line.
+        MessageStringTextEOL = 13,
+
+        //! A message context text end-of-line.
+        MessageContextTextEOL = 14
+    };
+
+    //! Construct a QsciLexerPO with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexerPO(QObject *parent = 0);
+
+    //! Destroys the QsciLexerPO instance.
+    virtual ~QsciLexerPO();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the propertyChanged()
+    //! signal as required.
+    void refreshProperties();
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const;
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+public slots:
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCommentProp();
+    void setCompactProp();
+
+    bool fold_comments;
+    bool fold_compact;
+
+    QsciLexerPO(const QsciLexerPO &);
+    QsciLexerPO &operator=(const QsciLexerPO &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerpostscript.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,204 @@
+// This defines the interface to the QsciLexerPostScript class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERPOSTSCRIPT_H
+#define QSCILEXERPOSTSCRIPT_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerPostScript class encapsulates the Scintilla PostScript
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerPostScript : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! PostScript lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A DSC comment.
+        DSCComment = 2,
+
+        //! A DSC comment value.
+        DSCCommentValue = 3,
+
+        //! A number.
+        Number = 4,
+
+        //! A name.
+        Name = 5,
+
+        //! A keyword.
+        Keyword = 6,
+
+        //! A literal.
+        Literal = 7,
+
+        //! An immediately evaluated literal.
+        ImmediateEvalLiteral = 8,
+
+        //! Array parenthesis.
+        ArrayParenthesis = 9,
+
+        //! Dictionary parenthesis.
+        DictionaryParenthesis = 10,
+
+        //! Procedure parenthesis.
+        ProcedureParenthesis = 11,
+
+        //! Text.
+        Text = 12,
+
+        //! A hexadecimal string.
+        HexString = 13,
+
+        //! A base85 string.
+        Base85String = 14,
+
+        //! A bad string character.
+        BadStringCharacter = 15
+    };
+
+    //! Construct a QsciLexerPostScript with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerPostScript(QObject *parent = 0);
+
+    //! Destroys the QsciLexerPostScript instance.
+    virtual ~QsciLexerPostScript();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.  Set 5 can be used to provide
+    //! additional user defined keywords.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the propertyChanged()
+    //! signal as required.
+    void refreshProperties();
+
+    //! Returns true if tokens should be marked.
+    //!
+    //! \sa setTokenize()
+    bool tokenize() const;
+
+    //! Returns the PostScript level.
+    //!
+    //! \sa setLevel()
+    int level() const;
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+    //! Returns true if else blocks can be folded.
+    //!
+    //! \sa setFoldAtElse()
+    bool foldAtElse() const;
+
+public slots:
+    //! If \a tokenize is true then tokens are marked.  The default is false.
+    //!
+    //! \sa tokenize()
+    virtual void setTokenize(bool tokenize);
+
+    //! The PostScript level is set to \a level.  The default is 3.
+    //!
+    //! \sa level()
+    virtual void setLevel(int level);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+    //! If \a fold is true then else blocks can be folded.  The default is
+    //! false.
+    //!
+    //! \sa foldAtElse()
+    virtual void setFoldAtElse(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setTokenizeProp();
+    void setLevelProp();
+    void setCompactProp();
+    void setAtElseProp();
+
+    bool ps_tokenize;
+    int ps_level;
+    bool fold_compact;
+    bool fold_atelse;
+
+    QsciLexerPostScript(const QsciLexerPostScript &);
+    QsciLexerPostScript &operator=(const QsciLexerPostScript &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerpov.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,203 @@
+// This defines the interface to the QsciLexerPOV class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERPOV_H
+#define QSCILEXERPOV_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerPOV class encapsulates the Scintilla POV lexer.
+class QSCINTILLA_EXPORT QsciLexerPOV : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! POV lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A comment line.
+        CommentLine = 2,
+
+        //! A number.
+        Number = 3,
+
+        //! An operator.
+        Operator = 4,
+
+        //! An identifier
+        Identifier = 5,
+
+        //! A string.
+        String = 6,
+
+        //! The end of a line where a string is not closed.
+        UnclosedString = 7,
+
+        //! A directive.
+        Directive = 8,
+
+        //! A bad directive.
+        BadDirective = 9,
+
+        //! Objects, CSG and appearance.
+        ObjectsCSGAppearance = 10,
+
+        //! Types, modifiers and items.
+        TypesModifiersItems = 11,
+
+        //! Predefined identifiers.
+        PredefinedIdentifiers = 12,
+
+        //! Predefined identifiers.
+        PredefinedFunctions = 13,
+
+        //! A keyword defined in keyword set number 6.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet6 = 14,
+
+        //! A keyword defined in keyword set number 7.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet7 = 15,
+
+        //! A keyword defined in keyword set number 8.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet8 = 16
+    };
+
+    //! Construct a QsciLexerPOV with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexerPOV(QObject *parent = 0);
+
+    //! Destroys the QsciLexerPOV instance.
+    virtual ~QsciLexerPOV();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the propertyChanged()
+    //! signal as required.
+    void refreshProperties();
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const;
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+    //! Returns true if directives can be folded.
+    //!
+    //! \sa setFoldDirectives()
+    bool foldDirectives() const;
+
+public slots:
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+    //! If \a fold is true then directives can be folded.  The default is
+    //! false.
+    //!
+    //! \sa foldDirectives()
+    virtual void setFoldDirectives(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCommentProp();
+    void setCompactProp();
+    void setDirectiveProp();
+
+    bool fold_comments;
+    bool fold_compact;
+    bool fold_directives;
+
+    QsciLexerPOV(const QsciLexerPOV &);
+    QsciLexerPOV &operator=(const QsciLexerPOV &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerproperties.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,150 @@
+// This defines the interface to the QsciLexerProperties class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERPROPERTIES_H
+#define QSCILEXERPROPERTIES_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerProperties class encapsulates the Scintilla
+//! Properties lexer.
+class QSCINTILLA_EXPORT QsciLexerProperties : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Properties lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A section.
+        Section = 2,
+
+        //! An assignment operator.
+        Assignment = 3,
+
+        //! A default value.
+        DefaultValue = 4,
+
+        //! A key.
+        Key = 5
+    };
+
+    //! Construct a QsciLexerProperties with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerProperties(QObject *parent = 0);
+
+    //! Destroys the QsciLexerProperties instance.
+    virtual ~QsciLexerProperties();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the descriptive name for style number \a style.  If the style
+    //! is invalid for this language then an empty QString is returned.  This
+    //! is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const {return fold_compact;}
+
+    //! If \a enable is true then initial spaces in a line are allowed.  The
+    //! default is true.
+    //!
+    //! \sa initialSpaces()
+    void setInitialSpaces(bool enable);
+
+    //! Returns true if initial spaces in a line are allowed.
+    //!
+    //! \sa setInitialSpaces()
+    bool initialSpaces() const {return initial_spaces;}
+
+public slots:
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    //! \sa writeProperties()
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    //! \sa readProperties()
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCompactProp();
+    void setInitialSpacesProp();
+
+    bool fold_compact;
+    bool initial_spaces;
+
+    QsciLexerProperties(const QsciLexerProperties &);
+    QsciLexerProperties &operator=(const QsciLexerProperties &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerpython.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,333 @@
+// This defines the interface to the QsciLexerPython class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERPYTHON_H
+#define QSCILEXERPYTHON_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+#include "Qsci/qsciscintillabase.h"
+
+
+//! \brief The QsciLexerPython class encapsulates the Scintilla Python lexer.
+class QSCINTILLA_EXPORT QsciLexerPython : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Python lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A number.
+        Number = 2,
+
+        //! A double-quoted string.
+        DoubleQuotedString = 3,
+
+        //! A single-quoted string.
+        SingleQuotedString = 4,
+
+        //! A keyword.
+        Keyword = 5,
+
+        //! A triple single-quoted string.
+        TripleSingleQuotedString = 6,
+
+        //! A triple double-quoted string.
+        TripleDoubleQuotedString = 7,
+
+        //! The name of a class.
+        ClassName = 8,
+
+        //! The name of a function or method.
+        FunctionMethodName = 9,
+
+        //! An operator.
+        Operator = 10,
+
+        //! An identifier
+        Identifier = 11,
+
+        //! A comment block.
+        CommentBlock = 12,
+
+        //! The end of a line where a string is not closed.
+        UnclosedString = 13,
+
+        //! A highlighted identifier.  These are defined by keyword set
+        //! 2.  Reimplement keywords() to define keyword set 2.
+        HighlightedIdentifier = 14,
+
+        //! A decorator.
+        Decorator = 15,
+
+        //! A double-quoted f-string.
+        DoubleQuotedFString = 16,
+
+        //! A single-quoted f-string.
+        SingleQuotedFString = 17,
+
+        //! A triple single-quoted f-string.
+        TripleSingleQuotedFString = 18,
+
+        //! A triple double-quoted f-string.
+        TripleDoubleQuotedFString = 19,
+    };
+
+    //! This enum defines the different conditions that can cause
+    //! indentations to be displayed as being bad.
+    enum IndentationWarning {
+        //! Bad indentation is not displayed differently.
+        NoWarning = 0,
+
+        //! The indentation is inconsistent when compared to the
+        //! previous line, ie. it is made up of a different combination
+        //! of tabs and/or spaces.
+        Inconsistent = 1,
+
+        //! The indentation is made up of spaces followed by tabs.
+        TabsAfterSpaces = 2,
+
+        //! The indentation contains spaces.
+        Spaces = 3,
+
+        //! The indentation contains tabs.
+        Tabs = 4
+    };
+
+    //! Construct a QsciLexerPython with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerPython(QObject *parent = 0);
+
+    //! Destroys the QsciLexerPython instance.
+    virtual ~QsciLexerPython();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the character sequences that can separate
+    //! auto-completion words.
+    QStringList autoCompletionWordSeparators() const;
+
+    //! \internal Returns the number of lines prior to the current one when
+    //! determining the scope of a block when auto-indenting.
+    int blockLookback() const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStart(int *style = 0) const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! \internal Returns the view used for indentation guides.
+    virtual int indentationGuideView() const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! Returns true if indented comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const {return fold_comments;}
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    void setFoldCompact(bool fold);
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const {return fold_compact;}
+
+    //! Returns true if triple quoted strings can be folded.
+    //!
+    //! \sa setFoldQuotes()
+    bool foldQuotes() const {return fold_quotes;}
+
+    //! Returns the condition that will cause bad indentations to be
+    //! displayed.
+    //!
+    //! \sa setIndentationWarning()
+    QsciLexerPython::IndentationWarning indentationWarning() const {return indent_warn;}
+
+    //! If \a enabled is true then sub-identifiers defined in keyword set 2
+    //! will be highlighted.  For example, if it is false and "open" is defined
+    //! in keyword set 2 then "foo.open" will not be highlighted.  The default
+    //! is true.
+    //!
+    //! \sa highlightSubidentifiers()
+    void setHighlightSubidentifiers(bool enabled);
+
+    //! Returns true if string literals are allowed to span newline characters.
+    //!
+    //! \sa setHighlightSubidentifiers()
+    bool highlightSubidentifiers() const {return highlight_subids;}
+
+    //! If \a allowed is true then string literals are allowed to span newline
+    //! characters.  The default is false.
+    //!
+    //! \sa stringsOverNewlineAllowed()
+    void setStringsOverNewlineAllowed(bool allowed);
+
+    //! Returns true if string literals are allowed to span newline characters.
+    //!
+    //! \sa setStringsOverNewlineAllowed()
+    bool stringsOverNewlineAllowed() const {return strings_over_newline;}
+
+    //! If \a allowed is true then Python v2 unicode string literals (e.g.
+    //! u"utf8") are allowed.  The default is true.
+    //!
+    //! \sa v2UnicodeAllowed()
+    void setV2UnicodeAllowed(bool allowed);
+
+    //! Returns true if Python v2 unicode string literals (e.g. u"utf8") are
+    //! allowed.
+    //!
+    //! \sa setV2UnicodeAllowed()
+    bool v2UnicodeAllowed() const {return v2_unicode;}
+
+    //! If \a allowed is true then Python v3 binary and octal literals (e.g.
+    //! 0b1011, 0o712) are allowed.  The default is true.
+    //!
+    //! \sa v3BinaryOctalAllowed()
+    void setV3BinaryOctalAllowed(bool allowed);
+
+    //! Returns true if Python v3 binary and octal literals (e.g. 0b1011,
+    //! 0o712) are allowed.
+    //!
+    //! \sa setV3BinaryOctalAllowed()
+    bool v3BinaryOctalAllowed() const {return v3_binary_octal;}
+
+    //! If \a allowed is true then Python v3 bytes string literals (e.g.
+    //! b"bytes") are allowed.  The default is true.
+    //!
+    //! \sa v3BytesAllowed()
+    void setV3BytesAllowed(bool allowed);
+
+    //! Returns true if Python v3 bytes string literals (e.g. b"bytes") are
+    //! allowed.
+    //!
+    //! \sa setV3BytesAllowed()
+    bool v3BytesAllowed() const {return v3_bytes;}
+
+public slots:
+    //! If \a fold is true then indented comment blocks can be folded.  The
+    //! default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then triple quoted strings can be folded.  The
+    //! default is false.
+    //!
+    //! \sa foldQuotes()
+    virtual void setFoldQuotes(bool fold);
+
+    //! Sets the condition that will cause bad indentations to be
+    //! displayed.
+    //!
+    //! \sa indentationWarning()
+    virtual void setIndentationWarning(QsciLexerPython::IndentationWarning warn);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCommentProp();
+    void setCompactProp();
+    void setQuotesProp();
+    void setTabWhingeProp();
+    void setStringsOverNewlineProp();
+    void setV2UnicodeProp();
+    void setV3BinaryOctalProp();
+    void setV3BytesProp();
+    void setHighlightSubidsProp();
+
+    bool fold_comments;
+    bool fold_compact;
+    bool fold_quotes;
+    IndentationWarning indent_warn;
+    bool strings_over_newline;
+    bool v2_unicode;
+    bool v3_binary_octal;
+    bool v3_bytes;
+    bool highlight_subids;
+
+    friend class QsciLexerHTML;
+
+    static const char *keywordClass;
+
+    QsciLexerPython(const QsciLexerPython &);
+    QsciLexerPython &operator=(const QsciLexerPython &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerruby.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,240 @@
+// This defines the interface to the QsciLexerRuby class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERRUBY_H
+#define QSCILEXERRUBY_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerRuby class encapsulates the Scintilla Ruby lexer.
+class QSCINTILLA_EXPORT QsciLexerRuby : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Ruby lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! An error.
+        Error = 1,
+
+        //! A comment.
+        Comment = 2,
+
+        //! A POD.
+        POD = 3,
+
+        //! A number.
+        Number = 4,
+
+        //! A keyword.
+        Keyword = 5,
+
+        //! A double-quoted string.
+        DoubleQuotedString = 6,
+
+        //! A single-quoted string.
+        SingleQuotedString = 7,
+
+        //! The name of a class.
+        ClassName = 8,
+
+        //! The name of a function or method.
+        FunctionMethodName = 9,
+
+        //! An operator.
+        Operator = 10,
+
+        //! An identifier
+        Identifier = 11,
+
+        //! A regular expression.
+        Regex = 12,
+
+        //! A global.
+        Global = 13,
+
+        //! A symbol.
+        Symbol = 14,
+
+        //! The name of a module.
+        ModuleName = 15,
+
+        //! An instance variable.
+        InstanceVariable = 16,
+
+        //! A class variable.
+        ClassVariable = 17,
+
+        //! Backticks.
+        Backticks = 18,
+
+        //! A data section.
+        DataSection = 19,
+
+        //! A here document delimiter.
+        HereDocumentDelimiter = 20,
+
+        //! A here document.
+        HereDocument = 21,
+
+        //! A %q string.
+        PercentStringq = 24,
+
+        //! A %Q string.
+        PercentStringQ = 25,
+
+        //! A %x string.
+        PercentStringx = 26,
+
+        //! A %r string.
+        PercentStringr = 27,
+
+        //! A %w string.
+        PercentStringw = 28,
+
+        //! A demoted keyword.
+        DemotedKeyword = 29,
+
+        //! stdin.
+        Stdin = 30,
+
+        //! stdout.
+        Stdout = 31,
+
+        //! stderr.
+        Stderr = 40
+    };
+
+    //! Construct a QsciLexerRuby with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerRuby(QObject *parent = 0);
+
+    //! Destroys the QsciLexerRuby instance.
+    virtual ~QsciLexerRuby();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the end of a block for
+    //! auto-indentation.  The style is returned via \a style.
+    const char *blockEnd(int *style = 0) const;
+
+    //! \internal Returns a space separated list of words or characters in
+    //! a particular style that define the start of a block for
+    //! auto-indentation.  The styles is returned via \a style.
+    const char *blockStart(int *style = 0) const;
+
+    //! \internal Returns a space separated list of keywords in a
+    //! particular style that define the start of a block for
+    //! auto-indentation.  The style is returned via \a style.
+    const char *blockStartKeyword(int *style = 0) const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultpaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the style
+    //! is invalid for this language then an empty QString is returned.  This
+    //! is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    void setFoldComments(bool fold);
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const {return fold_comments;}
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    void setFoldCompact(bool fold);
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const {return fold_compact;}
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs, const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs, const QString &prefix) const;
+
+private:
+    void setCommentProp();
+    void setCompactProp();
+
+    bool fold_comments;
+    bool fold_compact;
+
+    QsciLexerRuby(const QsciLexerRuby &);
+    QsciLexerRuby &operator=(const QsciLexerRuby &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerspice.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,106 @@
+// This defines the interface to the QsciLexerSpice class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERSPICE_H
+#define QSCILEXERSPICE_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerSpice class encapsulates the Scintilla Spice lexer.
+class QSCINTILLA_EXPORT QsciLexerSpice : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Spice lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! An identifier.
+        Identifier = 1,
+
+        //! A command.
+        Command = 2,
+
+        //! A function.
+        Function = 3,
+
+        //! A parameter.
+        Parameter = 4,
+
+        //! A number.
+        Number = 5,
+
+        //! A delimiter.
+        Delimiter = 6,
+
+        //! A value.
+        Value = 7,
+
+        //! A comment.
+        Comment = 8
+    };
+
+    //! Construct a QsciLexerSpice with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerSpice(QObject *parent = 0);
+
+    //! Destroys the QsciLexerSpice instance.
+    virtual ~QsciLexerSpice();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+private:
+    QsciLexerSpice(const QsciLexerSpice &);
+    QsciLexerSpice &operator=(const QsciLexerSpice &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexersql.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,286 @@
+// This defines the interface to the QsciLexerSQL class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERSQL_H
+#define QSCILEXERSQL_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerSQL class encapsulates the Scintilla SQL lexer.
+class QSCINTILLA_EXPORT QsciLexerSQL : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! SQL lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A line comment.
+        CommentLine = 2,
+
+        //! A JavaDoc/Doxygen style comment.
+        CommentDoc = 3,
+
+        //! A number.
+        Number = 4,
+
+        //! A keyword.
+        Keyword = 5,
+
+        //! A double-quoted string.
+        DoubleQuotedString = 6,
+
+        //! A single-quoted string.
+        SingleQuotedString = 7,
+
+        //! An SQL*Plus keyword.
+        PlusKeyword = 8,
+
+        //! An SQL*Plus prompt.
+        PlusPrompt = 9,
+
+        //! An operator.
+        Operator = 10,
+
+        //! An identifier
+        Identifier = 11,
+
+        //! An SQL*Plus comment.
+        PlusComment = 13,
+
+        //! A '#' line comment.
+        CommentLineHash = 15,
+
+        //! A JavaDoc/Doxygen keyword.
+        CommentDocKeyword = 17,
+
+        //! A JavaDoc/Doxygen keyword error.
+        CommentDocKeywordError = 18,
+
+        //! A keyword defined in keyword set number 5.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        //! Note that keywords must be defined using lower case.
+        KeywordSet5 = 19,
+
+        //! A keyword defined in keyword set number 6.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        //! Note that keywords must be defined using lower case.
+        KeywordSet6 = 20,
+
+        //! A keyword defined in keyword set number 7.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        //! Note that keywords must be defined using lower case.
+        KeywordSet7 = 21,
+
+        //! A keyword defined in keyword set number 8.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        //! Note that keywords must be defined using lower case.
+        KeywordSet8 = 22,
+
+        //! A quoted identifier.
+        QuotedIdentifier = 23,
+
+        //! A quoted operator.
+        QuotedOperator = 24,
+    };
+
+    //! Construct a QsciLexerSQL with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexerSQL(QObject *parent = 0);
+
+    //! Destroys the QsciLexerSQL instance.
+    virtual ~QsciLexerSQL();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised by
+    //! the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the style
+    //! is invalid for this language then an empty QString is returned.  This
+    //! is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! Returns true if backslash escapes are enabled.
+    //!
+    //! \sa setBackslashEscapes()
+    bool backslashEscapes() const {return backslash_escapes;}
+
+    //! If \a enable is true then words may contain dots (i.e. periods or full
+    //! stops).  The default is false.
+    //!
+    //! \sa dottedWords()
+    void setDottedWords(bool enable);
+
+    //! Returns true if words may contain dots (i.e. periods or full stops).
+    //!
+    //! \sa setDottedWords()
+    bool dottedWords() const {return allow_dotted_word;}
+
+    //! If \a fold is true then ELSE blocks can be folded.  The default is
+    //! false.
+    //!
+    //! \sa foldAtElse()
+    void setFoldAtElse(bool fold);
+
+    //! Returns true if ELSE blocks can be folded.
+    //!
+    //! \sa setFoldAtElse()
+    bool foldAtElse() const {return at_else;}
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const {return fold_comments;}
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const {return fold_compact;}
+
+    //! If \a fold is true then only BEGIN blocks can be folded.  The default
+    //! is false.
+    //!
+    //! \sa foldOnlyBegin()
+    void setFoldOnlyBegin(bool fold);
+
+    //! Returns true if BEGIN blocks only can be folded.
+    //!
+    //! \sa setFoldOnlyBegin()
+    bool foldOnlyBegin() const {return only_begin;}
+
+    //! If \a enable is true then '#' is used as a comment character.  It is
+    //! typically enabled for MySQL and disabled for Oracle.  The default is
+    //! false.
+    //!
+    //! \sa hashComments()
+    void setHashComments(bool enable);
+
+    //! Returns true if '#' is used as a comment character.
+    //!
+    //! \sa setHashComments()
+    bool hashComments() const {return numbersign_comment;}
+
+    //! If \a enable is true then quoted identifiers are enabled.  The default
+    //! is false.
+    //!
+    //! \sa quotedIdentifiers()
+    void setQuotedIdentifiers(bool enable);
+
+    //! Returns true if quoted identifiers are enabled.
+    //!
+    //! \sa setQuotedIdentifiers()
+    bool quotedIdentifiers() const {return backticks_identifier;}
+
+public slots:
+    //! If \a enable is true then backslash escapes are enabled.  The
+    //! default is false.
+    //!
+    //! \sa backslashEscapes()
+    virtual void setBackslashEscapes(bool enable);
+
+    //! If \a fold is true then multi-line comment blocks can be folded.  The
+    //! default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs, const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs, const QString &prefix) const;
+
+private:
+    void setAtElseProp();
+    void setCommentProp();
+    void setCompactProp();
+    void setOnlyBeginProp();
+    void setBackticksIdentifierProp();
+    void setNumbersignCommentProp();
+    void setBackslashEscapesProp();
+    void setAllowDottedWordProp();
+
+    bool at_else;
+    bool fold_comments;
+    bool fold_compact;
+    bool only_begin;
+    bool backticks_identifier;
+    bool numbersign_comment;
+    bool backslash_escapes;
+    bool allow_dotted_word;
+
+    QsciLexerSQL(const QsciLexerSQL &);
+    QsciLexerSQL &operator=(const QsciLexerSQL &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexertcl.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,189 @@
+// This defines the interface to the QsciLexerTCL class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERTCL_H
+#define QSCILEXERTCL_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerTCL class encapsulates the Scintilla TCL lexer.
+class QSCINTILLA_EXPORT QsciLexerTCL : public QsciLexer
+{
+	Q_OBJECT
+
+public:
+	//! This enum defines the meanings of the different styles used by the TCL
+	//! lexer.
+	enum {
+		//! The default.
+		Default = 0,
+
+		//! A comment.
+		Comment = 1,
+
+		//! A comment line.
+		CommentLine = 2,
+
+		//! A number.
+		Number = 3,
+
+		//! A quoted keyword.
+		QuotedKeyword = 4,
+
+		//! A quoted string.
+		QuotedString = 5,
+
+		//! An operator.
+		Operator = 6,
+
+		//! An identifier
+		Identifier = 7,
+
+		//! A substitution.
+		Substitution = 8,
+
+		//! A substitution starting with a brace.
+		SubstitutionBrace = 9,
+
+		//! A modifier.
+		Modifier = 10,
+
+		//! Expand keyword (defined in keyword set number 5).
+		ExpandKeyword = 11,
+
+        //! A TCL keyword (defined in keyword set number 1).
+        TCLKeyword = 12,
+
+        //! A Tk keyword (defined in keyword set number 2).
+        TkKeyword = 13,
+
+        //! An iTCL keyword (defined in keyword set number 3).
+        ITCLKeyword = 14,
+
+        //! A Tk command (defined in keyword set number 4).
+        TkCommand = 15,
+
+        //! A keyword defined in keyword set number 6.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet6 = 16,
+
+        //! A keyword defined in keyword set number 7.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet7 = 17,
+
+        //! A keyword defined in keyword set number 8.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet8 = 18,
+
+        //! A keyword defined in keyword set number 9.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet9 = 19,
+
+        //! A comment box.
+        CommentBox = 20,
+
+        //! A comment block.
+        CommentBlock = 21
+	};
+
+	//! Construct a QsciLexerTCL with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+	QsciLexerTCL(QObject *parent = 0);
+
+	//! Destroys the QsciLexerTCL instance.
+	virtual ~QsciLexerTCL();
+
+	//! Returns the name of the language.
+	const char *language() const;
+
+	//! Returns the name of the lexer.  Some lexers support a number of
+	//! languages.
+	const char *lexer() const;
+
+	//! \internal Returns the style used for braces for brace matching.
+	int braceStyle() const;
+
+	//! Returns the foreground colour of the text for style number \a style.
+	//!
+	//! \sa defaultPaper()
+	QColor defaultColor(int style) const;
+
+	//! Returns the end-of-line fill for style number \a style.
+	bool defaultEolFill(int style) const;
+
+	//! Returns the font for style number \a style.
+	QFont defaultFont(int style) const;
+
+	//! Returns the background colour of the text for style number \a style.
+	//!
+	//! \sa defaultColor()
+	QColor defaultPaper(int style) const;
+
+	//! Returns the set of keywords for the keyword set \a set recognised
+	//! by the lexer as a space separated string.
+	const char *keywords(int set) const;
+
+	//! Returns the descriptive name for style number \a style.  If the style
+	//! is invalid for this language then an empty QString is returned.  This
+	//! is intended to be used in user preference dialogs.
+	QString description(int style) const;
+
+	//! Causes all properties to be refreshed by emitting the
+	//! propertyChanged() signal as required.
+	void refreshProperties();
+
+	//! If \a fold is true then multi-line comment blocks can be folded.  The
+    //! default is false.
+	//!
+	//! \sa foldComments()
+	void setFoldComments(bool fold);
+
+    //! Returns true if multi-line comment blocks can be folded.
+	//!
+	//! \sa setFoldComments()
+	bool foldComments() const {return fold_comments;}
+
+protected:
+	//! The lexer's properties are read from the settings \a qs.  \a prefix
+	//! (which has a trailing '/') should be used as a prefix to the key of
+	//! each setting.  true is returned if there is no error.
+	//!
+	bool readProperties(QSettings &qs,const QString &prefix);
+
+	//! The lexer's properties are written to the settings \a qs.
+	//! \a prefix (which has a trailing '/') should be used as a prefix to
+	//! the key of each setting.  true is returned if there is no error.
+	//!
+	bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+	void setCommentProp();
+
+	bool fold_comments;
+
+	QsciLexerTCL(const QsciLexerTCL &);
+	QsciLexerTCL &operator=(const QsciLexerTCL &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexertex.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,163 @@
+// This defines the interface to the QsciLexerTeX class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERTEX_H
+#define QSCILEXERTEX_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerTeX class encapsulates the Scintilla TeX lexer.
+class QSCINTILLA_EXPORT QsciLexerTeX : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! TeX lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A special.
+        Special = 1,
+
+        //! A group.
+        Group = 2,
+
+        //! A symbol.
+        Symbol = 3,
+
+        //! A command.
+        Command = 4,
+
+        //! Text.
+        Text = 5
+    };
+
+    //! Construct a QsciLexerTeX with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexerTeX(QObject *parent = 0);
+
+    //! Destroys the QsciLexerTeX instance.
+    virtual ~QsciLexerTeX();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    QColor defaultColor(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! If \a fold is true then multi-line comment blocks can be folded.  The
+    //! default is false.
+    //!
+    //! \sa foldComments()
+    void setFoldComments(bool fold);
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const {return fold_comments;}
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    void setFoldCompact(bool fold);
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const {return fold_compact;}
+
+    //! If \a enable is true then comments are processed as TeX source
+    //! otherwise they are ignored.  The default is false.
+    //!
+    //! \sa processComments()
+    void setProcessComments(bool enable);
+
+    //! Returns true if comments are processed as TeX source.
+    //!
+    //! \sa setProcessComments()
+    bool processComments() const {return process_comments;}
+
+    //! If \a enable is true then \\if<unknown> processed is processed as a
+    //! command.  The default is true.
+    //!
+    //! \sa processIf()
+    void setProcessIf(bool enable);
+
+    //! Returns true if \\if<unknown> is processed as a command.
+    //!
+    //! \sa setProcessIf()
+    bool processIf() const {return process_if;}
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs, const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs, const QString &prefix) const;
+
+private:
+    void setCommentProp();
+    void setCompactProp();
+    void setProcessCommentsProp();
+    void setAutoIfProp();
+
+    bool fold_comments;
+    bool fold_compact;
+    bool process_comments;
+    bool process_if;
+
+    QsciLexerTeX(const QsciLexerTeX &);
+    QsciLexerTeX &operator=(const QsciLexerTeX &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerverilog.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,257 @@
+// This defines the interface to the QsciLexerVerilog class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERVERILOG_H
+#define QSCILEXERVERILOG_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerVerilog class encapsulates the Scintilla Verilog
+//! lexer.
+class QSCINTILLA_EXPORT QsciLexerVerilog : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! Verilog lexer.
+    enum {
+        //! The default.
+        Default = 0,
+        InactiveDefault = Default + 64,
+
+        //! A comment.
+        Comment = 1,
+        InactiveComment = Comment + 64,
+
+        //! A line comment.
+        CommentLine = 2,
+        InactiveCommentLine = CommentLine + 64,
+
+        //! A bang comment.
+        CommentBang = 3,
+        InactiveCommentBang = CommentBang + 64,
+
+        //! A number
+        Number = 4,
+        InactiveNumber = Number + 64,
+
+        //! A keyword.
+        Keyword = 5,
+        InactiveKeyword = Keyword + 64,
+
+        //! A string.
+        String = 6,
+        InactiveString = String + 64,
+
+        //! A keyword defined in keyword set number 2.  The class must
+        //! be sub-classed and re-implement keywords() to make use of
+        //! this style.
+        KeywordSet2 = 7,
+        InactiveKeywordSet2 = KeywordSet2 + 64,
+
+        //! A system task.
+        SystemTask = 8,
+        InactiveSystemTask = SystemTask + 64,
+
+        //! A pre-processor block.
+        Preprocessor = 9,
+        InactivePreprocessor = Preprocessor + 64,
+
+        //! An operator.
+        Operator = 10,
+        InactiveOperator = Operator + 64,
+
+        //! An identifier.
+        Identifier = 11,
+        InactiveIdentifier = Identifier + 64,
+
+        //! The end of a line where a string is not closed.
+        UnclosedString = 12,
+        InactiveUnclosedString = UnclosedString + 64,
+
+        //! A keyword defined in keyword set number 4.  The class must
+        //! be sub-classed and re-implement keywords() to make use of
+        //! this style.  This set is intended to be used for user defined
+        //! identifiers and tasks.
+        UserKeywordSet = 19,
+        InactiveUserKeywordSet = UserKeywordSet + 64,
+
+        //! A keyword comment.
+        CommentKeyword = 20,
+        InactiveCommentKeyword = CommentKeyword + 64,
+
+        //! An input port declaration.
+        DeclareInputPort = 21,
+        InactiveDeclareInputPort = DeclareInputPort + 64,
+
+        //! An output port declaration.
+        DeclareOutputPort = 22,
+        InactiveDeclareOutputPort = DeclareOutputPort + 64,
+
+        //! An input/output port declaration.
+        DeclareInputOutputPort = 23,
+        InactiveDeclareInputOutputPort = DeclareInputOutputPort + 64,
+
+        //! A port connection.
+        PortConnection = 24,
+        InactivePortConnection = PortConnection + 64,
+    };
+
+    //! Construct a QsciLexerVerilog with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerVerilog(QObject *parent = 0);
+
+    //! Destroys the QsciLexerVerilog instance.
+    virtual ~QsciLexerVerilog();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the string of characters that comprise a word.
+    const char *wordCharacters() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! If \a fold is true then "} else {" lines can be folded.  The
+    //! default is false.
+    //!
+    //! \sa foldAtElse()
+    void setFoldAtElse(bool fold);
+
+    //! Returns true if "} else {" lines can be folded.
+    //!
+    //! \sa setFoldAtElse()
+    bool foldAtElse() const {return fold_atelse;}
+
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    void setFoldComments(bool fold);
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const {return fold_comments;}
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    void setFoldCompact(bool fold);
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const {return fold_compact;};
+
+    //! If \a fold is true then preprocessor blocks can be folded.  The
+    //! default is true.
+    //!
+    //! \sa foldPreprocessor()
+    void setFoldPreprocessor(bool fold);
+
+    //! Returns true if preprocessor blocks can be folded.
+    //!
+    //! \sa setFoldPreprocessor()
+    bool foldPreprocessor() const {return fold_preproc;};
+
+    //! If \a fold is true then modules can be folded.  The default is false.
+    //!
+    //! \sa foldAtModule()
+    void setFoldAtModule(bool fold);
+
+    //! Returns true if modules can be folded.
+    //!
+    //! \sa setFoldAtModule()
+    bool foldAtModule() const {return fold_atmodule;};
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    //! \sa writeProperties()
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    //! \sa readProperties()
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setAtElseProp();
+    void setCommentProp();
+    void setCompactProp();
+    void setPreprocProp();
+    void setAtModuleProp();
+
+    bool fold_atelse;
+    bool fold_comments;
+    bool fold_compact;
+    bool fold_preproc;
+    bool fold_atmodule;
+
+    QsciLexerVerilog(const QsciLexerVerilog &);
+    QsciLexerVerilog &operator=(const QsciLexerVerilog &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexervhdl.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,221 @@
+// This defines the interface to the QsciLexerVHDL class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERVHDL_H
+#define QSCILEXERVHDL_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerVHDL class encapsulates the Scintilla VHDL lexer.
+class QSCINTILLA_EXPORT QsciLexerVHDL : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! VHDL lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! A comment line.
+        CommentLine = 2,
+
+        //! A number.
+        Number = 3,
+
+        //! A string.
+        String = 4,
+
+        //! An operator.
+        Operator = 5,
+
+        //! An identifier
+        Identifier = 6,
+
+        //! The end of a line where a string is not closed.
+        UnclosedString = 7,
+
+        //! A keyword.
+        Keyword = 8,
+
+        //! A standard operator.
+        StandardOperator = 9,
+
+        //! An attribute.
+        Attribute = 10,
+
+        //! A standard function.
+        StandardFunction = 11,
+
+        //! A standard package.
+        StandardPackage = 12,
+
+        //! A standard type.
+        StandardType = 13,
+
+        //! A keyword defined in keyword set number 7.  The class must be
+        //! sub-classed and re-implement keywords() to make use of this style.
+        KeywordSet7 = 14,
+
+        //! A comment block.
+        CommentBlock = 15,
+    };
+
+    //! Construct a QsciLexerVHDL with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerVHDL(QObject *parent = 0);
+
+    //! Destroys the QsciLexerVHDL instance.
+    virtual ~QsciLexerVHDL();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! \internal Returns the style used for braces for brace matching.
+    int braceStyle() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the propertyChanged()
+    //! signal as required.
+    void refreshProperties();
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const;
+
+    //! Returns true if trailing blank lines are included in a fold block.
+    //!
+    //! \sa setFoldCompact()
+    bool foldCompact() const;
+
+    //! Returns true if else blocks can be folded.
+    //!
+    //! \sa setFoldAtElse()
+    bool foldAtElse() const;
+
+    //! Returns true if begin blocks can be folded.
+    //!
+    //! \sa setFoldAtBegin()
+    bool foldAtBegin() const;
+
+    //! Returns true if blocks can be folded at a parenthesis.
+    //!
+    //! \sa setFoldAtParenthesis()
+    bool foldAtParenthesis() const;
+
+public slots:
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is true.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+    //! If \a fold is true then trailing blank lines are included in a fold
+    //! block. The default is true.
+    //!
+    //! \sa foldCompact()
+    virtual void setFoldCompact(bool fold);
+
+    //! If \a fold is true then else blocks can be folded.  The default is
+    //! true.
+    //!
+    //! \sa foldAtElse()
+    virtual void setFoldAtElse(bool fold);
+
+    //! If \a fold is true then begin blocks can be folded.  The default is
+    //! true.
+    //!
+    //! \sa foldAtBegin()
+    virtual void setFoldAtBegin(bool fold);
+
+    //! If \a fold is true then blocks can be folded at a parenthesis.  The
+    //! default is true.
+    //!
+    //! \sa foldAtParenthesis()
+    virtual void setFoldAtParenthesis(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCommentProp();
+    void setCompactProp();
+    void setAtElseProp();
+    void setAtBeginProp();
+    void setAtParenthProp();
+
+    bool fold_comments;
+    bool fold_compact;
+    bool fold_atelse;
+    bool fold_atbegin;
+    bool fold_atparenth;
+
+    QsciLexerVHDL(const QsciLexerVHDL &);
+    QsciLexerVHDL &operator=(const QsciLexerVHDL &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexerxml.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,106 @@
+// This defines the interface to the QsciLexerXML class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERXML_H
+#define QSCILEXERXML_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexerhtml.h>
+
+
+//! \brief The QsciLexerXML class encapsulates the Scintilla XML lexer.
+class QSCINTILLA_EXPORT QsciLexerXML : public QsciLexerHTML
+{
+    Q_OBJECT
+
+public:
+    //! Construct a QsciLexerXML with parent \a parent.  \a parent is typically
+    //! the QsciScintilla instance.
+    QsciLexerXML(QObject *parent = 0);
+
+    //! Destroys the QsciLexerXML instance.
+    virtual ~QsciLexerXML();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Causes all properties to be refreshed by emitting the
+    //! propertyChanged() signal as required.
+    void refreshProperties();
+
+    //! If \a allowed is true then scripts are styled.  The default is true.
+    //!
+    //! \sa scriptsStyled()
+    void setScriptsStyled(bool styled);
+
+    //! Returns true if scripts are styled.
+    //!
+    //! \sa setScriptsStyled()
+    bool scriptsStyled() const;
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs, const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs, const QString &prefix) const;
+
+private:
+    void setScriptsProp();
+
+    bool scripts;
+
+    QsciLexerXML(const QsciLexerXML &);
+    QsciLexerXML &operator=(const QsciLexerXML &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscilexeryaml.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,147 @@
+// This defines the interface to the QsciLexerYAML class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCILEXERYAML_H
+#define QSCILEXERYAML_H
+
+#include <QObject>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscilexer.h>
+
+
+//! \brief The QsciLexerYAML class encapsulates the Scintilla YAML lexer.
+class QSCINTILLA_EXPORT QsciLexerYAML : public QsciLexer
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the meanings of the different styles used by the
+    //! YAML lexer.
+    enum {
+        //! The default.
+        Default = 0,
+
+        //! A comment.
+        Comment = 1,
+
+        //! An identifier.
+        Identifier = 2,
+
+        //! A keyword
+        Keyword = 3,
+
+        //! A number.
+        Number = 4,
+
+        //! A reference.
+        Reference = 5,
+
+        //! A document delimiter.
+        DocumentDelimiter = 6,
+
+        //! A text block marker.
+        TextBlockMarker = 7,
+
+        //! A syntax error marker.
+        SyntaxErrorMarker = 8,
+
+        //! An operator.
+        Operator = 9
+    };
+
+    //! Construct a QsciLexerYAML with parent \a parent.  \a parent is
+    //! typically the QsciScintilla instance.
+    QsciLexerYAML(QObject *parent = 0);
+
+    //! Destroys the QsciLexerYAML instance.
+    virtual ~QsciLexerYAML();
+
+    //! Returns the name of the language.
+    const char *language() const;
+
+    //! Returns the name of the lexer.  Some lexers support a number of
+    //! languages.
+    const char *lexer() const;
+
+    //! Returns the foreground colour of the text for style number \a style.
+    //!
+    //! \sa defaultPaper()
+    QColor defaultColor(int style) const;
+
+    //! Returns the end-of-line fill for style number \a style.
+    bool defaultEolFill(int style) const;
+
+    //! Returns the font for style number \a style.
+    QFont defaultFont(int style) const;
+
+    //! Returns the background colour of the text for style number \a style.
+    //!
+    //! \sa defaultColor()
+    QColor defaultPaper(int style) const;
+
+    //! Returns the set of keywords for the keyword set \a set recognised
+    //! by the lexer as a space separated string.
+    const char *keywords(int set) const;
+
+    //! Returns the descriptive name for style number \a style.  If the
+    //! style is invalid for this language then an empty QString is returned.
+    //! This is intended to be used in user preference dialogs.
+    QString description(int style) const;
+
+    //! Causes all properties to be refreshed by emitting the propertyChanged()
+    //! signal as required.
+    void refreshProperties();
+
+    //! Returns true if multi-line comment blocks can be folded.
+    //!
+    //! \sa setFoldComments()
+    bool foldComments() const;
+
+public slots:
+    //! If \a fold is true then multi-line comment blocks can be folded.
+    //! The default is false.
+    //!
+    //! \sa foldComments()
+    virtual void setFoldComments(bool fold);
+
+protected:
+    //! The lexer's properties are read from the settings \a qs.  \a prefix
+    //! (which has a trailing '/') should be used as a prefix to the key of
+    //! each setting.  true is returned if there is no error.
+    //!
+    bool readProperties(QSettings &qs,const QString &prefix);
+
+    //! The lexer's properties are written to the settings \a qs.
+    //! \a prefix (which has a trailing '/') should be used as a prefix to
+    //! the key of each setting.  true is returned if there is no error.
+    //!
+    bool writeProperties(QSettings &qs,const QString &prefix) const;
+
+private:
+    void setCommentProp();
+
+    bool fold_comments;
+
+    QsciLexerYAML(const QsciLexerYAML &);
+    QsciLexerYAML &operator=(const QsciLexerYAML &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscimacro.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,98 @@
+// This defines the interface to the QsciMacro class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCIMACRO_H
+#define QSCIMACRO_H
+
+#include <QList>
+#include <QObject>
+#include <QString>
+
+#include <Qsci/qsciglobal.h>
+
+
+class QsciScintilla;
+
+
+//! \brief The QsciMacro class represents a sequence of recordable editor
+//! commands.
+//!
+//! Methods are provided to convert convert a macro to and from a textual
+//! representation so that they can be easily written to and read from
+//! permanent storage.
+class QSCINTILLA_EXPORT QsciMacro : public QObject
+{
+    Q_OBJECT
+
+public:
+    //! Construct a QsciMacro with parent \a parent.
+    QsciMacro(QsciScintilla *parent);
+
+    //! Construct a QsciMacro from the printable ASCII representation \a asc,
+    //! with parent \a parent.
+    QsciMacro(const QString &asc, QsciScintilla *parent);
+
+    //! Destroy the QsciMacro instance.
+    virtual ~QsciMacro();
+
+    //! Clear the contents of the macro.
+    void clear();
+
+    //! Load the macro from the printable ASCII representation \a asc.  Returns
+    //! true if there was no error.
+    //!
+    //! \sa save()
+    bool load(const QString &asc);
+
+    //! Return a printable ASCII representation of the macro.  It is guaranteed
+    //! that only printable ASCII characters are used and that double quote
+    //! characters will not be used.
+    //!
+    //! \sa load()
+    QString save() const;
+
+public slots:
+    //! Play the macro.
+    virtual void play();
+
+    //! Start recording user commands and add them to the macro.
+    virtual void startRecording();
+
+    //! Stop recording user commands.
+    virtual void endRecording();
+
+private slots:
+    void record(unsigned int msg, unsigned long wParam, void *lParam);
+
+private:
+    struct Macro {
+        unsigned int msg;
+        unsigned long wParam;
+        QByteArray text;
+    };
+
+    QsciScintilla *qsci;
+    QList<Macro> macro;
+
+    QsciMacro(const QsciMacro &);
+    QsciMacro &operator=(const QsciMacro &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qsciprinter.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,112 @@
+// This module defines interface to the QsciPrinter class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCIPRINTER_H
+#define QSCIPRINTER_H
+
+// This is needed for Qt v5.0.0-alpha.
+#if defined(B0)
+#undef B0
+#endif
+
+#include <qprinter.h>
+
+#if !defined(QT_NO_PRINTER)
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qsciscintilla.h>
+
+
+QT_BEGIN_NAMESPACE
+class QRect;
+class QPainter;
+QT_END_NAMESPACE
+
+class QsciScintillaBase;
+
+
+//! \brief The QsciPrinter class is a sub-class of the Qt QPrinter class that
+//! is able to print the text of a Scintilla document.
+//!
+//! The class can be further sub-classed to alter to layout of the text, adding
+//! headers and footers for example.
+class QSCINTILLA_EXPORT QsciPrinter : public QPrinter
+{
+public:
+    //! Constructs a printer paint device with mode \a mode.
+    QsciPrinter(PrinterMode mode = ScreenResolution);
+
+    //! Destroys the QsciPrinter instance.
+    virtual ~QsciPrinter();
+
+    //! Format a page, by adding headers and footers for example, before the
+    //! document text is drawn on it.  \a painter is the painter to be used to
+    //! add customised text and graphics.  \a drawing is true if the page is
+    //! actually being drawn rather than being sized.  \a painter drawing
+    //! methods must only be called when \a drawing is true.  \a area is the
+    //! area of the page that will be used to draw the text.  This should be
+    //! modified if it is necessary to reserve space for any customised text or
+    //! graphics.  By default the area is relative to the printable area of the
+    //! page.  Use QPrinter::setFullPage() because calling printRange() if you
+    //! want to try and print over the whole page.  \a pagenr is the number of
+    //! the page.  The first page is numbered 1.
+    virtual void formatPage(QPainter &painter, bool drawing, QRect &area,
+            int pagenr);
+
+    //! Return the number of points to add to each font when printing.
+    //!
+    //! \sa setMagnification()
+    int magnification() const {return mag;}
+
+    //! Sets the number of points to add to each font when printing to \a
+    //! magnification.
+    //!
+    //! \sa magnification()
+    virtual void setMagnification(int magnification);
+
+    //! Print a range of lines from the Scintilla instance \a qsb.  \a from is
+    //! the first line to print and a negative value signifies the first line
+    //! of text.  \a to is the last line to print and a negative value
+    //! signifies the last line of text.  true is returned if there was no
+    //! error.
+    virtual int printRange(QsciScintillaBase *qsb, int from = -1, int to = -1);
+
+    //! Return the line wrap mode used when printing.  The default is
+    //! QsciScintilla::WrapWord.
+    //!
+    //! \sa setWrapMode()
+    QsciScintilla::WrapMode wrapMode() const {return wrap;}
+
+    //! Sets the line wrap mode used when printing to \a wmode.
+    //!
+    //! \sa wrapMode()
+    virtual void setWrapMode(QsciScintilla::WrapMode wmode);
+
+private:
+    int mag;
+    QsciScintilla::WrapMode wrap;
+
+    QsciPrinter(const QsciPrinter &);
+    QsciPrinter &operator=(const QsciPrinter &);
+};
+
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qsciscintilla.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,2313 @@
+// This module defines the "official" high-level API of the Qt port of
+// Scintilla.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCISCINTILLA_H
+#define QSCISCINTILLA_H
+
+#include <QByteArray>
+#include <QList>
+#include <QObject>
+#include <QPointer>
+#include <QStringList>
+
+#include <Qsci/qsciglobal.h>
+#include <Qsci/qscicommand.h>
+#include <Qsci/qscidocument.h>
+#include <Qsci/qsciscintillabase.h>
+
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QImage;
+class QIODevice;
+class QMenu;
+class QPoint;
+QT_END_NAMESPACE
+
+class QsciCommandSet;
+class QsciLexer;
+class QsciStyle;
+class QsciStyledText;
+class QsciListBoxQt;
+
+
+//! \brief The QsciScintilla class implements a higher level, more Qt-like,
+//! API to the Scintilla editor widget.
+//!
+//! QsciScintilla implements methods, signals and slots similar to those found
+//! in other Qt editor classes. It also provides a higher level interface to
+//! features specific to Scintilla such as syntax styling, call tips,
+//! auto-indenting and auto-completion than that provided by QsciScintillaBase.
+class QSCINTILLA_EXPORT QsciScintilla : public QsciScintillaBase
+{
+    Q_OBJECT
+
+public:
+    //! This enum defines the different auto-indentation styles.
+    enum {
+        //! A line is automatically indented to match the previous line.
+        AiMaintain = 0x01,
+
+        //! If the language supported by the current lexer has a specific start
+        //! of block character (e.g. { in C++), then a line that begins with
+        //! that character is indented as well as the lines that make up the
+        //! block.  It may be logically ored with AiClosing.
+        AiOpening = 0x02,
+
+        //! If the language supported by the current lexer has a specific end
+        //! of block character (e.g. } in C++), then a line that begins with
+        //! that character is indented as well as the lines that make up the
+        //! block.  It may be logically ored with AiOpening.
+        AiClosing = 0x04
+    };
+
+    //! This enum defines the different annotation display styles.
+    enum AnnotationDisplay {
+        //! Annotations are not displayed.
+        AnnotationHidden = ANNOTATION_HIDDEN,
+
+        //! Annotations are drawn left justified with no adornment.
+        AnnotationStandard = ANNOTATION_STANDARD,
+
+        //! Annotations are surrounded by a box.
+        AnnotationBoxed = ANNOTATION_BOXED,
+
+        //! Annotations are indented to match the text.
+        AnnotationIndented = ANNOTATION_INDENTED,
+    };
+
+    //! This enum defines the behavior if an auto-completion list contains a
+    //! single entry.
+    enum AutoCompletionUseSingle {
+        //! The single entry is not used automatically and the auto-completion
+        //! list is displayed.
+        AcusNever,
+
+        //! The single entry is used automatically when auto-completion is
+        //! explicitly requested (using autoCompleteFromAPIs() or
+        //! autoCompleteFromDocument()) but not when auto-completion is
+        //! triggered as the user types.
+        AcusExplicit,
+
+        //! The single entry is used automatically and the auto-completion list
+        //! is not displayed.
+        AcusAlways
+    };
+
+    //! This enum defines the different sources for auto-completion lists.
+    enum AutoCompletionSource {
+        //! No sources are used, ie. automatic auto-completion is disabled.
+        AcsNone,
+
+        //! The source is all available sources.
+        AcsAll,
+
+        //! The source is the current document.
+        AcsDocument,
+
+        //! The source is any installed APIs.
+        AcsAPIs
+    };
+
+    //! This enum defines the different brace matching modes.  The character
+    //! pairs {}, [] and () are treated as braces.  The Python lexer will also
+    //! match a : with the end of the corresponding indented block.
+    enum BraceMatch {
+        //! Brace matching is disabled.
+        NoBraceMatch,
+
+        //! Brace matching is enabled for a brace immediately before the
+        //! current position.
+        StrictBraceMatch,
+
+        //! Brace matching is enabled for a brace immediately before or after
+        //! the current position.
+        SloppyBraceMatch
+    };
+
+    //! This enum defines the different call tip positions.
+    enum CallTipsPosition {
+        //! Call tips are placed below the text.
+        CallTipsBelowText,
+
+        //! Call tips are placed above the text.
+        CallTipsAboveText,
+    };
+
+    //! This enum defines the different call tip styles.
+    enum CallTipsStyle {
+        //! Call tips are disabled.
+        CallTipsNone,
+
+        //! Call tips are displayed without a context.  A context is any scope
+        //! (e.g. a C++ namespace or a Python module) prior to the function
+        //! name.
+        CallTipsNoContext,
+
+        //! Call tips are displayed with a context only if the user hasn't
+        //! already implicitly identified the context using autocompletion.
+        //! Note that this style may not always be able to align the call tip
+        //! with the text being entered.
+        CallTipsNoAutoCompletionContext,
+
+        //! Call tips are displayed with a context.  Note that this style
+        //! may not always be able to align the call tip with the text being
+        //! entered.
+        CallTipsContext
+    };
+
+    //! This enum defines the different edge modes for long lines.
+    enum EdgeMode {
+        //! Long lines are not marked.
+        EdgeNone = EDGE_NONE,
+
+        //! A vertical line is drawn at the column set by setEdgeColumn().
+        //! This is recommended for monospace fonts.
+        EdgeLine = EDGE_LINE,
+
+        //! The background color of characters after the column limit is
+        //! changed to the color set by setEdgeColor().  This is recommended
+        //! for proportional fonts.
+        EdgeBackground = EDGE_BACKGROUND,
+
+        //! Multiple vertical lines are drawn at the columns defined by
+        //! multiple calls to addEdgeColumn().
+        EdgeMultipleLines = EDGE_MULTILINE,
+    };
+
+    //! This enum defines the different end-of-line modes.
+    enum EolMode {
+        //! A carriage return/line feed as used on Windows systems.
+        EolWindows = SC_EOL_CRLF,
+
+        //! A line feed as used on Unix systems, including OS/X.
+        EolUnix = SC_EOL_LF,
+
+        //! A carriage return as used on Mac systems prior to OS/X.
+        EolMac = SC_EOL_CR
+    };
+
+    //! This enum defines the different styles for the folding margin.
+    enum FoldStyle {
+        //! Folding is disabled.
+        NoFoldStyle,
+
+        //! Plain folding style using plus and minus symbols.
+        PlainFoldStyle,
+
+        //! Circled folding style using circled plus and minus symbols.
+        CircledFoldStyle,
+
+        //! Boxed folding style using boxed plus and minus symbols.
+        BoxedFoldStyle,
+
+        //! Circled tree style using a flattened tree with circled plus and
+        //! minus symbols and rounded corners.
+        CircledTreeFoldStyle,
+
+        //! Boxed tree style using a flattened tree with boxed plus and minus
+        //! symbols and right-angled corners.
+        BoxedTreeFoldStyle
+    };
+
+    //! This enum defines the different indicator styles.
+    enum IndicatorStyle {
+        //! A single straight underline.
+        PlainIndicator = INDIC_PLAIN,
+
+        //! A squiggly underline that requires 3 pixels of descender space.
+        SquiggleIndicator = INDIC_SQUIGGLE,
+
+        //! A line of small T shapes.
+        TTIndicator = INDIC_TT,
+
+        //! Diagonal hatching.
+        DiagonalIndicator = INDIC_DIAGONAL,
+
+        //! Strike out.
+        StrikeIndicator = INDIC_STRIKE,
+
+        //! An indicator with no visual appearence.
+        HiddenIndicator = INDIC_HIDDEN,
+
+        //! A rectangle around the text.
+        BoxIndicator = INDIC_BOX,
+
+        //! A rectangle with rounded corners around the text with the interior
+        //! usually more transparent than the border.
+        RoundBoxIndicator = INDIC_ROUNDBOX,
+
+        //! A rectangle around the text with the interior usually more
+        //! transparent than the border.  It does not colour the top pixel of
+        //! the line so that indicators on contiguous lines are visually
+        //! distinct and disconnected.
+        StraightBoxIndicator = INDIC_STRAIGHTBOX,
+
+        //! A rectangle around the text with the interior usually more
+        //! transparent than the border.  Unlike StraightBoxIndicator it covers
+        //! the entire character area.
+        FullBoxIndicator = INDIC_FULLBOX,
+
+        //! A dashed underline.
+        DashesIndicator = INDIC_DASH,
+
+        //! A dotted underline.
+        DotsIndicator = INDIC_DOTS,
+
+        //! A squiggly underline that requires 2 pixels of descender space and
+        //! so will fit under smaller fonts.
+        SquiggleLowIndicator = INDIC_SQUIGGLELOW,
+
+        //! A dotted rectangle around the text with the interior usually more
+        //! transparent than the border.
+        DotBoxIndicator = INDIC_DOTBOX,
+
+        //! A version of SquiggleIndicator that uses a pixmap.  This is quicker
+        //! but may be of lower quality.
+        SquigglePixmapIndicator = INDIC_SQUIGGLEPIXMAP,
+
+        //! A thick underline typically used for the target during Asian
+        //! language input composition.
+        ThickCompositionIndicator = INDIC_COMPOSITIONTHICK,
+
+        //! A thin underline typically used for non-target ranges during Asian
+        //! language input composition.
+        ThinCompositionIndicator = INDIC_COMPOSITIONTHIN,
+
+        //! The color of the text is set to the color of the indicator's
+        //! foreground.
+        TextColorIndicator = INDIC_TEXTFORE,
+
+        //! A triangle below the start of the indicator range.
+        TriangleIndicator = INDIC_POINT,
+
+        //! A triangle below the centre of the first character in the indicator
+        //! range.
+        TriangleCharacterIndicator = INDIC_POINTCHARACTER,
+
+        //! A vertical gradient between the indicator's foreground colour at
+        //! top to fully transparent at the bottom.
+        GradientIndicator = INDIC_GRADIENT,
+
+        //! A vertical gradient with the indicator's foreground colour in the
+        //! middle and fading to fully transparent at the top and bottom.
+        CentreGradientIndicator = INDIC_GRADIENTCENTRE,
+    };
+
+    //! This enum defines the different margin options.
+    enum {
+        //! Reset all margin options.
+        MoNone = SC_MARGINOPTION_NONE,
+
+        //! If this is set then only the first sub-line of a wrapped line will
+        //! be selected when clicking on a margin.
+        MoSublineSelect = SC_MARGINOPTION_SUBLINESELECT
+    };
+
+    //! This enum defines the different margin types.
+    enum MarginType {
+        //! The margin contains symbols, including those used for folding.
+        SymbolMargin = SC_MARGIN_SYMBOL,
+
+        //! The margin contains symbols and uses the default foreground color
+        //! as its background color.
+        SymbolMarginDefaultForegroundColor = SC_MARGIN_FORE,
+
+        //! The margin contains symbols and uses the default background color
+        //! as its background color.
+        SymbolMarginDefaultBackgroundColor = SC_MARGIN_BACK,
+
+        //! The margin contains line numbers.
+        NumberMargin = SC_MARGIN_NUMBER,
+
+        //! The margin contains styled text.
+        TextMargin = SC_MARGIN_TEXT,
+
+        //! The margin contains right justified styled text.
+        TextMarginRightJustified = SC_MARGIN_RTEXT,
+
+        //! The margin contains symbols and uses the color set by
+        //! setMarginBackgroundColor() as its background color.
+        SymbolMarginColor = SC_MARGIN_COLOUR,
+    };
+
+    //! This enum defines the different pre-defined marker symbols.
+    enum MarkerSymbol {
+        //! A circle.
+        Circle = SC_MARK_CIRCLE,
+
+        //! A rectangle.
+        Rectangle = SC_MARK_ROUNDRECT,
+
+        //! A triangle pointing to the right.
+        RightTriangle = SC_MARK_ARROW,
+
+        //! A smaller rectangle.
+        SmallRectangle = SC_MARK_SMALLRECT,
+
+        //! An arrow pointing to the right.
+        RightArrow = SC_MARK_SHORTARROW,
+
+        //! An invisible marker that allows code to track the movement
+        //! of lines.
+        Invisible = SC_MARK_EMPTY,
+
+        //! A triangle pointing down.
+        DownTriangle = SC_MARK_ARROWDOWN,
+
+        //! A drawn minus sign.
+        Minus = SC_MARK_MINUS,
+
+        //! A drawn plus sign.
+        Plus = SC_MARK_PLUS,
+
+        //! A vertical line drawn in the background colour.
+        VerticalLine = SC_MARK_VLINE,
+
+        //! A bottom left corner drawn in the background colour.
+        BottomLeftCorner = SC_MARK_LCORNER,
+
+        //! A vertical line with a centre right horizontal line drawn
+        //! in the background colour.
+        LeftSideSplitter = SC_MARK_TCORNER,
+
+        //! A drawn plus sign in a box.
+        BoxedPlus = SC_MARK_BOXPLUS,
+
+        //! A drawn plus sign in a connected box.
+        BoxedPlusConnected = SC_MARK_BOXPLUSCONNECTED,
+
+        //! A drawn minus sign in a box.
+        BoxedMinus = SC_MARK_BOXMINUS,
+
+        //! A drawn minus sign in a connected box.
+        BoxedMinusConnected = SC_MARK_BOXMINUSCONNECTED,
+
+        //! A rounded bottom left corner drawn in the background
+        //! colour.
+        RoundedBottomLeftCorner = SC_MARK_LCORNERCURVE,
+
+        //! A vertical line with a centre right curved line drawn in the
+        //! background colour.
+        LeftSideRoundedSplitter = SC_MARK_TCORNERCURVE,
+
+        //! A drawn plus sign in a circle.
+        CircledPlus = SC_MARK_CIRCLEPLUS,
+
+        //! A drawn plus sign in a connected box.
+        CircledPlusConnected = SC_MARK_CIRCLEPLUSCONNECTED,
+
+        //! A drawn minus sign in a circle.
+        CircledMinus = SC_MARK_CIRCLEMINUS,
+
+        //! A drawn minus sign in a connected circle.
+        CircledMinusConnected = SC_MARK_CIRCLEMINUSCONNECTED,
+
+        //! No symbol is drawn but the line is drawn with the same background
+        //! color as the marker's.
+        Background = SC_MARK_BACKGROUND,
+
+        //! Three drawn dots.
+        ThreeDots = SC_MARK_DOTDOTDOT,
+
+        //! Three drawn arrows pointing right.
+        ThreeRightArrows = SC_MARK_ARROWS,
+
+        //! A full rectangle (ie. the margin background) using the marker's
+        //! background color.
+        FullRectangle = SC_MARK_FULLRECT,
+
+        //! A left rectangle (ie. the left part of the margin background) using
+        //! the marker's background color.
+        LeftRectangle = SC_MARK_LEFTRECT,
+
+        //! No symbol is drawn but the line is drawn underlined using the
+        //! marker's background color.
+        Underline = SC_MARK_UNDERLINE,
+
+        //! A bookmark.
+        Bookmark = SC_MARK_BOOKMARK,
+    };
+
+    //! This enum defines how tab characters are drawn when whitespace is
+    //! visible.
+    enum TabDrawMode {
+        //! An arrow stretching to the tab stop.
+        TabLongArrow = SCTD_LONGARROW,
+
+        //! A horizontal line stretching to the tab stop.
+        TabStrikeOut = SCTD_STRIKEOUT,
+    };
+
+    //! This enum defines the different whitespace visibility modes.  When
+    //! whitespace is visible spaces are displayed as small centred dots and
+    //! tabs are displayed as light arrows pointing to the right.
+    enum WhitespaceVisibility {
+        //! Whitespace is invisible.
+        WsInvisible = SCWS_INVISIBLE,
+
+        //! Whitespace is always visible.
+        WsVisible = SCWS_VISIBLEALWAYS,
+
+        //! Whitespace is visible after the whitespace used for indentation.
+        WsVisibleAfterIndent = SCWS_VISIBLEAFTERINDENT,
+
+        //! Whitespace used for indentation is visible.
+        WsVisibleOnlyInIndent = SCWS_VISIBLEONLYININDENT,
+    };
+
+    //! This enum defines the different line wrap modes.
+    enum WrapMode {
+        //! Lines are not wrapped.
+        WrapNone = SC_WRAP_NONE,
+
+        //! Lines are wrapped at word boundaries.
+        WrapWord = SC_WRAP_WORD,
+
+        //! Lines are wrapped at character boundaries.
+        WrapCharacter = SC_WRAP_CHAR,
+
+        //! Lines are wrapped at whitespace boundaries.
+        WrapWhitespace = SC_WRAP_WHITESPACE,
+    };
+
+    //! This enum defines the different line wrap visual flags.
+    enum WrapVisualFlag {
+        //! No wrap flag is displayed.
+        WrapFlagNone,
+
+        //! A wrap flag is displayed by the text.
+        WrapFlagByText,
+
+        //! A wrap flag is displayed by the border.
+        WrapFlagByBorder,
+
+        //! A wrap flag is displayed in the line number margin.
+        WrapFlagInMargin
+    };
+
+    //! This enum defines the different line wrap indentation modes.
+    enum WrapIndentMode {
+        //! Wrapped sub-lines are indented by the amount set by
+        //! setWrapVisualFlags().
+        WrapIndentFixed = SC_WRAPINDENT_FIXED,
+
+        //! Wrapped sub-lines are indented by the same amount as the first
+        //! sub-line.
+        WrapIndentSame = SC_WRAPINDENT_SAME,
+
+        //! Wrapped sub-lines are indented by the same amount as the first
+        //! sub-line plus one more level of indentation.
+        WrapIndentIndented = SC_WRAPINDENT_INDENT,
+
+        //! Wrapped sub-lines are indented by the same amount as the first
+        //! sub-line plus two more level of indentation.
+        WrapIndentDeeplyIndented = SC_WRAPINDENT_DEEPINDENT
+    };
+
+    //! Construct an empty QsciScintilla with parent \a parent.
+    QsciScintilla(QWidget *parent = 0);
+
+    //! Destroys the QsciScintilla instance.
+    virtual ~QsciScintilla();
+
+    //! Returns the API context, which is a list of words, before the position
+    //! \a pos in the document.  The context can be used by auto-completion and
+    //! call tips to help to identify which API call the user is referring to.
+    //! In the default implementation the current lexer determines what
+    //! characters make up a word, and what characters determine the boundaries
+    //! of words (ie. the start characters).  If there is no current lexer then
+    //! the context will consist of a single word.  On return \a context_start
+    //! will contain the position in the document of the start of the context
+    //! and \a last_word_start will contain the position in the document of the
+    //! start of the last word of the context.
+    virtual QStringList apiContext(int pos, int &context_start,
+            int &last_word_start);
+
+    //! Annotate the line \a line with the text \a text using the style number
+    //! \a style.
+    void annotate(int line, const QString &text, int style);
+
+    //! Annotate the line \a line with the text \a text using the style \a
+    //! style.
+    void annotate(int line, const QString &text, const QsciStyle &style);
+
+    //! Annotate the line \a line with the styled text \a text.
+    void annotate(int line, const QsciStyledText &text);
+
+    //! Annotate the line \a line with the list of styled text \a text.
+    void annotate(int line, const QList<QsciStyledText> &text);
+
+    //! Returns the annotation on line \a line, if any.
+    QString annotation(int line) const;
+
+    //! Returns the display style for annotations.
+    //!
+    //! \sa setAnnotationDisplay()
+    AnnotationDisplay annotationDisplay() const;
+
+    //! The annotations on line \a line are removed.  If \a line is negative
+    //! then all annotations are removed.
+    void clearAnnotations(int line = -1);
+
+    //! Returns true if auto-completion lists are case sensitive.
+    //!
+    //! \sa setAutoCompletionCaseSensitivity()
+    bool autoCompletionCaseSensitivity() const;
+
+    //! Returns true if auto-completion fill-up characters are enabled.
+    //!
+    //! \sa setAutoCompletionFillups(), setAutoCompletionFillupsEnabled()
+    bool autoCompletionFillupsEnabled() const;
+
+    //! Returns true if the rest of the word to the right of the current cursor
+    //! is removed when an item from an auto-completion list is selected.
+    //!
+    //! \sa setAutoCompletionReplaceWord()
+    bool autoCompletionReplaceWord() const;
+
+    //! Returns true if the only item in an auto-completion list with a single
+    //! entry is automatically used and the list not displayed.  Note that this
+    //! is deprecated and autoCompletionUseSingle() should be used instead.
+    //!
+    //! \sa setAutoCompletionShowSingle()
+    bool autoCompletionShowSingle() const;
+
+    //! Returns the current source for the auto-completion list when it is
+    //! being displayed automatically as the user types.
+    //!
+    //! \sa setAutoCompletionSource()
+    AutoCompletionSource autoCompletionSource() const {return acSource;}
+
+    //! Returns the current threshold for the automatic display of the
+    //! auto-completion list as the user types.
+    //!
+    //! \sa setAutoCompletionThreshold()
+    int autoCompletionThreshold() const {return acThresh;}
+
+    //! Returns the current behavior when an auto-completion list contains a
+    //! single entry.
+    //!
+    //! \sa setAutoCompletionUseSingle()
+    AutoCompletionUseSingle autoCompletionUseSingle() const;
+
+    //! Returns true if auto-indentation is enabled.
+    //!
+    //! \sa setAutoIndent()
+    bool autoIndent() const {return autoInd;}
+
+    //! Returns true if the backspace key unindents a line instead of deleting
+    //! a character.  The default is false.
+    //!
+    //! \sa setBackspaceUnindents(), tabIndents(), setTabIndents()
+    bool backspaceUnindents() const;
+
+    //! Mark the beginning of a sequence of actions that can be undone by a
+    //! single call to undo().
+    //!
+    //! \sa endUndoAction(), undo()
+    void beginUndoAction();
+
+    //! Returns the brace matching mode.
+    //!
+    //! \sa setBraceMatching()
+    BraceMatch braceMatching() const {return braceMode;}
+
+    //! Returns the encoded text between positions \a start and \a end.  This
+    //! is typically used by QsciLexerCustom::styleText().
+    //!
+    //! \sa text()
+    QByteArray bytes(int start, int end) const;
+
+    //! Returns the current call tip position.
+    //!
+    //! \sa setCallTipsPosition()
+    CallTipsPosition callTipsPosition() const {return call_tips_position;}
+
+    //! Returns the current call tip style.
+    //!
+    //! \sa setCallTipsStyle()
+    CallTipsStyle callTipsStyle() const {return call_tips_style;}
+
+    //! Returns the maximum number of call tips that are displayed.
+    //!
+    //! \sa setCallTipsVisible()
+    int callTipsVisible() const {return maxCallTips;}
+
+    //! Cancel any previous call to findFirst(), findFirstInSelection() or
+    //! findNext() so that replace() does nothing.
+    void cancelFind();
+
+    //! Cancel any current auto-completion or user defined list.
+    void cancelList();
+
+    //! Returns true if the current language lexer is case sensitive.  If there
+    //! is no current lexer then true is returned.
+    bool caseSensitive() const;
+
+    //! Clear all current folds, i.e. ensure that all lines are displayed
+    //! unfolded.
+    //!
+    //! \sa setFolding()
+    void clearFolds();
+
+    //! Clears the range of text with indicator \a indicatorNumber starting at
+    //! position \a indexFrom in line \a lineFrom and finishing at position
+    //! \a indexTo in line \a lineTo.
+    //!
+    //! \sa fillIndicatorRange()
+    void clearIndicatorRange(int lineFrom, int indexFrom, int lineTo,
+            int indexTo, int indicatorNumber);
+
+    //! Clear all registered images.
+    //!
+    //! \sa registerImage()
+    void clearRegisteredImages();
+
+    //! Returns the widget's text (ie. foreground) colour.
+    //!
+    //! \sa setColor()
+    QColor color() const;
+
+    //! Returns a list of the line numbers that have contracted folds.  This is
+    //! typically used to save the fold state of a document.
+    //!
+    //! \sa setContractedFolds()
+    QList<int> contractedFolds() const;
+
+    //! All the lines of the text have their end-of-lines converted to mode
+    //! \a mode.
+    //!
+    //! \sa eolMode(), setEolMode()
+    void convertEols(EolMode mode);
+
+    //! Create the standard context menu which is shown when the user clicks
+    //! with the right mouse button.  It is called from contextMenuEvent().
+    //! The menu's ownership is transferred to the caller.
+    QMenu *createStandardContextMenu();
+
+    //! Returns the attached document.
+    //!
+    //! \sa setDocument()
+    QsciDocument document() const {return doc;}
+
+    //! Mark the end of a sequence of actions that can be undone by a single
+    //! call to undo().
+    //!
+    //! \sa beginUndoAction(), undo()
+    void endUndoAction();
+
+    //! Returns the color of the marker used to show that a line has exceeded
+    //! the length set by setEdgeColumn().
+    //!
+    //! \sa setEdgeColor(), \sa setEdgeColumn
+    QColor edgeColor() const;
+
+    //! Returns the number of the column after which lines are considered to be
+    //! long.
+    //!
+    //! \sa setEdgeColumn()
+    int edgeColumn() const;
+
+    //! Returns the edge mode which determines how long lines are marked.
+    //!
+    //! \sa setEdgeMode()
+    EdgeMode edgeMode() const;
+
+    //! Set the default font.  This has no effect if a language lexer has been
+    //! set.
+    void setFont(const QFont &f);
+
+    //! Returns the end-of-line mode.
+    //!
+    //! \sa setEolMode()
+    EolMode eolMode() const;
+
+    //! Returns the visibility of end-of-lines.
+    //!
+    //! \sa setEolVisibility()
+    bool eolVisibility() const;
+
+    //! Returns the extra space added to the height of a line above the
+    //! baseline of the text.
+    //!
+    //! \sa setExtraAscent(), extraDescent()
+    int extraAscent() const;
+
+    //! Returns the extra space added to the height of a line below the
+    //! baseline of the text.
+    //!
+    //! \sa setExtraDescent(), extraAscent()
+    int extraDescent() const;
+
+    //! Fills the range of text with indicator \a indicatorNumber starting at
+    //! position \a indexFrom in line \a lineFrom and finishing at position
+    //! \a indexTo in line \a lineTo.
+    //!
+    //! \sa clearIndicatorRange()
+    void fillIndicatorRange(int lineFrom, int indexFrom, int lineTo,
+            int indexTo, int indicatorNumber);
+
+    //! Find the first occurrence of the string \a expr and return true if
+    //! \a expr was found, otherwise returns false.  If \a expr is found it
+    //! becomes the current selection.
+    //!
+    //! If \a re is true then \a expr is interpreted as a regular expression
+    //! rather than a simple string.
+    //!
+    //! If \a cs is true then the search is case sensitive.
+    //!
+    //! If \a wo is true then the search looks for whole word matches only,
+    //! otherwise it searches for any matching text.
+    //!
+    //! If \a wrap is true then the search wraps around the end of the text.
+    //!
+    //! If \a forward is true (the default) then the search is forward from the
+    //! starting position to the end of the text, otherwise it is backwards to
+    //! the beginning of the text. 
+    //!
+    //! If either \a line or \a index are negative (the default) then the
+    //! search begins from the current cursor position.  Otherwise the search
+    //! begins at position \a index of line \a line.
+    //!
+    //! If \a show is true (the default) then any text found is made visible
+    //! (ie. it is unfolded).
+    //!
+    //! If \a posix is true then a regular expression is treated in a more
+    //! POSIX compatible manner by interpreting bare ( and ) as tagged sections
+    //! rather than \( and \).
+    //!
+    //! If \a cxx11 is true then a regular expression is treated as a Cxx11
+    //! regular expression.
+    //!
+    //! \sa cancelFind(), findFirstInSelection(), findNext(), replace()
+    virtual bool findFirst(const QString &expr, bool re, bool cs, bool wo,
+            bool wrap, bool forward = true, int line = -1, int index = -1,
+            bool show = true, bool posix = false, bool cxx11 = false);
+
+    //! Find the first occurrence of the string \a expr in the current
+    //! selection and return true if \a expr was found, otherwise returns
+    //! false.  If \a expr is found it becomes the current selection.  The
+    //! original selection is restored when a subsequent call to findNext()
+    //! returns false.
+    //!
+    //! If \a re is true then \a expr is interpreted as a regular expression
+    //! rather than a simple string.
+    //!
+    //! If \a cs is true then the search is case sensitive.
+    //!
+    //! If \a wo is true then the search looks for whole word matches only,
+    //! otherwise it searches for any matching text.
+    //!
+    //! If \a forward is true (the default) then the search is forward from the
+    //! start to the end of the selection, otherwise it is backwards from the
+    //! end to the start of the selection.
+    //!
+    //! If \a show is true (the default) then any text found is made visible
+    //! (ie. it is unfolded).
+    //!
+    //! If \a posix is true then a regular expression is treated in a more
+    //! POSIX compatible manner by interpreting bare ( and ) as tagged sections
+    //! rather than \( and \).
+    //!
+    //! If \a cxx11 is true then a regular expression is treated as a Cxx11
+    //! regular expression.
+    //!
+    //! \sa cancelFind(), findFirst(), findNext(), replace()
+    virtual bool findFirstInSelection(const QString &expr, bool re, bool cs,
+            bool wo, bool forward = true, bool show = true,
+            bool posix = false, bool cxx11 = false);
+
+    //! Find the next occurence of the string found using findFirst() or
+    //! findFirstInSelection().
+    //!
+    //! \sa cancelFind(), findFirst(), findFirstInSelection(), replace()
+    virtual bool findNext();
+
+    //! Find a brace and it's match.  \a brace is updated with the position of
+    //! the brace and will be -1 if there is none.  \a is updated with the
+    //! position of the matching brace and will be -1 if there is none.
+    //! \a mode specifies how braces are matched.  true is returned if the
+    //! current position is inside a pair of braces.
+    bool findMatchingBrace(long &brace, long &other, BraceMatch mode);
+
+    //! Returns the number of the first visible line.
+    //!
+    //! \sa setFirstVisibleLine()
+    int firstVisibleLine() const;
+
+    //! Returns the current folding style.
+    //!
+    //! \sa setFolding()
+    FoldStyle folding() const {return fold;}
+
+    //! Sets \a *line and \a *index to the line and index of the cursor.
+    //!
+    //! \sa setCursorPosition()
+    void getCursorPosition(int *line, int *index) const;
+
+    //! If there is a selection, \a *lineFrom is set to the line number in
+    //! which the selection begins and \a *lineTo is set to the line number in
+    //! which the selection ends.  (They could be the same.)  \a *indexFrom is
+    //! set to the index at which the selection begins within \a *lineFrom, and
+    //! \a *indexTo is set to the index at which the selection ends within
+    //! \a *lineTo.  If there is no selection, \a *lineFrom, \a *indexFrom,
+    //! \a *lineTo and \a *indexTo are all set to -1. 
+    //!
+    //! \sa setSelection()
+    void getSelection(int *lineFrom, int *indexFrom, int *lineTo,
+            int *indexTo) const;
+
+    //! Returns true if some text is selected.
+    //!
+    //! \sa selectedText()
+    bool hasSelectedText() const {return selText;}
+
+    //! Returns the number of characters that line \a line is indented by.
+    //!
+    //! \sa setIndentation()
+    int indentation(int line) const;
+
+    //! Returns true if the display of indentation guides is enabled.
+    //!
+    //! \sa setIndentationGuides()
+    bool indentationGuides() const;
+
+    //! Returns true if indentations are created using tabs and spaces, rather
+    //! than just spaces.  The default is true.
+    //!
+    //! \sa setIndentationsUseTabs()
+    bool indentationsUseTabs() const;
+
+    //! Returns the indentation width in characters.  The default is 0 which
+    //! means that the value returned by tabWidth() is actually used.
+    //!
+    //! \sa setIndentationWidth(), tabWidth()
+    int indentationWidth() const;
+
+    //! Define a type of indicator using the style \a style with the indicator
+    //! number \a indicatorNumber.  If \a indicatorNumber is -1 then the
+    //! indicator number is automatically allocated.  The indicator number is
+    //! returned or -1 if too many types of indicator have been defined.
+    //!
+    //! Indicators are used to display additional information over the top of
+    //! styling.  They can be used to show, for example, syntax errors,
+    //! deprecated names and bad indentation by drawing lines under text or
+    //! boxes around text.
+    //!
+    //! There may be up to 32 types of indicator defined at a time.  The first
+    //! 8 are normally used by lexers.  By default indicator number 0 is a
+    //! dark green SquiggleIndicator, 1 is a blue TTIndicator, and 2 is a red
+    //! PlainIndicator.
+    int indicatorDefine(IndicatorStyle style, int indicatorNumber = -1);
+
+    //! Returns true if the indicator \a indicatorNumber is drawn under the
+    //! text (i.e. in the background).  The default is false.
+    //!
+    //! \sa setIndicatorDrawUnder()
+    bool indicatorDrawUnder(int indicatorNumber) const;
+
+    //! Returns true if a call tip is currently active.
+    bool isCallTipActive() const;
+
+    //! Returns true if an auto-completion or user defined list is currently
+    //! active.
+    bool isListActive() const;
+
+    //! Returns true if the text has been modified.
+    //!
+    //! \sa setModified(), modificationChanged()
+    bool isModified() const;
+
+    //! Returns true if the text edit is read-only.
+    //!
+    //! \sa setReadOnly()
+    bool isReadOnly() const;
+
+    //! Returns true if there is something that can be redone.
+    //!
+    //! \sa redo()
+    bool isRedoAvailable() const;
+
+    //! Returns true if there is something that can be undone.
+    //!
+    //! \sa undo()
+    bool isUndoAvailable() const;
+
+    //! Returns true if text is interpreted as being UTF8 encoded.  The default
+    //! is to interpret the text as Latin1 encoded.
+    //!
+    //! \sa setUtf8()
+    bool isUtf8() const;
+
+    //! Returns true if character \a ch is a valid word character.
+    //!
+    //! \sa wordCharacters()
+    bool isWordCharacter(char ch) const;
+
+    //! Returns the line which is at \a point pixel coordinates or -1 if there
+    //! is no line at that point.
+    int lineAt(const QPoint &point) const;
+
+    //! QScintilla uses the combination of a line number and a character index
+    //! from the start of that line to specify the position of a character
+    //! within the text.  The underlying Scintilla instead uses a byte index
+    //! from the start of the text.  This will convert the \a position byte
+    //! index to the \a *line line number and \a *index character index.
+    //!
+    //! \sa positionFromLineIndex()
+    void lineIndexFromPosition(int position, int *line, int *index) const;
+
+    //! Returns the length of line \a line int bytes or -1 if there is no such
+    //! line.  In order to get the length in characters use text(line).length().
+    int lineLength(int line) const;
+
+    //! Returns the number of lines of text.
+    int lines() const;
+
+    //! Returns the length of the text edit's text in bytes.  In order to get
+    //! the length in characters use text().length().
+    int length() const;
+
+    //! Returns the current language lexer used to style text.  If it is 0 then
+    //! syntax styling is disabled.
+    //!
+    //! \sa setLexer()
+    QsciLexer *lexer() const;
+
+    //! Returns the background color of margin \a margin.
+    //!
+    //! \sa setMarginBackgroundColor()
+    QColor marginBackgroundColor(int margin) const;
+
+    //! Returns true if line numbers are enabled for margin \a margin.
+    //!
+    //! \sa setMarginLineNumbers(), marginType(), SCI_GETMARGINTYPEN
+    bool marginLineNumbers(int margin) const;
+
+    //! Returns the marker mask of margin \a margin.
+    //!
+    //! \sa setMarginMask(), QsciMarker, SCI_GETMARGINMASKN
+    int marginMarkerMask(int margin) const;
+
+    //! Returns the margin options.  The default is MoNone.
+    //!
+    //! \sa setMarginOptions(), MoNone, MoSublineSelect.
+    int marginOptions() const;
+
+    //! Returns true if margin \a margin is sensitive to mouse clicks.
+    //!
+    //! \sa setMarginSensitivity(), marginClicked(), SCI_GETMARGINTYPEN
+    bool marginSensitivity(int margin) const;
+
+    //! Returns the type of margin \a margin.
+    //!
+    //! \sa setMarginType(), SCI_GETMARGINTYPEN
+    MarginType marginType(int margin) const;
+
+    //! Returns the width in pixels of margin \a margin.
+    //!
+    //! \sa setMarginWidth(), SCI_GETMARGINWIDTHN
+    int marginWidth(int margin) const;
+
+    //! Returns the number of margins.
+    //!
+    //! \sa setMargins()
+    int margins() const;
+
+    //! Define a type of marker using the symbol \a sym with the marker number
+    //! \a markerNumber.  If \a markerNumber is -1 then the marker number is
+    //! automatically allocated.  The marker number is returned or -1 if too
+    //! many types of marker have been defined.
+    //!
+    //! Markers are small geometric symbols and characters used, for example,
+    //! to indicate the current line or, in debuggers, to indicate breakpoints.
+    //! If a margin has a width of 0 then its markers are not drawn, but their
+    //! background colours affect the background colour of the corresponding
+    //! line of text.
+    //!
+    //! There may be up to 32 types of marker defined at a time and each line
+    //! of text has a set of marker instances associated with it.  Markers are
+    //! drawn according to their numerical identifier.  Markers try to move
+    //! with their text by tracking where the start of their line moves to.
+    //! For example, when a line is deleted its markers are added to previous
+    //! line's markers.
+    //!
+    //! Each marker type is identified by a marker number.  Each instance of a
+    //! marker is identified by a marker handle.
+    int markerDefine(MarkerSymbol sym, int markerNumber = -1);
+
+    //! Define a marker using the character \a ch with the marker number
+    //! \a markerNumber.  If \a markerNumber is -1 then the marker number is
+    //! automatically allocated.  The marker number is returned or -1 if too
+    //! many markers have been defined.
+    int markerDefine(char ch, int markerNumber = -1);
+
+    //! Define a marker using a copy of the pixmap \a pm with the marker number
+    //! \a markerNumber.  If \a markerNumber is -1 then the marker number is
+    //! automatically allocated.  The marker number is returned or -1 if too
+    //! many markers have been defined.
+    int markerDefine(const QPixmap &pm, int markerNumber = -1);
+
+    //! Define a marker using a copy of the image \a im with the marker number
+    //! \a markerNumber.  If \a markerNumber is -1 then the marker number is
+    //! automatically allocated.  The marker number is returned or -1 if too
+    //! many markers have been defined.
+    int markerDefine(const QImage &im, int markerNumber = -1);
+
+    //! Add an instance of marker number \a markerNumber to line number
+    //! \a linenr.  A handle for the marker is returned which can be used to
+    //! track the marker's position, or -1 if the \a markerNumber was invalid.
+    //!
+    //! \sa markerDelete(), markerDeleteAll(), markerDeleteHandle()
+    int markerAdd(int linenr, int markerNumber);
+
+    //! Returns the 32 bit mask of marker numbers at line number \a linenr.
+    //!
+    //! \sa markerAdd()
+    unsigned markersAtLine(int linenr) const;
+
+    //! Delete all markers with the marker number \a markerNumber in the line
+    //! \a linenr.  If \a markerNumber is -1 then delete all markers from line
+    //! \a linenr.
+    //!
+    //! \sa markerAdd(), markerDeleteAll(), markerDeleteHandle()
+    void markerDelete(int linenr, int markerNumber = -1);
+
+    //! Delete the all markers with the marker number \a markerNumber.  If
+    //! \a markerNumber is -1 then delete all markers.
+    //!
+    //! \sa markerAdd(), markerDelete(), markerDeleteHandle()
+    void markerDeleteAll(int markerNumber = -1);
+
+    //! Delete the the marker instance with the marker handle \a mhandle.
+    //!
+    //! \sa markerAdd(), markerDelete(), markerDeleteAll()
+    void markerDeleteHandle(int mhandle);
+
+    //! Return the line number that contains the marker instance with the
+    //! marker handle \a mhandle.
+    int markerLine(int mhandle) const;
+
+    //! Return the number of the next line to contain at least one marker from
+    //! a 32 bit mask of markers.  \a linenr is the line number to start the
+    //! search from.  \a mask is the mask of markers to search for.
+    //!
+    //! \sa markerFindPrevious()
+    int markerFindNext(int linenr, unsigned mask) const;
+
+    //! Return the number of the previous line to contain at least one marker
+    //! from a 32 bit mask of markers.  \a linenr is the line number to start
+    //! the search from.  \a mask is the mask of markers to search for.
+    //!
+    //! \sa markerFindNext()
+    int markerFindPrevious(int linenr, unsigned mask) const;
+
+    //! Returns true if text entered by the user will overwrite existing text.
+    //!
+    //! \sa setOverwriteMode()
+    bool overwriteMode() const;
+
+    //! Returns the widget's paper (ie. background) colour.
+    //!
+    //! \sa setPaper()
+    QColor paper() const;
+
+    //! QScintilla uses the combination of a line number and a character index
+    //! from the start of that line to specify the position of a character
+    //! within the text.  The underlying Scintilla instead uses a byte index
+    //! from the start of the text.  This will return the byte index
+    //! corresponding to the \a line line number and \a index character index.
+    //!
+    //! \sa lineIndexFromPosition()
+    int positionFromLineIndex(int line, int index) const;
+
+    //! Reads the current document from the \a io device and returns true if
+    //! there was no error.
+    //!
+    //! \sa write()
+    bool read(QIODevice *io);
+
+    //! Recolours the document between the \a start and \a end positions.
+    //! \a start defaults to the start of the document and \a end defaults to
+    //! the end of the document.
+    virtual void recolor(int start = 0, int end = -1);
+
+    //! Register an image \a pm with ID \a id.  Registered images can be
+    //! displayed in auto-completion lists.
+    //!
+    //! \sa clearRegisteredImages(), QsciLexer::apiLoad()
+    void registerImage(int id, const QPixmap &pm);
+
+    //! Register an image \a im with ID \a id.  Registered images can be
+    //! displayed in auto-completion lists.
+    //!
+    //! \sa clearRegisteredImages(), QsciLexer::apiLoad()
+    void registerImage(int id, const QImage &im);
+
+    //! Replace the current selection, set by a previous call to findFirst(),
+    //! findFirstInSelection() or findNext(), with \a replaceStr.
+    //!
+    //! \sa cancelFind(), findFirst(), findFirstInSelection(), findNext()
+    virtual void replace(const QString &replaceStr);
+
+    //! Reset the fold margin colours to their defaults.
+    //!
+    //! \sa setFoldMarginColors()
+    void resetFoldMarginColors();
+
+    //! Resets the background colour of an active hotspot area to the default.
+    //!
+    //! \sa setHotspotBackgroundColor(), resetHotspotForegroundColor()
+    void resetHotspotBackgroundColor();
+
+    //! Resets the foreground colour of an active hotspot area to the default.
+    //!
+    //! \sa setHotspotForegroundColor(), resetHotspotBackgroundColor()
+    void resetHotspotForegroundColor();
+
+    //! Gets the assumed document width in pixels.
+    //!
+    //! \sa setScrollWidth(), setScrollWidthTracking()
+    int scrollWidth() const;
+
+    //! Returns true if scroll width tracking is enabled.
+    //!
+    //! \sa scrollWidth(), setScrollWidthTracking()
+    bool scrollWidthTracking() const;
+
+    //! The fold margin may be drawn as a one pixel sized checkerboard pattern
+    //! of two colours, \a fore and \a back.
+    //!
+    //! \sa resetFoldMarginColors()
+    void setFoldMarginColors(const QColor &fore, const QColor &back);
+
+    //! Set the display style for annotations.  The default is
+    //! AnnotationStandard.
+    //!
+    //! \sa annotationDisplay()
+    void setAnnotationDisplay(AnnotationDisplay display);
+
+    //! Enable the use of fill-up characters, either those explicitly set or
+    //! those set by a lexer.  By default, fill-up characters are disabled.
+    //!
+    //! \sa autoCompletionFillupsEnabled(), setAutoCompletionFillups()
+    void setAutoCompletionFillupsEnabled(bool enabled);
+
+    //! A fill-up character is one that, when entered while an auto-completion
+    //! list is being displayed, causes the currently selected item from the
+    //! list to be added to the text followed by the fill-up character.
+    //! \a fillups is the set of fill-up characters.  If a language lexer has
+    //! been set then this is ignored and the lexer defines the fill-up
+    //! characters.  The default is that no fill-up characters are set.
+    //!
+    //! \sa autoCompletionFillupsEnabled(), setAutoCompletionFillupsEnabled()
+    void setAutoCompletionFillups(const char *fillups);
+
+    //! A word separator is a sequence of characters that, when entered, causes
+    //! the auto-completion list to be displayed.  If a language lexer has been
+    //! set then this is ignored and the lexer defines the word separators.
+    //! The default is that no word separators are set.
+    //!
+    //! \sa setAutoCompletionThreshold()
+    void setAutoCompletionWordSeparators(const QStringList &separators);
+
+    //! Set the background colour of call tips to \a col.  The default is
+    //! white.
+    void setCallTipsBackgroundColor(const QColor &col);
+
+    //! Set the foreground colour of call tips to \a col.  The default is
+    //! mid-gray.
+    void setCallTipsForegroundColor(const QColor &col);
+
+    //! Set the highlighted colour of call tip text to \a col.  The default is
+    //! dark blue.
+    void setCallTipsHighlightColor(const QColor &col);
+
+    //! Set the current call tip position.  The default is CallTipsBelowText.
+    //!
+    //! \sa callTipsPosition()
+    void setCallTipsPosition(CallTipsPosition position);
+
+    //! Set the current call tip style.  The default is CallTipsNoContext.
+    //!
+    //! \sa callTipsStyle()
+    void setCallTipsStyle(CallTipsStyle style);
+
+    //! Set the maximum number of call tips that are displayed to \a nr.  If
+    //! the maximum number is 0 then all applicable call tips are displayed.
+    //! If the maximum number is -1 then one call tip will be displayed with up
+    //! and down arrows that allow the use to scroll through the full list.
+    //! The default is -1.
+    //!
+    //! \sa callTipsVisible()
+    void setCallTipsVisible(int nr);
+
+    //! Sets each line in the \a folds list of line numbers to be a contracted
+    //! fold.  This is typically used to restore the fold state of a document.
+    //!
+    //! \sa contractedFolds()
+    void setContractedFolds(const QList<int> &folds);
+
+    //! Attach the document \a document, replacing the currently attached
+    //! document.
+    //!
+    //! \sa document()
+    void setDocument(const QsciDocument &document);
+
+    //! Add \a colnr to the columns which are displayed with a vertical line.
+    //! The edge mode must be set to EdgeMultipleLines.
+    //!
+    //! \sa clearEdgeColumns()
+    void addEdgeColumn(int colnr, const QColor &col);
+
+    //! Remove any columns added by previous calls to addEdgeColumn().
+    //!
+    //! \sa addEdgeColumn()
+    void clearEdgeColumns();
+
+    //! Set the color of the marker used to show that a line has exceeded the
+    //! length set by setEdgeColumn().
+    //!
+    //! \sa edgeColor(), \sa setEdgeColumn
+    void setEdgeColor(const QColor &col);
+
+    //! Set the number of the column after which lines are considered to be
+    //! long.
+    //!
+    //! \sa edgeColumn()
+    void setEdgeColumn(int colnr);
+
+    //! Set the edge mode which determines how long lines are marked.
+    //!
+    //! \sa edgeMode()
+    void setEdgeMode(EdgeMode mode);
+
+    //! Set the number of the first visible line to \a linenr.
+    //!
+    //! \sa firstVisibleLine()
+    void setFirstVisibleLine(int linenr);
+
+    //! Enables or disables, according to \a under, if the indicator
+    //! \a indicatorNumber is drawn under or over the text (i.e. in the
+    //! background or foreground).  If \a indicatorNumber is -1 then the state
+    //! of all indicators is set.
+    //!
+    //! \sa indicatorDrawUnder()
+    void setIndicatorDrawUnder(bool under, int indicatorNumber = -1);
+
+    //! Set the foreground colour of indicator \a indicatorNumber to \a col.
+    //! If \a indicatorNumber is -1 then the colour of all indicators is set.
+    void setIndicatorForegroundColor(const QColor &col, int indicatorNumber = -1);
+
+    //! Set the foreground colour of indicator \a indicatorNumber to \a col
+    //! when the mouse is over it or the caret moved into it.  If
+    //! \a indicatorNumber is -1 then the colour of all indicators is set.
+    void setIndicatorHoverForegroundColor(const QColor &col, int indicatorNumber = -1);
+
+    //! Set the style of indicator \a indicatorNumber to \a style when the
+    //! mouse is over it or the caret moved into it.  If \a indicatorNumber is
+    //! -1 then the style of all indicators is set.
+    void setIndicatorHoverStyle(IndicatorStyle style, int indicatorNumber = -1);
+
+    //! Set the outline colour of indicator \a indicatorNumber to \a col.
+    //! If \a indicatorNumber is -1 then the colour of all indicators is set.
+    //! At the moment only the alpha value of the colour has any affect.
+    void setIndicatorOutlineColor(const QColor &col, int indicatorNumber = -1);
+
+    //! Sets the background color of margin \a margin to \a col.
+    //!
+    //! \sa marginBackgroundColor()
+    void setMarginBackgroundColor(int margin, const QColor &col);
+
+    //! Set the margin options to \a options.
+    //!
+    //! \sa marginOptions(), MoNone, MoSublineSelect.
+    void setMarginOptions(int options);
+
+    //! Set the margin text of line \a line with the text \a text using the
+    //! style number \a style.
+    void setMarginText(int line, const QString &text, int style);
+
+    //! Set the margin text of line \a line with the text \a text using the
+    //! style \a style.
+    void setMarginText(int line, const QString &text, const QsciStyle &style);
+
+    //! Set the margin text of line \a line with the styled text \a text.
+    void setMarginText(int line, const QsciStyledText &text);
+
+    //! Set the margin text of line \a line with the list of styled text \a
+    //! text.
+    void setMarginText(int line, const QList<QsciStyledText> &text);
+
+    //! Set the type of margin \a margin to type \a type.
+    //!
+    //! \sa marginType(), SCI_SETMARGINTYPEN
+    void setMarginType(int margin, MarginType type);
+
+    //! The margin text on line \a line is removed.  If \a line is negative
+    //! then all margin text is removed.
+    void clearMarginText(int line = -1);
+
+    //! Set the number of margins to \a margins.
+    //!
+    //! \sa margins()
+    void setMargins(int margins);
+
+    //! Set the background colour, including the alpha component, of marker
+    //! \a markerNumber to \a col.  If \a markerNumber is -1 then the colour of
+    //! all markers is set.  The default is white.
+    //!
+    //! \sa setMarkerForegroundColor()
+    void setMarkerBackgroundColor(const QColor &col, int markerNumber = -1);
+
+    //! Set the foreground colour of marker \a markerNumber to \a col.  If
+    //! \a markerNumber is -1 then the colour of all markers is set.  The
+    //! default is black.
+    //!
+    //! \sa setMarkerBackgroundColor()
+    void setMarkerForegroundColor(const QColor &col, int markerNumber = -1);
+
+    //! Set the background colour used to display matched braces to \a col.  It
+    //! is ignored if an indicator is being used.  The default is white.
+    //!
+    //! \sa setMatchedBraceForegroundColor(), setMatchedBraceIndicator()
+    void setMatchedBraceBackgroundColor(const QColor &col);
+
+    //! Set the foreground colour used to display matched braces to \a col.  It
+    //! is ignored if an indicator is being used.  The default is red.
+    //!
+    //! \sa setMatchedBraceBackgroundColor(), setMatchedBraceIndicator()
+    void setMatchedBraceForegroundColor(const QColor &col);
+
+    //! Set the indicator used to display matched braces to \a indicatorNumber.
+    //! The default is not to use an indicator.
+    //!
+    //! \sa resetMatchedBraceIndicator(), setMatchedBraceBackgroundColor()
+    void setMatchedBraceIndicator(int indicatorNumber);
+
+    //! Stop using an indicator to display matched braces.
+    //!
+    //! \sa setMatchedBraceIndicator()
+    void resetMatchedBraceIndicator();
+
+    //! For performance, QScintilla does not measure the display width of the
+    //! document to determine the properties of the horizontal scroll bar.
+    //! Instead, an assumed width is used.  This sets the document width in
+    //! pixels assumed by QScintilla to \a pixelWidth.  The default value is
+    //! 2000.
+    //!
+    //! \sa scrollWidth(), setScrollWidthTracking()
+    void setScrollWidth(int pixelWidth);
+
+    //! If scroll width tracking is enabled then the scroll width is adjusted
+    //! to ensure that all of the lines currently displayed can be completely
+    //! scrolled.  This mode never adjusts the scroll width to be narrower.
+    //! This sets the scroll width tracking to \a enabled.
+    //!
+    //! \sa setScrollWidth(), scrollWidthTracking()
+    void setScrollWidthTracking(bool enabled);
+
+    //! Sets the mode used to draw tab characters when whitespace is visible to
+    //! \a mode.  The default is to use an arrow.
+    //!
+    //! \sa tabDrawMode()
+    void setTabDrawMode(TabDrawMode mode);
+
+    //! Set the background colour used to display unmatched braces to \a col.
+    //! It is ignored if an indicator is being used.  The default is white.
+    //!
+    //! \sa setUnmatchedBraceForegroundColor(), setUnmatchedBraceIndicator()
+    void setUnmatchedBraceBackgroundColor(const QColor &col);
+
+    //! Set the foreground colour used to display unmatched braces to \a col.
+    //! It is ignored if an indicator is being used.  The default is blue.
+    //!
+    //! \sa setUnmatchedBraceBackgroundColor(), setUnmatchedBraceIndicator()
+    void setUnmatchedBraceForegroundColor(const QColor &col);
+
+    //! Set the indicator used to display unmatched braces to
+    //! \a indicatorNumber.  The default is not to use an indicator.
+    //!
+    //! \sa resetUnmatchedBraceIndicator(), setUnmatchedBraceBackgroundColor()
+    void setUnmatchedBraceIndicator(int indicatorNumber);
+
+    //! Stop using an indicator to display unmatched braces.
+    //!
+    //! \sa setUnmatchedBraceIndicator()
+    void resetUnmatchedBraceIndicator();
+
+    //! Set the visual flags displayed when a line is wrapped.  \a endFlag
+    //! determines if and where the flag at the end of a line is displayed.
+    //! \a startFlag determines if and where the flag at the start of a line is
+    //! displayed.  \a indent is the number of characters a wrapped line is
+    //! indented by.  By default no visual flags are displayed.
+    void setWrapVisualFlags(WrapVisualFlag endFlag,
+            WrapVisualFlag startFlag = WrapFlagNone, int indent = 0);
+
+    //! Returns the selected text or an empty string if there is no currently
+    //! selected text.
+    //!
+    //! \sa hasSelectedText()
+    QString selectedText() const;
+
+    //! Returns whether or not the selection is drawn up to the right hand
+    //! border.
+    //!
+    //! \sa setSelectionToEol()
+    bool selectionToEol() const;
+
+    //! Sets the background colour of an active hotspot area to \a col.
+    //!
+    //! \sa resetHotspotBackgroundColor(), setHotspotForegroundColor()
+    void setHotspotBackgroundColor(const QColor &col);
+
+    //! Sets the foreground colour of an active hotspot area to \a col.
+    //!
+    //! \sa resetHotspotForegroundColor(), setHotspotBackgroundColor()
+    void setHotspotForegroundColor(const QColor &col);
+
+    //! Enables or disables, according to \a enable, the underlining of an
+    //! active hotspot area.  The default is false.
+    void setHotspotUnderline(bool enable);
+
+    //! Enables or disables, according to \a enable, the wrapping of a hotspot
+    //! area to following lines.  The default is true.
+    void setHotspotWrap(bool enable);
+
+    //! Sets whether or not the selection is drawn up to the right hand border.
+    //! \a filled is set if the selection is drawn to the border.
+    //!
+    //! \sa selectionToEol()
+    void setSelectionToEol(bool filled);
+
+    //! Sets the extra space added to the height of a line above the baseline
+    //! of the text to \a extra.
+    //!
+    //! \sa extraAscent(), setExtraDescent()
+    void setExtraAscent(int extra);
+
+    //! Sets the extra space added to the height of a line below the baseline
+    //! of the text to \a extra.
+    //!
+    //! \sa extraDescent(), setExtraAscent()
+    void setExtraDescent(int extra);
+
+    //! Text entered by the user will overwrite existing text if \a overwrite
+    //! is true.
+    //!
+    //! \sa overwriteMode()
+    void setOverwriteMode(bool overwrite);
+
+    //! Sets the background colour of visible whitespace to \a col.  If \a col
+    //! is an invalid color (the default) then the color specified by the
+    //! current lexer is used.
+    void setWhitespaceBackgroundColor(const QColor &col);
+
+    //! Sets the foreground colour of visible whitespace to \a col.  If \a col
+    //! is an invalid color (the default) then the color specified by the
+    //! current lexer is used.
+    void setWhitespaceForegroundColor(const QColor &col);
+
+    //! Sets the size of the dots used to represent visible whitespace.
+    //!
+    //! \sa whitespaceSize()
+    void setWhitespaceSize(int size);
+
+    //! Sets the line wrap indentation mode to \a mode.  The default is
+    //! WrapIndentFixed.
+    //!
+    //! \sa wrapIndentMode()
+    void setWrapIndentMode(WrapIndentMode mode);
+
+    //! Displays a user defined list which can be interacted with like an
+    //! auto-completion list.  \a id is an identifier for the list which is
+    //! passed as an argument to the userListActivated() signal and must be at
+    //! least 1.  \a list is the text with which the list is populated.
+    //!
+    //! \sa cancelList(), isListActive(), userListActivated()
+    void showUserList(int id, const QStringList &list);
+
+    //! The standard command set is returned.
+    QsciCommandSet *standardCommands() const {return stdCmds;}
+
+    //! Returns the mode used to draw tab characters when whitespace is
+    //! visible.
+    //!
+    //! \sa setTabDrawMode()
+    TabDrawMode tabDrawMode() const;
+
+    //! Returns true if the tab key indents a line instead of inserting a tab
+    //! character.  The default is true.
+    //!
+    //! \sa setTabIndents(), backspaceUnindents(), setBackspaceUnindents()
+    bool tabIndents() const;
+
+    //! Returns the tab width in characters.  The default is 8.
+    //!
+    //! \sa setTabWidth()
+    int tabWidth() const;
+
+    //! Returns the text of the current document.
+    //!
+    //! \sa setText()
+    QString text() const;
+
+    //! \overload
+    //!
+    //! Returns the text of line \a line.
+    //!
+    //! \sa setText()
+    QString text(int line) const;
+
+    //! \overload
+    //!
+    //! Returns the text between positions \a start and \a end.  This is
+    //! typically used by QsciLexerCustom::styleText().
+    //!
+    //! \sa bytes(), setText()
+    QString text(int start, int end) const;
+
+    //! Returns the height in pixels of the text in line number \a linenr.
+    int textHeight(int linenr) const;
+
+    //! Returns the size of the dots used to represent visible whitespace.
+    //!
+    //! \sa setWhitespaceSize()
+    int whitespaceSize() const;
+
+    //! Returns the visibility of whitespace.
+    //!
+    //! \sa setWhitespaceVisibility()
+    WhitespaceVisibility whitespaceVisibility() const;
+
+    //! Returns the word at the \a line line number and \a index character
+    //! index.
+    QString wordAtLineIndex(int line, int index) const;
+
+    //! Returns the word at the \a point pixel coordinates.
+    QString wordAtPoint(const QPoint &point) const;
+
+    //! Returns the set of valid word character as defined by the current
+    //! language lexer.  If there is no current lexer then the set contains an
+    //! an underscore, numbers and all upper and lower case alphabetic
+    //! characters.
+    //!
+    //! \sa isWordCharacter()
+    const char *wordCharacters() const;
+
+    //! Returns the line wrap mode.
+    //!
+    //! \sa setWrapMode()
+    WrapMode wrapMode() const;
+
+    //! Returns the line wrap indentation mode.
+    //!
+    //! \sa setWrapIndentMode()
+    WrapIndentMode wrapIndentMode() const;
+
+    //! Writes the current document to the \a io device and returns true if
+    //! there was no error.
+    //!
+    //! \sa read()
+    bool write(QIODevice *io) const;
+
+public slots:
+    //! Appends the text \a text to the end of the text edit.  Note that the
+    //! undo/redo history is cleared by this function.
+    virtual void append(const QString &text);
+
+    //! Display an auto-completion list based on any installed APIs, the
+    //! current contents of the document and the characters immediately to the
+    //! left of the cursor.
+    //!
+    //! \sa autoCompleteFromAPIs(), autoCompleteFromDocument()
+    virtual void autoCompleteFromAll();
+
+    //! Display an auto-completion list based on any installed APIs and the
+    //! characters immediately to the left of the cursor.
+    //!
+    //! \sa autoCompleteFromAll(), autoCompleteFromDocument(),
+    //! setAutoCompletionAPIs()
+    virtual void autoCompleteFromAPIs();
+
+    //! Display an auto-completion list based on the current contents of the
+    //! document and the characters immediately to the left of the cursor.
+    //!
+    //! \sa autoCompleteFromAll(), autoCompleteFromAPIs()
+    virtual void autoCompleteFromDocument();
+
+    //! Display a call tip based on the the characters immediately to the left
+    //! of the cursor.
+    virtual void callTip();
+
+    //! Deletes all the text in the text edit.
+    virtual void clear();
+
+    //! Copies any selected text to the clipboard.
+    //!
+    //! \sa copyAvailable(), cut(), paste()
+    virtual void copy();
+
+    //! Copies any selected text to the clipboard and then deletes the text.
+    //!
+    //! \sa copy(), paste()
+    virtual void cut();
+
+    //! Ensures that the cursor is visible.
+    virtual void ensureCursorVisible();
+
+    //! Ensures that the line number \a line is visible.
+    virtual void ensureLineVisible(int line);
+
+    //! If any lines are currently folded then they are all unfolded.
+    //! Otherwise all lines are folded.  This has the same effect as clicking
+    //! in the fold margin with the shift and control keys pressed.  If
+    //! \a children is not set (the default) then only the top level fold
+    //! points are affected, otherwise the state of all fold points are
+    //! changed.
+    virtual void foldAll(bool children = false);
+
+    //! If the line \a line is folded then it is unfolded.  Otherwise it is
+    //! folded.  This has the same effect as clicking in the fold margin.
+    virtual void foldLine(int line);
+
+    //! Increases the indentation of line \a line by an indentation width.
+    //!
+    //! \sa unindent()
+    virtual void indent(int line);
+
+    //! Insert the text \a text at the current position.
+    virtual void insert(const QString &text);
+
+    //! Insert the text \a text in the line \a line at the position
+    //! \a index.
+    virtual void insertAt(const QString &text, int line, int index);
+
+    //! If the cursor is either side of a brace character then move it to the
+    //! position of the corresponding brace.
+    virtual void moveToMatchingBrace();
+
+    //! Pastes any text from the clipboard into the text edit at the current
+    //! cursor position.
+    //!
+    //! \sa copy(), cut()
+    virtual void paste();
+
+    //! Redo the last change or sequence of changes.
+    //!
+    //! \sa isRedoAvailable()
+    virtual void redo();
+
+    //! Removes any selected text.
+    //!
+    //! \sa replaceSelectedText()
+    virtual void removeSelectedText();
+
+    //! Replaces any selected text with \a text.
+    //!
+    //! \sa removeSelectedText()
+    virtual void replaceSelectedText(const QString &text);
+
+    //! Resets the background colour of selected text to the default.
+    //!
+    //! \sa setSelectionBackgroundColor(), resetSelectionForegroundColor()
+    virtual void resetSelectionBackgroundColor();
+
+    //! Resets the foreground colour of selected text to the default.
+    //!
+    //! \sa setSelectionForegroundColor(), resetSelectionBackgroundColor()
+    virtual void resetSelectionForegroundColor();
+
+    //! If \a select is true (the default) then all the text is selected.  If
+    //! \a select is false then any currently selected text is deselected.
+    virtual void selectAll(bool select = true);
+
+    //! If the cursor is either side of a brace character then move it to the
+    //! position of the corresponding brace and select the text between the
+    //! braces.
+    virtual void selectToMatchingBrace();
+
+    //! If \a cs is true then auto-completion lists are case sensitive.  The
+    //! default is true.  Note that setting a lexer may change the case
+    //! sensitivity.
+    //!
+    //! \sa autoCompletionCaseSensitivity()
+    virtual void setAutoCompletionCaseSensitivity(bool cs);
+
+    //! If \a replace is true then when an item from an auto-completion list is
+    //! selected, the rest of the word to the right of the current cursor is
+    //! removed.  The default is false.
+    //!
+    //! \sa autoCompletionReplaceWord()
+    virtual void setAutoCompletionReplaceWord(bool replace);
+
+    //! If \a single is true then when there is only a single entry in an
+    //! auto-completion list it is automatically used and the list is not
+    //! displayed.  This only has an effect when auto-completion is explicitly
+    //! requested (using autoCompleteFromAPIs() and autoCompleteFromDocument())
+    //! and has no effect when auto-completion is triggered as the user types.
+    //! The default is false.  Note that this is deprecated and
+    //! setAutoCompletionUseSingle() should be used instead.
+    //!
+    //! \sa autoCompletionShowSingle()
+    virtual void setAutoCompletionShowSingle(bool single);
+
+    //! Sets the source for the auto-completion list when it is being displayed
+    //! automatically as the user types to \a source.  The default is AcsNone,
+    //! ie. it is disabled.
+    //!
+    //! \sa autoCompletionSource()
+    virtual void setAutoCompletionSource(AutoCompletionSource source);
+
+    //! Sets the threshold for the automatic display of the auto-completion
+    //! list as the user types to \a thresh.  The threshold is the number of
+    //! characters that the user must type before the list is displayed.  If
+    //! the threshold is less than or equal to 0 then the list is disabled.
+    //! The default is -1.
+    //!
+    //! \sa autoCompletionThreshold(), setAutoCompletionWordSeparators()
+    virtual void setAutoCompletionThreshold(int thresh);
+
+    //! Sets the behavior of the auto-completion list when it has a single
+    //! entry.  The default is AcusNever.
+    //!
+    //! \sa autoCompletionUseSingle()
+    virtual void setAutoCompletionUseSingle(AutoCompletionUseSingle single);
+
+    //! If \a autoindent is true then auto-indentation is enabled.  The default
+    //! is false.
+    //!
+    //! \sa autoIndent()
+    virtual void setAutoIndent(bool autoindent);
+
+    //! Sets the brace matching mode to \a bm.  The default is NoBraceMatching.
+    //!
+    //! \sa braceMatching()
+    virtual void setBraceMatching(BraceMatch bm);
+
+    //! If \a deindent is true then the backspace key will unindent a line
+    //! rather then delete a character.
+    //!
+    //! \sa backspaceUnindents(), tabIndents(), setTabIndents()
+    virtual void setBackspaceUnindents(bool unindent);
+
+    //! Sets the foreground colour of the caret to \a col.
+    virtual void setCaretForegroundColor(const QColor &col);
+
+    //! Sets the background colour, including the alpha component, of the line
+    //! containing the caret to \a col.
+    //!
+    //! \sa setCaretLineVisible()
+    virtual void setCaretLineBackgroundColor(const QColor &col);
+
+    //! Sets the width of the frame of the line containing the caret to \a
+    //! width.
+    virtual void setCaretLineFrameWidth(int width);
+
+    //! Enables or disables, according to \a enable, the background color of
+    //! the line containing the caret.
+    //!
+    //! \sa setCaretLineBackgroundColor()
+    virtual void setCaretLineVisible(bool enable);
+
+    //! Sets the width of the caret to \a width pixels.  A \a width of 0 makes
+    //! the caret invisible.
+    virtual void setCaretWidth(int width);
+
+    //! The widget's text (ie. foreground) colour is set to \a c.  This has no
+    //! effect if a language lexer has been set.
+    //!
+    //! \sa color()
+    virtual void setColor(const QColor &c);
+
+    //! Sets the cursor to the line \a line at the position \a index.
+    //!
+    //! \sa getCursorPosition()
+    virtual void setCursorPosition(int line, int index);
+
+    //! Sets the end-of-line mode to \a mode.  The default is the platform's
+    //! natural mode.
+    //!
+    //! \sa eolMode()
+    virtual void setEolMode(EolMode mode);
+
+    //! If \a visible is true then end-of-lines are made visible.  The default
+    //! is that they are invisible.
+    //!
+    //! \sa eolVisibility()
+    virtual void setEolVisibility(bool visible);
+
+    //! Sets the folding style for margin \a margin to \a fold.  The default
+    //! style is NoFoldStyle (ie. folding is disabled) and the default margin
+    //! is 2.
+    //!
+    //! \sa folding()
+    virtual void setFolding(FoldStyle fold, int margin = 2);
+
+    //! Sets the indentation of line \a line to \a indentation characters.
+    //!
+    //! \sa indentation()
+    virtual void setIndentation(int line, int indentation);
+
+    //! Enables or disables, according to \a enable, this display of
+    //! indentation guides.
+    //!
+    //! \sa indentationGuides()
+    virtual void setIndentationGuides(bool enable);
+
+    //! Set the background colour of indentation guides to \a col.
+    //!
+    //! \sa setIndentationGuidesForegroundColor()
+    virtual void setIndentationGuidesBackgroundColor(const QColor &col);
+
+    //! Set the foreground colour of indentation guides to \a col.
+    //!
+    //! \sa setIndentationGuidesBackgroundColor()
+    virtual void setIndentationGuidesForegroundColor(const QColor &col);
+
+    //! If \a tabs is true then indentations are created using tabs and spaces,
+    //! rather than just spaces.
+    //!
+    //! \sa indentationsUseTabs()
+    virtual void setIndentationsUseTabs(bool tabs);
+
+    //! Sets the indentation width to \a width characters.  If \a width is 0
+    //! then the value returned by tabWidth() is used.
+    //!
+    //! \sa indentationWidth(), tabWidth()
+    virtual void setIndentationWidth(int width);
+
+    //! Sets the specific language lexer used to style text to \a lex.  If
+    //! \a lex is 0 then syntax styling is disabled.
+    //!
+    //! \sa lexer()
+    virtual void setLexer(QsciLexer *lexer = 0);
+
+    //! Set the background colour of all margins to \a col.  The default is a
+    //! gray.
+    //!
+    //! \sa setMarginsForegroundColor()
+    virtual void setMarginsBackgroundColor(const QColor &col);
+
+    //! Set the font used in all margins to \a f.
+    virtual void setMarginsFont(const QFont &f);
+
+    //! Set the foreground colour of all margins to \a col.  The default is
+    //! black.
+    //!
+    //! \sa setMarginsBackgroundColor()
+    virtual void setMarginsForegroundColor(const QColor &col);
+
+    //! Enables or disables, according to \a lnrs, the display of line numbers
+    //! in margin \a margin.
+    //!
+    //! \sa marginLineNumbers(), setMarginType(), SCI_SETMARGINTYPEN
+    virtual void setMarginLineNumbers(int margin, bool lnrs);
+
+    //! Sets the marker mask of margin \a margin to \a mask.  Only those
+    //! markers whose bit is set in the mask are displayed in the margin.
+    //!
+    //! \sa marginMarkerMask(), QsciMarker, SCI_SETMARGINMASKN
+    virtual void setMarginMarkerMask(int margin, int mask);
+
+    //! Enables or disables, according to \a sens, the sensitivity of margin
+    //! \a margin to mouse clicks.  If the user clicks in a sensitive margin
+    //! the marginClicked() signal is emitted.
+    //!
+    //! \sa marginSensitivity(), marginClicked(), SCI_SETMARGINSENSITIVEN
+    virtual void setMarginSensitivity(int margin, bool sens);
+
+    //! Sets the width of margin \a margin to \a width pixels.  If the width of
+    //! a margin is 0 then it is not displayed.
+    //!
+    //! \sa marginWidth(), SCI_SETMARGINWIDTHN
+    virtual void setMarginWidth(int margin, int width);
+
+    //! Sets the width of margin \a margin so that it is wide enough to display
+    //! \a s in the current margin font.
+    //!
+    //! \sa marginWidth(), SCI_SETMARGINWIDTHN
+    virtual void setMarginWidth(int margin, const QString &s);
+
+    //! Sets the modified state of the text edit to \a m.  Note that it is only
+    //! possible to clear the modified state (where \a m is false).  Attempts
+    //! to set the modified state (where \a m is true) are ignored.
+    //!
+    //! \sa isModified(), modificationChanged()
+    virtual void setModified(bool m);
+
+    //! The widget's paper (ie. background) colour is set to \a c.  This has no
+    //! effect if a language lexer has been set.
+    //!
+    //! \sa paper()
+    virtual void setPaper(const QColor &c);
+
+    //! Sets the read-only state of the text edit to \a ro.
+    //!
+    //! \sa isReadOnly()
+    virtual void setReadOnly(bool ro);
+
+    //! Sets the selection which starts at position \a indexFrom in line
+    //! \a lineFrom and ends at position \a indexTo in line \a lineTo.  The
+    //! cursor is moved to position \a indexTo in \a lineTo.
+    //!
+    //! \sa getSelection()
+    virtual void setSelection(int lineFrom, int indexFrom, int lineTo,
+            int indexTo);
+
+    //! Sets the background colour, including the alpha component, of selected
+    //! text to \a col.
+    //!
+    //! \sa resetSelectionBackgroundColor(), setSelectionForegroundColor()
+    virtual void setSelectionBackgroundColor(const QColor &col);
+
+    //! Sets the foreground colour of selected text to \a col.
+    //!
+    //! \sa resetSelectionForegroundColor(), setSelectionBackgroundColor()
+    virtual void setSelectionForegroundColor(const QColor &col);
+
+    //! If \a indent is true then the tab key will indent a line rather than
+    //! insert a tab character.
+    //!
+    //! \sa tabIndents(), backspaceUnindents(), setBackspaceUnindents()
+    virtual void setTabIndents(bool indent);
+
+    //! Sets the tab width to \a width characters.
+    //!
+    //! \sa tabWidth()
+    virtual void setTabWidth(int width);
+
+    //! Replaces all of the current text with \a text.  Note that the
+    //! undo/redo history is cleared by this function.
+    //!
+    //! \sa text()
+    virtual void setText(const QString &text);
+
+    //! Sets the current text encoding.  If \a cp is true then UTF8 is used,
+    //! otherwise Latin1 is used.
+    //!
+    //! \sa isUtf8()
+    virtual void setUtf8(bool cp);
+
+    //! Sets the visibility of whitespace to mode \a mode.  The default is that
+    //! whitespace is invisible.
+    //!
+    //! \sa whitespaceVisibility()
+    virtual void setWhitespaceVisibility(WhitespaceVisibility mode);
+
+    //! Sets the line wrap mode to \a mode.  The default is that lines are not
+    //! wrapped.
+    //!
+    //! \sa wrapMode()
+    virtual void setWrapMode(WrapMode mode);
+
+    //! Undo the last change or sequence of changes.
+    //!
+    //! Scintilla has multiple level undo and redo.  It will continue to record
+    //! undoable actions until memory runs out.  Sequences of typing or
+    //! deleting are compressed into single actions to make it easier to undo
+    //! and redo at a sensible level of detail.  Sequences of actions can be
+    //! combined into actions that are undone as a unit.  These sequences occur
+    //! between calls to beginUndoAction() and endUndoAction().  These
+    //! sequences can be nested and only the top level sequences are undone as
+    //! units. 
+    //!
+    //! \sa beginUndoAction(), endUndoAction(), isUndoAvailable()
+    virtual void undo();
+
+    //! Decreases the indentation of line \a line by an indentation width.
+    //!
+    //! \sa indent()
+    virtual void unindent(int line);
+
+    //! Zooms in on the text by by making the base font size \a range points
+    //! larger and recalculating all font sizes.
+    //!
+    //! \sa zoomOut(), zoomTo()
+    virtual void zoomIn(int range);
+
+    //! \overload
+    //!
+    //! Zooms in on the text by by making the base font size one point larger
+    //! and recalculating all font sizes.
+    virtual void zoomIn();
+
+    //! Zooms out on the text by by making the base font size \a range points
+    //! smaller and recalculating all font sizes.
+    //!
+    //! \sa zoomIn(), zoomTo()
+    virtual void zoomOut(int range);
+
+    //! \overload
+    //!
+    //! Zooms out on the text by by making the base font size one point larger
+    //! and recalculating all font sizes.
+    virtual void zoomOut();
+
+    //! Zooms the text by making the base font size \a size points and
+    //! recalculating all font sizes.
+    //!
+    //! \sa zoomIn(), zoomOut()
+    virtual void zoomTo(int size);
+
+signals:
+    //! This signal is emitted whenever the cursor position changes.  \a line
+    //! contains the line number and \a index contains the character index
+    //! within the line.
+    void cursorPositionChanged(int line, int index);
+
+    //! This signal is emitted whenever text is selected or de-selected.
+    //! \a yes is true if text has been selected and false if text has been
+    //! deselected.  If \a yes is true then copy() can be used to copy the
+    //! selection to the clipboard.  If \a yes is false then copy() does
+    //! nothing. 
+    //!
+    //! \sa copy(), selectionChanged()
+    void copyAvailable(bool yes);
+
+    //! This signal is emitted whenever the user clicks on an indicator.  \a
+    //! line is the number of the line where the user clicked.  \a index is the
+    //! character index within the line.  \a state is the state of the modifier
+    //! keys (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and
+    //! Qt::MetaModifier) when the user clicked.
+    //!
+    //! \sa indicatorReleased()
+    void indicatorClicked(int line, int index, Qt::KeyboardModifiers state);
+
+    //! This signal is emitted whenever the user releases the mouse on an
+    //! indicator.  \a line is the number of the line where the user clicked.
+    //! \a index is the character index within the line.  \a state is the state
+    //! of the modifier keys (Qt::ShiftModifier, Qt::ControlModifier,
+    //! Qt::AltModifer and Qt::MetaModifier) when the user released the mouse.
+    //!
+    //! \sa indicatorClicked()
+    void indicatorReleased(int line, int index, Qt::KeyboardModifiers state);
+
+    //! This signal is emitted whenever the number of lines of text changes.
+    void linesChanged();
+
+    //! This signal is emitted whenever the user clicks on a sensitive margin.
+    //! \a margin is the margin.  \a line is the number of the line where the
+    //! user clicked.  \a state is the state of the modifier keys
+    //! (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and
+    //! Qt::MetaModifier) when the user clicked.
+    //!
+    //! \sa marginSensitivity(), setMarginSensitivity()
+    void marginClicked(int margin, int line, Qt::KeyboardModifiers state);
+
+    //! This signal is emitted whenever the user right-clicks on a sensitive
+    //! margin.  \a margin is the margin.  \a line is the number of the line
+    //! where the user clicked.  \a state is the state of the modifier keys
+    //! (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and
+    //! Qt::MetaModifier) when the user clicked.
+    //!
+    //! \sa marginSensitivity(), setMarginSensitivity()
+    void marginRightClicked(int margin, int line, Qt::KeyboardModifiers state);
+
+    //! This signal is emitted whenever the user attempts to modify read-only
+    //! text.
+    //!
+    //! \sa isReadOnly(), setReadOnly()
+    void modificationAttempted();
+
+    //! This signal is emitted whenever the modification state of the text
+    //! changes.  \a m is true if the text has been modified.
+    //!
+    //! \sa isModified(), setModified()
+    void modificationChanged(bool m);
+
+    //! This signal is emitted whenever the selection changes.
+    //!
+    //! \sa copyAvailable()
+    void selectionChanged();
+
+    //! This signal is emitted whenever the text in the text edit changes.
+    void textChanged();
+
+    //! This signal is emitted when an item in a user defined list is activated
+    //! (selected).  \a id is the list identifier.  \a string is the text of
+    //! the item.
+    //!
+    //! \sa showUserList()
+    void userListActivated(int id, const QString &string);
+
+protected:
+    //! \reimp
+    virtual bool event(QEvent *e);
+
+    //! \reimp
+    virtual void changeEvent(QEvent *e);
+
+    //! \reimp
+    virtual void contextMenuEvent(QContextMenuEvent *e);
+
+    //! \reimp
+    virtual void wheelEvent(QWheelEvent *e);
+
+private slots:
+    void handleCallTipClick(int dir);
+    void handleCharAdded(int charadded);
+    void handleIndicatorClick(int pos, int modifiers);
+    void handleIndicatorRelease(int pos, int modifiers);
+    void handleMarginClick(int pos, int margin, int modifiers);
+    void handleMarginRightClick(int pos, int margin, int modifiers);
+    void handleModified(int pos, int mtype, const char *text, int len,
+            int added, int line, int foldNow, int foldPrev, int token,
+            int annotationLinesAdded);
+    void handlePropertyChange(const char *prop, const char *val);
+    void handleSavePointReached();
+    void handleSavePointLeft();
+    void handleSelectionChanged(bool yes);
+    void handleAutoCompletionSelection();
+    void handleUserListSelection(const char *text, int id);
+
+    void handleStyleColorChange(const QColor &c, int style);
+    void handleStyleEolFillChange(bool eolfill, int style);
+    void handleStyleFontChange(const QFont &f, int style);
+    void handleStylePaperChange(const QColor &c, int style);
+
+    void handleUpdateUI(int updated);
+
+    void delete_selection();
+
+private:
+    void detachLexer();
+
+    enum IndentState {
+        isNone,
+        isKeywordStart,
+        isBlockStart,
+        isBlockEnd
+    };
+
+    void maintainIndentation(char ch, long pos);
+    void autoIndentation(char ch, long pos);
+    void autoIndentLine(long pos, int line, int indent);
+    int blockIndent(int line);
+    IndentState getIndentState(int line);
+    bool rangeIsWhitespace(long spos, long epos);
+    int findStyledWord(const char *text, int style, const char *words);
+
+    void checkMarker(int &markerNumber);
+    void checkIndicator(int &indicatorNumber);
+    static void allocateId(int &id, unsigned &allocated, int min, int max);
+    int currentIndent() const;
+    int indentWidth() const;
+    bool doFind();
+    int simpleFind();
+    void foldClick(int lineClick, int bstate);
+    void foldChanged(int line, int levelNow, int levelPrev);
+    void foldExpand(int &line, bool doExpand, bool force = false,
+            int visLevels = 0, int level = -1);
+    void setFoldMarker(int marknr, int mark = SC_MARK_EMPTY);
+    void setLexerStyle(int style);
+    void setStylesFont(const QFont &f, int style);
+    void setEnabledColors(int style, QColor &fore, QColor &back);
+
+    void braceMatch();
+    long checkBrace(long pos, int brace_style, bool &colonMode);
+    void gotoMatchingBrace(bool select);
+
+    void startAutoCompletion(AutoCompletionSource acs, bool checkThresh,
+            bool choose_single);
+
+    int adjustedCallTipPosition(int ctshift) const;
+    bool getSeparator(int &pos) const;
+    QString getWord(int &pos) const;
+    char getCharacter(int &pos) const;
+    bool isStartChar(char ch) const;
+
+    bool ensureRW();
+    void insertAtPos(const QString &text, int pos);
+    static int mapModifiers(int modifiers);
+
+    QString wordAtPosition(int position) const;
+
+    ScintillaBytes styleText(const QList<QsciStyledText> &styled_text,
+            char **styles, int style_offset = 0);
+
+    struct FindState
+    {
+        enum Status
+        {
+            Finding,
+            FindingInSelection,
+            Idle
+        };
+
+        FindState() : status(Idle) {}
+
+        Status status;
+        QString expr;
+        bool wrap;
+        bool forward;
+        int flags;
+        long startpos, startpos_orig;
+        long endpos, endpos_orig;
+        bool show;
+    };
+
+    FindState findState;
+
+    unsigned allocatedMarkers;
+    unsigned allocatedIndicators;
+    int oldPos;
+    int ctPos;
+    bool selText;
+    FoldStyle fold;
+    int foldmargin;
+    bool autoInd;
+    BraceMatch braceMode;
+    AutoCompletionSource acSource;
+    int acThresh;
+    QStringList wseps;
+    const char *wchars;
+    CallTipsPosition call_tips_position;
+    CallTipsStyle call_tips_style;
+    int maxCallTips;
+    QStringList ct_entries;
+    int ct_cursor;
+    QList<int> ct_shifts;
+    AutoCompletionUseSingle use_single;
+    QPointer<QsciLexer> lex;
+    QsciCommandSet *stdCmds;
+    QsciDocument doc;
+    QColor nl_text_colour;
+    QColor nl_paper_colour;
+    QByteArray explicit_fillups;
+    bool fillups_enabled;
+
+    // The following allow QsciListBoxQt to distinguish between an
+    // auto-completion list and a user list, and to return the full selection
+    // of an auto-completion list.
+    friend class QsciListBoxQt;
+
+    QString acSelection;
+    bool isAutoCompletionList() const;
+
+    void set_shortcut(QAction *action, QsciCommand::Command cmd_id) const;
+
+    QsciScintilla(const QsciScintilla &);
+    QsciScintilla &operator=(const QsciScintilla &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qsciscintillabase.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,3891 @@
+// This class defines the "official" low-level API.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCISCINTILLABASE_H
+#define QSCISCINTILLABASE_H
+
+#include <qglobal.h>
+
+#include <QAbstractScrollArea>
+#include <QByteArray>
+#include <QPoint>
+#include <QTimer>
+
+#include <Qsci/qsciglobal.h>
+
+
+QT_BEGIN_NAMESPACE
+class QColor;
+class QImage;
+class QMimeData;
+class QPainter;
+class QPixmap;
+class QUrl;
+QT_END_NAMESPACE
+
+class QsciScintillaQt;
+
+
+//! \brief The QsciScintillaBase class implements the Scintilla editor widget
+//! and its low-level API.
+//!
+//! Scintilla (http://www.scintilla.org) is a powerful C++ editor class that
+//! supports many features including syntax styling, error indicators, code
+//! completion and call tips. It is particularly useful as a programmer's
+//! editor.
+//!
+//! QsciScintillaBase is a port to Qt of Scintilla. It implements the standard
+//! Scintilla API which consists of a number of messages each taking up to
+//! two arguments.
+//!
+//! See QsciScintilla for the implementation of a higher level API that is more
+//! consistent with the rest of the Qt toolkit.
+class QSCINTILLA_EXPORT QsciScintillaBase : public QAbstractScrollArea
+{
+    Q_OBJECT
+
+public:
+    //! The low-level Scintilla API is implemented as a set of messages each of
+    //! which takes up to two parameters (\a wParam and \a lParam) and
+    //! optionally return a value. This enum defines all the possible messages.
+    enum
+    {
+        //!
+        SCI_START = 2000,
+
+        //!
+        SCI_OPTIONAL_START = 3000,
+
+        //!
+        SCI_LEXER_START = 4000,
+
+        //! This message appends some text to the end of the document.
+        //! \a wParam is the length of the text.
+        //! \a lParam is the text to be appended.
+        SCI_ADDTEXT = 2001,
+
+        //!
+        SCI_ADDSTYLEDTEXT = 2002,
+
+        //!
+        SCI_INSERTTEXT = 2003,
+
+        //!
+        SCI_CLEARALL = 2004,
+
+        //!
+        SCI_CLEARDOCUMENTSTYLE = 2005,
+
+        //!
+        SCI_GETLENGTH = 2006,
+
+        //!
+        SCI_GETCHARAT = 2007,
+
+        //! This message returns the current position.
+        //! 
+        //! \sa SCI_SETCURRENTPOS
+        SCI_GETCURRENTPOS = 2008,
+
+        //! This message returns the anchor.
+        //! 
+        //! \sa SCI_SETANCHOR
+        SCI_GETANCHOR = 2009,
+
+        //!
+        SCI_GETSTYLEAT = 2010,
+
+        //!
+        SCI_REDO = 2011,
+
+        //!
+        SCI_SETUNDOCOLLECTION = 2012,
+
+        //!
+        SCI_SELECTALL = 2013,
+
+        //! This message marks the current state of the text as the the save
+        //! point. This is usually done when the text is saved or loaded.
+        //! 
+        //! \sa SCN_SAVEPOINTREACHED(), SCN_SAVEPOINTLEFT()
+        SCI_SETSAVEPOINT = 2014,
+
+        //!
+        SCI_GETSTYLEDTEXT = 2015,
+
+        //!
+        SCI_CANREDO = 2016,
+
+        //! This message returns the line that contains a particular instance
+        //! of a marker.
+        //! \a wParam is the handle of the marker.
+        //!
+        //! \sa SCI_MARKERADD
+        SCI_MARKERLINEFROMHANDLE = 2017,
+
+        //! This message removes a particular instance of a marker.
+        //! \a wParam is the handle of the marker.
+        //!
+        //! \sa SCI_MARKERADD
+        SCI_MARKERDELETEHANDLE = 2018,
+
+        //!
+        SCI_GETUNDOCOLLECTION = 2019,
+
+        //!
+        SCI_GETVIEWWS = 2020,
+
+        //!
+        SCI_SETVIEWWS = 2021,
+
+        //!
+        SCI_POSITIONFROMPOINT = 2022,
+
+        //!
+        SCI_POSITIONFROMPOINTCLOSE = 2023,
+
+        //!
+        SCI_GOTOLINE = 2024,
+
+        //! This message clears the current selection and sets the current
+        //! position.
+        //! \a wParam is the new current position.
+        //! 
+        //! \sa SCI_SETCURRENTPOS
+        SCI_GOTOPOS = 2025,
+
+        //! This message sets the anchor.
+        //! \a wParam is the new anchor.
+        //! 
+        //! \sa SCI_GETANCHOR
+        SCI_SETANCHOR = 2026,
+
+        //!
+        SCI_GETCURLINE = 2027,
+
+        //! This message returns the character position of the start of the
+        //! text that needs to be syntax styled.
+        //! 
+        //! \sa SCN_STYLENEEDED()
+        SCI_GETENDSTYLED = 2028,
+
+        //!
+        SCI_CONVERTEOLS = 2029,
+
+        //!
+        SCI_GETEOLMODE = 2030,
+
+        //!
+        SCI_SETEOLMODE = 2031,
+
+        //!
+        SCI_STARTSTYLING = 2032,
+
+        //!
+        SCI_SETSTYLING = 2033,
+
+        //!
+        SCI_GETBUFFEREDDRAW = 2034,
+
+        //!
+        SCI_SETBUFFEREDDRAW = 2035,
+
+        //!
+        SCI_SETTABWIDTH = 2036,
+
+        //!
+        SCI_GETTABWIDTH = 2121,
+
+        //!
+        SCI_SETCODEPAGE = 2037,
+
+        //! This message sets the symbol used to draw one of 32 markers.  Some
+        //! markers have pre-defined uses, see the SC_MARKNUM_* values.
+        //! \a wParam is the number of the marker.
+        //! \a lParam is the marker symbol and is one of the SC_MARK_* values.
+        //!
+        //! \sa SCI_MARKERADD, SCI_MARKERDEFINEPIXMAP,
+        //! SCI_MARKERDEFINERGBAIMAGE
+        SCI_MARKERDEFINE = 2040,
+
+        //! This message sets the foreground colour used to draw a marker.  A
+        //! colour is represented as a 24 bit value.  The 8 least significant
+        //! bits correspond to red, the middle 8 bits correspond to green, and
+        //! the 8 most significant bits correspond to blue.  The default value
+        //! is 0x000000.
+        //! \a wParam is the number of the marker.
+        //! \a lParam is the colour.
+        //!
+        //! \sa SCI_MARKERSETBACK
+        SCI_MARKERSETFORE = 2041,
+
+        //! This message sets the background colour used to draw a marker.  A
+        //! colour is represented as a 24 bit value.  The 8 least significant
+        //! bits correspond to red, the middle 8 bits correspond to green, and
+        //! the 8 most significant bits correspond to blue.  The default value
+        //! is 0xffffff.
+        //! \a wParam is the number of the marker.
+        //! \a lParam is the colour.
+        //!
+        //! \sa SCI_MARKERSETFORE
+        SCI_MARKERSETBACK = 2042,
+
+        //! This message adds a marker to a line.  A handle for the marker is
+        //! returned which can be used to track the marker's position.
+        //! \a wParam is the line number.
+        //! \a lParam is the number of the marker.
+        //!
+        //! \sa SCI_MARKERDELETE, SCI_MARKERDELETEALL,
+        //! SCI_MARKERDELETEHANDLE
+        SCI_MARKERADD = 2043,
+
+        //! This message deletes a marker from a line.
+        //! \a wParam is the line number.
+        //! \a lParam is the number of the marker.
+        //!
+        //! \sa SCI_MARKERADD, SCI_MARKERDELETEALL
+        SCI_MARKERDELETE = 2044,
+
+        //! This message deletes all occurences of a marker.
+        //! \a wParam is the number of the marker.  If \a wParam is -1 then all
+        //! markers are removed.
+        //!
+        //! \sa SCI_MARKERADD, SCI_MARKERDELETE
+        SCI_MARKERDELETEALL = 2045,
+
+        //! This message returns the 32 bit mask of markers at a line.
+        //! \a wParam is the line number.
+        SCI_MARKERGET = 2046,
+
+        //! This message looks for the next line to contain at least one marker
+        //! contained in a 32 bit mask of markers and returns the line number.
+        //! \a wParam is the line number to start the search from.
+        //! \a lParam is the mask of markers to search for.
+        //!
+        //! \sa SCI_MARKERPREVIOUS
+        SCI_MARKERNEXT = 2047,
+
+        //! This message looks for the previous line to contain at least one
+        //! marker contained in a 32 bit mask of markers and returns the line
+        //! number.
+        //! \a wParam is the line number to start the search from.
+        //! \a lParam is the mask of markers to search for.
+        //!
+        //! \sa SCI_MARKERNEXT
+        SCI_MARKERPREVIOUS = 2048,
+
+        //! This message sets the symbol used to draw one of the 32 markers to
+        //! a pixmap.  Pixmaps use the SC_MARK_PIXMAP marker symbol.
+        //! \a wParam is the number of the marker.
+        //! \a lParam is a pointer to a QPixmap instance.  Note that in other
+        //! ports of Scintilla this is a pointer to either raw or textual XPM
+        //! image data.
+        //!
+        //! \sa SCI_MARKERDEFINE, SCI_MARKERDEFINERGBAIMAGE
+        SCI_MARKERDEFINEPIXMAP = 2049,
+
+        //! This message sets what can be displayed in a margin.
+        //! \a wParam is the number of the margin.
+        //! \a lParam is the logical or of the SC_MARGIN_* values.
+        //!
+        //! \sa SCI_GETMARGINTYPEN
+        SCI_SETMARGINTYPEN = 2240,
+
+        //! This message returns what can be displayed in a margin.
+        //! \a wParam is the number of the margin.
+        //!
+        //! \sa SCI_SETMARGINTYPEN
+        SCI_GETMARGINTYPEN = 2241,
+
+        //! This message sets the width of a margin in pixels.
+        //! \a wParam is the number of the margin.
+        //! \a lParam is the new margin width.
+        //!
+        //! \sa SCI_GETMARGINWIDTHN
+        SCI_SETMARGINWIDTHN = 2242,
+
+        //! This message returns the width of a margin in pixels.
+        //! \a wParam is the number of the margin.
+        //!
+        //! \sa SCI_SETMARGINWIDTHN
+        SCI_GETMARGINWIDTHN = 2243,
+
+        //! This message sets the mask of a margin.  The mask is a 32 value
+        //! with one bit for each possible marker.  If a bit is set then the
+        //! corresponding marker is displayed.  By default, all markers are
+        //! displayed.
+        //! \a wParam is the number of the margin.
+        //! \a lParam is the new margin mask.
+        //!
+        //! \sa SCI_GETMARGINMASKN, SCI_MARKERDEFINE
+        SCI_SETMARGINMASKN = 2244,
+
+        //! This message returns the mask of a margin.
+        //! \a wParam is the number of the margin.
+        //!
+        //! \sa SCI_SETMARGINMASKN
+        SCI_GETMARGINMASKN = 2245,
+
+        //! This message sets the sensitivity of a margin to mouse clicks.
+        //! \a wParam is the number of the margin.
+        //! \a lParam is non-zero to make the margin sensitive to mouse clicks.
+        //! When the mouse is clicked the SCN_MARGINCLICK() signal is emitted.
+        //!
+        //! \sa SCI_GETMARGINSENSITIVEN, SCN_MARGINCLICK()
+        SCI_SETMARGINSENSITIVEN = 2246,
+
+        //! This message returns the sensitivity of a margin to mouse clicks.
+        //! \a wParam is the number of the margin.
+        //!
+        //! \sa SCI_SETMARGINSENSITIVEN, SCN_MARGINCLICK()
+        SCI_GETMARGINSENSITIVEN = 2247,
+
+        //! This message sets the cursor shape displayed over a margin.
+        //! \a wParam is the number of the margin.
+        //! \a lParam is the cursor shape, normally either SC_CURSORARROW or
+        //! SC_CURSORREVERSEARROW.  Note that, currently, QScintilla implements
+        //! both of these as Qt::ArrowCursor.
+        //!
+        //! \sa SCI_GETMARGINCURSORN
+        SCI_SETMARGINCURSORN = 2248,
+
+        //! This message returns the cursor shape displayed over a margin.
+        //! \a wParam is the number of the margin.
+        //!
+        //! \sa SCI_SETMARGINCURSORN
+        SCI_GETMARGINCURSORN = 2249,
+
+        //!
+        SCI_STYLECLEARALL = 2050,
+
+        //!
+        SCI_STYLESETFORE = 2051,
+
+        //!
+        SCI_STYLESETBACK = 2052,
+
+        //!
+        SCI_STYLESETBOLD = 2053,
+
+        //!
+        SCI_STYLESETITALIC = 2054,
+
+        //!
+        SCI_STYLESETSIZE = 2055,
+
+        //!
+        SCI_STYLESETFONT = 2056,
+
+        //!
+        SCI_STYLESETEOLFILLED = 2057,
+
+        //!
+        SCI_STYLERESETDEFAULT = 2058,
+
+        //!
+        SCI_STYLESETUNDERLINE = 2059,
+
+        //!
+        SCI_STYLESETCASE = 2060,
+
+        //!
+        SCI_STYLESETSIZEFRACTIONAL = 2061,
+
+        //!
+        SCI_STYLEGETSIZEFRACTIONAL = 2062,
+
+        //!
+        SCI_STYLESETWEIGHT = 2063,
+
+        //!
+        SCI_STYLEGETWEIGHT = 2064,
+
+        //!
+        SCI_STYLESETCHARACTERSET = 2066,
+
+        //!
+        SCI_SETSELFORE = 2067,
+
+        //!
+        SCI_SETSELBACK = 2068,
+
+        //!
+        SCI_SETCARETFORE = 2069,
+
+        //!
+        SCI_ASSIGNCMDKEY = 2070,
+
+        //!
+        SCI_CLEARCMDKEY = 2071,
+
+        //!
+        SCI_CLEARALLCMDKEYS = 2072,
+
+        //!
+        SCI_SETSTYLINGEX = 2073,
+
+        //!
+        SCI_STYLESETVISIBLE = 2074,
+
+        //!
+        SCI_GETCARETPERIOD = 2075,
+
+        //!
+        SCI_SETCARETPERIOD = 2076,
+
+        //!
+        SCI_SETWORDCHARS = 2077,
+
+        //!
+        SCI_BEGINUNDOACTION = 2078,
+
+        //!
+        SCI_ENDUNDOACTION = 2079,
+
+        //!
+        SCI_INDICSETSTYLE = 2080,
+
+        //!
+        SCI_INDICGETSTYLE = 2081,
+
+        //!
+        SCI_INDICSETFORE = 2082,
+
+        //!
+        SCI_INDICGETFORE = 2083,
+
+        //!
+        SCI_SETWHITESPACEFORE = 2084,
+
+        //!
+        SCI_SETWHITESPACEBACK = 2085,
+
+        //!
+        SCI_SETWHITESPACESIZE = 2086,
+
+        //!
+        SCI_GETWHITESPACESIZE = 2087,
+
+        //!
+        SCI_SETSTYLEBITS = 2090,
+
+        //!
+        SCI_GETSTYLEBITS = 2091,
+
+        //!
+        SCI_SETLINESTATE = 2092,
+
+        //!
+        SCI_GETLINESTATE = 2093,
+
+        //!
+        SCI_GETMAXLINESTATE = 2094,
+
+        //!
+        SCI_GETCARETLINEVISIBLE = 2095,
+
+        //!
+        SCI_SETCARETLINEVISIBLE = 2096,
+
+        //!
+        SCI_GETCARETLINEBACK = 2097,
+
+        //!
+        SCI_SETCARETLINEBACK = 2098,
+
+        //!
+        SCI_STYLESETCHANGEABLE = 2099,
+
+        //!
+        SCI_AUTOCSHOW = 2100,
+
+        //!
+        SCI_AUTOCCANCEL = 2101,
+
+        //!
+        SCI_AUTOCACTIVE = 2102,
+
+        //!
+        SCI_AUTOCPOSSTART = 2103,
+
+        //!
+        SCI_AUTOCCOMPLETE = 2104,
+
+        //!
+        SCI_AUTOCSTOPS = 2105,
+
+        //!
+        SCI_AUTOCSETSEPARATOR = 2106,
+
+        //!
+        SCI_AUTOCGETSEPARATOR = 2107,
+
+        //!
+        SCI_AUTOCSELECT = 2108,
+
+        //!
+        SCI_AUTOCSETCANCELATSTART = 2110,
+
+        //!
+        SCI_AUTOCGETCANCELATSTART = 2111,
+
+        //!
+        SCI_AUTOCSETFILLUPS = 2112,
+
+        //!
+        SCI_AUTOCSETCHOOSESINGLE = 2113,
+
+        //!
+        SCI_AUTOCGETCHOOSESINGLE = 2114,
+
+        //!
+        SCI_AUTOCSETIGNORECASE = 2115,
+
+        //!
+        SCI_AUTOCGETIGNORECASE = 2116,
+
+        //!
+        SCI_USERLISTSHOW = 2117,
+
+        //!
+        SCI_AUTOCSETAUTOHIDE = 2118,
+
+        //!
+        SCI_AUTOCGETAUTOHIDE = 2119,
+
+        //!
+        SCI_AUTOCSETDROPRESTOFWORD = 2270,
+
+        //!
+        SCI_AUTOCGETDROPRESTOFWORD = 2271,
+
+        //!
+        SCI_SETINDENT = 2122,
+
+        //!
+        SCI_GETINDENT = 2123,
+
+        //!
+        SCI_SETUSETABS = 2124,
+
+        //!
+        SCI_GETUSETABS = 2125,
+
+        //!
+        SCI_SETLINEINDENTATION = 2126,
+
+        //!
+        SCI_GETLINEINDENTATION = 2127,
+
+        //!
+        SCI_GETLINEINDENTPOSITION = 2128,
+
+        //!
+        SCI_GETCOLUMN = 2129,
+
+        //!
+        SCI_SETHSCROLLBAR = 2130,
+
+        //!
+        SCI_GETHSCROLLBAR = 2131,
+
+        //!
+        SCI_SETINDENTATIONGUIDES = 2132,
+
+        //!
+        SCI_GETINDENTATIONGUIDES = 2133,
+
+        //!
+        SCI_SETHIGHLIGHTGUIDE = 2134,
+
+        //!
+        SCI_GETHIGHLIGHTGUIDE = 2135,
+
+        //!
+        SCI_GETLINEENDPOSITION = 2136,
+
+        //!
+        SCI_GETCODEPAGE = 2137,
+
+        //!
+        SCI_GETCARETFORE = 2138,
+
+        //! This message returns a non-zero value if the document is read-only.
+        //! 
+        //! \sa SCI_SETREADONLY
+        SCI_GETREADONLY = 2140,
+
+        //! This message sets the current position.
+        //! \a wParam is the new current position.
+        //! 
+        //! \sa SCI_GETCURRENTPOS
+        SCI_SETCURRENTPOS = 2141,
+
+        //!
+        SCI_SETSELECTIONSTART = 2142,
+
+        //!
+        SCI_GETSELECTIONSTART = 2143,
+
+        //!
+        SCI_SETSELECTIONEND = 2144,
+
+        //!
+        SCI_GETSELECTIONEND = 2145,
+
+        //!
+        SCI_SETPRINTMAGNIFICATION = 2146,
+
+        //!
+        SCI_GETPRINTMAGNIFICATION = 2147,
+
+        //!
+        SCI_SETPRINTCOLOURMODE = 2148,
+
+        //!
+        SCI_GETPRINTCOLOURMODE = 2149,
+
+        //!
+        SCI_FINDTEXT = 2150,
+
+        //!
+        SCI_FORMATRANGE = 2151,
+
+        //!
+        SCI_GETFIRSTVISIBLELINE = 2152,
+
+        //!
+        SCI_GETLINE = 2153,
+
+        //!
+        SCI_GETLINECOUNT = 2154,
+
+        //!
+        SCI_SETMARGINLEFT = 2155,
+
+        //!
+        SCI_GETMARGINLEFT = 2156,
+
+        //!
+        SCI_SETMARGINRIGHT = 2157,
+
+        //!
+        SCI_GETMARGINRIGHT = 2158,
+
+        //! This message returns a non-zero value if the document has been
+        //! modified.
+        SCI_GETMODIFY = 2159,
+
+        //!
+        SCI_SETSEL = 2160,
+
+        //!
+        SCI_GETSELTEXT = 2161,
+
+        //!
+        SCI_GETTEXTRANGE = 2162,
+
+        //!
+        SCI_HIDESELECTION = 2163,
+
+        //!
+        SCI_POINTXFROMPOSITION = 2164,
+
+        //!
+        SCI_POINTYFROMPOSITION = 2165,
+
+        //!
+        SCI_LINEFROMPOSITION = 2166,
+
+        //!
+        SCI_POSITIONFROMLINE = 2167,
+
+        //!
+        SCI_LINESCROLL = 2168,
+
+        //!
+        SCI_SCROLLCARET = 2169,
+
+        //!
+        SCI_REPLACESEL = 2170,
+
+        //! This message sets the read-only state of the document.
+        //! \a wParam is the new read-only state of the document.
+        //! 
+        //! \sa SCI_GETREADONLY
+        SCI_SETREADONLY = 2171,
+
+        //!
+        SCI_NULL = 2172,
+
+        //!
+        SCI_CANPASTE = 2173,
+
+        //!
+        SCI_CANUNDO = 2174,
+
+        //! This message empties the undo buffer.
+        SCI_EMPTYUNDOBUFFER = 2175,
+
+        //!
+        SCI_UNDO = 2176,
+
+        //!
+        SCI_CUT = 2177,
+
+        //!
+        SCI_COPY = 2178,
+
+        //!
+        SCI_PASTE = 2179,
+
+        //!
+        SCI_CLEAR = 2180,
+
+        //! This message sets the text of the document.
+        //! \a wParam is unused.
+        //! \a lParam is the new text of the document.
+        //! 
+        //! \sa SCI_GETTEXT
+        SCI_SETTEXT = 2181,
+
+        //! This message gets the text of the document.
+        //! \a wParam is size of the buffer that the text is copied to.
+        //! \a lParam is the address of the buffer that the text is copied to.
+        //! 
+        //! \sa SCI_SETTEXT
+        SCI_GETTEXT = 2182,
+
+        //! This message returns the length of the document.
+        SCI_GETTEXTLENGTH = 2183,
+
+        //!
+        SCI_GETDIRECTFUNCTION = 2184,
+
+        //!
+        SCI_GETDIRECTPOINTER = 2185,
+
+        //!
+        SCI_SETOVERTYPE = 2186,
+
+        //!
+        SCI_GETOVERTYPE = 2187,
+
+        //!
+        SCI_SETCARETWIDTH = 2188,
+
+        //!
+        SCI_GETCARETWIDTH = 2189,
+
+        //!
+        SCI_SETTARGETSTART = 2190,
+
+        //!
+        SCI_GETTARGETSTART = 2191,
+
+        //!
+        SCI_SETTARGETEND = 2192,
+
+        //!
+        SCI_GETTARGETEND = 2193,
+
+        //!
+        SCI_REPLACETARGET = 2194,
+
+        //!
+        SCI_REPLACETARGETRE = 2195,
+
+        //!
+        SCI_SEARCHINTARGET = 2197,
+
+        //!
+        SCI_SETSEARCHFLAGS = 2198,
+
+        //!
+        SCI_GETSEARCHFLAGS = 2199,
+
+        //!
+        SCI_CALLTIPSHOW = 2200,
+
+        //!
+        SCI_CALLTIPCANCEL = 2201,
+
+        //!
+        SCI_CALLTIPACTIVE = 2202,
+
+        //!
+        SCI_CALLTIPPOSSTART = 2203,
+
+        //!
+        SCI_CALLTIPSETHLT = 2204,
+
+        //!
+        SCI_CALLTIPSETBACK = 2205,
+
+        //!
+        SCI_CALLTIPSETFORE = 2206,
+
+        //!
+        SCI_CALLTIPSETFOREHLT = 2207,
+
+        //!
+        SCI_AUTOCSETMAXWIDTH = 2208,
+
+        //!
+        SCI_AUTOCGETMAXWIDTH = 2209,
+
+        //! This message is not implemented.
+        SCI_AUTOCSETMAXHEIGHT = 2210,
+
+        //!
+        SCI_AUTOCGETMAXHEIGHT = 2211,
+
+        //!
+        SCI_CALLTIPUSESTYLE = 2212,
+
+        //!
+        SCI_CALLTIPSETPOSITION = 2213,
+
+        //!
+        SCI_CALLTIPSETPOSSTART = 2214,
+
+        //!
+        SCI_VISIBLEFROMDOCLINE = 2220,
+
+        //!
+        SCI_DOCLINEFROMVISIBLE = 2221,
+
+        //!
+        SCI_SETFOLDLEVEL = 2222,
+
+        //!
+        SCI_GETFOLDLEVEL = 2223,
+
+        //!
+        SCI_GETLASTCHILD = 2224,
+
+        //!
+        SCI_GETFOLDPARENT = 2225,
+
+        //!
+        SCI_SHOWLINES = 2226,
+
+        //!
+        SCI_HIDELINES = 2227,
+
+        //!
+        SCI_GETLINEVISIBLE = 2228,
+
+        //!
+        SCI_SETFOLDEXPANDED = 2229,
+
+        //!
+        SCI_GETFOLDEXPANDED = 2230,
+
+        //!
+        SCI_TOGGLEFOLD = 2231,
+
+        //!
+        SCI_ENSUREVISIBLE = 2232,
+
+        //!
+        SCI_SETFOLDFLAGS = 2233,
+
+        //!
+        SCI_ENSUREVISIBLEENFORCEPOLICY = 2234,
+
+        //!
+        SCI_WRAPCOUNT = 2235,
+
+        //!
+        SCI_GETALLLINESVISIBLE = 2236,
+
+        //!
+        SCI_FOLDLINE = 2237,
+
+        //!
+        SCI_FOLDCHILDREN = 2238,
+
+        //!
+        SCI_EXPANDCHILDREN = 2239,
+
+        //!
+        SCI_SETMARGINBACKN = 2250,
+
+        //!
+        SCI_GETMARGINBACKN = 2251,
+
+        //!
+        SCI_SETMARGINS = 2252,
+
+        //!
+        SCI_GETMARGINS = 2253,
+
+        //!
+        SCI_SETTABINDENTS = 2260,
+
+        //!
+        SCI_GETTABINDENTS = 2261,
+
+        //!
+        SCI_SETBACKSPACEUNINDENTS = 2262,
+
+        //!
+        SCI_GETBACKSPACEUNINDENTS = 2263,
+
+        //!
+        SCI_SETMOUSEDWELLTIME = 2264,
+
+        //!
+        SCI_GETMOUSEDWELLTIME = 2265,
+
+        //!
+        SCI_WORDSTARTPOSITION = 2266,
+
+        //!
+        SCI_WORDENDPOSITION = 2267,
+
+        //!
+        SCI_SETWRAPMODE = 2268,
+
+        //!
+        SCI_GETWRAPMODE = 2269,
+
+        //!
+        SCI_SETLAYOUTCACHE = 2272,
+
+        //!
+        SCI_GETLAYOUTCACHE = 2273,
+
+        //!
+        SCI_SETSCROLLWIDTH = 2274,
+
+        //!
+        SCI_GETSCROLLWIDTH = 2275,
+
+        //! This message returns the width of some text when rendered in a
+        //! particular style.
+        //! \a wParam is the style number and is one of the STYLE_* values or
+        //! one of the styles defined by a lexer.
+        //! \a lParam is a pointer to the text.
+        SCI_TEXTWIDTH = 2276,
+
+        //!
+        SCI_SETENDATLASTLINE = 2277,
+
+        //!
+        SCI_GETENDATLASTLINE = 2278,
+
+        //!
+        SCI_TEXTHEIGHT = 2279,
+
+        //!
+        SCI_SETVSCROLLBAR = 2280,
+
+        //!
+        SCI_GETVSCROLLBAR = 2281,
+
+        //!
+        SCI_APPENDTEXT = 2282,
+
+        //!
+        SCI_GETTWOPHASEDRAW = 2283,
+
+        //!
+        SCI_SETTWOPHASEDRAW = 2284,
+
+        //!
+        SCI_AUTOCGETTYPESEPARATOR = 2285,
+
+        //!
+        SCI_AUTOCSETTYPESEPARATOR = 2286,
+
+        //!
+        SCI_TARGETFROMSELECTION = 2287,
+
+        //!
+        SCI_LINESJOIN = 2288,
+
+        //!
+        SCI_LINESSPLIT = 2289,
+
+        //!
+        SCI_SETFOLDMARGINCOLOUR = 2290,
+
+        //!
+        SCI_SETFOLDMARGINHICOLOUR = 2291,
+
+        //!
+        SCI_MARKERSETBACKSELECTED = 2292,
+
+        //!
+        SCI_MARKERENABLEHIGHLIGHT = 2293,
+
+        //!
+        SCI_LINEDOWN = 2300,
+
+        //!
+        SCI_LINEDOWNEXTEND = 2301,
+
+        //!
+        SCI_LINEUP = 2302,
+
+        //!
+        SCI_LINEUPEXTEND = 2303,
+
+        //!
+        SCI_CHARLEFT = 2304,
+
+        //!
+        SCI_CHARLEFTEXTEND = 2305,
+
+        //!
+        SCI_CHARRIGHT = 2306,
+
+        //!
+        SCI_CHARRIGHTEXTEND = 2307,
+
+        //!
+        SCI_WORDLEFT = 2308,
+
+        //!
+        SCI_WORDLEFTEXTEND = 2309,
+
+        //!
+        SCI_WORDRIGHT = 2310,
+
+        //!
+        SCI_WORDRIGHTEXTEND = 2311,
+
+        //!
+        SCI_HOME = 2312,
+
+        //!
+        SCI_HOMEEXTEND = 2313,
+
+        //!
+        SCI_LINEEND = 2314,
+
+        //!
+        SCI_LINEENDEXTEND = 2315,
+
+        //!
+        SCI_DOCUMENTSTART = 2316,
+
+        //!
+        SCI_DOCUMENTSTARTEXTEND = 2317,
+
+        //!
+        SCI_DOCUMENTEND = 2318,
+
+        //!
+        SCI_DOCUMENTENDEXTEND = 2319,
+
+        //!
+        SCI_PAGEUP = 2320,
+
+        //!
+        SCI_PAGEUPEXTEND = 2321,
+
+        //!
+        SCI_PAGEDOWN = 2322,
+
+        //!
+        SCI_PAGEDOWNEXTEND = 2323,
+
+        //!
+        SCI_EDITTOGGLEOVERTYPE = 2324,
+
+        //!
+        SCI_CANCEL = 2325,
+
+        //!
+        SCI_DELETEBACK = 2326,
+
+        //!
+        SCI_TAB = 2327,
+
+        //!
+        SCI_BACKTAB = 2328,
+
+        //!
+        SCI_NEWLINE = 2329,
+
+        //!
+        SCI_FORMFEED = 2330,
+
+        //!
+        SCI_VCHOME = 2331,
+
+        //!
+        SCI_VCHOMEEXTEND = 2332,
+
+        //!
+        SCI_ZOOMIN = 2333,
+
+        //!
+        SCI_ZOOMOUT = 2334,
+
+        //!
+        SCI_DELWORDLEFT = 2335,
+
+        //!
+        SCI_DELWORDRIGHT = 2336,
+
+        //!
+        SCI_LINECUT = 2337,
+
+        //!
+        SCI_LINEDELETE = 2338,
+
+        //!
+        SCI_LINETRANSPOSE = 2339,
+
+        //!
+        SCI_LOWERCASE = 2340,
+
+        //!
+        SCI_UPPERCASE = 2341,
+
+        //!
+        SCI_LINESCROLLDOWN = 2342,
+
+        //!
+        SCI_LINESCROLLUP = 2343,
+
+        //!
+        SCI_DELETEBACKNOTLINE = 2344,
+
+        //!
+        SCI_HOMEDISPLAY = 2345,
+
+        //!
+        SCI_HOMEDISPLAYEXTEND = 2346,
+
+        //!
+        SCI_LINEENDDISPLAY = 2347,
+
+        //!
+        SCI_LINEENDDISPLAYEXTEND = 2348,
+
+        //!
+        SCI_MOVECARETINSIDEVIEW = 2401,
+
+        //!
+        SCI_LINELENGTH = 2350,
+
+        //!
+        SCI_BRACEHIGHLIGHT = 2351,
+
+        //!
+        SCI_BRACEBADLIGHT = 2352,
+
+        //!
+        SCI_BRACEMATCH = 2353,
+
+        //!
+        SCI_LINEREVERSE = 2354,
+
+        //!
+        SCI_GETVIEWEOL = 2355,
+
+        //!
+        SCI_SETVIEWEOL = 2356,
+
+        //!
+        SCI_GETDOCPOINTER = 2357,
+
+        //!
+        SCI_SETDOCPOINTER = 2358,
+
+        //!
+        SCI_SETMODEVENTMASK = 2359,
+
+        //!
+        SCI_GETEDGECOLUMN = 2360,
+
+        //!
+        SCI_SETEDGECOLUMN = 2361,
+
+        //!
+        SCI_GETEDGEMODE = 2362,
+
+        //!
+        SCI_SETEDGEMODE = 2363,
+
+        //!
+        SCI_GETEDGECOLOUR = 2364,
+
+        //!
+        SCI_SETEDGECOLOUR = 2365,
+
+        //!
+        SCI_SEARCHANCHOR = 2366,
+
+        //!
+        SCI_SEARCHNEXT = 2367,
+
+        //!
+        SCI_SEARCHPREV = 2368,
+
+        //!
+        SCI_LINESONSCREEN = 2370,
+
+        //!
+        SCI_USEPOPUP = 2371,
+
+        //!
+        SCI_SELECTIONISRECTANGLE = 2372,
+
+        //!
+        SCI_SETZOOM = 2373,
+
+        //!
+        SCI_GETZOOM = 2374,
+
+        //!
+        SCI_CREATEDOCUMENT = 2375,
+
+        //!
+        SCI_ADDREFDOCUMENT = 2376,
+
+        //!
+        SCI_RELEASEDOCUMENT = 2377,
+
+        //!
+        SCI_GETMODEVENTMASK = 2378,
+
+        //!
+        SCI_SETFOCUS = 2380,
+
+        //!
+        SCI_GETFOCUS = 2381,
+
+        //!
+        SCI_SETSTATUS = 2382,
+
+        //!
+        SCI_GETSTATUS = 2383,
+
+        //!
+        SCI_SETMOUSEDOWNCAPTURES = 2384,
+
+        //!
+        SCI_GETMOUSEDOWNCAPTURES = 2385,
+
+        //!
+        SCI_SETCURSOR = 2386,
+
+        //!
+        SCI_GETCURSOR = 2387,
+
+        //!
+        SCI_SETCONTROLCHARSYMBOL = 2388,
+
+        //!
+        SCI_GETCONTROLCHARSYMBOL = 2389,
+
+        //!
+        SCI_WORDPARTLEFT = 2390,
+
+        //!
+        SCI_WORDPARTLEFTEXTEND = 2391,
+
+        //!
+        SCI_WORDPARTRIGHT = 2392,
+
+        //!
+        SCI_WORDPARTRIGHTEXTEND = 2393,
+
+        //!
+        SCI_SETVISIBLEPOLICY = 2394,
+
+        //!
+        SCI_DELLINELEFT = 2395,
+
+        //!
+        SCI_DELLINERIGHT = 2396,
+
+        //!
+        SCI_SETXOFFSET = 2397,
+
+        //!
+        SCI_GETXOFFSET = 2398,
+
+        //!
+        SCI_CHOOSECARETX = 2399,
+
+        //!
+        SCI_GRABFOCUS = 2400,
+
+        //!
+        SCI_SETXCARETPOLICY = 2402,
+
+        //!
+        SCI_SETYCARETPOLICY = 2403,
+
+        //!
+        SCI_LINEDUPLICATE = 2404,
+
+        //! This message takes a copy of an image and registers it so that it
+        //! can be refered to by a unique integer identifier.
+        //! \a wParam is the image's identifier.
+        //! \a lParam is a pointer to a QPixmap instance.  Note that in other
+        //! ports of Scintilla this is a pointer to either raw or textual XPM
+        //! image data.
+        //!
+        //! \sa SCI_CLEARREGISTEREDIMAGES, SCI_REGISTERRGBAIMAGE
+        SCI_REGISTERIMAGE = 2405,
+
+        //!
+        SCI_SETPRINTWRAPMODE = 2406,
+
+        //!
+        SCI_GETPRINTWRAPMODE = 2407,
+
+        //! This message de-registers all currently registered images.
+        //!
+        //! \sa SCI_REGISTERIMAGE, SCI_REGISTERRGBAIMAGE
+        SCI_CLEARREGISTEREDIMAGES = 2408,
+
+        //!
+        SCI_STYLESETHOTSPOT = 2409,
+
+        //!
+        SCI_SETHOTSPOTACTIVEFORE = 2410,
+
+        //!
+        SCI_SETHOTSPOTACTIVEBACK = 2411,
+
+        //!
+        SCI_SETHOTSPOTACTIVEUNDERLINE = 2412,
+
+        //!
+        SCI_PARADOWN = 2413,
+
+        //!
+        SCI_PARADOWNEXTEND = 2414,
+
+        //!
+        SCI_PARAUP = 2415,
+
+        //!
+        SCI_PARAUPEXTEND = 2416,
+
+        //!
+        SCI_POSITIONBEFORE = 2417,
+
+        //!
+        SCI_POSITIONAFTER = 2418,
+
+        //!
+        SCI_COPYRANGE = 2419,
+
+        //!
+        SCI_COPYTEXT = 2420,
+
+        //!
+        SCI_SETHOTSPOTSINGLELINE = 2421,
+
+        //!
+        SCI_SETSELECTIONMODE = 2422,
+
+        //!
+        SCI_GETSELECTIONMODE = 2423,
+
+        //!
+        SCI_GETLINESELSTARTPOSITION = 2424,
+
+        //!
+        SCI_GETLINESELENDPOSITION = 2425,
+
+        //!
+        SCI_LINEDOWNRECTEXTEND = 2426,
+
+        //!
+        SCI_LINEUPRECTEXTEND = 2427,
+
+        //!
+        SCI_CHARLEFTRECTEXTEND = 2428,
+
+        //!
+        SCI_CHARRIGHTRECTEXTEND = 2429,
+
+        //!
+        SCI_HOMERECTEXTEND = 2430,
+
+        //!
+        SCI_VCHOMERECTEXTEND = 2431,
+
+        //!
+        SCI_LINEENDRECTEXTEND = 2432,
+
+        //!
+        SCI_PAGEUPRECTEXTEND = 2433,
+
+        //!
+        SCI_PAGEDOWNRECTEXTEND = 2434,
+
+        //!
+        SCI_STUTTEREDPAGEUP = 2435,
+
+        //!
+        SCI_STUTTEREDPAGEUPEXTEND = 2436,
+
+        //!
+        SCI_STUTTEREDPAGEDOWN = 2437,
+
+        //!
+        SCI_STUTTEREDPAGEDOWNEXTEND = 2438,
+
+        //!
+        SCI_WORDLEFTEND = 2439,
+
+        //!
+        SCI_WORDLEFTENDEXTEND = 2440,
+
+        //!
+        SCI_WORDRIGHTEND = 2441,
+
+        //!
+        SCI_WORDRIGHTENDEXTEND = 2442,
+
+        //!
+        SCI_SETWHITESPACECHARS = 2443,
+
+        //!
+        SCI_SETCHARSDEFAULT = 2444,
+
+        //!
+        SCI_AUTOCGETCURRENT = 2445,
+
+        //!
+        SCI_ALLOCATE = 2446,
+
+        //!
+        SCI_HOMEWRAP = 2349,
+
+        //!
+        SCI_HOMEWRAPEXTEND = 2450,
+
+        //!
+        SCI_LINEENDWRAP = 2451,
+
+        //!
+        SCI_LINEENDWRAPEXTEND = 2452,
+
+        //!
+        SCI_VCHOMEWRAP = 2453,
+
+        //!
+        SCI_VCHOMEWRAPEXTEND = 2454,
+
+        //!
+        SCI_LINECOPY = 2455,
+
+        //!
+        SCI_FINDCOLUMN = 2456,
+
+        //!
+        SCI_GETCARETSTICKY = 2457,
+
+        //!
+        SCI_SETCARETSTICKY = 2458,
+
+        //!
+        SCI_TOGGLECARETSTICKY = 2459,
+
+        //!
+        SCI_SETWRAPVISUALFLAGS = 2460,
+
+        //!
+        SCI_GETWRAPVISUALFLAGS = 2461,
+
+        //!
+        SCI_SETWRAPVISUALFLAGSLOCATION = 2462,
+
+        //!
+        SCI_GETWRAPVISUALFLAGSLOCATION = 2463,
+
+        //!
+        SCI_SETWRAPSTARTINDENT = 2464,
+
+        //!
+        SCI_GETWRAPSTARTINDENT = 2465,
+
+        //!
+        SCI_MARKERADDSET = 2466,
+
+        //!
+        SCI_SETPASTECONVERTENDINGS = 2467,
+
+        //!
+        SCI_GETPASTECONVERTENDINGS = 2468,
+
+        //!
+        SCI_SELECTIONDUPLICATE = 2469,
+
+        //!
+        SCI_SETCARETLINEBACKALPHA = 2470,
+
+        //!
+        SCI_GETCARETLINEBACKALPHA = 2471,
+
+        //!
+        SCI_SETWRAPINDENTMODE = 2472,
+
+        //!
+        SCI_GETWRAPINDENTMODE = 2473,
+
+        //!
+        SCI_MARKERSETALPHA = 2476,
+
+        //!
+        SCI_GETSELALPHA = 2477,
+
+        //!
+        SCI_SETSELALPHA = 2478,
+
+        //!
+        SCI_GETSELEOLFILLED = 2479,
+
+        //!
+        SCI_SETSELEOLFILLED = 2480,
+
+        //!
+        SCI_STYLEGETFORE = 2481,
+
+        //!
+        SCI_STYLEGETBACK = 2482,
+
+        //!
+        SCI_STYLEGETBOLD = 2483,
+
+        //!
+        SCI_STYLEGETITALIC = 2484,
+
+        //!
+        SCI_STYLEGETSIZE = 2485,
+
+        //!
+        SCI_STYLEGETFONT = 2486,
+
+        //!
+        SCI_STYLEGETEOLFILLED = 2487,
+
+        //!
+        SCI_STYLEGETUNDERLINE = 2488,
+
+        //!
+        SCI_STYLEGETCASE = 2489,
+
+        //!
+        SCI_STYLEGETCHARACTERSET = 2490,
+
+        //!
+        SCI_STYLEGETVISIBLE = 2491,
+
+        //!
+        SCI_STYLEGETCHANGEABLE = 2492,
+
+        //!
+        SCI_STYLEGETHOTSPOT = 2493,
+
+        //!
+        SCI_GETHOTSPOTACTIVEFORE = 2494,
+
+        //!
+        SCI_GETHOTSPOTACTIVEBACK = 2495,
+
+        //!
+        SCI_GETHOTSPOTACTIVEUNDERLINE = 2496,
+
+        //!
+        SCI_GETHOTSPOTSINGLELINE = 2497,
+
+        //!
+        SCI_BRACEHIGHLIGHTINDICATOR = 2498,
+
+        //!
+        SCI_BRACEBADLIGHTINDICATOR = 2499,
+
+        //!
+        SCI_SETINDICATORCURRENT = 2500,
+
+        //!
+        SCI_GETINDICATORCURRENT = 2501,
+
+        //!
+        SCI_SETINDICATORVALUE = 2502,
+
+        //!
+        SCI_GETINDICATORVALUE = 2503,
+
+        //!
+        SCI_INDICATORFILLRANGE = 2504,
+
+        //!
+        SCI_INDICATORCLEARRANGE = 2505,
+
+        //!
+        SCI_INDICATORALLONFOR = 2506,
+
+        //!
+        SCI_INDICATORVALUEAT = 2507,
+
+        //!
+        SCI_INDICATORSTART = 2508,
+
+        //!
+        SCI_INDICATOREND = 2509,
+
+        //!
+        SCI_INDICSETUNDER = 2510,
+
+        //!
+        SCI_INDICGETUNDER = 2511,
+
+        //!
+        SCI_SETCARETSTYLE = 2512,
+
+        //!
+        SCI_GETCARETSTYLE = 2513,
+
+        //!
+        SCI_SETPOSITIONCACHE = 2514,
+
+        //!
+        SCI_GETPOSITIONCACHE = 2515,
+
+        //!
+        SCI_SETSCROLLWIDTHTRACKING = 2516,
+
+        //!
+        SCI_GETSCROLLWIDTHTRACKING = 2517,
+
+        //!
+        SCI_DELWORDRIGHTEND = 2518,
+
+        //! This message copies the selection.  If the selection is empty then
+        //! copy the line with the caret.
+        SCI_COPYALLOWLINE = 2519,
+
+        //! This message returns a pointer to the document text.  Any
+        //! subsequent message will invalidate the pointer.
+        SCI_GETCHARACTERPOINTER = 2520,
+
+        //!
+        SCI_INDICSETALPHA = 2523,
+
+        //!
+        SCI_INDICGETALPHA = 2524,
+
+        //!
+        SCI_SETEXTRAASCENT = 2525,
+
+        //!
+        SCI_GETEXTRAASCENT = 2526,
+
+        //!
+        SCI_SETEXTRADESCENT = 2527,
+
+        //!
+        SCI_GETEXTRADESCENT = 2528,
+
+        //!
+        SCI_MARKERSYMBOLDEFINED = 2529,
+
+        //!
+        SCI_MARGINSETTEXT = 2530,
+
+        //!
+        SCI_MARGINGETTEXT = 2531,
+
+        //!
+        SCI_MARGINSETSTYLE = 2532,
+
+        //!
+        SCI_MARGINGETSTYLE = 2533,
+
+        //!
+        SCI_MARGINSETSTYLES = 2534,
+
+        //!
+        SCI_MARGINGETSTYLES = 2535,
+
+        //!
+        SCI_MARGINTEXTCLEARALL = 2536,
+
+        //!
+        SCI_MARGINSETSTYLEOFFSET = 2537,
+
+        //!
+        SCI_MARGINGETSTYLEOFFSET = 2538,
+
+        //!
+        SCI_SETMARGINOPTIONS = 2539,
+
+        //!
+        SCI_ANNOTATIONSETTEXT = 2540,
+
+        //!
+        SCI_ANNOTATIONGETTEXT = 2541,
+
+        //!
+        SCI_ANNOTATIONSETSTYLE = 2542,
+
+        //!
+        SCI_ANNOTATIONGETSTYLE = 2543,
+
+        //!
+        SCI_ANNOTATIONSETSTYLES = 2544,
+
+        //!
+        SCI_ANNOTATIONGETSTYLES = 2545,
+
+        //!
+        SCI_ANNOTATIONGETLINES = 2546,
+
+        //!
+        SCI_ANNOTATIONCLEARALL = 2547,
+
+        //!
+        SCI_ANNOTATIONSETVISIBLE = 2548,
+
+        //!
+        SCI_ANNOTATIONGETVISIBLE = 2549,
+
+        //!
+        SCI_ANNOTATIONSETSTYLEOFFSET = 2550,
+
+        //!
+        SCI_ANNOTATIONGETSTYLEOFFSET = 2551,
+
+        //!
+        SCI_RELEASEALLEXTENDEDSTYLES = 2552,
+
+        //!
+        SCI_ALLOCATEEXTENDEDSTYLES = 2553,
+
+        //!
+        SCI_SETEMPTYSELECTION = 2556,
+
+        //!
+        SCI_GETMARGINOPTIONS = 2557,
+
+        //!
+        SCI_INDICSETOUTLINEALPHA = 2558,
+
+        //!
+        SCI_INDICGETOUTLINEALPHA = 2559,
+
+        //!
+        SCI_ADDUNDOACTION = 2560,
+
+        //!
+        SCI_CHARPOSITIONFROMPOINT = 2561,
+
+        //!
+        SCI_CHARPOSITIONFROMPOINTCLOSE = 2562,
+
+        //!
+        SCI_SETMULTIPLESELECTION = 2563,
+
+        //!
+        SCI_GETMULTIPLESELECTION = 2564,
+
+        //!
+        SCI_SETADDITIONALSELECTIONTYPING = 2565,
+
+        //!
+        SCI_GETADDITIONALSELECTIONTYPING = 2566,
+
+        //!
+        SCI_SETADDITIONALCARETSBLINK = 2567,
+
+        //!
+        SCI_GETADDITIONALCARETSBLINK = 2568,
+
+        //!
+        SCI_SCROLLRANGE = 2569,
+
+        //!
+        SCI_GETSELECTIONS = 2570,
+
+        //!
+        SCI_CLEARSELECTIONS = 2571,
+
+        //!
+        SCI_SETSELECTION = 2572,
+
+        //!
+        SCI_ADDSELECTION = 2573,
+
+        //!
+        SCI_SETMAINSELECTION = 2574,
+
+        //!
+        SCI_GETMAINSELECTION = 2575,
+
+        //!
+        SCI_SETSELECTIONNCARET = 2576,
+
+        //!
+        SCI_GETSELECTIONNCARET = 2577,
+
+        //!
+        SCI_SETSELECTIONNANCHOR = 2578,
+
+        //!
+        SCI_GETSELECTIONNANCHOR = 2579,
+
+        //!
+        SCI_SETSELECTIONNCARETVIRTUALSPACE = 2580,
+
+        //!
+        SCI_GETSELECTIONNCARETVIRTUALSPACE = 2581,
+
+        //!
+        SCI_SETSELECTIONNANCHORVIRTUALSPACE = 2582,
+
+        //!
+        SCI_GETSELECTIONNANCHORVIRTUALSPACE = 2583,
+
+        //!
+        SCI_SETSELECTIONNSTART = 2584,
+
+        //!
+        SCI_GETSELECTIONNSTART = 2585,
+
+        //!
+        SCI_SETSELECTIONNEND = 2586,
+
+        //!
+        SCI_GETSELECTIONNEND = 2587,
+
+        //!
+        SCI_SETRECTANGULARSELECTIONCARET = 2588,
+
+        //!
+        SCI_GETRECTANGULARSELECTIONCARET = 2589,
+
+        //!
+        SCI_SETRECTANGULARSELECTIONANCHOR = 2590,
+
+        //!
+        SCI_GETRECTANGULARSELECTIONANCHOR = 2591,
+
+        //!
+        SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2592,
+
+        //!
+        SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2593,
+
+        //!
+        SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2594,
+
+        //!
+        SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2595,
+
+        //!
+        SCI_SETVIRTUALSPACEOPTIONS = 2596,
+
+        //!
+        SCI_GETVIRTUALSPACEOPTIONS = 2597,
+
+        //!
+        SCI_SETRECTANGULARSELECTIONMODIFIER = 2598,
+
+        //!
+        SCI_GETRECTANGULARSELECTIONMODIFIER = 2599,
+
+        //!
+        SCI_SETADDITIONALSELFORE = 2600,
+
+        //!
+        SCI_SETADDITIONALSELBACK = 2601,
+
+        //!
+        SCI_SETADDITIONALSELALPHA = 2602,
+
+        //!
+        SCI_GETADDITIONALSELALPHA = 2603,
+
+        //!
+        SCI_SETADDITIONALCARETFORE = 2604,
+
+        //!
+        SCI_GETADDITIONALCARETFORE = 2605,
+
+        //!
+        SCI_ROTATESELECTION = 2606,
+
+        //!
+        SCI_SWAPMAINANCHORCARET = 2607,
+
+        //!
+        SCI_SETADDITIONALCARETSVISIBLE = 2608,
+
+        //!
+        SCI_GETADDITIONALCARETSVISIBLE = 2609,
+
+        //!
+        SCI_AUTOCGETCURRENTTEXT = 2610,
+
+        //!
+        SCI_SETFONTQUALITY = 2611,
+
+        //!
+        SCI_GETFONTQUALITY = 2612,
+
+        //!
+        SCI_SETFIRSTVISIBLELINE = 2613,
+
+        //!
+        SCI_SETMULTIPASTE = 2614,
+
+        //!
+        SCI_GETMULTIPASTE = 2615,
+
+        //!
+        SCI_GETTAG = 2616,
+
+        //!
+        SCI_CHANGELEXERSTATE = 2617,
+
+        //!
+        SCI_CONTRACTEDFOLDNEXT = 2618,
+
+        //!
+        SCI_VERTICALCENTRECARET = 2619,
+
+        //!
+        SCI_MOVESELECTEDLINESUP = 2620,
+
+        //!
+        SCI_MOVESELECTEDLINESDOWN = 2621,
+
+        //!
+        SCI_SETIDENTIFIER = 2622,
+
+        //!
+        SCI_GETIDENTIFIER = 2623,
+
+        //! This message sets the width of an RGBA image specified by a future
+        //! call to SCI_MARKERDEFINERGBAIMAGE or SCI_REGISTERRGBAIMAGE.
+        //!
+        //! \sa SCI_RGBAIMAGESETHEIGHT, SCI_MARKERDEFINERGBAIMAGE,
+        //! SCI_REGISTERRGBAIMAGE.
+        SCI_RGBAIMAGESETWIDTH = 2624,
+
+        //! This message sets the height of an RGBA image specified by a future
+        //! call to SCI_MARKERDEFINERGBAIMAGE or SCI_REGISTERRGBAIMAGE.
+        //!
+        //! \sa SCI_RGBAIMAGESETWIDTH, SCI_MARKERDEFINERGBAIMAGE,
+        //! SCI_REGISTERRGBAIMAGE.
+        SCI_RGBAIMAGESETHEIGHT = 2625,
+
+        //! This message sets the symbol used to draw one of the 32 markers to
+        //! an RGBA image.  RGBA images use the SC_MARK_RGBAIMAGE marker
+        //! symbol.
+        //! \a wParam is the number of the marker.
+        //! \a lParam is a pointer to a QImage instance.  Note that in other
+        //! ports of Scintilla this is a pointer to raw RGBA image data.
+        //!
+        //! \sa SCI_MARKERDEFINE, SCI_MARKERDEFINEPIXMAP
+        SCI_MARKERDEFINERGBAIMAGE = 2626,
+
+        //! This message takes a copy of an image and registers it so that it
+        //! can be refered to by a unique integer identifier.
+        //! \a wParam is the image's identifier.
+        //! \a lParam is a pointer to a QImage instance.  Note that in other
+        //! ports of Scintilla this is a pointer to raw RGBA image data.
+        //!
+        //! \sa SCI_CLEARREGISTEREDIMAGES, SCI_REGISTERIMAGE
+        SCI_REGISTERRGBAIMAGE = 2627,
+
+        //!
+        SCI_SCROLLTOSTART = 2628,
+
+        //!
+        SCI_SCROLLTOEND = 2629,
+
+        //!
+        SCI_SETTECHNOLOGY = 2630,
+
+        //!
+        SCI_GETTECHNOLOGY = 2631,
+
+        //!
+        SCI_CREATELOADER = 2632,
+
+        //!
+        SCI_COUNTCHARACTERS = 2633,
+
+        //!
+        SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR = 2634,
+
+        //!
+        SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR = 2635,
+
+        //!
+        SCI_AUTOCSETMULTI = 2636,
+
+        //!
+        SCI_AUTOCGETMULTI = 2637,
+
+        //!
+        SCI_FINDINDICATORSHOW = 2640,
+
+        //!
+        SCI_FINDINDICATORFLASH = 2641,
+
+        //!
+        SCI_FINDINDICATORHIDE = 2642,
+
+        //!
+        SCI_GETRANGEPOINTER = 2643,
+
+        //!
+        SCI_GETGAPPOSITION = 2644,
+
+        //!
+        SCI_DELETERANGE = 2645,
+
+        //!
+        SCI_GETWORDCHARS = 2646,
+
+        //!
+        SCI_GETWHITESPACECHARS = 2647,
+
+        //!
+        SCI_SETPUNCTUATIONCHARS = 2648,
+
+        //!
+        SCI_GETPUNCTUATIONCHARS = 2649,
+
+        //!
+        SCI_GETSELECTIONEMPTY = 2650,
+
+        //!
+        SCI_RGBAIMAGESETSCALE = 2651,
+
+        //!
+        SCI_VCHOMEDISPLAY = 2652,
+
+        //!
+        SCI_VCHOMEDISPLAYEXTEND = 2653,
+
+        //!
+        SCI_GETCARETLINEVISIBLEALWAYS = 2654,
+
+        //!
+        SCI_SETCARETLINEVISIBLEALWAYS = 2655,
+
+        //!
+        SCI_SETLINEENDTYPESALLOWED = 2656,
+
+        //!
+        SCI_GETLINEENDTYPESALLOWED = 2657,
+
+        //!
+        SCI_GETLINEENDTYPESACTIVE = 2658,
+
+        //!
+        SCI_AUTOCSETORDER = 2660,
+
+        //!
+        SCI_AUTOCGETORDER = 2661,
+
+        //!
+        SCI_FOLDALL = 2662,
+
+        //!
+        SCI_SETAUTOMATICFOLD = 2663,
+
+        //!
+        SCI_GETAUTOMATICFOLD = 2664,
+
+        //!
+        SCI_SETREPRESENTATION = 2665,
+
+        //!
+        SCI_GETREPRESENTATION = 2666,
+
+        //!
+        SCI_CLEARREPRESENTATION = 2667,
+
+        //!
+        SCI_SETMOUSESELECTIONRECTANGULARSWITCH = 2668,
+
+        //!
+        SCI_GETMOUSESELECTIONRECTANGULARSWITCH = 2669,
+
+        //!
+        SCI_POSITIONRELATIVE = 2670,
+
+        //!
+        SCI_DROPSELECTIONN = 2671,
+
+        //!
+        SCI_CHANGEINSERTION = 2672,
+
+        //!
+        SCI_GETPHASESDRAW = 2673,
+
+        //!
+        SCI_SETPHASESDRAW = 2674,
+
+        //!
+        SCI_CLEARTABSTOPS = 2675,
+
+        //!
+        SCI_ADDTABSTOP = 2676,
+
+        //!
+        SCI_GETNEXTTABSTOP = 2677,
+
+        //!
+        SCI_GETIMEINTERACTION = 2678,
+
+        //!
+        SCI_SETIMEINTERACTION = 2679,
+
+        //!
+        SCI_INDICSETHOVERSTYLE = 2680,
+
+        //!
+        SCI_INDICGETHOVERSTYLE = 2681,
+
+        //!
+        SCI_INDICSETHOVERFORE = 2682,
+
+        //!
+        SCI_INDICGETHOVERFORE = 2683,
+
+        //!
+        SCI_INDICSETFLAGS = 2684,
+
+        //!
+        SCI_INDICGETFLAGS = 2685,
+
+        //!
+        SCI_SETTARGETRANGE = 2686,
+
+        //!
+        SCI_GETTARGETTEXT = 2687,
+
+        //!
+        SCI_MULTIPLESELECTADDNEXT = 2688,
+
+        //!
+        SCI_MULTIPLESELECTADDEACH = 2689,
+
+        //!
+        SCI_TARGETWHOLEDOCUMENT = 2690,
+
+        //!
+        SCI_ISRANGEWORD = 2691,
+
+        //!
+        SCI_SETIDLESTYLING = 2692,
+
+        //!
+        SCI_GETIDLESTYLING = 2693,
+
+        //!
+        SCI_MULTIEDGEADDLINE = 2694,
+
+        //!
+        SCI_MULTIEDGECLEARALL = 2695,
+
+        //!
+        SCI_SETMOUSEWHEELCAPTURES = 2696,
+
+        //!
+        SCI_GETMOUSEWHEELCAPTURES = 2697,
+
+        //!
+        SCI_GETTABDRAWMODE = 2698,
+
+        //!
+        SCI_SETTABDRAWMODE = 2699,
+
+        //!
+        SCI_TOGGLEFOLDSHOWTEXT = 2700,
+
+        //!
+        SCI_FOLDDISPLAYTEXTSETSTYLE = 2701,
+
+        //!
+        SCI_SETACCESSIBILITY = 2702,
+
+        //!
+        SCI_GETACCESSIBILITY = 2703,
+
+        //!
+        SCI_GETCARETLINEFRAME = 2704,
+
+        //!
+        SCI_SETCARETLINEFRAME = 2705,
+
+        //!
+        SCI_STARTRECORD = 3001,
+
+        //!
+        SCI_STOPRECORD = 3002,
+
+        //! This message sets the number of the lexer to use for syntax
+        //! styling.
+        //! \a wParam is the number of the lexer and is one of the SCLEX_*
+        //! values.
+        SCI_SETLEXER = 4001,
+
+        //! This message returns the number of the lexer being used for syntax
+        //! styling.
+        SCI_GETLEXER = 4002,
+
+        //!
+        SCI_COLOURISE = 4003,
+
+        //!
+        SCI_SETPROPERTY = 4004,
+
+        //!
+        SCI_SETKEYWORDS = 4005,
+
+        //! This message sets the name of the lexer to use for syntax styling.
+        //! \a wParam is unused.
+        //! \a lParam is the name of the lexer.
+        SCI_SETLEXERLANGUAGE = 4006,
+
+        //!
+        SCI_LOADLEXERLIBRARY = 4007,
+
+        //!
+        SCI_GETPROPERTY = 4008,
+
+        //!
+        SCI_GETPROPERTYEXPANDED = 4009,
+
+        //!
+        SCI_GETPROPERTYINT = 4010,
+
+        //!
+        SCI_GETSTYLEBITSNEEDED = 4011,
+
+        //!
+        SCI_GETLEXERLANGUAGE = 4012,
+
+        //!
+        SCI_PRIVATELEXERCALL = 4013,
+
+        //!
+        SCI_PROPERTYNAMES = 4014,
+
+        //!
+        SCI_PROPERTYTYPE = 4015,
+
+        //!
+        SCI_DESCRIBEPROPERTY = 4016,
+
+        //!
+        SCI_DESCRIBEKEYWORDSETS = 4017,
+
+        //!
+        SCI_GETLINEENDTYPESSUPPORTED = 4018,
+
+        //!
+        SCI_ALLOCATESUBSTYLES = 4020,
+
+        //!
+        SCI_GETSUBSTYLESSTART = 4021,
+
+        //!
+        SCI_GETSUBSTYLESLENGTH = 4022,
+
+        //!
+        SCI_GETSTYLEFROMSUBSTYLE = 4027,
+
+        //!
+        SCI_GETPRIMARYSTYLEFROMSTYLE = 4028,
+
+        //!
+        SCI_FREESUBSTYLES = 4023,
+
+        //!
+        SCI_SETIDENTIFIERS = 4024,
+
+        //!
+        SCI_DISTANCETOSECONDARYSTYLES = 4025,
+
+        //!
+        SCI_GETSUBSTYLEBASES = 4026,
+
+        //!
+        SCI_GETLINECHARACTERINDEX = 2710,
+
+        //!
+        SCI_ALLOCATELINECHARACTERINDEX = 2711,
+
+        //!
+        SCI_RELEASELINECHARACTERINDEX = 2712,
+
+        //!
+        SCI_LINEFROMINDEXPOSITION = 2713,
+
+        //!
+        SCI_INDEXPOSITIONFROMLINE = 2714,
+
+        //!
+        SCI_COUNTCODEUNITS = 2715,
+
+        //!
+        SCI_POSITIONRELATIVECODEUNITS = 2716,
+
+        //!
+        SCI_GETNAMEDSTYLES = 4029,
+
+        //!
+        SCI_NAMEOFSTYLE = 4030,
+
+        //!
+        SCI_TAGSOFSTYLE = 4031,
+
+        //!
+        SCI_DESCRIPTIONOFSTYLE = 4032,
+
+        //!
+        SCI_GETMOVEEXTENDSSELECTION = 2706,
+
+        //!
+        SCI_SETCOMMANDEVENTS = 2717,
+
+        //!
+        SCI_GETCOMMANDEVENTS = 2718,
+
+        //!
+        SCI_GETDOCUMENTOPTIONS = 2379,
+    };
+
+	enum
+	{
+		SC_AC_FILLUP = 1,
+		SC_AC_DOUBLECLICK = 2,
+		SC_AC_TAB = 3,
+		SC_AC_NEWLINE = 4,
+		SC_AC_COMMAND = 5,
+	};
+
+    enum
+    {
+        SC_ALPHA_TRANSPARENT = 0,
+        SC_ALPHA_OPAQUE = 255,
+        SC_ALPHA_NOALPHA = 256
+    };
+
+    enum
+    {
+        SC_CARETSTICKY_OFF = 0,
+        SC_CARETSTICKY_ON = 1,
+        SC_CARETSTICKY_WHITESPACE = 2
+    };
+
+    enum
+    {
+        SC_DOCUMENTOPTION_DEFAULT = 0x0000,
+        SC_DOCUMENTOPTION_STYLES_NONE = 0x0001,
+        SC_DOCUMENTOPTION_TEXT_LARGE = 0x0100,
+    };
+
+    enum
+    {
+        SC_EFF_QUALITY_MASK = 0x0f,
+        SC_EFF_QUALITY_DEFAULT = 0,
+        SC_EFF_QUALITY_NON_ANTIALIASED = 1,
+        SC_EFF_QUALITY_ANTIALIASED = 2,
+        SC_EFF_QUALITY_LCD_OPTIMIZED = 3
+    };
+
+    enum
+    {
+        SC_IDLESTYLING_NONE = 0,
+        SC_IDLESTYLING_TOVISIBLE = 1,
+        SC_IDLESTYLING_AFTERVISIBLE = 2,
+        SC_IDLESTYLING_ALL = 3,
+    };
+
+    enum
+    {
+        SC_IME_WINDOWED = 0,
+        SC_IME_INLINE = 1,
+    };
+
+    enum
+    {
+        SC_LINECHARACTERINDEX_NONE = 0,
+        SC_LINECHARACTERINDEX_UTF32 = 1,
+        SC_LINECHARACTERINDEX_UTF16 = 2,
+    };
+
+    enum
+    {
+        SC_MARGINOPTION_NONE = 0x00,
+        SC_MARGINOPTION_SUBLINESELECT = 0x01
+    };
+
+    enum
+    {
+        SC_MULTIAUTOC_ONCE = 0,
+        SC_MULTIAUTOC_EACH = 1
+    };
+
+    enum
+    {
+        SC_MULTIPASTE_ONCE = 0,
+        SC_MULTIPASTE_EACH = 1
+    };
+
+    enum
+    {
+        SC_POPUP_NEVER = 0,
+        SC_POPUP_ALL = 1,
+        SC_POPUP_TEXT = 2,
+    };
+
+    //! This enum defines the different selection modes.
+    //!
+    //! \sa SCI_GETSELECTIONMODE, SCI_SETSELECTIONMODE
+    enum
+    {
+        SC_SEL_STREAM = 0,
+        SC_SEL_RECTANGLE = 1,
+        SC_SEL_LINES = 2,
+        SC_SEL_THIN = 3
+    };
+
+    enum
+    {
+        SC_STATUS_OK = 0,
+        SC_STATUS_FAILURE = 1,
+        SC_STATUS_BADALLOC = 2,
+        SC_STATUS_WARN_START = 1000,
+        SC_STATUS_WARNREGEX = 1001,
+    };
+
+    enum
+    {
+        SC_TYPE_BOOLEAN = 0,
+        SC_TYPE_INTEGER = 1,
+        SC_TYPE_STRING = 2
+    };
+
+    enum
+    {
+        SC_UPDATE_CONTENT = 0x01,
+        SC_UPDATE_SELECTION = 0x02,
+        SC_UPDATE_V_SCROLL = 0x04,
+        SC_UPDATE_H_SCROLL = 0x08
+    };
+
+    enum
+    {
+        SC_WRAPVISUALFLAG_NONE = 0x0000,
+        SC_WRAPVISUALFLAG_END = 0x0001,
+        SC_WRAPVISUALFLAG_START = 0x0002,
+        SC_WRAPVISUALFLAG_MARGIN = 0x0004
+    };
+
+    enum
+    {
+        SC_WRAPVISUALFLAGLOC_DEFAULT = 0x0000,
+        SC_WRAPVISUALFLAGLOC_END_BY_TEXT = 0x0001,
+        SC_WRAPVISUALFLAGLOC_START_BY_TEXT = 0x0002
+    };
+
+    enum
+    {
+        SCTD_LONGARROW = 0,
+        SCTD_STRIKEOUT = 1,
+    };
+
+    enum
+    {
+        SCVS_NONE = 0,
+        SCVS_RECTANGULARSELECTION = 1,
+        SCVS_USERACCESSIBLE = 2,
+        SCVS_NOWRAPLINESTART = 4,
+    };
+
+    enum
+    {
+        SCWS_INVISIBLE = 0,
+        SCWS_VISIBLEALWAYS = 1,
+        SCWS_VISIBLEAFTERINDENT = 2,
+        SCWS_VISIBLEONLYININDENT = 3,
+    };
+
+    enum
+    {
+        SC_EOL_CRLF = 0,
+        SC_EOL_CR = 1,
+        SC_EOL_LF = 2
+    };
+
+    enum
+    {
+        SC_CP_DBCS = 1,
+        SC_CP_UTF8 = 65001
+    };
+
+    //! This enum defines the different marker symbols.
+    //!
+    //! \sa SCI_MARKERDEFINE
+    enum
+    {
+        //! A circle.
+        SC_MARK_CIRCLE = 0,
+
+        //! A rectangle.
+        SC_MARK_ROUNDRECT = 1,
+
+        //! A triangle pointing to the right.
+        SC_MARK_ARROW = 2,
+
+        //! A smaller rectangle.
+        SC_MARK_SMALLRECT = 3,
+
+        //! An arrow pointing to the right.
+        SC_MARK_SHORTARROW = 4,
+
+        //! An invisible marker that allows code to track the movement
+        //! of lines.
+        SC_MARK_EMPTY = 5,
+
+        //! A triangle pointing down.
+        SC_MARK_ARROWDOWN = 6,
+
+        //! A drawn minus sign.
+        SC_MARK_MINUS = 7,
+
+        //! A drawn plus sign.
+        SC_MARK_PLUS = 8,
+
+        //! A vertical line drawn in the background colour.
+        SC_MARK_VLINE = 9,
+
+        //! A bottom left corner drawn in the background colour.
+        SC_MARK_LCORNER = 10,
+
+        //! A vertical line with a centre right horizontal line drawn
+        //! in the background colour.
+        SC_MARK_TCORNER = 11,
+
+        //! A drawn plus sign in a box.
+        SC_MARK_BOXPLUS = 12,
+
+        //! A drawn plus sign in a connected box.
+        SC_MARK_BOXPLUSCONNECTED = 13,
+
+        //! A drawn minus sign in a box.
+        SC_MARK_BOXMINUS = 14,
+
+        //! A drawn minus sign in a connected box.
+        SC_MARK_BOXMINUSCONNECTED = 15,
+
+        //! A rounded bottom left corner drawn in the background
+        //! colour.
+        SC_MARK_LCORNERCURVE = 16,
+
+        //! A vertical line with a centre right curved line drawn in
+        //! the background colour.
+        SC_MARK_TCORNERCURVE = 17,
+
+        //! A drawn plus sign in a circle.
+        SC_MARK_CIRCLEPLUS = 18,
+
+        //! A drawn plus sign in a connected box.
+        SC_MARK_CIRCLEPLUSCONNECTED = 19,
+
+        //! A drawn minus sign in a circle.
+        SC_MARK_CIRCLEMINUS = 20,
+
+        //! A drawn minus sign in a connected circle.
+        SC_MARK_CIRCLEMINUSCONNECTED = 21,
+
+        //! No symbol is drawn but the line is drawn with the same background
+        //! color as the marker's.
+        SC_MARK_BACKGROUND = 22,
+
+        //! Three drawn dots.
+        SC_MARK_DOTDOTDOT = 23,
+
+        //! Three drawn arrows pointing right.
+        SC_MARK_ARROWS = 24,
+
+        //! An XPM format pixmap.
+        SC_MARK_PIXMAP = 25,
+
+        //! A full rectangle (ie. the margin background) using the marker's
+        //! background color.
+        SC_MARK_FULLRECT = 26,
+
+        //! A left rectangle (ie. the left part of the margin background) using
+        //! the marker's background color.
+        SC_MARK_LEFTRECT = 27,
+
+        //! The value is available for plugins to use.
+        SC_MARK_AVAILABLE = 28,
+
+        //! The line is underlined using the marker's background color.
+        SC_MARK_UNDERLINE = 29,
+
+        //! A RGBA format image.
+        SC_MARK_RGBAIMAGE = 30,
+
+        //! A bookmark.
+        SC_MARK_BOOKMARK = 31,
+
+        //! Characters can be used as symbols by adding this to the ASCII value
+        //! of the character.
+        SC_MARK_CHARACTER = 10000
+    };
+
+    enum
+    {
+        SC_MARKNUM_FOLDEREND = 25,
+        SC_MARKNUM_FOLDEROPENMID = 26,
+        SC_MARKNUM_FOLDERMIDTAIL = 27,
+        SC_MARKNUM_FOLDERTAIL = 28,
+        SC_MARKNUM_FOLDERSUB = 29,
+        SC_MARKNUM_FOLDER = 30,
+        SC_MARKNUM_FOLDEROPEN = 31,
+        SC_MASK_FOLDERS = 0xfe000000
+    };
+
+    //! This enum defines what can be displayed in a margin.
+    //!
+    //! \sa SCI_GETMARGINTYPEN, SCI_SETMARGINTYPEN
+    enum
+    {
+        //! The margin can display symbols.  Note that all margins can display
+        //! symbols.
+        SC_MARGIN_SYMBOL = 0,
+
+        //! The margin will display line numbers.
+        SC_MARGIN_NUMBER = 1,
+
+        //! The margin's background color will be set to the default background
+        //! color.
+        SC_MARGIN_BACK = 2,
+
+        //! The margin's background color will be set to the default foreground
+        //! color.
+        SC_MARGIN_FORE = 3,
+
+        //! The margin will display text.
+        SC_MARGIN_TEXT = 4,
+
+        //! The margin will display right justified text.
+        SC_MARGIN_RTEXT = 5,
+
+        //! The margin's background color will be set to the color set by
+        //! SCI_SETMARGINBACKN.
+        SC_MARGIN_COLOUR = 6,
+    };
+
+    enum
+    {
+        STYLE_DEFAULT = 32,
+        STYLE_LINENUMBER = 33,
+        STYLE_BRACELIGHT = 34,
+        STYLE_BRACEBAD = 35,
+        STYLE_CONTROLCHAR = 36,
+        STYLE_INDENTGUIDE = 37,
+        STYLE_CALLTIP = 38,
+        STYLE_FOLDDISPLAYTEXT = 39,
+        STYLE_LASTPREDEFINED = 39,
+        STYLE_MAX = 255
+    };
+
+    enum
+    {
+        SC_CHARSET_ANSI = 0,
+        SC_CHARSET_DEFAULT = 1,
+        SC_CHARSET_BALTIC = 186,
+        SC_CHARSET_CHINESEBIG5 = 136,
+        SC_CHARSET_EASTEUROPE = 238,
+        SC_CHARSET_GB2312 = 134,
+        SC_CHARSET_GREEK = 161,
+        SC_CHARSET_HANGUL = 129,
+        SC_CHARSET_MAC = 77,
+        SC_CHARSET_OEM = 255,
+        SC_CHARSET_RUSSIAN = 204,
+        SC_CHARSET_OEM866 = 866,
+        SC_CHARSET_CYRILLIC = 1251,
+        SC_CHARSET_SHIFTJIS = 128,
+        SC_CHARSET_SYMBOL = 2,
+        SC_CHARSET_TURKISH = 162,
+        SC_CHARSET_JOHAB = 130,
+        SC_CHARSET_HEBREW = 177,
+        SC_CHARSET_ARABIC = 178,
+        SC_CHARSET_VIETNAMESE = 163,
+        SC_CHARSET_THAI = 222,
+        SC_CHARSET_8859_15 = 1000
+    };
+
+    enum
+    {
+        SC_CASE_MIXED = 0,
+        SC_CASE_UPPER = 1,
+        SC_CASE_LOWER = 2,
+        SC_CASE_CAMEL = 3,
+    };
+
+    //! This enum defines the different indentation guide views.
+    //!
+    //! \sa SCI_GETINDENTATIONGUIDES, SCI_SETINDENTATIONGUIDES
+    enum
+    {
+        //! No indentation guides are shown.
+        SC_IV_NONE = 0,
+
+        //! Indentation guides are shown inside real indentation white space.
+        SC_IV_REAL = 1,
+
+        //! Indentation guides are shown beyond the actual indentation up to
+        //! the level of the next non-empty line.  If the previous non-empty
+        //! line was a fold header then indentation guides are shown for one
+        //! more level of indent than that line.  This setting is good for
+        //! Python.
+        SC_IV_LOOKFORWARD = 2,
+
+        //! Indentation guides are shown beyond the actual indentation up to
+        //! the level of the next non-empty line or previous non-empty line
+        //! whichever is the greater.  This setting is good for most languages.
+        SC_IV_LOOKBOTH = 3
+    };
+
+    enum
+    {
+        INDIC_PLAIN = 0,
+        INDIC_SQUIGGLE = 1,
+        INDIC_TT = 2,
+        INDIC_DIAGONAL = 3,
+        INDIC_STRIKE = 4,
+        INDIC_HIDDEN = 5,
+        INDIC_BOX = 6,
+        INDIC_ROUNDBOX = 7,
+        INDIC_STRAIGHTBOX = 8,
+        INDIC_DASH = 9,
+        INDIC_DOTS = 10,
+        INDIC_SQUIGGLELOW = 11,
+        INDIC_DOTBOX = 12,
+        INDIC_SQUIGGLEPIXMAP = 13,
+        INDIC_COMPOSITIONTHICK = 14,
+        INDIC_COMPOSITIONTHIN = 15,
+        INDIC_FULLBOX = 16,
+        INDIC_TEXTFORE = 17,
+        INDIC_POINT = 18,
+        INDIC_POINTCHARACTER = 19,
+        INDIC_GRADIENT = 20,
+        INDIC_GRADIENTCENTRE = 21,
+
+        INDIC_IME = 32,
+        INDIC_IME_MAX = 35,
+
+        INDIC_CONTAINER = 8,
+        INDIC_MAX = 35,
+        INDIC0_MASK = 0x20,
+        INDIC1_MASK = 0x40,
+        INDIC2_MASK = 0x80,
+        INDICS_MASK = 0xe0,
+
+        SC_INDICVALUEBIT = 0x01000000,
+        SC_INDICVALUEMASK = 0x00ffffff,
+        SC_INDICFLAG_VALUEBEFORE = 1,
+    };
+
+    enum
+    {
+        SC_PRINT_NORMAL = 0,
+        SC_PRINT_INVERTLIGHT = 1,
+        SC_PRINT_BLACKONWHITE = 2,
+        SC_PRINT_COLOURONWHITE = 3,
+        SC_PRINT_COLOURONWHITEDEFAULTBG = 4,
+        SC_PRINT_SCREENCOLOURS = 5,
+    };
+
+    enum
+    {
+        SCFIND_WHOLEWORD = 2,
+        SCFIND_MATCHCASE = 4,
+        SCFIND_WORDSTART = 0x00100000,
+        SCFIND_REGEXP = 0x00200000,
+        SCFIND_POSIX = 0x00400000,
+        SCFIND_CXX11REGEX = 0x00800000,
+    };
+
+    enum
+    {
+        SC_FOLDDISPLAYTEXT_HIDDEN = 0,
+        SC_FOLDDISPLAYTEXT_STANDARD = 1,
+        SC_FOLDDISPLAYTEXT_BOXED = 2,
+    };
+
+    enum
+    {
+        SC_FOLDLEVELBASE = 0x00400,
+        SC_FOLDLEVELWHITEFLAG = 0x01000,
+        SC_FOLDLEVELHEADERFLAG = 0x02000,
+        SC_FOLDLEVELNUMBERMASK = 0x00fff
+    };
+
+    enum
+    {
+        SC_FOLDFLAG_LINEBEFORE_EXPANDED = 0x0002,
+        SC_FOLDFLAG_LINEBEFORE_CONTRACTED = 0x0004,
+        SC_FOLDFLAG_LINEAFTER_EXPANDED = 0x0008,
+        SC_FOLDFLAG_LINEAFTER_CONTRACTED = 0x0010,
+        SC_FOLDFLAG_LEVELNUMBERS = 0x0040,
+        SC_FOLDFLAG_LINESTATE = 0x0080,
+    };
+
+    enum
+    {
+        SC_LINE_END_TYPE_DEFAULT = 0,
+        SC_LINE_END_TYPE_UNICODE = 1,
+    };
+
+    enum
+    {
+        SC_TIME_FOREVER = 10000000
+    };
+
+    enum
+    {
+        SC_WRAP_NONE = 0,
+        SC_WRAP_WORD = 1,
+        SC_WRAP_CHAR = 2,
+        SC_WRAP_WHITESPACE = 3,
+    };
+
+    enum
+    {
+        SC_WRAPINDENT_FIXED = 0,
+        SC_WRAPINDENT_SAME = 1,
+        SC_WRAPINDENT_INDENT = 2,
+        SC_WRAPINDENT_DEEPINDENT = 3,
+    };
+
+    enum
+    {
+        SC_CACHE_NONE = 0,
+        SC_CACHE_CARET = 1,
+        SC_CACHE_PAGE = 2,
+        SC_CACHE_DOCUMENT = 3
+    };
+
+    enum
+    {
+        SC_PHASES_ONE = 0,
+        SC_PHASES_TWO = 1,
+        SC_PHASES_MULTIPLE = 2,
+    };
+
+    enum
+    {
+        ANNOTATION_HIDDEN = 0,
+        ANNOTATION_STANDARD = 1,
+        ANNOTATION_BOXED = 2,
+        ANNOTATION_INDENTED = 3,
+    };
+
+    enum
+    {
+        EDGE_NONE = 0,
+        EDGE_LINE = 1,
+        EDGE_BACKGROUND = 2,
+        EDGE_MULTILINE = 3,
+    };
+
+    enum
+    {
+        SC_CURSORNORMAL = -1,
+        SC_CURSORARROW = 2,
+        SC_CURSORWAIT = 4,
+        SC_CURSORREVERSEARROW = 7
+    };
+
+    enum
+    {
+        UNDO_MAY_COALESCE = 1
+    };
+
+    enum
+    {
+        VISIBLE_SLOP = 0x01,
+        VISIBLE_STRICT = 0x04
+    };
+
+    enum
+    {
+        CARET_SLOP = 0x01,
+        CARET_STRICT = 0x04,
+        CARET_JUMPS = 0x10,
+        CARET_EVEN = 0x08
+    };
+
+    enum
+    {
+        CARETSTYLE_INVISIBLE = 0,
+        CARETSTYLE_LINE = 1,
+        CARETSTYLE_BLOCK = 2
+    };
+
+    enum
+    {
+        SC_MOD_INSERTTEXT = 0x1,
+        SC_MOD_DELETETEXT = 0x2,
+        SC_MOD_CHANGESTYLE = 0x4,
+        SC_MOD_CHANGEFOLD = 0x8,
+        SC_PERFORMED_USER = 0x10,
+        SC_PERFORMED_UNDO = 0x20,
+        SC_PERFORMED_REDO = 0x40,
+        SC_MULTISTEPUNDOREDO = 0x80,
+        SC_LASTSTEPINUNDOREDO = 0x100,
+        SC_MOD_CHANGEMARKER = 0x200,
+        SC_MOD_BEFOREINSERT = 0x400,
+        SC_MOD_BEFOREDELETE = 0x800,
+        SC_MULTILINEUNDOREDO = 0x1000,
+        SC_STARTACTION = 0x2000,
+        SC_MOD_CHANGEINDICATOR = 0x4000,
+        SC_MOD_CHANGELINESTATE = 0x8000,
+        SC_MOD_CHANGEMARGIN = 0x10000,
+        SC_MOD_CHANGEANNOTATION = 0x20000,
+        SC_MOD_CONTAINER = 0x40000,
+        SC_MOD_LEXERSTATE = 0x80000,
+        SC_MOD_INSERTCHECK = 0x100000,
+        SC_MOD_CHANGETABSTOPS = 0x200000,
+        SC_MODEVENTMASKALL = 0x3fffff
+    };
+
+    enum
+    {
+        SCK_DOWN = 300,
+        SCK_UP = 301,
+        SCK_LEFT = 302,
+        SCK_RIGHT = 303,
+        SCK_HOME = 304,
+        SCK_END = 305,
+        SCK_PRIOR = 306,
+        SCK_NEXT = 307,
+        SCK_DELETE = 308,
+        SCK_INSERT = 309,
+        SCK_ESCAPE = 7,
+        SCK_BACK = 8,
+        SCK_TAB = 9,
+        SCK_RETURN = 13,
+        SCK_ADD = 310,
+        SCK_SUBTRACT = 311,
+        SCK_DIVIDE = 312,
+        SCK_WIN = 313,
+        SCK_RWIN = 314,
+        SCK_MENU = 315
+    };
+
+    //! This enum defines the different modifier keys.
+    enum
+    {
+        //! No modifier key.
+        SCMOD_NORM = 0,
+
+        //! Shift key.
+        SCMOD_SHIFT = 1,
+
+        //! Control key (the Command key on OS/X, the Ctrl key on other
+        //! platforms).
+        SCMOD_CTRL = 2,
+
+        //! Alt key.
+        SCMOD_ALT = 4,
+
+        //! This is the same as SCMOD_META on all platforms.
+        SCMOD_SUPER = 8,
+
+        //! Meta key (the Ctrl key on OS/X, the Windows key on other
+        //! platforms).
+        SCMOD_META = 16
+    };
+
+    //! This enum defines the different language lexers.
+    //!
+    //! \sa SCI_GETLEXER, SCI_SETLEXER
+    enum
+    {
+        //! No lexer is selected and the SCN_STYLENEEDED signal is emitted so
+        //! that the application can style the text as needed.  This is the
+        //! default.
+        SCLEX_CONTAINER = 0,
+
+        //! Select the null lexer that does no syntax styling.
+        SCLEX_NULL = 1,
+
+        //! Select the Python lexer.
+        SCLEX_PYTHON = 2,
+
+        //! Select the C++ lexer.
+        SCLEX_CPP = 3,
+
+        //! Select the HTML lexer.
+        SCLEX_HTML = 4,
+
+        //! Select the XML lexer.
+        SCLEX_XML = 5,
+
+        //! Select the Perl lexer.
+        SCLEX_PERL = 6,
+
+        //! Select the SQL lexer.
+        SCLEX_SQL = 7,
+
+        //! Select the Visual Basic lexer.
+        SCLEX_VB = 8,
+
+        //! Select the lexer for properties style files.
+        SCLEX_PROPERTIES = 9,
+
+        //! Select the lexer for error list style files.
+        SCLEX_ERRORLIST = 10,
+
+        //! Select the Makefile lexer.
+        SCLEX_MAKEFILE = 11,
+
+        //! Select the Windows batch file lexer.
+        SCLEX_BATCH = 12,
+
+        //! Select the LaTex lexer.
+        SCLEX_LATEX = 14,
+
+        //! Select the Lua lexer.
+        SCLEX_LUA = 15,
+
+        //! Select the lexer for diff output.
+        SCLEX_DIFF = 16,
+
+        //! Select the lexer for Apache configuration files.
+        SCLEX_CONF = 17,
+
+        //! Select the Pascal lexer.
+        SCLEX_PASCAL = 18,
+
+        //! Select the Avenue lexer.
+        SCLEX_AVE = 19,
+
+        //! Select the Ada lexer.
+        SCLEX_ADA = 20,
+
+        //! Select the Lisp lexer.
+        SCLEX_LISP = 21,
+
+        //! Select the Ruby lexer.
+        SCLEX_RUBY = 22,
+
+        //! Select the Eiffel lexer.
+        SCLEX_EIFFEL = 23,
+
+        //! Select the Eiffel lexer folding at keywords.
+        SCLEX_EIFFELKW = 24,
+
+        //! Select the Tcl lexer.
+        SCLEX_TCL = 25,
+
+        //! Select the lexer for nnCron files.
+        SCLEX_NNCRONTAB = 26,
+
+        //! Select the Bullant lexer.
+        SCLEX_BULLANT = 27,
+
+        //! Select the VBScript lexer.
+        SCLEX_VBSCRIPT = 28,
+
+        //! Select the ASP lexer.
+        SCLEX_ASP = SCLEX_HTML,
+
+        //! Select the PHP lexer.
+        SCLEX_PHP = SCLEX_HTML,
+
+        //! Select the Baan lexer.
+        SCLEX_BAAN = 31,
+
+        //! Select the Matlab lexer.
+        SCLEX_MATLAB = 32,
+
+        //! Select the Scriptol lexer.
+        SCLEX_SCRIPTOL = 33,
+
+        //! Select the assembler lexer (';' comment character).
+        SCLEX_ASM = 34,
+
+        //! Select the C++ lexer with case insensitive keywords.
+        SCLEX_CPPNOCASE = 35,
+
+        //! Select the FORTRAN lexer.
+        SCLEX_FORTRAN = 36,
+
+        //! Select the FORTRAN77 lexer.
+        SCLEX_F77 = 37,
+
+        //! Select the CSS lexer.
+        SCLEX_CSS = 38,
+
+        //! Select the POV lexer.
+        SCLEX_POV = 39,
+
+        //! Select the Basser Lout typesetting language lexer.
+        SCLEX_LOUT = 40,
+
+        //! Select the EScript lexer.
+        SCLEX_ESCRIPT = 41,
+
+        //! Select the PostScript lexer.
+        SCLEX_PS = 42,
+
+        //! Select the NSIS lexer.
+        SCLEX_NSIS = 43,
+
+        //! Select the MMIX assembly language lexer.
+        SCLEX_MMIXAL = 44,
+
+        //! Select the Clarion lexer.
+        SCLEX_CLW = 45,
+
+        //! Select the Clarion lexer with case insensitive keywords.
+        SCLEX_CLWNOCASE = 46,
+
+        //! Select the MPT text log file lexer.
+        SCLEX_LOT = 47,
+
+        //! Select the YAML lexer.
+        SCLEX_YAML = 48,
+
+        //! Select the TeX lexer.
+        SCLEX_TEX = 49,
+
+        //! Select the Metapost lexer.
+        SCLEX_METAPOST = 50,
+
+        //! Select the PowerBASIC lexer.
+        SCLEX_POWERBASIC = 51,
+
+        //! Select the Forth lexer.
+        SCLEX_FORTH = 52,
+
+        //! Select the Erlang lexer.
+        SCLEX_ERLANG = 53,
+
+        //! Select the Octave lexer.
+        SCLEX_OCTAVE = 54,
+
+        //! Select the MS SQL lexer.
+        SCLEX_MSSQL = 55,
+
+        //! Select the Verilog lexer.
+        SCLEX_VERILOG = 56,
+
+        //! Select the KIX-Scripts lexer.
+        SCLEX_KIX = 57,
+
+        //! Select the Gui4Cli lexer.
+        SCLEX_GUI4CLI = 58,
+
+        //! Select the Specman E lexer.
+        SCLEX_SPECMAN = 59,
+
+        //! Select the AutoIt3 lexer.
+        SCLEX_AU3 = 60,
+
+        //! Select the APDL lexer.
+        SCLEX_APDL = 61,
+
+        //! Select the Bash lexer.
+        SCLEX_BASH = 62,
+
+        //! Select the ASN.1 lexer.
+        SCLEX_ASN1 = 63,
+
+        //! Select the VHDL lexer.
+        SCLEX_VHDL = 64,
+
+        //! Select the Caml lexer.
+        SCLEX_CAML = 65,
+
+        //! Select the BlitzBasic lexer.
+        SCLEX_BLITZBASIC = 66,
+
+        //! Select the PureBasic lexer.
+        SCLEX_PUREBASIC = 67,
+
+        //! Select the Haskell lexer.
+        SCLEX_HASKELL = 68,
+
+        //! Select the PHPScript lexer.
+        SCLEX_PHPSCRIPT = 69,
+
+        //! Select the TADS3 lexer.
+        SCLEX_TADS3 = 70,
+
+        //! Select the REBOL lexer.
+        SCLEX_REBOL = 71,
+
+        //! Select the Smalltalk lexer.
+        SCLEX_SMALLTALK = 72,
+
+        //! Select the FlagShip lexer.
+        SCLEX_FLAGSHIP = 73,
+
+        //! Select the Csound lexer.
+        SCLEX_CSOUND = 74,
+
+        //! Select the FreeBasic lexer.
+        SCLEX_FREEBASIC = 75,
+
+        //! Select the InnoSetup lexer.
+        SCLEX_INNOSETUP = 76,
+
+        //! Select the Opal lexer.
+        SCLEX_OPAL = 77,
+
+        //! Select the Spice lexer.
+        SCLEX_SPICE = 78,
+
+        //! Select the D lexer.
+        SCLEX_D = 79,
+
+        //! Select the CMake lexer.
+        SCLEX_CMAKE = 80,
+
+        //! Select the GAP lexer.
+        SCLEX_GAP = 81,
+
+        //! Select the PLM lexer.
+        SCLEX_PLM = 82,
+
+        //! Select the Progress lexer.
+        SCLEX_PROGRESS = 83,
+
+        //! Select the Abaqus lexer.
+        SCLEX_ABAQUS = 84,
+
+        //! Select the Asymptote lexer.
+        SCLEX_ASYMPTOTE = 85,
+
+        //! Select the R lexer.
+        SCLEX_R = 86,
+
+        //! Select the MagikSF lexer.
+        SCLEX_MAGIK = 87,
+
+        //! Select the PowerShell lexer.
+        SCLEX_POWERSHELL = 88,
+
+        //! Select the MySQL lexer.
+        SCLEX_MYSQL = 89,
+
+        //! Select the gettext .po file lexer.
+        SCLEX_PO = 90,
+
+        //! Select the TAL lexer.
+        SCLEX_TAL = 91,
+
+        //! Select the COBOL lexer.
+        SCLEX_COBOL = 92,
+
+        //! Select the TACL lexer.
+        SCLEX_TACL = 93,
+
+        //! Select the Sorcus lexer.
+        SCLEX_SORCUS = 94,
+
+        //! Select the PowerPro lexer.
+        SCLEX_POWERPRO = 95,
+
+        //! Select the Nimrod lexer.
+        SCLEX_NIMROD = 96,
+
+        //! Select the SML lexer.
+        SCLEX_SML = 97,
+
+        //! Select the Markdown lexer.
+        SCLEX_MARKDOWN = 98,
+
+        //! Select the txt2tags lexer.
+        SCLEX_TXT2TAGS = 99,
+
+        //! Select the 68000 assembler lexer.
+        SCLEX_A68K = 100,
+
+        //! Select the Modula 3 lexer.
+        SCLEX_MODULA = 101,
+
+        //! Select the CoffeeScript lexer.
+        SCLEX_COFFEESCRIPT = 102,
+
+        //! Select the Take Command lexer.
+        SCLEX_TCMD = 103,
+
+        //! Select the AviSynth lexer.
+        SCLEX_AVS = 104,
+
+        //! Select the ECL lexer.
+        SCLEX_ECL = 105,
+
+        //! Select the OScript lexer.
+        SCLEX_OSCRIPT = 106,
+
+        //! Select the Visual Prolog lexer.
+        SCLEX_VISUALPROLOG = 107,
+
+        //! Select the Literal Haskell lexer.
+        SCLEX_LITERATEHASKELL = 108,
+
+        //! Select the Structured Text lexer.
+        SCLEX_STTXT = 109,
+
+        //! Select the KVIrc lexer.
+        SCLEX_KVIRC = 110,
+
+        //! Select the Rust lexer.
+        SCLEX_RUST = 111,
+
+        //! Select the MSC Nastran DMAP lexer.
+        SCLEX_DMAP = 112,
+
+        //! Select the assembler lexer ('#' comment character).
+        SCLEX_AS = 113,
+
+        //! Select the DMIS lexer.
+        SCLEX_DMIS = 114,
+
+        //! Select the lexer for Windows registry files.
+        SCLEX_REGISTRY = 115,
+
+        //! Select the BibTex lexer.
+        SCLEX_BIBTEX = 116,
+
+        //! Select the Motorola S-Record hex lexer.
+        SCLEX_SREC = 117,
+
+        //! Select the Intel hex lexer.
+        SCLEX_IHEX = 118,
+
+        //! Select the Tektronix extended hex lexer.
+        SCLEX_TEHEX = 119,
+
+        //! Select the JSON hex lexer.
+        SCLEX_JSON = 120,
+
+        //! Select the EDIFACT lexer.
+        SCLEX_EDIFACT = 121,
+
+        //! Select the pseudo-lexer used for the indentation-based folding of
+        //! files.
+        SCLEX_INDENT = 122,
+
+        //! Select the Maxima lexer.
+        SCLEX_MAXIMA = 123,
+
+        //! Select the Stata lexer.
+        SCLEX_STATA = 124,
+
+        //! Select the SAS lexer.
+        SCLEX_SAS = 125,
+    };
+
+    enum
+    {
+        SC_WEIGHT_NORMAL = 400,
+        SC_WEIGHT_SEMIBOLD = 600,
+        SC_WEIGHT_BOLD = 700,
+    };
+
+    enum
+    {
+        SC_TECHNOLOGY_DEFAULT = 0,
+        SC_TECHNOLOGY_DIRECTWRITE = 1,
+        SC_TECHNOLOGY_DIRECTWRITERETAIN = 2,
+        SC_TECHNOLOGY_DIRECTWRITEDC = 3,
+    };
+
+    enum
+    {
+        SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE = 0,
+        SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE = 1,
+    };
+
+    enum
+    {
+        SC_FONT_SIZE_MULTIPLIER = 100,
+    };
+
+    enum
+    {
+        SC_FOLDACTION_CONTRACT = 0,
+        SC_FOLDACTION_EXPAND = 1,
+        SC_FOLDACTION_TOGGLE = 2,
+    };
+
+    enum
+    {
+        SC_AUTOMATICFOLD_SHOW = 0x0001,
+        SC_AUTOMATICFOLD_CLICK = 0x0002,
+        SC_AUTOMATICFOLD_CHANGE = 0x0004,
+    };
+
+    enum
+    {
+        SC_ORDER_PRESORTED = 0,
+        SC_ORDER_PERFORMSORT = 1,
+        SC_ORDER_CUSTOM = 2,
+    };
+
+    //! Construct an empty QsciScintillaBase with parent \a parent.
+    explicit QsciScintillaBase(QWidget *parent = 0);
+
+    //! Destroys the QsciScintillaBase instance.
+    virtual ~QsciScintillaBase();
+
+    //! Returns a pointer to a QsciScintillaBase instance, or 0 if there isn't
+    //! one.  This can be used by the higher level API to send messages that
+    //! aren't associated with a particular instance.
+    static QsciScintillaBase *pool();
+
+    //! Replaces the existing horizontal scroll bar with \a scrollBar.  The
+    //! existing scroll bar is deleted.  This should be called instead of
+    //! QAbstractScrollArea::setHorizontalScrollBar().
+    void replaceHorizontalScrollBar(QScrollBar *scrollBar);
+
+    //! Replaces the existing vertical scroll bar with \a scrollBar.  The
+    //! existing scroll bar is deleted.  This should be called instead of
+    //! QAbstractScrollArea::setHorizontalScrollBar().
+    void replaceVerticalScrollBar(QScrollBar *scrollBar);
+
+    //! Send the Scintilla message \a msg with the optional parameters \a
+    //! wParam and \a lParam.
+    long SendScintilla(unsigned int msg, unsigned long wParam = 0,
+            long lParam = 0) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, unsigned long wParam,
+            void *lParam) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, uintptr_t wParam,
+            const char *lParam) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, const char *lParam) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, const char *wParam,
+            const char *lParam) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, long wParam) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, int wParam) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, long cpMin, long cpMax,
+            char *lpstrText) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, unsigned long wParam,
+            const QColor &col) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, const QColor &col) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, unsigned long wParam, QPainter *hdc,
+            const QRect &rc, long cpMin, long cpMax) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, unsigned long wParam,
+            const QPixmap &lParam) const;
+
+    //! \overload
+    long SendScintilla(unsigned int msg, unsigned long wParam,
+            const QImage &lParam) const;
+
+    //! Send the Scintilla message \a msg and return a pointer result.
+    void *SendScintillaPtrResult(unsigned int msg) const;
+
+    //! \internal
+    static int commandKey(int qt_key, int &modifiers);
+
+signals:
+    //! This signal is emitted when text is selected or de-selected.
+    //! \a yes is true if text has been selected and false if text has been
+    //! deselected.
+    void QSCN_SELCHANGED(bool yes);
+
+    //! This signal is emitted when the user cancels an auto-completion list.
+    //!
+    //! \sa SCN_AUTOCSELECTION()
+    void SCN_AUTOCCANCELLED();
+
+    //! This signal is emitted when the user deletes a character when an
+    //! auto-completion list is active.
+    void SCN_AUTOCCHARDELETED();
+
+    //! This signal is emitted after an auto-completion has inserted its text.
+    //! \a selection is the text of the selection.  \a position is the start
+    //! position of the word being completed.  \a ch is the fillup character
+    //! that triggered the selection if method is SC_AC_FILLUP.  \a method is
+    //! the method used to trigger the selection.
+    //!
+    //! \sa SCN_AUTOCCANCELLED(), SCN_AUTOCSELECTION()
+    void SCN_AUTOCCOMPLETED(const char *selection, int position, int ch, int method);
+
+    //! This signal is emitted when the user selects an item in an
+    //! auto-completion list.  It is emitted before the selection is inserted.
+    //! The insertion can be cancelled by sending an SCI_AUTOCANCEL message
+    //! from a connected slot.
+    //! \a selection is the text of the selection.  \a position is the start
+    //! position of the word being completed.  \a ch is the fillup character
+    //! that triggered the selection if method is SC_AC_FILLUP.  \a method is
+    //! the method used to trigger the selection.
+    //!
+    //! \sa SCN_AUTOCCANCELLED(), SCN_AUTOCCOMPLETED()
+    void SCN_AUTOCSELECTION(const char *selection, int position, int ch, int method);
+
+    //! \overload
+    void SCN_AUTOCSELECTION(const char *selection, int position);
+
+    //! This signal is emitted when the user highlights an item in an
+    //! auto-completion or user list.
+    //! \a selection is the text of the selection.  \a id is an identifier for
+    //! the list which was passed as an argument to the SCI_USERLISTSHOW
+    //! message or 0 if the list is an auto-completion list.  \a position is
+    //! the position that the list was displayed at.
+    void SCN_AUTOCSELECTIONCHANGE(const char *selection, int id, int position);
+
+    //! This signal is emitted when the document has changed for any reason.
+    void SCEN_CHANGE();
+
+    //! This signal is emitted when the user clicks on a calltip.
+    //! \a direction is 1 if the user clicked on the up arrow, 2 if the user
+    //! clicked on the down arrow, and 0 if the user clicked elsewhere.
+    void SCN_CALLTIPCLICK(int direction);
+
+    //! This signal is emitted whenever the user enters an ordinary character
+    //! into the text.
+    //! \a charadded is the character. It can be used to decide to display a
+    //! call tip or an auto-completion list.
+    void SCN_CHARADDED(int charadded);
+
+    //! This signal is emitted when the user double clicks.
+    //! \a position is the position in the text where the click occured.
+    //! \a line is the number of the line in the text where the click occured.
+    //! \a modifiers is the logical or of the modifier keys that were pressed
+    //! when the user double clicked.
+    void SCN_DOUBLECLICK(int position, int line, int modifiers);
+
+    //! This signal is emitted when the user moves the mouse (or presses a key)
+    //! after keeping it in one position for the dwell period.
+    //! \a position is the position in the text where the mouse dwells.
+    //! \a x is the x-coordinate where the mouse dwells.  \a y is the
+    //! y-coordinate where the mouse dwells.
+    //! 
+    //! \sa SCN_DWELLSTART, SCI_SETMOUSEDWELLTIME
+    void SCN_DWELLEND(int position, int x, int y);
+
+    //! This signal is emitted when the user keeps the mouse in one position
+    //! for the dwell period.
+    //! \a position is the position in the text where the mouse dwells.
+    //! \a x is the x-coordinate where the mouse dwells.  \a y is the
+    //! y-coordinate where the mouse dwells.
+    //!
+    //! \sa SCN_DWELLEND, SCI_SETMOUSEDWELLTIME
+    void SCN_DWELLSTART(int position, int x, int y);
+
+    //! This signal is emitted when focus is received.
+    void SCN_FOCUSIN();
+
+    //! This signal is emitted when focus is lost.
+    void SCN_FOCUSOUT();
+
+    //! This signal is emitted when the user clicks on text in a style with the
+    //! hotspot attribute set.
+    //! \a position is the position in the text where the click occured.
+    //! \a modifiers is the logical or of the modifier keys that were pressed
+    //! when the user clicked.
+    void SCN_HOTSPOTCLICK(int position, int modifiers);
+
+    //! This signal is emitted when the user double clicks on text in a style
+    //! with the hotspot attribute set.
+    //! \a position is the position in the text where the double click occured.
+    //! \a modifiers is the logical or of the modifier keys that were pressed
+    //! when the user double clicked.
+    void SCN_HOTSPOTDOUBLECLICK(int position, int modifiers);
+
+    //! This signal is emitted when the user releases the mouse button on text
+    //! in a style with the hotspot attribute set.
+    //! \a position is the position in the text where the release occured.
+    //! \a modifiers is the logical or of the modifier keys that were pressed
+    //! when the user released the button.
+    void SCN_HOTSPOTRELEASECLICK(int position, int modifiers);
+
+    //! This signal is emitted when the user clicks on text that has an
+    //! indicator.
+    //! \a position is the position in the text where the click occured.
+    //! \a modifiers is the logical or of the modifier keys that were pressed
+    //! when the user clicked.
+    void SCN_INDICATORCLICK(int position, int modifiers);
+
+    //! This signal is emitted when the user releases the mouse button on text
+    //! that has an indicator.
+    //! \a position is the position in the text where the release occured.
+    //! \a modifiers is the logical or of the modifier keys that were pressed
+    //! when the user released.
+    void SCN_INDICATORRELEASE(int position, int modifiers);
+
+    //! This signal is emitted when a recordable editor command has been
+    //! executed.
+    void SCN_MACRORECORD(unsigned int, unsigned long, void *);
+
+    //! This signal is emitted when the user clicks on a sensitive margin.
+    //! \a position is the position of the start of the line against which the
+    //! user clicked.
+    //! \a modifiers is the logical or of the modifier keys that were pressed
+    //! when the user clicked.
+    //! \a margin is the number of the margin the user clicked in: 0, 1 or 2.
+    //! 
+    //! \sa SCI_GETMARGINSENSITIVEN, SCI_SETMARGINSENSITIVEN
+    void SCN_MARGINCLICK(int position, int modifiers, int margin);
+
+    //! This signal is emitted when the user right-clicks on a sensitive
+    //! margin.  \a position is the position of the start of the line against
+    //! which the user clicked.
+    //! \a modifiers is the logical or of the modifier keys that were pressed
+    //! when the user clicked.
+    //! \a margin is the number of the margin the user clicked in: 0, 1 or 2.
+    //! 
+    //! \sa SCI_GETMARGINSENSITIVEN, SCI_SETMARGINSENSITIVEN
+    void SCN_MARGINRIGHTCLICK(int position, int modifiers, int margin);
+
+    //!
+    void SCN_MODIFIED(int, int, const char *, int, int, int, int, int, int, int);
+
+    //! This signal is emitted when the user attempts to modify read-only
+    //! text.
+    void SCN_MODIFYATTEMPTRO();
+
+    //!
+    void SCN_NEEDSHOWN(int, int);
+
+    //! This signal is emitted when painting has been completed.  It is useful
+    //! to trigger some other change but to have the paint be done first to
+    //! appear more reponsive to the user.
+    void SCN_PAINTED();
+
+    //! This signal is emitted when the current state of the text no longer
+    //! corresponds to the state of the text at the save point.
+    //! 
+    //! \sa SCI_SETSAVEPOINT, SCN_SAVEPOINTREACHED()
+    void SCN_SAVEPOINTLEFT();
+
+    //! This signal is emitted when the current state of the text corresponds
+    //! to the state of the text at the save point. This allows feedback to be
+    //! given to the user as to whether the text has been modified since it was
+    //! last saved.
+    //! 
+    //! \sa SCI_SETSAVEPOINT, SCN_SAVEPOINTLEFT()
+    void SCN_SAVEPOINTREACHED();
+
+    //! This signal is emitted when a range of text needs to be syntax styled.
+    //! The range is from the value returned by the SCI_GETENDSTYLED message
+    //! and \a position.  It is only emitted if the currently selected lexer is
+    //! SCLEX_CONTAINER.
+    //!
+    //! \sa SCI_COLOURISE, SCI_GETENDSTYLED
+    void SCN_STYLENEEDED(int position);
+
+    //! This signal is emitted when a URI is dropped.
+    //! \a url is the value of the URI.
+    void SCN_URIDROPPED(const QUrl &url);
+
+    //! This signal is emitted when either the text or styling of the text has
+    //! changed or the selection range or scroll position has changed.
+    //! \a updated contains the set of SC_UPDATE_* flags describing the changes
+    //! since the signal was last emitted.
+    void SCN_UPDATEUI(int updated);
+
+    //! This signal is emitted when the user selects an item in a user list.
+    //! \a selection is the text of the selection.  \a id is an identifier for
+    //! the list which was passed as an argument to the SCI_USERLISTSHOW
+    //! message and must be at least 1.  \a ch is the fillup character that
+    //! triggered the selection if method is SC_AC_FILLUP.  \a method is the
+    //! method used to trigger the selection.  \a position is the position that
+    //! the list was displayed at.
+    //!
+    //! \sa SCI_USERLISTSHOW, SCN_AUTOCSELECTION()
+    void SCN_USERLISTSELECTION(const char *selection, int id, int ch, int method, int position);
+
+    //! \overload
+    void SCN_USERLISTSELECTION(const char *selection, int id, int ch, int method);
+
+    //! \overload
+    void SCN_USERLISTSELECTION(const char *selection, int id);
+
+    //!
+    void SCN_ZOOM();
+
+protected:
+    //! Returns true if the contents of a MIME data object can be decoded and
+    //! inserted into the document.  It is called during drag and paste
+    //! operations.
+    //! \a source is the MIME data object.
+    //!
+    //! \sa fromMimeData(), toMimeData()
+    virtual bool canInsertFromMimeData(const QMimeData *source) const;
+
+    //! Returns the text of a MIME data object.  It is called when a drag and
+    //! drop is completed and when text is pasted from the clipboard.
+    //! \a source is the MIME data object.  On return \a rectangular is set if
+    //! the text corresponds to a rectangular selection.
+    //!
+    //! \sa canInsertFromMimeData(), toMimeData()
+    virtual QByteArray fromMimeData(const QMimeData *source, bool &rectangular) const;
+
+    //! Returns a new MIME data object containing some text and whether it
+    //! corresponds to a rectangular selection.  It is called when a drag and
+    //! drop is started and when the selection is copied to the clipboard.
+    //! Ownership of the object is passed to the caller.  \a text is the text.
+    //! \a rectangular is set if the text corresponds to a rectangular
+    //! selection.
+    //!
+    //! \sa canInsertFromMimeData(), fromMimeData()
+    virtual QMimeData *toMimeData(const QByteArray &text, bool rectangular) const;
+
+    //! \reimp
+    virtual void changeEvent(QEvent *e);
+
+    //! Re-implemented to handle the context menu.
+    virtual void contextMenuEvent(QContextMenuEvent *e);
+
+    //! Re-implemented to handle drag enters.
+    virtual void dragEnterEvent(QDragEnterEvent *e);
+
+    //! Re-implemented to handle drag leaves.
+    virtual void dragLeaveEvent(QDragLeaveEvent *e);
+
+    //! Re-implemented to handle drag moves.
+    virtual void dragMoveEvent(QDragMoveEvent *e);
+
+    //! Re-implemented to handle drops.
+    virtual void dropEvent(QDropEvent *e);
+
+    //! Re-implemented to tell Scintilla it has the focus.
+    virtual void focusInEvent(QFocusEvent *e);
+
+    //! Re-implemented to tell Scintilla it has lost the focus.
+    virtual void focusOutEvent(QFocusEvent *e);
+
+    //! Re-implemented to allow tabs to be entered as text.
+    virtual bool focusNextPrevChild(bool next);
+
+    //! Re-implemented to handle key presses.
+    virtual void keyPressEvent(QKeyEvent *e);
+
+    //! Re-implemented to handle composed characters.
+    virtual void inputMethodEvent(QInputMethodEvent *event);
+    virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+
+    //! Re-implemented to handle mouse double-clicks.
+    virtual void mouseDoubleClickEvent(QMouseEvent *e);
+
+    //! Re-implemented to handle mouse moves.
+    virtual void mouseMoveEvent(QMouseEvent *e);
+
+    //! Re-implemented to handle mouse presses.
+    virtual void mousePressEvent(QMouseEvent *e);
+
+    //! Re-implemented to handle mouse releases.
+    virtual void mouseReleaseEvent(QMouseEvent *e);
+
+    //! Re-implemented to paint the viewport.
+    virtual void paintEvent(QPaintEvent *e);
+
+    //! Re-implemented to handle resizes.
+    virtual void resizeEvent(QResizeEvent *e);
+
+    //! \internal Re-implemented to handle scrolling.
+    virtual void scrollContentsBy(int dx, int dy);
+
+    //! \internal This helps to work around some Scintilla bugs.
+    void setScrollBars();
+
+    //! \internal Qt4, Qt5 portability.
+    typedef QByteArray ScintillaBytes;
+
+#define ScintillaBytesConstData(b)  (b).constData()
+
+    //! \internal Convert a QString to encoded bytes.
+    ScintillaBytes textAsBytes(const QString &text) const;
+
+    //! \internal Convert encoded bytes to a QString.
+    QString bytesAsText(const char *bytes) const;
+
+    //! \internal A helper for QsciScintilla::contextMenuEvent().
+    bool contextMenuNeeded(int x, int y) const;
+
+private slots:
+    void handleVSb(int value);
+    void handleHSb(int value);
+
+private:
+    // This is needed to allow QsciScintillaQt to emit this class's signals.
+    friend class QsciScintillaQt;
+
+    QsciScintillaQt *sci;
+    QPoint triple_click_at;
+    QTimer triple_click;
+    int preeditPos;
+    int preeditNrBytes;
+    QString preeditString;
+#if QT_VERSION >= 0x050000
+    bool clickCausedFocus;
+#endif
+
+    void connectHorizontalScrollBar();
+    void connectVerticalScrollBar();
+
+    void acceptAction(QDropEvent *e);
+
+    int eventModifiers(QMouseEvent *e);
+
+    QsciScintillaBase(const QsciScintillaBase &);
+    QsciScintillaBase &operator=(const QsciScintillaBase &);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscistyle.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,204 @@
+// This module defines interface to the QsciStyle class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCISTYLE_H
+#define QSCISTYLE_H
+
+#include <qcolor.h>
+#include <qfont.h>
+#include <qstring.h>
+
+#include <Qsci/qsciglobal.h>
+
+
+class QsciScintillaBase;
+
+
+//! \brief The QsciStyle class encapsulates all the attributes of a style.
+//!
+//! Each character of a document has an associated style which determines how
+//! the character is displayed, e.g. its font and color.  A style is identified
+//! by a number.  Lexers define styles for each of the language's features so
+//! that they are displayed differently.  Some style numbers have hard-coded
+//! meanings, e.g. the style used for call tips.
+class QSCINTILLA_EXPORT QsciStyle
+{
+public:
+    //! This enum defines the different ways the displayed case of the text can
+    //! be changed.
+    enum TextCase {
+        //! The text is displayed as its original case.
+        OriginalCase = 0,
+
+        //! The text is displayed as upper case.
+        UpperCase = 1,
+
+        //! The text is displayed as lower case.
+        LowerCase = 2
+    };
+
+    //! Constructs a QsciStyle instance for style number \a style.  If \a style
+    //! is negative then a new style number is automatically allocated if
+    //! possible.  If it is not possible then style() will return a negative
+    //! value.
+    //!
+    //! \sa style()
+    QsciStyle(int style = -1);
+
+    //! Constructs a QsciStyle instance for style number \a style.  If \a style
+    //! is negative then a new style number is automatically allocated if
+    //! possible.  If it is not possible then style() will return a negative
+    //! value.  The styles description, color, paper color, font and
+    //! end-of-line fill are set to \a description, \a color, \a paper, \a font
+    //! and \a eolFill respectively.
+    //!
+    //! \sa style()
+    QsciStyle(int style, const QString &description, const QColor &color,
+            const QColor &paper, const QFont &font, bool eolFill = false);
+
+    //! \internal Apply the style to a particular editor.
+    void apply(QsciScintillaBase *sci) const;
+
+    //! The style's number is set to \a style.
+    //!
+    //! \sa style()
+    void setStyle(int style) {style_nr = style;}
+
+    //! Returns the number of the style.  This will be negative if the style is
+    //! invalid.
+    //!
+    //! \sa setStyle()
+    int style() const {return style_nr;}
+
+    //! The style's description is set to \a description.
+    //!
+    //! \sa description()
+    void setDescription(const QString &description) {style_description = description;}
+
+    //! Returns the style's description.
+    //!
+    //! \sa setDescription()
+    QString description() const {return style_description;}
+
+    //! The style's foreground color is set to \a color.  The default is taken
+    //! from the application's default palette.
+    //!
+    //! \sa color()
+    void setColor(const QColor &color);
+
+    //! Returns the style's foreground color.
+    //!
+    //! \sa setColor()
+    QColor color() const {return style_color;}
+
+    //! The style's background color is set to \a paper.  The default is taken
+    //! from the application's default palette.
+    //!
+    //! \sa paper()
+    void setPaper(const QColor &paper);
+
+    //! Returns the style's background color.
+    //!
+    //! \sa setPaper()
+    QColor paper() const {return style_paper;}
+
+    //! The style's font is set to \a font.  The default is the application's
+    //! default font.
+    //!
+    //! \sa font()
+    void setFont(const QFont &font);
+
+    //! Returns the style's font.
+    //!
+    //! \sa setFont()
+    QFont font() const {return style_font;}
+
+    //! The style's end-of-line fill is set to \a fill.  The default is false.
+    //!
+    //! \sa eolFill()
+    void setEolFill(bool fill);
+
+    //! Returns the style's end-of-line fill.
+    //!
+    //! \sa setEolFill()
+    bool eolFill() const {return style_eol_fill;}
+
+    //! The style's text case is set to \a text_case.  The default is
+    //! OriginalCase.
+    //!
+    //! \sa textCase()
+    void setTextCase(TextCase text_case);
+
+    //! Returns the style's text case.
+    //!
+    //! \sa setTextCase()
+    TextCase textCase() const {return style_case;}
+
+    //! The style's visibility is set to \a visible.  The default is true.
+    //!
+    //! \sa visible()
+    void setVisible(bool visible);
+
+    //! Returns the style's visibility.
+    //!
+    //! \sa setVisible()
+    bool visible() const {return style_visible;}
+
+    //! The style's changeability is set to \a changeable.  The default is
+    //! true.
+    //!
+    //! \sa changeable()
+    void setChangeable(bool changeable);
+
+    //! Returns the style's changeability.
+    //!
+    //! \sa setChangeable()
+    bool changeable() const {return style_changeable;}
+
+    //! The style's sensitivity to mouse clicks is set to \a hotspot.  The
+    //! default is false.
+    //!
+    //! \sa hotspot()
+    void setHotspot(bool hotspot);
+
+    //! Returns the style's sensitivity to mouse clicks.
+    //!
+    //! \sa setHotspot()
+    bool hotspot() const {return style_hotspot;}
+
+    //! Refresh the style settings.
+    void refresh();
+
+private:
+    int style_nr;
+    QString style_description;
+    QColor style_color;
+    QColor style_paper;
+    QFont style_font;
+    bool style_eol_fill;
+    TextCase style_case;
+    bool style_visible;
+    bool style_changeable;
+    bool style_hotspot;
+
+    void init(int style);
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/Qsci/qscistyledtext.h	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,61 @@
+// This module defines interface to the QsciStyledText class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#ifndef QSCISTYLEDTEXT_H
+#define QSCISTYLEDTEXT_H
+
+#include <qstring.h>
+
+#include <Qsci/qsciglobal.h>
+
+
+class QsciScintillaBase;
+class QsciStyle;
+
+
+//! \brief The QsciStyledText class is a container for a piece of text and the
+//! style used to display the text.
+class QSCINTILLA_EXPORT QsciStyledText
+{
+public:
+    //! Constructs a QsciStyledText instance for text \a text and style number
+    //! \a style.
+    QsciStyledText(const QString &text, int style);
+
+    //! Constructs a QsciStyledText instance for text \a text and style \a
+    //! style.
+    QsciStyledText(const QString &text, const QsciStyle &style);
+
+    //! \internal Apply the style to a particular editor.
+    void apply(QsciScintillaBase *sci) const;
+
+    //! Returns a reference to the text.
+    const QString &text() const {return styled_text;}
+
+    //! Returns the number of the style.
+    int style() const;
+
+private:
+    QString styled_text;
+    int style_nr;
+    const QsciStyle *explicit_style;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/qscilexer.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,731 @@
+// This module implements the QsciLexer class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include "Qsci/qscilexer.h"
+
+#include <qapplication.h>
+#include <qcolor.h>
+#include <qfont.h>
+#include <qsettings.h>
+
+#include "Qsci/qsciapis.h"
+#include "Qsci/qsciscintilla.h"
+#include "Qsci/qsciscintillabase.h"
+
+
+// The ctor.
+QsciLexer::QsciLexer(QObject *parent)
+    : QObject(parent),
+      autoIndStyle(-1), apiSet(0), attached_editor(0)
+{
+#if defined(Q_OS_WIN)
+    defFont = QFont("Verdana", 10);
+#elif defined(Q_OS_MAC)
+    defFont = QFont("Menlo", 12);
+#else
+    defFont = QFont("Bitstream Vera Sans", 9);
+#endif
+
+    // Set the default fore and background colours.
+    QPalette pal = QApplication::palette();
+    defColor = pal.text().color();
+    defPaper = pal.base().color();
+
+    // Putting this on the heap means we can keep the style getters const.
+    style_map = new StyleDataMap;
+    style_map->style_data_set = false;
+}
+
+
+// The dtor.
+QsciLexer::~QsciLexer()
+{
+    delete style_map;
+}
+
+
+// Set the attached editor.
+void QsciLexer::setEditor(QsciScintilla *editor)
+{
+    attached_editor = editor;
+}
+
+
+// Return the lexer name.
+const char *QsciLexer::lexer() const
+{
+    return 0;
+}
+
+
+// Return the lexer identifier.
+int QsciLexer::lexerId() const
+{
+    return QsciScintillaBase::SCLEX_CONTAINER;
+}
+
+
+// Return the number of style bits needed by the lexer.
+int QsciLexer::styleBitsNeeded() const
+{
+    return 8;
+}
+
+
+// Make sure the style defaults have been set.
+void QsciLexer::setStyleDefaults() const
+{
+    if (!style_map->style_data_set)
+    {
+        for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i)
+            if (!description(i).isEmpty())
+                styleData(i);
+
+        style_map->style_data_set = true;
+    }
+}
+
+
+// Return a reference to a style's data, setting up the defaults if needed.
+QsciLexer::StyleData &QsciLexer::styleData(int style) const
+{
+    StyleData &sd = style_map->style_data[style];
+
+    // See if this is a new style by checking if the colour is valid.
+    if (!sd.color.isValid())
+    {
+        sd.color = defaultColor(style);
+        sd.paper = defaultPaper(style);
+        sd.font = defaultFont(style);
+        sd.eol_fill = defaultEolFill(style);
+    }
+
+    return sd;
+}
+
+
+// Set the APIs associated with the lexer.
+void QsciLexer::setAPIs(QsciAbstractAPIs *apis)
+{
+    apiSet = apis;
+}
+
+
+// Return a pointer to the current APIs if there are any.
+QsciAbstractAPIs *QsciLexer::apis() const
+{
+    return apiSet;
+}
+
+
+// Default implementation to return the set of fill up characters that can end
+// auto-completion.
+const char *QsciLexer::autoCompletionFillups() const
+{
+    return "(";
+}
+
+
+// Default implementation to return the view used for indentation guides.
+int QsciLexer::indentationGuideView() const
+{
+    return QsciScintillaBase::SC_IV_LOOKBOTH;
+}
+
+
+// Default implementation to return the list of character sequences that can
+// separate auto-completion words.
+QStringList QsciLexer::autoCompletionWordSeparators() const
+{
+    return QStringList();
+}
+
+
+// Default implementation to return the list of keywords that can start a
+// block.
+const char *QsciLexer::blockStartKeyword(int *) const
+{
+    return 0;
+}
+
+
+// Default implementation to return the list of characters that can start a
+// block.
+const char *QsciLexer::blockStart(int *) const
+{
+    return 0;
+}
+
+
+// Default implementation to return the list of characters that can end a
+// block.
+const char *QsciLexer::blockEnd(int *) const
+{
+    return 0;
+}
+
+
+// Default implementation to return the style used for braces.
+int QsciLexer::braceStyle() const
+{
+    return -1;
+}
+
+
+// Default implementation to return the number of lines to look back when
+// auto-indenting.
+int QsciLexer::blockLookback() const
+{
+    return 20;
+}
+
+
+// Default implementation to return the case sensitivity of the language.
+bool QsciLexer::caseSensitive() const
+{
+    return true;
+}
+
+
+// Default implementation to return the characters that make up a word.
+const char *QsciLexer::wordCharacters() const
+{
+    return 0;
+}
+
+
+// Default implementation to return the style used for whitespace.
+int QsciLexer::defaultStyle() const
+{
+    return 0;
+}
+
+
+// Returns the foreground colour of the text for a style.
+QColor QsciLexer::color(int style) const
+{
+    return styleData(style).color;
+}
+
+
+// Returns the background colour of the text for a style.
+QColor QsciLexer::paper(int style) const
+{
+    return styleData(style).paper;
+}
+
+
+// Returns the font for a style.
+QFont QsciLexer::font(int style) const
+{
+    return styleData(style).font;
+}
+
+
+// Returns the end-of-line fill for a style.
+bool QsciLexer::eolFill(int style) const
+{
+    return styleData(style).eol_fill;
+}
+
+
+// Returns the set of keywords.
+const char *QsciLexer::keywords(int) const
+{
+    return 0;
+}
+
+
+// Returns the default EOL fill for a style.
+bool QsciLexer::defaultEolFill(int) const
+{
+    return false;
+}
+
+
+// Returns the default font for a style.
+QFont QsciLexer::defaultFont(int) const
+{
+    return defaultFont();
+}
+
+
+// Returns the default font.
+QFont QsciLexer::defaultFont() const
+{
+    return defFont;
+}
+
+
+// Sets the default font.
+void QsciLexer::setDefaultFont(const QFont &f)
+{
+    defFont = f;
+}
+
+
+// Returns the default text colour for a style.
+QColor QsciLexer::defaultColor(int) const
+{
+    return defaultColor();
+}
+
+
+// Returns the default text colour.
+QColor QsciLexer::defaultColor() const
+{
+    return defColor;
+}
+
+
+// Sets the default text colour.
+void QsciLexer::setDefaultColor(const QColor &c)
+{
+    defColor = c;
+}
+
+
+// Returns the default paper colour for a styles.
+QColor QsciLexer::defaultPaper(int) const
+{
+    return defaultPaper();
+}
+
+
+// Returns the default paper colour.
+QColor QsciLexer::defaultPaper() const
+{
+    return defPaper;
+}
+
+
+// Sets the default paper colour.
+void QsciLexer::setDefaultPaper(const QColor &c)
+{
+    defPaper = c;
+
+    // Normally the default values are only intended to provide defaults when a
+    // lexer is first setup because once a style has been referenced then a
+    // copy of the default is made.  However the default paper is a special
+    // case because there is no other way to set the background colour used
+    // where there is no text.  Therefore we also actively set it.
+    setPaper(c, QsciScintillaBase::STYLE_DEFAULT);
+}
+
+
+// Read properties from the settings.
+bool QsciLexer::readProperties(QSettings &,const QString &)
+{
+    return true;
+}
+
+
+// Refresh all properties.
+void QsciLexer::refreshProperties()
+{
+}
+
+
+// Write properties to the settings.
+bool QsciLexer::writeProperties(QSettings &,const QString &) const
+{
+    return true;
+}
+
+
+// Restore the user settings.
+bool QsciLexer::readSettings(QSettings &qs,const char *prefix)
+{
+    bool ok, flag, rc = true;
+    int num;
+    QString key, full_key;
+    QStringList fdesc;
+
+    setStyleDefaults();
+
+    // Read the styles.
+    for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i)
+    {
+        // Ignore invalid styles.
+        if (description(i).isEmpty())
+            continue;
+
+        key.sprintf("%s/%s/style%d/",prefix,language(),i);
+
+        // Read the foreground colour.
+        full_key = key + "color";
+
+        ok = qs.contains(full_key);
+        num = qs.value(full_key).toInt();
+
+        if (ok)
+            setColor(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i);
+        else
+            rc = false;
+
+        // Read the end-of-line fill.
+        full_key = key + "eolfill";
+
+        ok = qs.contains(full_key);
+        flag = qs.value(full_key, false).toBool();
+
+        if (ok)
+            setEolFill(flag, i);
+        else
+            rc = false;
+
+        // Read the font.  First try the deprecated format that uses an integer
+        // point size.
+        full_key = key + "font";
+
+        ok = qs.contains(full_key);
+        fdesc = qs.value(full_key).toStringList();
+
+        if (ok && fdesc.count() == 5)
+        {
+            QFont f;
+
+            f.setFamily(fdesc[0]);
+            f.setPointSize(fdesc[1].toInt());
+            f.setBold(fdesc[2].toInt());
+            f.setItalic(fdesc[3].toInt());
+            f.setUnderline(fdesc[4].toInt());
+
+            setFont(f, i);
+        }
+        else
+            rc = false;
+
+        // Now try the newer font format that uses a floating point point size.
+        // It is not an error if it doesn't exist.
+        full_key = key + "font2";
+
+        ok = qs.contains(full_key);
+        fdesc = qs.value(full_key).toStringList();
+
+        if (ok)
+        {
+            // Allow for future versions with more fields.
+            if (fdesc.count() >= 5)
+            {
+                QFont f;
+
+                f.setFamily(fdesc[0]);
+                f.setPointSizeF(fdesc[1].toDouble());
+                f.setBold(fdesc[2].toInt());
+                f.setItalic(fdesc[3].toInt());
+                f.setUnderline(fdesc[4].toInt());
+
+                setFont(f, i);
+            }
+            else
+            {
+                rc = false;
+            }
+        }
+
+        // Read the background colour.
+        full_key = key + "paper";
+
+        ok = qs.contains(full_key);
+        num = qs.value(full_key).toInt();
+
+        if (ok)
+            setPaper(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i);
+        else
+            rc = false;
+    }
+
+    // Read the properties.
+    key.sprintf("%s/%s/properties/",prefix,language());
+
+    if (!readProperties(qs,key))
+        rc = false;
+
+    refreshProperties();
+
+    // Read the rest.
+    key.sprintf("%s/%s/",prefix,language());
+
+    // Read the default foreground colour.
+    full_key = key + "defaultcolor";
+
+    ok = qs.contains(full_key);
+    num = qs.value(full_key).toInt();
+
+    if (ok)
+        setDefaultColor(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff));
+    else
+        rc = false;
+
+    // Read the default background colour.
+    full_key = key + "defaultpaper";
+
+    ok = qs.contains(full_key);
+    num = qs.value(full_key).toInt();
+
+    if (ok)
+        setDefaultPaper(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff));
+    else
+        rc = false;
+
+    // Read the default font.  First try the deprecated format that uses an
+    // integer point size.
+    full_key = key + "defaultfont";
+
+    ok = qs.contains(full_key);
+    fdesc = qs.value(full_key).toStringList();
+
+    if (ok && fdesc.count() == 5)
+    {
+        QFont f;
+
+        f.setFamily(fdesc[0]);
+        f.setPointSize(fdesc[1].toInt());
+        f.setBold(fdesc[2].toInt());
+        f.setItalic(fdesc[3].toInt());
+        f.setUnderline(fdesc[4].toInt());
+
+        setDefaultFont(f);
+    }
+    else
+        rc = false;
+
+    // Now try the newer font format that uses a floating point point size.  It
+    // is not an error if it doesn't exist.
+    full_key = key + "defaultfont2";
+
+    ok = qs.contains(full_key);
+    fdesc = qs.value(full_key).toStringList();
+
+    if (ok)
+    {
+        // Allow for future versions with more fields.
+        if (fdesc.count() >= 5)
+        {
+            QFont f;
+
+            f.setFamily(fdesc[0]);
+            f.setPointSizeF(fdesc[1].toDouble());
+            f.setBold(fdesc[2].toInt());
+            f.setItalic(fdesc[3].toInt());
+            f.setUnderline(fdesc[4].toInt());
+
+            setDefaultFont(f);
+        }
+        else
+        {
+            rc = false;
+        }
+    }
+
+    full_key = key + "autoindentstyle";
+
+    ok = qs.contains(full_key);
+    num = qs.value(full_key).toInt();
+
+    if (ok)
+        setAutoIndentStyle(num);
+    else
+        rc = false;
+
+    return rc;
+}
+
+
+// Save the user settings.
+bool QsciLexer::writeSettings(QSettings &qs,const char *prefix) const
+{
+    bool rc = true;
+    QString key, fmt("%1");
+    int num;
+    QStringList fdesc;
+
+    setStyleDefaults();
+
+    // Write the styles.
+    for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i)
+    {
+        // Ignore invalid styles.
+        if (description(i).isEmpty())
+            continue;
+
+        QColor c;
+
+        key.sprintf("%s/%s/style%d/",prefix,language(),i);
+
+        // Write the foreground colour.
+        c = color(i);
+        num = (c.red() << 16) | (c.green() << 8) | c.blue();
+
+        qs.setValue(key + "color", num);
+
+        // Write the end-of-line fill.
+        qs.setValue(key + "eolfill", eolFill(i));
+
+        // Write the font using the deprecated format.
+        QFont f = font(i);
+
+        fdesc.clear();
+        fdesc += f.family();
+        fdesc += fmt.arg(f.pointSize());
+
+        // The casts are for Borland.
+        fdesc += fmt.arg((int)f.bold());
+        fdesc += fmt.arg((int)f.italic());
+        fdesc += fmt.arg((int)f.underline());
+
+        qs.setValue(key + "font", fdesc);
+
+        // Write the font using the newer format.
+        fdesc[1] = fmt.arg(f.pointSizeF());
+
+        qs.setValue(key + "font2", fdesc);
+
+        // Write the background colour.
+        c = paper(i);
+        num = (c.red() << 16) | (c.green() << 8) | c.blue();
+
+        qs.setValue(key + "paper", num);
+    }
+
+    // Write the properties.
+    key.sprintf("%s/%s/properties/",prefix,language());
+
+    if (!writeProperties(qs,key))
+        rc = false;
+
+    // Write the rest.
+    key.sprintf("%s/%s/",prefix,language());
+
+    // Write the default foreground colour.
+    num = (defColor.red() << 16) | (defColor.green() << 8) | defColor.blue();
+
+    qs.setValue(key + "defaultcolor", num);
+
+    // Write the default background colour.
+    num = (defPaper.red() << 16) | (defPaper.green() << 8) | defPaper.blue();
+
+    qs.setValue(key + "defaultpaper", num);
+
+    // Write the default font using the deprecated format.
+    fdesc.clear();
+    fdesc += defFont.family();
+    fdesc += fmt.arg(defFont.pointSize());
+
+    // The casts are for Borland.
+    fdesc += fmt.arg((int)defFont.bold());
+    fdesc += fmt.arg((int)defFont.italic());
+    fdesc += fmt.arg((int)defFont.underline());
+
+    qs.setValue(key + "defaultfont", fdesc);
+
+    // Write the font using the newer format.
+    fdesc[1] = fmt.arg(defFont.pointSizeF());
+
+    qs.setValue(key + "defaultfont2", fdesc);
+
+    qs.setValue(key + "autoindentstyle", autoIndStyle);
+
+    return rc;
+}
+
+
+// Return the auto-indentation style.
+int QsciLexer::autoIndentStyle()
+{
+    // We can't do this in the ctor because we want the virtuals to work.
+    if (autoIndStyle < 0)
+        autoIndStyle = (blockStartKeyword() || blockStart() || blockEnd()) ?
+                    0 : QsciScintilla::AiMaintain;
+
+    return autoIndStyle;
+}
+
+
+// Set the auto-indentation style.
+void QsciLexer::setAutoIndentStyle(int autoindentstyle)
+{
+    autoIndStyle = autoindentstyle;
+}
+
+
+// Set the foreground colour for a style.
+void QsciLexer::setColor(const QColor &c, int style)
+{
+    if (style >= 0)
+    {
+        styleData(style).color = c;
+        emit colorChanged(c, style);
+    }
+    else
+        for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i)
+            if (!description(i).isEmpty())
+                setColor(c, i);
+}
+
+
+// Set the end-of-line fill for a style.
+void QsciLexer::setEolFill(bool eolfill, int style)
+{
+    if (style >= 0)
+    {
+        styleData(style).eol_fill = eolfill;
+        emit eolFillChanged(eolfill, style);
+    }
+    else
+        for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i)
+            if (!description(i).isEmpty())
+                setEolFill(eolfill, i);
+}
+
+
+// Set the font for a style.
+void QsciLexer::setFont(const QFont &f, int style)
+{
+    if (style >= 0)
+    {
+        styleData(style).font = f;
+        emit fontChanged(f, style);
+    }
+    else
+        for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i)
+            if (!description(i).isEmpty())
+                setFont(f, i);
+}
+
+
+// Set the background colour for a style.
+void QsciLexer::setPaper(const QColor &c, int style)
+{
+    if (style >= 0)
+    {
+        styleData(style).paper = c;
+        emit paperChanged(c, style);
+    }
+    else
+    {
+        for (int i = 0; i <= QsciScintillaBase::STYLE_MAX; ++i)
+            if (!description(i).isEmpty())
+                setPaper(c, i);
+
+        emit paperChanged(c, QsciScintillaBase::STYLE_DEFAULT);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/qscilexerbash.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,350 @@
+// This module implements the QsciLexerBash class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include "Qsci/qscilexerbash.h"
+
+#include <qcolor.h>
+#include <qfont.h>
+#include <qsettings.h>
+
+
+// The ctor.
+QsciLexerBash::QsciLexerBash(QObject *parent)
+    : QsciLexer(parent), fold_comments(false), fold_compact(true)
+{
+}
+
+
+// The dtor.
+QsciLexerBash::~QsciLexerBash()
+{
+}
+
+
+// Returns the language name.
+const char *QsciLexerBash::language() const
+{
+    return "Bash";
+}
+
+
+// Returns the lexer name.
+const char *QsciLexerBash::lexer() const
+{
+    return "bash";
+}
+
+
+// Return the style used for braces.
+int QsciLexerBash::braceStyle() const
+{
+    return Operator;
+}
+
+
+// Return the string of characters that comprise a word.
+const char *QsciLexerBash::wordCharacters() const
+{
+    return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$@%&";
+}
+
+
+// Returns the foreground colour of the text for a style.
+QColor QsciLexerBash::defaultColor(int style) const
+{
+    switch (style)
+    {
+    case Default:
+        return QColor(0x80,0x80,0x80);
+
+    case Error:
+    case Backticks:
+        return QColor(0xff,0xff,0x00);
+
+    case Comment:
+        return QColor(0x00,0x7f,0x00);
+
+    case Number:
+        return QColor(0x00,0x7f,0x7f);
+
+    case Keyword:
+        return QColor(0x00,0x00,0x7f);
+
+    case DoubleQuotedString:
+    case SingleQuotedString:
+    case SingleQuotedHereDocument:
+        return QColor(0x7f,0x00,0x7f);
+
+    case Operator:
+    case Identifier:
+    case Scalar:
+    case ParameterExpansion:
+    case HereDocumentDelimiter:
+        return QColor(0x00,0x00,0x00);
+    }
+
+    return QsciLexer::defaultColor(style);
+}
+
+
+// Returns the end-of-line fill for a style.
+bool QsciLexerBash::defaultEolFill(int style) const
+{
+    switch (style)
+    {
+    case SingleQuotedHereDocument:
+        return true;
+    }
+
+    return QsciLexer::defaultEolFill(style);
+}
+
+
+// Returns the font of the text for a style.
+QFont QsciLexerBash::defaultFont(int style) const
+{
+    QFont f;
+
+    switch (style)
+    {
+    case Comment:
+#if defined(Q_OS_WIN)
+        f = QFont("Comic Sans MS",9);
+#elif defined(Q_OS_MAC)
+        f = QFont("Comic Sans MS", 12);
+#else
+        f = QFont("Bitstream Vera Serif",9);
+#endif
+        break;
+
+    case Keyword:
+    case Operator:
+        f = QsciLexer::defaultFont(style);
+        f.setBold(true);
+        break;
+
+    case DoubleQuotedString:
+    case SingleQuotedString:
+#if defined(Q_OS_WIN)
+        f = QFont("Courier New",10);
+#elif defined(Q_OS_MAC)
+        f = QFont("Courier", 12);
+#else
+        f = QFont("Bitstream Vera Sans Mono",9);
+#endif
+        break;
+
+    default:
+        f = QsciLexer::defaultFont(style);
+    }
+
+    return f;
+}
+
+
+// Returns the set of keywords.
+const char *QsciLexerBash::keywords(int set) const
+{
+    if (set == 1)
+        return
+            "alias ar asa awk banner basename bash bc bdiff break "
+            "bunzip2 bzip2 cal calendar case cat cc cd chmod "
+            "cksum clear cmp col comm compress continue cp cpio "
+            "crypt csplit ctags cut date dc dd declare deroff dev "
+            "df diff diff3 dircmp dirname do done du echo ed "
+            "egrep elif else env esac eval ex exec exit expand "
+            "export expr false fc fgrep fi file find fmt fold for "
+            "function functions getconf getopt getopts grep gres "
+            "hash head help history iconv id if in integer jobs "
+            "join kill local lc let line ln logname look ls m4 "
+            "mail mailx make man mkdir more mt mv newgrp nl nm "
+            "nohup ntps od pack paste patch pathchk pax pcat perl "
+            "pg pr print printf ps pwd read readonly red return "
+            "rev rm rmdir sed select set sh shift size sleep sort "
+            "spell split start stop strings strip stty sum "
+            "suspend sync tail tar tee test then time times touch "
+            "tr trap true tsort tty type typeset ulimit umask "
+            "unalias uname uncompress unexpand uniq unpack unset "
+            "until uudecode uuencode vi vim vpax wait wc whence "
+            "which while who wpaste wstart xargs zcat "
+
+            "chgrp chown chroot dir dircolors factor groups "
+            "hostid install link md5sum mkfifo mknod nice pinky "
+            "printenv ptx readlink seq sha1sum shred stat su tac "
+            "unlink users vdir whoami yes";
+
+    return 0;
+}
+
+
+// Returns the user name of a style.
+QString QsciLexerBash::description(int style) const
+{
+    switch (style)
+    {
+    case Default:
+        return tr("Default");
+
+    case Error:
+        return tr("Error");
+
+    case Comment:
+        return tr("Comment");
+
+    case Number:
+        return tr("Number");
+
+    case Keyword:
+        return tr("Keyword");
+
+    case DoubleQuotedString:
+        return tr("Double-quoted string");
+
+    case SingleQuotedString:
+        return tr("Single-quoted string");
+
+    case Operator:
+        return tr("Operator");
+
+    case Identifier:
+        return tr("Identifier");
+
+    case Scalar:
+        return tr("Scalar");
+
+    case ParameterExpansion:
+        return tr("Parameter expansion");
+
+    case Backticks:
+        return tr("Backticks");
+
+    case HereDocumentDelimiter:
+        return tr("Here document delimiter");
+
+    case SingleQuotedHereDocument:
+        return tr("Single-quoted here document");
+    }
+
+    return QString();
+}
+
+
+// Returns the background colour of the text for a style.
+QColor QsciLexerBash::defaultPaper(int style) const
+{
+    switch (style)
+    {
+    case Error:
+        return QColor(0xff,0x00,0x00);
+
+    case Scalar:
+        return QColor(0xff,0xe0,0xe0);
+
+    case ParameterExpansion:
+        return QColor(0xff,0xff,0xe0);
+
+    case Backticks:
+        return QColor(0xa0,0x80,0x80);
+
+    case HereDocumentDelimiter:
+    case SingleQuotedHereDocument:
+        return QColor(0xdd,0xd0,0xdd);
+    }
+
+    return QsciLexer::defaultPaper(style);
+}
+
+
+// Refresh all properties.
+void QsciLexerBash::refreshProperties()
+{
+    setCommentProp();
+    setCompactProp();
+}
+
+
+// Read properties from the settings.
+bool QsciLexerBash::readProperties(QSettings &qs, const QString &prefix)
+{
+    int rc = true;
+
+    fold_comments = qs.value(prefix + "foldcomments", false).toBool();
+    fold_compact = qs.value(prefix + "foldcompact", true).toBool();
+
+    return rc;
+}
+
+
+// Write properties to the settings.
+bool QsciLexerBash::writeProperties(QSettings &qs, const QString &prefix) const
+{
+    int rc = true;
+
+    qs.setValue(prefix + "foldcomments", fold_comments);
+    qs.setValue(prefix + "foldcompact", fold_compact);
+
+    return rc;
+}
+
+
+// Return true if comments can be folded.
+bool QsciLexerBash::foldComments() const
+{
+    return fold_comments;
+}
+
+
+// Set if comments can be folded.
+void QsciLexerBash::setFoldComments(bool fold)
+{
+    fold_comments = fold;
+
+    setCommentProp();
+}
+
+
+// Set the "fold.comment" property.
+void QsciLexerBash::setCommentProp()
+{
+    emit propertyChanged("fold.comment", (fold_comments ? "1" : "0"));
+}
+
+
+// Return true if folds are compact.
+bool QsciLexerBash::foldCompact() const
+{
+    return fold_compact;
+}
+
+
+// Set if folds are compact
+void QsciLexerBash::setFoldCompact(bool fold)
+{
+    fold_compact = fold;
+
+    setCompactProp();
+}
+
+
+// Set the "fold.compact" property.
+void QsciLexerBash::setCompactProp()
+{
+    emit propertyChanged("fold.compact", (fold_compact ? "1" : "0"));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/qscilexerbatch.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,212 @@
+// This module implements the QsciLexerBatch class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include "Qsci/qscilexerbatch.h"
+
+#include <qcolor.h>
+#include <qfont.h>
+#include <qsettings.h>
+
+
+// The ctor.
+QsciLexerBatch::QsciLexerBatch(QObject *parent)
+    : QsciLexer(parent)
+{
+}
+
+
+// The dtor.
+QsciLexerBatch::~QsciLexerBatch()
+{
+}
+
+
+// Returns the language name.
+const char *QsciLexerBatch::language() const
+{
+    return "Batch";
+}
+
+
+// Returns the lexer name.
+const char *QsciLexerBatch::lexer() const
+{
+    return "batch";
+}
+
+
+// Return the string of characters that comprise a word.
+const char *QsciLexerBatch::wordCharacters() const
+{
+    return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-";
+}
+
+
+// Returns the foreground colour of the text for a style.
+QColor QsciLexerBatch::defaultColor(int style) const
+{
+    switch (style)
+    {
+    case Default:
+    case Operator:
+        return QColor(0x00,0x00,0x00);
+
+    case Comment:
+        return QColor(0x00,0x7f,0x00);
+
+    case Keyword:
+    case ExternalCommand:
+        return QColor(0x00,0x00,0x7f);
+
+    case Label:
+        return QColor(0x7f,0x00,0x7f);
+
+    case HideCommandChar:
+        return QColor(0x7f,0x7f,0x00);
+
+    case Variable:
+        return QColor(0x80,0x00,0x80);
+    }
+
+    return QsciLexer::defaultColor(style);
+}
+
+
+// Returns the end-of-line fill for a style.
+bool QsciLexerBatch::defaultEolFill(int style) const
+{
+    switch (style)
+    {
+    case Label:
+        return true;
+    }
+
+    return QsciLexer::defaultEolFill(style);
+}
+
+
+// Returns the font of the text for a style.
+QFont QsciLexerBatch::defaultFont(int style) const
+{
+    QFont f;
+
+    switch (style)
+    {
+    case Comment:
+#if defined(Q_OS_WIN)
+        f = QFont("Comic Sans MS",9);
+#elif defined(Q_OS_MAC)
+        f = QFont("Comic Sans MS", 12);
+#else
+        f = QFont("Bitstream Vera Serif",9);
+#endif
+        break;
+
+    case Keyword:
+        f = QsciLexer::defaultFont(style);
+        f.setBold(true);
+        break;
+
+    case ExternalCommand:
+#if defined(Q_OS_WIN)
+        f = QFont("Courier New",10);
+#elif defined(Q_OS_MAC)
+        f = QFont("Courier", 12);
+#else
+        f = QFont("Bitstream Vera Sans Mono",9);
+#endif
+        f.setBold(true);
+        break;
+
+    default:
+        f = QsciLexer::defaultFont(style);
+    }
+
+    return f;
+}
+
+
+// Returns the set of keywords.
+const char *QsciLexerBatch::keywords(int set) const
+{
+    if (set == 1)
+        return
+            "rem set if exist errorlevel for in do break call "
+            "chcp cd chdir choice cls country ctty date del "
+            "erase dir echo exit goto loadfix loadhigh mkdir md "
+            "move path pause prompt rename ren rmdir rd shift "
+            "time type ver verify vol com con lpt nul";
+
+    return 0;
+}
+
+
+// Return the case sensitivity.
+bool QsciLexerBatch::caseSensitive() const
+{
+    return false;
+}
+
+
+// Returns the user name of a style.
+QString QsciLexerBatch::description(int style) const
+{
+    switch (style)
+    {
+    case Default:
+        return tr("Default");
+
+    case Comment:
+        return tr("Comment");
+
+    case Keyword:
+        return tr("Keyword");
+
+    case Label:
+        return tr("Label");
+
+    case HideCommandChar:
+        return tr("Hide command character");
+
+    case ExternalCommand:
+        return tr("External command");
+
+    case Variable:
+        return tr("Variable");
+
+    case Operator:
+        return tr("Operator");
+    }
+
+    return QString();
+}
+
+
+// Returns the background colour of the text for a style.
+QColor QsciLexerBatch::defaultPaper(int style) const
+{
+    switch (style)
+    {
+    case Label:
+        return QColor(0x60,0x60,0x60);
+    }
+
+    return QsciLexer::defaultPaper(style);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/qscilexercpp.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,801 @@
+// This module implements the QsciLexerCPP class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include "Qsci/qscilexercpp.h"
+
+#include <qcolor.h>
+#include <qfont.h>
+#include <qsettings.h>
+
+
+// The ctor.
+QsciLexerCPP::QsciLexerCPP(QObject *parent, bool caseInsensitiveKeywords)
+    : QsciLexer(parent),
+      fold_atelse(false), fold_comments(false), fold_compact(true),
+      fold_preproc(true), style_preproc(false), dollars(true),
+      highlight_triple(false), highlight_hash(false), highlight_back(false),
+      highlight_escape(false), vs_escape(false),
+      nocase(caseInsensitiveKeywords)
+{
+}
+
+
+// The dtor.
+QsciLexerCPP::~QsciLexerCPP()
+{
+}
+
+
+// Returns the language name.
+const char *QsciLexerCPP::language() const
+{
+    return "C++";
+}
+
+
+// Returns the lexer name.
+const char *QsciLexerCPP::lexer() const
+{
+    return (nocase ? "cppnocase" : "cpp");
+}
+
+
+// Return the set of character sequences that can separate auto-completion
+// words.
+QStringList QsciLexerCPP::autoCompletionWordSeparators() const
+{
+    QStringList wl;
+
+    wl << "::" << "->" << ".";
+
+    return wl;
+}
+
+
+// Return the list of keywords that can start a block.
+const char *QsciLexerCPP::blockStartKeyword(int *style) const
+{
+    if (style)
+        *style = Keyword;
+
+    return "case catch class default do else finally for if private "
+           "protected public struct try union while";
+}
+
+
+// Return the list of characters that can start a block.
+const char *QsciLexerCPP::blockStart(int *style) const
+{
+    if (style)
+        *style = Operator;
+
+    return "{";
+}
+
+
+// Return the list of characters that can end a block.
+const char *QsciLexerCPP::blockEnd(int *style) const
+{
+    if (style)
+        *style = Operator;
+
+    return "}";
+}
+
+
+// Return the style used for braces.
+int QsciLexerCPP::braceStyle() const
+{
+    return Operator;
+}
+
+
+// Return the string of characters that comprise a word.
+const char *QsciLexerCPP::wordCharacters() const
+{
+    return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_#";
+}
+
+
+// Returns the foreground colour of the text for a style.
+QColor QsciLexerCPP::defaultColor(int style) const
+{
+    switch (style)
+    {
+    case Default:
+        return QColor(0x80, 0x80, 0x80);
+
+    case Comment:
+    case CommentLine:
+        return QColor(0x00, 0x7f, 0x00);
+
+    case CommentDoc:
+    case CommentLineDoc:
+    case PreProcessorCommentLineDoc:
+        return QColor(0x3f, 0x70, 0x3f);
+
+    case Number:
+        return QColor(0x00, 0x7f, 0x7f);
+
+    case Keyword:
+        return QColor(0x00, 0x00, 0x7f);
+
+    case DoubleQuotedString:
+    case SingleQuotedString:
+    case RawString:
+        return QColor(0x7f, 0x00, 0x7f);
+
+    case PreProcessor:
+        return QColor(0x7f, 0x7f, 0x00);
+
+    case Operator:
+    case UnclosedString:
+        return QColor(0x00, 0x00, 0x00);
+
+    case VerbatimString:
+    case TripleQuotedVerbatimString:
+    case HashQuotedString:
+        return QColor(0x00, 0x7f, 0x00);
+
+    case Regex:
+        return QColor(0x3f, 0x7f, 0x3f);
+
+    case CommentDocKeyword:
+        return QColor(0x30, 0x60, 0xa0);
+
+    case CommentDocKeywordError:
+        return QColor(0x80, 0x40, 0x20);
+
+    case PreProcessorComment:
+        return QColor(0x65, 0x99, 0x00);
+
+    case InactiveDefault:
+    case InactiveUUID:
+    case InactiveCommentLineDoc:
+    case InactiveKeywordSet2:
+    case InactiveCommentDocKeyword:
+    case InactiveCommentDocKeywordError:
+    case InactivePreProcessorCommentLineDoc:
+        return QColor(0xc0, 0xc0, 0xc0);
+
+    case InactiveComment:
+    case InactiveCommentLine:
+    case InactiveNumber:
+    case InactiveVerbatimString:
+    case InactiveTripleQuotedVerbatimString:
+    case InactiveHashQuotedString:
+        return QColor(0x90, 0xb0, 0x90);
+
+    case InactiveCommentDoc:
+        return QColor(0xd0, 0xd0, 0xd0);
+
+    case InactiveKeyword:
+        return QColor(0x90, 0x90, 0xb0);
+
+    case InactiveDoubleQuotedString:
+    case InactiveSingleQuotedString:
+    case InactiveRawString:
+        return QColor(0xb0, 0x90, 0xb0);
+
+    case InactivePreProcessor:
+        return QColor(0xb0, 0xb0, 0x90);
+
+    case InactiveOperator:
+    case InactiveIdentifier:
+    case InactiveGlobalClass:
+        return QColor(0xb0, 0xb0, 0xb0);
+
+    case InactiveUnclosedString:
+        return QColor(0x00, 0x00, 0x00);
+
+    case InactiveRegex:
+        return QColor(0x7f, 0xaf, 0x7f);
+
+    case InactivePreProcessorComment:
+        return QColor(0xa0, 0xc0, 0x90);
+
+    case UserLiteral:
+        return QColor(0xc0, 0x60, 0x00);
+
+    case InactiveUserLiteral:
+        return QColor(0xd7, 0xa0, 0x90);
+
+    case TaskMarker:
+        return QColor(0xbe, 0x07, 0xff);
+
+    case InactiveTaskMarker:
+        return QColor(0xc3, 0xa1, 0xcf);
+    }
+
+    return QsciLexer::defaultColor(style);
+}
+
+
+// Returns the end-of-line fill for a style.
+bool QsciLexerCPP::defaultEolFill(int style) const
+{
+    switch (style)
+    {
+    case UnclosedString:
+    case InactiveUnclosedString:
+    case VerbatimString:
+    case InactiveVerbatimString:
+    case Regex:
+    case InactiveRegex:
+    case TripleQuotedVerbatimString:
+    case InactiveTripleQuotedVerbatimString:
+    case HashQuotedString:
+    case InactiveHashQuotedString:
+        return true;
+    }
+
+    return QsciLexer::defaultEolFill(style);
+}
+
+
+// Returns the font of the text for a style.
+QFont QsciLexerCPP::defaultFont(int style) const
+{
+    QFont f;
+
+    switch (style)
+    {
+    case Comment:
+    case InactiveComment:
+    case CommentLine:
+    case InactiveCommentLine:
+    case CommentDoc:
+    case InactiveCommentDoc:
+    case CommentLineDoc:
+    case InactiveCommentLineDoc:
+    case CommentDocKeyword:
+    case InactiveCommentDocKeyword:
+    case CommentDocKeywordError:
+    case InactiveCommentDocKeywordError:
+    case TaskMarker:
+    case InactiveTaskMarker:
+#if defined(Q_OS_WIN)
+        f = QFont("Comic Sans MS",9);
+#elif defined(Q_OS_MAC)
+        f = QFont("Comic Sans MS", 12);
+#else
+        f = QFont("Bitstream Vera Serif",9);
+#endif
+        break;
+
+    case Keyword:
+    case InactiveKeyword:
+    case Operator:
+    case InactiveOperator:
+        f = QsciLexer::defaultFont(style);
+        f.setBold(true);
+        break;
+
+    case DoubleQuotedString:
+    case InactiveDoubleQuotedString:
+    case SingleQuotedString:
+    case InactiveSingleQuotedString:
+    case UnclosedString:
+    case InactiveUnclosedString:
+    case VerbatimString:
+    case InactiveVerbatimString:
+    case Regex:
+    case InactiveRegex:
+    case TripleQuotedVerbatimString:
+    case InactiveTripleQuotedVerbatimString:
+    case HashQuotedString:
+    case InactiveHashQuotedString:
+#if defined(Q_OS_WIN)
+        f = QFont("Courier New",10);
+#elif defined(Q_OS_MAC)
+        f = QFont("Courier", 12);
+#else
+        f = QFont("Bitstream Vera Sans Mono",9);
+#endif
+        break;
+
+    default:
+        f = QsciLexer::defaultFont(style);
+    }
+
+    return f;
+}
+
+
+// Returns the set of keywords.
+const char *QsciLexerCPP::keywords(int set) const
+{
+    if (set == 1)
+        return
+            "and and_eq asm auto bitand bitor bool break case "
+            "catch char class compl const const_cast continue "
+            "default delete do double dynamic_cast else enum "
+            "explicit export extern false float for friend goto if "
+            "inline int long mutable namespace new not not_eq "
+            "operator or or_eq private protected public register "
+            "reinterpret_cast return short signed sizeof static "
+            "static_cast struct switch template this throw true "
+            "try typedef typeid typename union unsigned using "
+            "virtual void volatile wchar_t while xor xor_eq";
+
+    if (set == 3)
+        return
+            "a addindex addtogroup anchor arg attention author b "
+            "brief bug c class code date def defgroup deprecated "
+            "dontinclude e em endcode endhtmlonly endif "
+            "endlatexonly endlink endverbatim enum example "
+            "exception f$ f[ f] file fn hideinitializer "
+            "htmlinclude htmlonly if image include ingroup "
+            "internal invariant interface latexonly li line link "
+            "mainpage name namespace nosubgrouping note overload "
+            "p page par param post pre ref relates remarks return "
+            "retval sa section see showinitializer since skip "
+            "skipline struct subsection test throw todo typedef "
+            "union until var verbatim verbinclude version warning "
+            "weakgroup $ @ \\ & < > # { }";
+
+    return 0;
+}
+
+
+// Returns the user name of a style.
+QString QsciLexerCPP::description(int style) const
+{
+    switch (style)
+    {
+    case Default:
+        return tr("Default");
+
+    case InactiveDefault:
+        return tr("Inactive default");
+
+    case Comment:
+        return tr("C comment");
+
+    case InactiveComment:
+        return tr("Inactive C comment");
+
+    case CommentLine:
+        return tr("C++ comment");
+
+    case InactiveCommentLine:
+        return tr("Inactive C++ comment");
+
+    case CommentDoc:
+        return tr("JavaDoc style C comment");
+
+    case InactiveCommentDoc:
+        return tr("Inactive JavaDoc style C comment");
+
+    case Number:
+        return tr("Number");
+
+    case InactiveNumber:
+        return tr("Inactive number");
+
+    case Keyword:
+        return tr("Keyword");
+
+    case InactiveKeyword:
+        return tr("Inactive keyword");
+
+    case DoubleQuotedString:
+        return tr("Double-quoted string");
+
+    case InactiveDoubleQuotedString:
+        return tr("Inactive double-quoted string");
+
+    case SingleQuotedString:
+        return tr("Single-quoted string");
+
+    case InactiveSingleQuotedString:
+        return tr("Inactive single-quoted string");
+
+    case UUID:
+        return tr("IDL UUID");
+
+    case InactiveUUID:
+        return tr("Inactive IDL UUID");
+
+    case PreProcessor:
+        return tr("Pre-processor block");
+
+    case InactivePreProcessor:
+        return tr("Inactive pre-processor block");
+
+    case Operator:
+        return tr("Operator");
+
+    case InactiveOperator:
+        return tr("Inactive operator");
+
+    case Identifier:
+        return tr("Identifier");
+
+    case InactiveIdentifier:
+        return tr("Inactive identifier");
+
+    case UnclosedString:
+        return tr("Unclosed string");
+
+    case InactiveUnclosedString:
+        return tr("Inactive unclosed string");
+
+    case VerbatimString:
+        return tr("C# verbatim string");
+
+    case InactiveVerbatimString:
+        return tr("Inactive C# verbatim string");
+
+    case Regex:
+        return tr("JavaScript regular expression");
+
+    case InactiveRegex:
+        return tr("Inactive JavaScript regular expression");
+
+    case CommentLineDoc:
+        return tr("JavaDoc style C++ comment");
+
+    case InactiveCommentLineDoc:
+        return tr("Inactive JavaDoc style C++ comment");
+
+    case KeywordSet2:
+        return tr("Secondary keywords and identifiers");
+
+    case InactiveKeywordSet2:
+        return tr("Inactive secondary keywords and identifiers");
+
+    case CommentDocKeyword:
+        return tr("JavaDoc keyword");
+
+    case InactiveCommentDocKeyword:
+        return tr("Inactive JavaDoc keyword");
+
+    case CommentDocKeywordError:
+        return tr("JavaDoc keyword error");
+
+    case InactiveCommentDocKeywordError:
+        return tr("Inactive JavaDoc keyword error");
+
+    case GlobalClass:
+        return tr("Global classes and typedefs");
+
+    case InactiveGlobalClass:
+        return tr("Inactive global classes and typedefs");
+
+    case RawString:
+        return tr("C++ raw string");
+
+    case InactiveRawString:
+        return tr("Inactive C++ raw string");
+
+    case TripleQuotedVerbatimString:
+        return tr("Vala triple-quoted verbatim string");
+
+    case InactiveTripleQuotedVerbatimString:
+        return tr("Inactive Vala triple-quoted verbatim string");
+
+    case HashQuotedString:
+        return tr("Pike hash-quoted string");
+
+    case InactiveHashQuotedString:
+        return tr("Inactive Pike hash-quoted string");
+
+    case PreProcessorComment:
+        return tr("Pre-processor C comment");
+
+    case InactivePreProcessorComment:
+        return tr("Inactive pre-processor C comment");
+
+    case PreProcessorCommentLineDoc:
+        return tr("JavaDoc style pre-processor comment");
+
+    case InactivePreProcessorCommentLineDoc:
+        return tr("Inactive JavaDoc style pre-processor comment");
+
+    case UserLiteral:
+        return tr("User-defined literal");
+
+    case InactiveUserLiteral:
+        return tr("Inactive user-defined literal");
+
+    case TaskMarker:
+        return tr("Task marker");
+
+    case InactiveTaskMarker:
+        return tr("Inactive task marker");
+
+    case EscapeSequence:
+        return tr("Escape sequence");
+
+    case InactiveEscapeSequence:
+        return tr("Inactive escape sequence");
+    }
+
+    return QString();
+}
+
+
+// Returns the background colour of the text for a style.
+QColor QsciLexerCPP::defaultPaper(int style) const
+{
+    switch (style)
+    {
+    case UnclosedString:
+    case InactiveUnclosedString:
+        return QColor(0xe0,0xc0,0xe0);
+
+    case VerbatimString:
+    case InactiveVerbatimString:
+    case TripleQuotedVerbatimString:
+    case InactiveTripleQuotedVerbatimString:
+        return QColor(0xe0,0xff,0xe0);
+
+    case Regex:
+    case InactiveRegex:
+        return QColor(0xe0,0xf0,0xe0);
+
+    case RawString:
+    case InactiveRawString:
+        return QColor(0xff,0xf3,0xff);
+
+    case HashQuotedString:
+    case InactiveHashQuotedString:
+        return QColor(0xe7,0xff,0xd7);
+    }
+
+    return QsciLexer::defaultPaper(style);
+}
+
+
+// Refresh all properties.
+void QsciLexerCPP::refreshProperties()
+{
+    setAtElseProp();
+    setCommentProp();
+    setCompactProp();
+    setPreprocProp();
+    setStylePreprocProp();
+    setDollarsProp();
+    setHighlightTripleProp();
+    setHighlightHashProp();
+    setHighlightBackProp();
+    setHighlightEscapeProp();
+    setVerbatimStringEscapeProp();
+}
+
+
+// Read properties from the settings.
+bool QsciLexerCPP::readProperties(QSettings &qs,const QString &prefix)
+{
+    fold_atelse = qs.value(prefix + "foldatelse", false).toBool();
+    fold_comments = qs.value(prefix + "foldcomments", false).toBool();
+    fold_compact = qs.value(prefix + "foldcompact", true).toBool();
+    fold_preproc = qs.value(prefix + "foldpreprocessor", true).toBool();
+    style_preproc = qs.value(prefix + "stylepreprocessor", false).toBool();
+    dollars = qs.value(prefix + "dollars", true).toBool();
+    highlight_triple = qs.value(prefix + "highlighttriple", false).toBool();
+    highlight_hash = qs.value(prefix + "highlighthash", false).toBool();
+    highlight_back = qs.value(prefix + "highlightback", false).toBool();
+    highlight_escape = qs.value(prefix + "highlightescape", false).toBool();
+    vs_escape = qs.value(prefix + "verbatimstringescape", false).toBool();
+
+    return true;
+}
+
+
+// Write properties to the settings.
+bool QsciLexerCPP::writeProperties(QSettings &qs,const QString &prefix) const
+{
+    qs.setValue(prefix + "foldatelse", fold_atelse);
+    qs.setValue(prefix + "foldcomments", fold_comments);
+    qs.setValue(prefix + "foldcompact", fold_compact);
+    qs.setValue(prefix + "foldpreprocessor", fold_preproc);
+    qs.setValue(prefix + "stylepreprocessor", style_preproc);
+    qs.setValue(prefix + "dollars", dollars);
+    qs.setValue(prefix + "highlighttriple", highlight_triple);
+    qs.setValue(prefix + "highlighthash", highlight_hash);
+    qs.setValue(prefix + "highlightback", highlight_back);
+    qs.setValue(prefix + "highlightescape", highlight_escape);
+    qs.setValue(prefix + "verbatimstringescape", vs_escape);
+
+    return true;
+}
+
+
+// Set if else can be folded.
+void QsciLexerCPP::setFoldAtElse(bool fold)
+{
+    fold_atelse = fold;
+
+    setAtElseProp();
+}
+
+
+// Set the "fold.at.else" property.
+void QsciLexerCPP::setAtElseProp()
+{
+    emit propertyChanged("fold.at.else",(fold_atelse ? "1" : "0"));
+}
+
+
+// Set if comments can be folded.
+void QsciLexerCPP::setFoldComments(bool fold)
+{
+    fold_comments = fold;
+
+    setCommentProp();
+}
+
+
+// Set the "fold.comment" property.
+void QsciLexerCPP::setCommentProp()
+{
+    emit propertyChanged("fold.comment",(fold_comments ? "1" : "0"));
+}
+
+
+// Set if folds are compact
+void QsciLexerCPP::setFoldCompact(bool fold)
+{
+    fold_compact = fold;
+
+    setCompactProp();
+}
+
+
+// Set the "fold.compact" property.
+void QsciLexerCPP::setCompactProp()
+{
+    emit propertyChanged("fold.compact",(fold_compact ? "1" : "0"));
+}
+
+
+// Set if preprocessor blocks can be folded.
+void QsciLexerCPP::setFoldPreprocessor(bool fold)
+{
+    fold_preproc = fold;
+
+    setPreprocProp();
+}
+
+
+// Set the "fold.preprocessor" property.
+void QsciLexerCPP::setPreprocProp()
+{
+    emit propertyChanged("fold.preprocessor",(fold_preproc ? "1" : "0"));
+}
+
+
+// Set if preprocessor lines are styled.
+void QsciLexerCPP::setStylePreprocessor(bool style)
+{
+    style_preproc = style;
+
+    setStylePreprocProp();
+}
+
+
+// Set the "styling.within.preprocessor" property.
+void QsciLexerCPP::setStylePreprocProp()
+{
+    emit propertyChanged("styling.within.preprocessor",(style_preproc ? "1" : "0"));
+}
+
+
+// Set if '$' characters are allowed.
+void QsciLexerCPP::setDollarsAllowed(bool allowed)
+{
+    dollars = allowed;
+
+    setDollarsProp();
+}
+
+
+// Set the "lexer.cpp.allow.dollars" property.
+void QsciLexerCPP::setDollarsProp()
+{
+    emit propertyChanged("lexer.cpp.allow.dollars",(dollars ? "1" : "0"));
+}
+
+
+// Set if triple quoted strings are highlighted.
+void QsciLexerCPP::setHighlightTripleQuotedStrings(bool enabled)
+{
+    highlight_triple = enabled;
+
+    setHighlightTripleProp();
+}
+
+
+// Set the "lexer.cpp.triplequoted.strings" property.
+void QsciLexerCPP::setHighlightTripleProp()
+{
+    emit propertyChanged("lexer.cpp.triplequoted.strings",
+            (highlight_triple ? "1" : "0"));
+}
+
+
+// Set if hash quoted strings are highlighted.
+void QsciLexerCPP::setHighlightHashQuotedStrings(bool enabled)
+{
+    highlight_hash = enabled;
+
+    setHighlightHashProp();
+}
+
+
+// Set the "lexer.cpp.hashquoted.strings" property.
+void QsciLexerCPP::setHighlightHashProp()
+{
+    emit propertyChanged("lexer.cpp.hashquoted.strings",
+            (highlight_hash ? "1" : "0"));
+}
+
+
+// Set if back-quoted strings are highlighted.
+void QsciLexerCPP::setHighlightBackQuotedStrings(bool enabled)
+{
+    highlight_back = enabled;
+
+    setHighlightBackProp();
+}
+
+
+// Set the "lexer.cpp.backquoted.strings" property.
+void QsciLexerCPP::setHighlightBackProp()
+{
+    emit propertyChanged("lexer.cpp.backquoted.strings",
+            (highlight_back ? "1" : "0"));
+}
+
+
+// Set if escape sequences in strings are highlighted.
+void QsciLexerCPP::setHighlightEscapeSequences(bool enabled)
+{
+    highlight_escape = enabled;
+
+    setHighlightEscapeProp();
+}
+
+
+// Set the "lexer.cpp.escape.sequence" property.
+void QsciLexerCPP::setHighlightEscapeProp()
+{
+    emit propertyChanged("lexer.cpp.escape.sequence",
+            (highlight_escape ? "1" : "0"));
+}
+
+
+// Set if escape sequences in verbatim strings are allowed.
+void QsciLexerCPP::setVerbatimStringEscapeSequencesAllowed(bool allowed)
+{
+    vs_escape = allowed;
+
+    setVerbatimStringEscapeProp();
+}
+
+
+// Set the "lexer.cpp.verbatim.strings.allow.escapes" property.
+void QsciLexerCPP::setVerbatimStringEscapeProp()
+{
+    emit propertyChanged("lexer.cpp.verbatim.strings.allow.escapes",
+            (vs_escape ? "1" : "0"));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/qscilexerdiff.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,143 @@
+// This module implements the QsciLexerDiff class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include "Qsci/qscilexerdiff.h"
+
+#include <qcolor.h>
+#include <qfont.h>
+#include <qsettings.h>
+
+
+// The ctor.
+QsciLexerDiff::QsciLexerDiff(QObject *parent)
+    : QsciLexer(parent)
+{
+}
+
+
+// The dtor.
+QsciLexerDiff::~QsciLexerDiff()
+{
+}
+
+
+// Returns the language name.
+const char *QsciLexerDiff::language() const
+{
+    return "Diff";
+}
+
+
+// Returns the lexer name.
+const char *QsciLexerDiff::lexer() const
+{
+    return "diff";
+}
+
+
+// Return the string of characters that comprise a word.
+const char *QsciLexerDiff::wordCharacters() const
+{
+    return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-";
+}
+
+
+// Returns the foreground colour of the text for a style.
+QColor QsciLexerDiff::defaultColor(int style) const
+{
+    switch (style)
+    {
+    case Default:
+        return QColor(0x00,0x00,0x00);
+
+    case Comment:
+        return QColor(0x00,0x7f,0x00);
+
+    case Command:
+        return QColor(0x7f,0x7f,0x00);
+
+    case Header:
+        return QColor(0x7f,0x00,0x00);
+
+    case Position:
+        return QColor(0x7f,0x00,0x7f);
+
+    case LineRemoved:
+    case AddingPatchRemoved:
+    case RemovingPatchRemoved:
+        return QColor(0x00,0x7f,0x7f);
+
+    case LineAdded:
+    case AddingPatchAdded:
+    case RemovingPatchAdded:
+        return QColor(0x00,0x00,0x7f);
+
+    case LineChanged:
+        return QColor(0x7f,0x7f,0x7f);
+    }
+
+    return QsciLexer::defaultColor(style);
+}
+
+
+// Returns the user name of a style.
+QString QsciLexerDiff::description(int style) const
+{
+    switch (style)
+    {
+    case Default:
+        return tr("Default");
+
+    case Comment:
+        return tr("Comment");
+
+    case Command:
+        return tr("Command");
+
+    case Header:
+        return tr("Header");
+
+    case Position:
+        return tr("Position");
+
+    case LineRemoved:
+        return tr("Removed line");
+
+    case LineAdded:
+        return tr("Added line");
+
+    case LineChanged:
+        return tr("Changed line");
+
+    case AddingPatchAdded:
+        return tr("Added adding patch");
+
+    case RemovingPatchAdded:
+        return tr("Removed adding patch");
+
+    case AddingPatchRemoved:
+        return tr("Added removing patch");
+
+    case RemovingPatchRemoved:
+        return tr("Removed removing patch");
+    }
+
+    return QString();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/qscilexermatlab.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,161 @@
+// This module implements the QsciLexerMatlab class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include "Qsci/qscilexermatlab.h"
+
+#include <qcolor.h>
+#include <qfont.h>
+
+
+// The ctor.
+QsciLexerMatlab::QsciLexerMatlab(QObject *parent)
+    : QsciLexer(parent)
+{
+}
+
+
+// The dtor.
+QsciLexerMatlab::~QsciLexerMatlab()
+{
+}
+
+
+// Returns the language name.
+const char *QsciLexerMatlab::language() const
+{
+    return "Matlab";
+}
+
+
+// Returns the lexer name.
+const char *QsciLexerMatlab::lexer() const
+{
+    return "matlab";
+}
+
+
+// Returns the foreground colour of the text for a style.
+QColor QsciLexerMatlab::defaultColor(int style) const
+{
+    switch (style)
+    {
+    case Default:
+    case Operator:
+        return QColor(0x00,0x00,0x00);
+
+    case Comment:
+        return QColor(0x00,0x7f,0x00);
+
+    case Command:
+        return QColor(0x7f,0x7f,0x00);
+
+    case Number:
+        return QColor(0x00,0x7f,0x7f);
+
+    case Keyword:
+        return QColor(0x00,0x00,0x7f);
+
+    case SingleQuotedString:
+    case DoubleQuotedString:
+        return QColor(0x7f,0x00,0x7f);
+    }
+
+    return QsciLexer::defaultColor(style);
+}
+
+
+// Returns the font of the text for a style.
+QFont QsciLexerMatlab::defaultFont(int style) const
+{
+    QFont f;
+
+    switch (style)
+    {
+    case Comment:
+#if defined(Q_OS_WIN)
+        f = QFont("Comic Sans MS",9);
+#elif defined(Q_OS_MAC)
+        f = QFont("Comic Sans MS", 12);
+#else
+        f = QFont("Bitstream Vera Serif",9);
+#endif
+        break;
+
+    case Keyword:
+    case Operator:
+        f = QsciLexer::defaultFont(style);
+        f.setBold(true);
+        break;
+
+    default:
+        f = QsciLexer::defaultFont(style);
+    }
+
+    return f;
+}
+
+
+// Returns the set of keywords.
+const char *QsciLexerMatlab::keywords(int set) const
+{
+    if (set == 1)
+        return
+            "break case catch continue else elseif end for function "
+            "global if otherwise persistent return switch try while";
+
+    return 0;
+}
+
+
+// Returns the user name of a style.
+QString QsciLexerMatlab::description(int style) const
+{
+    switch (style)
+    {
+    case Default:
+        return tr("Default");
+
+    case Comment:
+        return tr("Comment");
+
+    case Command:
+        return tr("Command");
+
+    case Number:
+        return tr("Number");
+
+    case Keyword:
+        return tr("Keyword");
+
+    case SingleQuotedString:
+        return tr("Single-quoted string");
+
+    case Operator:
+        return tr("Operator");
+
+    case Identifier:
+        return tr("Identifier");
+
+    case DoubleQuotedString:
+        return tr("Double-quoted string");
+    }
+
+    return QString();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/qscilexeroctave.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,68 @@
+// This module implements the QsciLexerOctave class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include "Qsci/qscilexeroctave.h"
+
+#include <qcolor.h>
+#include <qfont.h>
+
+
+// The ctor.
+QsciLexerOctave::QsciLexerOctave(QObject *parent)
+    : QsciLexerMatlab(parent)
+{
+}
+
+
+// The dtor.
+QsciLexerOctave::~QsciLexerOctave()
+{
+}
+
+
+// Returns the language name.
+const char *QsciLexerOctave::language() const
+{
+    return "Octave";
+}
+
+
+// Returns the lexer name.
+const char *QsciLexerOctave::lexer() const
+{
+    return "octave";
+}
+
+
+// Returns the set of keywords.
+const char *QsciLexerOctave::keywords(int set) const
+{
+    if (set == 1)
+        return
+            "__FILE__ __LINE__ break case catch classdef continue do else "
+            "elseif end end_try_catch end_unwind_protect endclassdef "
+            "endenumeration endevents endfor endfunction endif endmethods "
+            "endparfor endproperties endswitch endwhile enumeration events "
+            "for function get global if methods otherwise parfor persistent "
+            "properties return set static switch try until unwind_protect "
+            "unwind_protect_cleanup while";
+
+    return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/qscilexerperl.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,658 @@
+// This module implements the QsciLexerPerl class.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include "Qsci/qscilexerperl.h"
+
+#include <qcolor.h>
+#include <qfont.h>
+#include <qsettings.h>
+
+
+// The ctor.
+QsciLexerPerl::QsciLexerPerl(QObject *parent)
+    : QsciLexer(parent),
+      fold_atelse(false), fold_comments(false), fold_compact(true),
+      fold_packages(true), fold_pod_blocks(true)
+{
+}
+
+
+// The dtor.
+QsciLexerPerl::~QsciLexerPerl()
+{
+}
+
+
+// Returns the language name.
+const char *QsciLexerPerl::language() const
+{
+    return "Perl";
+}
+
+
+// Returns the lexer name.
+const char *QsciLexerPerl::lexer() const
+{
+    return "perl";
+}
+
+
+// Return the set of character sequences that can separate auto-completion
+// words.
+QStringList QsciLexerPerl::autoCompletionWordSeparators() const
+{
+    QStringList wl;
+
+    wl << "::" << "->";
+
+    return wl;
+}
+
+
+// Return the list of characters that can start a block.
+const char *QsciLexerPerl::blockStart(int *style) const
+{
+    if (style)
+        *style = Operator;
+
+    return "{";
+}
+
+
+// Return the list of characters that can end a block.
+const char *QsciLexerPerl::blockEnd(int *style) const
+{
+    if (style)
+        *style = Operator;
+
+    return "}";
+}
+
+
+// Return the style used for braces.
+int QsciLexerPerl::braceStyle() const
+{
+    return Operator;
+}
+
+
+// Return the string of characters that comprise a word.
+const char *QsciLexerPerl::wordCharacters() const
+{
+    return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$@%&";
+}
+
+
+// Returns the foreground colour of the text for a style.
+QColor QsciLexerPerl::defaultColor(int style) const
+{
+    switch (style)
+    {
+    case Default:
+        return QColor(0x80,0x80,0x80);
+
+    case Error:
+    case Backticks:
+    case QuotedStringQX:
+        return QColor(0xff,0xff,0x00);
+
+    case Comment:
+        return QColor(0x00,0x7f,0x00);
+
+    case POD:
+    case PODVerbatim:
+        return QColor(0x00,0x40,0x00);
+
+    case Number:
+        return QColor(0x00,0x7f,0x7f);
+
+    case Keyword:
+        return QColor(0x00,0x00,0x7f);
+
+    case DoubleQuotedString:
+    case SingleQuotedString:
+    case SingleQuotedHereDocument:
+    case DoubleQuotedHereDocument:
+    case BacktickHereDocument:
+    case QuotedStringQ:
+    case QuotedStringQQ:
+        return QColor(0x7f,0x00,0x7f);
+
+    case Operator:
+    case Identifier:
+    case Scalar:
+    case Array:
+    case Hash:
+    case SymbolTable:
+    case Regex:
+    case Substitution:
+    case HereDocumentDelimiter:
+    case QuotedStringQR:
+    case QuotedStringQW:
+    case SubroutinePrototype:
+    case Translation:
+        return QColor(0x00,0x00,0x00);
+
+    case DataSection:
+        return QColor(0x60,0x00,0x00);
+
+    case FormatIdentifier:
+    case FormatBody:
+        return QColor(0xc0,0x00,0xc0);
+
+    case DoubleQuotedStringVar:
+    case RegexVar:
+    case SubstitutionVar:
+    case BackticksVar:
+    case DoubleQuotedHereDocumentVar:
+    case BacktickHereDocumentVar:
+    case QuotedStringQQVar:
+    case QuotedStringQXVar:
+    case QuotedStringQRVar:
+        return QColor(0xd0, 0x00, 0x00);
+    }
+
+    return QsciLexer::defaultColor(style);
+}
+
+
+// Returns the end-of-line fill for a style.
+bool QsciLexerPerl::defaultEolFill(int style) const
+{
+    switch (style)
+    {
+    case POD:
+    case DataSection:
+    case SingleQuotedHereDocument:
+    case DoubleQuotedHereDocument:
+    case BacktickHereDocument:
+    case PODVerbatim:
+    case FormatBody:
+    case DoubleQuotedHereDocumentVar:
+    case BacktickHereDocumentVar:
+        return true;
+    }
+
+    return QsciLexer::defaultEolFill(style);
+}
+
+
+// Returns the font of the text for a style.
+QFont QsciLexerPerl::defaultFont(int style) const
+{
+    QFont f;
+
+    switch (style)
+    {
+    case Comment:
+#if defined(Q_OS_WIN)
+        f = QFont("Comic Sans MS",9);
+#elif defined(Q_OS_MAC)
+        f = QFont("Comic Sans MS", 12);
+#else
+        f = QFont("Bitstream Vera Serif",9);
+#endif
+        break;
+
+    case POD:
+#if defined(Q_OS_WIN)
+        f = QFont("Times New Roman",11);
+#elif defined(Q_OS_MAC)
+        f = QFont("Times New Roman", 12);
+#else
+        f = QFont("Bitstream Charter",10);
+#endif
+        break;
+
+    case Keyword:
+    case Operator:
+    case DoubleQuotedHereDocument:
+    case FormatIdentifier:
+    case RegexVar:
+    case SubstitutionVar:
+    case BackticksVar:
+    case DoubleQuotedHereDocumentVar:
+    case BacktickHereDocumentVar:
+    case QuotedStringQXVar:
+    case QuotedStringQRVar:
+        f = QsciLexer::defaultFont(style);
+        f.setBold(true);
+        break;
+
+    case DoubleQuotedString:
+    case SingleQuotedString:
+    case QuotedStringQQ:
+    case PODVerbatim:
+#if defined(Q_OS_WIN)
+        f = QFont("Courier New",10);
+#elif defined(Q_OS_MAC)
+        f = QFont("Courier", 12);
+#else
+        f = QFont("Bitstream Vera Sans Mono",9);
+#endif
+        break;
+
+    case BacktickHereDocument:
+    case SubroutinePrototype:
+        f = QsciLexer::defaultFont(style);
+        f.setItalic(true);
+        break;
+
+    case DoubleQuotedStringVar:
+    case QuotedStringQQVar:
+#if defined(Q_OS_WIN)
+        f = QFont("Courier New",10);
+#elif defined(Q_OS_MAC)
+        f = QFont("Courier", 12);
+#else
+        f = QFont("Bitstream Vera Sans Mono",9);
+#endif
+        f.setBold(true);
+        break;
+
+    default:
+        f = QsciLexer::defaultFont(style);
+    }
+
+    return f;
+}
+
+
+// Returns the set of keywords.
+const char *QsciLexerPerl::keywords(int set) const
+{
+    if (set == 1)
+        return
+            "NULL __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ "
+            "AUTOLOAD BEGIN CORE DESTROY END EQ GE GT INIT LE LT "
+            "NE CHECK abs accept alarm and atan2 bind binmode "
+            "bless caller chdir chmod chomp chop chown chr chroot "
+            "close closedir cmp connect continue cos crypt "
+            "dbmclose dbmopen defined delete die do dump each "
+            "else elsif endgrent endhostent endnetent endprotoent "
+            "endpwent endservent eof eq eval exec exists exit exp "
+            "fcntl fileno flock for foreach fork format formline "
+            "ge getc getgrent getgrgid getgrnam gethostbyaddr "
+            "gethostbyname gethostent getlogin getnetbyaddr "
+            "getnetbyname getnetent getpeername getpgrp getppid "
+            "getpriority getprotobyname getprotobynumber "
+            "getprotoent getpwent getpwnam getpwuid getservbyname "
+            "getservbyport getservent getsockname getsockopt glob "
+            "gmtime goto grep gt hex if index int ioctl join keys "
+            "kill last lc lcfirst le length link listen local "
+            "localtime lock log lstat lt m map mkdir msgctl "
+            "msgget msgrcv msgsnd my ne next no not oct open "
+            "opendir or ord our pack package pipe pop pos print "
+            "printf prototype push q qq qr quotemeta qu qw qx "
+            "rand read readdir readline readlink readpipe recv "
+            "redo ref rename require reset return reverse "
+            "rewinddir rindex rmdir s scalar seek seekdir select "
+            "semctl semget semop send setgrent sethostent "
+            "setnetent setpgrp setpriority setprotoent setpwent "
+            "setservent setsockopt shift shmctl shmget shmread "
+            "shmwrite shutdown sin sleep socket socketpair sort "
+            "splice split sprintf sqrt srand stat study sub "
+            "substr symlink syscall sysopen sysread sysseek "
+            "system syswrite tell telldir tie tied time times tr "
+            "truncate uc ucfirst umask undef unless unlink unpack "
+            "unshift untie until use utime values vec wait "
+            "waitpid wantarray warn while write x xor y";
+
+    return 0;
+}
+
+
+// Returns the user name of a style.
+QString QsciLexerPerl::description(int style) const
+{
+    switch (style)
+    {
+    case Default:
+        return tr("Default");
+
+    case Error:
+        return tr("Error");
+
+    case Comment:
+        return tr("Comment");
+
+    case POD:
+        return tr("POD");
+
+    case Number:
+        return tr("Number");
+
+    case Keyword:
+        return tr("Keyword");
+
+    case DoubleQuotedString:
+        return tr("Double-quoted string");
+
+    case SingleQuotedString:
+        return tr("Single-quoted string");
+
+    case Operator:
+        return tr("Operator");
+
+    case Identifier:
+        return tr("Identifier");
+
+    case Scalar:
+        return tr("Scalar");
+
+    case Array:
+        return tr("Array");
+
+    case Hash:
+        return tr("Hash");
+
+    case SymbolTable:
+        return tr("Symbol table");
+
+    case Regex:
+        return tr("Regular expression");
+
+    case Substitution:
+        return tr("Substitution");
+
+    case Backticks:
+        return tr("Backticks");
+
+    case DataSection:
+        return tr("Data section");
+
+    case HereDocumentDelimiter:
+        return tr("Here document delimiter");
+
+    case SingleQuotedHereDocument:
+        return tr("Single-quoted here document");
+
+    case DoubleQuotedHereDocument:
+        return tr("Double-quoted here document");
+
+    case BacktickHereDocument:
+        return tr("Backtick here document");
+
+    case QuotedStringQ:
+        return tr("Quoted string (q)");
+
+    case QuotedStringQQ:
+        return tr("Quoted string (qq)");
+
+    case QuotedStringQX:
+        return tr("Quoted string (qx)");
+
+    case QuotedStringQR:
+        return tr("Quoted string (qr)");
+
+    case QuotedStringQW:
+        return tr("Quoted string (qw)");
+
+    case PODVerbatim:
+        return tr("POD verbatim");
+
+    case SubroutinePrototype:
+        return tr("Subroutine prototype");
+
+    case FormatIdentifier:
+        return tr("Format identifier");
+
+    case FormatBody:
+        return tr("Format body");
+
+    case DoubleQuotedStringVar:
+        return tr("Double-quoted string (interpolated variable)");
+
+    case Translation:
+        return tr("Translation");
+
+    case RegexVar:
+        return tr("Regular expression (interpolated variable)");
+
+    case SubstitutionVar:
+        return tr("Substitution (interpolated variable)");
+
+    case BackticksVar:
+        return tr("Backticks (interpolated variable)");
+
+    case DoubleQuotedHereDocumentVar:
+        return tr("Double-quoted here document (interpolated variable)");
+
+    case BacktickHereDocumentVar:
+        return tr("Backtick here document (interpolated variable)");
+
+    case QuotedStringQQVar:
+        return tr("Quoted string (qq, interpolated variable)");
+
+    case QuotedStringQXVar:
+        return tr("Quoted string (qx, interpolated variable)");
+
+    case QuotedStringQRVar:
+        return tr("Quoted string (qr, interpolated variable)");
+    }
+
+    return QString();
+}
+
+
+// Returns the background colour of the text for a style.
+QColor QsciLexerPerl::defaultPaper(int style) const
+{
+    switch (style)
+    {
+    case Error:
+        return QColor(0xff,0x00,0x00);
+
+    case POD:
+        return QColor(0xe0,0xff,0xe0);
+
+    case Scalar:
+        return QColor(0xff,0xe0,0xe0);
+
+    case Array:
+        return QColor(0xff,0xff,0xe0);
+
+    case Hash:
+        return QColor(0xff,0xe0,0xff);
+
+    case SymbolTable:
+        return QColor(0xe0,0xe0,0xe0);
+
+    case Regex:
+        return QColor(0xa0,0xff,0xa0);
+
+    case Substitution:
+    case Translation:
+        return QColor(0xf0,0xe0,0x80);
+
+    case Backticks:
+    case BackticksVar:
+    case QuotedStringQXVar:
+        return QColor(0xa0,0x80,0x80);
+
+    case DataSection:
+        return QColor(0xff,0xf0,0xd8);
+
+    case HereDocumentDelimiter:
+    case SingleQuotedHereDocument:
+    case DoubleQuotedHereDocument:
+    case BacktickHereDocument:
+    case DoubleQuotedHereDocumentVar:
+    case BacktickHereDocumentVar:
+        return QColor(0xdd,0xd0,0xdd);
+
+    case PODVerbatim:
+        return QColor(0xc0,0xff,0xc0);
+
+    case FormatBody:
+        return QColor(0xff,0xf0,0xff);
+    }
+
+    return QsciLexer::defaultPaper(style);
+}
+
+
+// Refresh all properties.
+void QsciLexerPerl::refreshProperties()
+{
+    setAtElseProp();
+    setCommentProp();
+    setCompactProp();
+    setPackagesProp();
+    setPODBlocksProp();
+}
+
+
+// Read properties from the settings.
+bool QsciLexerPerl::readProperties(QSettings &qs,const QString &prefix)
+{
+    int rc = true;
+
+    fold_atelse = qs.value(prefix + "foldatelse", false).toBool();
+    fold_comments = qs.value(prefix + "foldcomments", false).toBool();
+    fold_compact = qs.value(prefix + "foldcompact", true).toBool();
+    fold_packages = qs.value(prefix + "foldpackages", true).toBool();
+    fold_pod_blocks = qs.value(prefix + "foldpodblocks", true).toBool();
+
+    return rc;
+}
+
+
+// Write properties to the settings.
+bool QsciLexerPerl::writeProperties(QSettings &qs,const QString &prefix) const
+{
+    int rc = true;
+
+    qs.setValue(prefix + "foldatelse", fold_atelse);
+    qs.setValue(prefix + "foldcomments", fold_comments);
+    qs.setValue(prefix + "foldcompact", fold_compact);
+    qs.setValue(prefix + "foldpackages", fold_packages);
+    qs.setValue(prefix + "foldpodblocks", fold_pod_blocks);
+
+    return rc;
+}
+
+
+// Return true if comments can be folded.
+bool QsciLexerPerl::foldComments() const
+{
+    return fold_comments;
+}
+
+
+// Set if comments can be folded.
+void QsciLexerPerl::setFoldComments(bool fold)
+{
+    fold_comments = fold;
+
+    setCommentProp();
+}
+
+
+// Set the "fold.comment" property.
+void QsciLexerPerl::setCommentProp()
+{
+    emit propertyChanged("fold.comment",(fold_comments ? "1" : "0"));
+}
+
+
+// Return true if folds are compact.
+bool QsciLexerPerl::foldCompact() const
+{
+    return fold_compact;
+}
+
+
+// Set if folds are compact
+void QsciLexerPerl::setFoldCompact(bool fold)
+{
+    fold_compact = fold;
+
+    setCompactProp();
+}
+
+
+// Set the "fold.compact" property.
+void QsciLexerPerl::setCompactProp()
+{
+    emit propertyChanged("fold.compact",(fold_compact ? "1" : "0"));
+}
+
+
+// Return true if packages can be folded.
+bool QsciLexerPerl::foldPackages() const
+{
+    return fold_packages;
+}
+
+
+// Set if packages can be folded.
+void QsciLexerPerl::setFoldPackages(bool fold)
+{
+    fold_packages = fold;
+
+    setPackagesProp();
+}
+
+
+// Set the "fold.perl.package" property.
+void QsciLexerPerl::setPackagesProp()
+{
+    emit propertyChanged("fold.perl.package",(fold_packages ? "1" : "0"));
+}
+
+
+// Return true if POD blocks can be folded.
+bool QsciLexerPerl::foldPODBlocks() const
+{
+    return fold_pod_blocks;
+}
+
+
+// Set if POD blocks can be folded.
+void QsciLexerPerl::setFoldPODBlocks(bool fold)
+{
+    fold_pod_blocks = fold;
+
+    setPODBlocksProp();
+}
+
+
+// Set the "fold.perl.pod" property.
+void QsciLexerPerl::setPODBlocksProp()
+{
+    emit propertyChanged("fold.perl.pod",(fold_pod_blocks ? "1" : "0"));
+}
+
+
+// Set if else can be folded.
+void QsciLexerPerl::setFoldAtElse(bool fold)
+{
+    fold_atelse = fold;
+
+    setAtElseProp();
+}
+
+
+// Set the "fold.perl.at.else" property.
+void QsciLexerPerl::setAtElseProp()
+{
+    emit propertyChanged("fold.perl.at.else",(fold_atelse ? "1" : "0"));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/qsciscintilla.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,4566 @@
+// This module implements the "official" high-level API of the Qt port of
+// Scintilla.  It is modelled on QTextEdit - a method of the same name should
+// behave in the same way.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include "Qsci/qsciscintilla.h"
+
+#include <string.h>
+
+#include <QAction>
+#include <QApplication>
+#include <QColor>
+#include <QEvent>
+#include <QImage>
+#include <QIODevice>
+#include <QKeyEvent>
+#include <QKeySequence>
+#include <QMenu>
+#include <QPoint>
+
+#include "Qsci/qsciabstractapis.h"
+#include "Qsci/qscicommandset.h"
+#include "Qsci/qscilexer.h"
+#include "Qsci/qscistyle.h"
+#include "Qsci/qscistyledtext.h"
+
+
+// Make sure these match the values in Scintilla.h.  We don't #include that
+// file because it just causes more clashes.
+#define KEYWORDSET_MAX  8
+#define MARKER_MAX      31
+
+// The list separators for auto-completion and user lists.
+const char acSeparator = '\x03';
+const char userSeparator = '\x04';
+
+// The default fold margin width.
+static const int defaultFoldMarginWidth = 14;
+
+// The default set of characters that make up a word.
+static const char *defaultWordChars = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+
+// Forward declarations.
+static QColor asQColor(long sci_colour);
+
+
+// The ctor.
+QsciScintilla::QsciScintilla(QWidget *parent)
+    : QsciScintillaBase(parent),
+      allocatedMarkers(0), allocatedIndicators(7), oldPos(-1), selText(false),
+      fold(NoFoldStyle), foldmargin(2), autoInd(false),
+      braceMode(NoBraceMatch), acSource(AcsNone), acThresh(-1),
+      wchars(defaultWordChars), call_tips_position(CallTipsBelowText),
+      call_tips_style(CallTipsNoContext), maxCallTips(-1),
+      use_single(AcusNever), explicit_fillups(""), fillups_enabled(false)
+{
+    connect(this,SIGNAL(SCN_MODIFYATTEMPTRO()),
+             SIGNAL(modificationAttempted()));
+
+    connect(this,SIGNAL(SCN_MODIFIED(int,int,const char *,int,int,int,int,int,int,int)),
+             SLOT(handleModified(int,int,const char *,int,int,int,int,int,int,int)));
+    connect(this,SIGNAL(SCN_CALLTIPCLICK(int)),
+             SLOT(handleCallTipClick(int)));
+    connect(this,SIGNAL(SCN_CHARADDED(int)),
+             SLOT(handleCharAdded(int)));
+    connect(this,SIGNAL(SCN_INDICATORCLICK(int,int)),
+             SLOT(handleIndicatorClick(int,int)));
+    connect(this,SIGNAL(SCN_INDICATORRELEASE(int,int)),
+             SLOT(handleIndicatorRelease(int,int)));
+    connect(this,SIGNAL(SCN_MARGINCLICK(int,int,int)),
+             SLOT(handleMarginClick(int,int,int)));
+    connect(this,SIGNAL(SCN_MARGINRIGHTCLICK(int,int,int)),
+             SLOT(handleMarginRightClick(int,int,int)));
+    connect(this,SIGNAL(SCN_SAVEPOINTREACHED()),
+             SLOT(handleSavePointReached()));
+    connect(this,SIGNAL(SCN_SAVEPOINTLEFT()),
+             SLOT(handleSavePointLeft()));
+    connect(this,SIGNAL(SCN_UPDATEUI(int)),
+             SLOT(handleUpdateUI(int)));
+    connect(this,SIGNAL(QSCN_SELCHANGED(bool)),
+             SLOT(handleSelectionChanged(bool)));
+    connect(this,SIGNAL(SCN_AUTOCSELECTION(const char *,int)),
+             SLOT(handleAutoCompletionSelection()));
+    connect(this,SIGNAL(SCN_USERLISTSELECTION(const char *,int)),
+             SLOT(handleUserListSelection(const char *,int)));
+
+    // Set the default font.
+    setFont(QApplication::font());
+
+    // Set the default fore and background colours.
+    QPalette pal = QApplication::palette();
+    setColor(pal.text().color());
+    setPaper(pal.base().color());
+    setSelectionForegroundColor(pal.highlightedText().color());
+    setSelectionBackgroundColor(pal.highlight().color());
+
+#if defined(Q_OS_WIN)
+    setEolMode(EolWindows);
+#else
+    // Note that EolMac is pre-OS/X.
+    setEolMode(EolUnix);
+#endif
+
+    // Capturing the mouse seems to cause problems on multi-head systems. Qt
+    // should do the right thing anyway.
+    SendScintilla(SCI_SETMOUSEDOWNCAPTURES, 0UL);
+
+    setMatchedBraceForegroundColor(Qt::blue);
+    setUnmatchedBraceForegroundColor(Qt::red);
+
+    setAnnotationDisplay(AnnotationStandard);
+    setLexer();
+
+    // Set the visible policy.  These are the same as SciTE's defaults
+    // which, presumably, are sensible.
+    SendScintilla(SCI_SETVISIBLEPOLICY, VISIBLE_STRICT | VISIBLE_SLOP, 4);
+
+    // The default behaviour is unexpected.
+    SendScintilla(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR,
+            SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE);
+
+    // Create the standard command set.
+    stdCmds = new QsciCommandSet(this);
+
+    doc.display(this,0);
+}
+
+
+// The dtor.
+QsciScintilla::~QsciScintilla()
+{
+    // Detach any current lexer.
+    detachLexer();
+
+    doc.undisplay(this);
+    delete stdCmds;
+}
+
+
+// Return the current text colour.
+QColor QsciScintilla::color() const
+{
+    return nl_text_colour;
+}
+
+
+// Set the text colour.
+void QsciScintilla::setColor(const QColor &c)
+{
+    if (lex.isNull())
+    {
+        // Assume style 0 applies to everything so that we don't need to use
+        // SCI_STYLECLEARALL which clears everything.
+        SendScintilla(SCI_STYLESETFORE, 0, c);
+        nl_text_colour = c;
+    }
+}
+
+
+// Return the overwrite mode.
+bool QsciScintilla::overwriteMode() const
+{
+    return SendScintilla(SCI_GETOVERTYPE);
+}
+
+
+// Set the overwrite mode.
+void QsciScintilla::setOverwriteMode(bool overwrite)
+{
+    SendScintilla(SCI_SETOVERTYPE, overwrite);
+}
+
+
+// Return the current paper colour.
+QColor QsciScintilla::paper() const
+{
+    return nl_paper_colour;
+}
+
+
+// Set the paper colour.
+void QsciScintilla::setPaper(const QColor &c)
+{
+    if (lex.isNull())
+    {
+        // Assume style 0 applies to everything so that we don't need to use
+        // SCI_STYLECLEARALL which clears everything.  We still have to set the
+        // default style as well for the background without any text.
+        SendScintilla(SCI_STYLESETBACK, 0, c);
+        SendScintilla(SCI_STYLESETBACK, STYLE_DEFAULT, c);
+        nl_paper_colour = c;
+    }
+}
+
+
+// Set the default font.
+void QsciScintilla::setFont(const QFont &f)
+{
+    if (lex.isNull())
+    {
+        // Assume style 0 applies to everything so that we don't need to use
+        // SCI_STYLECLEARALL which clears everything.
+        setStylesFont(f, 0);
+        QWidget::setFont(f);
+    }
+}
+
+
+// Enable/disable auto-indent.
+void QsciScintilla::setAutoIndent(bool autoindent)
+{
+    autoInd = autoindent;
+}
+
+
+// Set the brace matching mode.
+void QsciScintilla::setBraceMatching(BraceMatch bm)
+{
+    braceMode = bm;
+}
+
+
+// Handle the addition of a character.
+void QsciScintilla::handleCharAdded(int ch)
+{
+    // Ignore if there is a selection.
+    long pos = SendScintilla(SCI_GETSELECTIONSTART);
+
+    if (pos != SendScintilla(SCI_GETSELECTIONEND) || pos == 0)
+        return;
+
+    // If auto-completion is already active then see if this character is a
+    // start character.  If it is then create a new list which will be a subset
+    // of the current one.  The case where it isn't a start character seems to
+    // be handled correctly elsewhere.
+    if (isListActive() && isStartChar(ch))
+    {
+        cancelList();
+        startAutoCompletion(acSource, false, use_single == AcusAlways);
+
+        return;
+    }
+
+    // Handle call tips.
+    if (call_tips_style != CallTipsNone && !lex.isNull() && strchr("(),", ch) != NULL)
+        callTip();
+
+    // Handle auto-indentation.
+    if (autoInd)
+    {
+        if (lex.isNull() || (lex->autoIndentStyle() & AiMaintain))
+            maintainIndentation(ch, pos);
+        else
+            autoIndentation(ch, pos);
+    }
+
+    // See if we might want to start auto-completion.
+    if (!isCallTipActive() && acSource != AcsNone)
+    {
+        if (isStartChar(ch))
+            startAutoCompletion(acSource, false, use_single == AcusAlways);
+        else if (acThresh >= 1 && isWordCharacter(ch))
+            startAutoCompletion(acSource, true, use_single == AcusAlways);
+    }
+}
+
+
+// See if a call tip is active.
+bool QsciScintilla::isCallTipActive() const
+{
+    return SendScintilla(SCI_CALLTIPACTIVE);
+}
+
+
+// Handle a possible change to any current call tip.
+void QsciScintilla::callTip()
+{
+    QsciAbstractAPIs *apis = lex->apis();
+
+    if (!apis)
+        return;
+
+    int pos, commas = 0;
+    bool found = false;
+    char ch;
+
+    pos = SendScintilla(SCI_GETCURRENTPOS);
+
+    // Move backwards through the line looking for the start of the current
+    // call tip and working out which argument it is.
+    while ((ch = getCharacter(pos)) != '\0')
+    {
+        if (ch == ',')
+            ++commas;
+        else if (ch == ')')
+        {
+            int depth = 1;
+
+            // Ignore everything back to the start of the corresponding
+            // parenthesis.
+            while ((ch = getCharacter(pos)) != '\0')
+            {
+                if (ch == ')')
+                    ++depth;
+                else if (ch == '(' && --depth == 0)
+                    break;
+            }
+        }
+        else if (ch == '(')
+        {
+            found = true;
+            break;
+        }
+    }
+
+    // Cancel any existing call tip.
+    SendScintilla(SCI_CALLTIPCANCEL);
+
+    // Done if there is no new call tip to set.
+    if (!found)
+        return;
+
+    QStringList context = apiContext(pos, pos, ctPos);
+
+    if (context.isEmpty())
+        return;
+
+    // The last word is complete, not partial.
+    context << QString();
+
+    ct_cursor = 0;
+    ct_shifts.clear();
+    ct_entries = apis->callTips(context, commas, call_tips_style, ct_shifts);
+
+    int nr_entries = ct_entries.count();
+
+    if (nr_entries == 0)
+        return;
+
+    if (maxCallTips > 0 && maxCallTips < nr_entries)
+    {
+        ct_entries = ct_entries.mid(0, maxCallTips);
+        nr_entries = maxCallTips;
+    }
+
+    int shift;
+    QString ct;
+
+    int nr_shifts = ct_shifts.count();
+
+    if (maxCallTips < 0 && nr_entries > 1)
+    {
+        shift = (nr_shifts > 0 ? ct_shifts.first() : 0);
+        ct = ct_entries[0];
+        ct.prepend('\002');
+    }
+    else
+    {
+        if (nr_shifts > nr_entries)
+            nr_shifts = nr_entries;
+
+        // Find the biggest shift.
+        shift = 0;
+
+        for (int i = 0; i < nr_shifts; ++i)
+        {
+            int sh = ct_shifts[i];
+
+            if (shift < sh)
+                shift = sh;
+        }
+
+        ct = ct_entries.join("\n");
+    }
+
+    ScintillaBytes ct_bytes = textAsBytes(ct);
+    const char *cts = ScintillaBytesConstData(ct_bytes);
+
+    SendScintilla(SCI_CALLTIPSHOW, adjustedCallTipPosition(shift), cts);
+
+    // Done if there is more than one call tip.
+    if (nr_entries > 1)
+        return;
+
+    // Highlight the current argument.
+    const char *astart;
+
+    if (commas == 0)
+        astart = strchr(cts, '(');
+    else
+        for (astart = strchr(cts, ','); astart && --commas > 0; astart = strchr(astart + 1, ','))
+            ;
+
+    if (!astart || !*++astart)
+        return;
+
+    // The end is at the next comma or unmatched closing parenthesis.
+    const char *aend;
+    int depth = 0;
+
+    for (aend = astart; *aend; ++aend)
+    {
+        char ch = *aend;
+
+        if (ch == ',' && depth == 0)
+            break;
+        else if (ch == '(')
+            ++depth;
+        else if (ch == ')')
+        {
+            if (depth == 0)
+                break;
+
+            --depth;
+        }
+    }
+
+    if (astart != aend)
+        SendScintilla(SCI_CALLTIPSETHLT, astart - cts, aend - cts);
+}
+
+
+// Handle a call tip click.
+void QsciScintilla::handleCallTipClick(int dir)
+{
+    int nr_entries = ct_entries.count();
+
+    // Move the cursor while bounds checking.
+    if (dir == 1)
+    {
+        if (ct_cursor - 1 < 0)
+            return;
+
+        --ct_cursor;
+    }
+    else if (dir == 2)
+    {
+        if (ct_cursor + 1 >= nr_entries)
+            return;
+
+        ++ct_cursor;
+    }
+    else
+        return;
+
+    int shift = (ct_shifts.count() > ct_cursor ? ct_shifts[ct_cursor] : 0);
+    QString ct = ct_entries[ct_cursor];
+
+    // Add the arrows.
+    if (ct_cursor < nr_entries - 1)
+        ct.prepend('\002');
+
+    if (ct_cursor > 0)
+        ct.prepend('\001');
+
+    SendScintilla(SCI_CALLTIPSHOW, adjustedCallTipPosition(shift), ct.toLatin1().data());
+}
+
+
+// Shift the position of the call tip (to take any context into account) but
+// don't go before the start of the line.
+int QsciScintilla::adjustedCallTipPosition(int ctshift) const
+{
+    int ct = ctPos;
+
+    if (ctshift)
+    {
+        int ctmin = SendScintilla(SCI_POSITIONFROMLINE, SendScintilla(SCI_LINEFROMPOSITION, ct));
+
+        if (ct - ctshift < ctmin)
+            ct = ctmin;
+    }
+
+    return ct;
+}
+
+
+// Return the list of words that make up the context preceding the given
+// position.  The list will only have more than one element if there is a lexer
+// set and it defines start strings.  If so, then the last element might be
+// empty if a start string has just been typed.  On return pos is at the start
+// of the context.
+QStringList QsciScintilla::apiContext(int pos, int &context_start,
+        int &last_word_start)
+{
+    enum {
+        Either,
+        Separator,
+        Word
+    };
+
+    QStringList words;
+    int good_pos = pos, expecting = Either;
+
+    last_word_start = -1;
+
+    while (pos > 0)
+    {
+        if (getSeparator(pos))
+        {
+            if (expecting == Either)
+                words.prepend(QString());
+            else if (expecting == Word)
+                break;
+
+            good_pos = pos;
+            expecting = Word;
+        }
+        else
+        {
+            QString word = getWord(pos);
+
+            if (word.isEmpty() || expecting == Separator)
+                break;
+
+            words.prepend(word);
+            good_pos = pos;
+            expecting = Separator;
+
+            // Return the position of the start of the last word if required.
+            if (last_word_start < 0)
+                last_word_start = pos;
+        }
+
+        // Strip any preceding spaces (mainly around operators).
+        char ch;
+
+        while ((ch = getCharacter(pos)) != '\0')
+        {
+            // This is the same definition of space that Scintilla uses.
+            if (ch != ' ' && (ch < 0x09 || ch > 0x0d))
+            {
+                ++pos;
+                break;
+            }
+        }
+    }
+
+    // A valid sequence always starts with a word and so should be expecting a
+    // separator.
+    if (expecting != Separator)
+        words.clear();
+
+    context_start = good_pos;
+
+    return words;
+}
+
+
+// Try and get a lexer's word separator from the text before the current
+// position.  Return true if one was found and adjust the position accordingly.
+bool QsciScintilla::getSeparator(int &pos) const
+{
+    int opos = pos;
+
+    // Go through each separator.
+    for (int i = 0; i < wseps.count(); ++i)
+    {
+        const QString &ws = wseps[i];
+
+        // Work backwards.
+        uint l;
+
+        for (l = ws.length(); l; --l)
+        {
+            char ch = getCharacter(pos);
+
+            if (ch == '\0' || ws.at(l - 1) != ch)
+                break;
+        }
+
+        if (!l)
+            return true;
+
+        // Reset for the next separator.
+        pos = opos;
+    }
+
+    return false;
+}
+
+
+// Try and get a word from the text before the current position.  Return the
+// word if one was found and adjust the position accordingly.
+QString QsciScintilla::getWord(int &pos) const
+{
+    QString word;
+    bool numeric = true;
+    char ch;
+
+    while ((ch = getCharacter(pos)) != '\0')
+    {
+        if (!isWordCharacter(ch))
+        {
+            ++pos;
+            break;
+        }
+
+        if (ch < '0' || ch > '9')
+            numeric = false;
+
+        word.prepend(ch);
+    }
+
+    // We don't auto-complete numbers.
+    if (numeric)
+        word.truncate(0);
+
+    return word;
+}
+
+
+// Get the "next" character (ie. the one before the current position) in the
+// current line.  The character will be '\0' if there are no more.
+char QsciScintilla::getCharacter(int &pos) const
+{
+    if (pos <= 0)
+        return '\0';
+
+    char ch = SendScintilla(SCI_GETCHARAT, --pos);
+
+    // Don't go past the end of the previous line.
+    if (ch == '\n' || ch == '\r')
+    {
+        ++pos;
+        return '\0';
+    }
+
+    return ch;
+}
+
+
+// See if a character is an auto-completion start character, ie. the last
+// character of a word separator.
+bool QsciScintilla::isStartChar(char ch) const
+{
+    QString s = QChar(ch);
+
+    for (int i = 0; i < wseps.count(); ++i)
+        if (wseps[i].endsWith(s))
+            return true;
+
+    return false;
+}
+
+
+// Possibly start auto-completion.
+void QsciScintilla::startAutoCompletion(AutoCompletionSource acs,
+        bool checkThresh, bool choose_single)
+{
+    int start, ignore;
+    QStringList context = apiContext(SendScintilla(SCI_GETCURRENTPOS), start,
+            ignore);
+
+    if (context.isEmpty())
+        return;
+
+    // Get the last word's raw data and length.
+    ScintillaBytes s = textAsBytes(context.last());
+    const char *last_data = ScintillaBytesConstData(s);
+    int last_len = s.length();
+
+    if (checkThresh && last_len < acThresh)
+        return;
+
+    // Generate the string representing the valid words to select from.
+    QStringList wlist;
+
+    if ((acs == AcsAll || acs == AcsAPIs) && !lex.isNull())
+    {
+        QsciAbstractAPIs *apis = lex->apis();
+
+        if (apis)
+            apis->updateAutoCompletionList(context, wlist);
+    }
+
+    if (acs == AcsAll || acs == AcsDocument)
+    {
+        int sflags = SCFIND_WORDSTART;
+
+        if (!SendScintilla(SCI_AUTOCGETIGNORECASE))
+            sflags |= SCFIND_MATCHCASE;
+
+        SendScintilla(SCI_SETSEARCHFLAGS, sflags);
+
+        int pos = 0;
+        int dlen = SendScintilla(SCI_GETLENGTH);
+        int caret = SendScintilla(SCI_GETCURRENTPOS);
+        int clen = caret - start;
+        char *orig_context = new char[clen + 1];
+
+        SendScintilla(SCI_GETTEXTRANGE, start, caret, orig_context);
+
+        for (;;)
+        {
+            int fstart;
+
+            SendScintilla(SCI_SETTARGETSTART, pos);
+            SendScintilla(SCI_SETTARGETEND, dlen);
+
+            if ((fstart = SendScintilla(SCI_SEARCHINTARGET, clen, orig_context)) < 0)
+                break;
+
+            // Move past the root part.
+            pos = fstart + clen;
+
+            // Skip if this is the context we are auto-completing.
+            if (pos == caret)
+                continue;
+
+            // Get the rest of this word.
+            QString w = last_data;
+
+            while (pos < dlen)
+            {
+                char ch = SendScintilla(SCI_GETCHARAT, pos);
+
+                if (!isWordCharacter(ch))
+                    break;
+
+                w += ch;
+                ++pos;
+            }
+
+            // Add the word if it isn't already there.
+            if (!w.isEmpty())
+            {
+                bool keep;
+
+                // If there are APIs then check if the word is already present
+                // as an API word (i.e. with a trailing space).
+                if (acs == AcsAll)
+                {
+                    QString api_w = w;
+                    api_w.append(' ');
+
+                    keep = !wlist.contains(api_w);
+                }
+                else
+                {
+                    keep = true;
+                }
+
+                if (keep && !wlist.contains(w))
+                    wlist.append(w);
+            }
+        }
+
+        delete []orig_context;
+    }
+
+    if (wlist.isEmpty())
+        return;
+
+    wlist.sort();
+
+    SendScintilla(SCI_AUTOCSETCHOOSESINGLE, choose_single);
+    SendScintilla(SCI_AUTOCSETSEPARATOR, acSeparator);
+
+    ScintillaBytes wlist_s = textAsBytes(wlist.join(QChar(acSeparator)));
+    SendScintilla(SCI_AUTOCSHOW, last_len, ScintillaBytesConstData(wlist_s));
+}
+
+
+// Maintain the indentation of the previous line.
+void QsciScintilla::maintainIndentation(char ch, long pos)
+{
+    if (ch != '\r' && ch != '\n')
+        return;
+
+    int curr_line = SendScintilla(SCI_LINEFROMPOSITION, pos);
+
+    // Get the indentation of the preceding non-zero length line.
+    int ind = 0;
+
+    for (int line = curr_line - 1; line >= 0; --line)
+    {
+        if (SendScintilla(SCI_GETLINEENDPOSITION, line) >
+            SendScintilla(SCI_POSITIONFROMLINE, line))
+        {
+            ind = indentation(line);
+            break;
+        }
+    }
+
+    if (ind > 0)
+        autoIndentLine(pos, curr_line, ind);
+}
+
+
+// Implement auto-indentation.
+void QsciScintilla::autoIndentation(char ch, long pos)
+{
+    int curr_line = SendScintilla(SCI_LINEFROMPOSITION, pos);
+    int ind_width = indentWidth();
+    long curr_line_start = SendScintilla(SCI_POSITIONFROMLINE, curr_line);
+
+    const char *block_start = lex->blockStart();
+    bool start_single = (block_start && qstrlen(block_start) == 1);
+
+    const char *block_end = lex->blockEnd();
+    bool end_single = (block_end && qstrlen(block_end) == 1);
+
+    if (end_single && block_end[0] == ch)
+    {
+        if (!(lex->autoIndentStyle() & AiClosing) && rangeIsWhitespace(curr_line_start, pos - 1))
+            autoIndentLine(pos, curr_line, blockIndent(curr_line - 1) - ind_width);
+    }
+    else if (start_single && block_start[0] == ch)
+    {
+        // De-indent if we have already indented because the previous line was
+        // a start of block keyword.
+        if (!(lex->autoIndentStyle() & AiOpening) && curr_line > 0 && getIndentState(curr_line - 1) == isKeywordStart && rangeIsWhitespace(curr_line_start, pos - 1))
+            autoIndentLine(pos, curr_line, blockIndent(curr_line - 1) - ind_width);
+    }
+    else if (ch == '\r' || ch == '\n')
+    {
+        // Don't auto-indent the line (ie. preserve its existing indentation)
+        // if we have inserted a new line above by pressing return at the start
+        // of this line - in other words, if the previous line is empty.
+        long prev_line_length = SendScintilla(SCI_GETLINEENDPOSITION, curr_line - 1) - SendScintilla(SCI_POSITIONFROMLINE, curr_line - 1);
+
+        if (prev_line_length != 0)
+            autoIndentLine(pos, curr_line, blockIndent(curr_line - 1));
+    }
+}
+
+
+// Set the indentation for a line.
+void QsciScintilla::autoIndentLine(long pos, int line, int indent)
+{
+    if (indent < 0)
+        return;
+
+    long pos_before = SendScintilla(SCI_GETLINEINDENTPOSITION, line);
+    SendScintilla(SCI_SETLINEINDENTATION, line, indent);
+    long pos_after = SendScintilla(SCI_GETLINEINDENTPOSITION, line);
+    long new_pos = -1;
+
+    if (pos_after > pos_before)
+    {
+        new_pos = pos + (pos_after - pos_before);
+    }
+    else if (pos_after < pos_before && pos >= pos_after)
+    {
+        if (pos >= pos_before)
+            new_pos = pos + (pos_after - pos_before);
+        else
+            new_pos = pos_after;
+    }
+
+    if (new_pos >= 0)
+        SendScintilla(SCI_SETSEL, new_pos, new_pos);
+}
+
+
+// Return the indentation of the block defined by the given line (or something
+// significant before).
+int QsciScintilla::blockIndent(int line)
+{
+    if (line < 0)
+        return 0;
+
+    // Handle the trvial case.
+    if (!lex->blockStartKeyword() && !lex->blockStart() && !lex->blockEnd())
+        return indentation(line);
+
+    int line_limit = line - lex->blockLookback();
+
+    if (line_limit < 0)
+        line_limit = 0;
+
+    for (int l = line; l >= line_limit; --l)
+    {
+        IndentState istate = getIndentState(l);
+
+        if (istate != isNone)
+        {
+            int ind_width = indentWidth();
+            int ind = indentation(l);
+
+            if (istate == isBlockStart)
+            {
+                if (!(lex -> autoIndentStyle() & AiOpening))
+                    ind += ind_width;
+            }
+            else if (istate == isBlockEnd)
+            {
+                if (lex -> autoIndentStyle() & AiClosing)
+                    ind -= ind_width;
+
+                if (ind < 0)
+                    ind = 0;
+            }
+            else if (line == l)
+                ind += ind_width;
+
+            return ind;
+        }
+    }
+
+    return indentation(line);
+}
+
+
+// Return true if all characters starting at spos up to, but not including
+// epos, are spaces or tabs.
+bool QsciScintilla::rangeIsWhitespace(long spos, long epos)
+{
+    while (spos < epos)
+    {
+        char ch = SendScintilla(SCI_GETCHARAT, spos);
+
+        if (ch != ' ' && ch != '\t')
+            return false;
+
+        ++spos;
+    }
+
+    return true;
+}
+
+
+// Returns the indentation state of a line.
+QsciScintilla::IndentState QsciScintilla::getIndentState(int line)
+{
+    IndentState istate;
+
+    // Get the styled text.
+    long spos = SendScintilla(SCI_POSITIONFROMLINE, line);
+    long epos = SendScintilla(SCI_POSITIONFROMLINE, line + 1);
+
+    char *text = new char[(epos - spos + 1) * 2];
+
+    SendScintilla(SCI_GETSTYLEDTEXT, spos, epos, text);
+
+    int style, bstart_off, bend_off;
+
+    // Block start/end takes precedence over keywords.
+    const char *bstart_words = lex->blockStart(&style);
+    bstart_off = findStyledWord(text, style, bstart_words);
+
+    const char *bend_words = lex->blockEnd(&style);
+    bend_off = findStyledWord(text, style, bend_words);
+
+    // If there is a block start but no block end characters then ignore it
+    // unless the block start is the last significant thing on the line, ie.
+    // assume Python-like blocking.
+    if (bstart_off >= 0 && !bend_words)
+        for (int i = bstart_off * 2; text[i] != '\0'; i += 2)
+            if (!QChar(text[i]).isSpace())
+                return isNone;
+
+    if (bstart_off > bend_off)
+        istate = isBlockStart;
+    else if (bend_off > bstart_off)
+        istate = isBlockEnd;
+    else
+    {
+        const char *words = lex->blockStartKeyword(&style);
+
+        istate = (findStyledWord(text,style,words) >= 0) ? isKeywordStart : isNone;
+    }
+
+    delete[] text;
+
+    return istate;
+}
+
+
+// text is a pointer to some styled text (ie. a character byte followed by a
+// style byte).  style is a style number.  words is a space separated list of
+// words.  Returns the position in the text immediately after the last one of
+// the words with the style.  The reason we are after the last, and not the
+// first, occurance is that we are looking for words that start and end a block
+// where the latest one is the most significant.
+int QsciScintilla::findStyledWord(const char *text, int style,
+        const char *words)
+{
+    if (!words)
+        return -1;
+
+    // Find the range of text with the style we are looking for.
+    const char *stext;
+
+    for (stext = text; stext[1] != style; stext += 2)
+        if (stext[0] == '\0')
+            return -1;
+
+    // Move to the last character.
+    const char *etext = stext;
+
+    while (etext[2] != '\0')
+        etext += 2;
+
+    // Backtrack until we find the style.  There will be one.
+    while (etext[1] != style)
+        etext -= 2;
+
+    // Look for each word in turn.
+    while (words[0] != '\0')
+    {
+        // Find the end of the word.
+        const char *eword = words;
+
+        while (eword[1] != ' ' && eword[1] != '\0')
+            ++eword;
+
+        // Now search the text backwards.
+        const char *wp = eword;
+
+        for (const char *tp = etext; tp >= stext; tp -= 2)
+        {
+            if (tp[0] != wp[0] || tp[1] != style)
+            {
+                // Reset the search.
+                wp = eword;
+                continue;
+            }
+
+            // See if all the word has matched.
+            if (wp-- == words)
+                return ((tp - text) / 2) + (eword - words) + 1;
+        }
+
+        // Move to the start of the next word if there is one.
+        words = eword + 1;
+
+        if (words[0] == ' ')
+            ++words;
+    }
+
+    return -1;
+}
+
+
+// Return true if the code page is UTF8.
+bool QsciScintilla::isUtf8() const
+{
+    return (SendScintilla(SCI_GETCODEPAGE) == SC_CP_UTF8);
+}
+
+
+// Set the code page.
+void QsciScintilla::setUtf8(bool cp)
+{
+    SendScintilla(SCI_SETCODEPAGE, (cp ? SC_CP_UTF8 : 0));
+}
+
+
+// Return the end-of-line mode.
+QsciScintilla::EolMode QsciScintilla::eolMode() const
+{
+    return (EolMode)SendScintilla(SCI_GETEOLMODE);
+}
+
+
+// Set the end-of-line mode.
+void QsciScintilla::setEolMode(EolMode mode)
+{
+    SendScintilla(SCI_SETEOLMODE, mode);
+}
+
+
+// Convert the end-of-lines to a particular mode.
+void QsciScintilla::convertEols(EolMode mode)
+{
+    SendScintilla(SCI_CONVERTEOLS, mode);
+}
+
+
+// Add an edge column.
+void QsciScintilla::addEdgeColumn(int colnr, const QColor &col)
+{
+    SendScintilla(SCI_MULTIEDGEADDLINE, colnr, col);
+}
+
+
+// Clear all multi-edge columns.
+void QsciScintilla::clearEdgeColumns()
+{
+    SendScintilla(SCI_MULTIEDGECLEARALL);
+}
+
+
+// Return the edge colour.
+QColor QsciScintilla::edgeColor() const
+{
+    return asQColor(SendScintilla(SCI_GETEDGECOLOUR));
+}
+
+
+// Set the edge colour.
+void QsciScintilla::setEdgeColor(const QColor &col)
+{
+    SendScintilla(SCI_SETEDGECOLOUR, col);
+}
+
+
+// Return the edge column.
+int QsciScintilla::edgeColumn() const
+{
+    return SendScintilla(SCI_GETEDGECOLUMN);
+}
+
+
+// Set the edge column.
+void QsciScintilla::setEdgeColumn(int colnr)
+{
+    SendScintilla(SCI_SETEDGECOLUMN, colnr);
+}
+
+
+// Return the edge mode.
+QsciScintilla::EdgeMode QsciScintilla::edgeMode() const
+{
+    return (EdgeMode)SendScintilla(SCI_GETEDGEMODE);
+}
+
+
+// Set the edge mode.
+void QsciScintilla::setEdgeMode(EdgeMode mode)
+{
+    SendScintilla(SCI_SETEDGEMODE, mode);
+}
+
+
+// Return the end-of-line visibility.
+bool QsciScintilla::eolVisibility() const
+{
+    return SendScintilla(SCI_GETVIEWEOL);
+}
+
+
+// Set the end-of-line visibility.
+void QsciScintilla::setEolVisibility(bool visible)
+{
+    SendScintilla(SCI_SETVIEWEOL, visible);
+}
+
+
+// Return the extra ascent.
+int QsciScintilla::extraAscent() const
+{
+    return SendScintilla(SCI_GETEXTRAASCENT);
+}
+
+
+// Set the extra ascent.
+void QsciScintilla::setExtraAscent(int extra)
+{
+    SendScintilla(SCI_SETEXTRAASCENT, extra);
+}
+
+
+// Return the extra descent.
+int QsciScintilla::extraDescent() const
+{
+    return SendScintilla(SCI_GETEXTRADESCENT);
+}
+
+
+// Set the extra descent.
+void QsciScintilla::setExtraDescent(int extra)
+{
+    SendScintilla(SCI_SETEXTRADESCENT, extra);
+}
+
+
+// Return the whitespace size.
+int QsciScintilla::whitespaceSize() const
+{
+    return SendScintilla(SCI_GETWHITESPACESIZE);
+}
+
+
+// Set the whitespace size.
+void QsciScintilla::setWhitespaceSize(int size)
+{
+    SendScintilla(SCI_SETWHITESPACESIZE, size);
+}
+
+
+// Set the whitespace background colour.
+void QsciScintilla::setWhitespaceBackgroundColor(const QColor &col)
+{
+    SendScintilla(SCI_SETWHITESPACEBACK, col.isValid(), col);
+}
+
+
+// Set the whitespace foreground colour.
+void QsciScintilla::setWhitespaceForegroundColor(const QColor &col)
+{
+    SendScintilla(SCI_SETWHITESPACEFORE, col.isValid(), col);
+}
+
+
+// Return the whitespace visibility.
+QsciScintilla::WhitespaceVisibility QsciScintilla::whitespaceVisibility() const
+{
+    return (WhitespaceVisibility)SendScintilla(SCI_GETVIEWWS);
+}
+
+
+// Set the whitespace visibility.
+void QsciScintilla::setWhitespaceVisibility(WhitespaceVisibility mode)
+{
+    SendScintilla(SCI_SETVIEWWS, mode);
+}
+
+
+// Return the tab draw mode.
+QsciScintilla::TabDrawMode QsciScintilla::tabDrawMode() const
+{
+    return (TabDrawMode)SendScintilla(SCI_GETTABDRAWMODE);
+}
+
+
+// Set the tab draw mode.
+void QsciScintilla::setTabDrawMode(TabDrawMode mode)
+{
+    SendScintilla(SCI_SETTABDRAWMODE, mode);
+}
+
+
+// Return the line wrap mode.
+QsciScintilla::WrapMode QsciScintilla::wrapMode() const
+{
+    return (WrapMode)SendScintilla(SCI_GETWRAPMODE);
+}
+
+
+// Set the line wrap mode.
+void QsciScintilla::setWrapMode(WrapMode mode)
+{
+    SendScintilla(SCI_SETLAYOUTCACHE,
+            (mode == WrapNone ? SC_CACHE_CARET : SC_CACHE_DOCUMENT));
+    SendScintilla(SCI_SETWRAPMODE, mode);
+}
+
+
+// Return the line wrap indent mode.
+QsciScintilla::WrapIndentMode QsciScintilla::wrapIndentMode() const
+{
+    return (WrapIndentMode)SendScintilla(SCI_GETWRAPINDENTMODE);
+}
+
+
+// Set the line wrap indent mode.
+void QsciScintilla::setWrapIndentMode(WrapIndentMode mode)
+{
+    SendScintilla(SCI_SETWRAPINDENTMODE, mode);
+}
+
+
+// Set the line wrap visual flags.
+void QsciScintilla::setWrapVisualFlags(WrapVisualFlag endFlag,
+        WrapVisualFlag startFlag, int indent)
+{
+    int flags = SC_WRAPVISUALFLAG_NONE;
+    int loc = SC_WRAPVISUALFLAGLOC_DEFAULT;
+
+    switch (endFlag)
+    {
+    case WrapFlagNone:
+        break;
+
+    case WrapFlagByText:
+        flags |= SC_WRAPVISUALFLAG_END;
+        loc |= SC_WRAPVISUALFLAGLOC_END_BY_TEXT;
+        break;
+
+    case WrapFlagByBorder:
+        flags |= SC_WRAPVISUALFLAG_END;
+        break;
+
+    case WrapFlagInMargin:
+        flags |= SC_WRAPVISUALFLAG_MARGIN;
+        break;
+    }
+
+    switch (startFlag)
+    {
+    case WrapFlagNone:
+        break;
+
+    case WrapFlagByText:
+        flags |= SC_WRAPVISUALFLAG_START;
+        loc |= SC_WRAPVISUALFLAGLOC_START_BY_TEXT;
+        break;
+
+    case WrapFlagByBorder:
+        flags |= SC_WRAPVISUALFLAG_START;
+        break;
+
+    case WrapFlagInMargin:
+        flags |= SC_WRAPVISUALFLAG_MARGIN;
+        break;
+    }
+
+    SendScintilla(SCI_SETWRAPVISUALFLAGS, flags);
+    SendScintilla(SCI_SETWRAPVISUALFLAGSLOCATION, loc);
+    SendScintilla(SCI_SETWRAPSTARTINDENT, indent);
+}
+
+
+// Set the folding style.
+void QsciScintilla::setFolding(FoldStyle folding, int margin)
+{
+    fold = folding;
+    foldmargin = margin;
+
+    if (folding == NoFoldStyle)
+    {
+        SendScintilla(SCI_SETMARGINWIDTHN, margin, 0L);
+        return;
+    }
+
+    int mask = SendScintilla(SCI_GETMODEVENTMASK);
+    SendScintilla(SCI_SETMODEVENTMASK, mask | SC_MOD_CHANGEFOLD);
+
+    SendScintilla(SCI_SETFOLDFLAGS, SC_FOLDFLAG_LINEAFTER_CONTRACTED);
+
+    SendScintilla(SCI_SETMARGINTYPEN, margin, (long)SC_MARGIN_SYMBOL);
+    SendScintilla(SCI_SETMARGINMASKN, margin, SC_MASK_FOLDERS);
+    SendScintilla(SCI_SETMARGINSENSITIVEN, margin, 1);
+
+    // Set the marker symbols to use.
+    switch (folding)
+    {
+    case NoFoldStyle:
+        break;
+
+    case PlainFoldStyle:
+        setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_MINUS);
+        setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_PLUS);
+        setFoldMarker(SC_MARKNUM_FOLDERSUB);
+        setFoldMarker(SC_MARKNUM_FOLDERTAIL);
+        setFoldMarker(SC_MARKNUM_FOLDEREND);
+        setFoldMarker(SC_MARKNUM_FOLDEROPENMID);
+        setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL);
+        break;
+
+    case CircledFoldStyle:
+        setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_CIRCLEMINUS);
+        setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_CIRCLEPLUS);
+        setFoldMarker(SC_MARKNUM_FOLDERSUB);
+        setFoldMarker(SC_MARKNUM_FOLDERTAIL);
+        setFoldMarker(SC_MARKNUM_FOLDEREND);
+        setFoldMarker(SC_MARKNUM_FOLDEROPENMID);
+        setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL);
+        break;
+
+    case BoxedFoldStyle:
+        setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_BOXMINUS);
+        setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_BOXPLUS);
+        setFoldMarker(SC_MARKNUM_FOLDERSUB);
+        setFoldMarker(SC_MARKNUM_FOLDERTAIL);
+        setFoldMarker(SC_MARKNUM_FOLDEREND);
+        setFoldMarker(SC_MARKNUM_FOLDEROPENMID);
+        setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL);
+        break;
+
+    case CircledTreeFoldStyle:
+        setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_CIRCLEMINUS);
+        setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_CIRCLEPLUS);
+        setFoldMarker(SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE);
+        setFoldMarker(SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNERCURVE);
+        setFoldMarker(SC_MARKNUM_FOLDEREND, SC_MARK_CIRCLEPLUSCONNECTED);
+        setFoldMarker(SC_MARKNUM_FOLDEROPENMID, SC_MARK_CIRCLEMINUSCONNECTED);
+        setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNERCURVE);
+        break;
+
+    case BoxedTreeFoldStyle:
+        setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_BOXMINUS);
+        setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_BOXPLUS);
+        setFoldMarker(SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE);
+        setFoldMarker(SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNER);
+        setFoldMarker(SC_MARKNUM_FOLDEREND, SC_MARK_BOXPLUSCONNECTED);
+        setFoldMarker(SC_MARKNUM_FOLDEROPENMID, SC_MARK_BOXMINUSCONNECTED);
+        setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNER);
+        break;
+    }
+
+    SendScintilla(SCI_SETMARGINWIDTHN, margin, defaultFoldMarginWidth);
+}
+
+
+// Clear all current folds.
+void QsciScintilla::clearFolds()
+{
+    recolor();
+
+    int maxLine = SendScintilla(SCI_GETLINECOUNT);
+
+    for (int line = 0; line < maxLine; line++)
+    {
+        int level = SendScintilla(SCI_GETFOLDLEVEL, line);
+
+        if (level & SC_FOLDLEVELHEADERFLAG)
+        {
+            SendScintilla(SCI_SETFOLDEXPANDED, line, 1);
+            foldExpand(line, true, false, 0, level);
+            line--;
+        }
+    }
+}
+
+
+// Set up a folder marker.
+void QsciScintilla::setFoldMarker(int marknr, int mark)
+{
+    SendScintilla(SCI_MARKERDEFINE, marknr, mark);
+
+    if (mark != SC_MARK_EMPTY)
+    {
+        SendScintilla(SCI_MARKERSETFORE, marknr, QColor(Qt::white));
+        SendScintilla(SCI_MARKERSETBACK, marknr, QColor(Qt::black));
+    }
+}
+
+
+// Handle a click in the fold margin.  This is mostly taken from SciTE.
+void QsciScintilla::foldClick(int lineClick, int bstate)
+{
+    bool shift = bstate & Qt::ShiftModifier;
+    bool ctrl = bstate & Qt::ControlModifier;
+
+    if (shift && ctrl)
+    {
+        foldAll();
+        return;
+    }
+
+    int levelClick = SendScintilla(SCI_GETFOLDLEVEL, lineClick);
+
+    if (levelClick & SC_FOLDLEVELHEADERFLAG)
+    {
+        if (shift)
+        {
+            // Ensure all children are visible.
+            SendScintilla(SCI_SETFOLDEXPANDED, lineClick, 1);
+            foldExpand(lineClick, true, true, 100, levelClick);
+        }
+        else if (ctrl)
+        {
+            if (SendScintilla(SCI_GETFOLDEXPANDED, lineClick))
+            {
+                // Contract this line and all its children.
+                SendScintilla(SCI_SETFOLDEXPANDED, lineClick, 0L);
+                foldExpand(lineClick, false, true, 0, levelClick);
+            }
+            else
+            {
+                // Expand this line and all its children.
+                SendScintilla(SCI_SETFOLDEXPANDED, lineClick, 1);
+                foldExpand(lineClick, true, true, 100, levelClick);
+            }
+        }
+        else
+        {
+            // Toggle this line.
+            SendScintilla(SCI_TOGGLEFOLD, lineClick);
+        }
+    }
+}
+
+
+// Do the hard work of hiding and showing lines.  This is mostly taken from
+// SciTE.
+void QsciScintilla::foldExpand(int &line, bool doExpand, bool force,
+        int visLevels, int level)
+{
+    int lineMaxSubord = SendScintilla(SCI_GETLASTCHILD, line,
+            level & SC_FOLDLEVELNUMBERMASK);
+
+    line++;
+
+    while (line <= lineMaxSubord)
+    {
+        if (force)
+        {
+            if (visLevels > 0)
+                SendScintilla(SCI_SHOWLINES, line, line);
+            else
+                SendScintilla(SCI_HIDELINES, line, line);
+        }
+        else if (doExpand)
+            SendScintilla(SCI_SHOWLINES, line, line);
+
+        int levelLine = level;
+
+        if (levelLine == -1)
+            levelLine = SendScintilla(SCI_GETFOLDLEVEL, line);
+
+        if (levelLine & SC_FOLDLEVELHEADERFLAG)
+        {
+            if (force)
+            {
+                if (visLevels > 1)
+                    SendScintilla(SCI_SETFOLDEXPANDED, line, 1);
+                else
+                    SendScintilla(SCI_SETFOLDEXPANDED, line, 0L);
+
+                foldExpand(line, doExpand, force, visLevels - 1);
+            }
+            else if (doExpand)
+            {
+                if (!SendScintilla(SCI_GETFOLDEXPANDED, line))
+                    SendScintilla(SCI_SETFOLDEXPANDED, line, 1);
+
+                foldExpand(line, true, force, visLevels - 1);
+            }
+            else
+                foldExpand(line, false, force, visLevels - 1);
+        }
+        else
+            line++;
+    }
+}
+
+
+// Fully expand (if there is any line currently folded) all text.  Otherwise,
+// fold all text.  This is mostly taken from SciTE.
+void QsciScintilla::foldAll(bool children)
+{
+    recolor();
+
+    int maxLine = SendScintilla(SCI_GETLINECOUNT);
+    bool expanding = true;
+
+    for (int lineSeek = 0; lineSeek < maxLine; lineSeek++)
+    {
+        if (SendScintilla(SCI_GETFOLDLEVEL,lineSeek) & SC_FOLDLEVELHEADERFLAG)
+        {
+            expanding = !SendScintilla(SCI_GETFOLDEXPANDED, lineSeek);
+            break;
+        }
+    }
+
+    for (int line = 0; line < maxLine; line++)
+    {
+        int level = SendScintilla(SCI_GETFOLDLEVEL, line);
+
+        if (!(level & SC_FOLDLEVELHEADERFLAG))
+            continue;
+
+        if (children ||
+            (SC_FOLDLEVELBASE == (level & SC_FOLDLEVELNUMBERMASK)))
+        {
+            if (expanding)
+            {
+                SendScintilla(SCI_SETFOLDEXPANDED, line, 1);
+                foldExpand(line, true, false, 0, level);
+                line--;
+            }
+            else
+            {
+                int lineMaxSubord = SendScintilla(SCI_GETLASTCHILD, line, -1);
+
+                SendScintilla(SCI_SETFOLDEXPANDED, line, 0L);
+
+                if (lineMaxSubord > line)
+                    SendScintilla(SCI_HIDELINES, line + 1, lineMaxSubord);
+            }
+        }
+    }
+}
+
+
+// Handle a fold change.  This is mostly taken from SciTE.
+void QsciScintilla::foldChanged(int line,int levelNow,int levelPrev)
+{
+    if (levelNow & SC_FOLDLEVELHEADERFLAG)
+    {
+        if (!(levelPrev & SC_FOLDLEVELHEADERFLAG))
+            SendScintilla(SCI_SETFOLDEXPANDED, line, 1);
+    }
+    else if (levelPrev & SC_FOLDLEVELHEADERFLAG)
+    {
+        if (!SendScintilla(SCI_GETFOLDEXPANDED, line))
+        {
+            // Removing the fold from one that has been contracted so should
+            // expand.  Otherwise lines are left invisible with no way to make
+            // them visible.
+            foldExpand(line, true, false, 0, levelPrev);
+        }
+    }
+}
+
+
+// Toggle the fold for a line if it contains a fold marker.
+void QsciScintilla::foldLine(int line)
+{
+    SendScintilla(SCI_TOGGLEFOLD, line);
+}
+
+
+// Return the list of folded lines.
+QList<int> QsciScintilla::contractedFolds() const
+{
+    QList<int> folds;
+    int linenr = 0, fold_line;
+
+    while ((fold_line = SendScintilla(SCI_CONTRACTEDFOLDNEXT, linenr)) >= 0)
+    {
+        folds.append(fold_line);
+        linenr = fold_line + 1;
+    }
+
+    return folds;
+}
+
+
+// Set the fold state from a list.
+void QsciScintilla::setContractedFolds(const QList<int> &folds)
+{
+    for (int i = 0; i < folds.count(); ++i)
+    {
+        int line = folds[i];
+        int last_line = SendScintilla(SCI_GETLASTCHILD, line, -1);
+
+        SendScintilla(SCI_SETFOLDEXPANDED, line, 0L);
+        SendScintilla(SCI_HIDELINES, line + 1, last_line);
+    }
+}
+
+
+// Handle the SCN_MODIFIED notification.
+void QsciScintilla::handleModified(int pos, int mtype, const char *text,
+        int len, int added, int line, int foldNow, int foldPrev, int token,
+        int annotationLinesAdded)
+{
+    Q_UNUSED(pos);
+    Q_UNUSED(text);
+    Q_UNUSED(len);
+    Q_UNUSED(token);
+    Q_UNUSED(annotationLinesAdded);
+
+    if (mtype & SC_MOD_CHANGEFOLD)
+    {
+        if (fold)
+            foldChanged(line, foldNow, foldPrev);
+    }
+
+    if (mtype & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT))
+    {
+        emit textChanged();
+
+        if (added != 0)
+            emit linesChanged();
+    }
+}
+
+
+// Zoom in a number of points.
+void QsciScintilla::zoomIn(int range)
+{
+    zoomTo(SendScintilla(SCI_GETZOOM) + range);
+}
+
+
+// Zoom in a single point.
+void QsciScintilla::zoomIn()
+{
+    SendScintilla(SCI_ZOOMIN);
+}
+
+
+// Zoom out a number of points.
+void QsciScintilla::zoomOut(int range)
+{
+    zoomTo(SendScintilla(SCI_GETZOOM) - range);
+}
+
+
+// Zoom out a single point.
+void QsciScintilla::zoomOut()
+{
+    SendScintilla(SCI_ZOOMOUT);
+}
+
+
+// Set the zoom to a number of points.
+void QsciScintilla::zoomTo(int size)
+{
+    if (size < -10)
+        size = -10;
+    else if (size > 20)
+        size = 20;
+
+    SendScintilla(SCI_SETZOOM, size);
+}
+
+
+// Find the first occurrence of a string.
+bool QsciScintilla::findFirst(const QString &expr, bool re, bool cs, bool wo,
+        bool wrap, bool forward, int line, int index, bool show, bool posix,
+        bool cxx11)
+{
+    if (expr.isEmpty())
+    {
+        findState.status = FindState::Idle;
+        return false;
+    }
+
+    findState.status = FindState::Finding;
+    findState.expr = expr;
+    findState.wrap = wrap;
+    findState.forward = forward;
+
+    findState.flags =
+        (cs ? SCFIND_MATCHCASE : 0) |
+        (wo ? SCFIND_WHOLEWORD : 0) |
+        (re ? SCFIND_REGEXP : 0) |
+        (posix ? SCFIND_POSIX : 0) |
+        (cxx11 ? SCFIND_CXX11REGEX : 0);
+
+    if (line < 0 || index < 0)
+        findState.startpos = SendScintilla(SCI_GETCURRENTPOS);
+    else
+        findState.startpos = positionFromLineIndex(line, index);
+
+    if (forward)
+        findState.endpos = SendScintilla(SCI_GETLENGTH);
+    else
+        findState.endpos = 0;
+
+    findState.show = show;
+
+    return doFind();
+}
+
+
+// Find the first occurrence of a string in the current selection.
+bool QsciScintilla::findFirstInSelection(const QString &expr, bool re, bool cs,
+        bool wo, bool forward, bool show, bool posix, bool cxx11)
+{
+    if (expr.isEmpty())
+    {
+        findState.status = FindState::Idle;
+        return false;
+    }
+
+    findState.status = FindState::FindingInSelection;
+    findState.expr = expr;
+    findState.wrap = false;
+    findState.forward = forward;
+
+    findState.flags =
+        (cs ? SCFIND_MATCHCASE : 0) |
+        (wo ? SCFIND_WHOLEWORD : 0) |
+        (re ? SCFIND_REGEXP : 0) |
+        (posix ? SCFIND_POSIX : 0) |
+        (cxx11 ? SCFIND_CXX11REGEX : 0);
+
+    findState.startpos_orig = SendScintilla(SCI_GETSELECTIONSTART);
+    findState.endpos_orig = SendScintilla(SCI_GETSELECTIONEND);
+
+    if (forward)
+    {
+        findState.startpos = findState.startpos_orig;
+        findState.endpos = findState.endpos_orig;
+    }
+    else
+    {
+        findState.startpos = findState.endpos_orig;
+        findState.endpos = findState.startpos_orig;
+    }
+
+    findState.show = show;
+
+    return doFind();
+}
+
+
+// Cancel any current search.
+void QsciScintilla::cancelFind()
+{
+    findState.status = FindState::Idle;
+}
+
+
+// Find the next occurrence of a string.
+bool QsciScintilla::findNext()
+{
+    if (findState.status == FindState::Idle)
+        return false;
+
+    return doFind();
+}
+
+
+// Do the hard work of the find methods.
+bool QsciScintilla::doFind()
+{
+    SendScintilla(SCI_SETSEARCHFLAGS, findState.flags);
+
+    int pos = simpleFind();
+
+    // See if it was found.  If not and wraparound is wanted, try again.
+    if (pos == -1 && findState.wrap)
+    {
+        if (findState.forward)
+        {
+            findState.startpos = 0;
+            findState.endpos = SendScintilla(SCI_GETLENGTH);
+        }
+        else
+        {
+            findState.startpos = SendScintilla(SCI_GETLENGTH);
+            findState.endpos = 0;
+        }
+
+        pos = simpleFind();
+    }
+
+    if (pos == -1)
+    {
+        // Restore the original selection.
+        if (findState.status == FindState::FindingInSelection)
+            SendScintilla(SCI_SETSEL, findState.startpos_orig,
+                    findState.endpos_orig);
+
+        findState.status = FindState::Idle;
+        return false;
+    }
+
+    // It was found.
+    long targstart = SendScintilla(SCI_GETTARGETSTART);
+    long targend = SendScintilla(SCI_GETTARGETEND);
+
+    // Ensure the text found is visible if required.
+    if (findState.show)
+    {
+        int startLine = SendScintilla(SCI_LINEFROMPOSITION, targstart);
+        int endLine = SendScintilla(SCI_LINEFROMPOSITION, targend);
+
+        for (int i = startLine; i <= endLine; ++i)
+            SendScintilla(SCI_ENSUREVISIBLEENFORCEPOLICY, i);
+    }
+
+    // Now set the selection.
+    SendScintilla(SCI_SETSEL, targstart, targend);
+
+    // Finally adjust the start position so that we don't find the same one
+    // again.
+    if (findState.forward)
+        findState.startpos = targend;
+    else if ((findState.startpos = targstart - 1) < 0)
+        findState.startpos = 0;
+
+    return true;
+}
+
+
+// Do a simple find between the start and end positions.
+int QsciScintilla::simpleFind()
+{
+    if (findState.startpos == findState.endpos)
+        return -1;
+
+    SendScintilla(SCI_SETTARGETSTART, findState.startpos);
+    SendScintilla(SCI_SETTARGETEND, findState.endpos);
+
+    ScintillaBytes s = textAsBytes(findState.expr);
+
+    return SendScintilla(SCI_SEARCHINTARGET, s.length(),
+            ScintillaBytesConstData(s));
+}
+
+
+// Replace the text found with the previous find method.
+void QsciScintilla::replace(const QString &replaceStr)
+{
+    if (findState.status == FindState::Idle)
+        return;
+
+    long start = SendScintilla(SCI_GETSELECTIONSTART);
+    long orig_len = SendScintilla(SCI_GETSELECTIONEND) - start;
+
+    SendScintilla(SCI_TARGETFROMSELECTION);
+
+    int cmd = (findState.flags & SCFIND_REGEXP) ? SCI_REPLACETARGETRE : SCI_REPLACETARGET;
+
+    ScintillaBytes s = textAsBytes(replaceStr);
+    long len = SendScintilla(cmd, -1, ScintillaBytesConstData(s));
+
+    // Reset the selection.
+    SendScintilla(SCI_SETSELECTIONSTART, start);
+    SendScintilla(SCI_SETSELECTIONEND, start + len);
+
+    // Fix the original selection.
+    findState.endpos_orig += (len - orig_len);
+
+    if (findState.forward)
+        findState.startpos = start + len;
+}
+
+
+// Query the modified state.
+bool QsciScintilla::isModified() const
+{
+    return doc.isModified();
+}
+
+
+// Set the modified state.
+void QsciScintilla::setModified(bool m)
+{
+    if (!m)
+        SendScintilla(SCI_SETSAVEPOINT);
+}
+
+
+// Handle the SCN_INDICATORCLICK notification.
+void QsciScintilla::handleIndicatorClick(int pos, int modifiers)
+{
+    int state = mapModifiers(modifiers);
+    int line, index;
+
+    lineIndexFromPosition(pos, &line, &index);
+
+    emit indicatorClicked(line, index, Qt::KeyboardModifiers(state));
+}
+
+
+// Handle the SCN_INDICATORRELEASE notification.
+void QsciScintilla::handleIndicatorRelease(int pos, int modifiers)
+{
+    int state = mapModifiers(modifiers);
+    int line, index;
+
+    lineIndexFromPosition(pos, &line, &index);
+
+    emit indicatorReleased(line, index, Qt::KeyboardModifiers(state));
+}
+
+
+// Handle the SCN_MARGINCLICK notification.
+void QsciScintilla::handleMarginClick(int pos, int modifiers, int margin)
+{
+    int state = mapModifiers(modifiers);
+    int line = SendScintilla(SCI_LINEFROMPOSITION, pos);
+
+    if (fold && margin == foldmargin)
+        foldClick(line, state);
+    else
+        emit marginClicked(margin, line, Qt::KeyboardModifiers(state));
+}
+
+
+// Handle the SCN_MARGINRIGHTCLICK notification.
+void QsciScintilla::handleMarginRightClick(int pos, int modifiers, int margin)
+{
+    int state = mapModifiers(modifiers);
+    int line = SendScintilla(SCI_LINEFROMPOSITION, pos);
+
+    emit marginRightClicked(margin, line, Qt::KeyboardModifiers(state));
+}
+
+
+// Handle the SCN_SAVEPOINTREACHED notification.
+void QsciScintilla::handleSavePointReached()
+{
+    doc.setModified(false);
+    emit modificationChanged(false);
+}
+
+
+// Handle the SCN_SAVEPOINTLEFT notification.
+void QsciScintilla::handleSavePointLeft()
+{
+    doc.setModified(true);
+    emit modificationChanged(true);
+}
+
+
+// Handle the QSCN_SELCHANGED signal.
+void QsciScintilla::handleSelectionChanged(bool yes)
+{
+    selText = yes;
+
+    emit copyAvailable(yes);
+    emit selectionChanged();
+}
+
+
+// Get the current selection.
+void QsciScintilla::getSelection(int *lineFrom, int *indexFrom, int *lineTo,
+        int *indexTo) const
+{
+    if (selText)
+    {
+        lineIndexFromPosition(SendScintilla(SCI_GETSELECTIONSTART), lineFrom,
+                indexFrom);
+        lineIndexFromPosition(SendScintilla(SCI_GETSELECTIONEND), lineTo,
+                indexTo);
+    }
+    else
+        *lineFrom = *indexFrom = *lineTo = *indexTo = -1;
+}
+
+
+// Sets the current selection.
+void QsciScintilla::setSelection(int lineFrom, int indexFrom, int lineTo,
+        int indexTo)
+{
+    SendScintilla(SCI_SETSEL, positionFromLineIndex(lineFrom, indexFrom),
+            positionFromLineIndex(lineTo, indexTo));
+}
+
+
+// Set the background colour of selected text.
+void QsciScintilla::setSelectionBackgroundColor(const QColor &col)
+{
+    int alpha = col.alpha();
+
+    if (alpha == 255)
+        alpha = SC_ALPHA_NOALPHA;
+
+    SendScintilla(SCI_SETSELBACK, 1, col);
+    SendScintilla(SCI_SETSELALPHA, alpha);
+}
+
+
+// Set the foreground colour of selected text.
+void QsciScintilla::setSelectionForegroundColor(const QColor &col)
+{
+    SendScintilla(SCI_SETSELFORE, 1, col);
+}
+
+
+// Reset the background colour of selected text to the default.
+void QsciScintilla::resetSelectionBackgroundColor()
+{
+    SendScintilla(SCI_SETSELALPHA, SC_ALPHA_NOALPHA);
+    SendScintilla(SCI_SETSELBACK, 0UL);
+}
+
+
+// Reset the foreground colour of selected text to the default.
+void QsciScintilla::resetSelectionForegroundColor()
+{
+    SendScintilla(SCI_SETSELFORE, 0UL);
+}
+
+
+// Set the fill to the end-of-line for the selection.
+void QsciScintilla::setSelectionToEol(bool filled)
+{
+    SendScintilla(SCI_SETSELEOLFILLED, filled);
+}
+
+
+// Return the fill to the end-of-line for the selection.
+bool QsciScintilla::selectionToEol() const
+{
+    return SendScintilla(SCI_GETSELEOLFILLED);
+}
+
+
+// Set the width of the caret.
+void QsciScintilla::setCaretWidth(int width)
+{
+    SendScintilla(SCI_SETCARETWIDTH, width);
+}
+
+
+// Set the width of the frame of the line containing the caret.
+void QsciScintilla::setCaretLineFrameWidth(int width)
+{
+    SendScintilla(SCI_SETCARETLINEFRAME, width);
+}
+
+
+// Set the foreground colour of the caret.
+void QsciScintilla::setCaretForegroundColor(const QColor &col)
+{
+    SendScintilla(SCI_SETCARETFORE, col);
+}
+
+
+// Set the background colour of the line containing the caret.
+void QsciScintilla::setCaretLineBackgroundColor(const QColor &col)
+{
+    int alpha = col.alpha();
+
+    if (alpha == 255)
+        alpha = SC_ALPHA_NOALPHA;
+
+    SendScintilla(SCI_SETCARETLINEBACK, col);
+    SendScintilla(SCI_SETCARETLINEBACKALPHA, alpha);
+}
+
+
+// Set the state of the background colour of the line containing the caret.
+void QsciScintilla::setCaretLineVisible(bool enable)
+{
+    SendScintilla(SCI_SETCARETLINEVISIBLE, enable);
+}
+
+
+// Set the background colour of a hotspot area.
+void QsciScintilla::setHotspotBackgroundColor(const QColor &col)
+{
+    SendScintilla(SCI_SETHOTSPOTACTIVEBACK, 1, col);
+}
+
+
+// Set the foreground colour of a hotspot area.
+void QsciScintilla::setHotspotForegroundColor(const QColor &col)
+{
+    SendScintilla(SCI_SETHOTSPOTACTIVEFORE, 1, col);
+}
+
+
+// Reset the background colour of a hotspot area to the default.
+void QsciScintilla::resetHotspotBackgroundColor()
+{
+    SendScintilla(SCI_SETHOTSPOTACTIVEBACK, 0UL);
+}
+
+
+// Reset the foreground colour of a hotspot area to the default.
+void QsciScintilla::resetHotspotForegroundColor()
+{
+    SendScintilla(SCI_SETHOTSPOTACTIVEFORE, 0UL);
+}
+
+
+// Set the underline of a hotspot area.
+void QsciScintilla::setHotspotUnderline(bool enable)
+{
+    SendScintilla(SCI_SETHOTSPOTACTIVEUNDERLINE, enable);
+}
+
+
+// Set the wrapping of a hotspot area.
+void QsciScintilla::setHotspotWrap(bool enable)
+{
+    SendScintilla(SCI_SETHOTSPOTSINGLELINE, !enable);
+}
+
+
+// Query the read-only state.
+bool QsciScintilla::isReadOnly() const
+{
+    return SendScintilla(SCI_GETREADONLY);
+}
+
+
+// Set the read-only state.
+void QsciScintilla::setReadOnly(bool ro)
+{
+    setAttribute(Qt::WA_InputMethodEnabled, !ro);
+    SendScintilla(SCI_SETREADONLY, ro);
+}
+
+
+// Append the given text.
+void QsciScintilla::append(const QString &text)
+{
+    bool ro = ensureRW();
+
+    ScintillaBytes s = textAsBytes(text);
+    SendScintilla(SCI_APPENDTEXT, s.length(), ScintillaBytesConstData(s));
+
+    SendScintilla(SCI_EMPTYUNDOBUFFER);
+
+    setReadOnly(ro);
+}
+
+
+// Insert the given text at the current position.
+void QsciScintilla::insert(const QString &text)
+{
+    insertAtPos(text, -1);
+}
+
+
+// Insert the given text at the given line and offset.
+void QsciScintilla::insertAt(const QString &text, int line, int index)
+{
+    insertAtPos(text, positionFromLineIndex(line, index));
+}
+
+
+// Insert the given text at the given position.
+void QsciScintilla::insertAtPos(const QString &text, int pos)
+{
+    bool ro = ensureRW();
+
+    SendScintilla(SCI_BEGINUNDOACTION);
+    SendScintilla(SCI_INSERTTEXT, pos,
+            ScintillaBytesConstData(textAsBytes(text)));
+    SendScintilla(SCI_ENDUNDOACTION);
+
+    setReadOnly(ro);
+}
+
+
+// Begin a sequence of undoable actions.
+void QsciScintilla::beginUndoAction()
+{
+    SendScintilla(SCI_BEGINUNDOACTION);
+}
+
+
+// End a sequence of undoable actions.
+void QsciScintilla::endUndoAction()
+{
+    SendScintilla(SCI_ENDUNDOACTION);
+}
+
+
+// Redo a sequence of actions.
+void QsciScintilla::redo()
+{
+    SendScintilla(SCI_REDO);
+}
+
+
+// Undo a sequence of actions.
+void QsciScintilla::undo()
+{
+    SendScintilla(SCI_UNDO);
+}
+
+
+// See if there is something to redo.
+bool QsciScintilla::isRedoAvailable() const
+{
+    return SendScintilla(SCI_CANREDO);
+}
+
+
+// See if there is something to undo.
+bool QsciScintilla::isUndoAvailable() const
+{
+    return SendScintilla(SCI_CANUNDO);
+}
+
+
+// Return the number of lines.
+int QsciScintilla::lines() const
+{
+    return SendScintilla(SCI_GETLINECOUNT);
+}
+
+
+// Return the line at a position.
+int QsciScintilla::lineAt(const QPoint &pos) const
+{
+    long chpos = SendScintilla(SCI_POSITIONFROMPOINTCLOSE, pos.x(), pos.y());
+
+    if (chpos < 0)
+        return -1;
+
+    return SendScintilla(SCI_LINEFROMPOSITION, chpos);
+}
+
+
+// Return the length of a line.
+int QsciScintilla::lineLength(int line) const
+{
+    if (line < 0 || line >= SendScintilla(SCI_GETLINECOUNT))
+        return -1;
+
+    return SendScintilla(SCI_LINELENGTH, line);
+}
+
+
+// Return the length of the current text.
+int QsciScintilla::length() const
+{
+    return SendScintilla(SCI_GETTEXTLENGTH);
+}
+
+
+// Remove any selected text.
+void QsciScintilla::removeSelectedText()
+{
+    SendScintilla(SCI_REPLACESEL, "");
+}
+
+
+// Replace any selected text.
+void QsciScintilla::replaceSelectedText(const QString &text)
+{
+    SendScintilla(SCI_REPLACESEL, ScintillaBytesConstData(textAsBytes(text)));
+}
+
+
+// Return the current selected text.
+QString QsciScintilla::selectedText() const
+{
+    if (!selText)
+        return QString();
+
+    char *buf = new char[SendScintilla(SCI_GETSELECTIONEND) - SendScintilla(SCI_GETSELECTIONSTART) + 1];
+
+    SendScintilla(SCI_GETSELTEXT, buf);
+
+    QString qs = bytesAsText(buf);
+    delete[] buf;
+
+    return qs;
+}
+
+
+// Return the current text.
+QString QsciScintilla::text() const
+{
+    int buflen = length() + 1;
+    char *buf = new char[buflen];
+
+    SendScintilla(SCI_GETTEXT, buflen, buf);
+
+    QString qs = bytesAsText(buf);
+    delete[] buf;
+
+    return qs;
+}
+
+
+// Return the text of a line.
+QString QsciScintilla::text(int line) const
+{
+    int line_len = lineLength(line);
+
+    if (line_len < 1)
+        return QString();
+
+    char *buf = new char[line_len + 1];
+
+    SendScintilla(SCI_GETLINE, line, buf);
+    buf[line_len] = '\0';
+
+    QString qs = bytesAsText(buf);
+    delete[] buf;
+
+    return qs;
+}
+
+
+// Return the text between two positions.
+QString QsciScintilla::text(int start, int end) const
+{
+    char *buf = new char[end - start + 1];
+    SendScintilla(SCI_GETTEXTRANGE, start, end, buf);
+    QString text = bytesAsText(buf);
+    delete[] buf;
+
+    return text;
+}
+
+
+// Return the text as encoded bytes between two positions.
+QByteArray QsciScintilla::bytes(int start, int end) const
+{
+    QByteArray bytes(end - start + 1, '\0');
+
+    SendScintilla(SCI_GETTEXTRANGE, start, end, bytes.data());
+
+    return bytes;
+}
+
+
+// Set the given text.
+void QsciScintilla::setText(const QString &text)
+{
+    bool ro = ensureRW();
+
+    SendScintilla(SCI_SETTEXT, ScintillaBytesConstData(textAsBytes(text)));
+    SendScintilla(SCI_EMPTYUNDOBUFFER);
+
+    setReadOnly(ro);
+}
+
+
+// Get the cursor position
+void QsciScintilla::getCursorPosition(int *line, int *index) const
+{
+    lineIndexFromPosition(SendScintilla(SCI_GETCURRENTPOS), line, index);
+}
+
+
+// Set the cursor position
+void QsciScintilla::setCursorPosition(int line, int index)
+{
+    SendScintilla(SCI_GOTOPOS, positionFromLineIndex(line, index));
+}
+
+
+// Ensure the cursor is visible.
+void QsciScintilla::ensureCursorVisible()
+{
+    SendScintilla(SCI_SCROLLCARET);
+}
+
+
+// Ensure a line is visible.
+void QsciScintilla::ensureLineVisible(int line)
+{
+    SendScintilla(SCI_ENSUREVISIBLEENFORCEPOLICY, line);
+}
+
+
+// Copy text to the clipboard.
+void QsciScintilla::copy()
+{
+    SendScintilla(SCI_COPY);
+}
+
+
+// Cut text to the clipboard.
+void QsciScintilla::cut()
+{
+    SendScintilla(SCI_CUT);
+}
+
+
+// Paste text from the clipboard.
+void QsciScintilla::paste()
+{
+    SendScintilla(SCI_PASTE);
+}
+
+
+// Select all text, or deselect any selected text.
+void QsciScintilla::selectAll(bool select)
+{
+    if (select)
+        SendScintilla(SCI_SELECTALL);
+    else
+        SendScintilla(SCI_SETANCHOR, SendScintilla(SCI_GETCURRENTPOS));
+}
+
+
+// Delete all text.
+void QsciScintilla::clear()
+{
+    bool ro = ensureRW();
+
+    SendScintilla(SCI_CLEARALL);
+    SendScintilla(SCI_EMPTYUNDOBUFFER);
+
+    setReadOnly(ro);
+}
+
+
+// Return the indentation of a line.
+int QsciScintilla::indentation(int line) const
+{
+    return SendScintilla(SCI_GETLINEINDENTATION, line);
+}
+
+
+// Set the indentation of a line.
+void QsciScintilla::setIndentation(int line, int indentation)
+{
+    SendScintilla(SCI_BEGINUNDOACTION);
+    SendScintilla(SCI_SETLINEINDENTATION, line, indentation);
+    SendScintilla(SCI_ENDUNDOACTION);
+}
+
+
+// Indent a line.
+void QsciScintilla::indent(int line)
+{
+    setIndentation(line, indentation(line) + indentWidth());
+}
+
+
+// Unindent a line.
+void QsciScintilla::unindent(int line)
+{
+    int newIndent = indentation(line) - indentWidth();
+
+    if (newIndent < 0)
+        newIndent = 0;
+
+    setIndentation(line, newIndent);
+}
+
+
+// Return the indentation of the current line.
+int QsciScintilla::currentIndent() const
+{
+    return indentation(SendScintilla(SCI_LINEFROMPOSITION,
+                SendScintilla(SCI_GETCURRENTPOS)));
+}
+
+
+// Return the current indentation width.
+int QsciScintilla::indentWidth() const
+{
+    int w = indentationWidth();
+
+    if (w == 0)
+        w = tabWidth();
+
+    return w;
+}
+
+
+// Return the state of indentation guides.
+bool QsciScintilla::indentationGuides() const
+{
+    return (SendScintilla(SCI_GETINDENTATIONGUIDES) != SC_IV_NONE);
+}
+
+
+// Enable and disable indentation guides.
+void QsciScintilla::setIndentationGuides(bool enable)
+{
+    int iv;
+
+    if (!enable)
+        iv = SC_IV_NONE;
+    else if (lex.isNull())
+        iv = SC_IV_REAL;
+    else
+        iv = lex->indentationGuideView();
+
+    SendScintilla(SCI_SETINDENTATIONGUIDES, iv);
+}
+
+
+// Set the background colour of indentation guides.
+void QsciScintilla::setIndentationGuidesBackgroundColor(const QColor &col)
+{
+    SendScintilla(SCI_STYLESETBACK, STYLE_INDENTGUIDE, col);
+}
+
+
+// Set the foreground colour of indentation guides.
+void QsciScintilla::setIndentationGuidesForegroundColor(const QColor &col)
+{
+    SendScintilla(SCI_STYLESETFORE, STYLE_INDENTGUIDE, col);
+}
+
+
+// Return the indentation width.
+int QsciScintilla::indentationWidth() const
+{
+    return SendScintilla(SCI_GETINDENT);
+}
+
+
+// Set the indentation width.
+void QsciScintilla::setIndentationWidth(int width)
+{
+    SendScintilla(SCI_SETINDENT, width);
+}
+
+
+// Return the tab width.
+int QsciScintilla::tabWidth() const
+{
+    return SendScintilla(SCI_GETTABWIDTH);
+}
+
+
+// Set the tab width.
+void QsciScintilla::setTabWidth(int width)
+{
+    SendScintilla(SCI_SETTABWIDTH, width);
+}
+
+
+// Return the effect of the backspace key.
+bool QsciScintilla::backspaceUnindents() const
+{
+    return SendScintilla(SCI_GETBACKSPACEUNINDENTS);
+}
+
+
+// Set the effect of the backspace key.
+void QsciScintilla::setBackspaceUnindents(bool unindents)
+{
+    SendScintilla(SCI_SETBACKSPACEUNINDENTS, unindents);
+}
+
+
+// Return the effect of the tab key.
+bool QsciScintilla::tabIndents() const
+{
+    return SendScintilla(SCI_GETTABINDENTS);
+}
+
+
+// Set the effect of the tab key.
+void QsciScintilla::setTabIndents(bool indents)
+{
+    SendScintilla(SCI_SETTABINDENTS, indents);
+}
+
+
+// Return the indentation use of tabs.
+bool QsciScintilla::indentationsUseTabs() const
+{
+    return SendScintilla(SCI_GETUSETABS);
+}
+
+
+// Set the indentation use of tabs.
+void QsciScintilla::setIndentationsUseTabs(bool tabs)
+{
+    SendScintilla(SCI_SETUSETABS, tabs);
+}
+
+
+// Return the number of margins.
+int QsciScintilla::margins() const
+{
+    return SendScintilla(SCI_GETMARGINS);
+}
+
+
+// Set the number of margins.
+void QsciScintilla::setMargins(int margins)
+{
+    SendScintilla(SCI_SETMARGINS, margins);
+}
+
+
+// Return the margin background colour.
+QColor QsciScintilla::marginBackgroundColor(int margin) const
+{
+    return asQColor(SendScintilla(SCI_GETMARGINBACKN, margin));
+}
+
+
+// Set the margin background colour.
+void QsciScintilla::setMarginBackgroundColor(int margin, const QColor &col)
+{
+    SendScintilla(SCI_SETMARGINBACKN, margin, col);
+}
+
+
+// Return the margin options.
+int QsciScintilla::marginOptions() const
+{
+    return SendScintilla(SCI_GETMARGINOPTIONS);
+}
+
+
+// Set the margin options.
+void QsciScintilla::setMarginOptions(int options)
+{
+    SendScintilla(SCI_SETMARGINOPTIONS, options);
+}
+
+
+// Return the margin type.
+QsciScintilla::MarginType QsciScintilla::marginType(int margin) const
+{
+    return (MarginType)SendScintilla(SCI_GETMARGINTYPEN, margin);
+}
+
+
+// Set the margin type.
+void QsciScintilla::setMarginType(int margin, QsciScintilla::MarginType type)
+{
+    SendScintilla(SCI_SETMARGINTYPEN, margin, type);
+}
+
+
+// Clear margin text.
+void QsciScintilla::clearMarginText(int line)
+{
+    if (line < 0)
+        SendScintilla(SCI_MARGINTEXTCLEARALL);
+    else
+        SendScintilla(SCI_MARGINSETTEXT, line, (const char *)0);
+}
+
+
+// Annotate a line.
+void QsciScintilla::setMarginText(int line, const QString &text, int style)
+{
+    int style_offset = SendScintilla(SCI_MARGINGETSTYLEOFFSET);
+
+    SendScintilla(SCI_MARGINSETTEXT, line,
+            ScintillaBytesConstData(textAsBytes(text)));
+
+    SendScintilla(SCI_MARGINSETSTYLE, line, style - style_offset);
+}
+
+
+// Annotate a line.
+void QsciScintilla::setMarginText(int line, const QString &text, const QsciStyle &style)
+{
+    style.apply(this);
+
+    setMarginText(line, text, style.style());
+}
+
+
+// Annotate a line.
+void QsciScintilla::setMarginText(int line, const QsciStyledText &text)
+{
+    text.apply(this);
+
+    setMarginText(line, text.text(), text.style());
+}
+
+
+// Annotate a line.
+void QsciScintilla::setMarginText(int line, const QList<QsciStyledText> &text)
+{
+    char *styles;
+    ScintillaBytes styled_text = styleText(text, &styles,
+            SendScintilla(SCI_MARGINGETSTYLEOFFSET));
+
+    SendScintilla(SCI_MARGINSETTEXT, line,
+            ScintillaBytesConstData(styled_text));
+    SendScintilla(SCI_MARGINSETSTYLES, line, styles);
+
+    delete[] styles;
+}
+
+
+// Return the state of line numbers in a margin.
+bool QsciScintilla::marginLineNumbers(int margin) const
+{
+    return SendScintilla(SCI_GETMARGINTYPEN, margin);
+}
+
+
+// Enable and disable line numbers in a margin.
+void QsciScintilla::setMarginLineNumbers(int margin, bool lnrs)
+{
+    SendScintilla(SCI_SETMARGINTYPEN, margin,
+            lnrs ? SC_MARGIN_NUMBER : SC_MARGIN_SYMBOL);
+}
+
+
+// Return the marker mask of a margin.
+int QsciScintilla::marginMarkerMask(int margin) const
+{
+    return SendScintilla(SCI_GETMARGINMASKN, margin);
+}
+
+
+// Set the marker mask of a margin.
+void QsciScintilla::setMarginMarkerMask(int margin,int mask)
+{
+    SendScintilla(SCI_SETMARGINMASKN, margin, mask);
+}
+
+
+// Return the state of a margin's sensitivity.
+bool QsciScintilla::marginSensitivity(int margin) const
+{
+    return SendScintilla(SCI_GETMARGINSENSITIVEN, margin);
+}
+
+
+// Enable and disable a margin's sensitivity.
+void QsciScintilla::setMarginSensitivity(int margin,bool sens)
+{
+    SendScintilla(SCI_SETMARGINSENSITIVEN, margin, sens);
+}
+
+
+// Return the width of a margin.
+int QsciScintilla::marginWidth(int margin) const
+{
+    return SendScintilla(SCI_GETMARGINWIDTHN, margin);
+}
+
+
+// Set the width of a margin.
+void QsciScintilla::setMarginWidth(int margin, int width)
+{
+    SendScintilla(SCI_SETMARGINWIDTHN, margin, width);
+}
+
+
+// Set the width of a margin to the width of some text.
+void QsciScintilla::setMarginWidth(int margin, const QString &s)
+{
+    int width = SendScintilla(SCI_TEXTWIDTH, STYLE_LINENUMBER,
+            ScintillaBytesConstData(textAsBytes(s)));
+
+    setMarginWidth(margin, width);
+}
+
+
+// Set the background colour of all margins.
+void QsciScintilla::setMarginsBackgroundColor(const QColor &col)
+{
+    handleStylePaperChange(col, STYLE_LINENUMBER);
+}
+
+
+// Set the foreground colour of all margins.
+void QsciScintilla::setMarginsForegroundColor(const QColor &col)
+{
+    handleStyleColorChange(col, STYLE_LINENUMBER);
+}
+
+
+// Set the font of all margins.
+void QsciScintilla::setMarginsFont(const QFont &f)
+{
+    setStylesFont(f, STYLE_LINENUMBER);
+}
+
+
+// Define an indicator.
+int QsciScintilla::indicatorDefine(IndicatorStyle style, int indicatorNumber)
+{
+    checkIndicator(indicatorNumber);
+
+    if (indicatorNumber >= 0)
+        SendScintilla(SCI_INDICSETSTYLE, indicatorNumber,
+                static_cast<long>(style));
+
+    return indicatorNumber;
+}
+
+
+// Return the state of an indicator being drawn under the text.
+bool QsciScintilla::indicatorDrawUnder(int indicatorNumber) const
+{
+    if (indicatorNumber < 0 || indicatorNumber >= INDIC_IME)
+        return false;
+
+    return SendScintilla(SCI_INDICGETUNDER, indicatorNumber);
+}
+
+
+// Set the state of indicators being drawn under the text.
+void QsciScintilla::setIndicatorDrawUnder(bool under, int indicatorNumber)
+{
+    if (indicatorNumber < INDIC_IME)
+    {
+        // We ignore allocatedIndicators to allow any indicators defined
+        // elsewhere (e.g. in lexers) to be set.
+        if (indicatorNumber < 0)
+        {
+            for (int i = 0; i < INDIC_IME; ++i)
+                SendScintilla(SCI_INDICSETUNDER, i, under);
+        }
+        else
+        {
+            SendScintilla(SCI_INDICSETUNDER, indicatorNumber, under);
+        }
+    }
+}
+
+
+// Set the indicator foreground colour.
+void QsciScintilla::setIndicatorForegroundColor(const QColor &col,
+        int indicatorNumber)
+{
+    if (indicatorNumber < INDIC_IME)
+    {
+        int alpha = col.alpha();
+
+        // We ignore allocatedIndicators to allow any indicators defined
+        // elsewhere (e.g. in lexers) to be set.
+        if (indicatorNumber < 0)
+        {
+            for (int i = 0; i < INDIC_IME; ++i)
+            {
+                SendScintilla(SCI_INDICSETFORE, i, col);
+                SendScintilla(SCI_INDICSETALPHA, i, alpha);
+            }
+        }
+        else
+        {
+            SendScintilla(SCI_INDICSETFORE, indicatorNumber, col);
+            SendScintilla(SCI_INDICSETALPHA, indicatorNumber, alpha);
+        }
+    }
+}
+
+
+// Set the indicator hover foreground colour.
+void QsciScintilla::setIndicatorHoverForegroundColor(const QColor &col,
+        int indicatorNumber)
+{
+    if (indicatorNumber < INDIC_IME)
+    {
+        // We ignore allocatedIndicators to allow any indicators defined
+        // elsewhere (e.g. in lexers) to be set.
+        if (indicatorNumber < 0)
+        {
+            for (int i = 0; i < INDIC_IME; ++i)
+                SendScintilla(SCI_INDICSETHOVERFORE, i, col);
+        }
+        else
+        {
+            SendScintilla(SCI_INDICSETHOVERFORE, indicatorNumber, col);
+        }
+    }
+}
+
+
+// Set the indicator hover style.
+void QsciScintilla::setIndicatorHoverStyle(IndicatorStyle style,
+        int indicatorNumber)
+{
+    if (indicatorNumber < INDIC_IME)
+    {
+        // We ignore allocatedIndicators to allow any indicators defined
+        // elsewhere (e.g. in lexers) to be set.
+        if (indicatorNumber < 0)
+        {
+            for (int i = 0; i < INDIC_IME; ++i)
+                SendScintilla(SCI_INDICSETHOVERSTYLE, i,
+                        static_cast<long>(style));
+        }
+        else
+        {
+            SendScintilla(SCI_INDICSETHOVERSTYLE, indicatorNumber,
+                    static_cast<long>(style));
+        }
+    }
+}
+
+
+// Set the indicator outline colour.
+void QsciScintilla::setIndicatorOutlineColor(const QColor &col, int indicatorNumber)
+{
+    if (indicatorNumber < INDIC_IME)
+    {
+        int alpha = col.alpha();
+
+        // We ignore allocatedIndicators to allow any indicators defined
+        // elsewhere (e.g. in lexers) to be set.
+        if (indicatorNumber < 0)
+        {
+            for (int i = 0; i < INDIC_IME; ++i)
+                SendScintilla(SCI_INDICSETOUTLINEALPHA, i, alpha);
+        }
+        else
+        {
+            SendScintilla(SCI_INDICSETOUTLINEALPHA, indicatorNumber, alpha);
+        }
+    }
+}
+
+
+// Fill a range with an indicator.
+void QsciScintilla::fillIndicatorRange(int lineFrom, int indexFrom,
+        int lineTo, int indexTo, int indicatorNumber)
+{
+    if (indicatorNumber < INDIC_IME)
+    {
+        int start = positionFromLineIndex(lineFrom, indexFrom);
+        int finish = positionFromLineIndex(lineTo, indexTo);
+
+        // We ignore allocatedIndicators to allow any indicators defined
+        // elsewhere (e.g. in lexers) to be set.
+        if (indicatorNumber < 0)
+        {
+            for (int i = 0; i < INDIC_IME; ++i)
+            {
+                SendScintilla(SCI_SETINDICATORCURRENT, i);
+                SendScintilla(SCI_INDICATORFILLRANGE, start, finish - start);
+            }
+        }
+        else
+        {
+            SendScintilla(SCI_SETINDICATORCURRENT, indicatorNumber);
+            SendScintilla(SCI_INDICATORFILLRANGE, start, finish - start);
+        }
+    }
+}
+
+
+// Clear a range with an indicator.
+void QsciScintilla::clearIndicatorRange(int lineFrom, int indexFrom,
+        int lineTo, int indexTo, int indicatorNumber)
+{
+    if (indicatorNumber < INDIC_IME)
+    {
+        int start = positionFromLineIndex(lineFrom, indexFrom);
+        int finish = positionFromLineIndex(lineTo, indexTo);
+
+        // We ignore allocatedIndicators to allow any indicators defined
+        // elsewhere (e.g. in lexers) to be set.
+        if (indicatorNumber < 0)
+        {
+            for (int i = 0; i < INDIC_IME; ++i)
+            {
+                SendScintilla(SCI_SETINDICATORCURRENT, i);
+                SendScintilla(SCI_INDICATORCLEARRANGE, start, finish - start);
+            }
+        }
+        else
+        {
+            SendScintilla(SCI_SETINDICATORCURRENT, indicatorNumber);
+            SendScintilla(SCI_INDICATORCLEARRANGE, start, finish - start);
+        }
+    }
+}
+
+
+// Define a marker based on a symbol.
+int QsciScintilla::markerDefine(MarkerSymbol sym, int markerNumber)
+{
+    checkMarker(markerNumber);
+
+    if (markerNumber >= 0)
+        SendScintilla(SCI_MARKERDEFINE, markerNumber, static_cast<long>(sym));
+
+    return markerNumber;
+}
+
+
+// Define a marker based on a character.
+int QsciScintilla::markerDefine(char ch, int markerNumber)
+{
+    checkMarker(markerNumber);
+
+    if (markerNumber >= 0)
+        SendScintilla(SCI_MARKERDEFINE, markerNumber,
+                static_cast<long>(SC_MARK_CHARACTER) + ch);
+
+    return markerNumber;
+}
+
+
+// Define a marker based on a QPixmap.
+int QsciScintilla::markerDefine(const QPixmap &pm, int markerNumber)
+{
+    checkMarker(markerNumber);
+
+    if (markerNumber >= 0)
+        SendScintilla(SCI_MARKERDEFINEPIXMAP, markerNumber, pm);
+
+    return markerNumber;
+}
+
+
+// Define a marker based on a QImage.
+int QsciScintilla::markerDefine(const QImage &im, int markerNumber)
+{
+    checkMarker(markerNumber);
+
+    if (markerNumber >= 0)
+    {
+        SendScintilla(SCI_RGBAIMAGESETHEIGHT, im.height());
+        SendScintilla(SCI_RGBAIMAGESETWIDTH, im.width());
+        SendScintilla(SCI_MARKERDEFINERGBAIMAGE, markerNumber, im);
+    }
+
+    return markerNumber;
+}
+
+
+// Add a marker to a line.
+int QsciScintilla::markerAdd(int linenr, int markerNumber)
+{
+    if (markerNumber < 0 || markerNumber > MARKER_MAX || (allocatedMarkers & (1 << markerNumber)) == 0)
+        return -1;
+
+    return SendScintilla(SCI_MARKERADD, linenr, markerNumber);
+}
+
+
+// Get the marker mask for a line.
+unsigned QsciScintilla::markersAtLine(int linenr) const
+{
+    return SendScintilla(SCI_MARKERGET, linenr);
+}
+
+
+// Delete a marker from a line.
+void QsciScintilla::markerDelete(int linenr, int markerNumber)
+{
+    if (markerNumber <= MARKER_MAX)
+    {
+        if (markerNumber < 0)
+        {
+            unsigned am = allocatedMarkers;
+
+            for (int m = 0; m <= MARKER_MAX; ++m)
+            {
+                if (am & 1)
+                    SendScintilla(SCI_MARKERDELETE, linenr, m);
+
+                am >>= 1;
+            }
+        }
+        else if (allocatedMarkers & (1 << markerNumber))
+            SendScintilla(SCI_MARKERDELETE, linenr, markerNumber);
+    }
+}
+
+
+// Delete a marker from the text.
+void QsciScintilla::markerDeleteAll(int markerNumber)
+{
+    if (markerNumber <= MARKER_MAX)
+    {
+        if (markerNumber < 0)
+            SendScintilla(SCI_MARKERDELETEALL, -1);
+        else if (allocatedMarkers & (1 << markerNumber))
+            SendScintilla(SCI_MARKERDELETEALL, markerNumber);
+    }
+}
+
+
+// Delete a marker handle from the text.
+void QsciScintilla::markerDeleteHandle(int mhandle)
+{
+    SendScintilla(SCI_MARKERDELETEHANDLE, mhandle);
+}
+
+
+// Return the line containing a marker instance.
+int QsciScintilla::markerLine(int mhandle) const
+{
+    return SendScintilla(SCI_MARKERLINEFROMHANDLE, mhandle);
+}
+
+
+// Search forwards for a marker.
+int QsciScintilla::markerFindNext(int linenr, unsigned mask) const
+{
+    return SendScintilla(SCI_MARKERNEXT, linenr, mask);
+}
+
+
+// Search backwards for a marker.
+int QsciScintilla::markerFindPrevious(int linenr, unsigned mask) const
+{
+    return SendScintilla(SCI_MARKERPREVIOUS, linenr, mask);
+}
+
+
+// Set the marker background colour.
+void QsciScintilla::setMarkerBackgroundColor(const QColor &col, int markerNumber)
+{
+    if (markerNumber <= MARKER_MAX)
+    {
+        int alpha = col.alpha();
+
+        // An opaque background would make the text invisible.
+        if (alpha == 255)
+            alpha = SC_ALPHA_NOALPHA;
+
+        if (markerNumber < 0)
+        {
+            unsigned am = allocatedMarkers;
+
+            for (int m = 0; m <= MARKER_MAX; ++m)
+            {
+                if (am & 1)
+                {
+                    SendScintilla(SCI_MARKERSETBACK, m, col);
+                    SendScintilla(SCI_MARKERSETALPHA, m, alpha);
+                }
+
+                am >>= 1;
+            }
+        }
+        else if (allocatedMarkers & (1 << markerNumber))
+        {
+            SendScintilla(SCI_MARKERSETBACK, markerNumber, col);
+            SendScintilla(SCI_MARKERSETALPHA, markerNumber, alpha);
+        }
+    }
+}
+
+
+// Set the marker foreground colour.
+void QsciScintilla::setMarkerForegroundColor(const QColor &col, int markerNumber)
+{
+    if (markerNumber <= MARKER_MAX)
+    {
+        if (markerNumber < 0)
+        {
+            unsigned am = allocatedMarkers;
+
+            for (int m = 0; m <= MARKER_MAX; ++m)
+            {
+                if (am & 1)
+                    SendScintilla(SCI_MARKERSETFORE, m, col);
+
+                am >>= 1;
+            }
+        }
+        else if (allocatedMarkers & (1 << markerNumber))
+        {
+            SendScintilla(SCI_MARKERSETFORE, markerNumber, col);
+        }
+    }
+}
+
+
+// Check a marker, allocating a marker number if necessary.
+void QsciScintilla::checkMarker(int &markerNumber)
+{
+    allocateId(markerNumber, allocatedMarkers, 0, MARKER_MAX);
+}
+
+
+// Check an indicator, allocating an indicator number if necessary.
+void QsciScintilla::checkIndicator(int &indicatorNumber)
+{
+    allocateId(indicatorNumber, allocatedIndicators, INDIC_CONTAINER,
+            INDIC_IME - 1);
+}
+
+
+// Make sure an identifier is valid and allocate it if necessary.
+void QsciScintilla::allocateId(int &id, unsigned &allocated, int min, int max)
+{
+    if (id >= 0)
+    {
+        // Note that we allow existing identifiers to be explicitly redefined.
+        if (id > max)
+            id = -1;
+    }
+    else
+    {
+        unsigned aids = allocated >> min;
+
+        // Find the smallest unallocated identifier.
+        for (id = min; id <= max; ++id)
+        {
+            if ((aids & 1) == 0)
+                break;
+
+            aids >>= 1;
+        }
+    }
+
+    // Allocate the identifier if it is valid.
+    if (id >= 0)
+        allocated |= (1 << id);
+}
+
+
+// Reset the fold margin colours.
+void QsciScintilla::resetFoldMarginColors()
+{
+    SendScintilla(SCI_SETFOLDMARGINHICOLOUR, 0, 0L);
+    SendScintilla(SCI_SETFOLDMARGINCOLOUR, 0, 0L);
+}
+
+
+// Set the fold margin colours.
+void QsciScintilla::setFoldMarginColors(const QColor &fore, const QColor &back)
+{
+    SendScintilla(SCI_SETFOLDMARGINHICOLOUR, 1, fore);
+    SendScintilla(SCI_SETFOLDMARGINCOLOUR, 1, back);
+}
+
+
+// Set the call tips background colour.
+void QsciScintilla::setCallTipsBackgroundColor(const QColor &col)
+{
+    SendScintilla(SCI_CALLTIPSETBACK, col);
+}
+
+
+// Set the call tips foreground colour.
+void QsciScintilla::setCallTipsForegroundColor(const QColor &col)
+{
+    SendScintilla(SCI_CALLTIPSETFORE, col);
+}
+
+
+// Set the call tips highlight colour.
+void QsciScintilla::setCallTipsHighlightColor(const QColor &col)
+{
+    SendScintilla(SCI_CALLTIPSETFOREHLT, col);
+}
+
+
+// Set the matched brace background colour.
+void QsciScintilla::setMatchedBraceBackgroundColor(const QColor &col)
+{
+    SendScintilla(SCI_STYLESETBACK, STYLE_BRACELIGHT, col);
+}
+
+
+// Set the matched brace foreground colour.
+void QsciScintilla::setMatchedBraceForegroundColor(const QColor &col)
+{
+    SendScintilla(SCI_STYLESETFORE, STYLE_BRACELIGHT, col);
+}
+
+
+// Set the matched brace indicator.
+void QsciScintilla::setMatchedBraceIndicator(int indicatorNumber)
+{
+    SendScintilla(SCI_BRACEHIGHLIGHTINDICATOR, 1, indicatorNumber);
+}
+
+
+// Reset the matched brace indicator.
+void QsciScintilla::resetMatchedBraceIndicator()
+{
+    SendScintilla(SCI_BRACEHIGHLIGHTINDICATOR, 0, 0L);
+}
+
+
+// Set the unmatched brace background colour.
+void QsciScintilla::setUnmatchedBraceBackgroundColor(const QColor &col)
+{
+    SendScintilla(SCI_STYLESETBACK, STYLE_BRACEBAD, col);
+}
+
+
+// Set the unmatched brace foreground colour.
+void QsciScintilla::setUnmatchedBraceForegroundColor(const QColor &col)
+{
+    SendScintilla(SCI_STYLESETFORE, STYLE_BRACEBAD, col);
+}
+
+
+// Set the unmatched brace indicator.
+void QsciScintilla::setUnmatchedBraceIndicator(int indicatorNumber)
+{
+    SendScintilla(SCI_BRACEBADLIGHTINDICATOR, 1, indicatorNumber);
+}
+
+
+// Reset the unmatched brace indicator.
+void QsciScintilla::resetUnmatchedBraceIndicator()
+{
+    SendScintilla(SCI_BRACEBADLIGHTINDICATOR, 0, 0L);
+}
+
+
+// Detach any lexer.
+void QsciScintilla::detachLexer()
+{
+    if (!lex.isNull())
+    {
+        lex->setEditor(0);
+        lex->disconnect(this);
+
+        SendScintilla(SCI_STYLERESETDEFAULT);
+        SendScintilla(SCI_STYLECLEARALL);
+    }
+}
+
+
+// Set the lexer.
+void QsciScintilla::setLexer(QsciLexer *lexer)
+{
+    // Detach any current lexer.
+    detachLexer();
+
+    // Connect up the new lexer.
+    lex = lexer;
+
+    if (lex)
+    {
+        SendScintilla(SCI_CLEARDOCUMENTSTYLE);
+
+        if (lex->lexer())
+            SendScintilla(SCI_SETLEXERLANGUAGE, lex->lexer());
+        else
+            SendScintilla(SCI_SETLEXER, lex->lexerId());
+
+        lex->setEditor(this);
+
+        connect(lex,SIGNAL(colorChanged(const QColor &, int)),
+                SLOT(handleStyleColorChange(const QColor &, int)));
+        connect(lex,SIGNAL(eolFillChanged(bool, int)),
+                SLOT(handleStyleEolFillChange(bool, int)));
+        connect(lex,SIGNAL(fontChanged(const QFont &, int)),
+                SLOT(handleStyleFontChange(const QFont &, int)));
+        connect(lex,SIGNAL(paperChanged(const QColor &, int)),
+                SLOT(handleStylePaperChange(const QColor &, int)));
+        connect(lex,SIGNAL(propertyChanged(const char *, const char *)),
+                SLOT(handlePropertyChange(const char *, const char *)));
+
+        SendScintilla(SCI_SETPROPERTY, "fold", "1");
+        SendScintilla(SCI_SETPROPERTY, "fold.html", "1");
+
+        // Set the keywords.  Scintilla allows for sets numbered 0 to
+        // KEYWORDSET_MAX (although the lexers only seem to exploit 0 to
+        // KEYWORDSET_MAX - 1).  We number from 1 in line with SciTE's property
+        // files.
+        for (int k = 0; k <= KEYWORDSET_MAX; ++k)
+        {
+            const char *kw = lex -> keywords(k + 1);
+
+            if (!kw)
+                kw = "";
+
+            SendScintilla(SCI_SETKEYWORDS, k, kw);
+        }
+
+        // Initialise each style.  Do the default first so its (possibly
+        // incorrect) font setting gets reset when style 0 is set.
+        setLexerStyle(STYLE_DEFAULT);
+
+        for (int s = 0; s <= STYLE_MAX; ++s)
+            if (!lex->description(s).isEmpty())
+                setLexerStyle(s);
+
+        // Initialise the properties.
+        lex->refreshProperties();
+
+        // Set the auto-completion fillups and word separators.
+        setAutoCompletionFillupsEnabled(fillups_enabled);
+        wseps = lex->autoCompletionWordSeparators();
+
+        wchars = lex->wordCharacters();
+
+        if (!wchars)
+            wchars = defaultWordChars;
+
+        SendScintilla(SCI_AUTOCSETIGNORECASE, !lex->caseSensitive());
+
+        recolor();
+    }
+    else
+    {
+        SendScintilla(SCI_SETLEXER, SCLEX_CONTAINER);
+
+        setColor(nl_text_colour);
+        setPaper(nl_paper_colour);
+
+        SendScintilla(SCI_AUTOCSETFILLUPS, "");
+        SendScintilla(SCI_AUTOCSETIGNORECASE, false);
+        wseps.clear();
+        wchars = defaultWordChars;
+    }
+}
+
+
+// Set a particular style of the current lexer.
+void QsciScintilla::setLexerStyle(int style)
+{
+    handleStyleColorChange(lex->color(style), style);
+    handleStyleEolFillChange(lex->eolFill(style), style);
+    handleStyleFontChange(lex->font(style), style);
+    handleStylePaperChange(lex->paper(style), style);
+}
+
+
+// Get the current lexer.
+QsciLexer *QsciScintilla::lexer() const
+{
+    return lex;
+}
+
+
+// Handle a change in lexer style foreground colour.
+void QsciScintilla::handleStyleColorChange(const QColor &c, int style)
+{
+    SendScintilla(SCI_STYLESETFORE, style, c);
+}
+
+
+// Handle a change in lexer style end-of-line fill.
+void QsciScintilla::handleStyleEolFillChange(bool eolfill, int style)
+{
+    SendScintilla(SCI_STYLESETEOLFILLED, style, eolfill);
+}
+
+
+// Handle a change in lexer style font.
+void QsciScintilla::handleStyleFontChange(const QFont &f, int style)
+{
+    setStylesFont(f, style);
+
+    if (style == lex->braceStyle())
+    {
+        setStylesFont(f, STYLE_BRACELIGHT);
+        setStylesFont(f, STYLE_BRACEBAD);
+    }
+}
+
+
+// Set the font for a style.
+void QsciScintilla::setStylesFont(const QFont &f, int style)
+{
+    SendScintilla(SCI_STYLESETFONT, style, f.family().toLatin1().data());
+    SendScintilla(SCI_STYLESETSIZEFRACTIONAL, style,
+            long(f.pointSizeF() * SC_FONT_SIZE_MULTIPLIER));
+
+    // Pass the Qt weight via the back door.
+    SendScintilla(SCI_STYLESETWEIGHT, style, -f.weight());
+
+    SendScintilla(SCI_STYLESETITALIC, style, f.italic());
+    SendScintilla(SCI_STYLESETUNDERLINE, style, f.underline());
+
+    // Tie the font settings of the default style to that of style 0 (the style
+    // conventionally used for whitespace by lexers).  This is needed so that
+    // fold marks, indentations, edge columns etc are set properly.
+    if (style == 0)
+        setStylesFont(f, STYLE_DEFAULT);
+}
+
+
+// Handle a change in lexer style background colour.
+void QsciScintilla::handleStylePaperChange(const QColor &c, int style)
+{
+    SendScintilla(SCI_STYLESETBACK, style, c);
+}
+
+
+// Handle a change in lexer property.
+void QsciScintilla::handlePropertyChange(const char *prop, const char *val)
+{
+    SendScintilla(SCI_SETPROPERTY, prop, val);
+}
+
+
+// Handle a change to the user visible user interface.
+void QsciScintilla::handleUpdateUI(int)
+{
+    int newPos = SendScintilla(SCI_GETCURRENTPOS);
+
+    if (newPos != oldPos)
+    {
+        oldPos = newPos;
+
+        int line = SendScintilla(SCI_LINEFROMPOSITION, newPos);
+        int col = SendScintilla(SCI_GETCOLUMN, newPos);
+
+        emit cursorPositionChanged(line, col);
+    }
+
+    if (braceMode != NoBraceMatch)
+        braceMatch();
+}
+
+
+// Handle brace matching.
+void QsciScintilla::braceMatch()
+{
+    long braceAtCaret, braceOpposite;
+
+    findMatchingBrace(braceAtCaret, braceOpposite, braceMode);
+
+    if (braceAtCaret >= 0 && braceOpposite < 0)
+    {
+        SendScintilla(SCI_BRACEBADLIGHT, braceAtCaret);
+        SendScintilla(SCI_SETHIGHLIGHTGUIDE, 0UL);
+    }
+    else
+    {
+        char chBrace = SendScintilla(SCI_GETCHARAT, braceAtCaret);
+
+        SendScintilla(SCI_BRACEHIGHLIGHT, braceAtCaret, braceOpposite);
+
+        long columnAtCaret = SendScintilla(SCI_GETCOLUMN, braceAtCaret);
+        long columnOpposite = SendScintilla(SCI_GETCOLUMN, braceOpposite);
+
+        if (chBrace == ':')
+        {
+            long lineStart = SendScintilla(SCI_LINEFROMPOSITION, braceAtCaret);
+            long indentPos = SendScintilla(SCI_GETLINEINDENTPOSITION,
+                    lineStart);
+            long indentPosNext = SendScintilla(SCI_GETLINEINDENTPOSITION,
+                    lineStart + 1);
+
+            columnAtCaret = SendScintilla(SCI_GETCOLUMN, indentPos);
+
+            long columnAtCaretNext = SendScintilla(SCI_GETCOLUMN,
+                    indentPosNext);
+            long indentSize = SendScintilla(SCI_GETINDENT);
+
+            if (columnAtCaretNext - indentSize > 1)
+                columnAtCaret = columnAtCaretNext - indentSize;
+
+            if (columnOpposite == 0)
+                columnOpposite = columnAtCaret;
+        }
+
+        long column = columnAtCaret;
+
+        if (column > columnOpposite)
+            column = columnOpposite;
+
+        SendScintilla(SCI_SETHIGHLIGHTGUIDE, column);
+    }
+}
+
+
+// Check if the character at a position is a brace.
+long QsciScintilla::checkBrace(long pos, int brace_style, bool &colonMode)
+{
+    long brace_pos = -1;
+    char ch = SendScintilla(SCI_GETCHARAT, pos);
+
+    if (ch == ':')
+    {
+        // A bit of a hack, we should really use a virtual.
+        if (!lex.isNull() && qstrcmp(lex->lexer(), "python") == 0)
+        {
+            brace_pos = pos;
+            colonMode = true;
+        }
+    }
+    else if (ch && strchr("[](){}<>", ch))
+    {
+        if (brace_style < 0)
+            brace_pos = pos;
+        else
+        {
+            int style = SendScintilla(SCI_GETSTYLEAT, pos) & 0x1f;
+
+            if (style == brace_style)
+                brace_pos = pos;
+        }
+    }
+
+    return brace_pos;
+}
+
+
+// Find a brace and it's match.  Return true if the current position is inside
+// a pair of braces.
+bool QsciScintilla::findMatchingBrace(long &brace, long &other, BraceMatch mode)
+{
+    bool colonMode = false;
+    int brace_style = (lex.isNull() ? -1 : lex->braceStyle());
+
+    brace = -1;
+    other = -1;
+
+    long caretPos = SendScintilla(SCI_GETCURRENTPOS);
+
+    if (caretPos > 0)
+        brace = checkBrace(caretPos - 1, brace_style, colonMode);
+
+    bool isInside = false;
+
+    if (brace < 0 && mode == SloppyBraceMatch)
+    {
+        brace = checkBrace(caretPos, brace_style, colonMode);
+
+        if (brace >= 0 && !colonMode)
+            isInside = true;
+    }
+
+    if (brace >= 0)
+    {
+        if (colonMode)
+        {
+            // Find the end of the Python indented block.
+            long lineStart = SendScintilla(SCI_LINEFROMPOSITION, brace);
+            long lineMaxSubord = SendScintilla(SCI_GETLASTCHILD, lineStart, -1);
+
+            other = SendScintilla(SCI_GETLINEENDPOSITION, lineMaxSubord);
+        }
+        else
+            other = SendScintilla(SCI_BRACEMATCH, brace, 0L);
+
+        if (other > brace)
+            isInside = !isInside;
+    }
+
+    return isInside;
+}
+
+
+// Move to the matching brace.
+void QsciScintilla::moveToMatchingBrace()
+{
+    gotoMatchingBrace(false);
+}
+
+
+// Select to the matching brace.
+void QsciScintilla::selectToMatchingBrace()
+{
+    gotoMatchingBrace(true);
+}
+
+
+// Move to the matching brace and optionally select the text.
+void QsciScintilla::gotoMatchingBrace(bool select)
+{
+    long braceAtCaret;
+    long braceOpposite;
+
+    bool isInside = findMatchingBrace(braceAtCaret, braceOpposite,
+            SloppyBraceMatch);
+
+    if (braceOpposite >= 0)
+    {
+        // Convert the character positions into caret positions based on
+        // whether the caret position was inside or outside the braces.
+        if (isInside)
+        {
+            if (braceOpposite > braceAtCaret)
+                braceAtCaret++;
+            else
+                braceOpposite++;
+        }
+        else
+        {
+            if (braceOpposite > braceAtCaret)
+                braceOpposite++;
+            else
+                braceAtCaret++;
+        }
+
+        ensureLineVisible(SendScintilla(SCI_LINEFROMPOSITION, braceOpposite));
+
+        if (select)
+            SendScintilla(SCI_SETSEL, braceAtCaret, braceOpposite);
+        else
+            SendScintilla(SCI_SETSEL, braceOpposite, braceOpposite);
+    }
+}
+
+
+// Return a position from a line number and an index within the line.
+int QsciScintilla::positionFromLineIndex(int line, int index) const
+{
+    int pos = SendScintilla(SCI_POSITIONFROMLINE, line);
+
+    // Allow for multi-byte characters.
+    for(int i = 0; i < index; i++)
+        pos = SendScintilla(SCI_POSITIONAFTER, pos);
+
+    return pos;
+}
+
+
+// Return a line number and an index within the line from a position.
+void QsciScintilla::lineIndexFromPosition(int position, int *line, int *index) const
+{
+    int lin = SendScintilla(SCI_LINEFROMPOSITION, position);
+    int linpos = SendScintilla(SCI_POSITIONFROMLINE, lin);
+    int indx = 0;
+
+    // Allow for multi-byte characters.
+    while (linpos < position)
+    {
+        int new_linpos = SendScintilla(SCI_POSITIONAFTER, linpos);
+
+        // If the position hasn't moved then we must be at the end of the text
+        // (which implies that the position passed was beyond the end of the
+        // text).
+        if (new_linpos == linpos)
+            break;
+
+        linpos = new_linpos;
+        ++indx;
+    }
+
+    *line = lin;
+    *index = indx;
+}
+
+
+// Set the source of the automatic auto-completion list.
+void QsciScintilla::setAutoCompletionSource(AutoCompletionSource source)
+{
+    acSource = source;
+}
+
+
+// Set the threshold for automatic auto-completion.
+void QsciScintilla::setAutoCompletionThreshold(int thresh)
+{
+    acThresh = thresh;
+}
+
+
+// Set the auto-completion word separators if there is no current lexer.
+void QsciScintilla::setAutoCompletionWordSeparators(const QStringList &separators)
+{
+    if (lex.isNull())
+        wseps = separators;
+}
+
+
+// Explicitly auto-complete from all sources.
+void QsciScintilla::autoCompleteFromAll()
+{
+    startAutoCompletion(AcsAll, false, use_single != AcusNever);
+}
+
+
+// Explicitly auto-complete from the APIs.
+void QsciScintilla::autoCompleteFromAPIs()
+{
+    startAutoCompletion(AcsAPIs, false, use_single != AcusNever);
+}
+
+
+// Explicitly auto-complete from the document.
+void QsciScintilla::autoCompleteFromDocument()
+{
+    startAutoCompletion(AcsDocument, false, use_single != AcusNever);
+}
+
+
+// Check if a character can be in a word.
+bool QsciScintilla::isWordCharacter(char ch) const
+{
+    return (strchr(wchars, ch) != NULL);
+}
+
+
+// Return the set of valid word characters.
+const char *QsciScintilla::wordCharacters() const
+{
+    return wchars;
+}
+
+
+// Recolour the document.
+void QsciScintilla::recolor(int start, int end)
+{
+    SendScintilla(SCI_COLOURISE, start, end);
+}
+
+
+// Registered a QPixmap image.
+void QsciScintilla::registerImage(int id, const QPixmap &pm)
+{
+    SendScintilla(SCI_REGISTERIMAGE, id, pm);
+}
+
+
+// Registered a QImage image.
+void QsciScintilla::registerImage(int id, const QImage &im)
+{
+    SendScintilla(SCI_RGBAIMAGESETHEIGHT, im.height());
+    SendScintilla(SCI_RGBAIMAGESETWIDTH, im.width());
+    SendScintilla(SCI_REGISTERRGBAIMAGE, id, im);
+}
+
+
+// Clear all registered images.
+void QsciScintilla::clearRegisteredImages()
+{
+    SendScintilla(SCI_CLEARREGISTEREDIMAGES);
+}
+
+
+// Enable auto-completion fill-ups.
+void QsciScintilla::setAutoCompletionFillupsEnabled(bool enable)
+{
+    const char *fillups;
+
+    if (!enable)
+        fillups = "";
+    else if (!lex.isNull())
+        fillups = lex->autoCompletionFillups();
+    else
+        fillups = explicit_fillups.data();
+
+    SendScintilla(SCI_AUTOCSETFILLUPS, fillups);
+
+    fillups_enabled = enable;
+}
+
+
+// See if auto-completion fill-ups are enabled.
+bool QsciScintilla::autoCompletionFillupsEnabled() const
+{
+    return fillups_enabled;
+}
+
+
+// Set the fill-up characters for auto-completion if there is no current lexer.
+void QsciScintilla::setAutoCompletionFillups(const char *fillups)
+{
+    explicit_fillups = fillups;
+    setAutoCompletionFillupsEnabled(fillups_enabled);
+}
+
+
+// Set the case sensitivity for auto-completion.
+void QsciScintilla::setAutoCompletionCaseSensitivity(bool cs)
+{
+    SendScintilla(SCI_AUTOCSETIGNORECASE, !cs);
+}
+
+
+// Return the case sensitivity for auto-completion.
+bool QsciScintilla::autoCompletionCaseSensitivity() const
+{
+    return !SendScintilla(SCI_AUTOCGETIGNORECASE);
+}
+
+
+// Set the replace word mode for auto-completion.
+void QsciScintilla::setAutoCompletionReplaceWord(bool replace)
+{
+    SendScintilla(SCI_AUTOCSETDROPRESTOFWORD, replace);
+}
+
+
+// Return the replace word mode for auto-completion.
+bool QsciScintilla::autoCompletionReplaceWord() const
+{
+    return SendScintilla(SCI_AUTOCGETDROPRESTOFWORD);
+}
+
+
+// Set the single item mode for auto-completion.
+void QsciScintilla::setAutoCompletionUseSingle(AutoCompletionUseSingle single)
+{
+    use_single = single;
+}
+
+
+// Return the single item mode for auto-completion.
+QsciScintilla::AutoCompletionUseSingle QsciScintilla::autoCompletionUseSingle() const
+{
+    return use_single;
+}
+
+
+// Set the single item mode for auto-completion (deprecated).
+void QsciScintilla::setAutoCompletionShowSingle(bool single)
+{
+    use_single = (single ? AcusExplicit : AcusNever);
+}
+
+
+// Return the single item mode for auto-completion (deprecated).
+bool QsciScintilla::autoCompletionShowSingle() const
+{
+    return (use_single != AcusNever);
+}
+
+
+// Set current call tip position.
+void QsciScintilla::setCallTipsPosition(CallTipsPosition position)
+{
+    SendScintilla(SCI_CALLTIPSETPOSITION, (position == CallTipsAboveText));
+    call_tips_position = position;
+}
+
+
+// Set current call tip style.
+void QsciScintilla::setCallTipsStyle(CallTipsStyle style)
+{
+    call_tips_style = style;
+}
+
+
+// Set maximum number of call tips displayed.
+void QsciScintilla::setCallTipsVisible(int nr)
+{
+    maxCallTips = nr;
+}
+
+
+// Set the document to display.
+void QsciScintilla::setDocument(const QsciDocument &document)
+{
+    if (doc.pdoc != document.pdoc)
+    {
+        doc.undisplay(this);
+        doc.attach(document);
+        doc.display(this,&document);
+    }
+}
+
+
+// Ensure the document is read-write and return true if was was read-only.
+bool QsciScintilla::ensureRW()
+{
+    bool ro = isReadOnly();
+
+    if (ro)
+        setReadOnly(false);
+
+    return ro;
+}
+
+
+// Return the number of the first visible line.
+int QsciScintilla::firstVisibleLine() const
+{
+    return SendScintilla(SCI_GETFIRSTVISIBLELINE);
+}
+
+
+// Set the number of the first visible line.
+void QsciScintilla::setFirstVisibleLine(int linenr)
+{
+    SendScintilla(SCI_SETFIRSTVISIBLELINE, linenr);
+}
+
+
+// Return the height in pixels of the text in a particular line.
+int QsciScintilla::textHeight(int linenr) const
+{
+    return SendScintilla(SCI_TEXTHEIGHT, linenr);
+}
+
+
+// See if auto-completion or user list is active.
+bool QsciScintilla::isListActive() const
+{
+    return SendScintilla(SCI_AUTOCACTIVE);
+}
+
+
+// Cancel any current auto-completion or user list.
+void QsciScintilla::cancelList()
+{
+    SendScintilla(SCI_AUTOCCANCEL);
+}
+
+
+// Handle a selection from the auto-completion list.
+void QsciScintilla::handleAutoCompletionSelection()
+{
+    if (!lex.isNull())
+    {
+        QsciAbstractAPIs *apis = lex->apis();
+
+        if (apis)
+            apis->autoCompletionSelected(acSelection);
+    }
+}
+
+
+// Display a user list.
+void QsciScintilla::showUserList(int id, const QStringList &list)
+{
+    // Sanity check to make sure auto-completion doesn't get confused.
+    if (id <= 0)
+        return;
+
+    SendScintilla(SCI_AUTOCSETSEPARATOR, userSeparator);
+
+    ScintillaBytes s = textAsBytes(list.join(QChar(userSeparator)));
+    SendScintilla(SCI_USERLISTSHOW, id, ScintillaBytesConstData(s));
+}
+
+
+// Translate the SCN_USERLISTSELECTION notification into something more useful.
+void QsciScintilla::handleUserListSelection(const char *text, int id)
+{
+    emit userListActivated(id, QString(text));
+
+    // Make sure the editor hasn't been deactivated as a side effect.
+    activateWindow();
+}
+
+
+// Return the case sensitivity of any lexer.
+bool QsciScintilla::caseSensitive() const
+{
+    return lex.isNull() ? true : lex->caseSensitive();
+}
+
+
+// Return true if the current list is an auto-completion list rather than a
+// user list.
+bool QsciScintilla::isAutoCompletionList() const
+{
+    return (SendScintilla(SCI_AUTOCGETSEPARATOR) == acSeparator);
+}
+
+
+// Read the text from a QIODevice.
+bool QsciScintilla::read(QIODevice *io)
+{
+    const int min_size = 1024 * 8;
+
+    int buf_size = min_size;
+    char *buf = new char[buf_size];
+
+    int data_len = 0;
+    bool ok = true;
+
+    qint64 part;
+
+    // Read the whole lot in so we don't have to worry about character
+    // boundaries.
+    do
+    {
+        // Make sure there is a minimum amount of room.
+        if (buf_size - data_len < min_size)
+        {
+            buf_size *= 2;
+            char *new_buf = new char[buf_size * 2];
+
+            memcpy(new_buf, buf, data_len);
+            delete[] buf;
+            buf = new_buf;
+        }
+
+        part = io->read(buf + data_len, buf_size - data_len - 1);
+        data_len += part;
+    }
+    while (part > 0);
+
+    if (part < 0)
+        ok = false;
+    else
+    {
+        buf[data_len] = '\0';
+
+        bool ro = ensureRW();
+
+        SendScintilla(SCI_SETTEXT, buf);
+        SendScintilla(SCI_EMPTYUNDOBUFFER);
+
+        setReadOnly(ro);
+    }
+
+    delete[] buf;
+
+    return ok;
+}
+
+
+// Write the text to a QIODevice.
+bool QsciScintilla::write(QIODevice *io) const
+{
+    const char *buf = reinterpret_cast<const char *>(SendScintillaPtrResult(SCI_GETCHARACTERPOINTER));
+
+    const char *bp = buf;
+    uint buflen = qstrlen(buf);
+
+    while (buflen > 0)
+    {
+        qint64 part = io->write(bp, buflen);
+
+        if (part < 0)
+            return false;
+
+        bp += part;
+        buflen -= part;
+    }
+
+    return true;
+}
+
+
+// Return the word at the given coordinates.
+QString QsciScintilla::wordAtLineIndex(int line, int index) const
+{
+    return wordAtPosition(positionFromLineIndex(line, index));
+}
+
+
+// Return the word at the given coordinates.
+QString QsciScintilla::wordAtPoint(const QPoint &point) const
+{
+    long close_pos = SendScintilla(SCI_POSITIONFROMPOINTCLOSE, point.x(),
+            point.y());
+
+    return wordAtPosition(close_pos);
+}
+
+
+// Return the word at the given position.
+QString QsciScintilla::wordAtPosition(int position) const
+{
+    if (position < 0)
+        return QString();
+
+    long start_pos = SendScintilla(SCI_WORDSTARTPOSITION, position, true);
+    long end_pos = SendScintilla(SCI_WORDENDPOSITION, position, true);
+
+    if (start_pos >= end_pos)
+        return QString();
+
+    return text(start_pos, end_pos);
+}
+
+
+// Return the display style for annotations.
+QsciScintilla::AnnotationDisplay QsciScintilla::annotationDisplay() const
+{
+    return (AnnotationDisplay)SendScintilla(SCI_ANNOTATIONGETVISIBLE);
+}
+
+
+// Set the display style for annotations.
+void QsciScintilla::setAnnotationDisplay(QsciScintilla::AnnotationDisplay display)
+{
+    SendScintilla(SCI_ANNOTATIONSETVISIBLE, display);
+    setScrollBars();
+}
+
+
+// Clear annotations.
+void QsciScintilla::clearAnnotations(int line)
+{
+    if (line >= 0)
+        SendScintilla(SCI_ANNOTATIONSETTEXT, line, (const char *)0);
+    else
+        SendScintilla(SCI_ANNOTATIONCLEARALL);
+
+    setScrollBars();
+}
+
+
+// Annotate a line.
+void QsciScintilla::annotate(int line, const QString &text, int style)
+{
+    int style_offset = SendScintilla(SCI_ANNOTATIONGETSTYLEOFFSET);
+
+    ScintillaBytes s = textAsBytes(text);
+
+    SendScintilla(SCI_ANNOTATIONSETTEXT, line, ScintillaBytesConstData(s));
+    SendScintilla(SCI_ANNOTATIONSETSTYLE, line, style - style_offset);
+
+    setScrollBars();
+}
+
+
+// Annotate a line.
+void QsciScintilla::annotate(int line, const QString &text, const QsciStyle &style)
+{
+    style.apply(this);
+
+    annotate(line, text, style.style());
+}
+
+
+// Annotate a line.
+void QsciScintilla::annotate(int line, const QsciStyledText &text)
+{
+    text.apply(this);
+
+    annotate(line, text.text(), text.style());
+}
+
+
+// Annotate a line.
+void QsciScintilla::annotate(int line, const QList<QsciStyledText> &text)
+{
+    char *styles;
+    ScintillaBytes styled_text = styleText(text, &styles,
+            SendScintilla(SCI_ANNOTATIONGETSTYLEOFFSET));
+
+    SendScintilla(SCI_ANNOTATIONSETTEXT, line,
+            ScintillaBytesConstData(styled_text));
+    SendScintilla(SCI_ANNOTATIONSETSTYLES, line, styles);
+
+    delete[] styles;
+}
+
+
+// Get the annotation for a line, if any.
+QString QsciScintilla::annotation(int line) const
+{
+    char *buf = new char[SendScintilla(SCI_ANNOTATIONGETTEXT, line, (const char *)0) + 1];
+
+    buf[SendScintilla(SCI_ANNOTATIONGETTEXT, line, buf)] = '\0';
+
+    QString qs = bytesAsText(buf);
+    delete[] buf;
+
+    return qs;
+}
+
+
+// Convert a list of styled text to the low-level arrays.
+QsciScintillaBase::ScintillaBytes QsciScintilla::styleText(const QList<QsciStyledText> &styled_text, char **styles, int style_offset)
+{
+    QString text;
+    int i;
+
+    // Build the full text.
+    for (i = 0; i < styled_text.count(); ++i)
+    {
+        const QsciStyledText &st = styled_text[i];
+
+        st.apply(this);
+
+        text.append(st.text());
+    }
+
+    ScintillaBytes s = textAsBytes(text);
+
+    // There is a style byte for every byte.
+    char *sp = *styles = new char[s.length()];
+
+    for (i = 0; i < styled_text.count(); ++i)
+    {
+        const QsciStyledText &st = styled_text[i];
+        ScintillaBytes part = textAsBytes(st.text());
+        int part_length = part.length();
+
+        for (int c = 0; c < part_length; ++c)
+            *sp++ = (char)(st.style() - style_offset);
+    }
+
+    return s;
+}
+
+
+// Convert Scintilla modifiers to the Qt equivalent.
+int QsciScintilla::mapModifiers(int modifiers)
+{
+    int state = 0;
+
+    if (modifiers & SCMOD_SHIFT)
+        state |= Qt::ShiftModifier;
+
+    if (modifiers & SCMOD_CTRL)
+        state |= Qt::ControlModifier;
+
+    if (modifiers & SCMOD_ALT)
+        state |= Qt::AltModifier;
+
+    if (modifiers & (SCMOD_SUPER | SCMOD_META))
+        state |= Qt::MetaModifier;
+
+    return state;
+}
+
+
+// Re-implemented to handle shortcut overrides.
+bool QsciScintilla::event(QEvent *e)
+{
+    if (e->type() == QEvent::ShortcutOverride && !isReadOnly())
+    {
+        QKeyEvent *ke = static_cast<QKeyEvent *>(e);
+
+        if (ke->key())
+        {
+            // We want ordinary characters.
+            if ((ke->modifiers() == Qt::NoModifier || ke->modifiers() == Qt::ShiftModifier || ke->modifiers() == Qt::KeypadModifier) && ke->key() < Qt::Key_Escape)
+            {
+                ke->accept();
+                return true;
+            }
+
+            // We want any key that is bound.
+            QsciCommand *cmd = stdCmds->boundTo(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier));
+
+            if (cmd)
+            {
+                ke->accept();
+                return true;
+            }
+        }
+    }
+
+    return QsciScintillaBase::event(e);
+}
+
+
+// Re-implemented to zoom when the Control modifier is pressed.
+void QsciScintilla::wheelEvent(QWheelEvent *e)
+{
+#if defined(Q_OS_MAC)
+    const Qt::KeyboardModifier zoom_modifier = Qt::MetaModifier;
+#else
+    const Qt::KeyboardModifier zoom_modifier = Qt::ControlModifier;
+#endif
+
+   if ((e->modifiers() & zoom_modifier) != 0)
+   {
+       if (e->delta() > 0)
+           zoomIn();
+       else
+           zoomOut();
+   }
+   else 
+   {
+       QsciScintillaBase::wheelEvent(e);
+   }
+}
+
+
+// Re-implemented to handle chenges to the enabled state.
+void QsciScintilla::changeEvent(QEvent *e)
+{
+    QsciScintillaBase::changeEvent(e);
+
+    if (e->type() != QEvent::EnabledChange)
+        return;
+
+    if (isEnabled())
+        SendScintilla(SCI_SETCARETSTYLE, CARETSTYLE_LINE);
+    else
+        SendScintilla(SCI_SETCARETSTYLE, CARETSTYLE_INVISIBLE);
+
+    QColor fore = palette().color(QPalette::Disabled, QPalette::Text);
+    QColor back = palette().color(QPalette::Disabled, QPalette::Base);
+
+    if (lex.isNull())
+    {
+        if (isEnabled())
+        {
+            fore = nl_text_colour;
+            back = nl_paper_colour;
+        }
+
+        SendScintilla(SCI_STYLESETFORE, 0, fore);
+
+        // Assume style 0 applies to everything so that we don't need to use
+        // SCI_STYLECLEARALL which clears everything.  We still have to set the
+        // default style as well for the background without any text.
+        SendScintilla(SCI_STYLESETBACK, 0, back);
+        SendScintilla(SCI_STYLESETBACK, STYLE_DEFAULT, back);
+    }
+    else
+    {
+        setEnabledColors(STYLE_DEFAULT, fore, back);
+
+        for (int s = 0; s <= STYLE_MAX; ++s)
+            if (!lex->description(s).isNull())
+                setEnabledColors(s, fore, back);
+    }
+}
+
+
+// Set the foreground and background colours for a style.
+void QsciScintilla::setEnabledColors(int style, QColor &fore, QColor &back)
+{
+    if (isEnabled())
+    {
+        fore = lex->color(style);
+        back = lex->paper(style);
+    }
+
+    handleStyleColorChange(fore, style);
+    handleStylePaperChange(back, style);
+}
+
+
+// Re-implemented to implement a more Qt-like context menu.
+void QsciScintilla::contextMenuEvent(QContextMenuEvent *e)
+{
+    if (contextMenuNeeded(e->x(), e->y()))
+    {
+        QMenu *menu = createStandardContextMenu();
+
+        if (menu)
+        {
+            menu->setAttribute(Qt::WA_DeleteOnClose);
+            menu->popup(e->globalPos());
+        }
+    }
+}
+
+
+// Create an instance of the standard context menu.
+QMenu *QsciScintilla::createStandardContextMenu()
+{
+    bool read_only = isReadOnly();
+    bool has_selection = hasSelectedText();
+    QMenu *menu = new QMenu(this);
+    QAction *action;
+
+    if (!read_only)
+    {
+        action = menu->addAction(tr("&Undo"), this, SLOT(undo()));
+        set_shortcut(action, QsciCommand::Undo);
+        action->setEnabled(isUndoAvailable());
+
+        action = menu->addAction(tr("&Redo"), this, SLOT(redo()));
+        set_shortcut(action, QsciCommand::Redo);
+        action->setEnabled(isRedoAvailable());
+
+        menu->addSeparator();
+
+        action = menu->addAction(tr("Cu&t"), this, SLOT(cut()));
+        set_shortcut(action, QsciCommand::SelectionCut);
+        action->setEnabled(has_selection);
+    }
+
+    action = menu->addAction(tr("&Copy"), this, SLOT(copy()));
+    set_shortcut(action, QsciCommand::SelectionCopy);
+    action->setEnabled(has_selection);
+
+    if (!read_only)
+    {
+        action = menu->addAction(tr("&Paste"), this, SLOT(paste()));
+        set_shortcut(action, QsciCommand::Paste);
+        action->setEnabled(SendScintilla(SCI_CANPASTE));
+
+        action = menu->addAction(tr("Delete"), this, SLOT(delete_selection()));
+        action->setEnabled(has_selection);
+    }
+
+    if (!menu->isEmpty())
+        menu->addSeparator();
+
+    action = menu->addAction(tr("Select All"), this, SLOT(selectAll()));
+    set_shortcut(action, QsciCommand::SelectAll);
+    action->setEnabled(length() != 0);
+
+    return menu;
+}
+
+
+// Set the shortcut for an action using any current key binding.
+void QsciScintilla::set_shortcut(QAction *action, QsciCommand::Command cmd_id) const
+{
+    QsciCommand *cmd = stdCmds->find(cmd_id);
+
+    if (cmd && cmd->key())
+        action->setShortcut(QKeySequence(cmd->key()));
+}
+
+
+// Delete the current selection.
+void QsciScintilla::delete_selection()
+{
+    SendScintilla(SCI_CLEAR);
+}
+
+
+// Convert a Scintilla colour to a QColor.
+static QColor asQColor(long sci_colour)
+{
+    return QColor(
+            ((int)sci_colour) & 0x00ff,
+            ((int)(sci_colour >> 8)) & 0x00ff,
+            ((int)(sci_colour >> 16)) & 0x00ff);
+}
+
+
+// Set the scroll width.
+void QsciScintilla::setScrollWidth(int pixelWidth)
+{
+    SendScintilla(SCI_SETSCROLLWIDTH, pixelWidth);
+}
+
+// Get the scroll width.
+int QsciScintilla::scrollWidth() const
+{
+    return SendScintilla(SCI_GETSCROLLWIDTH);
+}
+
+
+// Set scroll width tracking.
+void QsciScintilla::setScrollWidthTracking(bool enabled)
+{
+    SendScintilla(SCI_SETSCROLLWIDTHTRACKING, enabled);
+}
+
+
+// Get scroll width tracking.
+bool QsciScintilla::scrollWidthTracking() const
+{
+    return SendScintilla(SCI_GETSCROLLWIDTHTRACKING);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qsci/qsciscintillabase.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,880 @@
+// This module implements the "official" low-level API.
+//
+// Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
+// 
+// This file is part of QScintilla.
+// 
+// This file may be used under the terms of the GNU General Public License
+// version 3.0 as published by the Free Software Foundation and appearing in
+// the file LICENSE included in the packaging of this file.  Please review the
+// following information to ensure the GNU General Public License version 3.0
+// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+// 
+// If you do not wish to use this file under the terms of the GPL version 3.0
+// then you may purchase a commercial license.  For more information contact
+// info@riverbankcomputing.com.
+// 
+// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+#include "Qsci/qsciscintillabase.h"
+
+#include <QApplication>
+#include <QClipboard>
+#include <QColor>
+#include <QContextMenuEvent>
+#include <QDragEnterEvent>
+#include <QDragMoveEvent>
+#include <QDropEvent>
+#include <QDragLeaveEvent>
+#include <QFocusEvent>
+#include <QKeyEvent>
+#include <QList>
+#include <QMimeData>
+#include <QMouseEvent>
+#include <QPaintEvent>
+#include <QScrollBar>
+#include <QStyle>
+#include <QTextCodec>
+
+#include "SciAccessibility.h"
+#include "ScintillaQt.h"
+
+
+// The #defines in Scintilla.h and the enums in qsciscintillabase.h conflict
+// (because we want to use the same names) so we have to undefine those we use
+// in this file.
+#undef  SCI_SETCARETPERIOD
+#undef  SCK_DOWN
+#undef  SCK_UP
+#undef  SCK_LEFT
+#undef  SCK_RIGHT
+#undef  SCK_HOME
+#undef  SCK_END
+#undef  SCK_PRIOR
+#undef  SCK_NEXT
+#undef  SCK_DELETE
+#undef  SCK_INSERT
+#undef  SCK_ESCAPE
+#undef  SCK_BACK
+#undef  SCK_TAB
+#undef  SCK_RETURN
+#undef  SCK_ADD
+#undef  SCK_SUBTRACT
+#undef  SCK_DIVIDE
+#undef  SCK_WIN
+#undef  SCK_RWIN
+#undef  SCK_MENU
+#undef  SCN_URIDROPPED
+
+
+// Remember if we have linked the lexers.
+static bool lexersLinked = false;
+
+// The list of instances.
+static QList<QsciScintillaBase *> poolList;
+
+// Mime support.
+static const QLatin1String mimeTextPlain("text/plain");
+static const QLatin1String mimeRectangularWin("MSDEVColumnSelect");
+static const QLatin1String mimeRectangular("text/x-qscintilla-rectangular");
+
+#if (QT_VERSION >= 0x040200 && QT_VERSION < 0x050000 && defined(Q_OS_MAC)) || (QT_VERSION >= 0x050200 && defined(Q_OS_OSX))
+extern void initialiseRectangularPasteboardMime();
+#endif
+
+
+// The ctor.
+QsciScintillaBase::QsciScintillaBase(QWidget *parent)
+    : QAbstractScrollArea(parent), preeditPos(-1), preeditNrBytes(0)
+#if QT_VERSION >= 0x050000
+        , clickCausedFocus(false)
+#endif
+{
+#if !defined(QT_NO_ACCESSIBILITY)
+    QsciAccessibleScintillaBase::initialise();
+#endif
+
+    connectVerticalScrollBar();
+    connectHorizontalScrollBar();
+
+    setAcceptDrops(true);
+    setFocusPolicy(Qt::WheelFocus);
+    setAttribute(Qt::WA_KeyCompression);
+    setAttribute(Qt::WA_InputMethodEnabled);
+#if QT_VERSION >= 0x050100
+    setInputMethodHints(
+            Qt::ImhNoAutoUppercase|Qt::ImhNoPredictiveText|Qt::ImhMultiLine);
+#elif QT_VERSION >= 0x040600
+    setInputMethodHints(Qt::ImhNoAutoUppercase|Qt::ImhNoPredictiveText);
+#endif
+
+    viewport()->setBackgroundRole(QPalette::Base);
+    viewport()->setMouseTracking(true);
+    viewport()->setAttribute(Qt::WA_NoSystemBackground);
+
+    triple_click.setSingleShot(true);
+
+#if (QT_VERSION >= 0x040200 && QT_VERSION < 0x050000 && defined(Q_OS_MAC)) || (QT_VERSION >= 0x050200 && defined(Q_OS_OSX))
+    initialiseRectangularPasteboardMime();
+#endif
+
+    sci = new QsciScintillaQt(this);
+
+    SendScintilla(SCI_SETCARETPERIOD, QApplication::cursorFlashTime() / 2);
+
+    // Make sure the lexers are linked in.
+    if (!lexersLinked)
+    {
+        Scintilla_LinkLexers();
+        lexersLinked = true;
+    }
+
+    // Add it to the pool.
+    poolList.append(this);
+}
+
+
+// The dtor.
+QsciScintillaBase::~QsciScintillaBase()
+{
+    // The QsciScintillaQt object isn't a child so delete it explicitly.
+    delete sci;
+
+    // Remove it from the pool.
+    poolList.removeAt(poolList.indexOf(this));
+}
+
+
+// Return an instance from the pool.
+QsciScintillaBase *QsciScintillaBase::pool()
+{
+    return poolList.first();
+}
+
+
+// Tell Scintilla to update the scroll bars.  Scintilla should be doing this
+// itself.
+void QsciScintillaBase::setScrollBars()
+{
+    sci->SetScrollBars();
+}
+
+
+// Send a message to the real Scintilla widget using the low level Scintilla
+// API.
+long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam,
+        long lParam) const
+{
+    return sci->WndProc(msg, wParam, lParam);
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam,
+        void *lParam) const
+{
+    return sci->WndProc(msg, wParam, reinterpret_cast<sptr_t>(lParam));
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, uintptr_t wParam,
+        const char *lParam) const
+{
+    return sci->WndProc(msg, wParam, reinterpret_cast<sptr_t>(lParam));
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg,
+        const char *lParam) const
+{
+    return sci->WndProc(msg, static_cast<uptr_t>(0),
+            reinterpret_cast<sptr_t>(lParam));
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, const char *wParam,
+        const char *lParam) const
+{
+    return sci->WndProc(msg, reinterpret_cast<uptr_t>(wParam),
+            reinterpret_cast<sptr_t>(lParam));
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, long wParam) const
+{
+    return sci->WndProc(msg, static_cast<uptr_t>(wParam),
+            static_cast<sptr_t>(0));
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, int wParam) const
+{
+    return sci->WndProc(msg, static_cast<uptr_t>(wParam),
+            static_cast<sptr_t>(0));
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, long cpMin, long cpMax,
+        char *lpstrText) const
+{
+    Sci_TextRange tr;
+
+    tr.chrg.cpMin = cpMin;
+    tr.chrg.cpMax = cpMax;
+    tr.lpstrText = lpstrText;
+
+    return sci->WndProc(msg, static_cast<uptr_t>(0),
+            reinterpret_cast<sptr_t>(&tr));
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam,
+        const QColor &col) const
+{
+    sptr_t lParam = (col.blue() << 16) | (col.green() << 8) | col.red();
+
+    return sci->WndProc(msg, wParam, lParam);
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, const QColor &col) const
+{
+    uptr_t wParam = (col.blue() << 16) | (col.green() << 8) | col.red();
+
+    return sci->WndProc(msg, wParam, static_cast<sptr_t>(0));
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam,
+        QPainter *hdc, const QRect &rc, long cpMin, long cpMax) const
+{
+    Sci_RangeToFormat rf;
+
+    rf.hdc = rf.hdcTarget = reinterpret_cast<Scintilla::SurfaceID>(hdc);
+
+    rf.rc.left = rc.left();
+    rf.rc.top = rc.top();
+    rf.rc.right = rc.right() + 1;
+    rf.rc.bottom = rc.bottom() + 1;
+
+    rf.chrg.cpMin = cpMin;
+    rf.chrg.cpMax = cpMax;
+
+    return sci->WndProc(msg, wParam, reinterpret_cast<sptr_t>(&rf));
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam,
+        const QPixmap &lParam) const
+{
+    return sci->WndProc(msg, wParam, reinterpret_cast<sptr_t>(&lParam));
+}
+
+
+// Overloaded message send.
+long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam,
+        const QImage &lParam) const
+{
+    return sci->WndProc(msg, wParam, reinterpret_cast<sptr_t>(&lParam));
+}
+
+
+// Send a message to the real Scintilla widget using the low level Scintilla
+// API that returns a pointer result.
+void *QsciScintillaBase::SendScintillaPtrResult(unsigned int msg) const
+{
+    return reinterpret_cast<void *>(sci->WndProc(msg, static_cast<uptr_t>(0),
+            static_cast<sptr_t>(0)));
+}
+
+
+// Re-implemented to handle font changes
+void QsciScintillaBase::changeEvent(QEvent *e)
+{
+    if (e->type() == QEvent::FontChange || e->type() == QEvent::ApplicationFontChange)
+        sci->InvalidateStyleRedraw();
+
+    QAbstractScrollArea::changeEvent(e);
+}
+
+
+// Re-implemented to handle the context menu.
+void QsciScintillaBase::contextMenuEvent(QContextMenuEvent *e)
+{
+    sci->ContextMenu(Scintilla::Point(e->globalX(), e->globalY()));
+}
+
+
+// Re-implemented to tell the widget it has the focus.
+void QsciScintillaBase::focusInEvent(QFocusEvent *e)
+{
+    sci->SetFocusState(true);
+
+#if QT_VERSION >= 0x050000
+    clickCausedFocus = (e->reason() == Qt::MouseFocusReason);
+#endif
+
+    QAbstractScrollArea::focusInEvent(e);
+}
+
+
+// Re-implemented to tell the widget it has lost the focus.
+void QsciScintillaBase::focusOutEvent(QFocusEvent *e)
+{
+    if (e->reason() == Qt::ActiveWindowFocusReason)
+    {
+        // Only tell Scintilla we have lost focus if the new active window
+        // isn't our auto-completion list.  This is probably only an issue on
+        // Linux and there are still problems because subsequent focus out
+        // events don't always seem to get generated (at least with Qt5).
+
+        QWidget *aw = QApplication::activeWindow();
+
+        if (!aw || aw->parent() != this || !aw->inherits("QsciSciListBox"))
+            sci->SetFocusState(false);
+    }
+    else
+    {
+        sci->SetFocusState(false);
+    }
+
+    QAbstractScrollArea::focusOutEvent(e);
+}
+
+
+// Re-implemented to make sure tabs are passed to the editor.
+bool QsciScintillaBase::focusNextPrevChild(bool next)
+{
+    if (!sci->pdoc->IsReadOnly())
+        return false;
+
+    return QAbstractScrollArea::focusNextPrevChild(next);
+}
+
+
+// Handle key presses.
+void QsciScintillaBase::keyPressEvent(QKeyEvent *e)
+{
+    int modifiers = 0;
+
+    if (e->modifiers() & Qt::ShiftModifier)
+        modifiers |= SCMOD_SHIFT;
+
+    if (e->modifiers() & Qt::ControlModifier)
+        modifiers |= SCMOD_CTRL;
+
+    if (e->modifiers() & Qt::AltModifier)
+        modifiers |= SCMOD_ALT;
+
+    if (e->modifiers() & Qt::MetaModifier)
+        modifiers |= SCMOD_META;
+
+    int key = commandKey(e->key(), modifiers);
+
+    if (key)
+    {
+        bool consumed = false;
+
+        sci->KeyDownWithModifiers(key, modifiers, &consumed);
+
+        if (consumed)
+        {
+            e->accept();
+            return;
+        }
+    }
+
+    QString text = e->text();
+
+    if (!text.isEmpty() && text[0].isPrint())
+    {
+        ScintillaBytes bytes = textAsBytes(text);
+        sci->AddCharUTF(bytes.data(), bytes.length());
+        e->accept();
+    }
+    else
+    {
+        QAbstractScrollArea::keyPressEvent(e);
+    }
+}
+
+
+// Map a Qt key to a valid Scintilla command key, or 0 if none.
+int QsciScintillaBase::commandKey(int qt_key, int &modifiers)
+{
+    int key;
+
+    switch (qt_key)
+    {
+    case Qt::Key_Down:
+        key = SCK_DOWN;
+        break;
+
+    case Qt::Key_Up:
+        key = SCK_UP;
+        break;
+
+    case Qt::Key_Left:
+        key = SCK_LEFT;
+        break;
+
+    case Qt::Key_Right:
+        key = SCK_RIGHT;
+        break;
+
+    case Qt::Key_Home:
+        key = SCK_HOME;
+        break;
+
+    case Qt::Key_End:
+        key = SCK_END;
+        break;
+
+    case Qt::Key_PageUp:
+        key = SCK_PRIOR;
+        break;
+
+    case Qt::Key_PageDown:
+        key = SCK_NEXT;
+        break;
+
+    case Qt::Key_Delete:
+        key = SCK_DELETE;
+        break;
+
+    case Qt::Key_Insert:
+        key = SCK_INSERT;
+        break;
+
+    case Qt::Key_Escape:
+        key = SCK_ESCAPE;
+        break;
+
+    case Qt::Key_Backspace:
+        key = SCK_BACK;
+        break;
+
+    case Qt::Key_Tab:
+        key = SCK_TAB;
+        break;
+
+    case Qt::Key_Backtab:
+        // Scintilla assumes a backtab is shift-tab.
+        key = SCK_TAB;
+        modifiers |= SCMOD_SHIFT;
+        break;
+
+    case Qt::Key_Return:
+    case Qt::Key_Enter:
+        key = SCK_RETURN;
+        break;
+
+    case Qt::Key_Super_L:
+        key = SCK_WIN;
+        break;
+
+    case Qt::Key_Super_R:
+        key = SCK_RWIN;
+        break;
+
+    case Qt::Key_Menu:
+        key = SCK_MENU;
+        break;
+
+    default:
+        if ((key = qt_key) > 0x7f)
+            key = 0;
+    }
+
+    return key;
+}
+
+
+// Encode a QString as bytes.
+QsciScintillaBase::ScintillaBytes QsciScintillaBase::textAsBytes(const QString &text) const
+{
+    if (sci->IsUnicodeMode())
+        return text.toUtf8();
+
+    return text.toLatin1();
+}
+
+
+// Decode bytes as a QString.
+QString QsciScintillaBase::bytesAsText(const char *bytes) const
+{
+    if (sci->IsUnicodeMode())
+        return QString::fromUtf8(bytes);
+
+    return QString::fromLatin1(bytes);
+}
+
+
+// Handle a mouse button double click.
+void QsciScintillaBase::mouseDoubleClickEvent(QMouseEvent *e)
+{
+    if (e->button() != Qt::LeftButton)
+    {
+        e->ignore();
+        return;
+    }
+
+    setFocus();
+
+    // Make sure Scintilla will interpret this as a double-click.
+    unsigned clickTime = sci->lastClickTime + Scintilla::Platform::DoubleClickTime() - 1;
+
+    sci->ButtonDownWithModifiers(Scintilla::Point(e->x(), e->y()), clickTime,
+            eventModifiers(e));
+
+    // Remember the current position and time in case it turns into a triple
+    // click.
+    triple_click_at = e->globalPos();
+    triple_click.start(QApplication::doubleClickInterval());
+}
+
+
+// Handle a mouse move.
+void QsciScintillaBase::mouseMoveEvent(QMouseEvent *e)
+{
+    sci->ButtonMoveWithModifiers(Scintilla::Point(e->x(), e->y()), 0,
+            eventModifiers(e));
+}
+
+
+// Handle a mouse button press.
+void QsciScintillaBase::mousePressEvent(QMouseEvent *e)
+{
+    setFocus();
+
+    Scintilla::Point pt(e->x(), e->y());
+
+    if (e->button() == Qt::LeftButton || e->button() == Qt::RightButton)
+    {
+        unsigned clickTime;
+
+        // It is a triple click if the timer is running and the mouse hasn't
+        // moved too much.
+        if (triple_click.isActive() && (e->globalPos() - triple_click_at).manhattanLength() < QApplication::startDragDistance())
+            clickTime = sci->lastClickTime + Scintilla::Platform::DoubleClickTime() - 1;
+        else
+            clickTime = sci->lastClickTime + Scintilla::Platform::DoubleClickTime() + 1;
+
+        triple_click.stop();
+
+        // Scintilla uses the Alt modifier to initiate rectangular selection.
+        // However the GTK port (under X11, not Windows) uses the Control
+        // modifier (by default, although it is configurable).  It does this
+        // because most X11 window managers hijack Alt-drag to move the window.
+        // We do the same, except that (for the moment at least) we don't allow
+        // the modifier to be configured.
+        bool shift = e->modifiers() & Qt::ShiftModifier;
+        bool ctrl = e->modifiers() & Qt::ControlModifier;
+#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
+        bool alt = e->modifiers() & Qt::AltModifier;
+#else
+        bool alt = ctrl;
+#endif
+
+        if (e->button() == Qt::LeftButton)
+            sci->ButtonDownWithModifiers(pt, clickTime,
+                    QsciScintillaQt::ModifierFlags(shift, ctrl, alt));
+        else
+            sci->RightButtonDownWithModifiers(pt, clickTime,
+                    QsciScintillaQt::ModifierFlags(shift, ctrl, alt));
+    }
+    else if (e->button() == Qt::MidButton)
+    {
+        QClipboard *cb = QApplication::clipboard();
+
+        if (cb->supportsSelection())
+        {
+            int pos = sci->PositionFromLocation(pt);
+
+            sci->sel.Clear();
+            sci->SetSelection(pos, pos);
+
+            sci->pasteFromClipboard(QClipboard::Selection);
+        }
+    }
+}
+
+
+// Handle a mouse button releases.
+void QsciScintillaBase::mouseReleaseEvent(QMouseEvent *e)
+{
+    if (e->button() != Qt::LeftButton)
+        return;
+
+    Scintilla::Point pt(e->x(), e->y());
+
+    if (sci->HaveMouseCapture())
+    {
+        bool ctrl = e->modifiers() & Qt::ControlModifier;
+
+        sci->ButtonUpWithModifiers(pt, 0,
+                QsciScintillaQt::ModifierFlags(false, ctrl, false));
+    }
+
+#if QT_VERSION >= 0x050000
+    if (!sci->pdoc->IsReadOnly() && !sci->PointInSelMargin(pt) && qApp->autoSipEnabled())
+    {
+        QStyle::RequestSoftwareInputPanel rsip = QStyle::RequestSoftwareInputPanel(style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
+
+        if (!clickCausedFocus || rsip == QStyle::RSIP_OnMouseClick)
+            qApp->inputMethod()->show();
+    }
+
+    clickCausedFocus = false;
+#endif
+}
+
+
+// Handle paint events.
+void QsciScintillaBase::paintEvent(QPaintEvent *e)
+{
+    sci->paintEvent(e);
+}
+
+
+// Handle resize events.
+void QsciScintillaBase::resizeEvent(QResizeEvent *)
+{
+    sci->ChangeSize();
+}
+
+
+// Re-implemented to suppress the default behaviour as Scintilla works at a
+// more fundamental level.  Note that this means that replacing the scrollbars
+// with custom versions does not work.
+void QsciScintillaBase::scrollContentsBy(int, int)
+{
+}
+
+
+// Handle the vertical scrollbar.
+void QsciScintillaBase::handleVSb(int value)
+{
+    sci->ScrollTo(value);
+}
+
+
+// Handle the horizontal scrollbar.
+void QsciScintillaBase::handleHSb(int value)
+{
+    sci->HorizontalScrollTo(value);
+}
+
+
+// Handle drag enters.
+void QsciScintillaBase::dragEnterEvent(QDragEnterEvent *e)
+{
+    QsciScintillaBase::dragMoveEvent(e);
+}
+
+
+// Handle drag leaves.
+void QsciScintillaBase::dragLeaveEvent(QDragLeaveEvent *)
+{
+    sci->SetDragPosition(Scintilla::SelectionPosition());
+}
+
+
+// Handle drag moves.
+void QsciScintillaBase::dragMoveEvent(QDragMoveEvent *e)
+{
+    if (e->mimeData()->hasUrls())
+    {
+        e->acceptProposedAction();
+    }
+    else
+    {
+        sci->SetDragPosition(
+                sci->SPositionFromLocation(
+                        Scintilla::Point(e->pos().x(), e->pos().y()), false,
+                        false, sci->UserVirtualSpace()));
+
+        acceptAction(e);
+    }
+}
+
+
+// Handle drops.
+void QsciScintillaBase::dropEvent(QDropEvent *e)
+{
+    if (e->mimeData()->hasUrls())
+    {
+        e->acceptProposedAction();
+
+        foreach (const QUrl &url, e->mimeData()->urls())
+            emit SCN_URIDROPPED(url);
+
+        return;
+    }
+
+    acceptAction(e);
+
+    if (!e->isAccepted())
+        return;
+
+    bool moving;
+    int len;
+    const char *s;
+    bool rectangular;
+
+    moving = (e->dropAction() == Qt::MoveAction);
+
+    QByteArray text = fromMimeData(e->mimeData(), rectangular);
+    len = text.length();
+    s = text.data();
+
+    std::string dest = Scintilla::Document::TransformLineEnds(s, len,
+                sci->pdoc->eolMode);
+
+    sci->DropAt(sci->posDrop, dest.c_str(), dest.length(), moving,
+            rectangular);
+
+    sci->Redraw();
+}
+
+
+void QsciScintillaBase::acceptAction(QDropEvent *e)
+{
+    if (sci->pdoc->IsReadOnly() || !canInsertFromMimeData(e->mimeData()))
+        e->ignore();
+    else
+        e->acceptProposedAction();
+}
+
+
+// See if a MIME data object can be decoded.
+bool QsciScintillaBase::canInsertFromMimeData(const QMimeData *source) const
+{
+    return source->hasFormat(mimeTextPlain);
+}
+
+
+// Create text from a MIME data object.
+QByteArray QsciScintillaBase::fromMimeData(const QMimeData *source, bool &rectangular) const
+{
+    // See if it is rectangular.  We try all of the different formats that
+    // Scintilla supports in case we are working across different platforms.
+    if (source->hasFormat(mimeRectangularWin))
+        rectangular = true;
+    else if (source->hasFormat(mimeRectangular))
+        rectangular = true;
+    else
+        rectangular = false;
+
+    // Note that we don't support Scintilla's hack of adding a '\0' as Qt
+    // strips it off under the covers when pasting from another process.
+    QString utf8 = source->text();
+    QByteArray text;
+
+    if (sci->IsUnicodeMode())
+        text = utf8.toUtf8();
+    else
+        text = utf8.toLatin1();
+
+    return text;
+}
+
+
+// Create a MIME data object for some text.
+QMimeData *QsciScintillaBase::toMimeData(const QByteArray &text, bool rectangular) const
+{
+    QMimeData *mime = new QMimeData;
+
+    QString utf8;
+
+    if (sci->IsUnicodeMode())
+        utf8 = QString::fromUtf8(text.constData(), text.size());
+    else
+        utf8 = QString::fromLatin1(text.constData(), text.size());
+
+    mime->setText(utf8);
+
+    if (rectangular)
+    {
+        // Use the platform specific "standard" for specifying a rectangular
+        // selection.
+#if defined(Q_OS_WIN)
+        mime->setData(mimeRectangularWin, QByteArray());
+#else
+        mime->setData(mimeRectangular, QByteArray());
+#endif
+    }
+
+    return mime;
+}
+
+
+// Connect up the vertical scroll bar.
+void QsciScintillaBase::connectVerticalScrollBar()
+{
+    connect(verticalScrollBar(), SIGNAL(valueChanged(int)),
+            SLOT(handleVSb(int)));
+}
+
+
+// Connect up the horizontal scroll bar.
+void QsciScintillaBase::connectHorizontalScrollBar()
+{
+    connect(horizontalScrollBar(), SIGNAL(valueChanged(int)),
+            SLOT(handleHSb(int)));
+}
+
+
+//! Replace the vertical scroll bar.
+void QsciScintillaBase::replaceVerticalScrollBar(QScrollBar *scrollBar)
+{
+    setVerticalScrollBar(scrollBar);
+    connectVerticalScrollBar();
+}
+
+
+// Replace the horizontal scroll bar.
+void QsciScintillaBase::replaceHorizontalScrollBar(QScrollBar *scrollBar)
+{
+    setHorizontalScrollBar(scrollBar);
+    connectHorizontalScrollBar();
+}
+
+
+// Return true if a context menu should be displayed.  This is provided as a
+// helper to QsciScintilla::contextMenuEvent().  A proper design would break
+// backwards compatibility.
+bool QsciScintillaBase::contextMenuNeeded(int x, int y) const
+{
+    Scintilla::Point pt(x, y);
+
+    // Clear any selection if the mouse is outside.
+    if (!sci->PointInSelection(pt))
+        sci->SetEmptySelection(sci->PositionFromLocation(pt));
+
+    // Respect SC_POPUP_*.
+    return sci->ShouldDisplayPopup(pt);
+}
+
+
+// Return the Scintilla keyboard modifiers set for a mouse event.
+int QsciScintillaBase::eventModifiers(QMouseEvent *e)
+{
+    bool shift = e->modifiers() & Qt::ShiftModifier;
+    bool ctrl = e->modifiers() & Qt::ControlModifier;
+    bool alt = e->modifiers() & Qt::AltModifier;
+
+    return QsciScintillaQt::ModifierFlags(shift, ctrl, alt);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qabstractpagesetupdialog.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qabstractpagesetupdialog.h"
+#include "qabstractpagesetupdialog_p.h"
+
+#ifndef QT_NO_PRINTDIALOG
+
+#include <QtCore/qcoreapplication.h>
+#include <QtGui/qprinter.h>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+    \internal
+    \class QAbstractPageSetupDialog
+
+    \brief The QAbstractPageSetupDialog class provides a base for
+    implementations of page setup dialogs.
+*/
+
+/*!
+    Constructs the page setup dialog for the printer \a printer with
+    \a parent as parent widget.
+*/
+QAbstractPageSetupDialog::QAbstractPageSetupDialog(QPrinter *printer, QWidget *parent)
+    : QDialog(*(new QAbstractPageSetupDialogPrivate), parent)
+{
+    Q_D(QAbstractPageSetupDialog);
+    setWindowTitle(QCoreApplication::translate("QPrintPreviewDialog", "Page Setup"));
+    d->setPrinter(printer);
+}
+
+/*!
+    \internal
+*/
+QAbstractPageSetupDialog::QAbstractPageSetupDialog(QAbstractPageSetupDialogPrivate &ptr,
+                                                   QPrinter *printer, QWidget *parent)
+    : QDialog(ptr, parent)
+{
+    Q_D(QAbstractPageSetupDialog);
+    setWindowTitle(QCoreApplication::translate("QPrintPreviewDialog", "Page Setup"));
+    d->setPrinter(printer);
+}
+
+QAbstractPageSetupDialog::~QAbstractPageSetupDialog()
+{
+    Q_D(QAbstractPageSetupDialog);
+    if (d->opts & QPageSetupDialog::OwnsPrinter)
+        delete d->printer;
+}
+
+/*!
+    Returns the printer that this page setup dialog is operating on.
+*/
+QPrinter *QAbstractPageSetupDialog::printer()
+{
+    Q_D(QAbstractPageSetupDialog);
+    return d->printer;
+}
+
+void QAbstractPageSetupDialogPrivate::setPrinter(QPrinter *newPrinter)
+{
+    if (newPrinter) {
+        printer = newPrinter;
+    } else {
+        printer = new QPrinter;
+        opts |= QPageSetupDialog::OwnsPrinter;
+    }
+#ifndef Q_WS_X11
+    if (printer->outputFormat() != QPrinter::NativeFormat)
+        qWarning("QPageSetupDialog: Cannot be used on non-native printers");
+#endif
+}
+
+/*!
+    \fn int QAbstractPageSetupDialog::exec()
+
+    This virtual function is called to pop up the dialog. It must be
+    reimplemented in subclasses.
+*/
+
+/*!
+    \reimp
+*/
+void QAbstractPageSetupDialog::done(int result)
+{
+    Q_D(QAbstractPageSetupDialog);
+    QDialog::done(result);
+    if (d->receiverToDisconnectOnClose) {
+        disconnect(this, SIGNAL(accepted()),
+                   d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
+        d->receiverToDisconnectOnClose = 0;
+    }
+    d->memberToDisconnectOnClose.clear();
+
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_PRINTDIALOG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qabstractprintdialog.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,501 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qabstractprintdialog_p.h"
+#include "qcoreapplication.h"
+#include "qprintdialog.h"
+#include "qprinter.h"
+#include "private/qprinter_p.h"
+
+#ifndef QT_NO_PRINTDIALOG
+
+QT_BEGIN_NAMESPACE
+
+// hack
+class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
+{
+};
+
+/*!
+    \class QAbstractPrintDialog
+    \brief The QAbstractPrintDialog class provides a base implementation for
+    print dialogs used to configure printers.
+
+    \ingroup printing
+
+    This class implements getter and setter functions that are used to
+    customize settings shown in print dialogs, but it is not used directly.
+    Use QPrintDialog to display a print dialog in your application.
+
+    In Symbian, there is no support for printing. Hence, this dialog should not
+    be used in Symbian.
+
+    \sa QPrintDialog, QPrinter, {Printing with Qt}
+*/
+
+/*!
+    \enum QAbstractPrintDialog::PrintRange
+
+    Used to specify the print range selection option.
+
+    \value AllPages All pages should be printed.
+    \value Selection Only the selection should be printed.
+    \value PageRange The specified page range should be printed.
+    \value CurrentPage Only the currently visible page should be printed. (This value was introduced in 4.7.)
+
+    \sa QPrinter::PrintRange
+*/
+
+/*!
+    \enum QAbstractPrintDialog::PrintDialogOption
+
+    Used to specify which parts of the print dialog should be visible.
+
+    \value None None of the options are enabled.
+    \value PrintToFile The print to file option is enabled.
+    \value PrintSelection The print selection option is enabled.
+    \value PrintPageRange The page range selection option is enabled.
+    \value PrintShowPageSize  Show the page size + margins page only if this is enabled.
+    \value PrintCollateCopies The collate copies option is enabled
+    \value PrintCurrentPage The print current page option is enabled (This value was introduced in 4.7.)
+
+    This value is obsolete and does nothing since Qt 4.5:
+
+    \value DontUseSheet In previous versions of Qt, exec() the print dialog
+    would create a sheet by default the dialog was given a parent.
+    This is no longer supported in Qt 4.5.  If you want to use sheets, use
+    QPrintDialog::open() instead.
+*/
+
+/*!
+    Constructs an abstract print dialog for \a printer with \a parent
+    as parent widget.
+*/
+QAbstractPrintDialog::QAbstractPrintDialog(QPrinter *printer, QWidget *parent)
+    : QDialog(*(new QAbstractPrintDialogPrivate), parent)
+{
+    Q_D(QAbstractPrintDialog);
+    setWindowTitle(QCoreApplication::translate("QPrintDialog", "Print"));
+    d->setPrinter(printer);
+}
+
+/*!
+     \internal
+*/
+QAbstractPrintDialog::QAbstractPrintDialog(QAbstractPrintDialogPrivate &ptr,
+                                           QPrinter *printer,
+                                           QWidget *parent)
+    : QDialog(ptr, parent)
+{
+    Q_D(QAbstractPrintDialog);
+    setWindowTitle(QCoreApplication::translate("QPrintDialog", "Print"));
+    d->setPrinter(printer);
+}
+
+/*!
+    \internal
+*/
+QAbstractPrintDialog::~QAbstractPrintDialog()
+{
+    Q_D(QAbstractPrintDialog);
+    if (d->ownsPrinter)
+        delete d->printer;
+}
+
+/*!
+    Sets the given \a option to be enabled if \a on is true;
+    otherwise, clears the given \a option.
+
+    \sa options, testOption()
+*/
+void QPrintDialog::setOption(PrintDialogOption option, bool on)
+{
+    Q_D(QPrintDialog);
+    if (!(d->pd->options & option) != !on)
+        setOptions(d->pd->options ^ option);
+}
+
+/*!
+    Returns true if the given \a option is enabled; otherwise, returns
+    false.
+
+    \sa options, setOption()
+*/
+bool QPrintDialog::testOption(PrintDialogOption option) const
+{
+    Q_D(const QPrintDialog);
+    return (d->pd->options & option) != 0;
+}
+
+/*!
+    \property QPrintDialog::options
+    \brief the various options that affect the look and feel of the dialog
+    \since 4.5
+
+    By default, all options are disabled.
+
+    Options should be set before showing the dialog. Setting them while the
+    dialog is visible is not guaranteed to have an immediate effect on the
+    dialog (depending on the option and on the platform).
+
+    \sa setOption(), testOption()
+*/
+void QPrintDialog::setOptions(PrintDialogOptions options)
+{
+    Q_D(QPrintDialog);
+
+    PrintDialogOptions changed = (options ^ d->pd->options);
+    if (!changed)
+        return;
+
+    d->pd->options = options;
+}
+
+QPrintDialog::PrintDialogOptions QPrintDialog::options() const
+{
+    Q_D(const QPrintDialog);
+    return d->pd->options;
+}
+
+/*!
+    \obsolete
+
+    Use QPrintDialog::setOptions() instead.
+*/
+void QAbstractPrintDialog::setEnabledOptions(PrintDialogOptions options)
+{
+    Q_D(QAbstractPrintDialog);
+    d->pd->options = options;
+}
+
+/*!
+    \obsolete
+
+    Use QPrintDialog::setOption(\a option, true) instead.
+*/
+void QAbstractPrintDialog::addEnabledOption(PrintDialogOption option)
+{
+    Q_D(QAbstractPrintDialog);
+    d->pd->options |= option;
+}
+
+/*!
+    \obsolete
+
+    Use QPrintDialog::options() instead.
+*/
+QAbstractPrintDialog::PrintDialogOptions QAbstractPrintDialog::enabledOptions() const
+{
+    Q_D(const QAbstractPrintDialog);
+    return d->pd->options;
+}
+
+/*!
+    \obsolete
+
+    Use QPrintDialog::testOption(\a option) instead.
+*/
+bool QAbstractPrintDialog::isOptionEnabled(PrintDialogOption option) const
+{
+    Q_D(const QAbstractPrintDialog);
+    return d->pd->options & option;
+}
+
+/*!
+    Sets the print range option in to be \a range.
+ */
+void QAbstractPrintDialog::setPrintRange(PrintRange range)
+{
+    Q_D(QAbstractPrintDialog);
+    d->pd->printRange = range;
+}
+
+/*!
+    Returns the print range.
+*/
+QAbstractPrintDialog::PrintRange QAbstractPrintDialog::printRange() const
+{
+    Q_D(const QAbstractPrintDialog);
+    return d->pd->printRange;
+}
+
+/*!
+    Sets the page range in this dialog to be from \a min to \a max. This also
+    enables the PrintPageRange option.
+*/
+void QAbstractPrintDialog::setMinMax(int min, int max)
+{
+    Q_D(QAbstractPrintDialog);
+    Q_ASSERT_X(min <= max, "QAbstractPrintDialog::setMinMax",
+               "'min' must be less than or equal to 'max'");
+    d->pd->minPage = min;
+    d->pd->maxPage = max;
+    d->pd->options |= PrintPageRange;
+}
+
+/*!
+    Returns the minimum page in the page range.
+    By default, this value is set to 1.
+*/
+int QAbstractPrintDialog::minPage() const
+{
+    Q_D(const QAbstractPrintDialog);
+    return d->pd->minPage;
+}
+
+/*!
+    Returns the maximum page in the page range. As of Qt 4.4, this
+    function returns INT_MAX by default. Previous versions returned 1
+    by default.
+*/
+int QAbstractPrintDialog::maxPage() const
+{
+    Q_D(const QAbstractPrintDialog);
+    return d->pd->maxPage;
+}
+
+/*!
+    Sets the range in the print dialog to be from \a from to \a to.
+*/
+void QAbstractPrintDialog::setFromTo(int from, int to)
+{
+    Q_D(QAbstractPrintDialog);
+    Q_ASSERT_X(from <= to, "QAbstractPrintDialog::setFromTo",
+               "'from' must be less than or equal to 'to'");
+    d->pd->fromPage = from;
+    d->pd->toPage = to;
+
+    if (d->pd->minPage == 0 && d->pd->maxPage == 0)
+        setMinMax(1, to);
+}
+
+/*!
+    Returns the first page to be printed
+    By default, this value is set to 0.
+*/
+int QAbstractPrintDialog::fromPage() const
+{
+    Q_D(const QAbstractPrintDialog);
+    return d->pd->fromPage;
+}
+
+/*!
+    Returns the last page to be printed.
+    By default, this value is set to 0.
+*/
+int QAbstractPrintDialog::toPage() const
+{
+    Q_D(const QAbstractPrintDialog);
+    return d->pd->toPage;
+}
+
+
+/*!
+    Returns the printer that this printer dialog operates
+    on.
+*/
+QPrinter *QAbstractPrintDialog::printer() const
+{
+    Q_D(const QAbstractPrintDialog);
+    return d->printer;
+}
+
+void QAbstractPrintDialogPrivate::setPrinter(QPrinter *newPrinter)
+{
+    if (newPrinter) {
+        printer = newPrinter;
+        ownsPrinter = false;
+    } else {
+        printer = new QPrinter;
+        ownsPrinter = true;
+    }
+    pd = printer->d_func();
+}
+
+/*!
+    \fn int QAbstractPrintDialog::exec()
+
+    This virtual function is called to pop up the dialog. It must be
+    reimplemented in subclasses.
+*/
+
+/*!
+    \class QPrintDialog
+
+    \brief The QPrintDialog class provides a dialog for specifying
+    the printer's configuration.
+
+    \ingroup standard-dialogs
+    \ingroup printing
+
+    The dialog allows users to change document-related settings, such
+    as the paper size and orientation, type of print (color or
+    grayscale), range of pages, and number of copies to print.
+
+    Controls are also provided to enable users to choose from the
+    printers available, including any configured network printers.
+
+    Typically, QPrintDialog objects are constructed with a QPrinter
+    object, and executed using the exec() function.
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp 0
+
+    If the dialog is accepted by the user, the QPrinter object is
+    correctly configured for printing.
+
+    \table
+    \row
+    \o \inlineimage plastique-printdialog.png
+    \o \inlineimage plastique-printdialog-properties.png
+    \endtable
+
+    The printer dialog (shown above in Plastique style) enables access to common
+    printing properties. On X11 platforms that use the CUPS printing system, the
+    settings for each available printer can be modified via the dialog's
+    \gui{Properties} push button.
+
+    On Windows and Mac OS X, the native print dialog is used, which means that
+    some QWidget and QDialog properties set on the dialog won't be respected.
+    The native print dialog on Mac OS X does not support setting printer options,
+    i.e. setOptions() and setOption() have no effect.
+
+    In Qt 4.4, it was possible to use the static functions to show a sheet on
+    Mac OS X. This is no longer supported in Qt 4.5. If you want this
+    functionality, use QPrintDialog::open().
+
+    \sa QPageSetupDialog, QPrinter, {Pixelator Example}, {Order Form Example},
+        {Image Viewer Example}, {Scribble Example}
+*/
+
+/*!
+    \fn QPrintDialog::QPrintDialog(QPrinter *printer, QWidget *parent)
+
+    Constructs a new modal printer dialog for the given \a printer
+    with the given \a parent.
+*/
+
+/*!
+    \fn QPrintDialog::~QPrintDialog()
+
+    Destroys the print dialog.
+*/
+
+/*!
+    \fn int QPrintDialog::exec()
+    \reimp
+*/
+
+/*!
+    \since 4.4
+
+    Set a list of widgets as \a tabs to be shown on the print dialog, if supported.
+
+    Currently this option is only supported on X11.
+
+    Setting the option tabs will transfer their ownership to the print dialog.
+*/
+void QAbstractPrintDialog::setOptionTabs(const QList<QWidget*> &tabs)
+{
+    Q_D(QAbstractPrintDialog);
+    d->setTabs(tabs);
+}
+
+/*!
+
+    \fn void QPrintDialog::accepted(QPrinter *printer)
+
+    This signal is emitted when the user accepts the values set in the print dialog.
+    The \a printer parameter includes the printer that the settings were applied to.
+*/
+
+/*!
+    \fn QPrinter *QPrintDialog::printer()
+
+    Returns the printer that this printer dialog operates
+    on. This can be useful when using the QPrintDialog::open() method.
+*/
+
+/*!
+  Closes the dialog and sets its result code to \a result. If this dialog
+  is shown with exec(), done() causes the local event loop to finish,
+  and exec() to return \a result.
+
+  \note This function does not apply to the Native Print Dialog on the Mac
+  OS X and Windows platforms, because the dialog is required to be modal
+  and only the user can close it.
+
+  \sa QDialog::done()
+*/
+void QPrintDialog::done(int result)
+{
+    Q_D(QPrintDialog);
+    QDialog::done(result);
+    if (result == Accepted)
+        emit accepted(printer());
+    if (d->receiverToDisconnectOnClose) {
+        disconnect(this, SIGNAL(accepted(QPrinter*)),
+                   d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
+        d->receiverToDisconnectOnClose = 0;
+    }
+    d->memberToDisconnectOnClose.clear();
+}
+
+/*!
+    \since 4.5
+    \overload
+
+    Opens the dialog and connects its accepted() signal to the slot specified
+    by \a receiver and \a member.
+
+    The signal will be disconnected from the slot when the dialog is closed.
+*/
+void QPrintDialog::open(QObject *receiver, const char *member)
+{
+    Q_D(QPrintDialog);
+    connect(this, SIGNAL(accepted(QPrinter*)), receiver, member);
+    d->receiverToDisconnectOnClose = receiver;
+    d->memberToDisconnectOnClose = member;
+    QDialog::open();
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_PRINTDIALOG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qcolordialog.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,2112 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcolordialog_p.h"
+
+#ifndef QT_NO_COLORDIALOG
+
+#include "qapplication.h"
+#include "qdesktopwidget.h"
+#include "qdrawutil.h"
+#include "qevent.h"
+#include "qimage.h"
+#include "qlabel.h"
+#include "qlayout.h"
+#include "qlineedit.h"
+#include "qmenu.h"
+#include "qpainter.h"
+#include "qpixmap.h"
+#include "qpushbutton.h"
+#include "qsettings.h"
+#include "qstyle.h"
+#include "qstyleoption.h"
+#include "qvalidator.h"
+#include "qmime.h"
+#include "qspinbox.h"
+#include "qdialogbuttonbox.h"
+#include "private/qguiplatformplugin_p.h"
+
+#ifdef Q_WS_S60
+#include "private/qt_s60_p.h"
+#endif
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+#  define QT_SMALL_COLORDIALOG
+#endif
+
+QT_BEGIN_NAMESPACE
+
+//////////// QWellArray BEGIN
+
+struct QWellArrayData;
+
+class QWellArray : public QWidget
+{
+    Q_OBJECT
+    Q_PROPERTY(int selectedColumn READ selectedColumn)
+    Q_PROPERTY(int selectedRow READ selectedRow)
+
+public:
+    QWellArray(int rows, int cols, QWidget* parent=0);
+    ~QWellArray() {}
+    QString cellContent(int row, int col) const;
+
+    int selectedColumn() const { return selCol; }
+    int selectedRow() const { return selRow; }
+
+    virtual void setCurrent(int row, int col);
+    virtual void setSelected(int row, int col);
+
+    QSize sizeHint() const;
+
+    virtual void setCellBrush(int row, int col, const QBrush &);
+    QBrush cellBrush(int row, int col);
+
+    inline int cellWidth() const
+        { return cellw; }
+
+    inline int cellHeight() const
+        { return cellh; }
+
+    inline int rowAt(int y) const
+        { return y / cellh; }
+
+    inline int columnAt(int x) const
+        { if (isRightToLeft()) return ncols - (x / cellw) - 1; return x / cellw; }
+
+    inline int rowY(int row) const
+        { return cellh * row; }
+
+    inline int columnX(int column) const
+        { if (isRightToLeft()) return cellw * (ncols - column - 1); return cellw * column; }
+
+    inline int numRows() const
+        { return nrows; }
+
+    inline int numCols() const
+        {return ncols; }
+
+    inline QRect cellRect() const
+        { return QRect(0, 0, cellw, cellh); }
+
+    inline QSize gridSize() const
+        { return QSize(ncols * cellw, nrows * cellh); }
+
+    QRect cellGeometry(int row, int column)
+        {
+            QRect r;
+            if (row >= 0 && row < nrows && column >= 0 && column < ncols)
+                r.setRect(columnX(column), rowY(row), cellw, cellh);
+            return r;
+        }
+
+    inline void updateCell(int row, int column) { update(cellGeometry(row, column)); }
+
+signals:
+    void selected(int row, int col);
+
+protected:
+    virtual void paintCell(QPainter *, int row, int col, const QRect&);
+    virtual void paintCellContents(QPainter *, int row, int col, const QRect&);
+
+    void mousePressEvent(QMouseEvent*);
+    void mouseReleaseEvent(QMouseEvent*);
+    void keyPressEvent(QKeyEvent*);
+    void focusInEvent(QFocusEvent*);
+    void focusOutEvent(QFocusEvent*);
+    void paintEvent(QPaintEvent *);
+
+private:
+    Q_DISABLE_COPY(QWellArray)
+
+    int nrows;
+    int ncols;
+    int cellw;
+    int cellh;
+    int curRow;
+    int curCol;
+    int selRow;
+    int selCol;
+    QWellArrayData *d;
+};
+
+void QWellArray::paintEvent(QPaintEvent *e)
+{
+    QRect r = e->rect();
+    int cx = r.x();
+    int cy = r.y();
+    int ch = r.height();
+    int cw = r.width();
+    int colfirst = columnAt(cx);
+    int collast = columnAt(cx + cw);
+    int rowfirst = rowAt(cy);
+    int rowlast = rowAt(cy + ch);
+
+    if (isRightToLeft()) {
+        int t = colfirst;
+        colfirst = collast;
+        collast = t;
+    }
+
+    QPainter painter(this);
+    QPainter *p = &painter;
+    QRect rect(0, 0, cellWidth(), cellHeight());
+
+
+    if (collast < 0 || collast >= ncols)
+        collast = ncols-1;
+    if (rowlast < 0 || rowlast >= nrows)
+        rowlast = nrows-1;
+
+    // Go through the rows
+    for (int r = rowfirst; r <= rowlast; ++r) {
+        // get row position and height
+        int rowp = rowY(r);
+
+        // Go through the columns in the row r
+        // if we know from where to where, go through [colfirst, collast],
+        // else go through all of them
+        for (int c = colfirst; c <= collast; ++c) {
+            // get position and width of column c
+            int colp = columnX(c);
+            // Translate painter and draw the cell
+            rect.translate(colp, rowp);
+            paintCell(p, r, c, rect);
+            rect.translate(-colp, -rowp);
+        }
+    }
+}
+
+struct QWellArrayData {
+    QBrush *brush;
+};
+
+QWellArray::QWellArray(int rows, int cols, QWidget *parent)
+    : QWidget(parent)
+        ,nrows(rows), ncols(cols)
+{
+    d = 0;
+    setFocusPolicy(Qt::StrongFocus);
+    cellw = 28;
+    cellh = 24;
+    curCol = 0;
+    curRow = 0;
+    selCol = -1;
+    selRow = -1;
+}
+
+QSize QWellArray::sizeHint() const
+{
+    ensurePolished();
+    return gridSize().boundedTo(QSize(640, 480));
+}
+
+
+void QWellArray::paintCell(QPainter* p, int row, int col, const QRect &rect)
+{
+    int b = 3; //margin
+
+    const QPalette & g = palette();
+    QStyleOptionFrame opt;
+    int dfw = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
+    opt.lineWidth = dfw;
+    opt.midLineWidth = 1;
+    opt.rect = rect.adjusted(b, b, -b, -b);
+    opt.palette = g;
+    opt.state = QStyle::State_Enabled | QStyle::State_Sunken;
+    style()->drawPrimitive(QStyle::PE_Frame, &opt, p, this);
+    b += dfw;
+
+    if ((row == curRow) && (col == curCol)) {
+        if (hasFocus()) {
+            QStyleOptionFocusRect opt;
+            opt.palette = g;
+            opt.rect = rect;
+            opt.state = QStyle::State_None | QStyle::State_KeyboardFocusChange;
+            style()->drawPrimitive(QStyle::PE_FrameFocusRect, &opt, p, this);
+        }
+    }
+    paintCellContents(p, row, col, opt.rect.adjusted(dfw, dfw, -dfw, -dfw));
+}
+
+/*!
+  Reimplement this function to change the contents of the well array.
+ */
+void QWellArray::paintCellContents(QPainter *p, int row, int col, const QRect &r)
+{
+    if (d) {
+        p->fillRect(r, d->brush[row*numCols()+col]);
+    } else {
+        p->fillRect(r, Qt::white);
+        p->setPen(Qt::black);
+        p->drawLine(r.topLeft(), r.bottomRight());
+        p->drawLine(r.topRight(), r.bottomLeft());
+    }
+}
+
+void QWellArray::mousePressEvent(QMouseEvent *e)
+{
+    // The current cell marker is set to the cell the mouse is pressed in
+    QPoint pos = e->pos();
+    setCurrent(rowAt(pos.y()), columnAt(pos.x()));
+}
+
+void QWellArray::mouseReleaseEvent(QMouseEvent * /* event */)
+{
+    // The current cell marker is set to the cell the mouse is clicked in
+    setSelected(curRow, curCol);
+}
+
+
+/*
+  Sets the cell currently having the focus. This is not necessarily
+  the same as the currently selected cell.
+*/
+
+void QWellArray::setCurrent(int row, int col)
+{
+    if ((curRow == row) && (curCol == col))
+        return;
+
+    if (row < 0 || col < 0)
+        row = col = -1;
+
+    int oldRow = curRow;
+    int oldCol = curCol;
+
+    curRow = row;
+    curCol = col;
+
+    updateCell(oldRow, oldCol);
+    updateCell(curRow, curCol);
+}
+
+/*
+  Sets the currently selected cell to \a row, \a column. If \a row or
+  \a column are less than zero, the current cell is unselected.
+
+  Does not set the position of the focus indicator.
+*/
+void QWellArray::setSelected(int row, int col)
+{
+    int oldRow = selRow;
+    int oldCol = selCol;
+
+    if (row < 0 || col < 0)
+        row = col = -1;
+
+    selCol = col;
+    selRow = row;
+
+    updateCell(oldRow, oldCol);
+    updateCell(selRow, selCol);
+    if (row >= 0)
+        emit selected(row, col);
+
+#ifndef QT_NO_MENU
+    if (isVisible() && qobject_cast<QMenu*>(parentWidget()))
+        parentWidget()->close();
+#endif
+}
+
+void QWellArray::focusInEvent(QFocusEvent*)
+{
+    updateCell(curRow, curCol);
+}
+
+void QWellArray::setCellBrush(int row, int col, const QBrush &b)
+{
+    if (!d) {
+        d = new QWellArrayData;
+        int i = numRows()*numCols();
+        d->brush = new QBrush[i];
+    }
+    if (row >= 0 && row < numRows() && col >= 0 && col < numCols())
+        d->brush[row*numCols()+col] = b;
+}
+
+/*
+  Returns the brush set for the cell at \a row, \a column. If no brush is
+  set, Qt::NoBrush is returned.
+*/
+
+QBrush QWellArray::cellBrush(int row, int col)
+{
+    if (d && row >= 0 && row < numRows() && col >= 0 && col < numCols())
+        return d->brush[row*numCols()+col];
+    return Qt::NoBrush;
+}
+
+
+
+/*!\reimp
+*/
+
+void QWellArray::focusOutEvent(QFocusEvent*)
+{
+    updateCell(curRow, curCol);
+}
+
+/*\reimp
+*/
+void QWellArray::keyPressEvent(QKeyEvent* e)
+{
+    switch(e->key()) {                        // Look at the key code
+    case Qt::Key_Left:                                // If 'left arrow'-key,
+        if(curCol > 0)                        // and cr't not in leftmost col
+            setCurrent(curRow, curCol - 1);        // set cr't to next left column
+        break;
+    case Qt::Key_Right:                                // Correspondingly...
+        if(curCol < numCols()-1)
+            setCurrent(curRow, curCol + 1);
+        break;
+    case Qt::Key_Up:
+        if(curRow > 0)
+            setCurrent(curRow - 1, curCol);
+        break;
+    case Qt::Key_Down:
+        if(curRow < numRows()-1)
+            setCurrent(curRow + 1, curCol);
+        break;
+#if 0
+    // bad idea that shouldn't have been implemented; very counterintuitive
+    case Qt::Key_Return:
+    case Qt::Key_Enter:
+        /*
+          ignore the key, so that the dialog get it, but still select
+          the current row/col
+        */
+        e->ignore();
+        // fallthrough intended
+#endif
+    case Qt::Key_Space:
+        setSelected(curRow, curCol);
+        break;
+    default:                                // If not an interesting key,
+        e->ignore();                        // we don't accept the event
+        return;
+    }
+
+}
+
+//////////// QWellArray END
+
+static bool initrgb = false;
+static QRgb stdrgb[6*8];
+static QRgb cusrgb[2*8];
+static bool customSet = false;
+
+
+static void initRGB()
+{
+    if (initrgb)
+        return;
+    initrgb = true;
+    int i = 0;
+    for (int g = 0; g < 4; g++)
+        for (int r = 0;  r < 4; r++)
+            for (int b = 0; b < 3; b++)
+                stdrgb[i++] = qRgb(r * 255 / 3, g * 255 / 3, b * 255 / 2);
+
+    for (i = 0; i < 2*8; i++)
+        cusrgb[i] = 0xffffffff;
+}
+
+/*!
+    Returns the number of custom colors supported by QColorDialog. All
+    color dialogs share the same custom colors.
+*/
+int QColorDialog::customCount()
+{
+    return 2 * 8;
+}
+
+/*!
+    \since 4.5
+
+    Returns the custom color at the given \a index as a QRgb value.
+*/
+QRgb QColorDialog::customColor(int index)
+{
+    if (uint(index) >= uint(customCount()))
+        return qRgb(255, 255, 255);
+    initRGB();
+    return cusrgb[index];
+}
+
+/*!
+    Sets the custom color at \a index to the QRgb \a color value.
+
+    \note This function does not apply to the Native Color Dialog on the Mac
+    OS X platform. If you still require this function, use the
+    QColorDialog::DontUseNativeDialog option.
+*/
+void QColorDialog::setCustomColor(int index, QRgb color)
+{
+    if (uint(index) >= uint(customCount()))
+        return;
+    initRGB();
+    customSet = true;
+    cusrgb[index] = color;
+}
+
+/*!
+    Sets the standard color at \a  index to the QRgb \a color value.
+
+    \note This function does not apply to the Native Color Dialog on the Mac
+    OS X platform. If you still require this function, use the
+    QColorDialog::DontUseNativeDialog option.
+*/
+
+void QColorDialog::setStandardColor(int index, QRgb color)
+{
+    if (uint(index) >= uint(6 * 8))
+        return;
+    initRGB();
+    stdrgb[index] = color;
+}
+
+static inline void rgb2hsv(QRgb rgb, int &h, int &s, int &v)
+{
+    QColor c;
+    c.setRgb(rgb);
+    c.getHsv(&h, &s, &v);
+}
+
+class QColorWell : public QWellArray
+{
+public:
+    QColorWell(QWidget *parent, int r, int c, QRgb *vals)
+        :QWellArray(r, c, parent), values(vals), mousePressed(false), oldCurrent(-1, -1)
+    { setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); }
+
+protected:
+    void paintCellContents(QPainter *, int row, int col, const QRect&);
+    void mousePressEvent(QMouseEvent *e);
+    void mouseMoveEvent(QMouseEvent *e);
+    void mouseReleaseEvent(QMouseEvent *e);
+#ifndef QT_NO_DRAGANDDROP
+    void dragEnterEvent(QDragEnterEvent *e);
+    void dragLeaveEvent(QDragLeaveEvent *e);
+    void dragMoveEvent(QDragMoveEvent *e);
+    void dropEvent(QDropEvent *e);
+#endif
+
+private:
+    QRgb *values;
+    bool mousePressed;
+    QPoint pressPos;
+    QPoint oldCurrent;
+
+};
+
+void QColorWell::paintCellContents(QPainter *p, int row, int col, const QRect &r)
+{
+    int i = row + col*numRows();
+    p->fillRect(r, QColor(values[i]));
+}
+
+void QColorWell::mousePressEvent(QMouseEvent *e)
+{
+    oldCurrent = QPoint(selectedRow(), selectedColumn());
+    QWellArray::mousePressEvent(e);
+    mousePressed = true;
+    pressPos = e->pos();
+}
+
+void QColorWell::mouseMoveEvent(QMouseEvent *e)
+{
+    QWellArray::mouseMoveEvent(e);
+#ifndef QT_NO_DRAGANDDROP
+    if (!mousePressed)
+        return;
+    if ((pressPos - e->pos()).manhattanLength() > QApplication::startDragDistance()) {
+        setCurrent(oldCurrent.x(), oldCurrent.y());
+        int i = rowAt(pressPos.y()) + columnAt(pressPos.x()) * numRows();
+        QColor col(values[i]);
+        QMimeData *mime = new QMimeData;
+        mime->setColorData(col);
+        QPixmap pix(cellWidth(), cellHeight());
+        pix.fill(col);
+        QPainter p(&pix);
+        p.drawRect(0, 0, pix.width() - 1, pix.height() - 1);
+        p.end();
+        QDrag *drg = new QDrag(this);
+        drg->setMimeData(mime);
+        drg->setPixmap(pix);
+        mousePressed = false;
+        drg->start();
+    }
+#endif
+}
+
+#ifndef QT_NO_DRAGANDDROP
+void QColorWell::dragEnterEvent(QDragEnterEvent *e)
+{
+    if (qvariant_cast<QColor>(e->mimeData()->colorData()).isValid())
+        e->accept();
+    else
+        e->ignore();
+}
+
+void QColorWell::dragLeaveEvent(QDragLeaveEvent *)
+{
+    if (hasFocus())
+        parentWidget()->setFocus();
+}
+
+void QColorWell::dragMoveEvent(QDragMoveEvent *e)
+{
+    if (qvariant_cast<QColor>(e->mimeData()->colorData()).isValid()) {
+        setCurrent(rowAt(e->pos().y()), columnAt(e->pos().x()));
+        e->accept();
+    } else {
+        e->ignore();
+    }
+}
+
+void QColorWell::dropEvent(QDropEvent *e)
+{
+    QColor col = qvariant_cast<QColor>(e->mimeData()->colorData());
+    if (col.isValid()) {
+        int i = rowAt(e->pos().y()) + columnAt(e->pos().x()) * numRows();
+        values[i] = col.rgb();
+        update();
+        e->accept();
+    } else {
+        e->ignore();
+    }
+}
+
+#endif // QT_NO_DRAGANDDROP
+
+void QColorWell::mouseReleaseEvent(QMouseEvent *e)
+{
+    if (!mousePressed)
+        return;
+    QWellArray::mouseReleaseEvent(e);
+    mousePressed = false;
+}
+
+class QColorPicker : public QFrame
+{
+    Q_OBJECT
+public:
+    QColorPicker(QWidget* parent);
+    ~QColorPicker();
+
+public slots:
+    void setCol(int h, int s);
+
+signals:
+    void newCol(int h, int s);
+
+protected:
+    QSize sizeHint() const;
+    void paintEvent(QPaintEvent*);
+    void mouseMoveEvent(QMouseEvent *);
+    void mousePressEvent(QMouseEvent *);
+    void resizeEvent(QResizeEvent *);
+
+private:
+    int hue;
+    int sat;
+
+    QPoint colPt();
+    int huePt(const QPoint &pt);
+    int satPt(const QPoint &pt);
+    void setCol(const QPoint &pt);
+
+    QPixmap pix;
+};
+
+static int pWidth = 220;
+static int pHeight = 200;
+
+class QColorLuminancePicker : public QWidget
+{
+    Q_OBJECT
+public:
+    QColorLuminancePicker(QWidget* parent=0);
+    ~QColorLuminancePicker();
+
+public slots:
+    void setCol(int h, int s, int v);
+    void setCol(int h, int s);
+
+signals:
+    void newHsv(int h, int s, int v);
+
+protected:
+    void paintEvent(QPaintEvent*);
+    void mouseMoveEvent(QMouseEvent *);
+    void mousePressEvent(QMouseEvent *);
+
+private:
+    enum { foff = 3, coff = 4 }; //frame and contents offset
+    int val;
+    int hue;
+    int sat;
+
+    int y2val(int y);
+    int val2y(int val);
+    void setVal(int v);
+
+    QPixmap *pix;
+};
+
+
+int QColorLuminancePicker::y2val(int y)
+{
+    int d = height() - 2*coff - 1;
+    return 255 - (y - coff)*255/d;
+}
+
+int QColorLuminancePicker::val2y(int v)
+{
+    int d = height() - 2*coff - 1;
+    return coff + (255-v)*d/255;
+}
+
+QColorLuminancePicker::QColorLuminancePicker(QWidget* parent)
+    :QWidget(parent)
+{
+    hue = 100; val = 100; sat = 100;
+    pix = 0;
+    //    setAttribute(WA_NoErase, true);
+}
+
+QColorLuminancePicker::~QColorLuminancePicker()
+{
+    delete pix;
+}
+
+void QColorLuminancePicker::mouseMoveEvent(QMouseEvent *m)
+{
+    setVal(y2val(m->y()));
+}
+void QColorLuminancePicker::mousePressEvent(QMouseEvent *m)
+{
+    setVal(y2val(m->y()));
+}
+
+void QColorLuminancePicker::setVal(int v)
+{
+    if (val == v)
+        return;
+    val = qMax(0, qMin(v,255));
+    delete pix; pix=0;
+    repaint();
+    emit newHsv(hue, sat, val);
+}
+
+//receives from a hue,sat chooser and relays.
+void QColorLuminancePicker::setCol(int h, int s)
+{
+    setCol(h, s, val);
+    emit newHsv(h, s, val);
+}
+
+void QColorLuminancePicker::paintEvent(QPaintEvent *)
+{
+    int w = width() - 5;
+
+    QRect r(0, foff, w, height() - 2*foff);
+    int wi = r.width() - 2;
+    int hi = r.height() - 2;
+    if (!pix || pix->height() != hi || pix->width() != wi) {
+        delete pix;
+        QImage img(wi, hi, QImage::Format_RGB32);
+        int y;
+        uint *pixel = (uint *) img.scanLine(0);
+        for (y = 0; y < hi; y++) {
+            const uint *end = pixel + wi;
+            while (pixel < end) {
+                QColor c;
+                c.setHsv(hue, sat, y2val(y+coff));
+                *pixel = c.rgb();
+                ++pixel;
+            }
+        }
+        pix = new QPixmap(QPixmap::fromImage(img));
+    }
+    QPainter p(this);
+    p.drawPixmap(1, coff, *pix);
+    const QPalette &g = palette();
+    qDrawShadePanel(&p, r, g, true);
+    p.setPen(g.foreground().color());
+    p.setBrush(g.foreground());
+    QPolygon a;
+    int y = val2y(val);
+    a.setPoints(3, w, y, w+5, y+5, w+5, y-5);
+    p.eraseRect(w, 0, 5, height());
+    p.drawPolygon(a);
+}
+
+void QColorLuminancePicker::setCol(int h, int s , int v)
+{
+    val = v;
+    hue = h;
+    sat = s;
+    delete pix; pix=0;
+    repaint();
+}
+
+QPoint QColorPicker::colPt()
+{
+    QRect r = contentsRect();
+    return QPoint((360 - hue) * (r.width() - 1) / 360, (255 - sat) * (r.height() - 1) / 255);
+}
+
+int QColorPicker::huePt(const QPoint &pt)
+{
+    QRect r = contentsRect();
+    return 360 - pt.x() * 360 / (r.width() - 1);
+}
+
+int QColorPicker::satPt(const QPoint &pt)
+{
+    QRect r = contentsRect();
+    return 255 - pt.y() * 255 / (r.height() - 1);
+}
+
+void QColorPicker::setCol(const QPoint &pt)
+{
+    setCol(huePt(pt), satPt(pt));
+}
+
+QColorPicker::QColorPicker(QWidget* parent)
+    : QFrame(parent)
+{
+    hue = 0; sat = 0;
+    setCol(150, 255);
+
+    setAttribute(Qt::WA_NoSystemBackground);
+    setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed) );
+}
+
+QColorPicker::~QColorPicker()
+{
+}
+
+QSize QColorPicker::sizeHint() const
+{
+    return QSize(pWidth + 2*frameWidth(), pHeight + 2*frameWidth());
+}
+
+void QColorPicker::setCol(int h, int s)
+{
+    int nhue = qMin(qMax(0,h), 359);
+    int nsat = qMin(qMax(0,s), 255);
+    if (nhue == hue && nsat == sat)
+        return;
+
+    QRect r(colPt(), QSize(20,20));
+    hue = nhue; sat = nsat;
+    r = r.united(QRect(colPt(), QSize(20,20)));
+    r.translate(contentsRect().x()-9, contentsRect().y()-9);
+    //    update(r);
+    repaint(r);
+}
+
+void QColorPicker::mouseMoveEvent(QMouseEvent *m)
+{
+    QPoint p = m->pos() - contentsRect().topLeft();
+    setCol(p);
+    emit newCol(hue, sat);
+}
+
+void QColorPicker::mousePressEvent(QMouseEvent *m)
+{
+    QPoint p = m->pos() - contentsRect().topLeft();
+    setCol(p);
+    emit newCol(hue, sat);
+}
+
+void QColorPicker::paintEvent(QPaintEvent* )
+{
+    QPainter p(this);
+    drawFrame(&p);
+    QRect r = contentsRect();
+
+    p.drawPixmap(r.topLeft(), pix);
+    QPoint pt = colPt() + r.topLeft();
+    p.setPen(Qt::black);
+
+    p.fillRect(pt.x()-9, pt.y(), 20, 2, Qt::black);
+    p.fillRect(pt.x(), pt.y()-9, 2, 20, Qt::black);
+
+}
+
+void QColorPicker::resizeEvent(QResizeEvent *ev)
+{
+    QFrame::resizeEvent(ev);
+
+    int w = width() - frameWidth() * 2;
+    int h = height() - frameWidth() * 2;
+    QImage img(w, h, QImage::Format_RGB32);
+    int x, y;
+    uint *pixel = (uint *) img.scanLine(0);
+    for (y = 0; y < h; y++) {
+        const uint *end = pixel + w;
+        x = 0;
+        while (pixel < end) {
+            QPoint p(x, y);
+            QColor c;
+            c.setHsv(huePt(p), satPt(p), 200);
+            *pixel = c.rgb();
+            ++pixel;
+            ++x;
+        }
+    }
+    pix = QPixmap::fromImage(img);
+}
+
+
+class QColSpinBox : public QSpinBox
+{
+public:
+    QColSpinBox(QWidget *parent)
+        : QSpinBox(parent) { setRange(0, 255); }
+    void setValue(int i) {
+        bool block = signalsBlocked();
+        blockSignals(true);
+        QSpinBox::setValue(i);
+        blockSignals(block);
+    }
+};
+
+class QColorShowLabel;
+
+class QColorShower : public QWidget
+{
+    Q_OBJECT
+public:
+    QColorShower(QColorDialog *parent);
+
+    //things that don't emit signals
+    void setHsv(int h, int s, int v);
+
+    int currentAlpha() const
+    { return (colorDialog->options() & QColorDialog::ShowAlphaChannel) ? alphaEd->value() : 255; }
+    void setCurrentAlpha(int a) { alphaEd->setValue(a); rgbEd(); }
+    void showAlpha(bool b);
+    bool isAlphaVisible() const;
+
+    QRgb currentColor() const { return curCol; }
+    QColor currentQColor() const { return curQColor; }
+    void retranslateStrings();
+    void updateQColor();
+
+public slots:
+    void setRgb(QRgb rgb);
+
+signals:
+    void newCol(QRgb rgb);
+    void currentColorChanged(const QColor &color);
+
+private slots:
+    void rgbEd();
+    void hsvEd();
+private:
+    void showCurrentColor();
+    int hue, sat, val;
+    QRgb curCol;
+    QColor curQColor;
+    QLabel *lblHue;
+    QLabel *lblSat;
+    QLabel *lblVal;
+    QLabel *lblRed;
+    QLabel *lblGreen;
+    QLabel *lblBlue;
+    QColSpinBox *hEd;
+    QColSpinBox *sEd;
+    QColSpinBox *vEd;
+    QColSpinBox *rEd;
+    QColSpinBox *gEd;
+    QColSpinBox *bEd;
+    QColSpinBox *alphaEd;
+    QLabel *alphaLab;
+    QColorShowLabel *lab;
+    bool rgbOriginal;
+    QColorDialog *colorDialog;
+
+    friend class QColorDialog;
+    friend class QColorDialogPrivate;
+};
+
+class QColorShowLabel : public QFrame
+{
+    Q_OBJECT
+
+public:
+    QColorShowLabel(QWidget *parent) : QFrame(parent) {
+        setFrameStyle(QFrame::Panel|QFrame::Sunken);
+        setAcceptDrops(true);
+        mousePressed = false;
+    }
+    void setColor(QColor c) { col = c; }
+
+signals:
+    void colorDropped(QRgb);
+
+protected:
+    void paintEvent(QPaintEvent *);
+    void mousePressEvent(QMouseEvent *e);
+    void mouseMoveEvent(QMouseEvent *e);
+    void mouseReleaseEvent(QMouseEvent *e);
+#ifndef QT_NO_DRAGANDDROP
+    void dragEnterEvent(QDragEnterEvent *e);
+    void dragLeaveEvent(QDragLeaveEvent *e);
+    void dropEvent(QDropEvent *e);
+#endif
+
+private:
+    QColor col;
+    bool mousePressed;
+    QPoint pressPos;
+};
+
+void QColorShowLabel::paintEvent(QPaintEvent *e)
+{
+    QPainter p(this);
+    drawFrame(&p);
+    p.fillRect(contentsRect()&e->rect(), col);
+}
+
+void QColorShower::showAlpha(bool b)
+{
+    alphaLab->setVisible(b);
+    alphaEd->setVisible(b);
+}
+
+inline bool QColorShower::isAlphaVisible() const
+{
+    return alphaLab->isVisible();
+}
+
+void QColorShowLabel::mousePressEvent(QMouseEvent *e)
+{
+    mousePressed = true;
+    pressPos = e->pos();
+}
+
+void QColorShowLabel::mouseMoveEvent(QMouseEvent *e)
+{
+#ifdef QT_NO_DRAGANDDROP
+    Q_UNUSED(e);
+#else
+    if (!mousePressed)
+        return;
+    if ((pressPos - e->pos()).manhattanLength() > QApplication::startDragDistance()) {
+        QMimeData *mime = new QMimeData;
+        mime->setColorData(col);
+        QPixmap pix(30, 20);
+        pix.fill(col);
+        QPainter p(&pix);
+        p.drawRect(0, 0, pix.width() - 1, pix.height() - 1);
+        p.end();
+        QDrag *drg = new QDrag(this);
+        drg->setMimeData(mime);
+        drg->setPixmap(pix);
+        mousePressed = false;
+        drg->start();
+    }
+#endif
+}
+
+#ifndef QT_NO_DRAGANDDROP
+void QColorShowLabel::dragEnterEvent(QDragEnterEvent *e)
+{
+    if (qvariant_cast<QColor>(e->mimeData()->colorData()).isValid())
+        e->accept();
+    else
+        e->ignore();
+}
+
+void QColorShowLabel::dragLeaveEvent(QDragLeaveEvent *)
+{
+}
+
+void QColorShowLabel::dropEvent(QDropEvent *e)
+{
+    QColor color = qvariant_cast<QColor>(e->mimeData()->colorData());
+    if (color.isValid()) {
+        col = color;
+        repaint();
+        emit colorDropped(col.rgb());
+        e->accept();
+    } else {
+        e->ignore();
+    }
+}
+#endif // QT_NO_DRAGANDDROP
+
+void QColorShowLabel::mouseReleaseEvent(QMouseEvent *)
+{
+    if (!mousePressed)
+        return;
+    mousePressed = false;
+}
+
+QColorShower::QColorShower(QColorDialog *parent)
+    : QWidget(parent)
+{
+    colorDialog = parent;
+
+    curCol = qRgb(255, 255, 255);
+    curQColor = Qt::white;
+
+    QGridLayout *gl = new QGridLayout(this);
+    gl->setMargin(gl->spacing());
+    lab = new QColorShowLabel(this);
+
+#ifdef QT_SMALL_COLORDIALOG
+#  ifdef Q_WS_S60
+    const bool nonTouchUI = !S60->hasTouchscreen;
+#  elif defined Q_WS_MAEMO_5
+    const bool nonTouchUI = false;
+#  endif
+#endif
+
+#ifndef Q_WS_WINCE
+#ifdef QT_SMALL_COLORDIALOG
+    lab->setMinimumHeight(60);
+#endif
+    lab->setMinimumWidth(60);
+#else
+    lab->setMinimumWidth(20);
+#endif
+
+// In S60, due to small screen and different screen layouts need to re-arrange the widgets.
+// For QVGA screens only the comboboxes and color label are visible.
+// For nHD screens only color and luminence pickers and color label are visible.
+#if !defined(QT_SMALL_COLORDIALOG)
+    gl->addWidget(lab, 0, 0, -1, 1);
+#else
+    if (nonTouchUI)
+        gl->addWidget(lab, 0, 0, 1, -1);
+    else
+        gl->addWidget(lab, 0, 0, -1, 1);
+#endif
+    connect(lab, SIGNAL(colorDropped(QRgb)), this, SIGNAL(newCol(QRgb)));
+    connect(lab, SIGNAL(colorDropped(QRgb)), this, SLOT(setRgb(QRgb)));
+
+    hEd = new QColSpinBox(this);
+    hEd->setRange(0, 359);
+    lblHue = new QLabel(this);
+#ifndef QT_NO_SHORTCUT
+    lblHue->setBuddy(hEd);
+#endif
+    lblHue->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#if !defined(QT_SMALL_COLORDIALOG)
+    gl->addWidget(lblHue, 0, 1);
+    gl->addWidget(hEd, 0, 2);
+#else
+    if (nonTouchUI) {
+        gl->addWidget(lblHue, 1, 0);
+        gl->addWidget(hEd, 2, 0);
+    } else {
+        lblHue->hide();
+        hEd->hide();
+    }
+#endif
+
+    sEd = new QColSpinBox(this);
+    lblSat = new QLabel(this);
+#ifndef QT_NO_SHORTCUT
+    lblSat->setBuddy(sEd);
+#endif
+    lblSat->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#if !defined(QT_SMALL_COLORDIALOG)
+    gl->addWidget(lblSat, 1, 1);
+    gl->addWidget(sEd, 1, 2);
+#else
+    if (nonTouchUI) {
+        gl->addWidget(lblSat, 1, 1);
+        gl->addWidget(sEd, 2, 1);
+    } else {
+        lblSat->hide();
+        sEd->hide();
+    }
+#endif
+
+    vEd = new QColSpinBox(this);
+    lblVal = new QLabel(this);
+#ifndef QT_NO_SHORTCUT
+    lblVal->setBuddy(vEd);
+#endif
+    lblVal->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#if !defined(QT_SMALL_COLORDIALOG)
+    gl->addWidget(lblVal, 2, 1);
+    gl->addWidget(vEd, 2, 2);
+#else
+    if (nonTouchUI) {
+        gl->addWidget(lblVal, 1, 2);
+        gl->addWidget(vEd, 2, 2);
+    } else {
+        lblVal->hide();
+        vEd->hide();
+    }
+#endif
+
+    rEd = new QColSpinBox(this);
+    lblRed = new QLabel(this);
+#ifndef QT_NO_SHORTCUT
+    lblRed->setBuddy(rEd);
+#endif
+    lblRed->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#if !defined(QT_SMALL_COLORDIALOG)
+    gl->addWidget(lblRed, 0, 3);
+    gl->addWidget(rEd, 0, 4);
+#else
+    if (nonTouchUI) {
+        gl->addWidget(lblRed, 3, 0);
+        gl->addWidget(rEd, 4, 0);
+    } else {
+        lblRed->hide();
+        rEd->hide();
+    }
+#endif
+
+    gEd = new QColSpinBox(this);
+    lblGreen = new QLabel(this);
+#ifndef QT_NO_SHORTCUT
+    lblGreen->setBuddy(gEd);
+#endif
+    lblGreen->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#if !defined(QT_SMALL_COLORDIALOG)
+    gl->addWidget(lblGreen, 1, 3);
+    gl->addWidget(gEd, 1, 4);
+#else
+    if (nonTouchUI) {
+        gl->addWidget(lblGreen, 3, 1);
+        gl->addWidget(gEd, 4, 1);
+    } else {
+        lblGreen->hide();
+        gEd->hide();
+    }
+#endif
+
+    bEd = new QColSpinBox(this);
+    lblBlue = new QLabel(this);
+#ifndef QT_NO_SHORTCUT
+    lblBlue->setBuddy(bEd);
+#endif
+    lblBlue->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#if !defined(QT_SMALL_COLORDIALOG)
+    gl->addWidget(lblBlue, 2, 3);
+    gl->addWidget(bEd, 2, 4);
+#else
+    if (nonTouchUI) {
+        gl->addWidget(lblBlue, 3, 2);
+        gl->addWidget(bEd, 4, 2);
+    } else {
+        lblBlue->hide();
+        bEd->hide();
+    }
+#endif
+
+    alphaEd = new QColSpinBox(this);
+    alphaLab = new QLabel(this);
+#ifndef QT_NO_SHORTCUT
+    alphaLab->setBuddy(alphaEd);
+#endif
+    alphaLab->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#if !defined(QT_SMALL_COLORDIALOG)
+    gl->addWidget(alphaLab, 3, 1, 1, 3);
+    gl->addWidget(alphaEd, 3, 4);
+#else
+    if (nonTouchUI) {
+        gl->addWidget(alphaLab, 1, 3, 3, 1);
+        gl->addWidget(alphaEd, 4, 3);
+    } else {
+        alphaLab->hide();
+        alphaEd->hide();
+    }
+#endif
+    alphaEd->hide();
+    alphaLab->hide();
+
+    connect(hEd, SIGNAL(valueChanged(int)), this, SLOT(hsvEd()));
+    connect(sEd, SIGNAL(valueChanged(int)), this, SLOT(hsvEd()));
+    connect(vEd, SIGNAL(valueChanged(int)), this, SLOT(hsvEd()));
+
+    connect(rEd, SIGNAL(valueChanged(int)), this, SLOT(rgbEd()));
+    connect(gEd, SIGNAL(valueChanged(int)), this, SLOT(rgbEd()));
+    connect(bEd, SIGNAL(valueChanged(int)), this, SLOT(rgbEd()));
+    connect(alphaEd, SIGNAL(valueChanged(int)), this, SLOT(rgbEd()));
+
+    retranslateStrings();
+}
+
+inline QRgb QColorDialogPrivate::currentColor() const { return cs->currentColor(); }
+inline int QColorDialogPrivate::currentAlpha() const { return cs->currentAlpha(); }
+inline void QColorDialogPrivate::setCurrentAlpha(int a) { cs->setCurrentAlpha(a); }
+inline void QColorDialogPrivate::showAlpha(bool b) { cs->showAlpha(b); }
+inline bool QColorDialogPrivate::isAlphaVisible() const { return cs->isAlphaVisible(); }
+
+QColor QColorDialogPrivate::currentQColor() const
+{
+    return cs->currentQColor();
+}
+
+void QColorShower::showCurrentColor()
+{
+    lab->setColor(currentColor());
+    lab->repaint();
+}
+
+void QColorShower::rgbEd()
+{
+    rgbOriginal = true;
+    curCol = qRgba(rEd->value(), gEd->value(), bEd->value(), currentAlpha());
+
+    rgb2hsv(currentColor(), hue, sat, val);
+
+    hEd->setValue(hue);
+    sEd->setValue(sat);
+    vEd->setValue(val);
+
+    showCurrentColor();
+    emit newCol(currentColor());
+    updateQColor();
+}
+
+void QColorShower::hsvEd()
+{
+    rgbOriginal = false;
+    hue = hEd->value();
+    sat = sEd->value();
+    val = vEd->value();
+
+    QColor c;
+    c.setHsv(hue, sat, val);
+    curCol = c.rgb();
+
+    rEd->setValue(qRed(currentColor()));
+    gEd->setValue(qGreen(currentColor()));
+    bEd->setValue(qBlue(currentColor()));
+
+    showCurrentColor();
+    emit newCol(currentColor());
+    updateQColor();
+}
+
+void QColorShower::setRgb(QRgb rgb)
+{
+    rgbOriginal = true;
+    curCol = rgb;
+
+    rgb2hsv(currentColor(), hue, sat, val);
+
+    hEd->setValue(hue);
+    sEd->setValue(sat);
+    vEd->setValue(val);
+
+    rEd->setValue(qRed(currentColor()));
+    gEd->setValue(qGreen(currentColor()));
+    bEd->setValue(qBlue(currentColor()));
+
+    showCurrentColor();
+    updateQColor();
+}
+
+void QColorShower::setHsv(int h, int s, int v)
+{
+    if (h < -1 || (uint)s > 255 || (uint)v > 255)
+	    return;
+
+    rgbOriginal = false;
+    hue = h; val = v; sat = s;
+    QColor c;
+    c.setHsv(hue, sat, val);
+    curCol = c.rgb();
+
+    hEd->setValue(hue);
+    sEd->setValue(sat);
+    vEd->setValue(val);
+
+    rEd->setValue(qRed(currentColor()));
+    gEd->setValue(qGreen(currentColor()));
+    bEd->setValue(qBlue(currentColor()));
+
+    showCurrentColor();
+    updateQColor();
+}
+
+void QColorShower::retranslateStrings()
+{
+    lblHue->setText(QColorDialog::tr("Hu&e:"));
+    lblSat->setText(QColorDialog::tr("&Sat:"));
+    lblVal->setText(QColorDialog::tr("&Val:"));
+    lblRed->setText(QColorDialog::tr("&Red:"));
+    lblGreen->setText(QColorDialog::tr("&Green:"));
+    lblBlue->setText(QColorDialog::tr("Bl&ue:"));
+    alphaLab->setText(QColorDialog::tr("A&lpha channel:"));
+}
+
+void QColorShower::updateQColor()
+{
+    QColor oldQColor(curQColor);
+    curQColor.setRgba(qRgba(qRed(curCol), qGreen(curCol), qBlue(curCol), currentAlpha()));
+    if (curQColor != oldQColor)
+        emit currentColorChanged(curQColor);
+}
+
+//sets all widgets to display h,s,v
+void QColorDialogPrivate::_q_newHsv(int h, int s, int v)
+{
+    cs->setHsv(h, s, v);
+    cp->setCol(h, s);
+    lp->setCol(h, s, v);
+}
+
+//sets all widgets to display rgb
+void QColorDialogPrivate::setCurrentColor(QRgb rgb)
+{
+    cs->setRgb(rgb);
+    _q_newColorTypedIn(rgb);
+}
+
+// hack; doesn't keep curCol in sync, so use with care
+void QColorDialogPrivate::setCurrentQColor(const QColor &color)
+{
+    Q_Q(QColorDialog);
+    if (cs->curQColor != color) {
+        cs->curQColor = color;
+        emit q->currentColorChanged(color);
+    }
+}
+
+bool QColorDialogPrivate::selectColor(const QColor &col)
+{
+    QRgb color = col.rgb();
+    int i = 0, j = 0;
+    // Check standard colors
+    if (standard) {
+        for (i = 0; i < 6; i++) {
+            for (j = 0; j < 8; j++) {
+                if (color == stdrgb[i + j*6]) {
+                    _q_newStandard(i, j);
+                    standard->setCurrent(i, j);
+                    standard->setSelected(i, j);
+                    standard->setFocus();
+                    return true;
+                }
+            }
+        }
+    }
+    // Check custom colors
+    if (custom) {
+        for (i = 0; i < 2; i++) {
+            for (j = 0; j < 8; j++) {
+                if (color == cusrgb[i + j*2]) {
+                    _q_newCustom(i, j);
+                    custom->setCurrent(i, j);
+                    custom->setSelected(i, j);
+                    custom->setFocus();
+                    return true;
+                }
+            }
+        }
+    }
+    return false;
+}
+
+//sets all widgets except cs to display rgb
+void QColorDialogPrivate::_q_newColorTypedIn(QRgb rgb)
+{
+    int h, s, v;
+    rgb2hsv(rgb, h, s, v);
+    cp->setCol(h, s);
+    lp->setCol(h, s, v);
+}
+
+void QColorDialogPrivate::_q_newCustom(int r, int c)
+{
+    int i = r+2*c;
+    setCurrentColor(cusrgb[i]);
+    nextCust = i;
+    if (standard)
+        standard->setSelected(-1,-1);
+}
+
+void QColorDialogPrivate::_q_newStandard(int r, int c)
+{
+    setCurrentColor(stdrgb[r+c*6]);
+    if (custom)
+        custom->setSelected(-1,-1);
+}
+
+void QColorDialogPrivate::init(const QColor &initial)
+{
+    Q_Q(QColorDialog);
+
+    q->setSizeGripEnabled(false);
+    q->setWindowTitle(QColorDialog::tr("Select Color"));
+
+    nativeDialogInUse = false;
+
+    nextCust = 0;
+    QVBoxLayout *mainLay = new QVBoxLayout(q);
+    // there's nothing in this dialog that benefits from sizing up
+    mainLay->setSizeConstraint(QLayout::SetFixedSize);
+
+    QHBoxLayout *topLay = new QHBoxLayout();
+    mainLay->addLayout(topLay);
+
+    leftLay = 0;
+
+#if defined(Q_WS_WINCE) || defined(QT_SMALL_COLORDIALOG)
+    smallDisplay = true;
+    const int lumSpace = 20;
+#else
+    // small displays (e.g. PDAs) cannot fit the full color dialog,
+    // so just use the color picker.
+    smallDisplay = (QApplication::desktop()->width() < 480 || QApplication::desktop()->height() < 350);
+    const int lumSpace = topLay->spacing() / 2;
+#endif
+
+    if (!smallDisplay) {
+        leftLay = new QVBoxLayout;
+        topLay->addLayout(leftLay);
+    }
+
+    initRGB();
+
+#ifndef QT_NO_SETTINGS
+    if (!customSet) {
+        QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+        for (int i = 0; i < 2*8; ++i) {
+            QVariant v = settings.value(QLatin1String("Qt/customColors/") + QString::number(i));
+            if (v.isValid()) {
+                QRgb rgb = v.toUInt();
+                cusrgb[i] = rgb;
+            }
+        }
+    }
+#endif
+
+#if defined(QT_SMALL_COLORDIALOG)
+#  if defined(Q_WS_S60)
+    const bool nonTouchUI = !S60->hasTouchscreen;
+#  elif defined(Q_WS_MAEMO_5)
+    const bool nonTouchUI = false;
+#  endif
+#endif
+
+    if (!smallDisplay) {
+        standard = new QColorWell(q, 6, 8, stdrgb);
+        lblBasicColors = new QLabel(q);
+#ifndef QT_NO_SHORTCUT
+        lblBasicColors->setBuddy(standard);
+#endif
+        q->connect(standard, SIGNAL(selected(int,int)), SLOT(_q_newStandard(int,int)));
+        leftLay->addWidget(lblBasicColors);
+        leftLay->addWidget(standard);
+
+#if !defined(Q_WS_WINCE)
+        leftLay->addStretch();
+#endif
+
+        custom = new QColorWell(q, 2, 8, cusrgb);
+        custom->setAcceptDrops(true);
+
+        q->connect(custom, SIGNAL(selected(int,int)), SLOT(_q_newCustom(int,int)));
+        lblCustomColors = new QLabel(q);
+#ifndef QT_NO_SHORTCUT
+        lblCustomColors->setBuddy(custom);
+#endif
+        leftLay->addWidget(lblCustomColors);
+        leftLay->addWidget(custom);
+
+        addCusBt = new QPushButton(q);
+        QObject::connect(addCusBt, SIGNAL(clicked()), q, SLOT(_q_addCustom()));
+        leftLay->addWidget(addCusBt);
+    } else {
+        // better color picker size for small displays
+#if defined(QT_SMALL_COLORDIALOG)
+        QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
+        pWidth = pHeight = qMin(screenSize.width(), screenSize.height());
+        pHeight -= 20;
+        if(screenSize.height() > screenSize.width())
+            pWidth -= 20;
+#else
+        pWidth = 150;
+        pHeight = 100;
+#endif
+        custom = 0;
+        standard = 0;
+    }
+
+    QVBoxLayout *rightLay = new QVBoxLayout;
+    topLay->addLayout(rightLay);
+
+    QHBoxLayout *pickLay = new QHBoxLayout;
+    rightLay->addLayout(pickLay);
+
+    QVBoxLayout *cLay = new QVBoxLayout;
+    pickLay->addLayout(cLay);
+    cp = new QColorPicker(q);
+
+    cp->setFrameStyle(QFrame::Panel + QFrame::Sunken);
+
+#if defined(QT_SMALL_COLORDIALOG)
+    if (!nonTouchUI) {
+        pickLay->addWidget(cp);
+        cLay->addSpacing(lumSpace);
+    } else {
+        cp->hide();
+    }
+#else
+    cLay->addSpacing(lumSpace);
+    cLay->addWidget(cp);
+#endif
+    cLay->addSpacing(lumSpace);
+
+    lp = new QColorLuminancePicker(q);
+#if defined(QT_SMALL_COLORDIALOG)
+    QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
+    const int minDimension = qMin(screenSize.height(), screenSize.width());
+    //set picker to be finger-usable
+    int pickerWidth = !nonTouchUI ? minDimension/9 : minDimension/12;
+    lp->setFixedWidth(pickerWidth);
+    if (!nonTouchUI)
+        pickLay->addWidget(lp);
+    else
+        lp->hide();
+#else
+    lp->setFixedWidth(20);
+    pickLay->addWidget(lp);
+#endif
+
+    QObject::connect(cp, SIGNAL(newCol(int,int)), lp, SLOT(setCol(int,int)));
+    QObject::connect(lp, SIGNAL(newHsv(int,int,int)), q, SLOT(_q_newHsv(int,int,int)));
+
+    rightLay->addStretch();
+
+    cs = new QColorShower(q);
+    QObject::connect(cs, SIGNAL(newCol(QRgb)), q, SLOT(_q_newColorTypedIn(QRgb)));
+    QObject::connect(cs, SIGNAL(currentColorChanged(QColor)),
+                     q, SIGNAL(currentColorChanged(QColor)));
+#if defined(QT_SMALL_COLORDIALOG)
+    if (!nonTouchUI)
+        pWidth -= cp->size().width();
+    topLay->addWidget(cs);
+#else
+    rightLay->addWidget(cs);
+#endif
+
+    buttons = new QDialogButtonBox(q);
+    mainLay->addWidget(buttons);
+
+    ok = buttons->addButton(QDialogButtonBox::Ok);
+    QObject::connect(ok, SIGNAL(clicked()), q, SLOT(accept()));
+    ok->setDefault(true);
+    cancel = buttons->addButton(QDialogButtonBox::Cancel);
+    QObject::connect(cancel, SIGNAL(clicked()), q, SLOT(reject()));
+
+    retranslateStrings();
+
+#ifdef Q_WS_MAC
+    delegate = 0;
+#endif
+
+    q->setCurrentColor(initial);
+}
+
+void QColorDialogPrivate::_q_addCustom()
+{
+    cusrgb[nextCust] = cs->currentColor();
+    if (custom)
+        custom->update();
+    nextCust = (nextCust+1) % 16;
+}
+
+void QColorDialogPrivate::retranslateStrings()
+{
+    if (!smallDisplay) {
+        lblBasicColors->setText(QColorDialog::tr("&Basic colors"));
+        lblCustomColors->setText(QColorDialog::tr("&Custom colors"));
+        addCusBt->setText(QColorDialog::tr("&Add to Custom Colors"));
+    }
+
+    cs->retranslateStrings();
+}
+
+static const Qt::WindowFlags DefaultWindowFlags =
+        Qt::Dialog | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint
+        | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint;
+
+/*!
+    \class QColorDialog
+    \brief The QColorDialog class provides a dialog widget for specifying colors.
+
+    \ingroup standard-dialogs
+
+    The color dialog's function is to allow users to choose colors.
+    For example, you might use this in a drawing program to allow the
+    user to set the brush color.
+
+    The static functions provide modal color dialogs.
+    \omit
+    If you require a modeless dialog, use the QColorDialog constructor.
+    \endomit
+
+    The static getColor() function shows the dialog, and allows the user to
+    specify a color. This function can also be used to let users choose a
+    color with a level of transparency: pass the ShowAlphaChannel option as
+    an additional argument.
+
+    The user can store customCount() different custom colors. The
+    custom colors are shared by all color dialogs, and remembered
+    during the execution of the program. Use setCustomColor() to set
+    the custom colors, and use customColor() to get them.
+
+    The \l{dialogs/standarddialogs}{Standard Dialogs} example shows
+    how to use QColorDialog as well as other built-in Qt dialogs.
+
+    \image plastique-colordialog.png A color dialog in the Plastique widget style.
+
+    \sa QColor, QFileDialog, QPrintDialog, QFontDialog, {Standard Dialogs Example}
+*/
+
+/*!
+    \since 4.5
+
+    Constructs a color dialog with the given \a parent.
+*/
+QColorDialog::QColorDialog(QWidget *parent)
+    : QDialog(*new QColorDialogPrivate, parent, DefaultWindowFlags)
+{
+    Q_D(QColorDialog);
+    d->init(Qt::white);
+}
+
+/*!
+    \since 4.5
+
+    Constructs a color dialog with the given \a parent and specified
+    \a initial color.
+*/
+QColorDialog::QColorDialog(const QColor &initial, QWidget *parent)
+    : QDialog(*new QColorDialogPrivate, parent, DefaultWindowFlags)
+{
+    Q_D(QColorDialog);
+    d->init(initial);
+}
+
+/*!
+    \property QColorDialog::currentColor
+    \brief the currently selected color in the dialog
+*/
+
+void QColorDialog::setCurrentColor(const QColor &color)
+{
+    Q_D(QColorDialog);
+    d->setCurrentColor(color.rgb());
+    d->selectColor(color);
+    d->setCurrentAlpha(color.alpha());
+
+#ifdef Q_WS_MAC
+    d->setCurrentQColor(color);
+    d->setCocoaPanelColor(color);
+#endif
+    if (d->nativeDialogInUse)
+        qt_guiPlatformPlugin()->colorDialogSetCurrentColor(this, color);
+}
+
+QColor QColorDialog::currentColor() const
+{
+    Q_D(const QColorDialog);
+    return d->currentQColor();
+}
+
+
+/*!
+    Returns the color that the user selected by clicking the \gui{OK}
+    or equivalent button.
+
+    \note This color is not always the same as the color held by the
+    \l currentColor property since the user can choose different colors
+    before finally selecting the one to use.
+*/
+QColor QColorDialog::selectedColor() const
+{
+    Q_D(const QColorDialog);
+    return d->selectedQColor;
+}
+
+/*!
+    Sets the given \a option to be enabled if \a on is true;
+    otherwise, clears the given \a option.
+
+    \sa options, testOption()
+*/
+void QColorDialog::setOption(ColorDialogOption option, bool on)
+{
+    Q_D(QColorDialog);
+    if (!(d->opts & option) != !on)
+        setOptions(d->opts ^ option);
+}
+
+/*!
+    \since 4.5
+
+    Returns true if the given \a option is enabled; otherwise, returns
+    false.
+
+    \sa options, setOption()
+*/
+bool QColorDialog::testOption(ColorDialogOption option) const
+{
+    Q_D(const QColorDialog);
+    return (d->opts & option) != 0;
+}
+
+/*!
+    \property QColorDialog::options
+    \brief the various options that affect the look and feel of the dialog
+
+    By default, all options are disabled.
+
+    Options should be set before showing the dialog. Setting them while the
+    dialog is visible is not guaranteed to have an immediate effect on the
+    dialog (depending on the option and on the platform).
+
+    \sa setOption(), testOption()
+*/
+void QColorDialog::setOptions(ColorDialogOptions options)
+{
+    Q_D(QColorDialog);
+
+    ColorDialogOptions changed = (options ^ d->opts);
+    if (!changed)
+        return;
+
+    d->opts = options;
+    d->buttons->setVisible(!(options & NoButtons));
+    d->showAlpha(options & ShowAlphaChannel);
+}
+
+QColorDialog::ColorDialogOptions QColorDialog::options() const
+{
+    Q_D(const QColorDialog);
+    return d->opts;
+}
+
+/*!
+    \enum QColorDialog::ColorDialogOption
+
+    \since 4.5
+
+    This enum specifies various options that affect the look and feel
+    of a color dialog.
+
+    \value ShowAlphaChannel Allow the user to select the alpha component of a color.
+    \value NoButtons Don't display \gui{OK} and \gui{Cancel} buttons. (Useful for "live dialogs".)
+    \value DontUseNativeDialog Use Qt's standard color dialog on the Mac instead of the operating system
+                               native color dialog.
+
+    \sa options, setOption(), testOption(), windowModality()
+*/
+
+/*!
+    \fn void QColorDialog::currentColorChanged(const QColor &color)
+
+    This signal is emitted whenever the current color changes in the dialog.
+    The current color is specified by \a color.
+
+    \sa color, colorSelected()
+*/
+
+#ifdef Q_WS_MAC
+// can only have one Cocoa color panel active
+bool QColorDialogPrivate::sharedColorPanelAvailable = true;
+#endif
+
+/*!
+    \fn void QColorDialog::colorSelected(const QColor &color);
+
+    This signal is emitted just after the user has clicked \gui{OK} to
+    select a color to use. The chosen color is specified by \a color.
+
+    \sa color, currentColorChanged()
+*/
+
+/*!
+    Changes the visibility of the dialog. If \a visible is true, the dialog
+    is shown; otherwise, it is hidden.
+*/
+void QColorDialog::setVisible(bool visible)
+{
+    Q_D(QColorDialog);
+
+    if (visible){
+        if (testAttribute(Qt::WA_WState_ExplicitShowHide) && !testAttribute(Qt::WA_WState_Hidden))
+            return;
+    } else if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden))
+        return;
+
+    if (visible)
+        d->selectedQColor = QColor();
+
+#if defined(Q_WS_MAC)
+    if (visible) {
+        if (d->delegate || (QColorDialogPrivate::sharedColorPanelAvailable &&
+                !(testAttribute(Qt::WA_DontShowOnScreen) || (d->opts & DontUseNativeDialog)))){
+            d->openCocoaColorPanel(currentColor(), parentWidget(), windowTitle(), options());
+            QColorDialogPrivate::sharedColorPanelAvailable = false;
+            setAttribute(Qt::WA_DontShowOnScreen);
+        }
+        setWindowFlags(windowModality() == Qt::WindowModal ? Qt::Sheet : DefaultWindowFlags);
+    } else {
+        if (d->delegate) {
+            d->closeCocoaColorPanel();
+            QColorDialogPrivate::sharedColorPanelAvailable = true;
+            setAttribute(Qt::WA_DontShowOnScreen, false);
+        }
+    }
+#else
+
+    if (!(d->opts & DontUseNativeDialog) && qt_guiPlatformPlugin()->colorDialogSetVisible(this, visible)) {
+        d->nativeDialogInUse = true;
+        // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below
+        // updates the state correctly, but skips showing the non-native version:
+        setAttribute(Qt::WA_DontShowOnScreen);
+    } else {
+        d->nativeDialogInUse = false;
+        setAttribute(Qt::WA_DontShowOnScreen, false);
+    }
+#endif
+
+    QDialog::setVisible(visible);
+}
+
+/*!
+    \overload
+    \since 4.5
+
+    Opens the dialog and connects its colorSelected() signal to the slot specified
+    by \a receiver and \a member.
+
+    The signal will be disconnected from the slot when the dialog is closed.
+*/
+void QColorDialog::open(QObject *receiver, const char *member)
+{
+    Q_D(QColorDialog);
+    connect(this, SIGNAL(colorSelected(QColor)), receiver, member);
+    d->receiverToDisconnectOnClose = receiver;
+    d->memberToDisconnectOnClose = member;
+    QDialog::open();
+}
+
+/*!
+    \fn QColorDialog::open()
+
+    \since 4.5
+    Shows the dialog as a \l{QDialog#Modal Dialogs}{window modal dialog},
+    returning immediately.
+
+    \sa QDialog::open()
+*/
+
+/*
+    For Symbian color dialogs
+*/
+#ifdef Q_WS_S60
+extern QColor qtSymbianGetColor(const QColor &initial);
+#endif
+/*!
+    \since 4.5
+
+    Pops up a modal color dialog with the given window \a title (or "Select Color" if none is
+    specified), lets the user choose a color, and returns that color. The color is initially set
+    to \a initial. The dialog is a child of \a parent. It returns an invalid (see
+    QColor::isValid()) color if the user cancels the dialog.
+
+    The \a options argument allows you to customize the dialog.
+
+    On Symbian, this static function will use the native color dialog and not a QColorDialog.
+    On Symbian the parameters \a title and \a parent has no relevance and the
+    \a options parameter is only used to define if the native color dialog is
+    used or not.
+*/
+QColor QColorDialog::getColor(const QColor &initial, QWidget *parent, const QString &title,
+                              ColorDialogOptions options)
+{
+#ifdef Q_WS_S60
+    if (!(options & DontUseNativeDialog))
+        return qtSymbianGetColor(initial);
+#endif
+    QColorDialog dlg(parent);
+    if (!title.isEmpty())
+        dlg.setWindowTitle(title);
+    dlg.setOptions(options);
+    dlg.setCurrentColor(initial);
+    dlg.exec();
+    return dlg.selectedColor();
+}
+
+/*!
+    Pops up a modal color dialog, lets the user choose a color, and
+    returns that color. The color is initially set to \a initial. The
+    dialog is a child of \a parent. It returns an invalid (see
+    QColor::isValid()) color if the user cancels the dialog.
+
+    On Symbian, this static function will use the native
+    color dialog and not a QColorDialog.
+*/
+
+QColor QColorDialog::getColor(const QColor &initial, QWidget *parent)
+{
+#ifdef Q_WS_S60
+    return qtSymbianGetColor(initial);
+#endif
+    return getColor(initial, parent, QString(), ColorDialogOptions(0));
+}
+
+
+/*!
+    \obsolete
+
+    Pops up a modal color dialog to allow the user to choose a color
+    and an alpha channel (transparency) value. The color+alpha is
+    initially set to \a initial. The dialog is a child of \a parent.
+
+    If \a ok is non-null, \e *\a ok is set to true if the user clicked
+    \gui{OK}, and to false if the user clicked Cancel.
+
+    If the user clicks Cancel, the \a initial value is returned.
+
+    Use QColorDialog::getColor() instead, passing the
+    QColorDialog::ShowAlphaChannel option.
+*/
+
+QRgb QColorDialog::getRgba(QRgb initial, bool *ok, QWidget *parent)
+{
+    QColor color(getColor(QColor(initial), parent, QString(), ShowAlphaChannel));
+    QRgb result = color.isValid() ? color.rgba() : initial;
+    if (ok)
+        *ok = color.isValid();
+    return result;
+}
+
+/*!
+    Destroys the color dialog.
+*/
+
+QColorDialog::~QColorDialog()
+{
+    Q_D(QColorDialog);
+#if defined(Q_WS_MAC)
+    if (d->delegate) {
+        d->releaseCocoaColorPanelDelegate();
+        QColorDialogPrivate::sharedColorPanelAvailable = true;
+    }
+#endif
+
+#ifndef QT_NO_SETTINGS
+    if (!customSet) {
+        QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+        for (int i = 0; i < 2*8; ++i)
+            settings.setValue(QLatin1String("Qt/customColors/") + QString::number(i), cusrgb[i]);
+    }
+#endif
+    if (d->nativeDialogInUse)
+        qt_guiPlatformPlugin()->colorDialogDelete(this);
+
+}
+
+
+/*!
+    \reimp
+*/
+void QColorDialog::changeEvent(QEvent *e)
+{
+    Q_D(QColorDialog);
+    if (e->type() == QEvent::LanguageChange)
+        d->retranslateStrings();
+    QDialog::changeEvent(e);
+}
+
+/*!
+  Closes the dialog and sets its result code to \a result. If this dialog
+  is shown with exec(), done() causes the local event loop to finish,
+  and exec() to return \a result.
+
+  \sa QDialog::done()
+*/
+void QColorDialog::done(int result)
+{
+    Q_D(QColorDialog);
+    QDialog::done(result);
+    if (result == Accepted) {
+        d->selectedQColor = d->currentQColor();
+        emit colorSelected(d->selectedQColor);
+    } else {
+        d->selectedQColor = QColor();
+    }
+    if (d->receiverToDisconnectOnClose) {
+        disconnect(this, SIGNAL(colorSelected(QColor)),
+                   d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
+        d->receiverToDisconnectOnClose = 0;
+    }
+    d->memberToDisconnectOnClose.clear();
+}
+
+QT_END_NAMESPACE
+
+#include "qcolordialog.moc"
+#include "moc_qcolordialog.cpp"
+
+#endif // QT_NO_COLORDIALOG
+
+/*!
+    \fn QColor QColorDialog::getColor(const QColor &init, QWidget *parent, const char *name)
+    \compat
+*/
+
+/*!
+    \fn QRgb QColorDialog::getRgba(QRgb rgba, bool *ok, QWidget *parent, const char *name)
+    \compat
+*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qcolordialog_symbian.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcolordialog_p.h"
+
+#ifndef QT_NO_COLORDIALOG
+
+
+#include "qcolor.h"
+#include "private/qguiplatformplugin_p.h"
+
+#ifdef Q_WS_S60
+#include <AknColourSelectionGrid.h>
+#endif
+
+#include "private/qt_s60_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QColor launchSymbianColorDialog(QColor initial)
+{
+    QColor currentColor = QColor::Invalid;
+#ifdef Q_WS_S60
+    QT_TRAP_THROWING(
+        CArrayFixFlat<TRgb>* array = new( ELeave ) CArrayFixFlat<TRgb>(17);
+        CleanupStack::PushL(array);
+        array->AppendL(KRgbBlack);
+        array->AppendL(KRgbDarkGray);
+        array->AppendL(KRgbDarkRed);
+        array->AppendL(KRgbDarkGreen);
+        array->AppendL(KRgbDarkYellow);
+        array->AppendL(KRgbDarkBlue);
+        array->AppendL(KRgbDarkMagenta);
+        array->AppendL(KRgbDarkCyan);
+        array->AppendL(KRgbRed);
+        array->AppendL(KRgbGreen);
+        array->AppendL(KRgbYellow);
+        array->AppendL(KRgbBlue);
+        array->AppendL(KRgbMagenta);
+        array->AppendL(KRgbCyan);
+        array->AppendL(KRgbGray);
+        array->AppendL(KRgbWhite);
+
+        TRgb initialColour(initial.red(), initial.green(), initial.blue(), initial.alpha());
+
+        TBool noneChosen = EFalse; // If true shows the default colour button
+        CAknColourSelectionGrid* colourSelectionGrid =
+            CAknColourSelectionGrid::NewL(array, EFalse, noneChosen, initialColour);
+        CleanupStack::PushL(colourSelectionGrid);
+
+        if (colourSelectionGrid->ExecuteLD()) {
+            currentColor.setRgb(initialColour.Red(), initialColour.Green(),
+                                initialColour.Blue(), initialColour.Alpha());
+        }
+        CleanupStack::Pop(colourSelectionGrid);
+        CleanupStack::PopAndDestroy(array);
+    );
+#endif
+    return currentColor;
+}
+
+QColor qtSymbianGetColor(const QColor &initial)
+{
+    return launchSymbianColorDialog(initial);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_COLORDIALOG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qdialog.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,1286 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdialog.h"
+
+
+#include "qevent.h"
+#include "qdesktopwidget.h"
+#include "qpushbutton.h"
+#include "qapplication.h"
+#include "qlayout.h"
+#include "qsizegrip.h"
+#include "qwhatsthis.h"
+#include "qmenu.h"
+#include "qcursor.h"
+#include "private/qdialog_p.h"
+#ifndef QT_NO_ACCESSIBILITY
+#include "qaccessible.h"
+#endif
+#if defined(Q_WS_WINCE)
+#include "qt_windows.h"
+#include "qmenubar.h"
+#include "qpointer.h"
+#include "qguifunctions_wince.h"
+extern bool qt_wince_is_mobile();     //defined in qguifunctions_wce.cpp
+extern bool qt_wince_is_smartphone(); //is defined in qguifunctions_wce.cpp
+#elif defined(Q_WS_X11)
+#  include "../kernel/qt_x11_p.h"
+#elif defined(Q_OS_SYMBIAN)
+#   include "qfiledialog.h"
+#   include "qfontdialog.h"
+#   include "qwizard.h"
+#   include "private/qt_s60_p.h"
+#elif defined(Q_OS_BLACKBERRY)
+#   include "qmessagebox.h"
+#endif
+
+#if defined(Q_WS_S60)
+#include <AknUtils.h>               // AknLayoutUtils
+#endif
+
+#ifndef SPI_GETSNAPTODEFBUTTON
+#   define SPI_GETSNAPTODEFBUTTON  95
+#endif
+
+QT_BEGIN_NAMESPACE
+
+/*!
+    \class QDialog
+    \brief The QDialog class is the base class of dialog windows.
+
+    \ingroup dialog-classes
+    \ingroup abstractwidgets
+
+
+    A dialog window is a top-level window mostly used for short-term
+    tasks and brief communications with the user. QDialogs may be
+    modal or modeless. QDialogs can
+    provide a \link #return return
+    value\endlink, and they can have \link #default default
+    buttons\endlink. QDialogs can also have a QSizeGrip in their
+    lower-right corner, using setSizeGripEnabled().
+
+    Note that QDialog (and any other widget that has type \c Qt::Dialog) uses
+    the parent widget slightly differently from other classes in Qt. A
+    dialog is always a top-level widget, but if it has a parent, its
+    default location is centered on top of the parent's top-level widget
+    (if it is not top-level itself). It will also share the parent's
+    taskbar entry.
+
+    Use the overload of the QWidget::setParent() function to change
+    the ownership of a QDialog widget. This function allows you to
+    explicitly set the window flags of the reparented widget; using
+    the overloaded function will clear the window flags specifying the
+    window-system properties for the widget (in particular it will
+    reset the Qt::Dialog flag).
+
+    \section1 Modal Dialogs
+
+    A \bold{modal} dialog is a dialog that blocks input to other
+    visible windows in the same application. Dialogs that are used to
+    request a file name from the user or that are used to set
+    application preferences are usually modal. Dialogs can be
+    \l{Qt::ApplicationModal}{application modal} (the default) or
+    \l{Qt::WindowModal}{window modal}.
+
+    When an application modal dialog is opened, the user must finish
+    interacting with the dialog and close it before they can access
+    any other window in the application. Window modal dialogs only
+    block access to the window associated with the dialog, allowing
+    the user to continue to use other windows in an application.
+
+    The most common way to display a modal dialog is to call its
+    exec() function. When the user closes the dialog, exec() will
+    provide a useful \link #return return value\endlink. Typically,
+    to get the dialog to close and return the appropriate value, we
+    connect a default button, e.g. \gui OK, to the accept() slot and a
+    \gui Cancel button to the reject() slot.
+    Alternatively you can call the done() slot with \c Accepted or
+    \c Rejected.
+
+    An alternative is to call setModal(true) or setWindowModality(),
+    then show(). Unlike exec(), show() returns control to the caller
+    immediately. Calling setModal(true) is especially useful for
+    progress dialogs, where the user must have the ability to interact
+    with the dialog, e.g.  to cancel a long running operation. If you
+    use show() and setModal(true) together to perform a long operation,
+    you must call QApplication::processEvents() periodically during
+    processing to enable the user to interact with the dialog. (See
+    QProgressDialog.)
+
+    \section1 Modeless Dialogs
+
+    A \bold{modeless} dialog is a dialog that operates
+    independently of other windows in the same application. Find and
+    replace dialogs in word-processors are often modeless to allow the
+    user to interact with both the application's main window and with
+    the dialog.
+
+    Modeless dialogs are displayed using show(), which returns control
+    to the caller immediately.
+
+    If you invoke the \l{QWidget::show()}{show()} function after hiding
+    a dialog, the dialog will be displayed in its original position. This is
+    because the window manager decides the position for windows that
+    have not been explicitly placed by the programmer. To preserve the
+    position of a dialog that has been moved by the user, save its position
+    in your \l{QWidget::closeEvent()}{closeEvent()}  handler and then
+    move the dialog to that position, before showing it again.
+
+    \target default
+    \section1 Default Button
+
+    A dialog's \e default button is the button that's pressed when the
+    user presses Enter (Return). This button is used to signify that
+    the user accepts the dialog's settings and wants to close the
+    dialog. Use QPushButton::setDefault(), QPushButton::isDefault()
+    and QPushButton::autoDefault() to set and control the dialog's
+    default button.
+
+    \target escapekey
+    \section1 Escape Key
+
+    If the user presses the Esc key in a dialog, QDialog::reject()
+    will be called. This will cause the window to close: The \link
+    QCloseEvent close event \endlink cannot be \link
+    QCloseEvent::ignore() ignored \endlink.
+
+    \section1 Extensibility
+
+    Extensibility is the ability to show the dialog in two ways: a
+    partial dialog that shows the most commonly used options, and a
+    full dialog that shows all the options. Typically an extensible
+    dialog will initially appear as a partial dialog, but with a
+    \gui More toggle button. If the user presses the \gui More button down,
+    the dialog is expanded. The \l{Extension Example} shows how to achieve
+    extensible dialogs using Qt.
+
+    \target return
+    \section1 Return Value (Modal Dialogs)
+
+    Modal dialogs are often used in situations where a return value is
+    required, e.g. to indicate whether the user pressed \gui OK or
+    \gui Cancel. A dialog can be closed by calling the accept() or the
+    reject() slots, and exec() will return \c Accepted or \c Rejected
+    as appropriate. The exec() call returns the result of the dialog.
+    The result is also available from result() if the dialog has not
+    been destroyed.
+
+    In order to modify your dialog's close behavior, you can reimplement
+    the functions accept(), reject() or done(). The
+    \l{QWidget::closeEvent()}{closeEvent()} function should only be
+    reimplemented to preserve the dialog's position or to override the
+    standard close or reject behavior.
+
+    \target examples
+    \section1 Code Examples
+
+    A modal dialog:
+
+    \snippet doc/src/snippets/dialogs/dialogs.cpp 1
+
+    A modeless dialog:
+
+    \snippet doc/src/snippets/dialogs/dialogs.cpp 0
+
+    \sa QDialogButtonBox, QTabWidget, QWidget, QProgressDialog,
+        {fowler}{GUI Design Handbook: Dialogs, Standard}, {Extension Example},
+        {Standard Dialogs Example}
+*/
+
+/*! \enum QDialog::DialogCode
+
+    The value returned by a modal dialog.
+
+    \value Accepted
+    \value Rejected
+*/
+
+/*!
+  \property QDialog::sizeGripEnabled
+  \brief whether the size grip is enabled
+
+  A QSizeGrip is placed in the bottom-right corner of the dialog when this
+  property is enabled. By default, the size grip is disabled.
+*/
+
+
+/*!
+  Constructs a dialog with parent \a parent.
+
+  A dialog is always a top-level widget, but if it has a parent, its
+  default location is centered on top of the parent. It will also
+  share the parent's taskbar entry.
+
+  The widget flags \a f are passed on to the QWidget constructor.
+  If, for example, you don't want a What's This button in the title bar
+  of the dialog, pass Qt::WindowTitleHint | Qt::WindowSystemMenuHint in \a f.
+
+  \sa QWidget::setWindowFlags()
+*/
+
+QDialog::QDialog(QWidget *parent, Qt::WindowFlags f)
+    : QWidget(*new QDialogPrivate, parent,
+              f | ((f & Qt::WindowType_Mask) == 0 ? Qt::Dialog : Qt::WindowType(0)))
+{
+#ifdef Q_WS_WINCE
+    if (!qt_wince_is_smartphone())
+        setWindowFlags(windowFlags() | Qt::WindowOkButtonHint | QFlag(qt_wince_is_mobile() ? 0 : Qt::WindowCancelButtonHint));
+#endif
+
+#ifdef Q_WS_S60
+    if (S60->avkonComponentsSupportTransparency) {
+        bool noSystemBackground = testAttribute(Qt::WA_NoSystemBackground);
+        setAttribute(Qt::WA_TranslucentBackground); // also sets WA_NoSystemBackground
+        setAttribute(Qt::WA_NoSystemBackground, noSystemBackground); // restore system background attribute
+    }
+#endif
+}
+
+#ifdef QT3_SUPPORT
+/*!
+    \overload
+    \obsolete
+*/
+QDialog::QDialog(QWidget *parent, const char *name, bool modal, Qt::WindowFlags f)
+    : QWidget(*new QDialogPrivate, parent,
+              f
+              | QFlag(modal ? Qt::WShowModal : Qt::WindowType(0))
+              | QFlag((f & Qt::WindowType_Mask) == 0 ? Qt::Dialog : Qt::WindowType(0))
+        )
+{
+    setObjectName(QString::fromAscii(name));
+}
+#endif
+
+/*!
+  \overload
+  \internal
+*/
+QDialog::QDialog(QDialogPrivate &dd, QWidget *parent, Qt::WindowFlags f)
+    : QWidget(dd, parent, f | ((f & Qt::WindowType_Mask) == 0 ? Qt::Dialog : Qt::WindowType(0)))
+{
+#ifdef Q_WS_WINCE
+    if (!qt_wince_is_smartphone())
+        setWindowFlags(windowFlags() | Qt::WindowOkButtonHint | QFlag(qt_wince_is_mobile() ? 0 : Qt::WindowCancelButtonHint));
+#endif
+
+#ifdef Q_WS_S60
+    if (S60->avkonComponentsSupportTransparency) {
+        bool noSystemBackground = testAttribute(Qt::WA_NoSystemBackground);
+        setAttribute(Qt::WA_TranslucentBackground); // also sets WA_NoSystemBackground
+        setAttribute(Qt::WA_NoSystemBackground, noSystemBackground); // restore system background attribute
+    }
+#endif
+}
+
+/*!
+  Destroys the QDialog, deleting all its children.
+*/
+
+QDialog::~QDialog()
+{
+    QT_TRY {
+        // Need to hide() here, as our (to-be) overridden hide()
+        // will not be called in ~QWidget.
+        hide();
+    } QT_CATCH(...) {
+        // we're in the destructor - just swallow the exception
+    }
+}
+
+/*!
+  \internal
+  This function is called by the push button \a pushButton when it
+  becomes the default button. If \a pushButton is 0, the dialogs
+  default default button becomes the default button. This is what a
+  push button calls when it loses focus.
+*/
+void QDialogPrivate::setDefault(QPushButton *pushButton)
+{
+    Q_Q(QDialog);
+    bool hasMain = false;
+    QList<QPushButton*> list = q->findChildren<QPushButton*>();
+    for (int i=0; i<list.size(); ++i) {
+        QPushButton *pb = list.at(i);
+        if (pb->window() == q) {
+            if (pb == mainDef)
+                hasMain = true;
+            if (pb != pushButton)
+                pb->setDefault(false);
+        }
+    }
+    if (!pushButton && hasMain)
+        mainDef->setDefault(true);
+    if (!hasMain)
+        mainDef = pushButton;
+}
+
+/*!
+  \internal
+  This function sets the default default push button to \a pushButton.
+  This function is called by QPushButton::setDefault().
+*/
+void QDialogPrivate::setMainDefault(QPushButton *pushButton)
+{
+    mainDef = 0;
+    setDefault(pushButton);
+}
+
+/*!
+  \internal
+  Hides the default button indicator. Called when non auto-default
+  push button get focus.
+ */
+void QDialogPrivate::hideDefault()
+{
+    Q_Q(QDialog);
+    QList<QPushButton*> list = q->findChildren<QPushButton*>();
+    for (int i=0; i<list.size(); ++i) {
+        list.at(i)->setDefault(false);
+    }
+}
+
+void QDialogPrivate::resetModalitySetByOpen()
+{
+    Q_Q(QDialog);
+    if (resetModalityTo != -1 && !q->testAttribute(Qt::WA_SetWindowModality)) {
+        // open() changed the window modality and the user didn't touch it afterwards; restore it
+        q->setWindowModality(Qt::WindowModality(resetModalityTo));
+        q->setAttribute(Qt::WA_SetWindowModality, wasModalitySet);
+#ifdef Q_WS_MAC
+        Q_ASSERT(resetModalityTo != Qt::WindowModal);
+        q->setParent(q->parentWidget(), Qt::Dialog);
+#endif
+    }
+    resetModalityTo = -1;
+}
+
+#if defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN)
+#ifdef Q_WS_WINCE_WM
+void QDialogPrivate::_q_doneAction()
+{
+    //Done...
+    QApplication::postEvent(q_func(), new QEvent(QEvent::OkRequest));
+}
+#endif
+
+/*!
+    \reimp
+*/
+bool QDialog::event(QEvent *e)
+{
+    bool result = QWidget::event(e);
+#ifdef Q_WS_WINCE
+    if (e->type() == QEvent::OkRequest) {
+        accept();
+        result = true;
+     }
+#elif defined(Q_WS_S60)
+    if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) {
+        if (!testAttribute(Qt::WA_Moved)) {
+            Qt::WindowStates state = windowState();
+            adjustPosition(parentWidget());
+            setAttribute(Qt::WA_Moved, false); // not really an explicit position
+            if (state != windowState())
+                setWindowState(state);
+        }
+    }
+    // TODO is Symbian, non-S60 behaviour required?
+#endif
+    return result;
+}
+#endif
+
+/*!
+  In general returns the modal dialog's result code, \c Accepted or \c Rejected.
+
+  \note When used from QMessageBox instance the result code type is \l QMessageBox::StandardButton
+
+  Do not call this function if the dialog was constructed with the
+  Qt::WA_DeleteOnClose attribute.
+*/
+int QDialog::result() const
+{
+    Q_D(const QDialog);
+    return d->rescode;
+}
+
+/*!
+  \fn void QDialog::setResult(int i)
+
+  Sets the modal dialog's result code to \a i.
+
+  \note We recommend that you use one of the values defined by
+  QDialog::DialogCode.
+*/
+void QDialog::setResult(int r)
+{
+    Q_D(QDialog);
+    d->rescode = r;
+}
+
+/*!
+    \since 4.5
+
+    Shows the dialog as a \l{QDialog#Modal Dialogs}{window modal dialog},
+    returning immediately.
+
+    \sa exec(), show(), result(), setWindowModality()
+*/
+void QDialog::open()
+{
+    Q_D(QDialog);
+
+    Qt::WindowModality modality = windowModality();
+    if (modality != Qt::WindowModal) {
+        d->resetModalityTo = modality;
+        d->wasModalitySet = testAttribute(Qt::WA_SetWindowModality);
+        setWindowModality(Qt::WindowModal);
+        setAttribute(Qt::WA_SetWindowModality, false);
+#ifdef Q_WS_MAC
+        setParent(parentWidget(), Qt::Sheet);
+#endif
+    }
+
+    setResult(0);
+    show();
+}
+
+/*!
+    Shows the dialog as a \l{QDialog#Modal Dialogs}{modal dialog},
+    blocking until the user closes it. The function returns a \l
+    DialogCode result.
+
+    If the dialog is \l{Qt::ApplicationModal}{application modal}, users cannot
+    interact with any other window in the same application until they close
+    the dialog. If the dialog is \l{Qt::ApplicationModal}{window modal}, only
+    interaction with the parent window is blocked while the dialog is open.
+    By default, the dialog is application modal.
+
+    \sa open(), show(), result(), setWindowModality()
+*/
+
+int QDialog::exec()
+{
+    Q_D(QDialog);
+
+    if (d->eventLoop) {
+        qWarning("QDialog::exec: Recursive call detected");
+        return -1;
+    }
+
+    bool deleteOnClose = testAttribute(Qt::WA_DeleteOnClose);
+    setAttribute(Qt::WA_DeleteOnClose, false);
+
+    d->resetModalitySetByOpen();
+
+    bool wasShowModal = testAttribute(Qt::WA_ShowModal);
+    setAttribute(Qt::WA_ShowModal, true);
+    setResult(0);
+
+//On Windows Mobile we create an empty menu to hide the current menu
+#ifdef Q_WS_WINCE_WM
+#ifndef QT_NO_MENUBAR
+    QMenuBar *menuBar = 0;
+    if (!findChild<QMenuBar *>())
+        menuBar = new QMenuBar(this);
+    if (qt_wince_is_smartphone()) {
+        QAction *doneAction = new QAction(tr("Done"), this);
+        menuBar->setDefaultAction(doneAction);
+        connect(doneAction, SIGNAL(triggered()), this, SLOT(_q_doneAction()));
+    }
+#endif //QT_NO_MENUBAR
+#endif //Q_WS_WINCE_WM
+
+    bool showSystemDialogFullScreen = false;
+
+#ifdef Q_OS_SYMBIAN
+    if (qobject_cast<QFileDialog *>(this) || qobject_cast<QFontDialog *>(this) ||
+        qobject_cast<QWizard *>(this)) {
+        showSystemDialogFullScreen = true;
+    }
+#endif // Q_OS_SYMBIAN
+
+#ifdef Q_OS_BLACKBERRY
+    if (!qobject_cast<QMessageBox *>(this))
+        showSystemDialogFullScreen = true;
+#endif // Q_OS_BLACKBERRY
+
+    if (showSystemDialogFullScreen) {
+        setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint);
+        setWindowState(Qt::WindowFullScreen);
+    }
+    show();
+
+#ifdef Q_WS_MAC
+    d->mac_nativeDialogModalHelp();
+#endif
+
+    QEventLoop eventLoop;
+    d->eventLoop = &eventLoop;
+    QPointer<QDialog> guard = this;
+    (void) eventLoop.exec(QEventLoop::DialogExec);
+    if (guard.isNull())
+        return QDialog::Rejected;
+    d->eventLoop = 0;
+
+    setAttribute(Qt::WA_ShowModal, wasShowModal);
+
+    int res = result();
+    if (deleteOnClose)
+        delete this;
+#ifdef Q_WS_WINCE_WM
+#ifndef QT_NO_MENUBAR
+    else if (menuBar)
+        delete menuBar;
+#endif //QT_NO_MENUBAR
+#endif //Q_WS_WINCE_WM
+    return res;
+}
+
+
+/*!
+  Closes the dialog and sets its result code to \a r. If this dialog
+  is shown with exec(), done() causes the local event loop to finish,
+  and exec() to return \a r.
+
+  As with QWidget::close(), done() deletes the dialog if the
+  Qt::WA_DeleteOnClose flag is set. If the dialog is the application's
+  main widget, the application terminates. If the dialog is the
+  last window closed, the QApplication::lastWindowClosed() signal is
+  emitted.
+
+  \sa accept(), reject(), QApplication::activeWindow(), QApplication::quit()
+*/
+
+void QDialog::done(int r)
+{
+    Q_D(QDialog);
+    hide();
+    setResult(r);
+
+    d->close_helper(QWidgetPrivate::CloseNoEvent);
+    d->resetModalitySetByOpen();
+
+    emit finished(r);
+    if (r == Accepted)
+        emit accepted();
+    else if (r == Rejected)
+        emit rejected();
+}
+
+/*!
+  Hides the modal dialog and sets the result code to \c Accepted.
+
+  \sa reject() done()
+*/
+
+void QDialog::accept()
+{
+    done(Accepted);
+}
+
+/*!
+  Hides the modal dialog and sets the result code to \c Rejected.
+
+  \sa accept() done()
+*/
+
+void QDialog::reject()
+{
+    done(Rejected);
+}
+
+/*! \reimp */
+bool QDialog::eventFilter(QObject *o, QEvent *e)
+{
+    return QWidget::eventFilter(o, e);
+}
+
+/*****************************************************************************
+  Event handlers
+ *****************************************************************************/
+
+#ifndef QT_NO_CONTEXTMENU
+/*! \reimp */
+void QDialog::contextMenuEvent(QContextMenuEvent *e)
+{
+#if defined(QT_NO_WHATSTHIS) || defined(QT_NO_MENU)
+    Q_UNUSED(e);
+#else
+    QWidget *w = childAt(e->pos());
+    if (!w) {
+        w = rect().contains(e->pos()) ? this : 0;
+        if (!w)
+            return;
+    }
+    while (w && w->whatsThis().size() == 0 && !w->testAttribute(Qt::WA_CustomWhatsThis))
+        w = w->isWindow() ? 0 : w->parentWidget();
+    if (w) {
+        QWeakPointer<QMenu> p = new QMenu(this);
+        QAction *wt = p.data()->addAction(tr("What's This?"));
+        if (p.data()->exec(e->globalPos()) == wt) {
+            QHelpEvent e(QEvent::WhatsThis, w->rect().center(),
+                         w->mapToGlobal(w->rect().center()));
+            QApplication::sendEvent(w, &e);
+        }
+        delete p.data();
+    }
+#endif
+}
+#endif // QT_NO_CONTEXTMENU
+
+/*! \reimp */
+void QDialog::keyPressEvent(QKeyEvent *e)
+{
+    //   Calls reject() if Escape is pressed. Simulates a button
+    //   click for the default button if Enter is pressed. Move focus
+    //   for the arrow keys. Ignore the rest.
+#ifdef Q_WS_MAC
+    if(e->modifiers() == Qt::ControlModifier && e->key() == Qt::Key_Period) {
+        reject();
+    } else
+#endif
+    if (!e->modifiers() || (e->modifiers() & Qt::KeypadModifier && e->key() == Qt::Key_Enter)) {
+        switch (e->key()) {
+        case Qt::Key_Enter:
+        case Qt::Key_Return: {
+            QList<QPushButton*> list = findChildren<QPushButton*>();
+            for (int i=0; i<list.size(); ++i) {
+                QPushButton *pb = list.at(i);
+                if (pb->isDefault() && pb->isVisible()) {
+                    if (pb->isEnabled())
+                        pb->click();
+                    return;
+                }
+            }
+        }
+        break;
+        case Qt::Key_Escape:
+            reject();
+            break;
+        default:
+            e->ignore();
+            return;
+        }
+    } else {
+        e->ignore();
+    }
+}
+
+/*! \reimp */
+void QDialog::closeEvent(QCloseEvent *e)
+{
+#ifndef QT_NO_WHATSTHIS
+    if (isModal() && QWhatsThis::inWhatsThisMode())
+        QWhatsThis::leaveWhatsThisMode();
+#endif
+    if (isVisible()) {
+        QPointer<QObject> that = this;
+        reject();
+        if (that && isVisible())
+            e->ignore();
+    } else {
+        e->accept();
+    }
+}
+
+/*****************************************************************************
+  Geometry management.
+ *****************************************************************************/
+
+/*! \reimp
+*/
+
+void QDialog::setVisible(bool visible)
+{
+    Q_D(QDialog);
+    if (visible) {
+        if (testAttribute(Qt::WA_WState_ExplicitShowHide) && !testAttribute(Qt::WA_WState_Hidden))
+            return;
+
+        if (!testAttribute(Qt::WA_Moved)) {
+            Qt::WindowStates state = windowState();
+            adjustPosition(parentWidget());
+            setAttribute(Qt::WA_Moved, false); // not really an explicit position
+            if (state != windowState())
+                setWindowState(state);
+        }
+        QWidget::setVisible(visible);
+        showExtension(d->doShowExtension);
+        QWidget *fw = window()->focusWidget();
+        if (!fw)
+            fw = this;
+
+        /*
+          The following block is to handle a special case, and does not
+          really follow propper logic in concern of autoDefault and TAB
+          order. However, it's here to ease usage for the users. If a
+          dialog has a default QPushButton, and first widget in the TAB
+          order also is a QPushButton, then we give focus to the main
+          default QPushButton. This simplifies code for the developers,
+          and actually catches most cases... If not, then they simply
+          have to use [widget*]->setFocus() themselves...
+        */
+        if (d->mainDef && fw->focusPolicy() == Qt::NoFocus) {
+            QWidget *first = fw;
+            while ((first = first->nextInFocusChain()) != fw && first->focusPolicy() == Qt::NoFocus)
+                ;
+            if (first != d->mainDef && qobject_cast<QPushButton*>(first))
+                d->mainDef->setFocus();
+        }
+        if (!d->mainDef && isWindow()) {
+            QWidget *w = fw;
+            while ((w = w->nextInFocusChain()) != fw) {
+                QPushButton *pb = qobject_cast<QPushButton *>(w);
+                if (pb && pb->autoDefault() && pb->focusPolicy() != Qt::NoFocus) {
+                    pb->setDefault(true);
+                    break;
+                }
+            }
+        }
+        if (fw && !fw->hasFocus()) {
+            QFocusEvent e(QEvent::FocusIn, Qt::TabFocusReason);
+            QApplication::sendEvent(fw, &e);
+        }
+
+#ifndef QT_NO_ACCESSIBILITY
+        QAccessible::updateAccessibility(this, 0, QAccessible::DialogStart);
+#endif
+
+    } else {
+        if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden))
+            return;
+
+#ifndef QT_NO_ACCESSIBILITY
+        if (isVisible())
+            QAccessible::updateAccessibility(this, 0, QAccessible::DialogEnd);
+#endif
+
+        // Reimplemented to exit a modal event loop when the dialog is hidden.
+        QWidget::setVisible(visible);
+        if (d->eventLoop)
+            d->eventLoop->exit();
+    }
+#ifdef Q_WS_WIN
+    if (d->mainDef && isActiveWindow()) {
+        BOOL snapToDefault = false;
+        if (SystemParametersInfo(SPI_GETSNAPTODEFBUTTON, 0, &snapToDefault, 0)) {
+            if (snapToDefault)
+                QCursor::setPos(d->mainDef->mapToGlobal(d->mainDef->rect().center()));
+        }
+    }
+#endif
+}
+
+/*!\reimp */
+void QDialog::showEvent(QShowEvent *event)
+{
+    if (!event->spontaneous() && !testAttribute(Qt::WA_Moved)) {
+        Qt::WindowStates  state = windowState();
+        adjustPosition(parentWidget());
+        setAttribute(Qt::WA_Moved, false); // not really an explicit position
+        if (state != windowState())
+            setWindowState(state);
+    }
+}
+
+/*! \internal */
+void QDialog::adjustPosition(QWidget* w)
+{
+#ifdef Q_WS_X11
+    // if the WM advertises that it will place the windows properly for us, let it do it :)
+    if (X11->isSupportedByWM(ATOM(_NET_WM_FULL_PLACEMENT)))
+        return;
+#endif
+
+#ifdef Q_OS_SYMBIAN
+    if (symbianAdjustedPosition())
+        //dialog has already been positioned
+        return;
+#endif
+
+    QPoint p(0, 0);
+    int extraw = 0, extrah = 0, scrn = 0;
+    if (w)
+        w = w->window();
+    QRect desk;
+    if (w) {
+        scrn = QApplication::desktop()->screenNumber(w);
+    } else if (QApplication::desktop()->isVirtualDesktop()) {
+        scrn = QApplication::desktop()->screenNumber(QCursor::pos());
+    } else {
+        scrn = QApplication::desktop()->screenNumber(this);
+    }
+    desk = QApplication::desktop()->availableGeometry(scrn);
+
+    QWidgetList list = QApplication::topLevelWidgets();
+    for (int i = 0; (extraw == 0 || extrah == 0) && i < list.size(); ++i) {
+        QWidget * current = list.at(i);
+        if (current->isVisible()) {
+            int framew = current->geometry().x() - current->x();
+            int frameh = current->geometry().y() - current->y();
+
+            extraw = qMax(extraw, framew);
+            extrah = qMax(extrah, frameh);
+        }
+    }
+
+    // sanity check for decoration frames. With embedding, we
+    // might get extraordinary values
+    if (extraw == 0 || extrah == 0 || extraw >= 10 || extrah >= 40) {
+        extrah = 40;
+        extraw = 10;
+    }
+
+
+    if (w) {
+        // Use mapToGlobal rather than geometry() in case w might
+        // be embedded in another application
+        QPoint pp = w->mapToGlobal(QPoint(0,0));
+        p = QPoint(pp.x() + w->width()/2,
+                    pp.y() + w->height()/ 2);
+    } else {
+        // p = middle of the desktop
+        p = QPoint(desk.x() + desk.width()/2, desk.y() + desk.height()/2);
+    }
+
+    // p = origin of this
+    p = QPoint(p.x()-width()/2 - extraw,
+                p.y()-height()/2 - extrah);
+
+
+    if (p.x() + extraw + width() > desk.x() + desk.width())
+        p.setX(desk.x() + desk.width() - width() - extraw);
+    if (p.x() < desk.x())
+        p.setX(desk.x());
+
+    if (p.y() + extrah + height() > desk.y() + desk.height())
+        p.setY(desk.y() + desk.height() - height() - extrah);
+    if (p.y() < desk.y())
+        p.setY(desk.y());
+
+    move(p);
+}
+
+#if defined(Q_OS_SYMBIAN)
+/*! \internal */
+bool QDialog::symbianAdjustedPosition()
+{
+#if defined(Q_WS_S60)
+    QPoint p;
+    QPoint oldPos = pos();
+    if (isFullScreen()) {
+        p.setX(0);
+        p.setY(0);
+    } else if (isMaximized()) {
+        TRect statusPaneRect = TRect();
+        if (S60->screenHeightInPixels > S60->screenWidthInPixels) {
+            AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStatusPane, statusPaneRect);
+        } else {
+            AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, statusPaneRect);
+            // In some native layouts, StaCon is not used. Try to fetch the status pane
+            // height from StatusPane component.
+            if (statusPaneRect.IsEmpty())
+                AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStatusPane, statusPaneRect);
+        }
+
+        p.setX(0);
+        p.setY(statusPaneRect.Height());
+    } else {
+        // naive way to deduce screen orientation
+        if (S60->screenHeightInPixels > S60->screenWidthInPixels) {
+            int cbaHeight;
+            TRect rect;
+            AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, rect);
+            cbaHeight = rect.Height();
+            p.setY(S60->screenHeightInPixels - height() - cbaHeight);
+            p.setX(0);
+        } else {
+            const int scrollbarWidth = style()->pixelMetric(QStyle::PM_ScrollBarExtent);
+            TRect staConTopRect = TRect();
+            AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect);
+            if (staConTopRect.IsEmpty()) {
+                TRect cbaRect = TRect();
+                AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, cbaRect);
+                AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
+                switch (cbaLocation) {
+                case AknLayoutUtils::EAknCbaLocationBottom:
+                    p.setY(S60->screenHeightInPixels - height() - cbaRect.Height());
+                    p.setX((S60->screenWidthInPixels - width()) >> 1);
+                    break;
+                case AknLayoutUtils::EAknCbaLocationRight:
+                    p.setY((S60->screenHeightInPixels - height()) >> 1);
+                    p.setX(qMax(0,S60->screenWidthInPixels - width() - scrollbarWidth - cbaRect.Width()));
+                    break;
+                case AknLayoutUtils::EAknCbaLocationLeft:
+                    p.setY((S60->screenHeightInPixels - height()) >> 1);
+                    p.setX(qMax(0,scrollbarWidth + cbaRect.Width()));
+                    break;
+                }
+            } else {
+                p.setY((S60->screenHeightInPixels - height()) >> 1);
+                p.setX(qMax(0,S60->screenWidthInPixels - width()));
+            }
+        }
+    }
+    if (oldPos != p || p.y() < 0)
+        move(p);
+    return true;
+#else
+    // TODO - check positioning requirement for Symbian, non-s60
+    return false;
+#endif
+}
+#endif
+
+/*!
+    \obsolete
+
+    If \a orientation is Qt::Horizontal, the extension will be displayed
+    to the right of the dialog's main area. If \a orientation is
+    Qt::Vertical, the extension will be displayed below the dialog's main
+    area.
+
+    Instead of using this functionality, we recommend that you simply call
+    show() or hide() on the part of the dialog that you want to use as an
+    extension. See the \l{Extension Example} for details.
+
+    \sa setExtension()
+*/
+void QDialog::setOrientation(Qt::Orientation orientation)
+{
+    Q_D(QDialog);
+    d->orientation = orientation;
+}
+
+/*!
+    \obsolete
+
+    Returns the dialog's extension orientation.
+
+    Instead of using this functionality, we recommend that you simply call
+    show() or hide() on the part of the dialog that you want to use as an
+    extension. See the \l{Extension Example} for details.
+
+    \sa extension()
+*/
+Qt::Orientation QDialog::orientation() const
+{
+    Q_D(const QDialog);
+    return d->orientation;
+}
+
+/*!
+    \obsolete
+
+    Sets the widget, \a extension, to be the dialog's extension,
+    deleting any previous extension. The dialog takes ownership of the
+    extension. Note that if 0 is passed any existing extension will be
+    deleted. This function must only be called while the dialog is hidden.
+
+    Instead of using this functionality, we recommend that you simply call
+    show() or hide() on the part of the dialog that you want to use as an
+    extension. See the \l{Extension Example} for details.
+
+    \sa showExtension(), setOrientation()
+*/
+void QDialog::setExtension(QWidget* extension)
+{
+    Q_D(QDialog);
+    delete d->extension;
+    d->extension = extension;
+
+    if (!extension)
+        return;
+
+    if (extension->parentWidget() != this)
+        extension->setParent(this);
+    extension->hide();
+}
+
+/*!
+    \obsolete
+
+    Returns the dialog's extension or 0 if no extension has been
+    defined.
+
+    Instead of using this functionality, we recommend that you simply call
+    show() or hide() on the part of the dialog that you want to use as an
+    extension. See the \l{Extension Example} for details.
+
+    \sa showExtension(), setOrientation()
+*/
+QWidget* QDialog::extension() const
+{
+    Q_D(const QDialog);
+    return d->extension;
+}
+
+
+/*!
+    \obsolete
+
+    If \a showIt is true, the dialog's extension is shown; otherwise the
+    extension is hidden.
+
+    Instead of using this functionality, we recommend that you simply call
+    show() or hide() on the part of the dialog that you want to use as an
+    extension. See the \l{Extension Example} for details.
+
+    \sa show(), setExtension(), setOrientation()
+*/
+void QDialog::showExtension(bool showIt)
+{
+    Q_D(QDialog);
+    d->doShowExtension = showIt;
+    if (!d->extension)
+        return;
+    if (!testAttribute(Qt::WA_WState_Visible))
+        return;
+    if (d->extension->isVisible() == showIt)
+        return;
+
+    if (showIt) {
+        d->size = size();
+        d->min = minimumSize();
+        d->max = maximumSize();
+        if (layout())
+            layout()->setEnabled(false);
+        QSize s(d->extension->sizeHint()
+                 .expandedTo(d->extension->minimumSize())
+                 .boundedTo(d->extension->maximumSize()));
+        if (d->orientation == Qt::Horizontal) {
+            int h = qMax(height(), s.height());
+            d->extension->setGeometry(width(), 0, s.width(), h);
+            setFixedSize(width() + s.width(), h);
+        } else {
+            int w = qMax(width(), s.width());
+            d->extension->setGeometry(0, height(), w, s.height());
+            setFixedSize(w, height() + s.height());
+        }
+        d->extension->show();
+#ifndef QT_NO_SIZEGRIP
+        const bool sizeGripEnabled = isSizeGripEnabled();
+        setSizeGripEnabled(false);
+        d->sizeGripEnabled = sizeGripEnabled;
+#endif
+    } else {
+        d->extension->hide();
+        // workaround for CDE window manager that won't shrink with (-1,-1)
+        setMinimumSize(d->min.expandedTo(QSize(1, 1)));
+        setMaximumSize(d->max);
+        resize(d->size);
+        if (layout())
+            layout()->setEnabled(true);
+#ifndef QT_NO_SIZEGRIP
+        setSizeGripEnabled(d->sizeGripEnabled);
+#endif
+    }
+}
+
+
+/*! \reimp */
+QSize QDialog::sizeHint() const
+{
+    Q_D(const QDialog);
+    if (d->extension) {
+        if (d->orientation == Qt::Horizontal)
+            return QSize(QWidget::sizeHint().width(),
+                        qMax(QWidget::sizeHint().height(),d->extension->sizeHint().height()));
+        else
+            return QSize(qMax(QWidget::sizeHint().width(), d->extension->sizeHint().width()),
+                        QWidget::sizeHint().height());
+    }
+#if defined(Q_WS_S60)
+    // if size is not fixed, try to adjust it according to S60 layoutting
+    if (minimumSize() != maximumSize()) {
+        // In S60, dialogs are always the width of screen (in portrait, regardless of current layout)
+        return QSize(qMin(S60->screenHeightInPixels, S60->screenWidthInPixels), QWidget::sizeHint().height());
+    } else {
+        return QWidget::sizeHint();
+    }
+#else
+    return QWidget::sizeHint();
+#endif //Q_WS_S60
+}
+
+
+/*! \reimp */
+QSize QDialog::minimumSizeHint() const
+{
+    Q_D(const QDialog);
+    if (d->extension) {
+        if (d->orientation == Qt::Horizontal)
+            return QSize(QWidget::minimumSizeHint().width(),
+                        qMax(QWidget::minimumSizeHint().height(), d->extension->minimumSizeHint().height()));
+        else
+            return QSize(qMax(QWidget::minimumSizeHint().width(), d->extension->minimumSizeHint().width()),
+                        QWidget::minimumSizeHint().height());
+    }
+
+    return QWidget::minimumSizeHint();
+}
+
+/*!
+    \property QDialog::modal
+    \brief whether show() should pop up the dialog as modal or modeless
+
+    By default, this property is false and show() pops up the dialog
+    as modeless. Setting his property to true is equivalent to setting
+    QWidget::windowModality to Qt::ApplicationModal.
+
+    exec() ignores the value of this property and always pops up the
+    dialog as modal.
+
+    \sa QWidget::windowModality, show(), exec()
+*/
+
+void QDialog::setModal(bool modal)
+{
+    setAttribute(Qt::WA_ShowModal, modal);
+}
+
+
+bool QDialog::isSizeGripEnabled() const
+{
+#ifndef QT_NO_SIZEGRIP
+    Q_D(const QDialog);
+    return !!d->resizer;
+#else
+    return false;
+#endif
+}
+
+
+void QDialog::setSizeGripEnabled(bool enabled)
+{
+#ifdef QT_NO_SIZEGRIP
+    Q_UNUSED(enabled);
+#else
+    Q_D(QDialog);
+#ifndef QT_NO_SIZEGRIP
+    d->sizeGripEnabled = enabled;
+    if (enabled && d->doShowExtension)
+        return;
+#endif
+    if (!enabled != !d->resizer) {
+        if (enabled) {
+            d->resizer = new QSizeGrip(this);
+            // adjustSize() processes all events, which is suboptimal
+            d->resizer->resize(d->resizer->sizeHint());
+            if (isRightToLeft())
+                d->resizer->move(rect().bottomLeft() -d->resizer->rect().bottomLeft());
+            else
+                d->resizer->move(rect().bottomRight() -d->resizer->rect().bottomRight());
+            d->resizer->raise();
+            d->resizer->show();
+        } else {
+            delete d->resizer;
+            d->resizer = 0;
+        }
+    }
+#endif //QT_NO_SIZEGRIP
+}
+
+
+
+/*! \reimp */
+void QDialog::resizeEvent(QResizeEvent *)
+{
+#ifndef QT_NO_SIZEGRIP
+    Q_D(QDialog);
+    if (d->resizer) {
+        if (isRightToLeft())
+            d->resizer->move(rect().bottomLeft() -d->resizer->rect().bottomLeft());
+        else
+            d->resizer->move(rect().bottomRight() -d->resizer->rect().bottomRight());
+        d->resizer->raise();
+    }
+#endif
+}
+
+/*! \fn void QDialog::finished(int result)
+    \since 4.1
+
+    This signal is emitted when the dialog's \a result code has been
+    set, either by the user or by calling done(), accept(), or
+    reject().
+
+    Note that this signal is \e not emitted when hiding the dialog
+    with hide() or setVisible(false). This includes deleting the
+    dialog while it is visible.
+
+    \sa accepted(), rejected()
+*/
+
+/*! \fn void QDialog::accepted()
+    \since 4.1
+
+    This signal is emitted when the dialog has been accepted either by
+    the user or by calling accept() or done() with the
+    QDialog::Accepted argument.
+
+    Note that this signal is \e not emitted when hiding the dialog
+    with hide() or setVisible(false). This includes deleting the
+    dialog while it is visible.
+
+    \sa finished(), rejected()
+*/
+
+/*! \fn void QDialog::rejected()
+    \since 4.1
+
+    This signal is emitted when the dialog has been rejected either by
+    the user or by calling reject() or done() with the
+    QDialog::Rejected argument.
+
+    Note that this signal is \e not emitted when hiding the dialog
+    with hide() or setVisible(false). This includes deleting the
+    dialog while it is visible.
+
+    \sa finished(), accepted()
+*/
+
+QT_END_NAMESPACE
+#include "moc_qdialog.cpp"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qdialogbuttonbox.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,991 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtWidgets module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qhash.h>
+#include <QtWidgets/qpushbutton.h>
+#include <QtWidgets/qstyle.h>
+#include <QtWidgets/qlayout.h>
+#include <QtWidgets/qdialog.h>
+#include <QtWidgets/qapplication.h>
+#include <private/qwidget_p.h>
+#include <private/qguiapplication_p.h>
+#include <QtGui/qpa/qplatformdialoghelper.h>
+#include <QtGui/qpa/qplatformtheme.h>
+#include <QtWidgets/qaction.h>
+
+#include "qdialogbuttonbox.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+    \class QDialogButtonBox
+    \since 4.2
+    \brief The QDialogButtonBox class is a widget that presents buttons in a
+    layout that is appropriate to the current widget style.
+
+    \ingroup dialog-classes
+    \inmodule QtWidgets
+
+    Dialogs and message boxes typically present buttons in a layout that
+    conforms to the interface guidelines for that platform. Invariably,
+    different platforms have different layouts for their dialogs.
+    QDialogButtonBox allows a developer to add buttons to it and will
+    automatically use the appropriate layout for the user's desktop
+    environment.
+
+    Most buttons for a dialog follow certain roles. Such roles include:
+
+    \list
+    \li Accepting or rejecting the dialog.
+    \li Asking for help.
+    \li Performing actions on the dialog itself (such as resetting fields or
+       applying changes).
+    \endlist
+
+    There can also be alternate ways of dismissing the dialog which may cause
+    destructive results.
+
+    Most dialogs have buttons that can almost be considered standard (e.g.
+    \uicontrol OK and \uicontrol Cancel buttons). It is sometimes convenient to create these
+    buttons in a standard way.
+
+    There are a couple ways of using QDialogButtonBox. One ways is to create
+    the buttons (or button texts) yourself and add them to the button box,
+    specifying their role.
+
+    \snippet dialogs/extension/finddialog.cpp 1
+
+    Alternatively, QDialogButtonBox provides several standard buttons (e.g. OK, Cancel, Save)
+    that you can use. They exist as flags so you can OR them together in the constructor.
+
+    \snippet dialogs/tabdialog/tabdialog.cpp 2
+
+    You can mix and match normal buttons and standard buttons.
+
+    Currently the buttons are laid out in the following way if the button box is horizontal:
+    \table
+    \row \li \inlineimage buttonbox-gnomelayout-horizontal.png GnomeLayout Horizontal
+         \li Button box laid out in horizontal GnomeLayout
+    \row \li \inlineimage buttonbox-kdelayout-horizontal.png KdeLayout Horizontal
+         \li Button box laid out in horizontal KdeLayout
+    \row \li \inlineimage buttonbox-maclayout-horizontal.png MacLayout Horizontal
+         \li Button box laid out in horizontal MacLayout
+    \row \li \inlineimage buttonbox-winlayout-horizontal.png  WinLayout Horizontal
+         \li Button box laid out in horizontal WinLayout
+    \endtable
+
+    The buttons are laid out the following way if the button box is vertical:
+
+    \table
+    \row \li GnomeLayout
+         \li KdeLayout
+         \li MacLayout
+         \li WinLayout
+    \row \li \inlineimage buttonbox-gnomelayout-vertical.png GnomeLayout Vertical
+         \li \inlineimage buttonbox-kdelayout-vertical.png KdeLayout Vertical
+         \li \inlineimage buttonbox-maclayout-vertical.png MacLayout Vertical
+         \li \inlineimage buttonbox-winlayout-vertical.png WinLayout Vertical
+    \endtable
+
+    Additionally, button boxes that contain only buttons with ActionRole or
+    HelpRole can be considered modeless and have an alternate look on \macos:
+
+    \table
+    \row \li modeless horizontal MacLayout
+         \li \inlineimage buttonbox-mac-modeless-horizontal.png Screenshot of modeless horizontal MacLayout
+    \row \li modeless vertical MacLayout
+         \li \inlineimage buttonbox-mac-modeless-vertical.png Screenshot of modeless vertical MacLayout
+    \endtable
+
+    When a button is clicked in the button box, the clicked() signal is emitted
+    for the actual button is that is pressed. For convenience, if the button
+    has an AcceptRole, RejectRole, or HelpRole, the accepted(), rejected(), or
+    helpRequested() signals are emitted respectively.
+
+    If you want a specific button to be default you need to call
+    QPushButton::setDefault() on it yourself. However, if there is no default
+    button set and to preserve which button is the default button across
+    platforms when using the QPushButton::autoDefault property, the first push
+    button with the accept role is made the default button when the
+    QDialogButtonBox is shown,
+
+    \sa QMessageBox, QPushButton, QDialog
+*/
+
+class QDialogButtonBoxPrivate : public QWidgetPrivate
+{
+    Q_DECLARE_PUBLIC(QDialogButtonBox)
+
+public:
+    QDialogButtonBoxPrivate(Qt::Orientation orient);
+
+    QList<QAbstractButton *> buttonLists[QDialogButtonBox::NRoles];
+    QHash<QPushButton *, QDialogButtonBox::StandardButton> standardButtonHash;
+
+    Qt::Orientation orientation;
+    QDialogButtonBox::ButtonLayout layoutPolicy;
+    QBoxLayout *buttonLayout;
+    bool internalRemove;
+    bool center;
+
+    void createStandardButtons(QDialogButtonBox::StandardButtons buttons);
+
+    void layoutButtons();
+    void initLayout();
+    void resetLayout();
+    QPushButton *createButton(QDialogButtonBox::StandardButton button, bool doLayout = true);
+    void addButton(QAbstractButton *button, QDialogButtonBox::ButtonRole role, bool doLayout = true);
+    void _q_handleButtonDestroyed();
+    void _q_handleButtonClicked();
+    void addButtonsToLayout(const QList<QAbstractButton *> &buttonList, bool reverse);
+    void retranslateStrings();
+};
+
+QDialogButtonBoxPrivate::QDialogButtonBoxPrivate(Qt::Orientation orient)
+    : orientation(orient), buttonLayout(nullptr), internalRemove(false), center(false)
+{
+}
+
+void QDialogButtonBoxPrivate::initLayout()
+{
+    Q_Q(QDialogButtonBox);
+    layoutPolicy = QDialogButtonBox::ButtonLayout(q->style()->styleHint(QStyle::SH_DialogButtonLayout, nullptr, q));
+    bool createNewLayout = buttonLayout == nullptr
+        || (orientation == Qt::Horizontal && qobject_cast<QVBoxLayout *>(buttonLayout) != 0)
+        || (orientation == Qt::Vertical && qobject_cast<QHBoxLayout *>(buttonLayout) != 0);
+    if (createNewLayout) {
+        delete buttonLayout;
+        if (orientation == Qt::Horizontal)
+            buttonLayout = new QHBoxLayout(q);
+        else
+            buttonLayout = new QVBoxLayout(q);
+    }
+
+    int left, top, right, bottom;
+    setLayoutItemMargins(QStyle::SE_PushButtonLayoutItem);
+    getLayoutItemMargins(&left, &top, &right, &bottom);
+    buttonLayout->setContentsMargins(-left, -top, -right, -bottom);
+
+    if (!q->testAttribute(Qt::WA_WState_OwnSizePolicy)) {
+        QSizePolicy sp(QSizePolicy::Expanding, QSizePolicy::Fixed, QSizePolicy::ButtonBox);
+        if (orientation == Qt::Vertical)
+            sp.transpose();
+        q->setSizePolicy(sp);
+        q->setAttribute(Qt::WA_WState_OwnSizePolicy, false);
+    }
+}
+
+void QDialogButtonBoxPrivate::resetLayout()
+{
+    //delete buttonLayout;
+    initLayout();
+    layoutButtons();
+}
+
+void QDialogButtonBoxPrivate::addButtonsToLayout(const QList<QAbstractButton *> &buttonList,
+                                                 bool reverse)
+{
+    int start = reverse ? buttonList.count() - 1 : 0;
+    int end = reverse ? -1 : buttonList.count();
+    int step = reverse ? -1 : 1;
+
+    for (int i = start; i != end; i += step) {
+        QAbstractButton *button = buttonList.at(i);
+        buttonLayout->addWidget(button);
+        button->show();
+    }
+}
+
+void QDialogButtonBoxPrivate::layoutButtons()
+{
+    Q_Q(QDialogButtonBox);
+    const int MacGap = 36 - 8;    // 8 is the default gap between a widget and a spacer item
+
+    for (int i = buttonLayout->count() - 1; i >= 0; --i) {
+        QLayoutItem *item = buttonLayout->takeAt(i);
+        if (QWidget *widget = item->widget())
+            widget->hide();
+        delete item;
+    }
+
+    int tmpPolicy = layoutPolicy;
+
+    static const int M = 5;
+    static const int ModalRoles[M] = { QPlatformDialogHelper::AcceptRole, QPlatformDialogHelper::RejectRole,
+        QPlatformDialogHelper::DestructiveRole, QPlatformDialogHelper::YesRole, QPlatformDialogHelper::NoRole };
+    if (tmpPolicy == QDialogButtonBox::MacLayout) {
+        bool hasModalButton = false;
+        for (int i = 0; i < M; ++i) {
+            if (!buttonLists[ModalRoles[i]].isEmpty()) {
+                hasModalButton = true;
+                break;
+            }
+        }
+        if (!hasModalButton)
+            tmpPolicy = 4;  // Mac modeless
+    }
+
+    const int *currentLayout = QPlatformDialogHelper::buttonLayout(
+        orientation, static_cast<QPlatformDialogHelper::ButtonLayout>(tmpPolicy));
+
+    if (center)
+        buttonLayout->addStretch();
+
+    const QList<QAbstractButton *> &acceptRoleList = buttonLists[QPlatformDialogHelper::AcceptRole];
+
+    while (*currentLayout != QPlatformDialogHelper::EOL) {
+        int role = (*currentLayout & ~QPlatformDialogHelper::Reverse);
+        bool reverse = (*currentLayout & QPlatformDialogHelper::Reverse);
+
+        switch (role) {
+        case QPlatformDialogHelper::Stretch:
+            if (!center)
+                buttonLayout->addStretch();
+            break;
+        case QPlatformDialogHelper::AcceptRole: {
+            if (acceptRoleList.isEmpty())
+                break;
+            // Only the first one
+            QAbstractButton *button = acceptRoleList.first();
+            buttonLayout->addWidget(button);
+            button->show();
+        }
+            break;
+        case QPlatformDialogHelper::AlternateRole:
+            if (acceptRoleList.size() > 1)
+                addButtonsToLayout(acceptRoleList.mid(1), reverse);
+            break;
+        case QPlatformDialogHelper::DestructiveRole:
+            {
+                const QList<QAbstractButton *> &list = buttonLists[role];
+
+                /*
+                    Mac: Insert a gap on the left of the destructive
+                    buttons to ensure that they don't get too close to
+                    the help and action buttons (but only if there are
+                    some buttons to the left of the destructive buttons
+                    (and the stretch, whence buttonLayout->count() > 1
+                    and not 0)).
+                */
+                if (tmpPolicy == QDialogButtonBox::MacLayout
+                        && !list.isEmpty() && buttonLayout->count() > 1)
+                    buttonLayout->addSpacing(MacGap);
+
+                addButtonsToLayout(list, reverse);
+
+                /*
+                    Insert a gap between the destructive buttons and the
+                    accept and reject buttons.
+                */
+                if (tmpPolicy == QDialogButtonBox::MacLayout && !list.isEmpty())
+                    buttonLayout->addSpacing(MacGap);
+            }
+            break;
+        case QPlatformDialogHelper::RejectRole:
+        case QPlatformDialogHelper::ActionRole:
+        case QPlatformDialogHelper::HelpRole:
+        case QPlatformDialogHelper::YesRole:
+        case QPlatformDialogHelper::NoRole:
+        case QPlatformDialogHelper::ApplyRole:
+        case QPlatformDialogHelper::ResetRole:
+            addButtonsToLayout(buttonLists[role], reverse);
+        }
+        ++currentLayout;
+    }
+
+    QWidget *lastWidget = nullptr;
+    q->setFocusProxy(nullptr);
+    for (int i = 0; i < buttonLayout->count(); ++i) {
+        QLayoutItem *item = buttonLayout->itemAt(i);
+        if (QWidget *widget = item->widget()) {
+            if (lastWidget)
+                QWidget::setTabOrder(lastWidget, widget);
+            else
+                q->setFocusProxy(widget);
+            lastWidget = widget;
+        }
+    }
+
+    if (center)
+        buttonLayout->addStretch();
+}
+
+QPushButton *QDialogButtonBoxPrivate::createButton(QDialogButtonBox::StandardButton sbutton,
+                                                   bool doLayout)
+{
+    Q_Q(QDialogButtonBox);
+    int icon = 0;
+
+    switch (sbutton) {
+    case QDialogButtonBox::Ok:
+        icon = QStyle::SP_DialogOkButton;
+        break;
+    case QDialogButtonBox::Save:
+        icon = QStyle::SP_DialogSaveButton;
+        break;
+    case QDialogButtonBox::Open:
+        icon = QStyle::SP_DialogOpenButton;
+        break;
+    case QDialogButtonBox::Cancel:
+        icon = QStyle::SP_DialogCancelButton;
+        break;
+    case QDialogButtonBox::Close:
+        icon = QStyle::SP_DialogCloseButton;
+        break;
+    case QDialogButtonBox::Apply:
+        icon = QStyle::SP_DialogApplyButton;
+        break;
+    case QDialogButtonBox::Reset:
+        icon = QStyle::SP_DialogResetButton;
+        break;
+    case QDialogButtonBox::Help:
+        icon = QStyle::SP_DialogHelpButton;
+        break;
+    case QDialogButtonBox::Discard:
+        icon = QStyle::SP_DialogDiscardButton;
+        break;
+    case QDialogButtonBox::Yes:
+        icon = QStyle::SP_DialogYesButton;
+        break;
+    case QDialogButtonBox::No:
+        icon = QStyle::SP_DialogNoButton;
+        break;
+    case QDialogButtonBox::YesToAll:
+        icon = QStyle::SP_DialogYesToAllButton;
+        break;
+    case QDialogButtonBox::NoToAll:
+        icon = QStyle::SP_DialogNoToAllButton;
+        break;
+    case QDialogButtonBox::SaveAll:
+        icon = QStyle::SP_DialogSaveAllButton;
+        break;
+    case QDialogButtonBox::Abort:
+        icon = QStyle::SP_DialogAbortButton;
+        break;
+    case QDialogButtonBox::Retry:
+        icon = QStyle::SP_DialogRetryButton;
+        break;
+    case QDialogButtonBox::Ignore:
+        icon = QStyle::SP_DialogIgnoreButton;
+        break;
+    case QDialogButtonBox::RestoreDefaults:
+        icon = QStyle::SP_RestoreDefaultsButton;
+        break;
+    case QDialogButtonBox::NoButton:
+        return nullptr;
+        ;
+    }
+    QPushButton *button = new QPushButton(QGuiApplicationPrivate::platformTheme()->standardButtonText(sbutton), q);
+    QStyle *style = q->style();
+    if (style->styleHint(QStyle::SH_DialogButtonBox_ButtonsHaveIcons, nullptr, q) && icon != 0)
+        button->setIcon(style->standardIcon(QStyle::StandardPixmap(icon), nullptr, q));
+    if (style != QApplication::style()) // Propagate style
+        button->setStyle(style);
+    standardButtonHash.insert(button, sbutton);
+    QPlatformDialogHelper::ButtonRole role = QPlatformDialogHelper::buttonRole(static_cast<QPlatformDialogHelper::StandardButton>(sbutton));
+    if (Q_UNLIKELY(role == QPlatformDialogHelper::InvalidRole))
+        qWarning("QDialogButtonBox::createButton: Invalid ButtonRole, button not added");
+    else
+        addButton(button, static_cast<QDialogButtonBox::ButtonRole>(role), doLayout);
+#if QT_CONFIG(shortcut)
+    const QKeySequence standardShortcut = QGuiApplicationPrivate::platformTheme()->standardButtonShortcut(sbutton);
+    if (!standardShortcut.isEmpty())
+        button->setShortcut(standardShortcut);
+#endif
+    return button;
+}
+
+void QDialogButtonBoxPrivate::addButton(QAbstractButton *button, QDialogButtonBox::ButtonRole role,
+                                        bool doLayout)
+{
+    Q_Q(QDialogButtonBox);
+    QObject::connect(button, SIGNAL(clicked()), q, SLOT(_q_handleButtonClicked()));
+    QObject::connect(button, SIGNAL(destroyed()), q, SLOT(_q_handleButtonDestroyed()));
+    buttonLists[role].append(button);
+    if (doLayout)
+        layoutButtons();
+}
+
+void QDialogButtonBoxPrivate::createStandardButtons(QDialogButtonBox::StandardButtons buttons)
+{
+    uint i = QDialogButtonBox::FirstButton;
+    while (i <= QDialogButtonBox::LastButton) {
+        if (i & buttons) {
+            createButton(QDialogButtonBox::StandardButton(i), false);
+        }
+        i = i << 1;
+    }
+    layoutButtons();
+}
+
+void QDialogButtonBoxPrivate::retranslateStrings()
+{
+    typedef QHash<QPushButton *, QDialogButtonBox::StandardButton>::iterator Iterator;
+
+    const Iterator end = standardButtonHash.end();
+    for (Iterator it = standardButtonHash.begin(); it != end; ++it) {
+        const QString text = QGuiApplicationPrivate::platformTheme()->standardButtonText(it.value());
+        if (!text.isEmpty())
+            it.key()->setText(text);
+    }
+}
+
+/*!
+    Constructs an empty, horizontal button box with the given \a parent.
+
+    \sa orientation, addButton()
+*/
+QDialogButtonBox::QDialogButtonBox(QWidget *parent)
+    : QDialogButtonBox(Qt::Horizontal, parent)
+{
+}
+
+/*!
+    Constructs an empty button box with the given \a orientation and \a parent.
+
+    \sa orientation, addButton()
+*/
+QDialogButtonBox::QDialogButtonBox(Qt::Orientation orientation, QWidget *parent)
+    : QWidget(*new QDialogButtonBoxPrivate(orientation), parent, { })
+{
+    d_func()->initLayout();
+}
+
+/*!
+    \since 5.2
+
+    Constructs a horizontal button box with the given \a parent, containing
+    the standard buttons specified by \a buttons.
+
+    \sa orientation, addButton()
+*/
+QDialogButtonBox::QDialogButtonBox(StandardButtons buttons, QWidget *parent)
+    : QDialogButtonBox(buttons, Qt::Horizontal, parent)
+{
+}
+
+/*!
+    Constructs a button box with the given \a orientation and \a parent, containing
+    the standard buttons specified by \a buttons.
+
+    \sa orientation, addButton()
+*/
+QDialogButtonBox::QDialogButtonBox(StandardButtons buttons, Qt::Orientation orientation,
+                                   QWidget *parent)
+    : QDialogButtonBox(orientation, parent)
+{
+    d_func()->createStandardButtons(buttons);
+}
+
+/*!
+    Destroys the button box.
+*/
+QDialogButtonBox::~QDialogButtonBox()
+{
+}
+
+/*!
+    \enum QDialogButtonBox::ButtonRole
+    \enum QMessageBox::ButtonRole
+
+    This enum describes the roles that can be used to describe buttons in
+    the button box. Combinations of these roles are as flags used to
+    describe different aspects of their behavior.
+
+    \value InvalidRole The button is invalid.
+    \value AcceptRole Clicking the button causes the dialog to be accepted
+           (e.g. OK).
+    \value RejectRole Clicking the button causes the dialog to be rejected
+           (e.g. Cancel).
+    \value DestructiveRole Clicking the button causes a destructive change
+           (e.g. for Discarding Changes) and closes the dialog.
+    \value ActionRole Clicking the button causes changes to the elements within
+           the dialog.
+    \value HelpRole The button can be clicked to request help.
+    \value YesRole The button is a "Yes"-like button.
+    \value NoRole The button is a "No"-like button.
+    \value ApplyRole The button applies current changes.
+    \value ResetRole The button resets the dialog's fields to default values.
+
+    \omitvalue NRoles
+
+    \sa StandardButton
+*/
+
+/*!
+    \enum QDialogButtonBox::StandardButton
+
+    These enums describe flags for standard buttons. Each button has a
+    defined \l ButtonRole.
+
+    \value Ok An "OK" button defined with the \l AcceptRole.
+    \value Open An "Open" button defined with the \l AcceptRole.
+    \value Save A "Save" button defined with the \l AcceptRole.
+    \value Cancel A "Cancel" button defined with the \l RejectRole.
+    \value Close A "Close" button defined with the \l RejectRole.
+    \value Discard A "Discard" or "Don't Save" button, depending on the platform,
+                    defined with the \l DestructiveRole.
+    \value Apply An "Apply" button defined with the \l ApplyRole.
+    \value Reset A "Reset" button defined with the \l ResetRole.
+    \value RestoreDefaults A "Restore Defaults" button defined with the \l ResetRole.
+    \value Help A "Help" button defined with the \l HelpRole.
+    \value SaveAll A "Save All" button defined with the \l AcceptRole.
+    \value Yes A "Yes" button defined with the \l YesRole.
+    \value YesToAll A "Yes to All" button defined with the \l YesRole.
+    \value No A "No" button defined with the \l NoRole.
+    \value NoToAll A "No to All" button defined with the \l NoRole.
+    \value Abort An "Abort" button defined with the \l RejectRole.
+    \value Retry A "Retry" button defined with the \l AcceptRole.
+    \value Ignore An "Ignore" button defined with the \l AcceptRole.
+
+    \value NoButton An invalid button.
+
+    \omitvalue FirstButton
+    \omitvalue LastButton
+
+    \sa ButtonRole, standardButtons
+*/
+
+/*!
+    \enum QDialogButtonBox::ButtonLayout
+
+    This enum describes the layout policy to be used when arranging the buttons
+    contained in the button box.
+
+    \value WinLayout Use a policy appropriate for applications on Windows.
+    \value MacLayout Use a policy appropriate for applications on \macos.
+    \value KdeLayout Use a policy appropriate for applications on KDE.
+    \value GnomeLayout Use a policy appropriate for applications on GNOME.
+    \value AndroidLayout Use a policy appropriate for applications on Android.
+                            This enum value was added in Qt 5.10.
+
+    The button layout is specified by the \l{style()}{current style}. However,
+    on the X11 platform, it may be influenced by the desktop environment.
+*/
+
+/*!
+    \fn void QDialogButtonBox::clicked(QAbstractButton *button)
+
+    This signal is emitted when a button inside the button box is clicked. The
+    specific button that was pressed is specified by \a button.
+
+    \sa accepted(), rejected(), helpRequested()
+*/
+
+/*!
+    \fn void QDialogButtonBox::accepted()
+
+    This signal is emitted when a button inside the button box is clicked, as long
+    as it was defined with the \l AcceptRole or \l YesRole.
+
+    \sa rejected(), clicked(), helpRequested()
+*/
+
+/*!
+    \fn void QDialogButtonBox::rejected()
+
+    This signal is emitted when a button inside the button box is clicked, as long
+    as it was defined with the \l RejectRole or \l NoRole.
+
+    \sa accepted(), helpRequested(), clicked()
+*/
+
+/*!
+    \fn void QDialogButtonBox::helpRequested()
+
+    This signal is emitted when a button inside the button box is clicked, as long
+    as it was defined with the \l HelpRole.
+
+    \sa accepted(), rejected(), clicked()
+*/
+
+/*!
+    \property QDialogButtonBox::orientation
+    \brief the orientation of the button box
+
+    By default, the orientation is horizontal (i.e. the buttons are laid out
+    side by side). The possible orientations are Qt::Horizontal and
+    Qt::Vertical.
+*/
+Qt::Orientation QDialogButtonBox::orientation() const
+{
+    return d_func()->orientation;
+}
+
+void QDialogButtonBox::setOrientation(Qt::Orientation orientation)
+{
+    Q_D(QDialogButtonBox);
+    if (orientation == d->orientation)
+        return;
+
+    d->orientation = orientation;
+    d->resetLayout();
+}
+
+/*!
+    Clears the button box, deleting all buttons within it.
+
+    \sa removeButton(), addButton()
+*/
+void QDialogButtonBox::clear()
+{
+    Q_D(QDialogButtonBox);
+    // Remove the created standard buttons, they should be in the other lists, which will
+    // do the deletion
+    d->standardButtonHash.clear();
+    for (int i = 0; i < NRoles; ++i) {
+        QList<QAbstractButton *> &list = d->buttonLists[i];
+        while (list.count()) {
+            QAbstractButton *button = list.takeAt(0);
+            QObject::disconnect(button, SIGNAL(destroyed()), this, SLOT(_q_handleButtonDestroyed()));
+            delete button;
+        }
+    }
+}
+
+/*!
+    Returns a list of all the buttons that have been added to the button box.
+
+    \sa buttonRole(), addButton(), removeButton()
+*/
+QList<QAbstractButton *> QDialogButtonBox::buttons() const
+{
+    Q_D(const QDialogButtonBox);
+    QList<QAbstractButton *> finalList;
+    for (int i = 0; i < NRoles; ++i) {
+        const QList<QAbstractButton *> &list = d->buttonLists[i];
+        for (int j = 0; j < list.count(); ++j)
+            finalList.append(list.at(j));
+    }
+    return finalList;
+}
+
+/*!
+    Returns the button role for the specified \a button. This function returns
+    \l InvalidRole if \a button is 0 or has not been added to the button box.
+
+    \sa buttons(), addButton()
+*/
+QDialogButtonBox::ButtonRole QDialogButtonBox::buttonRole(QAbstractButton *button) const
+{
+    Q_D(const QDialogButtonBox);
+    for (int i = 0; i < NRoles; ++i) {
+        const QList<QAbstractButton *> &list = d->buttonLists[i];
+        for (int j = 0; j < list.count(); ++j) {
+            if (list.at(j) == button)
+                return ButtonRole(i);
+        }
+    }
+    return InvalidRole;
+}
+
+/*!
+    Removes \a button from the button box without deleting it and sets its parent to zero.
+
+    \sa clear(), buttons(), addButton()
+*/
+void QDialogButtonBox::removeButton(QAbstractButton *button)
+{
+    Q_D(QDialogButtonBox);
+
+    if (!button)
+        return;
+
+    // Remove it from the standard button hash first and then from the roles
+    d->standardButtonHash.remove(reinterpret_cast<QPushButton *>(button));
+    for (int i = 0; i < NRoles; ++i) {
+        QList<QAbstractButton *> &list = d->buttonLists[i];
+        for (int j = 0; j < list.count(); ++j) {
+            if (list.at(j) == button) {
+                list.takeAt(j);
+                if (!d->internalRemove) {
+                    disconnect(button, SIGNAL(clicked()), this, SLOT(_q_handleButtonClicked()));
+                    disconnect(button, SIGNAL(destroyed()), this, SLOT(_q_handleButtonDestroyed()));
+                }
+                break;
+            }
+        }
+    }
+    if (!d->internalRemove)
+        button->setParent(nullptr);
+}
+
+/*!
+    Adds the given \a button to the button box with the specified \a role.
+    If the role is invalid, the button is not added.
+
+    If the button has already been added, it is removed and added again with the
+    new role.
+
+    \note The button box takes ownership of the button.
+
+    \sa removeButton(), clear()
+*/
+void QDialogButtonBox::addButton(QAbstractButton *button, ButtonRole role)
+{
+    Q_D(QDialogButtonBox);
+    if (Q_UNLIKELY(role <= InvalidRole || role >= NRoles)) {
+        qWarning("QDialogButtonBox::addButton: Invalid ButtonRole, button not added");
+        return;
+    }
+    removeButton(button);
+    button->setParent(this);
+    d->addButton(button, role);
+}
+
+/*!
+    Creates a push button with the given \a text, adds it to the button box for the
+    specified \a role, and returns the corresponding push button. If \a role is
+    invalid, no button is created, and zero is returned.
+
+    \sa removeButton(), clear()
+*/
+QPushButton *QDialogButtonBox::addButton(const QString &text, ButtonRole role)
+{
+    Q_D(QDialogButtonBox);
+    if (Q_UNLIKELY(role <= InvalidRole || role >= NRoles)) {
+        qWarning("QDialogButtonBox::addButton: Invalid ButtonRole, button not added");
+        return nullptr;
+    }
+    QPushButton *button = new QPushButton(text, this);
+    d->addButton(button, role);
+    return button;
+}
+
+/*!
+    Adds a standard \a button to the button box if it is valid to do so, and returns
+    a push button. If \a button is invalid, it is not added to the button box, and
+    zero is returned.
+
+    \sa removeButton(), clear()
+*/
+QPushButton *QDialogButtonBox::addButton(StandardButton button)
+{
+    Q_D(QDialogButtonBox);
+    return d->createButton(button);
+}
+
+/*!
+    \property QDialogButtonBox::standardButtons
+    \brief collection of standard buttons in the button box
+
+    This property controls which standard buttons are used by the button box.
+
+    \sa addButton()
+*/
+void QDialogButtonBox::setStandardButtons(StandardButtons buttons)
+{
+    Q_D(QDialogButtonBox);
+    // Clear out all the old standard buttons, then recreate them.
+    qDeleteAll(d->standardButtonHash.keys());
+    d->standardButtonHash.clear();
+
+    d->createStandardButtons(buttons);
+}
+
+QDialogButtonBox::StandardButtons QDialogButtonBox::standardButtons() const
+{
+    Q_D(const QDialogButtonBox);
+    StandardButtons standardButtons = NoButton;
+    QHash<QPushButton *, StandardButton>::const_iterator it = d->standardButtonHash.constBegin();
+    while (it != d->standardButtonHash.constEnd()) {
+        standardButtons |= it.value();
+        ++it;
+    }
+    return standardButtons;
+}
+
+/*!
+    Returns the QPushButton corresponding to the standard button \a which,
+    or \nullptr if the standard button doesn't exist in this button box.
+
+    \sa standardButton(), standardButtons(), buttons()
+*/
+QPushButton *QDialogButtonBox::button(StandardButton which) const
+{
+    Q_D(const QDialogButtonBox);
+    return d->standardButtonHash.key(which);
+}
+
+/*!
+    Returns the standard button enum value corresponding to the given \a button,
+    or NoButton if the given \a button isn't a standard button.
+
+    \sa button(), buttons(), standardButtons()
+*/
+QDialogButtonBox::StandardButton QDialogButtonBox::standardButton(QAbstractButton *button) const
+{
+    Q_D(const QDialogButtonBox);
+    return d->standardButtonHash.value(static_cast<QPushButton *>(button));
+}
+
+void QDialogButtonBoxPrivate::_q_handleButtonClicked()
+{
+    Q_Q(QDialogButtonBox);
+    if (QAbstractButton *button = qobject_cast<QAbstractButton *>(q->sender())) {
+        // Can't fetch this *after* emitting clicked, as clicked may destroy the button
+        // or change its role. Now changing the role is not possible yet, but arguably
+        // both clicked and accepted/rejected/etc. should be emitted "atomically"
+        // depending on whatever role the button had at the time of the click.
+        const QDialogButtonBox::ButtonRole buttonRole = q->buttonRole(button);
+        QPointer<QDialogButtonBox> guard(q);
+
+        emit q->clicked(button);
+
+        if (!guard)
+            return;
+
+        switch (QPlatformDialogHelper::ButtonRole(buttonRole)) {
+        case QPlatformDialogHelper::AcceptRole:
+        case QPlatformDialogHelper::YesRole:
+            emit q->accepted();
+            break;
+        case QPlatformDialogHelper::RejectRole:
+        case QPlatformDialogHelper::NoRole:
+            emit q->rejected();
+            break;
+        case QPlatformDialogHelper::HelpRole:
+            emit q->helpRequested();
+            break;
+        default:
+            break;
+        }
+    }
+}
+
+void QDialogButtonBoxPrivate::_q_handleButtonDestroyed()
+{
+    Q_Q(QDialogButtonBox);
+    if (QObject *object = q->sender()) {
+        QBoolBlocker skippy(internalRemove);
+        q->removeButton(reinterpret_cast<QAbstractButton *>(object));
+    }
+}
+
+/*!
+    \property QDialogButtonBox::centerButtons
+    \brief whether the buttons in the button box are centered
+
+    By default, this property is \c false. This behavior is appopriate
+    for most types of dialogs. A notable exception is message boxes
+    on most platforms (e.g. Windows), where the button box is
+    centered horizontally.
+
+    \sa QMessageBox
+*/
+void QDialogButtonBox::setCenterButtons(bool center)
+{
+    Q_D(QDialogButtonBox);
+    if (d->center != center) {
+        d->center = center;
+        d->resetLayout();
+    }
+}
+
+bool QDialogButtonBox::centerButtons() const
+{
+    Q_D(const QDialogButtonBox);
+    return d->center;
+}
+
+/*!
+    \reimp
+*/
+void QDialogButtonBox::changeEvent(QEvent *event)
+{
+    typedef QHash<QPushButton *, QDialogButtonBox::StandardButton> StandardButtonHash;
+
+    Q_D(QDialogButtonBox);
+    switch (event->type()) {
+    case QEvent::StyleChange:  // Propagate style
+        if (!d->standardButtonHash.empty()) {
+            QStyle *newStyle = style();
+            const StandardButtonHash::iterator end = d->standardButtonHash.end();
+            for (StandardButtonHash::iterator it = d->standardButtonHash.begin(); it != end; ++it)
+                it.key()->setStyle(newStyle);
+        }
+#ifdef Q_OS_MAC
+        Q_FALLTHROUGH();
+    case QEvent::MacSizeChange:
+#endif
+        d->resetLayout();
+        QWidget::changeEvent(event);
+        break;
+    default:
+        QWidget::changeEvent(event);
+        break;
+    }
+}
+
+/*!
+    \reimp
+*/
+bool QDialogButtonBox::event(QEvent *event)
+{
+    Q_D(QDialogButtonBox);
+    if (event->type() == QEvent::Show) {
+        QList<QAbstractButton *> acceptRoleList = d->buttonLists[AcceptRole];
+        QPushButton *firstAcceptButton = acceptRoleList.isEmpty() ? 0 : qobject_cast<QPushButton *>(acceptRoleList.at(0));
+        bool hasDefault = false;
+        QWidget *dialog = nullptr;
+        QWidget *p = this;
+        while (p && !p->isWindow()) {
+            p = p->parentWidget();
+            if ((dialog = qobject_cast<QDialog *>(p)))
+                break;
+        }
+
+        const auto pbs = (dialog ? dialog : this)->findChildren<QPushButton *>();
+        for (QPushButton *pb : pbs) {
+            if (pb->isDefault() && pb != firstAcceptButton) {
+                hasDefault = true;
+                break;
+            }
+        }
+        if (!hasDefault && firstAcceptButton)
+            firstAcceptButton->setDefault(true);
+    }else if (event->type() == QEvent::LanguageChange) {
+        d->retranslateStrings();
+    }
+    return QWidget::event(event);
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qdialogbuttonbox.cpp"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qdialogsbinarycompat_win.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qglobal.h>
+
+// ### Qt 5: eliminate this file
+
+/*
+    This is evil. MSVC doesn't let us remove private symbols, nor change their
+    visibility; yet there are some symbols we really needed to make public, e.g.,
+    ~QColorDialog(), and then there were some totally needless symbols in our
+    header files, e.g., setSelectedAlpha(). So we define a new version of
+    QColorDialog & Co. with only the private symbols that we removed from the
+    public header files. The friends are there only to prevent potential compiler
+    warnings.
+
+    It would have been nicer to export the missing symbols as mangled "C" symbols
+    instead but unfortunately MSVC uses out-of-reach characters like @ and . in
+    their mangled C++ symbols.
+*/
+
+#if QT_VERSION < 0x050000 && defined(Q_CC_MSVC)
+
+QT_BEGIN_NAMESPACE
+
+#include <QtGui/QColor>
+#include <QtGui/QFont>
+
+class QColorDialogPrivate;
+class QFontDialogPrivate;
+class QInputDialogPrivate;
+class QWidget;
+
+class Q_GUI_EXPORT QColorDialog
+{
+private:
+    explicit QColorDialog(QWidget *, bool);
+    ~QColorDialog();
+
+    void setColor(const QColor &);
+    QColor color() const;
+    bool selectColor(const QColor &);
+    void setSelectedAlpha(int);
+    int selectedAlpha() const;
+
+    friend class QColorDialogPrivate;
+};
+
+QColorDialog::QColorDialog(QWidget *, bool) {}
+QColorDialog::~QColorDialog() {}
+void QColorDialog::setColor(const QColor &) {}
+QColor QColorDialog::color() const { return QColor(); }
+bool QColorDialog::selectColor(const QColor &) { return false; }
+void QColorDialog::setSelectedAlpha(int) {}
+int QColorDialog::selectedAlpha() const { return 0; }
+
+class Q_GUI_EXPORT QFontDialog
+{
+private:
+    explicit QFontDialog(QWidget *, bool, Qt::WindowFlags);
+    ~QFontDialog();
+
+    QFont font() const;
+    void setFont(const QFont &);
+    void updateFamilies();
+    void updateStyles();
+    void updateSizes();
+
+    static QFont getFont(bool *, const QFont *, QWidget *);
+
+    friend class QFontDialogPrivate;
+};
+
+QFontDialog::QFontDialog(QWidget *, bool, Qt::WindowFlags) {}
+QFontDialog::~QFontDialog() {}
+QFont QFontDialog::font() const { return QFont(); }
+void QFontDialog::setFont(const QFont &) { }
+void QFontDialog::updateFamilies() {}
+void QFontDialog::updateStyles() {}
+void QFontDialog::updateSizes() {}
+QFont QFontDialog::getFont(bool *, const QFont *, QWidget *) { return QFont(); }
+
+class Q_GUI_EXPORT QInputDialog
+{
+private:
+    enum Type { LineEdit, SpinBox, DoubleSpinBox, ComboBox, EditableComboBox };
+
+    QInputDialog(const QString &, QWidget *, Type, Qt::WindowFlags);
+    QInputDialog(const QString &, const QString &, QWidget *, QWidget *, Qt::WindowFlags);
+    ~QInputDialog();
+};
+
+QInputDialog::QInputDialog(const QString &, QWidget *, Type, Qt::WindowFlags) {}
+QInputDialog::QInputDialog(const QString &, const QString &, QWidget *, QWidget *, Qt::WindowFlags) {}
+QInputDialog::~QInputDialog() {}
+
+QT_END_NAMESPACE
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qerrormessage.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,437 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qerrormessage.h"
+
+#ifndef QT_NO_ERRORMESSAGE
+
+#include "qapplication.h"
+#include "qcheckbox.h"
+#include "qlabel.h"
+#include "qlayout.h"
+#include "qmessagebox.h"
+#include "qpushbutton.h"
+#include "qstringlist.h"
+#include "qtextedit.h"
+#include "qdialog_p.h"
+#include "qpixmap.h"
+#include "qmetaobject.h"
+#include "qthread.h"
+#include "qqueue.h"
+#include "qset.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef Q_WS_WINCE
+extern bool qt_wince_is_mobile();    //defined in qguifunctions_wince.cpp
+extern bool qt_wince_is_high_dpi();  //defined in qguifunctions_wince.cpp
+
+#include "qguifunctions_wince.h"
+#endif
+
+#if defined(QT_SOFTKEYS_ENABLED)
+#include <qaction.h>
+#endif
+#ifdef Q_WS_S60
+#include "private/qt_s60_p.h"
+#endif
+
+QT_BEGIN_NAMESPACE
+
+class QErrorMessagePrivate : public QDialogPrivate
+{
+    Q_DECLARE_PUBLIC(QErrorMessage)
+public:
+    QPushButton * ok;
+    QCheckBox * again;
+    QTextEdit * errors;
+    QLabel * icon;
+#ifdef QT_SOFTKEYS_ENABLED
+    QAction *okAction;
+#endif
+    QQueue<QPair<QString, QString> > pending;
+    QSet<QString> doNotShow;
+    QSet<QString> doNotShowType;
+    QString currentMessage;
+    QString currentType;
+
+    bool nextPending();
+    void retranslateStrings();
+};
+
+class QErrorMessageTextView : public QTextEdit
+{
+public:
+    QErrorMessageTextView(QWidget *parent)
+        : QTextEdit(parent) { setReadOnly(true); }
+
+    virtual QSize minimumSizeHint() const;
+    virtual QSize sizeHint() const;
+};
+
+QSize QErrorMessageTextView::minimumSizeHint() const
+{
+#ifdef Q_WS_WINCE
+    if (qt_wince_is_mobile())
+         if (qt_wince_is_high_dpi())
+            return QSize(200, 200);
+         else
+             return QSize(100, 100);
+    else
+      return QSize(70, 70);
+#else
+    return QSize(50, 50);
+#endif
+}
+
+QSize QErrorMessageTextView::sizeHint() const
+{
+#ifdef Q_WS_WINCE
+    if (qt_wince_is_mobile())
+         if (qt_wince_is_high_dpi())
+            return QSize(400, 200);
+         else
+             return QSize(320, 120);
+    else
+      return QSize(300, 100);
+#else
+
+#ifdef Q_WS_S60
+    const int smallerDimension = qMin(S60->screenHeightInPixels, S60->screenWidthInPixels);
+    // In S60 layout data, error messages seem to be one third of the screen height (in portrait) minus two.
+    return QSize(smallerDimension, smallerDimension/3-2);
+#else
+    return QSize(250, 75);
+#endif //Q_WS_S60
+#endif //Q_WS_WINCE
+}
+
+/*!
+    \class QErrorMessage
+
+    \brief The QErrorMessage class provides an error message display dialog.
+
+    \ingroup standard-dialog
+
+    An error message widget consists of a text label and a checkbox. The
+    checkbox lets the user control whether the same error message will be
+    displayed again in the future, typically displaying the text,
+    "Show this message again" translated into the appropriate local
+    language.
+
+    For production applications, the class can be used to display messages which
+    the user only needs to see once. To use QErrorMessage like this, you create
+    the dialog in the usual way, and show it by calling the showMessage() slot or
+    connecting signals to it.
+
+    The static qtHandler() function installs a message handler
+    using qInstallMsgHandler() and creates a QErrorMessage that displays
+    qDebug(), qWarning() and qFatal() messages. This is most useful in
+    environments where no console is available to display warnings and
+    error messages.
+
+    In both cases QErrorMessage will queue pending messages and display
+    them in order, with each new message being shown as soon as the user
+    has accepted the previous message. Once the user has specified that a
+    message is not to be shown again it is automatically skipped, and the
+    dialog will show the next appropriate message in the queue.
+
+    The \l{dialogs/standarddialogs}{Standard Dialogs} example shows
+    how to use QErrorMessage as well as other built-in Qt dialogs.
+
+    \img qerrormessage.png
+
+    \sa QMessageBox, QStatusBar::showMessage(), {Standard Dialogs Example}
+*/
+
+static QErrorMessage * qtMessageHandler = 0;
+
+static void deleteStaticcQErrorMessage() // post-routine
+{
+    if (qtMessageHandler) {
+        delete qtMessageHandler;
+        qtMessageHandler = 0;
+    }
+}
+
+static bool metFatal = false;
+
+static void jump(QtMsgType t, const char * m)
+{
+    if (!qtMessageHandler)
+        return;
+
+    QString rich;
+
+    switch (t) {
+    case QtDebugMsg:
+    default:
+        rich = QErrorMessage::tr("Debug Message:");
+        break;
+    case QtWarningMsg:
+        rich = QErrorMessage::tr("Warning:");
+        break;
+    case QtFatalMsg:
+        rich = QErrorMessage::tr("Fatal Error:");
+    }
+    rich = QString::fromLatin1("<p><b>%1</b></p>").arg(rich);
+    rich += Qt::convertFromPlainText(QLatin1String(m), Qt::WhiteSpaceNormal);
+
+    // ### work around text engine quirk
+    if (rich.endsWith(QLatin1String("</p>")))
+        rich.chop(4);
+
+    if (!metFatal) {
+        if (QThread::currentThread() == qApp->thread()) {
+            qtMessageHandler->showMessage(rich);
+        } else {
+            QMetaObject::invokeMethod(qtMessageHandler,
+                                      "showMessage",
+                                      Qt::QueuedConnection,
+                                      Q_ARG(QString, rich));
+        }
+        metFatal = (t == QtFatalMsg);
+    }
+}
+
+
+/*!
+    Constructs and installs an error handler window with the given \a
+    parent.
+*/
+
+QErrorMessage::QErrorMessage(QWidget * parent)
+    : QDialog(*new QErrorMessagePrivate, parent)
+{
+    Q_D(QErrorMessage);
+    QGridLayout * grid = new QGridLayout(this);
+    d->icon = new QLabel(this);
+#ifndef QT_NO_MESSAGEBOX
+    d->icon->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
+    d->icon->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
+#endif
+#ifdef Q_WS_S60
+    //In Symbian, messagebox icons are in LtR UIs on right. Thus, layout needs to switch icon and text columns.
+    const int preferredIconColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 1 : 0;
+    const int preferredTextColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 0 : 1;
+#else
+    const int preferredIconColumn = 0;
+    const int preferredTextColumn = 1;
+#endif
+    grid->addWidget(d->icon, 0, preferredIconColumn, Qt::AlignTop);
+    d->errors = new QErrorMessageTextView(this);
+    grid->addWidget(d->errors, 0, preferredTextColumn);
+    d->again = new QCheckBox(this);
+    d->again->setChecked(true);
+    grid->addWidget(d->again, 1, preferredTextColumn, Qt::AlignTop);
+    d->ok = new QPushButton(this);
+#ifdef QT_SOFTKEYS_ENABLED
+    d->okAction = new QAction(d->ok);
+    d->okAction->setSoftKeyRole(QAction::PositiveSoftKey);
+    connect(d->okAction, SIGNAL(triggered()), this, SLOT(accept()));
+    addAction(d->okAction);
+#endif
+
+
+#if defined(Q_WS_WINCE) || defined(Q_WS_S60)
+    d->ok->setFixedSize(0,0);
+#endif
+    connect(d->ok, SIGNAL(clicked()), this, SLOT(accept()));
+    d->ok->setFocus();
+    grid->addWidget(d->ok, 2, 0, 1, 2, Qt::AlignCenter);
+    grid->setColumnStretch(preferredTextColumn, 42);
+    grid->setRowStretch(0, 42);
+    d->retranslateStrings();
+}
+
+
+/*!
+    Destroys the error message dialog.
+*/
+
+QErrorMessage::~QErrorMessage()
+{
+    if (this == qtMessageHandler) {
+        qtMessageHandler = 0;
+        QtMsgHandler tmp = qInstallMsgHandler(0);
+        // in case someone else has later stuck in another...
+        if (tmp != jump)
+            qInstallMsgHandler(tmp);
+    }
+}
+
+
+/*! \reimp */
+
+void QErrorMessage::done(int a)
+{
+    Q_D(QErrorMessage);
+    if (!d->again->isChecked() && !d->currentMessage.isEmpty() && d->currentType.isEmpty()) {
+        d->doNotShow.insert(d->currentMessage);
+    }
+    if (!d->again->isChecked() && !d->currentType.isEmpty()) {
+        d->doNotShowType.insert(d->currentType);
+    }
+    d->currentMessage.clear();
+    d->currentType.clear();
+    if (!d->nextPending()) {
+        QDialog::done(a);
+        if (this == qtMessageHandler && metFatal)
+            exit(1);
+    }
+}
+
+
+/*!
+    Returns a pointer to a QErrorMessage object that outputs the
+    default Qt messages. This function creates such an object, if there
+    isn't one already.
+*/
+
+QErrorMessage * QErrorMessage::qtHandler()
+{
+    if (!qtMessageHandler) {
+        qtMessageHandler = new QErrorMessage(0);
+        qAddPostRoutine(deleteStaticcQErrorMessage); // clean up
+        qtMessageHandler->setWindowTitle(QApplication::applicationName());
+        qInstallMsgHandler(jump);
+    }
+    return qtMessageHandler;
+}
+
+
+/*! \internal */
+
+bool QErrorMessagePrivate::nextPending()
+{
+    while (!pending.isEmpty()) {
+        QPair<QString,QString> pendingMessage = pending.dequeue();
+        QString message = pendingMessage.first;
+        QString type = pendingMessage.second;
+        if (!message.isEmpty() && ((type.isEmpty() && !doNotShow.contains(message)) || (!type.isEmpty() && !doNotShowType.contains(type)))) {
+#ifndef QT_NO_TEXTHTMLPARSER
+            errors->setHtml(message);
+#else
+            errors->setPlainText(message);
+#endif
+            currentMessage = message;
+            currentType = type;
+            return true;
+        }
+    }
+    return false;
+}
+
+
+/*!
+    Shows the given message, \a message, and returns immediately. If the user
+    has requested for the message not to be shown again, this function does
+    nothing.
+
+    Normally, the message is displayed immediately. However, if there are
+    pending messages, it will be queued to be displayed later.
+*/
+
+void QErrorMessage::showMessage(const QString &message)
+{
+    Q_D(QErrorMessage);
+    if (d->doNotShow.contains(message))
+        return;
+    d->pending.enqueue(qMakePair(message,QString()));
+    if (!isVisible() && d->nextPending())
+        show();
+}
+
+/*!
+    \since 4.5
+    \overload
+
+    Shows the given message, \a message, and returns immediately. If the user
+    has requested for messages of type, \a type, not to be shown again, this
+    function does nothing.
+
+    Normally, the message is displayed immediately. However, if there are
+    pending messages, it will be queued to be displayed later.
+
+    \sa showMessage()
+*/
+
+void QErrorMessage::showMessage(const QString &message, const QString &type)
+{
+    Q_D(QErrorMessage);
+    if (d->doNotShow.contains(message) && d->doNotShowType.contains(type))
+        return;
+     d->pending.push_back(qMakePair(message,type));
+    if (!isVisible() && d->nextPending())
+        show();
+}
+
+/*!
+    \reimp
+*/
+void QErrorMessage::changeEvent(QEvent *e)
+{
+    Q_D(QErrorMessage);
+    if (e->type() == QEvent::LanguageChange) {
+        d->retranslateStrings();
+    }
+    QDialog::changeEvent(e);
+}
+
+void QErrorMessagePrivate::retranslateStrings()
+{
+    again->setText(QErrorMessage::tr("&Show this message again"));
+    ok->setText(QErrorMessage::tr("&OK"));
+#ifdef QT_SOFTKEYS_ENABLED
+    okAction->setText(ok->text());
+#endif
+}
+
+/*!
+    \fn void QErrorMessage::message(const QString & message)
+
+    Use showMessage(\a message) instead.
+*/
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_ERRORMESSAGE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qfiledialog.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,3591 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qvariant.h>
+#include <private/qwidgetitemdata_p.h>
+#include "qfiledialog.h"
+
+#ifndef QT_NO_FILEDIALOG
+#include "qfiledialog_p.h"
+#include <qfontmetrics.h>
+#include <qaction.h>
+#include <qheaderview.h>
+#include <qshortcut.h>
+#include <qgridlayout.h>
+#include <qmenu.h>
+#include <qmessagebox.h>
+#include <qinputdialog.h>
+#include <stdlib.h>
+#include <qsettings.h>
+#include <qdebug.h>
+#include <qapplication.h>
+#include <qstylepainter.h>
+#include <private/qfileiconprovider_p.h>
+#if !defined(Q_WS_WINCE) && !defined(Q_OS_SYMBIAN)
+#include "ui_qfiledialog.h"
+#else
+#define Q_EMBEDDED_SMALLSCREEN
+#include "ui_qfiledialog_embedded.h"
+#if defined(Q_OS_WINCE)
+extern bool qt_priv_ptr_valid;
+#endif
+#if defined(Q_OS_UNIX)
+#include <pwd.h>
+#endif
+#endif
+
+QT_BEGIN_NAMESPACE
+
+Q_GLOBAL_STATIC(QString, lastVisitedDir)
+
+/*
+    \internal
+
+    Exported hooks that can be used to customize the static functions.
+ */
+typedef QString (*_qt_filedialog_existing_directory_hook)(QWidget *parent, const QString &caption, const QString &dir, QFileDialog::Options options);
+Q_GUI_EXPORT _qt_filedialog_existing_directory_hook qt_filedialog_existing_directory_hook = 0;
+
+typedef QString (*_qt_filedialog_open_filename_hook)(QWidget * parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options);
+Q_GUI_EXPORT _qt_filedialog_open_filename_hook qt_filedialog_open_filename_hook = 0;
+
+typedef QStringList (*_qt_filedialog_open_filenames_hook)(QWidget * parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options);
+Q_GUI_EXPORT _qt_filedialog_open_filenames_hook qt_filedialog_open_filenames_hook = 0;
+
+typedef QString (*_qt_filedialog_save_filename_hook)(QWidget * parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options);
+Q_GUI_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_hook = 0;
+
+/*!
+  \class QFileDialog
+  \brief The QFileDialog class provides a dialog that allow users to select files or directories.
+  \ingroup standard-dialogs
+
+
+  The QFileDialog class enables a user to traverse the file system in
+  order to select one or many files or a directory.
+
+  The easiest way to create a QFileDialog is to use the static
+  functions. On Windows, Mac OS X, KDE and GNOME, these static functions will
+  call the native file dialog when possible.
+
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 0
+
+  In the above example, a modal QFileDialog is created using a static
+  function. The dialog initially displays the contents of the "/home/jana"
+  directory, and displays files matching the patterns given in the
+  string "Image Files (*.png *.jpg *.bmp)". The parent of the file dialog
+  is set to \e this, and the window title is set to "Open Image".
+
+  If you want to use multiple filters, separate each one with
+  \e two semicolons. For example:
+
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 1
+
+  You can create your own QFileDialog without using the static
+  functions. By calling setFileMode(), you can specify what the user must
+  select in the dialog:
+
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 2
+
+  In the above example, the mode of the file dialog is set to
+  AnyFile, meaning that the user can select any file, or even specify a
+  file that doesn't exist. This mode is useful for creating a
+  "Save As" file dialog. Use ExistingFile if the user must select an
+  existing file, or \l Directory if only a directory may be selected.
+  See the \l QFileDialog::FileMode enum for the complete list of modes.
+
+  The fileMode property contains the mode of operation for the dialog;
+  this indicates what types of objects the user is expected to select.
+  Use setNameFilter() to set the dialog's file filter. For example:
+
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 3
+
+  In the above example, the filter is set to \c{"Images (*.png *.xpm *.jpg)"},
+  this means that only files with the extension \c png, \c xpm,
+  or \c jpg will be shown in the QFileDialog. You can apply
+  several filters by using setNameFilters(). Use selectNameFilter() to select
+  one of the filters you've given as the file dialog's default filter.
+
+  The file dialog has two view modes: \l{QFileDialog::}{List} and
+  \l{QFileDialog::}{Detail}.
+  \l{QFileDialog::}{List} presents the contents of the current directory
+  as a list of file and directory names. \l{QFileDialog::}{Detail} also
+  displays a list of file and directory names, but provides additional
+  information alongside each name, such as the file size and modification
+  date. Set the mode with setViewMode():
+
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 4
+
+  The last important function you will need to use when creating your
+  own file dialog is selectedFiles().
+
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 5
+
+  In the above example, a modal file dialog is created and shown. If
+  the user clicked OK, the file they selected is put in \c fileName.
+
+  The dialog's working directory can be set with setDirectory().
+  Each file in the current directory can be selected using
+  the selectFile() function.
+
+  The \l{dialogs/standarddialogs}{Standard Dialogs} example shows
+  how to use QFileDialog as well as other built-in Qt dialogs.
+
+  \sa QDir, QFileInfo, QFile, QPrintDialog, QColorDialog, QFontDialog, {Standard Dialogs Example},
+      {Application Example}
+*/
+
+/*!
+    \enum QFileDialog::AcceptMode
+
+    \value AcceptOpen
+    \value AcceptSave
+*/
+
+/*!
+    \enum QFileDialog::ViewMode
+
+    This enum describes the view mode of the file dialog; i.e. what
+    information about each file will be displayed.
+
+    \value Detail Displays an icon, a name, and details for each item in
+                  the directory.
+    \value List   Displays only an icon and a name for each item in the
+                  directory.
+
+    \sa setViewMode()
+*/
+
+/*!
+    \enum QFileDialog::FileMode
+
+    This enum is used to indicate what the user may select in the file
+    dialog; i.e. what the dialog will return if the user clicks OK.
+
+    \value AnyFile        The name of a file, whether it exists or not.
+    \value ExistingFile   The name of a single existing file.
+    \value Directory      The name of a directory. Both files and
+                          directories are displayed.
+    \value ExistingFiles  The names of zero or more existing files.
+
+    This value is obsolete since Qt 4.5:
+
+    \value DirectoryOnly  Use \c Directory and setOption(ShowDirsOnly, true) instead.
+
+    \sa setFileMode()
+*/
+
+/*!
+    \enum QFileDialog::Option
+
+    \value ShowDirsOnly Only show directories in the file dialog. By
+    default both files and directories are shown. (Valid only in the
+    \l Directory file mode.)
+
+    \value DontResolveSymlinks Don't resolve symlinks in the file
+    dialog. By default symlinks are resolved.
+
+    \value DontConfirmOverwrite Don't ask for confirmation if an
+    existing file is selected.  By default confirmation is requested.
+
+    \value DontUseNativeDialog Don't use the native file dialog. By
+    default, the native file dialog is used unless you use a subclass
+    of QFileDialog that contains the Q_OBJECT macro.
+
+    \value ReadOnly Indicates that the model is readonly.
+
+    \value HideNameFilterDetails Indicates if the file name filter details are
+    hidden or not.
+
+    \value DontUseSheet In previous versions of Qt, the static
+    functions would create a sheet by default if the static function
+    was given a parent. This is no longer supported and does nothing in Qt 4.5, The
+    static functions will always be an application modal dialog. If
+    you want to use sheets, use QFileDialog::open() instead.
+
+    \value DontUseCustomDirectoryIcons Always use the default directory icon.
+    Some platforms allow the user to set a different icon. Custom icon lookup
+    cause a big performance impact over network or removable drives. Setting this
+    will affect the behavior of the icon provider. This enum value was added in Qt 4.8.6.
+*/
+
+/*!
+  \enum QFileDialog::DialogLabel
+
+  \value LookIn
+  \value FileName
+  \value FileType
+  \value Accept
+  \value Reject
+*/
+
+/*!
+    \fn void QFileDialog::filesSelected(const QStringList &selected)
+
+    When the selection changes and the dialog is accepted, this signal is
+    emitted with the (possibly empty) list of \a selected files.
+
+    \sa currentChanged(), QDialog::Accepted
+*/
+
+
+/*!
+    \fn void QFileDialog::fileSelected(const QString &file)
+
+    When the selection changes and the dialog is accepted, this signal is
+    emitted with the (possibly empty) selected \a file.
+
+    \sa currentChanged(), QDialog::Accepted
+*/
+
+
+/*!
+    \fn void QFileDialog::currentChanged(const QString &path)
+
+    When the current file changes, this signal is emitted with the
+    new file name as the \a path parameter.
+
+    \sa filesSelected()
+*/
+
+/*!
+  \fn void QFileDialog::directoryEntered(const QString &directory)
+  \since 4.3
+
+  This signal is emitted when the user enters a \a directory.
+*/
+
+/*!
+  \fn void QFileDialog::filterSelected(const QString &filter)
+  \since 4.3
+
+  This signal is emitted when the user selects a \a filter.
+*/
+
+#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
+bool Q_GUI_EXPORT qt_use_native_dialogs = true; // for the benefit of testing tools, until we have a proper API
+#endif
+
+QT_BEGIN_INCLUDE_NAMESPACE
+#ifdef Q_WS_WIN
+#include <qwindowsstyle.h>
+#endif
+#include <qshortcut.h>
+#ifdef Q_WS_MAC
+#include <qmacstyle_mac.h>
+#endif
+QT_END_INCLUDE_NAMESPACE
+
+/*!
+    \fn QFileDialog::QFileDialog(QWidget *parent, Qt::WindowFlags flags)
+
+    Constructs a file dialog with the given \a parent and widget \a flags.
+*/
+QFileDialog::QFileDialog(QWidget *parent, Qt::WindowFlags f)
+    : QDialog(*new QFileDialogPrivate, parent, f)
+{
+    Q_D(QFileDialog);
+    d->init();
+    d->lineEdit()->selectAll();
+}
+
+/*!
+    Constructs a file dialog with the given \a parent and \a caption that
+    initially displays the contents of the specified \a directory.
+    The contents of the directory are filtered before being shown in the
+    dialog, using a semicolon-separated list of filters specified by
+    \a filter.
+*/
+QFileDialog::QFileDialog(QWidget *parent,
+                     const QString &caption,
+                     const QString &directory,
+                     const QString &filter)
+    : QDialog(*new QFileDialogPrivate, parent, 0)
+{
+    Q_D(QFileDialog);
+    d->init(directory, filter, caption);
+    d->lineEdit()->selectAll();
+}
+
+/*!
+    \internal
+*/
+QFileDialog::QFileDialog(const QFileDialogArgs &args)
+    : QDialog(*new QFileDialogPrivate, args.parent, 0)
+{
+    Q_D(QFileDialog);
+    d->init(args.directory, args.filter, args.caption);
+    setFileMode(args.mode);
+    setOptions(args.options);
+    selectFile(args.selection);
+    d->lineEdit()->selectAll();
+}
+
+/*!
+    Destroys the file dialog.
+*/
+QFileDialog::~QFileDialog()
+{
+    Q_D(QFileDialog);
+#ifndef QT_NO_SETTINGS
+    QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+    settings.beginGroup(QLatin1String("Qt"));
+    settings.setValue(QLatin1String("filedialog"), saveState());
+#endif
+    d->deleteNativeDialog_sys();
+}
+
+/*!
+    \since 4.3
+    Sets the \a urls that are located in the sidebar.
+
+    For instance:
+
+    \snippet doc/src/snippets/filedialogurls.cpp 0
+
+    The file dialog will then look like this:
+
+    \image filedialogurls.png
+
+    \sa sidebarUrls()
+*/
+void QFileDialog::setSidebarUrls(const QList<QUrl> &urls)
+{
+    Q_D(QFileDialog);
+    d->qFileDialogUi->sidebar->setUrls(urls);
+}
+
+/*!
+    \since 4.3
+    Returns a list of urls that are currently in the sidebar
+*/
+QList<QUrl> QFileDialog::sidebarUrls() const
+{
+    Q_D(const QFileDialog);
+    return d->qFileDialogUi->sidebar->urls();
+}
+
+static const qint32 QFileDialogMagic = 0xbe;
+
+const char *qt_file_dialog_filter_reg_exp =
+"^(.*)\\(([a-zA-Z0-9_.*? +;#\\-\\[\\]@\\{\\}/!<>\\$%&=^~:\\|]*)\\)$";
+
+/*!
+    \since 4.3
+    Saves the state of the dialog's layout, history and current directory.
+
+    Typically this is used in conjunction with QSettings to remember the size
+    for a future session. A version number is stored as part of the data.
+*/
+QByteArray QFileDialog::saveState() const
+{
+    Q_D(const QFileDialog);
+    int version = 3;
+    QByteArray data;
+    QDataStream stream(&data, QIODevice::WriteOnly);
+
+    stream << qint32(QFileDialogMagic);
+    stream << qint32(version);
+    stream << d->qFileDialogUi->splitter->saveState();
+    stream << d->qFileDialogUi->sidebar->urls();
+    stream << history();
+    stream << *lastVisitedDir();
+    stream << d->qFileDialogUi->treeView->header()->saveState();
+    stream << qint32(viewMode());
+    return data;
+}
+
+/*!
+    \since 4.3
+    Restores the dialogs's layout, history and current directory to the \a state specified.
+
+    Typically this is used in conjunction with QSettings to restore the size
+    from a past session.
+
+    Returns false if there are errors
+*/
+bool QFileDialog::restoreState(const QByteArray &state)
+{
+    Q_D(QFileDialog);
+    int version = 3;
+    QByteArray sd = state;
+    QDataStream stream(&sd, QIODevice::ReadOnly);
+    if (stream.atEnd())
+        return false;
+    QByteArray splitterState;
+    QByteArray headerData;
+    QList<QUrl> bookmarks;
+    QStringList history;
+    QString currentDirectory;
+    qint32 marker;
+    qint32 v;
+    qint32 viewMode;
+    stream >> marker;
+    stream >> v;
+    if (marker != QFileDialogMagic || v != version)
+        return false;
+
+    stream >> splitterState
+           >> bookmarks
+           >> history
+           >> currentDirectory
+           >> headerData
+           >> viewMode;
+
+    if (!d->qFileDialogUi->splitter->restoreState(splitterState))
+        return false;
+    QList<int> list = d->qFileDialogUi->splitter->sizes();
+    if (list.count() >= 2 && list.at(0) == 0 && list.at(1) == 0) {
+        for (int i = 0; i < list.count(); ++i)
+            list[i] = d->qFileDialogUi->splitter->widget(i)->sizeHint().width();
+        d->qFileDialogUi->splitter->setSizes(list);
+    }
+
+    d->qFileDialogUi->sidebar->setUrls(bookmarks);
+    while (history.count() > 5)
+        history.pop_front();
+    setHistory(history);
+    setDirectory(lastVisitedDir()->isEmpty() ? currentDirectory : *lastVisitedDir());
+    QHeaderView *headerView = d->qFileDialogUi->treeView->header();
+    if (!headerView->restoreState(headerData))
+        return false;
+
+    QList<QAction*> actions = headerView->actions();
+    QAbstractItemModel *abstractModel = d->model;
+#ifndef QT_NO_PROXYMODEL
+    if (d->proxyModel)
+        abstractModel = d->proxyModel;
+#endif
+    int total = qMin(abstractModel->columnCount(QModelIndex()), actions.count() + 1);
+    for (int i = 1; i < total; ++i)
+        actions.at(i - 1)->setChecked(!headerView->isSectionHidden(i));
+
+    setViewMode(ViewMode(viewMode));
+    return true;
+}
+
+/*!
+    \reimp
+*/
+void QFileDialog::changeEvent(QEvent *e)
+{
+    Q_D(QFileDialog);
+    if (e->type() == QEvent::LanguageChange) {
+        d->retranslateWindowTitle();
+        d->retranslateStrings();
+    }
+    QDialog::changeEvent(e);
+}
+
+QFileDialogPrivate::QFileDialogPrivate()
+    :
+#ifndef QT_NO_PROXYMODEL
+        proxyModel(0),
+#endif
+        model(0),
+        fileMode(QFileDialog::AnyFile),
+        acceptMode(QFileDialog::AcceptOpen),
+        currentHistoryLocation(-1),
+        renameAction(0),
+        deleteAction(0),
+        showHiddenAction(0),
+        useDefaultCaption(true),
+        defaultFileTypes(true),
+        fileNameLabelExplicitlySat(false),
+        nativeDialogInUse(false),
+#ifdef Q_WS_MAC
+        mDelegate(0),
+#ifndef QT_MAC_USE_COCOA
+        mDialog(0),
+        mDialogStarted(false),
+        mDialogClosed(true),
+#endif
+#endif
+        qFileDialogUi(0)
+{
+}
+
+QFileDialogPrivate::~QFileDialogPrivate()
+{
+}
+
+void QFileDialogPrivate::retranslateWindowTitle()
+{
+    Q_Q(QFileDialog);
+    if (!useDefaultCaption || setWindowTitle != q->windowTitle())
+        return;
+    if (acceptMode == QFileDialog::AcceptOpen) {
+        if (fileMode == QFileDialog::DirectoryOnly || fileMode == QFileDialog::Directory)
+            q->setWindowTitle(QFileDialog::tr("Find Directory"));
+        else
+            q->setWindowTitle(QFileDialog::tr("Open"));
+    } else
+        q->setWindowTitle(QFileDialog::tr("Save As"));
+
+    setWindowTitle = q->windowTitle();
+}
+
+void QFileDialogPrivate::setLastVisitedDirectory(const QString &dir)
+{
+    *lastVisitedDir() = dir;
+}
+
+void QFileDialogPrivate::retranslateStrings()
+{
+    Q_Q(QFileDialog);
+    /* WIDGETS */
+    if (defaultFileTypes)
+        q->setNameFilter(QFileDialog::tr("All Files (*)"));
+
+    QList<QAction*> actions = qFileDialogUi->treeView->header()->actions();
+    QAbstractItemModel *abstractModel = model;
+#ifndef QT_NO_PROXYMODEL
+    if (proxyModel)
+        abstractModel = proxyModel;
+#endif
+    int total = qMin(abstractModel->columnCount(QModelIndex()), actions.count() + 1);
+    for (int i = 1; i < total; ++i) {
+        actions.at(i - 1)->setText(QFileDialog::tr("Show ") + abstractModel->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString());
+    }
+
+    /* MENU ACTIONS */
+    renameAction->setText(QFileDialog::tr("&Rename"));
+    deleteAction->setText(QFileDialog::tr("&Delete"));
+    showHiddenAction->setText(QFileDialog::tr("Show &hidden files"));
+    newFolderAction->setText(QFileDialog::tr("&New Folder"));
+    qFileDialogUi->retranslateUi(q);
+
+    if (!fileNameLabelExplicitlySat){
+        if (fileMode == QFileDialog::DirectoryOnly || fileMode == QFileDialog::Directory) {
+            q->setLabelText(QFileDialog::FileName, QFileDialog::tr("Directory:"));
+        } else {
+            q->setLabelText(QFileDialog::FileName, QFileDialog::tr("File &name:"));
+        }
+        fileNameLabelExplicitlySat = false;
+    }
+}
+
+void QFileDialogPrivate::emitFilesSelected(const QStringList &files)
+{
+    Q_Q(QFileDialog);
+    emit q->filesSelected(files);
+    if (files.count() == 1)
+        emit q->fileSelected(files.first());
+}
+
+bool QFileDialogPrivate::canBeNativeDialog()
+{
+    Q_Q(QFileDialog);
+    if (nativeDialogInUse)
+        return true;
+    if (q->testAttribute(Qt::WA_DontShowOnScreen))
+        return false;
+    if (opts & QFileDialog::DontUseNativeDialog)
+        return false;
+
+    QLatin1String staticName(QFileDialog::staticMetaObject.className());
+    QLatin1String dynamicName(q->metaObject()->className());
+    return (staticName == dynamicName);
+}
+
+/*!
+    \since 4.5
+    Sets the given \a option to be enabled if \a on is true; otherwise,
+    clears the given \a option.
+
+    \sa options, testOption()
+*/
+void QFileDialog::setOption(Option option, bool on)
+{
+    Q_D(QFileDialog);
+    if (!(d->opts & option) != !on)
+        setOptions(d->opts ^ option);
+}
+
+/*!
+    \since 4.5
+
+    Returns true if the given \a option is enabled; otherwise, returns
+    false.
+
+    \sa options, setOption()
+*/
+bool QFileDialog::testOption(Option option) const
+{
+    Q_D(const QFileDialog);
+    return (d->opts & option) != 0;
+}
+
+/*!
+    \property QFileDialog::options
+    \brief the various options that affect the look and feel of the dialog
+    \since 4.5
+
+    By default, all options are disabled.
+
+    Options should be set before showing the dialog. Setting them while the
+    dialog is visible is not guaranteed to have an immediate effect on the
+    dialog (depending on the option and on the platform).
+
+    \sa setOption(), testOption()
+*/
+void QFileDialog::setOptions(Options options)
+{
+    Q_D(QFileDialog);
+
+    Options changed = (options ^ d->opts);
+    if (!changed)
+        return;
+
+    d->opts = options;
+    if (changed & DontResolveSymlinks)
+        d->model->setResolveSymlinks(!(options & DontResolveSymlinks));
+    if (changed & ReadOnly) {
+        bool ro = (options & ReadOnly);
+        d->model->setReadOnly(ro);
+        d->qFileDialogUi->newFolderButton->setEnabled(!ro);
+        d->renameAction->setEnabled(!ro);
+        d->deleteAction->setEnabled(!ro);
+    }
+    if (changed & HideNameFilterDetails)
+        setNameFilters(d->nameFilters);
+
+    if (changed & ShowDirsOnly)
+        setFilter((options & ShowDirsOnly) ? filter() & ~QDir::Files : filter() | QDir::Files);
+
+    if (changed & DontUseCustomDirectoryIcons)
+        iconProvider()->d_ptr->setUseCustomDirectoryIcons(!(options & DontUseCustomDirectoryIcons));
+}
+
+QFileDialog::Options QFileDialog::options() const
+{
+    Q_D(const QFileDialog);
+    return d->opts;
+}
+
+/*!
+    \overload
+
+    \since 4.5
+
+    This function connects one of its signals to the slot specified by \a receiver
+    and \a member. The specific signal depends is filesSelected() if fileMode is
+    ExistingFiles and fileSelected() if fileMode is anything else.
+
+    The signal will be disconnected from the slot when the dialog is closed.
+*/
+void QFileDialog::open(QObject *receiver, const char *member)
+{
+    Q_D(QFileDialog);
+    const char *signal = (fileMode() == ExistingFiles) ? SIGNAL(filesSelected(QStringList))
+                                                       : SIGNAL(fileSelected(QString));
+    connect(this, signal, receiver, member);
+    d->signalToDisconnectOnClose = signal;
+    d->receiverToDisconnectOnClose = receiver;
+    d->memberToDisconnectOnClose = member;
+
+    QDialog::open();
+}
+
+
+/*!
+    \reimp
+*/
+void QFileDialog::setVisible(bool visible)
+{
+    Q_D(QFileDialog);
+    if (visible){
+        if (testAttribute(Qt::WA_WState_ExplicitShowHide) && !testAttribute(Qt::WA_WState_Hidden))
+            return;
+    } else if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden))
+        return;
+
+    if (d->canBeNativeDialog()){
+        if (d->setVisible_sys(visible)){
+            d->nativeDialogInUse = true;
+            // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below
+            // updates the state correctly, but skips showing the non-native version:
+            setAttribute(Qt::WA_DontShowOnScreen);
+#ifndef QT_NO_FSCOMPLETER
+            //So the completer don't try to complete and therefore to show a popup
+            d->completer->setModel(0);
+#endif
+        } else {
+            d->nativeDialogInUse = false;
+            setAttribute(Qt::WA_DontShowOnScreen, false);
+#ifndef QT_NO_FSCOMPLETER
+            if (d->proxyModel != 0)
+                d->completer->setModel(d->proxyModel);
+            else
+                d->completer->setModel(d->model);
+#endif
+        }
+    }
+
+    if (!d->nativeDialogInUse)
+        d->qFileDialogUi->fileNameEdit->setFocus();
+
+    QDialog::setVisible(visible);
+}
+
+/*!
+    \internal
+    set the directory to url
+*/
+void QFileDialogPrivate::_q_goToUrl(const QUrl &url)
+{
+    //The shortcut in the side bar may have a parent that is not fetched yet (e.g. an hidden file)
+    //so we force the fetching
+    QFileSystemModelPrivate::QFileSystemNode *node = model->d_func()->node(url.toLocalFile(), true);
+    QModelIndex idx =  model->d_func()->index(node);
+    _q_enterDirectory(idx);
+}
+
+/*!
+    \fn void QFileDialog::setDirectory(const QDir &directory)
+
+    \overload
+*/
+
+/*!
+    Sets the file dialog's current \a directory.
+*/
+void QFileDialog::setDirectory(const QString &directory)
+{
+    Q_D(QFileDialog);
+    QString newDirectory = directory;
+    QFileInfo info(directory);
+    //we remove .. and . from the given path if exist
+    if (!directory.isEmpty())
+        newDirectory = QDir::cleanPath(directory);
+
+    if (!directory.isEmpty() && newDirectory.isEmpty())
+        return;
+
+    d->setLastVisitedDirectory(newDirectory);
+
+    if (d->nativeDialogInUse){
+        d->setDirectory_sys(newDirectory);
+        return;
+    }
+    if (d->rootPath() == newDirectory)
+        return;
+    QModelIndex root = d->model->setRootPath(newDirectory);
+    d->qFileDialogUi->newFolderButton->setEnabled(d->model->flags(root) & Qt::ItemIsDropEnabled);
+    if (root != d->rootIndex()) {
+#ifndef QT_NO_FSCOMPLETER
+    if (directory.endsWith(QLatin1Char('/')))
+        d->completer->setCompletionPrefix(newDirectory);
+    else
+        d->completer->setCompletionPrefix(newDirectory + QLatin1Char('/'));
+#endif
+        d->setRootIndex(root);
+    }
+    d->qFileDialogUi->listView->selectionModel()->clear();
+}
+
+/*!
+    Returns the directory currently being displayed in the dialog.
+*/
+QDir QFileDialog::directory() const
+{
+    Q_D(const QFileDialog);
+    return QDir(d->nativeDialogInUse ? d->directory_sys() : d->rootPath());
+}
+
+/*!
+    Selects the given \a filename in the file dialog.
+
+    \sa selectedFiles()
+*/
+void QFileDialog::selectFile(const QString &filename)
+{
+    Q_D(QFileDialog);
+    if (filename.isEmpty())
+        return;
+
+    if (d->nativeDialogInUse){
+        d->selectFile_sys(filename);
+        return;
+    }
+
+    if (!QDir::isRelativePath(filename)) {
+        QFileInfo info(filename);
+        QString filenamePath = info.absoluteDir().path();
+
+        if (d->model->rootPath() != filenamePath)
+            setDirectory(filenamePath);
+    }
+
+    QModelIndex index = d->model->index(filename);
+    QString file;
+    if (!index.isValid()) {
+        // save as dialog where we want to input a default value
+        QString text = filename;
+        if (QFileInfo(filename).isAbsolute()) {
+            QString current = d->rootPath();
+            text.remove(current);
+            if (text.at(0) == QDir::separator()
+#ifdef Q_OS_WIN
+                //On Windows both cases can happen
+                || text.at(0) == QLatin1Char('/')
+#endif
+                )
+                text = text.remove(0,1);
+        }
+        file = text;
+    } else {
+        file = index.data().toString();
+    }
+    d->qFileDialogUi->listView->selectionModel()->clear();
+    if (!isVisible() || !d->lineEdit()->hasFocus())
+        d->lineEdit()->setText(file);
+}
+
+#ifdef Q_OS_UNIX
+Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded = 0)
+{
+    if (expanded != 0)
+        *expanded = false;
+    if (!path.startsWith(QLatin1Char('~')))
+        return path;
+    QString ret = path;
+#if !defined(Q_OS_INTEGRITY)
+    QStringList tokens = ret.split(QDir::separator());
+    if (tokens.first() == QLatin1String("~")) {
+        ret.replace(0, 1, QDir::homePath());
+    } else {
+        QString userName = tokens.first();
+        userName.remove(0, 1);
+#if defined(Q_OS_VXWORKS)
+        const QString homePath = QDir::homePath();
+#elif defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)
+        passwd pw;
+        passwd *tmpPw;
+        char buf[200];
+        const int bufSize = sizeof(buf);
+        int err = 0;
+#if defined(Q_OS_SOLARIS) && (_POSIX_C_SOURCE - 0 < 199506L)
+        tmpPw = getpwnam_r(userName.toLocal8Bit().constData(), &pw, buf, bufSize);
+#else
+        err = getpwnam_r(userName.toLocal8Bit().constData(), &pw, buf, bufSize, &tmpPw);
+#endif
+        if (err || !tmpPw)
+            return ret;
+        const QString homePath = QString::fromLocal8Bit(pw.pw_dir);
+#else
+        passwd *pw = getpwnam(userName.toLocal8Bit().constData());
+        if (!pw)
+            return ret;
+        const QString homePath = QString::fromLocal8Bit(pw->pw_dir);
+#endif
+        ret.replace(0, tokens.first().length(), homePath);
+    }
+    if (expanded != 0)
+        *expanded = true;
+#endif
+    return ret;
+}
+#endif
+
+/**
+    Returns the text in the line edit which can be one or more file names
+  */
+QStringList QFileDialogPrivate::typedFiles() const
+{
+#ifdef Q_OS_UNIX
+    Q_Q(const QFileDialog);
+#endif
+    QStringList files;
+    QString editText = lineEdit()->text();
+    if (!editText.contains(QLatin1Char('"'))) {
+#ifdef Q_OS_UNIX
+        const QString prefix = q->directory().absolutePath() + QDir::separator();
+        if (QFile::exists(prefix + editText))
+            files << editText;
+        else
+            files << qt_tildeExpansion(editText);
+#else
+        files << editText;
+#endif
+    } else {
+        // " is used to separate files like so: "file1" "file2" "file3" ...
+        // ### need escape character for filenames with quotes (")
+        QStringList tokens = editText.split(QLatin1Char('\"'));
+        for (int i=0; i<tokens.size(); ++i) {
+            if ((i % 2) == 0)
+                continue; // Every even token is a separator
+#ifdef Q_OS_UNIX
+            const QString token = tokens.at(i);
+            const QString prefix = q->directory().absolutePath() + QDir::separator();
+            if (QFile::exists(prefix + token))
+                files << token;
+            else
+                files << qt_tildeExpansion(token);
+#else
+            files << toInternal(tokens.at(i));
+#endif
+        }
+    }
+    return addDefaultSuffixToFiles(files);
+}
+
+QStringList QFileDialogPrivate::addDefaultSuffixToFiles(const QStringList filesToFix) const
+{
+    QStringList files;
+    for (int i=0; i<filesToFix.size(); ++i) {
+        QString name = toInternal(filesToFix.at(i));
+        QFileInfo info(name);
+        // if the filename has no suffix, add the default suffix
+        if (!defaultSuffix.isEmpty() && !info.isDir() && name.lastIndexOf(QLatin1Char('.')) == -1)
+            name += QLatin1Char('.') + defaultSuffix;
+        if (info.isAbsolute()) {
+            files.append(name);
+        } else {
+            // at this point the path should only have Qt path separators.
+            // This check is needed since we might be at the root directory
+            // and on Windows it already ends with slash.
+            QString path = rootPath();
+            if (!path.endsWith(QLatin1Char('/')))
+                path += QLatin1Char('/');
+            path += name;
+            files.append(path);
+        }
+    }
+    return files;
+}
+
+
+/*!
+    Returns a list of strings containing the absolute paths of the
+    selected files in the dialog. If no files are selected, or
+    the mode is not ExistingFiles or ExistingFile, selectedFiles() contains the current path in the viewport.
+
+    \sa selectedNameFilter(), selectFile()
+*/
+QStringList QFileDialog::selectedFiles() const
+{
+    Q_D(const QFileDialog);
+    if (d->nativeDialogInUse)
+        return d->addDefaultSuffixToFiles(d->selectedFiles_sys());
+
+    QModelIndexList indexes = d->qFileDialogUi->listView->selectionModel()->selectedRows();
+    QStringList files;
+    for (int i = 0; i < indexes.count(); ++i)
+        files.append(indexes.at(i).data(QFileSystemModel::FilePathRole).toString());
+
+    if (files.isEmpty() && !d->lineEdit()->text().isEmpty())
+        files = d->typedFiles();
+
+    if (files.isEmpty() && !(d->fileMode == ExistingFile || d->fileMode == ExistingFiles))
+        files.append(d->rootIndex().data(QFileSystemModel::FilePathRole).toString());
+    return files;
+}
+
+/*
+    Makes a list of filters from ;;-separated text.
+    Used by the mac and windows implementations
+*/
+QStringList qt_make_filter_list(const QString &filter)
+{
+    QString f(filter);
+
+    if (f.isEmpty())
+        return QStringList();
+
+    QString sep(QLatin1String(";;"));
+    int i = f.indexOf(sep, 0);
+    if (i == -1) {
+        if (f.indexOf(QLatin1Char('\n'), 0) != -1) {
+            sep = QLatin1Char('\n');
+            i = f.indexOf(sep, 0);
+        }
+    }
+
+    return f.split(sep);
+}
+
+/*!
+    \since 4.4
+
+    Sets the filter used in the file dialog to the given \a filter.
+
+    If \a filter contains a pair of parentheses containing one or more
+    of \bold{anything*something}, separated by spaces, then only the
+    text contained in the parentheses is used as the filter. This means
+    that these calls are all equivalent:
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 6
+
+    \sa setNameFilters()
+*/
+void QFileDialog::setNameFilter(const QString &filter)
+{
+    setNameFilters(qt_make_filter_list(filter));
+}
+
+/*!
+  \obsolete
+
+  Use setNameFilter() instead.
+*/
+void QFileDialog::setFilter(const QString &filter)
+{
+    setNameFilter(filter);
+}
+
+/*!
+    \property QFileDialog::nameFilterDetailsVisible
+    \obsolete
+    \brief This property holds whether the filter details is shown or not.
+    \since 4.4
+
+    When this property is true (the default), the filter details are shown
+    in the combo box.  When the property is set to false, these are hidden.
+
+    Use setOption(HideNameFilterDetails, !\e enabled) or
+    !testOption(HideNameFilterDetails).
+*/
+void QFileDialog::setNameFilterDetailsVisible(bool enabled)
+{
+    setOption(HideNameFilterDetails, !enabled);
+}
+
+bool QFileDialog::isNameFilterDetailsVisible() const
+{
+    return !testOption(HideNameFilterDetails);
+}
+
+
+/*
+    Strip the filters by removing the details, e.g. (*.*).
+*/
+QStringList qt_strip_filters(const QStringList &filters)
+{
+    QStringList strippedFilters;
+    QRegExp r(QString::fromLatin1(qt_file_dialog_filter_reg_exp));
+    for (int i = 0; i < filters.count(); ++i) {
+        QString filterName;
+        int index = r.indexIn(filters[i]);
+        if (index >= 0)
+            filterName = r.cap(1);
+        strippedFilters.append(filterName.simplified());
+    }
+    return strippedFilters;
+}
+
+
+/*!
+    \since 4.4
+
+    Sets the \a filters used in the file dialog.
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 7
+*/
+void QFileDialog::setNameFilters(const QStringList &filters)
+{
+    Q_D(QFileDialog);
+    d->defaultFileTypes = (filters == QStringList(QFileDialog::tr("All Files (*)")));
+    QStringList cleanedFilters;
+    for (int i = 0; i < filters.count(); ++i) {
+        cleanedFilters << filters[i].simplified();
+    }
+    d->nameFilters = cleanedFilters;
+
+    if (d->nativeDialogInUse){
+        d->setNameFilters_sys(cleanedFilters);
+        return;
+    }
+
+    d->qFileDialogUi->fileTypeCombo->clear();
+    if (cleanedFilters.isEmpty())
+        return;
+
+    if (testOption(HideNameFilterDetails))
+        d->qFileDialogUi->fileTypeCombo->addItems(qt_strip_filters(cleanedFilters));
+    else
+        d->qFileDialogUi->fileTypeCombo->addItems(cleanedFilters);
+
+    d->_q_useNameFilter(0);
+}
+
+/*!
+    \obsolete
+
+    Use setNameFilters() instead.
+*/
+void QFileDialog::setFilters(const QStringList &filters)
+{
+    setNameFilters(filters);
+}
+
+/*!
+    \since 4.4
+
+    Returns the file type filters that are in operation on this file
+    dialog.
+*/
+QStringList QFileDialog::nameFilters() const
+{
+    return d_func()->nameFilters;
+}
+
+/*!
+    \obsolete
+
+    Use nameFilters() instead.
+*/
+
+QStringList QFileDialog::filters() const
+{
+    return nameFilters();
+}
+
+/*!
+    \since 4.4
+
+    Sets the current file type \a filter. Multiple filters can be
+    passed in \a filter by separating them with semicolons or spaces.
+
+    \sa setNameFilter(), setNameFilters(), selectedNameFilter()
+*/
+void QFileDialog::selectNameFilter(const QString &filter)
+{
+    Q_D(QFileDialog);
+    if (d->nativeDialogInUse) {
+        d->selectNameFilter_sys(filter);
+        return;
+    }
+    int i = -1;
+    if (testOption(HideNameFilterDetails)) {
+        const QStringList filters = qt_strip_filters(qt_make_filter_list(filter));
+        if (!filters.isEmpty())
+            i = d->qFileDialogUi->fileTypeCombo->findText(filters.first());
+    } else {
+        i = d->qFileDialogUi->fileTypeCombo->findText(filter);
+    }
+    if (i >= 0) {
+        d->qFileDialogUi->fileTypeCombo->setCurrentIndex(i);
+        d->_q_useNameFilter(d->qFileDialogUi->fileTypeCombo->currentIndex());
+    }
+}
+
+/*!
+    \obsolete
+
+    Use selectNameFilter() instead.
+*/
+
+void QFileDialog::selectFilter(const QString &filter)
+{
+    selectNameFilter(filter);
+}
+
+/*!
+    \since 4.4
+
+    Returns the filter that the user selected in the file dialog.
+
+    \sa selectedFiles()
+*/
+QString QFileDialog::selectedNameFilter() const
+{
+    Q_D(const QFileDialog);
+    if (d->nativeDialogInUse)
+        return d->selectedNameFilter_sys();
+
+    return d->qFileDialogUi->fileTypeCombo->currentText();
+}
+
+/*!
+    \obsolete
+
+    Use selectedNameFilter() instead.
+*/
+QString QFileDialog::selectedFilter() const
+{
+    return selectedNameFilter();
+}
+
+/*!
+    \since 4.4
+
+    Returns the filter that is used when displaying files.
+
+    \sa setFilter()
+*/
+QDir::Filters QFileDialog::filter() const
+{
+    Q_D(const QFileDialog);
+    return d->model->filter();
+}
+
+/*!
+    \since 4.4
+
+    Sets the filter used by the model to \a filters. The filter is used
+    to specify the kind of files that should be shown.
+
+    \sa filter()
+*/
+
+void QFileDialog::setFilter(QDir::Filters filters)
+{
+    Q_D(QFileDialog);
+    d->model->setFilter(filters);
+    if (d->nativeDialogInUse){
+        d->setFilter_sys();
+        return;
+    }
+
+    d->showHiddenAction->setChecked((filters & QDir::Hidden));
+}
+
+/*!
+    \property QFileDialog::viewMode
+    \brief the way files and directories are displayed in the dialog
+
+    By default, the \c Detail mode is used to display information about
+    files and directories.
+
+    \sa ViewMode
+*/
+void QFileDialog::setViewMode(QFileDialog::ViewMode mode)
+{
+    Q_D(QFileDialog);
+    if (mode == Detail)
+        d->_q_showDetailsView();
+    else
+        d->_q_showListView();
+}
+
+QFileDialog::ViewMode QFileDialog::viewMode() const
+{
+    Q_D(const QFileDialog);
+    return (d->qFileDialogUi->stackedWidget->currentWidget() == d->qFileDialogUi->listView->parent() ? QFileDialog::List : QFileDialog::Detail);
+}
+
+/*!
+    \property QFileDialog::fileMode
+    \brief the file mode of the dialog
+
+    The file mode defines the number and type of items that the user is
+    expected to select in the dialog.
+
+    By default, this property is set to AnyFile.
+
+    This function will set the labels for the FileName and
+    \l{QFileDialog::}{Accept} \l{DialogLabel}s. It is possible to set
+    custom text after the call to setFileMode().
+
+    \sa FileMode
+*/
+void QFileDialog::setFileMode(QFileDialog::FileMode mode)
+{
+    Q_D(QFileDialog);
+    d->fileMode = mode;
+    d->retranslateWindowTitle();
+
+    // keep ShowDirsOnly option in sync with fileMode (BTW, DirectoryOnly is obsolete)
+    setOption(ShowDirsOnly, mode == DirectoryOnly);
+
+    // set selection mode and behavior
+    QAbstractItemView::SelectionMode selectionMode;
+    if (mode == QFileDialog::ExistingFiles)
+        selectionMode = QAbstractItemView::ExtendedSelection;
+    else
+        selectionMode = QAbstractItemView::SingleSelection;
+    d->qFileDialogUi->listView->setSelectionMode(selectionMode);
+    d->qFileDialogUi->treeView->setSelectionMode(selectionMode);
+    // set filter
+    d->model->setFilter(d->filterForMode(filter()));
+    // setup file type for directory
+    QString buttonText = (d->acceptMode == AcceptOpen ? tr("&Open") : tr("&Save"));
+    if (mode == DirectoryOnly || mode == Directory) {
+        d->qFileDialogUi->fileTypeCombo->clear();
+        d->qFileDialogUi->fileTypeCombo->addItem(tr("Directories"));
+        d->qFileDialogUi->fileTypeCombo->setEnabled(false);
+
+        if (!d->fileNameLabelExplicitlySat){
+            setLabelText(FileName, tr("Directory:"));
+            d->fileNameLabelExplicitlySat = false;
+        }
+        buttonText = tr("&Choose");
+    } else {
+        if (!d->fileNameLabelExplicitlySat){
+            setLabelText(FileName, tr("File &name:"));
+            d->fileNameLabelExplicitlySat = false;
+        }
+    }
+    setLabelText(Accept, buttonText);
+    if (d->nativeDialogInUse){
+        d->setFilter_sys();
+        return;
+    }
+
+    d->qFileDialogUi->fileTypeCombo->setEnabled(!testOption(ShowDirsOnly));
+    d->_q_updateOkButton();
+}
+
+QFileDialog::FileMode QFileDialog::fileMode() const
+{
+    Q_D(const QFileDialog);
+    return d->fileMode;
+}
+
+/*!
+    \property QFileDialog::acceptMode
+    \brief the accept mode of the dialog
+
+    The action mode defines whether the dialog is for opening or saving files.
+
+    By default, this property is set to \l{AcceptOpen}.
+
+    \sa AcceptMode
+*/
+void QFileDialog::setAcceptMode(QFileDialog::AcceptMode mode)
+{
+    Q_D(QFileDialog);
+    d->acceptMode = mode;
+    bool directoryMode = (d->fileMode == Directory || d->fileMode == DirectoryOnly);
+    QDialogButtonBox::StandardButton button = (mode == AcceptOpen ? QDialogButtonBox::Open : QDialogButtonBox::Save);
+    d->qFileDialogUi->buttonBox->setStandardButtons(button | QDialogButtonBox::Cancel);
+    d->qFileDialogUi->buttonBox->button(button)->setEnabled(false);
+    d->_q_updateOkButton();
+    if (mode == AcceptOpen && directoryMode)
+        setLabelText(Accept, tr("&Choose"));
+    else
+        setLabelText(Accept, (mode == AcceptOpen ? tr("&Open") : tr("&Save")));
+    if (mode == AcceptSave) {
+        d->qFileDialogUi->lookInCombo->setEditable(false);
+    }
+    d->retranslateWindowTitle();
+#if defined(Q_WS_MAC)
+    d->deleteNativeDialog_sys();
+    setAttribute(Qt::WA_DontShowOnScreen, false);
+#endif
+}
+
+/*
+    Returns the file system model index that is the root index in the
+    views
+*/
+QModelIndex QFileDialogPrivate::rootIndex() const {
+    return mapToSource(qFileDialogUi->listView->rootIndex());
+}
+
+QAbstractItemView *QFileDialogPrivate::currentView() const {
+    if (!qFileDialogUi->stackedWidget)
+        return 0;
+    if (qFileDialogUi->stackedWidget->currentWidget() == qFileDialogUi->listView->parent())
+        return qFileDialogUi->listView;
+    return qFileDialogUi->treeView;
+}
+
+QLineEdit *QFileDialogPrivate::lineEdit() const {
+    return (QLineEdit*)qFileDialogUi->fileNameEdit;
+}
+
+/*
+    Sets the view root index to be the file system model index
+*/
+void QFileDialogPrivate::setRootIndex(const QModelIndex &index) const {
+    Q_ASSERT(index.isValid() ? index.model() == model : true);
+    QModelIndex idx = mapFromSource(index);
+    qFileDialogUi->treeView->setRootIndex(idx);
+    qFileDialogUi->listView->setRootIndex(idx);
+}
+/*
+    Select a file system model index
+    returns the index that was selected (or not depending upon sortfilterproxymodel)
+*/
+QModelIndex QFileDialogPrivate::select(const QModelIndex &index) const {
+    Q_ASSERT(index.isValid() ? index.model() == model : true);
+
+    QModelIndex idx = mapFromSource(index);
+    if (idx.isValid() && !qFileDialogUi->listView->selectionModel()->isSelected(idx))
+        qFileDialogUi->listView->selectionModel()->select(idx,
+            QItemSelectionModel::Select | QItemSelectionModel::Rows);
+    return idx;
+}
+
+QFileDialog::AcceptMode QFileDialog::acceptMode() const
+{
+    Q_D(const QFileDialog);
+    return d->acceptMode;
+}
+
+/*!
+    \property QFileDialog::readOnly
+    \obsolete
+    \brief Whether the filedialog is read-only
+
+    If this property is set to false, the file dialog will allow renaming,
+    and deleting of files and directories and creating directories.
+
+    Use setOption(ReadOnly, \e enabled) or testOption(ReadOnly) instead.
+*/
+void QFileDialog::setReadOnly(bool enabled)
+{
+    setOption(ReadOnly, enabled);
+}
+
+bool QFileDialog::isReadOnly() const
+{
+    return testOption(ReadOnly);
+}
+
+/*!
+    \property QFileDialog::resolveSymlinks
+    \obsolete
+    \brief whether the filedialog should resolve shortcuts
+
+    If this property is set to true, the file dialog will resolve
+    shortcuts or symbolic links.
+
+    Use setOption(DontResolveSymlinks, !\a enabled) or
+    !testOption(DontResolveSymlinks).
+*/
+void QFileDialog::setResolveSymlinks(bool enabled)
+{
+    setOption(DontResolveSymlinks, !enabled);
+}
+
+bool QFileDialog::resolveSymlinks() const
+{
+    return !testOption(DontResolveSymlinks);
+}
+
+/*!
+    \property QFileDialog::confirmOverwrite
+    \obsolete
+    \brief whether the filedialog should ask before accepting a selected file,
+    when the accept mode is AcceptSave
+
+    Use setOption(DontConfirmOverwrite, !\e enabled) or
+    !testOption(DontConfirmOverwrite) instead.
+*/
+void QFileDialog::setConfirmOverwrite(bool enabled)
+{
+    setOption(DontConfirmOverwrite, !enabled);
+}
+
+bool QFileDialog::confirmOverwrite() const
+{
+    return !testOption(DontConfirmOverwrite);
+}
+
+/*!
+    \property QFileDialog::defaultSuffix
+    \brief suffix added to the filename if no other suffix was specified
+
+    This property specifies a string that will be added to the
+    filename if it has no suffix already. The suffix is typically
+    used to indicate the file type (e.g. "txt" indicates a text
+    file).
+*/
+void QFileDialog::setDefaultSuffix(const QString &suffix)
+{
+    Q_D(QFileDialog);
+    d->defaultSuffix = suffix;
+}
+
+QString QFileDialog::defaultSuffix() const
+{
+    Q_D(const QFileDialog);
+    return d->defaultSuffix;
+}
+
+/*!
+    Sets the browsing history of the filedialog to contain the given
+    \a paths.
+*/
+void QFileDialog::setHistory(const QStringList &paths)
+{
+    Q_D(QFileDialog);
+    d->qFileDialogUi->lookInCombo->setHistory(paths);
+}
+
+void QFileDialogComboBox::setHistory(const QStringList &paths)
+{
+    m_history = paths;
+    // Only populate the first item, showPopup will populate the rest if needed
+    QList<QUrl> list;
+    QModelIndex idx = d_ptr->model->index(d_ptr->rootPath());
+    //On windows the popup display the "C:\", convert to nativeSeparators
+    QUrl url = QUrl::fromLocalFile(QDir::toNativeSeparators(idx.data(QFileSystemModel::FilePathRole).toString()));
+    if (url.isValid())
+        list.append(url);
+    urlModel->setUrls(list);
+}
+
+/*!
+    Returns the browsing history of the filedialog as a list of paths.
+*/
+QStringList QFileDialog::history() const
+{
+    Q_D(const QFileDialog);
+    QStringList currentHistory = d->qFileDialogUi->lookInCombo->history();
+    //On windows the popup display the "C:\", convert to nativeSeparators
+    QString newHistory = QDir::toNativeSeparators(d->rootIndex().data(QFileSystemModel::FilePathRole).toString());
+    if (!currentHistory.contains(newHistory))
+        currentHistory << newHistory;
+    return currentHistory;
+}
+
+/*!
+    Sets the item delegate used to render items in the views in the
+    file dialog to the given \a delegate.
+
+    \warning You should not share the same instance of a delegate between views.
+    Doing so can cause incorrect or unintuitive editing behavior since each
+    view connected to a given delegate may receive the \l{QAbstractItemDelegate::}{closeEditor()}
+    signal, and attempt to access, modify or close an editor that has already been closed.
+
+    Note that the model used is QFileSystemModel. It has custom item data roles, which is
+    described by the \l{QFileSystemModel::}{Roles} enum. You can use a QFileIconProvider if
+    you only want custom icons.
+
+    \sa itemDelegate(), setIconProvider(), QFileSystemModel
+*/
+void QFileDialog::setItemDelegate(QAbstractItemDelegate *delegate)
+{
+    Q_D(QFileDialog);
+    d->qFileDialogUi->listView->setItemDelegate(delegate);
+    d->qFileDialogUi->treeView->setItemDelegate(delegate);
+}
+
+/*!
+  Returns the item delegate used to render the items in the views in the filedialog.
+*/
+QAbstractItemDelegate *QFileDialog::itemDelegate() const
+{
+    Q_D(const QFileDialog);
+    return d->qFileDialogUi->listView->itemDelegate();
+}
+
+/*!
+    Sets the icon provider used by the filedialog to the specified \a provider.
+*/
+void QFileDialog::setIconProvider(QFileIconProvider *provider)
+{
+    Q_D(QFileDialog);
+    d->model->setIconProvider(provider);
+    //It forces the refresh of all entries in the side bar, then we can get new icons
+    d->qFileDialogUi->sidebar->setUrls(d->qFileDialogUi->sidebar->urls());
+}
+
+/*!
+    Returns the icon provider used by the filedialog.
+*/
+QFileIconProvider *QFileDialog::iconProvider() const
+{
+    Q_D(const QFileDialog);
+    return d->model->iconProvider();
+}
+
+/*!
+    Sets the \a text shown in the filedialog in the specified \a label.
+*/
+void QFileDialog::setLabelText(DialogLabel label, const QString &text)
+{
+    Q_D(QFileDialog);
+    QPushButton *button;
+    switch (label) {
+    case LookIn:
+        d->qFileDialogUi->lookInLabel->setText(text);
+        break;
+    case FileName:
+        d->qFileDialogUi->fileNameLabel->setText(text);
+        d->fileNameLabelExplicitlySat = true;
+        break;
+    case FileType:
+        d->qFileDialogUi->fileTypeLabel->setText(text);
+        break;
+    case Accept:
+        d->acceptLabel = text;
+        if (acceptMode() == AcceptOpen)
+            button = d->qFileDialogUi->buttonBox->button(QDialogButtonBox::Open);
+        else
+            button = d->qFileDialogUi->buttonBox->button(QDialogButtonBox::Save);
+        if (button)
+            button->setText(text);
+        break;
+    case Reject:
+        button = d->qFileDialogUi->buttonBox->button(QDialogButtonBox::Cancel);
+        if (button)
+            button->setText(text);
+        break;
+    }
+}
+
+/*!
+    Returns the text shown in the filedialog in the specified \a label.
+*/
+QString QFileDialog::labelText(DialogLabel label) const
+{
+    QPushButton *button;
+    Q_D(const QFileDialog);
+    switch (label) {
+    case LookIn:
+        return d->qFileDialogUi->lookInLabel->text();
+    case FileName:
+        return d->qFileDialogUi->fileNameLabel->text();
+    case FileType:
+        return d->qFileDialogUi->fileTypeLabel->text();
+    case Accept:
+        if (acceptMode() == AcceptOpen)
+            button = d->qFileDialogUi->buttonBox->button(QDialogButtonBox::Open);
+        else
+            button = d->qFileDialogUi->buttonBox->button(QDialogButtonBox::Save);
+        if (button)
+            return button->text();
+    case Reject:
+        button = d->qFileDialogUi->buttonBox->button(QDialogButtonBox::Cancel);
+        if (button)
+            return button->text();
+    }
+    return QString();
+}
+
+/*
+    For the native file dialogs
+*/
+
+#if defined(Q_WS_WIN)
+extern QString qt_win_get_open_file_name(const QFileDialogArgs &args,
+                                         QString *initialDirectory,
+                                         QString *selectedFilter);
+
+extern QString qt_win_get_save_file_name(const QFileDialogArgs &args,
+                                         QString *initialDirectory,
+                                         QString *selectedFilter);
+
+extern QStringList qt_win_get_open_file_names(const QFileDialogArgs &args,
+                                              QString *initialDirectory,
+                                              QString *selectedFilter);
+
+extern QString qt_win_get_existing_directory(const QFileDialogArgs &args);
+#endif
+
+/*
+    For Symbian file dialogs
+*/
+#if defined(Q_WS_S60)
+extern QString qtSymbianGetOpenFileName(const QString &caption,
+                                        const QString &dir,
+                                        const QString &filter);
+
+extern QStringList qtSymbianGetOpenFileNames(const QString &caption,
+                                             const QString &dir,
+                                             const QString &filter);
+
+extern QString qtSymbianGetSaveFileName(const QString &caption,
+                                        const QString &dir);
+
+extern QString qtSymbianGetExistingDirectory(const QString &caption,
+                                             const QString &dir);
+#endif
+
+/*!
+    This is a convenience static function that returns an existing file
+    selected by the user. If the user presses Cancel, it returns a null string.
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 8
+
+    The function creates a modal file dialog with the given \a parent widget.
+    If \a parent is not 0, the dialog will be shown centered over the parent
+    widget.
+
+    The file dialog's working directory will be set to \a dir. If \a dir
+    includes a file name, the file will be selected. Only files that match the
+    given \a filter are shown. The filter selected is set to \a selectedFilter.
+    The parameters \a dir, \a selectedFilter, and \a filter may be empty
+    strings. If you want multiple filters, separate them with ';;', for
+    example:
+
+    \code
+    "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"
+    \endcode
+
+    The \a options argument holds various options about how to run the dialog,
+    see the QFileDialog::Option enum for more information on the flags you can
+    pass.
+
+    The dialog's caption is set to \a caption. If \a caption is not specified
+    then a default caption will be used.
+
+    On Windows, Mac OS X and Symbian^3, this static function will use the
+    native file dialog and not a QFileDialog.
+
+    On Windows the dialog will spin a blocking modal event loop that will not
+    dispatch any QTimers, and if \a parent is not 0 then it will position the
+    dialog just below the parent's title bar.
+
+    On Unix/X11, the normal behavior of the file dialog is to resolve and
+    follow symlinks. For example, if \c{/usr/tmp} is a symlink to \c{/var/tmp},
+    the file dialog will change to \c{/var/tmp} after entering \c{/usr/tmp}. If
+    \a options includes DontResolveSymlinks, the file dialog will treat
+    symlinks as regular directories.
+
+    On Symbian^3 the parameter \a selectedFilter has no meaning and the
+    \a options parameter is only used to define if the native file dialog is
+    used.
+
+    \warning Do not delete \a parent during the execution of the dialog. If you
+    want to do this, you should create the dialog yourself using one of the
+    QFileDialog constructors.
+
+    \sa getOpenFileNames(), getSaveFileName(), getExistingDirectory()
+*/
+QString QFileDialog::getOpenFileName(QWidget *parent,
+                               const QString &caption,
+                               const QString &dir,
+                               const QString &filter,
+                               QString *selectedFilter,
+                               Options options)
+{
+    if (qt_filedialog_open_filename_hook && !(options & DontUseNativeDialog))
+        return qt_filedialog_open_filename_hook(parent, caption, dir, filter, selectedFilter, options);
+#if defined(Q_WS_S60)
+    if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
+        return qtSymbianGetOpenFileName(caption, dir, filter);
+#endif
+    QFileDialogArgs args;
+    args.parent = parent;
+    args.caption = caption;
+    args.directory = QFileDialogPrivate::workingDirectory(dir);
+    args.selection = QFileDialogPrivate::initialSelection(dir);
+    args.filter = filter;
+    args.mode = ExistingFile;
+    args.options = options;
+#if defined(Q_WS_WIN)
+    if (qt_use_native_dialogs && !(args.options & DontUseNativeDialog)) {
+        return qt_win_get_open_file_name(args, &(args.directory), selectedFilter);
+    }
+#endif
+
+    // create a qt dialog
+    QFileDialog dialog(args);
+    if (selectedFilter && !selectedFilter->isEmpty())
+        dialog.selectNameFilter(*selectedFilter);
+    if (dialog.exec() == QDialog::Accepted) {
+        if (selectedFilter)
+            *selectedFilter = dialog.selectedFilter();
+        return dialog.selectedFiles().value(0);
+    }
+    return QString();
+}
+
+/*!
+    This is a convenience static function that will return one or more existing
+    files selected by the user.
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 9
+
+    This function creates a modal file dialog with the given \a parent widget.
+    If \a parent is not 0, the dialog will be shown centered over the parent
+    widget.
+
+    The file dialog's working directory will be set to \a dir. If \a dir
+    includes a file name, the file will be selected. The filter is set to
+    \a filter so that only those files which match the filter are shown. The
+    filter selected is set to \a selectedFilter. The parameters \a dir,
+    \a selectedFilter and \a filter may be empty strings. If you need multiple
+    filters, separate them with ';;', for instance:
+
+    \code
+    "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"
+    \endcode
+
+    The dialog's caption is set to \a caption. If \a caption is not specified
+    then a default caption will be used.
+
+    On Windows, Mac OS X and Symbian^3, this static function will use the
+    native file dialog and not a QFileDialog.
+
+    On Windows the dialog will spin a blocking modal event loop that will not
+    dispatch any QTimers, and if \a parent is not 0 then it will position the
+    dialog just below the parent's title bar.
+
+    On Unix/X11, the normal behavior of the file dialog is to resolve and
+    follow symlinks. For example, if \c{/usr/tmp} is a symlink to \c{/var/tmp},
+    the file dialog will change to \c{/var/tmp} after entering \c{/usr/tmp}.
+    The \a options argument holds various options about how to run the dialog,
+    see the QFileDialog::Option enum for more information on the flags you can
+    pass.
+
+    \note If you want to iterate over the list of files, you should iterate
+    over a copy. For example:
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 10
+
+    On Symbian^3 the parameter \a selectedFilter has no meaning and the
+    \a options parameter is only used to define if the native file dialog is
+    used. On Symbian^3, this function can only return a single filename.
+
+    \warning Do not delete \a parent during the execution of the dialog. If you
+    want to do this, you should create the dialog yourself using one of the
+    QFileDialog constructors.
+
+    \sa getOpenFileName(), getSaveFileName(), getExistingDirectory()
+*/
+QStringList QFileDialog::getOpenFileNames(QWidget *parent,
+                                          const QString &caption,
+                                          const QString &dir,
+                                          const QString &filter,
+                                          QString *selectedFilter,
+                                          Options options)
+{
+    if (qt_filedialog_open_filenames_hook && !(options & DontUseNativeDialog))
+        return qt_filedialog_open_filenames_hook(parent, caption, dir, filter, selectedFilter, options);
+#if defined(Q_WS_S60)
+    if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
+        return qtSymbianGetOpenFileNames(caption, dir, filter);
+#endif
+    QFileDialogArgs args;
+    args.parent = parent;
+    args.caption = caption;
+    args.directory = QFileDialogPrivate::workingDirectory(dir);
+    args.selection = QFileDialogPrivate::initialSelection(dir);
+    args.filter = filter;
+    args.mode = ExistingFiles;
+    args.options = options;
+
+#if defined(Q_WS_WIN)
+    if (qt_use_native_dialogs && !(args.options & DontUseNativeDialog)) {
+        return qt_win_get_open_file_names(args, &(args.directory), selectedFilter);
+    }
+#endif
+
+    // create a qt dialog
+    QFileDialog dialog(args);
+    if (selectedFilter && !selectedFilter->isEmpty())
+        dialog.selectNameFilter(*selectedFilter);
+    if (dialog.exec() == QDialog::Accepted) {
+        if (selectedFilter)
+            *selectedFilter = dialog.selectedFilter();
+        return dialog.selectedFiles();
+    }
+    return QStringList();
+}
+
+/*!
+    This is a convenience static function that will return a file name selected
+    by the user. The file does not have to exist.
+
+    It creates a modal file dialog with the given \a parent widget. If
+    \a parent is not 0, the dialog will be shown centered over the parent
+    widget.
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 11
+
+    The file dialog's working directory will be set to \a dir. If \a dir
+    includes a file name, the file will be selected. Only files that match the
+    \a filter are shown. The filter selected is set to \a selectedFilter. The
+    parameters \a dir, \a selectedFilter, and \a filter may be empty strings.
+    Multiple filters are separated with ';;'. For instance:
+
+    \code
+    "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"
+    \endcode
+
+    The \a options argument holds various options about how to run the dialog,
+    see the QFileDialog::Option enum for more information on the flags you can
+    pass.
+
+    The default filter can be chosen by setting \a selectedFilter to the
+    desired value.
+
+    The dialog's caption is set to \a caption. If \a caption is not specified,
+    a default caption will be used.
+
+    On Windows, Mac OS X and Symbian^3, this static function will use the
+    native file dialog and not a QFileDialog.
+
+    On Windows the dialog will spin a blocking modal event loop that will not
+    dispatch any QTimers, and if \a parent is not 0 then it will position the
+    dialog just below the parent's title bar. On Mac OS X, with its native file
+    dialog, the filter argument is ignored.
+
+    On Unix/X11, the normal behavior of the file dialog is to resolve and
+    follow symlinks. For example, if \c{/usr/tmp} is a symlink to \c{/var/tmp},
+    the file dialog will change to \c{/var/tmp} after entering \c{/usr/tmp}. If
+    \a options includes DontResolveSymlinks the file dialog will treat symlinks
+    as regular directories.
+
+    On Symbian^3 the parameters \a filter and \a selectedFilter have no
+    meaning. The \a options parameter is only used to define if the native file
+    dialog is used.
+
+    \warning Do not delete \a parent during the execution of the dialog. If you
+    want to do this, you should create the dialog yourself using one of the
+    QFileDialog constructors.
+
+    \sa getOpenFileName(), getOpenFileNames(), getExistingDirectory()
+*/
+QString QFileDialog::getSaveFileName(QWidget *parent,
+                                     const QString &caption,
+                                     const QString &dir,
+                                     const QString &filter,
+                                     QString *selectedFilter,
+                                     Options options)
+{
+    if (qt_filedialog_save_filename_hook && !(options & DontUseNativeDialog))
+        return qt_filedialog_save_filename_hook(parent, caption, dir, filter, selectedFilter, options);
+#if defined(Q_WS_S60)
+    if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
+        return qtSymbianGetSaveFileName(caption, dir);
+#endif
+    QFileDialogArgs args;
+    args.parent = parent;
+    args.caption = caption;
+    args.directory = QFileDialogPrivate::workingDirectory(dir);
+    args.selection = QFileDialogPrivate::initialSelection(dir);
+    args.filter = filter;
+    args.mode = AnyFile;
+    args.options = options;
+
+#if defined(Q_WS_WIN)
+    if (qt_use_native_dialogs && !(args.options & DontUseNativeDialog)) {
+        return qt_win_get_save_file_name(args, &(args.directory), selectedFilter);
+    }
+#endif
+
+    // create a qt dialog
+    QFileDialog dialog(args);
+    dialog.setAcceptMode(AcceptSave);
+    if (selectedFilter && !selectedFilter->isEmpty())
+        dialog.selectNameFilter(*selectedFilter);
+    if (dialog.exec() == QDialog::Accepted) {
+        if (selectedFilter)
+            *selectedFilter = dialog.selectedFilter();
+        return dialog.selectedFiles().value(0);
+    }
+
+    return QString();
+}
+
+/*!
+    This is a convenience static function that will return an existing
+    directory selected by the user.
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 12
+
+    This function creates a modal file dialog with the given \a parent widget.
+    If \a parent is not 0, the dialog will be shown centered over the parent
+    widget.
+
+    The dialog's working directory is set to \a dir, and the caption is set to
+    \a caption. Either of these may be an empty string in which case the
+    current directory and a default caption will be used respectively.
+
+    The \a options argument holds various options about how to run the dialog,
+    see the QFileDialog::Option enum for more information on the flags you can
+    pass. To ensure a native file dialog, \l{QFileDialog::}{ShowDirsOnly} must
+    be set.
+
+    On Windows, Mac OS X and Symbian^3, this static function will use the
+    native file dialog and not a QFileDialog. On Windows CE, if the device has
+    no native file dialog, a QFileDialog will be used.
+
+    On Unix/X11, the normal behavior of the file dialog is to resolve and
+    follow symlinks. For example, if \c{/usr/tmp} is a symlink to \c{/var/tmp},
+    the file dialog will change to \c{/var/tmp} after entering \c{/usr/tmp}. If
+    \a options includes DontResolveSymlinks, the file dialog will treat
+    symlinks as regular directories.
+
+    On Windows the dialog will spin a blocking modal event loop that will not
+    dispatch any QTimers, and if \a parent is not 0 then it will position the
+    dialog just below the parent's title bar.
+
+    On Symbian^3 the \a options parameter is only used to define if the native
+    file dialog is used.
+
+    \warning Do not delete \a parent during the execution of the dialog. If you
+    want to do this, you should create the dialog yourself using one of the
+    QFileDialog constructors.
+
+    \sa getOpenFileName(), getOpenFileNames(), getSaveFileName()
+*/
+QString QFileDialog::getExistingDirectory(QWidget *parent,
+                                          const QString &caption,
+                                          const QString &dir,
+                                          Options options)
+{
+    if (qt_filedialog_existing_directory_hook && !(options & DontUseNativeDialog))
+        return qt_filedialog_existing_directory_hook(parent, caption, dir, options);
+#if defined(Q_WS_S60)
+    if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
+        return qtSymbianGetExistingDirectory(caption, dir);
+#endif
+    QFileDialogArgs args;
+    args.parent = parent;
+    args.caption = caption;
+    args.directory = QFileDialogPrivate::workingDirectory(dir);
+    args.mode = (options & ShowDirsOnly ? DirectoryOnly : Directory);
+    args.options = options;
+
+#if defined(Q_WS_WIN)
+    if (qt_use_native_dialogs && !(args.options & DontUseNativeDialog) && (options & ShowDirsOnly)
+#if defined(Q_WS_WINCE)
+        && qt_priv_ptr_valid
+#endif
+        ) {
+        return qt_win_get_existing_directory(args);
+    }
+#endif
+
+    // create a qt dialog
+    QFileDialog dialog(args);
+    if (dialog.exec() == QDialog::Accepted) {
+        return dialog.selectedFiles().value(0);
+    }
+    return QString();
+}
+
+inline static QString _qt_get_directory(const QString &path)
+{
+    QFileInfo info = QFileInfo(QDir::current(), path);
+    if (info.exists() && info.isDir())
+        return QDir::cleanPath(info.absoluteFilePath());
+    info.setFile(info.absolutePath());
+    if (info.exists() && info.isDir())
+        return info.absoluteFilePath();
+    return QString();
+}
+/*
+    Get the initial directory path
+
+    \sa initialSelection()
+ */
+QString QFileDialogPrivate::workingDirectory(const QString &path)
+{
+    if (!path.isEmpty()) {
+        QString directory = _qt_get_directory(path);
+        if (!directory.isEmpty())
+            return directory;
+    }
+    QString directory = _qt_get_directory(*lastVisitedDir());
+    if (!directory.isEmpty())
+        return directory;
+    return QDir::currentPath();
+}
+
+/*
+    Get the initial selection given a path.  The initial directory
+    can contain both the initial directory and initial selection
+    /home/user/foo.txt
+
+    \sa workingDirectory()
+ */
+QString QFileDialogPrivate::initialSelection(const QString &path)
+{
+    if (!path.isEmpty()) {
+        QFileInfo info(path);
+        if (!info.isDir())
+            return info.fileName();
+    }
+    return QString();
+}
+
+/*!
+ \reimp
+*/
+void QFileDialog::done(int result)
+{
+    Q_D(QFileDialog);
+
+    QDialog::done(result);
+
+    if (d->receiverToDisconnectOnClose) {
+        disconnect(this, d->signalToDisconnectOnClose,
+                   d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
+        d->receiverToDisconnectOnClose = 0;
+    }
+    d->memberToDisconnectOnClose.clear();
+    d->signalToDisconnectOnClose.clear();
+}
+
+/*!
+ \reimp
+*/
+void QFileDialog::accept()
+{
+    Q_D(QFileDialog);
+    QStringList files = selectedFiles();
+    if (files.isEmpty())
+        return;
+    if (d->nativeDialogInUse){
+        d->emitFilesSelected(files);
+        QDialog::accept();
+        return;
+    }
+
+    QString lineEditText = d->lineEdit()->text();
+    // "hidden feature" type .. and then enter, and it will move up a dir
+    // special case for ".."
+    if (lineEditText == QLatin1String("..")) {
+        d->_q_navigateToParent();
+        bool block = d->qFileDialogUi->fileNameEdit->blockSignals(true);
+        d->lineEdit()->selectAll();
+        d->qFileDialogUi->fileNameEdit->blockSignals(block);
+        return;
+    }
+
+    switch (d->fileMode) {
+    case DirectoryOnly:
+    case Directory: {
+        QString fn = files.first();
+        QFileInfo info(fn);
+        if (!info.exists())
+            info = QFileInfo(d->getEnvironmentVariable(fn));
+        if (!info.exists()) {
+#ifndef QT_NO_MESSAGEBOX
+            QString message = tr("%1\nDirectory not found.\nPlease verify the "
+                                          "correct directory name was given.");
+            QMessageBox::warning(this, windowTitle(), message.arg(info.fileName()));
+#endif // QT_NO_MESSAGEBOX
+            return;
+        }
+        if (info.isDir()) {
+            d->emitFilesSelected(files);
+            QDialog::accept();
+        }
+        return;
+    }
+
+    case AnyFile: {
+        QString fn = files.first();
+        QFileInfo info(fn);
+        if (info.isDir()) {
+            setDirectory(info.absoluteFilePath());
+            return;
+        }
+
+        if (!info.exists()) {
+            int maxNameLength = d->maxNameLength(info.path());
+            if (maxNameLength >= 0 && info.fileName().length() > maxNameLength)
+                return;
+        }
+
+        // check if we have to ask for permission to overwrite the file
+        if (!info.exists() || !confirmOverwrite() || acceptMode() == AcceptOpen) {
+            d->emitFilesSelected(QStringList(fn));
+            QDialog::accept();
+#ifndef QT_NO_MESSAGEBOX
+        } else {
+            if (QMessageBox::warning(this, windowTitle(),
+                                     tr("%1 already exists.\nDo you want to replace it?")
+                                     .arg(info.fileName()),
+                                     QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
+                    == QMessageBox::Yes) {
+                d->emitFilesSelected(QStringList(fn));
+                QDialog::accept();
+            }
+#endif
+        }
+        return;
+    }
+
+    case ExistingFile:
+    case ExistingFiles:
+        for (int i = 0; i < files.count(); ++i) {
+            QFileInfo info(files.at(i));
+            if (!info.exists())
+                info = QFileInfo(d->getEnvironmentVariable(files.at(i)));
+            if (!info.exists()) {
+#ifndef QT_NO_MESSAGEBOX
+                QString message = tr("%1\nFile not found.\nPlease verify the "
+                                     "correct file name was given.");
+                QMessageBox::warning(this, windowTitle(), message.arg(info.fileName()));
+#endif // QT_NO_MESSAGEBOX
+                return;
+            }
+            if (info.isDir()) {
+                setDirectory(info.absoluteFilePath());
+                d->lineEdit()->clear();
+                return;
+            }
+        }
+        d->emitFilesSelected(files);
+        QDialog::accept();
+        return;
+    }
+}
+
+/*!
+    \internal
+
+    Create widgets, layout and set default values
+*/
+void QFileDialogPrivate::init(const QString &directory, const QString &nameFilter,
+                              const QString &caption)
+{
+    Q_Q(QFileDialog);
+    if (!caption.isEmpty()) {
+        useDefaultCaption = false;
+        setWindowTitle = caption;
+        q->setWindowTitle(caption);
+    }
+
+    createWidgets();
+    createMenuActions();
+    retranslateStrings();
+    q->setFileMode(fileMode);
+
+#ifndef QT_NO_SETTINGS
+    QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+    settings.beginGroup(QLatin1String("Qt"));
+    if (!directory.isEmpty())
+        setLastVisitedDirectory(workingDirectory(directory));
+    q->restoreState(settings.value(QLatin1String("filedialog")).toByteArray());
+#endif
+
+#if defined(Q_EMBEDDED_SMALLSCREEN)
+    qFileDialogUi->lookInLabel->setVisible(false);
+    qFileDialogUi->fileNameLabel->setVisible(false);
+    qFileDialogUi->fileTypeLabel->setVisible(false);
+    qFileDialogUi->sidebar->hide();
+#endif
+    // Default case
+    if (!nameFilter.isEmpty())
+        q->setNameFilter(nameFilter);
+    q->setAcceptMode(QFileDialog::AcceptOpen);
+    q->setDirectory(workingDirectory(directory));
+    q->selectFile(initialSelection(directory));
+
+    _q_updateOkButton();
+    q->resize(q->sizeHint());
+}
+
+/*!
+    \internal
+
+    Create the widgets, set properties and connections
+*/
+void QFileDialogPrivate::createWidgets()
+{
+    Q_Q(QFileDialog);
+    model = new QFileSystemModel(q);
+    model->setObjectName(QLatin1String("qt_filesystem_model"));
+#ifdef Q_WS_MAC
+    model->setNameFilterDisables(true);
+#else
+    model->setNameFilterDisables(false);
+#endif
+    model->d_func()->disableRecursiveSort = true;
+    QFileDialog::connect(model, SIGNAL(fileRenamed(QString,QString,QString)), q, SLOT(_q_fileRenamed(QString,QString,QString)));
+    QFileDialog::connect(model, SIGNAL(rootPathChanged(QString)),
+            q, SLOT(_q_pathChanged(QString)));
+    QFileDialog::connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
+            q, SLOT(_q_rowsInserted(QModelIndex)));
+    model->setReadOnly(false);
+
+    qFileDialogUi.reset(new Ui_QFileDialog());
+    qFileDialogUi->setupUi(q);
+
+    QList<QUrl> initialBookmarks;
+    initialBookmarks << QUrl::fromLocalFile(QLatin1String(""))
+                     << QUrl::fromLocalFile(QDir::homePath());
+    qFileDialogUi->sidebar->init(model, initialBookmarks);
+    QFileDialog::connect(qFileDialogUi->sidebar, SIGNAL(goToUrl(QUrl)),
+                         q, SLOT(_q_goToUrl(QUrl)));
+
+    QObject::connect(qFileDialogUi->buttonBox, SIGNAL(accepted()), q, SLOT(accept()));
+    QObject::connect(qFileDialogUi->buttonBox, SIGNAL(rejected()), q, SLOT(reject()));
+
+
+    qFileDialogUi->lookInCombo->init(this);
+    QObject::connect(qFileDialogUi->lookInCombo, SIGNAL(activated(QString)), q, SLOT(_q_goToDirectory(QString)));
+
+    qFileDialogUi->lookInCombo->setInsertPolicy(QComboBox::NoInsert);
+    qFileDialogUi->lookInCombo->setDuplicatesEnabled(false);
+
+    // filename
+    qFileDialogUi->fileNameEdit->init(this);
+#ifndef QT_NO_SHORTCUT
+    qFileDialogUi->fileNameLabel->setBuddy(qFileDialogUi->fileNameEdit);
+#endif
+#ifndef QT_NO_FSCOMPLETER
+    completer = new QFSCompleter(model, q);
+    qFileDialogUi->fileNameEdit->setCompleter(completer);
+#endif // QT_NO_FSCOMPLETER
+    QObject::connect(qFileDialogUi->fileNameEdit, SIGNAL(textChanged(QString)),
+            q, SLOT(_q_autoCompleteFileName(QString)));
+    QObject::connect(qFileDialogUi->fileNameEdit, SIGNAL(textChanged(QString)),
+                     q, SLOT(_q_updateOkButton()));
+
+    QObject::connect(qFileDialogUi->fileNameEdit, SIGNAL(returnPressed()), q, SLOT(accept()));
+
+    // filetype
+    qFileDialogUi->fileTypeCombo->setDuplicatesEnabled(false);
+    qFileDialogUi->fileTypeCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
+    qFileDialogUi->fileTypeCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+    QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(int)),
+                     q, SLOT(_q_useNameFilter(int)));
+    QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(QString)),
+                     q, SIGNAL(filterSelected(QString)));
+
+    qFileDialogUi->listView->init(this);
+    qFileDialogUi->listView->setModel(model);
+    QObject::connect(qFileDialogUi->listView, SIGNAL(activated(QModelIndex)),
+                     q, SLOT(_q_enterDirectory(QModelIndex)));
+    QObject::connect(qFileDialogUi->listView, SIGNAL(customContextMenuRequested(QPoint)),
+                    q, SLOT(_q_showContextMenu(QPoint)));
+#ifndef QT_NO_SHORTCUT
+    QShortcut *shortcut = new QShortcut(qFileDialogUi->listView);
+    shortcut->setKey(QKeySequence(QLatin1String("Delete")));
+    QObject::connect(shortcut, SIGNAL(activated()), q, SLOT(_q_deleteCurrent()));
+#endif
+
+    qFileDialogUi->treeView->init(this);
+    qFileDialogUi->treeView->setModel(model);
+    QHeaderView *treeHeader = qFileDialogUi->treeView->header();
+    QFontMetrics fm(q->font());
+    treeHeader->resizeSection(0, fm.width(QLatin1String("wwwwwwwwwwwwwwwwwwwwwwwwww")));
+    treeHeader->resizeSection(1, fm.width(QLatin1String("128.88 GB")));
+    treeHeader->resizeSection(2, fm.width(QLatin1String("mp3Folder")));
+    treeHeader->resizeSection(3, fm.width(QLatin1String("10/29/81 02:02PM")));
+    treeHeader->setContextMenuPolicy(Qt::ActionsContextMenu);
+
+    QActionGroup *showActionGroup = new QActionGroup(q);
+    showActionGroup->setExclusive(false);
+    QObject::connect(showActionGroup, SIGNAL(triggered(QAction*)),
+                     q, SLOT(_q_showHeader(QAction*)));;
+
+    QAbstractItemModel *abstractModel = model;
+#ifndef QT_NO_PROXYMODEL
+    if (proxyModel)
+        abstractModel = proxyModel;
+#endif
+    for (int i = 1; i < abstractModel->columnCount(QModelIndex()); ++i) {
+        QAction *showHeader = new QAction(showActionGroup);
+        showHeader->setCheckable(true);
+        showHeader->setChecked(true);
+        treeHeader->addAction(showHeader);
+    }
+
+    QScopedPointer<QItemSelectionModel> selModel(qFileDialogUi->treeView->selectionModel());
+    qFileDialogUi->treeView->setSelectionModel(qFileDialogUi->listView->selectionModel());
+
+    QObject::connect(qFileDialogUi->treeView, SIGNAL(activated(QModelIndex)),
+                     q, SLOT(_q_enterDirectory(QModelIndex)));
+    QObject::connect(qFileDialogUi->treeView, SIGNAL(customContextMenuRequested(QPoint)),
+                     q, SLOT(_q_showContextMenu(QPoint)));
+#ifndef QT_NO_SHORTCUT
+    shortcut = new QShortcut(qFileDialogUi->treeView);
+    shortcut->setKey(QKeySequence(QLatin1String("Delete")));
+    QObject::connect(shortcut, SIGNAL(activated()), q, SLOT(_q_deleteCurrent()));
+#endif
+
+    // Selections
+    QItemSelectionModel *selections = qFileDialogUi->listView->selectionModel();
+    QObject::connect(selections, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
+                     q, SLOT(_q_selectionChanged()));
+    QObject::connect(selections, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
+                     q, SLOT(_q_currentChanged(QModelIndex)));
+    qFileDialogUi->splitter->setStretchFactor(qFileDialogUi->splitter->indexOf(qFileDialogUi->splitter->widget(1)), QSizePolicy::Expanding);
+
+    createToolButtons();
+}
+
+void QFileDialogPrivate::_q_showHeader(QAction *action)
+{
+    Q_Q(QFileDialog);
+    QActionGroup *actionGroup = qobject_cast<QActionGroup*>(q->sender());
+    qFileDialogUi->treeView->header()->setSectionHidden(actionGroup->actions().indexOf(action) + 1, !action->isChecked());
+}
+
+#ifndef QT_NO_PROXYMODEL
+/*!
+    \since 4.3
+
+    Sets the model for the views to the given \a proxyModel.  This is useful if you
+    want to modify the underlying model; for example, to add columns, filter
+    data or add drives.
+
+    Any existing proxy model will be removed, but not deleted.  The file dialog
+    will take ownership of the \a proxyModel.
+
+    \sa proxyModel()
+*/
+void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel)
+{
+    Q_D(QFileDialog);
+    if ((!proxyModel && !d->proxyModel)
+        || (proxyModel == d->proxyModel))
+        return;
+
+    QModelIndex idx = d->rootIndex();
+    if (d->proxyModel) {
+        disconnect(d->proxyModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
+            this, SLOT(_q_rowsInserted(QModelIndex)));
+    } else {
+        disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
+            this, SLOT(_q_rowsInserted(QModelIndex)));
+    }
+
+    if (proxyModel != 0) {
+        proxyModel->setParent(this);
+        d->proxyModel = proxyModel;
+        proxyModel->setSourceModel(d->model);
+        d->qFileDialogUi->listView->setModel(d->proxyModel);
+        d->qFileDialogUi->treeView->setModel(d->proxyModel);
+#ifndef QT_NO_FSCOMPLETER
+        d->completer->setModel(d->proxyModel);
+        d->completer->proxyModel = d->proxyModel;
+#endif
+        connect(d->proxyModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
+            this, SLOT(_q_rowsInserted(QModelIndex)));
+    } else {
+        d->proxyModel = 0;
+        d->qFileDialogUi->listView->setModel(d->model);
+        d->qFileDialogUi->treeView->setModel(d->model);
+#ifndef QT_NO_FSCOMPLETER
+        d->completer->setModel(d->model);
+        d->completer->sourceModel = d->model;
+        d->completer->proxyModel = 0;
+#endif
+        connect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
+            this, SLOT(_q_rowsInserted(QModelIndex)));
+    }
+    QScopedPointer<QItemSelectionModel> selModel(d->qFileDialogUi->treeView->selectionModel());
+    d->qFileDialogUi->treeView->setSelectionModel(d->qFileDialogUi->listView->selectionModel());
+
+    d->setRootIndex(idx);
+
+    // reconnect selection
+    QItemSelectionModel *selections = d->qFileDialogUi->listView->selectionModel();
+    QObject::connect(selections, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
+                     this, SLOT(_q_selectionChanged()));
+    QObject::connect(selections, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
+                     this, SLOT(_q_currentChanged(QModelIndex)));
+}
+
+/*!
+    Returns the proxy model used by the file dialog.  By default no proxy is set.
+
+    \sa setProxyModel()
+*/
+QAbstractProxyModel *QFileDialog::proxyModel() const
+{
+    Q_D(const QFileDialog);
+    return d->proxyModel;
+}
+#endif // QT_NO_PROXYMODEL
+
+/*!
+    \internal
+
+    Create tool buttons, set properties and connections
+*/
+void QFileDialogPrivate::createToolButtons()
+{
+    Q_Q(QFileDialog);
+    qFileDialogUi->backButton->setIcon(q->style()->standardIcon(QStyle::SP_ArrowBack, 0, q));
+    qFileDialogUi->backButton->setAutoRaise(true);
+    qFileDialogUi->backButton->setEnabled(false);
+    QObject::connect(qFileDialogUi->backButton, SIGNAL(clicked()), q, SLOT(_q_navigateBackward()));
+
+    qFileDialogUi->forwardButton->setIcon(q->style()->standardIcon(QStyle::SP_ArrowForward, 0, q));
+    qFileDialogUi->forwardButton->setAutoRaise(true);
+    qFileDialogUi->forwardButton->setEnabled(false);
+    QObject::connect(qFileDialogUi->forwardButton, SIGNAL(clicked()), q, SLOT(_q_navigateForward()));
+
+    qFileDialogUi->toParentButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogToParent, 0, q));
+    qFileDialogUi->toParentButton->setAutoRaise(true);
+    qFileDialogUi->toParentButton->setEnabled(false);
+    QObject::connect(qFileDialogUi->toParentButton, SIGNAL(clicked()), q, SLOT(_q_navigateToParent()));
+
+    qFileDialogUi->listModeButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogListView, 0, q));
+    qFileDialogUi->listModeButton->setAutoRaise(true);
+    qFileDialogUi->listModeButton->setDown(true);
+    QObject::connect(qFileDialogUi->listModeButton, SIGNAL(clicked()), q, SLOT(_q_showListView()));
+
+    qFileDialogUi->detailModeButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogDetailedView, 0, q));
+    qFileDialogUi->detailModeButton->setAutoRaise(true);
+    QObject::connect(qFileDialogUi->detailModeButton, SIGNAL(clicked()), q, SLOT(_q_showDetailsView()));
+
+    QSize toolSize(qFileDialogUi->fileNameEdit->sizeHint().height(), qFileDialogUi->fileNameEdit->sizeHint().height());
+    qFileDialogUi->backButton->setFixedSize(toolSize);
+    qFileDialogUi->listModeButton->setFixedSize(toolSize);
+    qFileDialogUi->detailModeButton->setFixedSize(toolSize);
+    qFileDialogUi->forwardButton->setFixedSize(toolSize);
+    qFileDialogUi->toParentButton->setFixedSize(toolSize);
+
+    qFileDialogUi->newFolderButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogNewFolder, 0, q));
+    qFileDialogUi->newFolderButton->setFixedSize(toolSize);
+    qFileDialogUi->newFolderButton->setAutoRaise(true);
+    qFileDialogUi->newFolderButton->setEnabled(false);
+    QObject::connect(qFileDialogUi->newFolderButton, SIGNAL(clicked()), q, SLOT(_q_createDirectory()));
+}
+
+/*!
+    \internal
+
+    Create actions which will be used in the right click.
+*/
+void QFileDialogPrivate::createMenuActions()
+{
+    Q_Q(QFileDialog);
+
+    QAction *goHomeAction =  new QAction(q);
+#ifndef QT_NO_SHORTCUT
+    goHomeAction->setShortcut(Qt::CTRL + Qt::Key_H + Qt::SHIFT);
+#endif
+    QObject::connect(goHomeAction, SIGNAL(triggered()), q, SLOT(_q_goHome()));
+    q->addAction(goHomeAction);
+
+    // ### TODO add Desktop & Computer actions
+
+    QAction *goToParent =  new QAction(q);
+    goToParent->setObjectName(QLatin1String("qt_goto_parent_action"));
+#ifndef QT_NO_SHORTCUT
+    goToParent->setShortcut(Qt::CTRL + Qt::UpArrow);
+#endif
+    QObject::connect(goToParent, SIGNAL(triggered()), q, SLOT(_q_navigateToParent()));
+    q->addAction(goToParent);
+
+    renameAction = new QAction(q);
+    renameAction->setEnabled(false);
+    renameAction->setObjectName(QLatin1String("qt_rename_action"));
+    QObject::connect(renameAction, SIGNAL(triggered()), q, SLOT(_q_renameCurrent()));
+
+    deleteAction = new QAction(q);
+    deleteAction->setEnabled(false);
+    deleteAction->setObjectName(QLatin1String("qt_delete_action"));
+    QObject::connect(deleteAction, SIGNAL(triggered()), q, SLOT(_q_deleteCurrent()));
+
+    showHiddenAction = new QAction(q);
+    showHiddenAction->setObjectName(QLatin1String("qt_show_hidden_action"));
+    showHiddenAction->setCheckable(true);
+    QObject::connect(showHiddenAction, SIGNAL(triggered()), q, SLOT(_q_showHidden()));
+
+    newFolderAction = new QAction(q);
+    newFolderAction->setObjectName(QLatin1String("qt_new_folder_action"));
+    QObject::connect(newFolderAction, SIGNAL(triggered()), q, SLOT(_q_createDirectory()));
+}
+
+void QFileDialogPrivate::_q_goHome()
+{
+    Q_Q(QFileDialog);
+    q->setDirectory(QDir::homePath());
+}
+
+/*!
+    \internal
+
+    Update history with new path, buttons, and combo
+*/
+void QFileDialogPrivate::_q_pathChanged(const QString &newPath)
+{
+    Q_Q(QFileDialog);
+    QDir dir(model->rootDirectory());
+    qFileDialogUi->toParentButton->setEnabled(dir.exists());
+    qFileDialogUi->sidebar->selectUrl(QUrl::fromLocalFile(newPath));
+    q->setHistory(qFileDialogUi->lookInCombo->history());
+
+    if (currentHistoryLocation < 0 || currentHistory.value(currentHistoryLocation) != QDir::toNativeSeparators(newPath)) {
+        while (currentHistoryLocation >= 0 && currentHistoryLocation + 1 < currentHistory.count()) {
+            currentHistory.removeLast();
+        }
+        currentHistory.append(QDir::toNativeSeparators(newPath));
+        ++currentHistoryLocation;
+    }
+    qFileDialogUi->forwardButton->setEnabled(currentHistory.size() - currentHistoryLocation > 1);
+    qFileDialogUi->backButton->setEnabled(currentHistoryLocation > 0);
+}
+
+/*!
+    \internal
+
+    Navigates to the last directory viewed in the dialog.
+*/
+void QFileDialogPrivate::_q_navigateBackward()
+{
+    Q_Q(QFileDialog);
+    if (!currentHistory.isEmpty() && currentHistoryLocation > 0) {
+        --currentHistoryLocation;
+        QString previousHistory = currentHistory.at(currentHistoryLocation);
+        q->setDirectory(previousHistory);
+    }
+}
+
+/*!
+    \internal
+
+    Navigates to the last directory viewed in the dialog.
+*/
+void QFileDialogPrivate::_q_navigateForward()
+{
+    Q_Q(QFileDialog);
+    if (!currentHistory.isEmpty() && currentHistoryLocation < currentHistory.size() - 1) {
+        ++currentHistoryLocation;
+        QString nextHistory = currentHistory.at(currentHistoryLocation);
+        q->setDirectory(nextHistory);
+    }
+}
+
+/*!
+    \internal
+
+    Navigates to the parent directory of the currently displayed directory
+    in the dialog.
+*/
+void QFileDialogPrivate::_q_navigateToParent()
+{
+    Q_Q(QFileDialog);
+    QDir dir(model->rootDirectory());
+    QString newDirectory;
+    if (dir.isRoot()) {
+        newDirectory = model->myComputer().toString();
+    } else {
+        dir.cdUp();
+        newDirectory = dir.absolutePath();
+    }
+    q->setDirectory(newDirectory);
+    emit q->directoryEntered(newDirectory);
+}
+
+/*!
+    \internal
+
+    Creates a new directory, first asking the user for a suitable name.
+*/
+void QFileDialogPrivate::_q_createDirectory()
+{
+    Q_Q(QFileDialog);
+    qFileDialogUi->listView->clearSelection();
+
+    QString newFolderString = QFileDialog::tr("New Folder");
+    QString folderName = newFolderString;
+    QString prefix = q->directory().absolutePath() + QDir::separator();
+    if (QFile::exists(prefix + folderName)) {
+        qlonglong suffix = 2;
+        while (QFile::exists(prefix + folderName)) {
+            folderName = newFolderString + QString::number(suffix++);
+        }
+    }
+
+    QModelIndex parent = rootIndex();
+    QModelIndex index = model->mkdir(parent, folderName);
+    if (!index.isValid())
+        return;
+
+    index = select(index);
+    if (index.isValid()) {
+        qFileDialogUi->treeView->setCurrentIndex(index);
+        currentView()->edit(index);
+    }
+}
+
+void QFileDialogPrivate::_q_showListView()
+{
+    qFileDialogUi->listModeButton->setDown(true);
+    qFileDialogUi->detailModeButton->setDown(false);
+    qFileDialogUi->treeView->hide();
+    qFileDialogUi->listView->show();
+    qFileDialogUi->stackedWidget->setCurrentWidget(qFileDialogUi->listView->parentWidget());
+    qFileDialogUi->listView->doItemsLayout();
+}
+
+void QFileDialogPrivate::_q_showDetailsView()
+{
+    qFileDialogUi->listModeButton->setDown(false);
+    qFileDialogUi->detailModeButton->setDown(true);
+    qFileDialogUi->listView->hide();
+    qFileDialogUi->treeView->show();
+    qFileDialogUi->stackedWidget->setCurrentWidget(qFileDialogUi->treeView->parentWidget());
+    qFileDialogUi->treeView->doItemsLayout();
+}
+
+/*!
+    \internal
+
+    Show the context menu for the file/dir under position
+*/
+void QFileDialogPrivate::_q_showContextMenu(const QPoint &position)
+{
+#ifdef QT_NO_MENU
+    Q_UNUSED(position);
+#else
+    Q_Q(QFileDialog);
+    QAbstractItemView *view = 0;
+    if (q->viewMode() == QFileDialog::Detail)
+        view = qFileDialogUi->treeView;
+    else
+        view = qFileDialogUi->listView;
+    QModelIndex index = view->indexAt(position);
+    index = mapToSource(index.sibling(index.row(), 0));
+
+    QMenu menu(view);
+    if (index.isValid()) {
+        // file context menu
+        QFile::Permissions p(index.parent().data(QFileSystemModel::FilePermissions).toInt());
+        renameAction->setEnabled(p & QFile::WriteUser);
+        menu.addAction(renameAction);
+        deleteAction->setEnabled(p & QFile::WriteUser);
+        menu.addAction(deleteAction);
+        menu.addSeparator();
+    }
+    menu.addAction(showHiddenAction);
+    if (qFileDialogUi->newFolderButton->isVisible()) {
+        newFolderAction->setEnabled(qFileDialogUi->newFolderButton->isEnabled());
+        menu.addAction(newFolderAction);
+    }
+    menu.exec(view->viewport()->mapToGlobal(position));
+#endif // QT_NO_MENU
+}
+
+/*!
+    \internal
+*/
+void QFileDialogPrivate::_q_renameCurrent()
+{
+    Q_Q(QFileDialog);
+    QModelIndex index = qFileDialogUi->listView->currentIndex();
+    index = index.sibling(index.row(), 0);
+    if (q->viewMode() == QFileDialog::List)
+        qFileDialogUi->listView->edit(index);
+    else
+        qFileDialogUi->treeView->edit(index);
+}
+
+bool QFileDialogPrivate::removeDirectory(const QString &path)
+{
+    QModelIndex modelIndex = model->index(path);
+    return model->remove(modelIndex);
+}
+
+/*!
+    \internal
+
+    Deletes the currently selected item in the dialog.
+*/
+void QFileDialogPrivate::_q_deleteCurrent()
+{
+    if (model->isReadOnly())
+        return;
+
+    QModelIndexList list = qFileDialogUi->listView->selectionModel()->selectedRows();
+    for (int i = list.count() - 1; i >= 0; --i) {
+        QModelIndex index = list.at(i);
+        if (index == qFileDialogUi->listView->rootIndex())
+            continue;
+
+        index = mapToSource(index.sibling(index.row(), 0));
+        if (!index.isValid())
+            continue;
+
+    QString fileName = index.data(QFileSystemModel::FileNameRole).toString();
+    QString filePath = index.data(QFileSystemModel::FilePathRole).toString();
+    bool isDir = model->isDir(index);
+
+    QFile::Permissions p(index.parent().data(QFileSystemModel::FilePermissions).toInt());
+#ifndef QT_NO_MESSAGEBOX
+    Q_Q(QFileDialog);
+    if (!(p & QFile::WriteUser) && (QMessageBox::warning(q_func(), q_func()->windowTitle(),
+                                QFileDialog::tr("'%1' is write protected.\nDo you want to delete it anyway?")
+                                .arg(fileName),
+                                 QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No))
+        return;
+    else if (QMessageBox::warning(q_func(), q_func()->windowTitle(),
+                                  QFileDialog::tr("Are sure you want to delete '%1'?")
+                                  .arg(fileName),
+                                  QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No)
+        return;
+
+#else
+    if (!(p & QFile::WriteUser))
+        return;
+#endif // QT_NO_MESSAGEBOX
+
+        // the event loop has run, we can NOT reuse index because the model might have removed it.
+        if (isDir) {
+            if (!removeDirectory(filePath)) {
+#ifndef QT_NO_MESSAGEBOX
+            QMessageBox::warning(q, q->windowTitle(),
+                                QFileDialog::tr("Could not delete directory."));
+#endif
+            }
+        } else {
+            model->remove(index);
+        }
+    }
+}
+
+void QFileDialogPrivate::_q_autoCompleteFileName(const QString &text)
+{
+    if (text.startsWith(QLatin1String("//")) || text.startsWith(QLatin1Char('\\'))) {
+        qFileDialogUi->listView->selectionModel()->clearSelection();
+        return;
+    }
+
+    QStringList multipleFiles = typedFiles();
+    if (multipleFiles.count() > 0) {
+        QModelIndexList oldFiles = qFileDialogUi->listView->selectionModel()->selectedRows();
+        QModelIndexList newFiles;
+        for (int i = 0; i < multipleFiles.count(); ++i) {
+            QModelIndex idx = model->index(multipleFiles.at(i));
+            if (oldFiles.contains(idx))
+                oldFiles.removeAll(idx);
+            else
+                newFiles.append(idx);
+        }
+        for (int i = 0; i < newFiles.count(); ++i)
+            select(newFiles.at(i));
+        if (lineEdit()->hasFocus())
+            for (int i = 0; i < oldFiles.count(); ++i)
+                qFileDialogUi->listView->selectionModel()->select(oldFiles.at(i),
+                    QItemSelectionModel::Toggle | QItemSelectionModel::Rows);
+    }
+}
+
+/*!
+    \internal
+*/
+void QFileDialogPrivate::_q_updateOkButton()
+{
+    Q_Q(QFileDialog);
+    QPushButton *button =  qFileDialogUi->buttonBox->button((acceptMode == QFileDialog::AcceptOpen)
+                    ? QDialogButtonBox::Open : QDialogButtonBox::Save);
+    if (!button)
+        return;
+
+    bool enableButton = true;
+    bool isOpenDirectory = false;
+
+    QStringList files = q->selectedFiles();
+    QString lineEditText = lineEdit()->text();
+
+    if (lineEditText.startsWith(QLatin1String("//")) || lineEditText.startsWith(QLatin1Char('\\'))) {
+        button->setEnabled(true);
+        if (acceptMode == QFileDialog::AcceptSave)
+            button->setText(acceptLabel);
+        return;
+    }
+
+    if (files.isEmpty()) {
+        enableButton = false;
+    } else if (lineEditText == QLatin1String("..")) {
+        isOpenDirectory = true;
+    } else {
+        switch (fileMode) {
+        case QFileDialog::DirectoryOnly:
+        case QFileDialog::Directory: {
+            QString fn = files.first();
+            QModelIndex idx = model->index(fn);
+            if (!idx.isValid())
+                idx = model->index(getEnvironmentVariable(fn));
+            if (!idx.isValid() || !model->isDir(idx))
+                enableButton = false;
+            break;
+        }
+        case QFileDialog::AnyFile: {
+            QString fn = files.first();
+            QFileInfo info(fn);
+            QModelIndex idx = model->index(fn);
+            QString fileDir;
+            QString fileName;
+            if (info.isDir()) {
+                fileDir = info.canonicalFilePath();
+            } else {
+                fileDir = fn.mid(0, fn.lastIndexOf(QLatin1Char('/')));
+                fileName = fn.mid(fileDir.length() + 1);
+            }
+            if (lineEditText.contains(QLatin1String(".."))) {
+                fileDir = info.canonicalFilePath();
+                fileName = info.fileName();
+            }
+
+            if (fileDir == q->directory().canonicalPath() && fileName.isEmpty()) {
+                enableButton = false;
+                break;
+            }
+            if (idx.isValid() && model->isDir(idx)) {
+                isOpenDirectory = true;
+                enableButton = true;
+                break;
+            }
+            if (!idx.isValid()) {
+                int maxLength = maxNameLength(fileDir);
+                enableButton = maxLength < 0 || fileName.length() <= maxLength;
+            }
+            break;
+        }
+        case QFileDialog::ExistingFile:
+        case QFileDialog::ExistingFiles:
+            for (int i = 0; i < files.count(); ++i) {
+                QModelIndex idx = model->index(files.at(i));
+                if (!idx.isValid())
+                    idx = model->index(getEnvironmentVariable(files.at(i)));
+                if (!idx.isValid()) {
+                    enableButton = false;
+                    break;
+                }
+                if (idx.isValid() && model->isDir(idx)) {
+                    isOpenDirectory = true;
+                    break;
+                }
+            }
+            break;
+        default:
+            break;
+        }
+    }
+
+    button->setEnabled(enableButton);
+    if (acceptMode == QFileDialog::AcceptSave)
+        button->setText(isOpenDirectory ? QFileDialog::tr("&Open") : acceptLabel);
+}
+
+/*!
+    \internal
+*/
+void QFileDialogPrivate::_q_currentChanged(const QModelIndex &index)
+{
+    _q_updateOkButton();
+    emit q_func()->currentChanged(index.data(QFileSystemModel::FilePathRole).toString());
+}
+
+/*!
+    \internal
+
+    This is called when the user double clicks on a file with the corresponding
+    model item \a index.
+*/
+void QFileDialogPrivate::_q_enterDirectory(const QModelIndex &index)
+{
+    Q_Q(QFileDialog);
+    // My Computer or a directory
+    QModelIndex sourceIndex = index.model() == proxyModel ? mapToSource(index) : index;
+    QString path = sourceIndex.data(QFileSystemModel::FilePathRole).toString();
+    if (path.isEmpty() || model->isDir(sourceIndex)) {
+        q->setDirectory(path);
+        emit q->directoryEntered(path);
+        if (fileMode == QFileDialog::Directory
+                || fileMode == QFileDialog::DirectoryOnly) {
+            // ### find out why you have to do both of these.
+            lineEdit()->setText(QString());
+            lineEdit()->clear();
+        }
+    } else {
+        // Do not accept when shift-clicking to multi-select a file in environments with single-click-activation (KDE)
+        if (!q->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick)
+            || q->fileMode() != QFileDialog::ExistingFiles || !(QApplication::keyboardModifiers() & Qt::CTRL)) {
+            q->accept();
+        }
+    }
+}
+
+/*!
+    \internal
+
+    Changes the file dialog's current directory to the one specified
+    by \a path.
+*/
+void QFileDialogPrivate::_q_goToDirectory(const QString &path)
+{
+ #ifndef QT_NO_MESSAGEBOX
+    Q_Q(QFileDialog);
+#endif
+    QModelIndex index = qFileDialogUi->lookInCombo->model()->index(qFileDialogUi->lookInCombo->currentIndex(),
+                                                    qFileDialogUi->lookInCombo->modelColumn(),
+                                                    qFileDialogUi->lookInCombo->rootModelIndex());
+    QString path2 = path;
+    if (!index.isValid())
+        index = mapFromSource(model->index(getEnvironmentVariable(path)));
+    else {
+        path2 = index.data(UrlRole).toUrl().toLocalFile();
+        index = mapFromSource(model->index(path2));
+    }
+    QDir dir(path2);
+    if (!dir.exists())
+        dir = getEnvironmentVariable(path2);
+
+    if (dir.exists() || path2.isEmpty() || path2 == model->myComputer().toString()) {
+        _q_enterDirectory(index);
+#ifndef QT_NO_MESSAGEBOX
+    } else {
+        QString message = QFileDialog::tr("%1\nDirectory not found.\nPlease verify the "
+                                          "correct directory name was given.");
+        QMessageBox::warning(q, q->windowTitle(), message.arg(path2));
+#endif // QT_NO_MESSAGEBOX
+    }
+}
+
+// Makes a list of filters from a normal filter string "Image Files (*.png *.jpg)"
+QStringList qt_clean_filter_list(const QString &filter)
+{
+    QRegExp regexp(QString::fromLatin1(qt_file_dialog_filter_reg_exp));
+    QString f = filter;
+    int i = regexp.indexIn(f);
+    if (i >= 0)
+        f = regexp.cap(2);
+    return f.split(QLatin1Char(' '), QString::SkipEmptyParts);
+}
+
+/*!
+    \internal
+
+    Sets the current name filter to be nameFilter and
+    update the qFileDialogUi->fileNameEdit when in AcceptSave mode with the new extension.
+*/
+void QFileDialogPrivate::_q_useNameFilter(int index)
+{
+    if (index == nameFilters.size()) {
+        QAbstractItemModel *comboModel = qFileDialogUi->fileTypeCombo->model();
+        nameFilters.append(comboModel->index(comboModel->rowCount() - 1, 0).data().toString());
+    }
+
+    QString nameFilter = nameFilters.at(index);
+    QStringList newNameFilters = qt_clean_filter_list(nameFilter);
+    if (acceptMode == QFileDialog::AcceptSave) {
+        QString newNameFilterExtension;
+        if (newNameFilters.count() > 0)
+            newNameFilterExtension = QFileInfo(newNameFilters.at(0)).suffix();
+
+        QString fileName = lineEdit()->text();
+        const QString fileNameExtension = QFileInfo(fileName).suffix();
+        if (!fileNameExtension.isEmpty() && !newNameFilterExtension.isEmpty()) {
+            const int fileNameExtensionLength = fileNameExtension.count();
+            fileName.replace(fileName.count() - fileNameExtensionLength,
+                             fileNameExtensionLength, newNameFilterExtension);
+            qFileDialogUi->listView->clearSelection();
+            lineEdit()->setText(fileName);
+        }
+    }
+
+    model->setNameFilters(newNameFilters);
+}
+
+/*!
+    \internal
+
+    This is called when the model index corresponding to the current file is changed
+    from \a index to \a current.
+*/
+void QFileDialogPrivate::_q_selectionChanged()
+{
+    QModelIndexList indexes = qFileDialogUi->listView->selectionModel()->selectedRows();
+    bool stripDirs = (fileMode != QFileDialog::DirectoryOnly && fileMode != QFileDialog::Directory);
+
+    QStringList allFiles;
+    for (int i = 0; i < indexes.count(); ++i) {
+        if (stripDirs && model->isDir(mapToSource(indexes.at(i))))
+            continue;
+        allFiles.append(indexes.at(i).data().toString());
+    }
+    if (allFiles.count() > 1)
+        for (int i = 0; i < allFiles.count(); ++i) {
+            allFiles.replace(i, QString(QLatin1Char('"') + allFiles.at(i) + QLatin1Char('"')));
+    }
+
+    QString finalFiles = allFiles.join(QLatin1String(" "));
+    if (!finalFiles.isEmpty() && !lineEdit()->hasFocus() && lineEdit()->isVisible())
+        lineEdit()->setText(finalFiles);
+    else
+        _q_updateOkButton();
+}
+
+/*!
+    \internal
+
+    Includes hidden files and directories in the items displayed in the dialog.
+*/
+void QFileDialogPrivate::_q_showHidden()
+{
+    Q_Q(QFileDialog);
+    QDir::Filters dirFilters = q->filter();
+    if (showHiddenAction->isChecked())
+        dirFilters |= QDir::Hidden;
+    else
+        dirFilters &= ~QDir::Hidden;
+    q->setFilter(dirFilters);
+}
+
+/*!
+    \internal
+
+    When parent is root and rows have been inserted when none was there before
+    then select the first one.
+*/
+void QFileDialogPrivate::_q_rowsInserted(const QModelIndex &parent)
+{
+    if (!qFileDialogUi->treeView
+        || parent != qFileDialogUi->treeView->rootIndex()
+        || !qFileDialogUi->treeView->selectionModel()
+        || qFileDialogUi->treeView->selectionModel()->hasSelection()
+        || qFileDialogUi->treeView->model()->rowCount(parent) == 0)
+        return;
+}
+
+void QFileDialogPrivate::_q_fileRenamed(const QString &path, const QString oldName, const QString newName)
+{
+    if (fileMode == QFileDialog::Directory || fileMode == QFileDialog::DirectoryOnly) {
+        if (path == rootPath() && lineEdit()->text() == oldName)
+            lineEdit()->setText(newName);
+    }
+}
+
+/*!
+    \internal
+
+    For the list and tree view watch keys to goto parent and back in the history
+
+    returns true if handled
+*/
+bool QFileDialogPrivate::itemViewKeyboardEvent(QKeyEvent *event) {
+
+    Q_Q(QFileDialog);
+    switch (event->key()) {
+    case Qt::Key_Backspace:
+        _q_navigateToParent();
+        return true;
+    case Qt::Key_Back:
+#ifdef QT_KEYPAD_NAVIGATION
+        if (QApplication::keypadNavigationEnabled())
+            return false;
+#endif
+    case Qt::Key_Left:
+        if (event->key() == Qt::Key_Back || event->modifiers() == Qt::AltModifier) {
+            _q_navigateBackward();
+            return true;
+        }
+        break;
+    case Qt::Key_Escape:
+        q->hide();
+        return true;
+    default:
+        break;
+    }
+    return false;
+}
+
+QString QFileDialogPrivate::getEnvironmentVariable(const QString &string)
+{
+#ifdef Q_OS_UNIX
+    if (string.size() > 1 && string.startsWith(QLatin1Char('$'))) {
+        return QString::fromLocal8Bit(getenv(string.mid(1).toLatin1().constData()));
+    }
+#else
+    if (string.size() > 2 && string.startsWith(QLatin1Char('%')) && string.endsWith(QLatin1Char('%'))) {
+        return QString::fromLocal8Bit(qgetenv(string.mid(1, string.size() - 2).toLatin1().constData()));
+    }
+#endif
+    return string;
+}
+
+void QFileDialogComboBox::init(QFileDialogPrivate *d_pointer) {
+    d_ptr = d_pointer;
+    urlModel = new QUrlModel(this);
+    urlModel->showFullPath = true;
+    urlModel->setFileSystemModel(d_ptr->model);
+    setModel(urlModel);
+}
+
+void QFileDialogComboBox::showPopup()
+{
+    if (model()->rowCount() > 1)
+        QComboBox::showPopup();
+
+    urlModel->setUrls(QList<QUrl>());
+    QList<QUrl> list;
+    QModelIndex idx = d_ptr->model->index(d_ptr->rootPath());
+    while (idx.isValid()) {
+        QUrl url = QUrl::fromLocalFile(idx.data(QFileSystemModel::FilePathRole).toString());
+        if (url.isValid())
+            list.append(url);
+        idx = idx.parent();
+    }
+    // add "my computer"
+    list.append(QUrl::fromLocalFile(QLatin1String("")));
+    urlModel->addUrls(list, 0);
+    idx = model()->index(model()->rowCount() - 1, 0);
+
+    // append history
+    QList<QUrl> urls;
+    for (int i = 0; i < m_history.count(); ++i) {
+        QUrl path = QUrl::fromLocalFile(m_history.at(i));
+        if (!urls.contains(path))
+            urls.prepend(path);
+    }
+    if (urls.count() > 0) {
+        model()->insertRow(model()->rowCount());
+        idx = model()->index(model()->rowCount()-1, 0);
+        // ### TODO maybe add a horizontal line before this
+        model()->setData(idx, QFileDialog::tr("Recent Places"));
+        QStandardItemModel *m = qobject_cast<QStandardItemModel*>(model());
+        if (m) {
+            Qt::ItemFlags flags = m->flags(idx);
+            flags &= ~Qt::ItemIsEnabled;
+            m->item(idx.row(), idx.column())->setFlags(flags);
+        }
+        urlModel->addUrls(urls, -1, false);
+    }
+    setCurrentIndex(0);
+
+    QComboBox::showPopup();
+}
+
+// Exact same as QComboBox::paintEvent(), except we elide the text.
+void QFileDialogComboBox::paintEvent(QPaintEvent *)
+{
+    QStylePainter painter(this);
+    painter.setPen(palette().color(QPalette::Text));
+
+    // draw the combobox frame, focusrect and selected etc.
+    QStyleOptionComboBox opt;
+    initStyleOption(&opt);
+
+    QRect editRect = style()->subControlRect(QStyle::CC_ComboBox, &opt,
+                                                QStyle::SC_ComboBoxEditField, this);
+    int size = editRect.width() - opt.iconSize.width() - 4;
+    opt.currentText = opt.fontMetrics.elidedText(opt.currentText, Qt::ElideMiddle, size);
+    painter.drawComplexControl(QStyle::CC_ComboBox, opt);
+
+    // draw the icon and text
+    painter.drawControl(QStyle::CE_ComboBoxLabel, opt);
+}
+
+QFileDialogListView::QFileDialogListView(QWidget *parent) : QListView(parent)
+{
+}
+
+void QFileDialogListView::init(QFileDialogPrivate *d_pointer)
+{
+    d_ptr = d_pointer;
+    setSelectionBehavior(QAbstractItemView::SelectRows);
+    setWrapping(true);
+    setResizeMode(QListView::Adjust);
+    setEditTriggers(QAbstractItemView::EditKeyPressed);
+    setContextMenuPolicy(Qt::CustomContextMenu);
+#ifndef QT_NO_DRAGANDDROP
+    setDragDropMode(QAbstractItemView::InternalMove);
+#endif
+}
+
+QSize QFileDialogListView::sizeHint() const
+{
+    int height = qMax(10, sizeHintForRow(0));
+    return QSize(QListView::sizeHint().width() * 2, height * 30);
+}
+
+void QFileDialogListView::keyPressEvent(QKeyEvent *e)
+{
+#ifdef QT_KEYPAD_NAVIGATION
+    if (QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional) {
+        QListView::keyPressEvent(e);
+        return;
+    }
+#endif // QT_KEYPAD_NAVIGATION
+
+    if (!d_ptr->itemViewKeyboardEvent(e))
+        QListView::keyPressEvent(e);
+    e->accept();
+}
+
+QFileDialogTreeView::QFileDialogTreeView(QWidget *parent) : QTreeView(parent)
+{
+}
+
+void QFileDialogTreeView::init(QFileDialogPrivate *d_pointer)
+{
+    d_ptr = d_pointer;
+    setSelectionBehavior(QAbstractItemView::SelectRows);
+    setRootIsDecorated(false);
+    setItemsExpandable(false);
+    setSortingEnabled(true);
+    header()->setSortIndicator(0, Qt::AscendingOrder);
+    header()->setStretchLastSection(false);
+    setTextElideMode(Qt::ElideMiddle);
+    setEditTriggers(QAbstractItemView::EditKeyPressed);
+    setContextMenuPolicy(Qt::CustomContextMenu);
+#ifndef QT_NO_DRAGANDDROP
+    setDragDropMode(QAbstractItemView::InternalMove);
+#endif
+}
+
+void QFileDialogTreeView::keyPressEvent(QKeyEvent *e)
+{
+#ifdef QT_KEYPAD_NAVIGATION
+    if (QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional) {
+        QTreeView::keyPressEvent(e);
+        return;
+    }
+#endif // QT_KEYPAD_NAVIGATION
+
+    if (!d_ptr->itemViewKeyboardEvent(e))
+        QTreeView::keyPressEvent(e);
+    e->accept();
+}
+
+QSize QFileDialogTreeView::sizeHint() const
+{
+    int height = qMax(10, sizeHintForRow(0));
+    QSize sizeHint = header()->sizeHint();
+    return QSize(sizeHint.width() * 4, height * 30);
+}
+
+/*!
+    // FIXME: this is a hack to avoid propagating key press events
+    // to the dialog and from there to the "Ok" button
+*/
+void QFileDialogLineEdit::keyPressEvent(QKeyEvent *e)
+{
+#ifdef QT_KEYPAD_NAVIGATION
+    if (QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional) {
+        QLineEdit::keyPressEvent(e);
+        return;
+    }
+#endif // QT_KEYPAD_NAVIGATION
+
+    int key = e->key();
+    QLineEdit::keyPressEvent(e);
+    if (key != Qt::Key_Escape)
+        e->accept();
+    if (hideOnEsc && (key == Qt::Key_Escape || key == Qt::Key_Return || key == Qt::Key_Enter)) {
+        e->accept();
+        hide();
+        d_ptr->currentView()->setFocus(Qt::ShortcutFocusReason);
+    }
+}
+
+#ifndef QT_NO_FSCOMPLETER
+
+QString QFSCompleter::pathFromIndex(const QModelIndex &index) const
+{
+    const QFileSystemModel *dirModel;
+    if (proxyModel)
+        dirModel = qobject_cast<const QFileSystemModel *>(proxyModel->sourceModel());
+    else
+        dirModel = sourceModel;
+    QString currentLocation = dirModel->rootPath();
+    QString path = index.data(QFileSystemModel::FilePathRole).toString();
+    if (!currentLocation.isEmpty() && path.startsWith(currentLocation)) {
+#if defined(Q_OS_UNIX) || defined(Q_OS_WINCE)
+        if (currentLocation == QDir::separator())
+            return path.mid(currentLocation.length());
+#endif
+        if (currentLocation.endsWith(QLatin1Char('/')))
+            return path.mid(currentLocation.length());
+        else
+            return path.mid(currentLocation.length()+1);
+    }
+    return index.data(QFileSystemModel::FilePathRole).toString();
+}
+
+QStringList QFSCompleter::splitPath(const QString &path) const
+{
+    if (path.isEmpty())
+        return QStringList(completionPrefix());
+
+    QString pathCopy = QDir::toNativeSeparators(path);
+    QString sep = QDir::separator();
+#if defined(Q_OS_SYMBIAN)
+    if (pathCopy == QLatin1String("\\"))
+        return QStringList(pathCopy);
+#elif defined(Q_OS_WIN)
+    if (pathCopy == QLatin1String("\\") || pathCopy == QLatin1String("\\\\"))
+        return QStringList(pathCopy);
+    QString doubleSlash(QLatin1String("\\\\"));
+    if (pathCopy.startsWith(doubleSlash))
+        pathCopy = pathCopy.mid(2);
+    else
+        doubleSlash.clear();
+#elif defined(Q_OS_UNIX)
+    bool expanded;
+    pathCopy = qt_tildeExpansion(pathCopy, &expanded);
+    if (expanded) {
+        QFileSystemModel *dirModel;
+        if (proxyModel)
+            dirModel = qobject_cast<QFileSystemModel *>(proxyModel->sourceModel());
+        else
+            dirModel = sourceModel;
+        dirModel->fetchMore(dirModel->index(pathCopy));
+    }
+#endif
+
+    QRegExp re(QLatin1Char('[') + QRegExp::escape(sep) + QLatin1Char(']'));
+
+#if defined(Q_OS_SYMBIAN)
+    QStringList parts = pathCopy.split(re, QString::SkipEmptyParts);
+    if (pathCopy.endsWith(sep))
+        parts.append(QString());
+#elif defined(Q_OS_WIN)
+    QStringList parts = pathCopy.split(re, QString::SkipEmptyParts);
+    if (!doubleSlash.isEmpty() && !parts.isEmpty())
+        parts[0].prepend(doubleSlash);
+    if (pathCopy.endsWith(sep))
+        parts.append(QString());
+#else
+    QStringList parts = pathCopy.split(re);
+    if (pathCopy[0] == sep[0]) // read the "/" at the beginning as the split removed it
+        parts[0] = sep[0];
+#endif
+
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+    bool startsFromRoot = !parts.isEmpty() && parts[0].endsWith(QLatin1Char(':'));
+#else
+    bool startsFromRoot = pathCopy[0] == sep[0];
+#endif
+    if (parts.count() == 1 || (parts.count() > 1 && !startsFromRoot)) {
+        const QFileSystemModel *dirModel;
+        if (proxyModel)
+            dirModel = qobject_cast<const QFileSystemModel *>(proxyModel->sourceModel());
+        else
+            dirModel = sourceModel;
+        QString currentLocation = QDir::toNativeSeparators(dirModel->rootPath());
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+        if (currentLocation.endsWith(QLatin1Char(':')))
+            currentLocation.append(sep);
+#endif
+        if (currentLocation.contains(sep) && path != currentLocation) {
+            QStringList currentLocationList = splitPath(currentLocation);
+            while (!currentLocationList.isEmpty()
+                   && parts.count() > 0
+                   && parts.at(0) == QLatin1String("..")) {
+                parts.removeFirst();
+                currentLocationList.removeLast();
+            }
+            if (!currentLocationList.isEmpty() && currentLocationList.last().isEmpty())
+                currentLocationList.removeLast();
+            return currentLocationList + parts;
+        }
+    }
+    return parts;
+}
+
+#endif // QT_NO_COMPLETER
+
+#ifdef QT3_SUPPORT
+/*!
+    Use selectedFiles() instead.
+
+    \oldcode
+       QString selected = dialog->selectedFile();
+    \newcode
+        QStringList files = dialog->selectedFiles();
+        QString selected;
+        if (!files.isEmpty())
+            selected = files[0];
+    \endcode
+*/
+QString QFileDialog::selectedFile() const
+{
+    QStringList files = selectedFiles();
+    return files.size() ? files.at(0) : QString();
+}
+
+/*!
+    \typedef QFileDialog::Mode
+
+    Use QFileDialog::FileMode instead.
+*/
+
+/*!
+    \fn void QFileDialog::setMode(FileMode m)
+
+    Use setFileMode() instead.
+*/
+
+/*!
+    \fn FileMode QFileDialog::mode() const
+
+    Use fileMode() instead.
+*/
+
+/*!
+    \fn void QFileDialog::setDir(const QString &directory)
+
+    Use setDirectory() instead.
+*/
+
+/*!
+    \fn void QFileDialog::setDir( const QDir &directory )
+
+    Use setDirectory() instead.
+*/
+
+/*!
+    \fn QStringList QFileDialog::getOpenFileNames(const QString &filter,
+        const QString &dir, QWidget *parent, const char* name,
+        const QString &caption, QString *selectedFilter, bool resolveSymlinks)
+
+    Use the getOpenFileNames() overload that takes \a parent as the first
+    argument instead.
+*/
+
+/*!
+    \fn QString QFileDialog::getOpenFileName(const QString &dir,
+        const QString &filter, QWidget *parent = 0, const char *name,
+        const QString &caption, QString *selectedFilter, bool resolveSymlinks)
+
+    Use the getOpenFileName() overload that takes \a parent as the first
+    argument instead.
+*/
+
+/*!
+    \fn QString QFileDialog::getSaveFileName(const QString &dir,
+        const QString &filter, QWidget *parent, const char *name,
+        const QString &caption, QString *selectedFilter, bool resolveSymlinks)
+
+    Use the getSaveFileName() overload that takes \a parent as the first
+    argument instead.
+*/
+
+/*!
+    \fn QString QFileDialog::getExistingDirectory(const QString &dir,
+        QWidget *parent, const char *name, const QString &caption,
+        bool dirOnly, bool resolveSymlinks)
+
+    Use the getExistingDirectory() overload that takes \a parent as
+    the first argument instead.
+*/
+
+#endif // QT3_SUPPORT
+
+QT_END_NAMESPACE
+
+#include "moc_qfiledialog.cpp"
+
+#endif // QT_NO_FILEDIALOG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qfiledialog_symbian.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,199 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qfiledialog.h"
+
+#ifndef QT_NO_FILEDIALOG
+
+#include <private/qfiledialog_p.h>
+#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2)
+#include <driveinfo.h>
+#include <AknCommonDialogsDynMem.h>
+#include <CAknMemorySelectionDialogMultiDrive.h>
+#include <MAknFileFilter.h>
+#endif
+#include "private/qcore_symbian_p.h"
+
+QT_BEGIN_NAMESPACE
+
+extern QStringList qt_make_filter_list(const QString &filter); // defined in qfiledialog.cpp
+extern QStringList qt_clean_filter_list(const QString &filter); // defined in qfiledialog.cpp
+
+enum DialogMode { DialogOpen, DialogSave, DialogFolder };
+#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2)
+class CExtensionFilter : public CBase, public MAknFileFilter
+{
+public:
+    void setFilter(const QString filter)
+    {
+        QStringList unparsedFiltersList = qt_make_filter_list(filter);
+        QStringList filterList;
+        filterRxList.clear();
+
+        foreach (QString unparsedFilter, unparsedFiltersList) {
+            filterList << qt_clean_filter_list(unparsedFilter);
+        }
+        foreach (QString currentFilter, filterList) {
+            QRegExp filterRx(currentFilter, Qt::CaseInsensitive, QRegExp::Wildcard);
+            filterRxList << filterRx;
+        }
+    }
+
+    TBool Accept(const TDesC &/*aDriveAndPath*/, const TEntry &aEntry) const
+    {
+        //If no filter for files, all can be accepted
+        if (filterRxList.isEmpty())
+            return ETrue;
+
+        if (aEntry.IsDir())
+            return ETrue;
+
+        foreach (QRegExp rx, filterRxList) {
+            QString fileName = qt_TDesC2QString(aEntry.iName);
+            if (rx.exactMatch(fileName))
+                return ETrue;
+        }
+
+        return EFalse;
+    }
+
+private:
+    QList<QRegExp> filterRxList;
+};
+#endif
+
+static QString launchSymbianDialog(const QString dialogCaption, const QString startDirectory,
+                                   const QString filter, DialogMode dialogMode)
+{
+    QString selection;
+#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2)
+    TFileName startFolder;
+    if (!startDirectory.isEmpty()) {
+        QString dir = QDir::toNativeSeparators(QFileDialogPrivate::workingDirectory(startDirectory));
+        startFolder = qt_QString2TPtrC(dir);
+    }
+    TInt types = AknCommonDialogsDynMem::EMemoryTypeMMCExternal|
+                 AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage|
+                 AknCommonDialogsDynMem::EMemoryTypePhone;
+
+    TPtrC titlePtr(qt_QString2TPtrC(dialogCaption));
+    TFileName target;
+    bool select = false;
+    int tryCount = 2;
+    while (tryCount--) {
+        TInt err(KErrNone);
+        TRAP(err,
+            if (dialogMode == DialogOpen) {
+                CExtensionFilter* extensionFilter = new (ELeave) CExtensionFilter;
+                CleanupStack::PushL(extensionFilter);
+                extensionFilter->setFilter(filter);
+                select = AknCommonDialogsDynMem::RunSelectDlgLD(types, target,
+                         startFolder, 0, 0, titlePtr, extensionFilter);
+                CleanupStack::PopAndDestroy(extensionFilter);
+            } else if (dialogMode == DialogSave) {
+                QString defaultFileName = QFileDialogPrivate::initialSelection(startDirectory);
+                target = qt_QString2TPtrC(defaultFileName);
+                select = AknCommonDialogsDynMem::RunSaveDlgLD(types, target,
+                         startFolder, 0, 0, titlePtr);
+            } else if (dialogMode == DialogFolder) {
+                select = AknCommonDialogsDynMem::RunFolderSelectDlgLD(types, target, startFolder,
+                            0, 0, titlePtr, NULL, NULL);
+            }
+        );
+
+        if (err == KErrNone) {
+            tryCount = 0;
+        } else {
+            // Symbian native file dialog doesn't allow accessing files outside C:/Data
+            // It will always leave in that case, so default into QDir::homePath() in error cases.
+            QString dir = QDir::toNativeSeparators(QDir::homePath());
+            startFolder = qt_QString2TPtrC(dir);
+        }
+    }
+    if (select) {
+        QFileInfo fi(qt_TDesC2QString(target));
+        selection = fi.absoluteFilePath();
+    }
+#endif
+    return selection;
+}
+
+QString qtSymbianGetOpenFileName(const QString &caption,
+                                 const QString &dir,
+                                 const QString &filter)
+{
+    return launchSymbianDialog(caption, dir, filter, DialogOpen);
+}
+
+QStringList qtSymbianGetOpenFileNames(const QString &caption,
+                                      const QString &dir,
+                                      const QString &filter)
+{
+    QString fileName;
+    fileName.append(launchSymbianDialog(caption, dir, filter, DialogOpen));
+    QStringList fileList;
+    fileList << fileName;
+
+    return fileList;
+}
+
+QString qtSymbianGetSaveFileName(const QString &caption,
+                                 const QString &dir)
+{
+    return launchSymbianDialog(caption, dir, QString(), DialogSave);
+}
+
+QString qtSymbianGetExistingDirectory(const QString &caption,
+                                      const QString &dir)
+{
+    QString folderCaption;
+    if (!caption.isEmpty()) {
+        folderCaption.append(caption);
+    } else {
+        // Title for folder selection dialog is mandatory
+        folderCaption.append(QFileDialog::tr("Find Directory"));
+    }
+    return launchSymbianDialog(folderCaption, dir, QString(), DialogFolder);
+}
+
+QT_END_NAMESPACE
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qfiledialog_win.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,809 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qfiledialog.h"
+
+#ifndef QT_NO_FILEDIALOG
+
+#include <private/qfiledialog_p.h>
+#include <qapplication.h>
+#include <private/qapplication_p.h>
+#include <qt_windows.h>
+#include <qglobal.h>
+#include <qregexp.h>
+#include <qbuffer.h>
+#include <qdir.h>
+#include <qstringlist.h>
+#include <private/qsystemlibrary_p.h>
+#include "qfiledialog_win_p.h"
+
+#ifdef Q_WS_WINCE
+#include <commdlg.h>
+bool qt_priv_ptr_valid = false;
+#else
+//we have to declare them here because they're not present for all SDK/compilers
+static const IID   QT_IID_IFileOpenDialog  = {0xd57c7288, 0xd4ad, 0x4768, {0xbe, 0x02, 0x9d, 0x96, 0x95, 0x32, 0xd9, 0x60} };
+static const IID   QT_IID_IShellItem       = {0x43826d1e, 0xe718, 0x42ee, {0xbc, 0x55, 0xa1, 0xe2, 0x61, 0xc3, 0x7b, 0xfe} };
+static const CLSID QT_CLSID_FileOpenDialog = {0xdc1c5a9c, 0xe88a, 0x4dde, {0xa5, 0xa1, 0x60, 0xf8, 0x2a, 0x20, 0xae, 0xf7} };
+#endif
+
+
+typedef qt_LPITEMIDLIST (WINAPI *PtrSHBrowseForFolder)(qt_BROWSEINFO*);
+static PtrSHBrowseForFolder ptrSHBrowseForFolder = 0;
+typedef BOOL (WINAPI *PtrSHGetPathFromIDList)(qt_LPITEMIDLIST, LPWSTR);
+static PtrSHGetPathFromIDList ptrSHGetPathFromIDList = 0;
+typedef HRESULT (WINAPI *PtrSHGetMalloc)(LPMALLOC *);
+static PtrSHGetMalloc ptrSHGetMalloc = 0;
+
+
+QT_BEGIN_NAMESPACE
+
+static void qt_win_resolve_libs()
+{
+    static bool triedResolve = false;
+    if (!triedResolve) {
+#if !defined(Q_WS_WINCE)
+        QSystemLibrary lib(QLatin1String("shell32"));
+        ptrSHBrowseForFolder = (PtrSHBrowseForFolder)lib.resolve("SHBrowseForFolderW");
+        ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList)lib.resolve("SHGetPathFromIDListW");
+        ptrSHGetMalloc = (PtrSHGetMalloc)lib.resolve("SHGetMalloc");
+#else
+        // CE stores them in a different lib and does not use unicode version
+        QSystemLibrary lib(QLatin1String("Ceshell"));
+        ptrSHBrowseForFolder = (PtrSHBrowseForFolder)lib.resolve("SHBrowseForFolder");
+        ptrSHGetPathFromIDList = (PtrSHGetPathFromIDList)lib.resolve("SHGetPathFromIDList");
+        ptrSHGetMalloc = (PtrSHGetMalloc)lib.resolve("SHGetMalloc");
+        if (ptrSHBrowseForFolder && ptrSHGetPathFromIDList && ptrSHGetMalloc)
+            qt_priv_ptr_valid = true;
+#endif
+
+        triedResolve = true;
+    }
+}
+
+extern const char* qt_file_dialog_filter_reg_exp; // defined in qfiledialog.cpp
+extern QStringList qt_make_filter_list(const QString &filter);
+
+const int maxNameLen = 1023;
+const int maxMultiLen = 65535;
+
+// Returns the wildcard part of a filter.
+static QString qt_win_extract_filter(const QString &rawFilter)
+{
+    QString result = rawFilter;
+    QRegExp r(QString::fromLatin1(qt_file_dialog_filter_reg_exp));
+    int index = r.indexIn(result);
+    if (index >= 0)
+        result = r.cap(2);
+    QStringList list = result.split(QLatin1Char(' '));
+    for(QStringList::iterator it = list.begin(); it < list.end(); ++it) {
+        if (*it == QLatin1String("*")) {
+            *it = QLatin1String("*.*");
+            break;
+        }
+    }
+    return list.join(QLatin1String(";"));
+}
+
+static QStringList qt_win_make_filters_list(const QString &filter)
+{
+    QString f(filter);
+
+    if (f.isEmpty())
+        f = QFileDialog::tr("All Files (*.*)");
+
+    return qt_make_filter_list(f);
+}
+
+// Makes a NUL-oriented Windows filter from a Qt filter.
+static QString qt_win_filter(const QString &filter, bool hideFiltersDetails)
+{
+    QStringList filterLst = qt_win_make_filters_list(filter);
+    QStringList::Iterator it = filterLst.begin();
+    QString winfilters;
+    QRegExp r(QString::fromLatin1(qt_file_dialog_filter_reg_exp));
+    for (; it != filterLst.end(); ++it) {
+        QString subfilter = *it;
+        if (!subfilter.isEmpty()) {
+            if (hideFiltersDetails) {
+                int index = r.indexIn(subfilter);
+                if (index >= 0)
+                    winfilters += r.cap(1);
+            } else {
+                winfilters += subfilter;
+            }
+            winfilters += QChar();
+            winfilters += qt_win_extract_filter(subfilter);
+            winfilters += QChar();
+        }
+    }
+    winfilters += QChar();
+    return winfilters;
+}
+
+static QString qt_win_selected_filter(const QString &filter, DWORD idx)
+{
+    return qt_win_make_filters_list(filter).at((int)idx - 1);
+}
+
+static QString tFilters, tTitle, tInitDir;
+
+static OPENFILENAME* qt_win_make_OFN(QWidget *parent,
+                                     const QString& initialSelection,
+                                     const QString& initialDirectory,
+                                     const QString& title,
+                                     const QString& filters,
+                                     QFileDialog::FileMode mode,
+                                     QFileDialog::Options options)
+{
+    if (parent)
+        parent = parent->window();
+    else
+        parent = QApplication::activeWindow();
+
+    tInitDir = QDir::toNativeSeparators(initialDirectory);
+    tFilters = filters;
+    tTitle = title;
+    QString initSel = QDir::toNativeSeparators(initialSelection);
+    if (!initSel.isEmpty()) {
+        initSel.remove(QLatin1Char('<'));
+        initSel.remove(QLatin1Char('>'));
+        initSel.remove(QLatin1Char('\"'));
+        initSel.remove(QLatin1Char('|'));
+    }
+
+    int maxLen = mode == QFileDialog::ExistingFiles ? maxMultiLen : maxNameLen;
+    wchar_t *tInitSel = new wchar_t[maxLen + 1];
+    if (initSel.length() > 0 && initSel.length() <= maxLen)
+        memcpy(tInitSel, initSel.utf16(), (initSel.length()+1)*sizeof(QChar));
+    else
+        tInitSel[0] = 0;
+
+    OPENFILENAME* ofn = new OPENFILENAME;
+    memset(ofn, 0, sizeof(OPENFILENAME));
+
+    ofn->lStructSize = sizeof(OPENFILENAME);
+    ofn->hwndOwner = parent ? parent->winId() : 0;
+    ofn->lpstrFilter = (wchar_t*)tFilters.utf16();
+    ofn->lpstrFile = tInitSel;
+    ofn->nMaxFile = maxLen;
+    ofn->lpstrInitialDir = (wchar_t*)tInitDir.utf16();
+    ofn->lpstrTitle = (wchar_t*)tTitle.utf16();
+    ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_EXPLORER | OFN_PATHMUSTEXIST);
+    if (mode == QFileDialog::ExistingFile ||
+         mode == QFileDialog::ExistingFiles)
+        ofn->Flags |= (OFN_FILEMUSTEXIST);
+    if (mode == QFileDialog::ExistingFiles)
+        ofn->Flags |= (OFN_ALLOWMULTISELECT);
+    if (!(options & QFileDialog::DontConfirmOverwrite))
+        ofn->Flags |= OFN_OVERWRITEPROMPT;
+
+    return ofn;
+}
+
+static void qt_win_clean_up_OFN(OPENFILENAME **ofn)
+{
+    delete [] (*ofn)->lpstrFile;
+    delete *ofn;
+    *ofn = 0;
+}
+
+extern void qt_win_eatMouseMove();
+
+QString qt_win_get_open_file_name(const QFileDialogArgs &args,
+                                  QString *initialDirectory,
+                                  QString *selectedFilter)
+{
+    QString result;
+
+    QString isel = args.selection;
+
+    if (initialDirectory && initialDirectory->left(5) == QLatin1String("file:"))
+        initialDirectory->remove(0, 5);
+    QFileInfo fi(*initialDirectory);
+
+    if (initialDirectory && !fi.isDir()) {
+        *initialDirectory = fi.absolutePath();
+        if (isel.isEmpty())
+            isel = fi.fileName();
+    }
+
+    if (!fi.exists())
+        *initialDirectory = QDir::homePath();
+
+    DWORD selFilIdx = 0;
+
+    int idx = 0;
+    if (selectedFilter) {
+        QStringList filterLst = qt_win_make_filters_list(args.filter);
+        idx = filterLst.indexOf(*selectedFilter);
+    }
+
+    QDialog modal_widget;
+    modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
+    modal_widget.setParent(args.parent, Qt::Window);
+    QApplicationPrivate::enterModal(&modal_widget);
+
+    bool hideFiltersDetails = args.options & QFileDialog::HideNameFilterDetails;
+    OPENFILENAME* ofn = qt_win_make_OFN(args.parent, args.selection,
+                                        args.directory, args.caption,
+                                        qt_win_filter(args.filter, hideFiltersDetails),
+                                        QFileDialog::ExistingFile,
+                                        args.options);
+    if (idx)
+        ofn->nFilterIndex = idx + 1;
+    if (GetOpenFileName(ofn)) {
+        result = QString::fromWCharArray(ofn->lpstrFile);
+        selFilIdx = ofn->nFilterIndex;
+    }
+    qt_win_clean_up_OFN(&ofn);
+
+    QApplicationPrivate::leaveModal(&modal_widget);
+
+    qt_win_eatMouseMove();
+
+    if (result.isEmpty())
+        return result;
+
+    fi = result;
+    *initialDirectory = fi.path();
+    if (selectedFilter)
+        *selectedFilter = qt_win_selected_filter(args.filter, selFilIdx);
+    return fi.absoluteFilePath();
+}
+
+QString qt_win_get_save_file_name(const QFileDialogArgs &args,
+                                  QString *initialDirectory,
+                                  QString *selectedFilter)
+{
+    QString result;
+
+    QString isel = args.selection;
+    if (initialDirectory && initialDirectory->left(5) == QLatin1String("file:"))
+        initialDirectory->remove(0, 5);
+    QFileInfo fi(*initialDirectory);
+
+    if (initialDirectory && !fi.isDir()) {
+        *initialDirectory = fi.absolutePath();
+        if (isel.isEmpty())
+            isel = fi.fileName();
+    }
+
+    if (!fi.exists())
+        *initialDirectory = QDir::homePath();
+
+    DWORD selFilIdx = 0;
+
+    int idx = 0;
+    if (selectedFilter) {
+        QStringList filterLst = qt_win_make_filters_list(args.filter);
+        idx = filterLst.indexOf(*selectedFilter);
+    }
+
+    QDialog modal_widget;
+    modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
+    modal_widget.setParent(args.parent, Qt::Window);
+    QApplicationPrivate::enterModal(&modal_widget);
+    bool hideFiltersDetails = args.options & QFileDialog::HideNameFilterDetails;
+    // This block is used below for the lpstrDefExt member.
+    // Note that the current MSDN docs document this member wrong.
+    // It should rather be documented as "the default extension if no extension was given and if the
+    // current filter does not have a extension (e.g (*)). If the current filter have an extension, use
+    // the extension of the current filter"
+    QString defaultSaveExt;
+    if (selectedFilter && !selectedFilter->isEmpty()) {
+        defaultSaveExt = qt_win_extract_filter(*selectedFilter);
+        // make sure we only have the extension
+        int firstDot = defaultSaveExt.indexOf(QLatin1Char('.'));
+        if (firstDot != -1) {
+            defaultSaveExt.remove(0, firstDot + 1);
+        } else {
+            defaultSaveExt.clear();
+        }
+    }
+
+    OPENFILENAME *ofn = qt_win_make_OFN(args.parent, args.selection,
+                                        args.directory, args.caption,
+                                        qt_win_filter(args.filter, hideFiltersDetails),
+                                        QFileDialog::AnyFile,
+                                        args.options);
+
+    ofn->lpstrDefExt = (wchar_t*)defaultSaveExt.utf16();
+
+    if (idx)
+        ofn->nFilterIndex = idx + 1;
+    if (GetSaveFileName(ofn)) {
+        result = QString::fromWCharArray(ofn->lpstrFile);
+        selFilIdx = ofn->nFilterIndex;
+    }
+    qt_win_clean_up_OFN(&ofn);
+
+#if defined(Q_WS_WINCE)
+    int semIndex = result.indexOf(QLatin1Char(';'));
+    if (semIndex >= 0)
+        result = result.left(semIndex);
+#endif
+
+    QApplicationPrivate::leaveModal(&modal_widget);
+
+    qt_win_eatMouseMove();
+
+    if (result.isEmpty())
+        return result;
+
+    fi = result;
+    *initialDirectory = fi.path();
+    if (selectedFilter)
+        *selectedFilter = qt_win_selected_filter(args.filter, selFilIdx);
+    return fi.absoluteFilePath();
+}
+
+
+#ifndef Q_WS_WINCE
+
+typedef HRESULT (WINAPI *PtrSHCreateItemFromParsingName)(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv);
+static PtrSHCreateItemFromParsingName pSHCreateItemFromParsingName = 0;
+
+static bool qt_win_set_IFileDialogOptions(IFileDialog *pfd,
+                                          const QString& initialSelection,
+                                          const QString& initialDirectory,
+                                          const QString& title,
+                                          const QStringList& filterLst,
+                                          QFileDialog::FileMode mode,
+                                          QFileDialog::Options options)
+{
+    if (!pSHCreateItemFromParsingName) {
+        // This function is available only in Vista & above.
+        QSystemLibrary shellLib(QLatin1String("Shell32"));
+        pSHCreateItemFromParsingName = (PtrSHCreateItemFromParsingName)
+            shellLib.resolve("SHCreateItemFromParsingName");
+        if (!pSHCreateItemFromParsingName)
+            return false;
+    }
+    HRESULT hr;
+    QString winfilters;
+    int numFilters = 0;
+    quint32 currentOffset = 0;
+    QList<quint32> offsets;
+    QStringList::ConstIterator it = filterLst.begin();
+    // Create the native filter string and save offset to each entry.
+    for (; it != filterLst.end(); ++it) {
+        QString subfilter = *it;
+        if (!subfilter.isEmpty()) {
+            offsets<<currentOffset;
+            //Here the COMMON_ITEM_DIALOG API always add the details for the filter (e.g. *.txt)
+            //so we don't need to handle the flag HideNameFilterDetails.
+            winfilters += subfilter; // The name of the filter.
+            winfilters += QChar();
+            currentOffset += subfilter.size()+1;
+            offsets<<currentOffset;
+            QString spec = qt_win_extract_filter(subfilter);
+            winfilters += spec; // The actual filter spec.
+            winfilters += QChar();
+            currentOffset += spec.size()+1;
+            numFilters++;
+        }
+    }
+    // Add the filters to the file dialog.
+    if (numFilters) {
+        wchar_t *szData = (wchar_t*)winfilters.utf16();
+        qt_COMDLG_FILTERSPEC *filterSpec = new qt_COMDLG_FILTERSPEC[numFilters];
+        for(int i = 0; i<numFilters; i++) {
+            filterSpec[i].pszName = szData+offsets[i*2];
+            filterSpec[i].pszSpec = szData+offsets[(i*2)+1];
+        }
+        hr = pfd->SetFileTypes(numFilters, filterSpec);
+        delete []filterSpec;
+    }
+    // Set the starting folder.
+    tInitDir = QDir::toNativeSeparators(initialDirectory);
+    if (!tInitDir.isEmpty()) {
+        IShellItem *psiDefaultFolder;
+        hr = pSHCreateItemFromParsingName((wchar_t*)tInitDir.utf16(), NULL, QT_IID_IShellItem, 
+            reinterpret_cast<void**>(&psiDefaultFolder));
+
+        if (SUCCEEDED(hr)) {
+            hr = pfd->SetFolder(psiDefaultFolder);
+            psiDefaultFolder->Release();
+        }
+    }
+    // Set the currently selected file.
+    QString initSel = QDir::toNativeSeparators(initialSelection);
+    if (!initSel.isEmpty()) {
+        initSel.remove(QLatin1Char('<'));
+        initSel.remove(QLatin1Char('>'));
+        initSel.remove(QLatin1Char('\"'));
+        initSel.remove(QLatin1Char('|'));
+    }
+    if (!initSel.isEmpty()) {
+        hr = pfd->SetFileName((wchar_t*)initSel.utf16());
+    }
+    // Set the title for the file dialog.
+    if (!title.isEmpty()) {
+        hr = pfd->SetTitle((wchar_t*)title.utf16());
+    }
+    // Set other flags for the dialog.
+    DWORD newOptions;
+    hr = pfd->GetOptions(&newOptions);
+    if (SUCCEEDED(hr)) {
+        newOptions |= FOS_NOCHANGEDIR;
+        if (mode == QFileDialog::ExistingFile ||
+             mode == QFileDialog::ExistingFiles)
+            newOptions |= (FOS_FILEMUSTEXIST | FOS_PATHMUSTEXIST);
+        if (mode == QFileDialog::ExistingFiles)
+            newOptions |= FOS_ALLOWMULTISELECT;
+        if (!(options & QFileDialog::DontConfirmOverwrite))
+            newOptions |= FOS_OVERWRITEPROMPT;
+        hr = pfd->SetOptions(newOptions);
+    }
+    return SUCCEEDED(hr);
+}
+
+static QStringList qt_win_CID_get_open_file_names(const QFileDialogArgs &args,
+                                       QString *initialDirectory,
+                                       const QStringList &filterList,
+                                       QString *selectedFilter,
+                                       int selectedFilterIndex)
+{
+    QStringList result;
+    QDialog modal_widget;
+    modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
+    modal_widget.setParent(args.parent, Qt::Window);
+    QApplicationPrivate::enterModal(&modal_widget);
+    // Multiple selection is allowed only in IFileOpenDialog.
+    IFileOpenDialog *pfd = 0;
+    HRESULT hr = CoCreateInstance(QT_CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, QT_IID_IFileOpenDialog, 
+        reinterpret_cast<void**>(&pfd));
+
+    if (SUCCEEDED(hr)) {
+        qt_win_set_IFileDialogOptions(pfd, args.selection,
+                                      args.directory, args.caption,
+                                      filterList, QFileDialog::ExistingFiles,
+                                      args.options);
+        // Set the currently selected filter (one-based index).
+        hr = pfd->SetFileTypeIndex(selectedFilterIndex+1);
+        QWidget *parentWindow = args.parent;
+        if (parentWindow)
+            parentWindow = parentWindow->window();
+        else
+            parentWindow = QApplication::activeWindow();
+        // Show the file dialog.
+        hr = pfd->Show(parentWindow ? parentWindow->winId() : 0);
+        if (SUCCEEDED(hr)) {
+            // Retrieve the results.
+            IShellItemArray *psiaResults;
+            hr = pfd->GetResults(&psiaResults);
+            if (SUCCEEDED(hr)) {
+                DWORD numItems = 0;
+                psiaResults->GetCount(&numItems);
+                for (DWORD i = 0; i<numItems; i++) {
+                    IShellItem *psi = 0;
+                    hr = psiaResults->GetItemAt(i, &psi);
+                    if (SUCCEEDED(hr)) {
+                        // Retrieve the file name from shell item.
+                        wchar_t *pszPath;
+                        hr = psi->GetDisplayName(SIGDN_FILESYSPATH, &pszPath);
+                        if (SUCCEEDED(hr)) {
+                            QString fileName = QString::fromWCharArray(pszPath);
+                            result.append(fileName);
+                            CoTaskMemFree(pszPath);
+                        }
+                        psi->Release(); // Free the current item.
+                    }
+                }
+                psiaResults->Release(); // Free the array of items.
+            }
+        }
+    }
+    QApplicationPrivate::leaveModal(&modal_widget);
+
+    qt_win_eatMouseMove();
+
+    if (!result.isEmpty()) {
+        // Retrieve the current folder name.
+        IShellItem *psi = 0;
+        hr = pfd->GetFolder(&psi);
+        if (SUCCEEDED(hr)) {
+            wchar_t *pszPath;
+            hr = psi->GetDisplayName(SIGDN_FILESYSPATH, &pszPath);
+            if (SUCCEEDED(hr)) {
+                *initialDirectory = QString::fromWCharArray(pszPath);
+                CoTaskMemFree(pszPath);
+            }
+            psi->Release();
+        }
+        // Retrieve the currently selected filter.
+        if (selectedFilter) {
+            quint32 filetype = 0;
+            hr = pfd->GetFileTypeIndex(&filetype);
+            if (SUCCEEDED(hr) && filetype && filetype <= (quint32)filterList.length()) {
+                // This is a one-based index, not zero-based.
+                *selectedFilter = filterList[filetype-1];
+            }
+        }
+    }
+    if (pfd)
+        pfd->Release();
+    return result;
+}
+
+QString qt_win_CID_get_existing_directory(const QFileDialogArgs &args)
+{
+    QString result;
+    QDialog modal_widget;
+    modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
+    modal_widget.setParent(args.parent, Qt::Window);
+    QApplicationPrivate::enterModal(&modal_widget);
+
+    IFileOpenDialog *pfd = 0;
+    HRESULT hr = CoCreateInstance(QT_CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER,
+                                  QT_IID_IFileOpenDialog, reinterpret_cast<void**>(&pfd));
+
+    if (SUCCEEDED(hr)) {
+        qt_win_set_IFileDialogOptions(pfd, args.selection,
+                                      args.directory, args.caption,
+                                      QStringList(), QFileDialog::ExistingFile,
+                                      args.options);
+
+        // Set the FOS_PICKFOLDERS flag
+        DWORD newOptions;
+        hr = pfd->GetOptions(&newOptions);
+        newOptions |= (FOS_PICKFOLDERS | FOS_FORCEFILESYSTEM);
+        if (SUCCEEDED(hr) && SUCCEEDED((hr = pfd->SetOptions(newOptions)))) {
+            QWidget *parentWindow = args.parent;
+            if (parentWindow)
+                parentWindow = parentWindow->window();
+            else
+                parentWindow = QApplication::activeWindow();
+
+            // Show the file dialog.
+            hr = pfd->Show(parentWindow ? parentWindow->winId() : 0);
+            if (SUCCEEDED(hr)) {
+                // Retrieve the result
+                IShellItem *psi = 0;
+                hr = pfd->GetResult(&psi);
+                if (SUCCEEDED(hr)) {
+                    // Retrieve the file name from shell item.
+                    wchar_t *pszPath;
+                    hr = psi->GetDisplayName(SIGDN_FILESYSPATH, &pszPath);
+                    if (SUCCEEDED(hr)) {
+                        result = QString::fromWCharArray(pszPath);
+                        CoTaskMemFree(pszPath);
+                    }
+                    psi->Release(); // Free the current item.
+                }
+            }
+        }
+    }
+    QApplicationPrivate::leaveModal(&modal_widget);
+
+    qt_win_eatMouseMove();
+
+    if (pfd)
+        pfd->Release();
+    return result;
+}
+
+#endif
+
+QStringList qt_win_get_open_file_names(const QFileDialogArgs &args,
+                                       QString *initialDirectory,
+                                       QString *selectedFilter)
+{
+    QFileInfo fi;
+    QDir dir;
+
+    if (initialDirectory && initialDirectory->left(5) == QLatin1String("file:"))
+        initialDirectory->remove(0, 5);
+    fi = QFileInfo(*initialDirectory);
+
+    if (initialDirectory && !fi.isDir()) {
+        *initialDirectory = fi.absolutePath();
+    }
+
+    if (!fi.exists())
+        *initialDirectory = QDir::homePath();
+
+    DWORD selFilIdx = 0;
+
+    QStringList filterLst = qt_win_make_filters_list(args.filter);
+    int idx = 0;
+    if (selectedFilter) {
+        idx = filterLst.indexOf(*selectedFilter);
+    }
+    // Windows Vista (& above) allows users to search from file dialogs. If user selects
+    // multiple files belonging to different folders from these search results, the
+    // GetOpenFileName() will return only one folder name for all the files. To retrieve
+    // the correct path for all selected files, we have to use Common Item Dialog interfaces.
+#ifndef Q_WS_WINCE
+    if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))
+        return qt_win_CID_get_open_file_names(args, initialDirectory, filterLst, selectedFilter, idx);
+#endif
+
+    QStringList result;
+    QDialog modal_widget;
+    modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
+    modal_widget.setParent(args.parent, Qt::Window);
+    QApplicationPrivate::enterModal(&modal_widget);
+
+    bool hideFiltersDetails = args.options & QFileDialog::HideNameFilterDetails;
+    OPENFILENAME* ofn = qt_win_make_OFN(args.parent, args.selection,
+                                        args.directory, args.caption,
+                                        qt_win_filter(args.filter, hideFiltersDetails),
+                                        QFileDialog::ExistingFiles,
+                                        args.options);
+    if (idx)
+        ofn->nFilterIndex = idx + 1;
+    if (GetOpenFileName(ofn)) {
+        QString fileOrDir = QString::fromWCharArray(ofn->lpstrFile);
+        selFilIdx = ofn->nFilterIndex;
+        int offset = fileOrDir.length() + 1;
+        if (ofn->lpstrFile[offset] == 0) {
+            // Only one file selected; has full path
+            fi.setFile(fileOrDir);
+            QString res = fi.absoluteFilePath();
+            if (!res.isEmpty())
+                result.append(res);
+        }
+        else {
+            // Several files selected; first string is path
+            dir.setPath(fileOrDir);
+            QString f;
+            while(!(f = QString::fromWCharArray(ofn->lpstrFile + offset)).isEmpty()) {
+                fi.setFile(dir, f);
+                QString res = fi.absoluteFilePath();
+                if (!res.isEmpty())
+                    result.append(res);
+                offset += f.length() + 1;
+            }
+        }
+    }
+    qt_win_clean_up_OFN(&ofn);
+
+    QApplicationPrivate::leaveModal(&modal_widget);
+
+    qt_win_eatMouseMove();
+
+    if (!result.isEmpty()) {
+        *initialDirectory = fi.path();    // only save the path if there is a result
+        if (selectedFilter)
+            *selectedFilter = qt_win_selected_filter(args.filter, selFilIdx);
+    }
+    return result;
+}
+
+// MFC Directory Dialog. Contrib: Steve Williams (minor parts from Scott Powers)
+
+static int __stdcall winGetExistDirCallbackProc(HWND hwnd,
+                                                UINT uMsg,
+                                                LPARAM lParam,
+                                                LPARAM lpData)
+{
+    if (uMsg == BFFM_INITIALIZED && lpData != 0) {
+        QString *initDir = (QString *)(lpData);
+        if (!initDir->isEmpty()) {
+            SendMessage(hwnd, BFFM_SETSELECTION, TRUE, LPARAM(initDir->utf16()));
+        }
+    } else if (uMsg == BFFM_SELCHANGED) {
+        qt_win_resolve_libs();
+        if (ptrSHGetPathFromIDList) {
+            wchar_t path[MAX_PATH];
+            ptrSHGetPathFromIDList(qt_LPITEMIDLIST(lParam), path);
+            QString tmpStr = QString::fromWCharArray(path);
+            if (!tmpStr.isEmpty())
+                SendMessage(hwnd, BFFM_ENABLEOK, 1, 1);
+            else
+                SendMessage(hwnd, BFFM_ENABLEOK, 0, 0);
+            SendMessage(hwnd, BFFM_SETSTATUSTEXT, 1, LPARAM(path));
+        }
+    }
+    return 0;
+}
+
+QString qt_win_get_existing_directory(const QFileDialogArgs &args)
+{
+#ifndef Q_WS_WINCE
+    if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))
+        return qt_win_CID_get_existing_directory(args);
+#endif
+
+    QString currentDir = QDir::currentPath();
+    QString result;
+    QWidget *parent = args.parent;
+    if (parent)
+        parent = parent->window();
+    else
+        parent = QApplication::activeWindow();
+    if (parent)
+        parent->createWinId();
+
+    QDialog modal_widget;
+    modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
+    modal_widget.setParent(parent, Qt::Window);
+    QApplicationPrivate::enterModal(&modal_widget);
+
+    QString initDir = QDir::toNativeSeparators(args.directory);
+    wchar_t path[MAX_PATH];
+    wchar_t initPath[MAX_PATH];
+    initPath[0] = 0;
+    path[0] = 0;
+    tTitle = args.caption;
+
+    qt_BROWSEINFO bi;
+
+    Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
+    bi.hwndOwner = (parent ? parent->winId() : 0);
+    bi.pidlRoot = NULL;
+    //### This does not seem to be respected? - the dialog always displays "Browse for folder"
+    bi.lpszTitle = (wchar_t*)tTitle.utf16();
+    bi.pszDisplayName = initPath;
+    bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE;
+    bi.lpfn = winGetExistDirCallbackProc;
+    bi.lParam = LPARAM(&initDir);
+
+    qt_win_resolve_libs();
+    if (ptrSHBrowseForFolder) {
+        qt_LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder(&bi);
+        if (pItemIDList) {
+            ptrSHGetPathFromIDList(pItemIDList, path);
+            IMalloc *pMalloc;
+            if (ptrSHGetMalloc(&pMalloc) == NOERROR) {
+                pMalloc->Free(pItemIDList);
+                pMalloc->Release();
+                result = QString::fromWCharArray(path);
+            }
+        }
+    }
+    tTitle = QString();
+
+    QApplicationPrivate::leaveModal(&modal_widget);
+
+    qt_win_eatMouseMove();
+
+    if (!result.isEmpty())
+        result.replace(QLatin1Char('\\'), QLatin1Char('/'));
+    return result;
+}
+
+
+QT_END_NAMESPACE
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qfileinfogatherer.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,355 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qfileinfogatherer_p.h"
+#include <qdebug.h>
+#include <qfsfileengine.h>
+#include <qdiriterator.h>
+#ifndef Q_OS_WIN
+#  include <unistd.h>
+#  include <sys/types.h>
+#endif
+#if defined(Q_OS_VXWORKS)
+#  include "qplatformdefs.h"
+#endif
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_FILESYSTEMMODEL
+
+#ifdef QT_BUILD_INTERNAL
+static bool fetchedRoot = false;
+Q_AUTOTEST_EXPORT void qt_test_resetFetchedRoot()
+{
+    fetchedRoot = false;
+}
+
+Q_AUTOTEST_EXPORT bool qt_test_isFetchedRoot()
+{
+    return fetchedRoot;
+}
+#endif
+
+/*!
+    Creates thread
+*/
+QFileInfoGatherer::QFileInfoGatherer(QObject *parent)
+    : QThread(parent), abort(false),
+#ifndef QT_NO_FILESYSTEMWATCHER
+      watcher(0),
+#endif
+      m_resolveSymlinks(false), m_iconProvider(&defaultProvider)
+{
+#ifdef Q_OS_WIN
+    m_resolveSymlinks = true;
+#elif !defined(Q_OS_INTEGRITY) && !defined(Q_OS_VXWORKS)
+    userId = getuid();
+    groupId = getgid();
+#endif
+#ifndef QT_NO_FILESYSTEMWATCHER
+    watcher = new QFileSystemWatcher(this);
+    connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(list(QString)));
+    connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(updateFile(QString)));
+#endif
+    start(LowPriority);
+}
+
+/*!
+    Destroys thread
+*/
+QFileInfoGatherer::~QFileInfoGatherer()
+{
+    QMutexLocker locker(&mutex);
+    abort = true;
+    condition.wakeOne();
+    locker.unlock();
+    wait();
+}
+
+void QFileInfoGatherer::setResolveSymlinks(bool enable)
+{
+    Q_UNUSED(enable);
+#ifdef Q_OS_WIN
+    QMutexLocker locker(&mutex);
+    m_resolveSymlinks = enable;
+#endif
+}
+
+bool QFileInfoGatherer::resolveSymlinks() const
+{
+    return m_resolveSymlinks;
+}
+
+void QFileInfoGatherer::setIconProvider(QFileIconProvider *provider)
+{
+    QMutexLocker locker(&mutex);
+    m_iconProvider = provider;
+}
+
+QFileIconProvider *QFileInfoGatherer::iconProvider() const
+{
+    return m_iconProvider;
+}
+
+/*!
+    Fetch extended information for all \a files in \a path
+
+    \sa updateFile(), update(), resolvedName()
+*/
+void QFileInfoGatherer::fetchExtendedInformation(const QString &path, const QStringList &files)
+{
+    QMutexLocker locker(&mutex);
+    // See if we already have this dir/file in our que
+    int loc = this->path.lastIndexOf(path);
+    while (loc > 0)  {
+        if (this->files.at(loc) == files) {
+            return;
+        }
+        loc = this->path.lastIndexOf(path, loc - 1);
+    }
+    this->path.push(path);
+    this->files.push(files);
+    condition.wakeAll();
+}
+
+/*!
+    Fetch extended information for all \a filePath
+
+    \sa fetchExtendedInformation()
+*/
+void QFileInfoGatherer::updateFile(const QString &filePath)
+{
+    QString dir = filePath.mid(0, filePath.lastIndexOf(QDir::separator()));
+    QString fileName = filePath.mid(dir.length() + 1);
+    fetchExtendedInformation(dir, QStringList(fileName));
+}
+
+/*
+    List all files in \a directoryPath
+
+    \sa listed()
+*/
+void QFileInfoGatherer::clear()
+{
+#ifndef QT_NO_FILESYSTEMWATCHER
+    QMutexLocker locker(&mutex);
+    watcher->removePaths(watcher->files());
+    watcher->removePaths(watcher->directories());
+#endif
+}
+
+/*
+    Remove a \a path from the watcher
+
+    \sa listed()
+*/
+void QFileInfoGatherer::removePath(const QString &path)
+{
+#ifndef QT_NO_FILESYSTEMWATCHER
+    QMutexLocker locker(&mutex);
+    watcher->removePath(path);
+#endif
+}
+
+/*
+    List all files in \a directoryPath
+
+    \sa listed()
+*/
+void QFileInfoGatherer::list(const QString &directoryPath)
+{
+    fetchExtendedInformation(directoryPath, QStringList());
+}
+
+/*
+    Until aborted wait to fetch a directory or files
+*/
+void QFileInfoGatherer::run()
+{
+    forever {
+        bool updateFiles = false;
+        QMutexLocker locker(&mutex);
+        if (abort) {
+            return;
+        }
+        if (this->path.isEmpty())
+            condition.wait(&mutex);
+        QString path;
+        QStringList list;
+        if (!this->path.isEmpty()) {
+            path = this->path.first();
+            list = this->files.first();
+            this->path.pop_front();
+            this->files.pop_front();
+            updateFiles = true;
+        }
+        locker.unlock();
+        if (updateFiles)
+            getFileInfos(path, list);
+    }
+}
+
+QExtendedInformation QFileInfoGatherer::getInfo(const QFileInfo &fileInfo) const
+{
+    QExtendedInformation info(fileInfo);
+    info.icon = m_iconProvider->icon(fileInfo);
+    info.displayType = m_iconProvider->type(fileInfo);
+#ifndef QT_NO_FILESYSTEMWATCHER
+    // ### Not ready to listen all modifications
+    #if 0
+        // Enable the next two commented out lines to get updates when the file sizes change...
+        if (!fileInfo.exists() && !fileInfo.isSymLink()) {
+            info.size = -1;
+            //watcher->removePath(fileInfo.absoluteFilePath());
+        } else {
+            if (!fileInfo.absoluteFilePath().isEmpty() && fileInfo.exists() && fileInfo.isReadable()
+                && !watcher->files().contains(fileInfo.absoluteFilePath())) {
+                //watcher->addPath(fileInfo.absoluteFilePath());
+            }
+        }
+    #endif
+#endif
+
+    if (m_resolveSymlinks && info.isSymLink(/* ignoreNtfsSymLinks = */ true)) {
+        QFileInfo resolvedInfo(fileInfo.symLinkTarget());
+        resolvedInfo = resolvedInfo.canonicalFilePath();
+        if (resolvedInfo.exists()) {
+            emit nameResolved(fileInfo.filePath(), resolvedInfo.fileName());
+        }
+    }
+    return info;
+}
+
+QString QFileInfoGatherer::translateDriveName(const QFileInfo &drive) const
+{
+    QString driveName = drive.absoluteFilePath();
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+    if (driveName.startsWith(QLatin1Char('/'))) // UNC host
+        return drive.fileName();
+#endif
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
+    if (driveName.endsWith(QLatin1Char('/')))
+        driveName.chop(1);
+#endif
+    return driveName;
+}
+
+/*
+    Get specific file info's, batch the files so update when we have 100
+    items and every 200ms after that
+ */
+void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &files)
+{
+#ifndef QT_NO_FILESYSTEMWATCHER
+    if (files.isEmpty()
+        && !watcher->directories().contains(path)
+        && !path.isEmpty()
+        && !path.startsWith(QLatin1String("//")) /*don't watch UNC path*/) {
+        watcher->addPath(path);
+    }
+#endif
+
+    // List drives
+    if (path.isEmpty()) {
+#ifdef QT_BUILD_INTERNAL
+        fetchedRoot = true;
+#endif
+        QFileInfoList infoList;
+        if (files.isEmpty()) {
+            infoList = QDir::drives();
+        } else {
+            for (int i = 0; i < files.count(); ++i)
+                infoList << QFileInfo(files.at(i));
+        }
+        for (int i = infoList.count() - 1; i >= 0; --i) {
+            QString driveName = translateDriveName(infoList.at(i));
+            QList<QPair<QString,QFileInfo> > updatedFiles;
+            updatedFiles.append(QPair<QString,QFileInfo>(driveName, infoList.at(i)));
+            emit updates(path, updatedFiles);
+        }
+        return;
+    }
+
+    QElapsedTimer base;
+    base.start();
+    QFileInfo fileInfo;
+    bool firstTime = true;
+    QList<QPair<QString, QFileInfo> > updatedFiles;
+    QStringList filesToCheck = files;
+
+    QString itPath = QDir::fromNativeSeparators(files.isEmpty() ? path : QLatin1String(""));
+    QDirIterator dirIt(itPath, QDir::AllEntries | QDir::System | QDir::Hidden);
+    QStringList allFiles;
+    while(!abort && dirIt.hasNext()) {
+        dirIt.next();
+        fileInfo = dirIt.fileInfo();
+        allFiles.append(fileInfo.fileName());
+	fetch(fileInfo, base, firstTime, updatedFiles, path);
+    }
+    if (!allFiles.isEmpty())
+        emit newListOfFiles(path, allFiles);
+
+    QStringList::const_iterator filesIt = filesToCheck.constBegin();
+    while(!abort && filesIt != filesToCheck.constEnd()) {
+        fileInfo.setFile(path + QDir::separator() + *filesIt);
+        ++filesIt;
+        fetch(fileInfo, base, firstTime, updatedFiles, path);
+    }
+    if (!updatedFiles.isEmpty())
+        emit updates(path, updatedFiles);
+    emit directoryLoaded(path);
+}
+
+void QFileInfoGatherer::fetch(const QFileInfo &fileInfo, QElapsedTimer &base, bool &firstTime, QList<QPair<QString, QFileInfo> > &updatedFiles, const QString &path) {
+    updatedFiles.append(QPair<QString, QFileInfo>(fileInfo.fileName(), fileInfo));
+    QElapsedTimer current;
+    current.start();
+    if ((firstTime && updatedFiles.count() > 100) || base.msecsTo(current) > 1000) {
+        emit updates(path, updatedFiles);
+        updatedFiles.clear();
+        base = current;
+        firstTime = false;
+    }
+}
+
+#endif // QT_NO_FILESYSTEMMODEL
+
+QT_END_NAMESPACE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qfilesystemmodel.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,2030 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qfilesystemmodel_p.h"
+#include "qfilesystemmodel.h"
+#include <qlocale.h>
+#include <qmime.h>
+#include <qurl.h>
+#include <qdebug.h>
+#include <qmessagebox.h>
+#include <qapplication.h>
+
+#ifdef Q_OS_WIN
+#include <qt_windows.h>
+#endif
+#ifdef Q_OS_WIN32
+#include <QtCore/QVarLengthArray>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_FILESYSTEMMODEL
+
+/*!
+    \enum QFileSystemModel::Roles
+    \value FileIconRole
+    \value FilePathRole
+    \value FileNameRole
+    \value FilePermissions
+*/
+
+/*!
+    \class QFileSystemModel
+    \since 4.4
+
+    \brief The QFileSystemModel class provides a data model for the local filesystem.
+
+    \ingroup model-view
+
+    This class provides access to the local filesystem, providing functions
+    for renaming and removing files and directories, and for creating new
+    directories. In the simplest case, it can be used with a suitable display
+    widget as part of a browser or filter.
+
+    QFileSystemModel can be accessed using the standard interface provided by
+    QAbstractItemModel, but it also provides some convenience functions that are
+    specific to a directory model.
+    The fileInfo(), isDir(), name(), and path() functions provide information
+    about the underlying files and directories related to items in the model.
+    Directories can be created and removed using mkdir(), rmdir().
+
+    \note QFileSystemModel requires an instance of a GUI application.
+
+    \section1 Example Usage
+
+    A directory model that displays the contents of a default directory
+    is usually constructed with a parent object:
+
+    \snippet doc/src/snippets/shareddirmodel/main.cpp 2
+
+    A tree view can be used to display the contents of the model
+
+    \snippet doc/src/snippets/shareddirmodel/main.cpp 4
+
+    and the contents of a particular directory can be displayed by
+    setting the tree view's root index:
+
+    \snippet doc/src/snippets/shareddirmodel/main.cpp 7
+
+    The view's root index can be used to control how much of a
+    hierarchical model is displayed. QDirModel provides a convenience
+    function that returns a suitable model index for a path to a
+    directory within the model.
+
+    \section1 Caching and Performance
+
+    QFileSystemModel will not fetch any files or directories until setRootPath()
+    is called.  This will prevent any unnecessary querying on the file system
+    until that point such as listing the drives on Windows.
+
+    Unlike QDirModel, QFileSystemModel uses a separate thread to populate
+    itself so it will not cause the main thread to hang as the file system
+    is being queried.  Calls to rowCount() will return 0 until the model
+    populates a directory.
+
+    QFileSystemModel keeps a cache with file information. The cache is
+    automatically kept up to date using the QFileSystemWatcher.
+
+    \sa {Model Classes}
+*/
+
+/*!
+    \fn bool QFileSystemModel::rmdir(const QModelIndex &index) const
+
+    Removes the directory corresponding to the model item \a index in the
+    file system model and \bold{deletes the corresponding directory from the
+    file system}, returning true if successful. If the directory cannot be
+    removed, false is returned.
+
+    \warning This function deletes directories from the file system; it does
+    \bold{not} move them to a location where they can be recovered.
+
+    \sa remove()
+*/
+
+/*!
+    \fn QIcon QFileSystemModel::fileName(const QModelIndex &index) const
+
+    Returns the file name for the item stored in the model under the given
+    \a index.
+*/
+
+/*!
+    \fn QIcon QFileSystemModel::fileIcon(const QModelIndex &index) const
+
+    Returns the icon for the item stored in the model under the given
+    \a index.
+*/
+
+/*!
+    \fn QFileInfo QFileSystemModel::fileInfo(const QModelIndex &index) const
+
+    Returns the QFileInfo for the item stored in the model under the given
+    \a index.
+*/
+
+/*!
+    \fn void QFileSystemModel::rootPathChanged(const QString &newPath);
+
+    This signal is emitted whenever the root path has been changed to a \a newPath.
+*/
+
+/*!
+    \fn void QFileSystemModel::fileRenamed(const QString &path, const QString &oldName, const QString &newName)
+
+    This signal is emitted whenever a file with the \a oldName is successfully
+    renamed to \a newName.  The file is located in in the directory \a path.
+*/
+
+/*!
+    \since 4.7
+    \fn void QFileSystemModel::directoryLoaded(const QString &path)
+
+    This signal is emitted when the gatherer thread has finished to load the \a path.
+
+*/
+
+/*!
+    \fn bool QFileSystemModel::remove(const QModelIndex &index) const
+
+    Removes the model item \a index from the file system model and \bold{deletes the
+    corresponding file from the file system}, returning true if successful. If the
+    item cannot be removed, false is returned.
+
+    \warning This function deletes files from the file system; it does \bold{not}
+    move them to a location where they can be recovered.
+
+    \sa rmdir()
+*/
+
+bool QFileSystemModel::remove(const QModelIndex &aindex) const
+{
+    //### TODO optim
+    QString path = filePath(aindex);
+    QFileSystemModelPrivate * d = const_cast<QFileSystemModelPrivate*>(d_func());
+    d->fileInfoGatherer.removePath(path);
+    QDirIterator it(path,
+            QDir::AllDirs | QDir:: Files | QDir::NoDotAndDotDot,
+            QDirIterator::Subdirectories);
+    QStringList children;
+    while (it.hasNext())
+        children.prepend(it.next());
+    children.append(path);
+
+    bool error = false;
+    for (int i = 0; i < children.count(); ++i) {
+        QFileInfo info(children.at(i));
+        QModelIndex modelIndex = index(children.at(i));
+        if (info.isDir()) {
+            QDir dir;
+            if (children.at(i) != path)
+                error |= remove(modelIndex);
+            error |= rmdir(modelIndex);
+        } else {
+            error |= QFile::remove(filePath(modelIndex));
+        }
+    }
+    return error;
+}
+
+/*!
+  Constructs a file system model with the given \a parent.
+*/
+QFileSystemModel::QFileSystemModel(QObject *parent)
+    : QAbstractItemModel(*new QFileSystemModelPrivate, parent)
+{
+    Q_D(QFileSystemModel);
+    d->init();
+}
+
+/*!
+    \internal
+*/
+QFileSystemModel::QFileSystemModel(QFileSystemModelPrivate &dd, QObject *parent)
+    : QAbstractItemModel(dd, parent)
+{
+    Q_D(QFileSystemModel);
+    d->init();
+}
+
+/*!
+  Destroys this file system model.
+*/
+QFileSystemModel::~QFileSystemModel()
+{
+}
+
+/*!
+    \reimp
+*/
+QModelIndex QFileSystemModel::index(int row, int column, const QModelIndex &parent) const
+{
+    Q_D(const QFileSystemModel);
+    if (row < 0 || column < 0 || row >= rowCount(parent) || column >= columnCount(parent))
+        return QModelIndex();
+
+    // get the parent node
+    QFileSystemModelPrivate::QFileSystemNode *parentNode = (d->indexValid(parent) ? d->node(parent) :
+                                                   const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&d->root));
+    Q_ASSERT(parentNode);
+
+    // now get the internal pointer for the index
+    QString childName = parentNode->visibleChildren[d->translateVisibleLocation(parentNode, row)];
+    const QFileSystemModelPrivate::QFileSystemNode *indexNode = parentNode->children.value(childName);
+    Q_ASSERT(indexNode);
+
+    return createIndex(row, column, const_cast<QFileSystemModelPrivate::QFileSystemNode*>(indexNode));
+}
+
+/*!
+    \overload
+
+    Returns the model item index for the given \a path and \a column.
+*/
+QModelIndex QFileSystemModel::index(const QString &path, int column) const
+{
+    Q_D(const QFileSystemModel);
+    QFileSystemModelPrivate::QFileSystemNode *node = d->node(path, false);
+    QModelIndex idx = d->index(node);
+    if (idx.column() != column)
+        idx = idx.sibling(idx.row(), column);
+    return idx;
+}
+
+/*!
+    \internal
+
+    Return the QFileSystemNode that goes to index.
+  */
+QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QModelIndex &index) const
+{
+    if (!index.isValid())
+        return const_cast<QFileSystemNode*>(&root);
+    QFileSystemModelPrivate::QFileSystemNode *indexNode = static_cast<QFileSystemModelPrivate::QFileSystemNode*>(index.internalPointer());
+    Q_ASSERT(indexNode);
+    return indexNode;
+}
+
+#ifdef Q_OS_WIN32
+static QString qt_GetLongPathName(const QString &strShortPath)
+{
+    if (strShortPath.isEmpty()
+        || strShortPath == QLatin1String(".") || strShortPath == QLatin1String(".."))
+        return strShortPath;
+    if (strShortPath.length() == 2 && strShortPath.endsWith(QLatin1Char(':')))
+        return strShortPath.toUpper();
+    const QString absPath = QDir(strShortPath).absolutePath();
+    if (absPath.startsWith(QLatin1String("//"))
+        || absPath.startsWith(QLatin1String("\\\\"))) // unc
+        return QDir::fromNativeSeparators(absPath);
+    if (absPath.startsWith(QLatin1Char('/')))
+        return QString();
+    const QString inputString = QLatin1String("\\\\?\\") + QDir::toNativeSeparators(absPath);
+    QVarLengthArray<TCHAR, MAX_PATH> buffer(MAX_PATH);
+    DWORD result = ::GetLongPathName((wchar_t*)inputString.utf16(),
+                                     buffer.data(),
+                                     buffer.size());
+    if (result > DWORD(buffer.size())) {
+        buffer.resize(result);
+        result = ::GetLongPathName((wchar_t*)inputString.utf16(),
+                                   buffer.data(),
+                                   buffer.size());
+    }
+    if (result > 4) {
+        QString longPath = QString::fromWCharArray(buffer.data() + 4); // ignoring prefix
+        longPath[0] = longPath.at(0).toUpper(); // capital drive letters
+        return QDir::fromNativeSeparators(longPath);
+    } else {
+        return QDir::fromNativeSeparators(strShortPath);
+    }
+}
+#endif
+
+/*!
+    \internal
+
+    Given a path return the matching QFileSystemNode or &root if invalid
+*/
+QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QString &path, bool fetch) const
+{
+    Q_Q(const QFileSystemModel);
+    Q_UNUSED(q);
+    if (path.isEmpty() || path == myComputer() || path.startsWith(QLatin1Char(':')))
+        return const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&root);
+
+    // Construct the nodes up to the new root path if they need to be built
+    QString absolutePath;
+#ifdef Q_OS_WIN32
+    QString longPath = qt_GetLongPathName(path);
+#else
+    QString longPath = path;
+#endif
+    if (longPath == rootDir.path())
+        absolutePath = rootDir.absolutePath();
+    else
+        absolutePath = QDir(longPath).absolutePath();
+
+    // ### TODO can we use bool QAbstractFileEngine::caseSensitive() const?
+    QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts);
+    if ((pathElements.isEmpty())
+#if (!defined(Q_OS_WIN) || defined(Q_OS_WINCE)) && !defined(Q_OS_SYMBIAN)
+        && QDir::fromNativeSeparators(longPath) != QLatin1String("/")
+#endif
+        )
+        return const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&root);
+    QModelIndex index = QModelIndex(); // start with "My Computer"
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+    if (absolutePath.startsWith(QLatin1String("//"))) { // UNC path
+        QString host = QLatin1String("\\\\") + pathElements.first();
+        if (absolutePath == QDir::fromNativeSeparators(host))
+            absolutePath.append(QLatin1Char('/'));
+        if (longPath.endsWith(QLatin1Char('/')) && !absolutePath.endsWith(QLatin1Char('/')))
+            absolutePath.append(QLatin1Char('/'));
+        int r = 0;
+        QFileSystemModelPrivate::QFileSystemNode *rootNode = const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&root);
+        if (!root.children.contains(host.toLower())) {
+            if (pathElements.count() == 1 && !absolutePath.endsWith(QLatin1Char('/')))
+                return rootNode;
+            QFileInfo info(host);
+            if (!info.exists())
+                return rootNode;
+            QFileSystemModelPrivate *p = const_cast<QFileSystemModelPrivate*>(this);
+            p->addNode(rootNode, host,info);
+            p->addVisibleFiles(rootNode, QStringList(host));
+        }
+        r = rootNode->visibleLocation(host);
+        r = translateVisibleLocation(rootNode, r);
+        index = q->index(r, 0, QModelIndex());
+        pathElements.pop_front();
+    } else
+#endif
+
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
+    {
+        if (!pathElements.at(0).contains(QLatin1String(":"))) {
+            // The reason we express it like this instead of with anonymous, temporary
+            // variables, is to workaround a compiler crash with Q_CC_NOKIAX86.
+            QString rootPath = QDir(longPath).rootPath();
+            pathElements.prepend(rootPath);
+        }
+        if (pathElements.at(0).endsWith(QLatin1Char('/')))
+            pathElements[0].chop(1);
+    }
+#else
+    // add the "/" item, since it is a valid path element on Unix
+    if (absolutePath[0] == QLatin1Char('/'))
+        pathElements.prepend(QLatin1String("/"));
+#endif
+
+    QFileSystemModelPrivate::QFileSystemNode *parent = node(index);
+
+    for (int i = 0; i < pathElements.count(); ++i) {
+        QString element = pathElements.at(i);
+#ifdef Q_OS_WIN
+        // On Windows, "filename......." and "filename" are equivalent Task #133928
+        while (element.endsWith(QLatin1Char('.')))
+            element.chop(1);
+#endif
+        bool alreadyExisted = parent->children.contains(element);
+
+        // we couldn't find the path element, we create a new node since we
+        // _know_ that the path is valid
+        if (alreadyExisted) {
+            if ((parent->children.count() == 0)
+                || (parent->caseSensitive()
+                    && parent->children.value(element)->fileName != element)
+                || (!parent->caseSensitive()
+                    && parent->children.value(element)->fileName.toLower() != element.toLower()))
+                alreadyExisted = false;
+        }
+
+        QFileSystemModelPrivate::QFileSystemNode *node;
+        if (!alreadyExisted) {
+            // Someone might call ::index("file://cookie/monster/doesn't/like/veggies"),
+            // a path that doesn't exists, I.E. don't blindly create directories.
+            QFileInfo info(absolutePath);
+            if (!info.exists())
+                return const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&root);
+            QFileSystemModelPrivate *p = const_cast<QFileSystemModelPrivate*>(this);
+            node = p->addNode(parent, element,info);
+#ifndef QT_NO_FILESYSTEMWATCHER
+            node->populate(fileInfoGatherer.getInfo(info));
+#endif
+        } else {
+            node = parent->children.value(element);
+        }
+
+        Q_ASSERT(node);
+        if (!node->isVisible) {
+            // It has been filtered out
+            if (alreadyExisted && node->hasInformation() && !fetch)
+                return const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&root);
+
+            QFileSystemModelPrivate *p = const_cast<QFileSystemModelPrivate*>(this);
+            p->addVisibleFiles(parent, QStringList(element));
+            if (!p->bypassFilters.contains(node))
+                p->bypassFilters[node] = 1;
+            QString dir = q->filePath(this->index(parent));
+            if (!node->hasInformation() && fetch) {
+                Fetching f;
+                f.dir = dir;
+                f.file = element;
+                f.node = node;
+                p->toFetch.append(f);
+                p->fetchingTimer.start(0, const_cast<QFileSystemModel*>(q));
+            }
+        }
+        parent = node;
+    }
+
+    return parent;
+}
+
+/*!
+    \reimp
+*/
+void QFileSystemModel::timerEvent(QTimerEvent *event)
+{
+    Q_D(QFileSystemModel);
+    if (event->timerId() == d->fetchingTimer.timerId()) {
+        d->fetchingTimer.stop();
+#ifndef QT_NO_FILESYSTEMWATCHER
+        for (int i = 0; i < d->toFetch.count(); ++i) {
+            const QFileSystemModelPrivate::QFileSystemNode *node = d->toFetch.at(i).node;
+            if (!node->hasInformation()) {
+                d->fileInfoGatherer.fetchExtendedInformation(d->toFetch.at(i).dir,
+                                                 QStringList(d->toFetch.at(i).file));
+            } else {
+                // qDebug() << "yah!, you saved a little gerbil soul";
+            }
+        }
+#endif
+        d->toFetch.clear();
+    }
+}
+
+/*!
+    Returns true if the model item \a index represents a directory;
+    otherwise returns false.
+*/
+bool QFileSystemModel::isDir(const QModelIndex &index) const
+{
+    // This function is for public usage only because it could create a file info
+    Q_D(const QFileSystemModel);
+    if (!index.isValid())
+        return true;
+    QFileSystemModelPrivate::QFileSystemNode *n = d->node(index);
+    if (n->hasInformation())
+        return n->isDir();
+    return fileInfo(index).isDir();
+}
+
+/*!
+    Returns the size in bytes of \a index. If the file does not exist, 0 is returned.
+  */
+qint64 QFileSystemModel::size(const QModelIndex &index) const
+{
+    Q_D(const QFileSystemModel);
+    if (!index.isValid())
+        return 0;
+    return d->node(index)->size();
+}
+
+/*!
+    Returns the type of file \a index such as "Directory" or "JPEG file".
+  */
+QString QFileSystemModel::type(const QModelIndex &index) const
+{
+    Q_D(const QFileSystemModel);
+    if (!index.isValid())
+        return QString();
+    return d->node(index)->type();
+}
+
+/*!
+    Returns the date and time when \a index was last modified.
+ */
+QDateTime QFileSystemModel::lastModified(const QModelIndex &index) const
+{
+    Q_D(const QFileSystemModel);
+    if (!index.isValid())
+        return QDateTime();
+    return d->node(index)->lastModified();
+}
+
+/*!
+    \reimp
+*/
+QModelIndex QFileSystemModel::parent(const QModelIndex &index) const
+{
+    Q_D(const QFileSystemModel);
+    if (!d->indexValid(index))
+        return QModelIndex();
+
+    QFileSystemModelPrivate::QFileSystemNode *indexNode = d->node(index);
+    Q_ASSERT(indexNode != 0);
+    QFileSystemModelPrivate::QFileSystemNode *parentNode = (indexNode ? indexNode->parent : 0);
+    if (parentNode == 0 || parentNode == &d->root)
+        return QModelIndex();
+
+    // get the parent's row
+    QFileSystemModelPrivate::QFileSystemNode *grandParentNode = parentNode->parent;
+    Q_ASSERT(grandParentNode->children.contains(parentNode->fileName));
+    int visualRow = d->translateVisibleLocation(grandParentNode, grandParentNode->visibleLocation(grandParentNode->children.value(parentNode->fileName)->fileName));
+    if (visualRow == -1)
+        return QModelIndex();
+    return createIndex(visualRow, 0, parentNode);
+}
+
+/*
+    \internal
+
+    return the index for node
+*/
+QModelIndex QFileSystemModelPrivate::index(const QFileSystemModelPrivate::QFileSystemNode *node) const
+{
+    Q_Q(const QFileSystemModel);
+    QFileSystemModelPrivate::QFileSystemNode *parentNode = (node ? node->parent : 0);
+    if (node == &root || !parentNode)
+        return QModelIndex();
+
+    // get the parent's row
+    Q_ASSERT(node);
+    if (!node->isVisible)
+        return QModelIndex();
+
+    int visualRow = translateVisibleLocation(parentNode, parentNode->visibleLocation(node->fileName));
+    return q->createIndex(visualRow, 0, const_cast<QFileSystemNode*>(node));
+}
+
+/*!
+    \reimp
+*/
+bool QFileSystemModel::hasChildren(const QModelIndex &parent) const
+{
+    Q_D(const QFileSystemModel);
+    if (parent.column() > 0)
+        return false;
+
+    if (!parent.isValid()) // drives
+        return true;
+
+    const QFileSystemModelPrivate::QFileSystemNode *indexNode = d->node(parent);
+    Q_ASSERT(indexNode);
+    return (indexNode->isDir());
+}
+
+/*!
+    \reimp
+ */
+bool QFileSystemModel::canFetchMore(const QModelIndex &parent) const
+{
+    Q_D(const QFileSystemModel);
+    const QFileSystemModelPrivate::QFileSystemNode *indexNode = d->node(parent);
+    return (!indexNode->populatedChildren);
+}
+
+/*!
+    \reimp
+ */
+void QFileSystemModel::fetchMore(const QModelIndex &parent)
+{
+    Q_D(QFileSystemModel);
+    if (!d->setRootPath)
+        return;
+    QFileSystemModelPrivate::QFileSystemNode *indexNode = d->node(parent);
+    if (indexNode->populatedChildren)
+        return;
+    indexNode->populatedChildren = true;
+    d->fileInfoGatherer.list(filePath(parent));
+}
+
+/*!
+    \reimp
+*/
+int QFileSystemModel::rowCount(const QModelIndex &parent) const
+{
+    Q_D(const QFileSystemModel);
+    if (parent.column() > 0)
+        return 0;
+
+    if (!parent.isValid())
+        return d->root.visibleChildren.count();
+
+    const QFileSystemModelPrivate::QFileSystemNode *parentNode = d->node(parent);
+    return parentNode->visibleChildren.count();
+}
+
+/*!
+    \reimp
+*/
+int QFileSystemModel::columnCount(const QModelIndex &parent) const
+{
+    return (parent.column() > 0) ? 0 : 4;
+}
+
+/*!
+    Returns the data stored under the given \a role for the item "My Computer".
+
+    \sa Qt::ItemDataRole
+ */
+QVariant QFileSystemModel::myComputer(int role) const
+{
+    Q_D(const QFileSystemModel);
+    switch (role) {
+    case Qt::DisplayRole:
+        return d->myComputer();
+    case Qt::DecorationRole:
+        return d->fileInfoGatherer.iconProvider()->icon(QFileIconProvider::Computer);
+    }
+    return QVariant();
+}
+
+/*!
+    \reimp
+*/
+QVariant QFileSystemModel::data(const QModelIndex &index, int role) const
+{
+    Q_D(const QFileSystemModel);
+    if (!index.isValid() || index.model() != this)
+        return QVariant();
+
+    switch (role) {
+    case Qt::EditRole:
+    case Qt::DisplayRole:
+        switch (index.column()) {
+        case 0: return d->displayName(index);
+        case 1: return d->size(index);
+        case 2: return d->type(index);
+        case 3: return d->time(index);
+        default:
+            qWarning("data: invalid display value column %d", index.column());
+            break;
+        }
+        break;
+    case FilePathRole:
+        return filePath(index);
+    case FileNameRole:
+        return d->name(index);
+    case Qt::DecorationRole:
+        if (index.column() == 0) {
+            QIcon icon = d->icon(index);
+            if (icon.isNull()) {
+                if (d->node(index)->isDir())
+                    icon = d->fileInfoGatherer.iconProvider()->icon(QFileIconProvider::Folder);
+                else
+                    icon = d->fileInfoGatherer.iconProvider()->icon(QFileIconProvider::File);
+            }
+            return icon;
+        }
+        break;
+    case Qt::TextAlignmentRole:
+        if (index.column() == 1)
+            return Qt::AlignRight;
+        break;
+    case FilePermissions:
+        int p = permissions(index);
+        return p;
+    }
+
+    return QVariant();
+}
+
+/*!
+    \internal
+*/
+QString QFileSystemModelPrivate::size(const QModelIndex &index) const
+{
+    if (!index.isValid())
+        return QString();
+    const QFileSystemNode *n = node(index);
+    if (n->isDir()) {
+#ifdef Q_OS_MAC
+        return QLatin1String("--");
+#else
+        return QLatin1String("");
+#endif
+    // Windows   - ""
+    // OS X      - "--"
+    // Konqueror - "4 KB"
+    // Nautilus  - "9 items" (the number of children)
+    }
+    return size(n->size());
+}
+
+QString QFileSystemModelPrivate::size(qint64 bytes)
+{
+    // According to the Si standard KB is 1000 bytes, KiB is 1024
+    // but on windows sizes are calculated by dividing by 1024 so we do what they do.
+    const qint64 kb = 1024;
+    const qint64 mb = 1024 * kb;
+    const qint64 gb = 1024 * mb;
+    const qint64 tb = 1024 * gb;
+    if (bytes >= tb)
+        return QFileSystemModel::tr("%1 TB").arg(QLocale().toString(qreal(bytes) / tb, 'f', 3));
+    if (bytes >= gb)
+        return QFileSystemModel::tr("%1 GB").arg(QLocale().toString(qreal(bytes) / gb, 'f', 2));
+    if (bytes >= mb)
+        return QFileSystemModel::tr("%1 MB").arg(QLocale().toString(qreal(bytes) / mb, 'f', 1));
+    if (bytes >= kb)
+        return QFileSystemModel::tr("%1 KB").arg(QLocale().toString(bytes / kb));
+    return QFileSystemModel::tr("%1 bytes").arg(QLocale().toString(bytes));
+}
+
+/*!
+    \internal
+*/
+QString QFileSystemModelPrivate::time(const QModelIndex &index) const
+{
+    if (!index.isValid())
+        return QString();
+#ifndef QT_NO_DATESTRING
+    return node(index)->lastModified().toString(Qt::SystemLocaleDate);
+#else
+    Q_UNUSED(index);
+    return QString();
+#endif
+}
+
+/*
+    \internal
+*/
+QString QFileSystemModelPrivate::type(const QModelIndex &index) const
+{
+    if (!index.isValid())
+        return QString();
+    return node(index)->type();
+}
+
+/*!
+    \internal
+*/
+QString QFileSystemModelPrivate::name(const QModelIndex &index) const
+{
+    if (!index.isValid())
+        return QString();
+    QFileSystemNode *dirNode = node(index);
+    if (fileInfoGatherer.resolveSymlinks() && !resolvedSymLinks.isEmpty() &&
+        dirNode->isSymLink(/* ignoreNtfsSymLinks = */ true)) {
+        QString fullPath = QDir::fromNativeSeparators(filePath(index));
+        if (resolvedSymLinks.contains(fullPath))
+            return resolvedSymLinks[fullPath];
+    }
+    return dirNode->fileName;
+}
+
+/*!
+    \internal
+*/
+QString QFileSystemModelPrivate::displayName(const QModelIndex &index) const
+{
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+    QFileSystemNode *dirNode = node(index);
+    if (!dirNode->volumeName.isNull())
+        return dirNode->volumeName + QLatin1String(" (") + name(index) + QLatin1Char(')');
+#endif
+    return name(index);
+}
+
+/*!
+    \internal
+*/
+QIcon QFileSystemModelPrivate::icon(const QModelIndex &index) const
+{
+    if (!index.isValid())
+        return QIcon();
+    return node(index)->icon();
+}
+
+/*!
+    \reimp
+*/
+bool QFileSystemModel::setData(const QModelIndex &idx, const QVariant &value, int role)
+{
+    Q_D(QFileSystemModel);
+    if (!idx.isValid()
+        || idx.column() != 0
+        || role != Qt::EditRole
+        || (flags(idx) & Qt::ItemIsEditable) == 0) {
+        return false;
+    }
+
+    QString newName = value.toString();
+    QString oldName = idx.data().toString();
+    if (newName == idx.data().toString())
+        return true;
+
+    if (newName.isEmpty()
+        || QDir::toNativeSeparators(newName).contains(QDir::separator())
+        || !QDir(filePath(parent(idx))).rename(oldName, newName)) {
+#ifndef QT_NO_MESSAGEBOX
+        QMessageBox::information(0, QFileSystemModel::tr("Invalid filename"),
+                                QFileSystemModel::tr("<b>The name \"%1\" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.")
+                                .arg(newName),
+                                 QMessageBox::Ok);
+#endif // QT_NO_MESSAGEBOX
+        return false;
+    } else {
+        /*
+            *After re-naming something we don't want the selection to change*
+            - can't remove rows and later insert
+            - can't quickly remove and insert
+            - index pointer can't change because treeview doesn't use persistant index's
+
+            - if this get any more complicated think of changing it to just
+              use layoutChanged
+         */
+
+        QFileSystemModelPrivate::QFileSystemNode *indexNode = d->node(idx);
+        QFileSystemModelPrivate::QFileSystemNode *parentNode = indexNode->parent;
+        int visibleLocation = parentNode->visibleLocation(parentNode->children.value(indexNode->fileName)->fileName);
+
+        d->addNode(parentNode, newName,indexNode->info->fileInfo());
+        parentNode->visibleChildren.removeAt(visibleLocation);
+        QFileSystemModelPrivate::QFileSystemNode * oldValue = parentNode->children.value(oldName);
+        parentNode->children[newName] = oldValue;
+        QFileInfo info(d->rootDir, newName);
+        oldValue->fileName = newName;
+        oldValue->parent = parentNode;
+        oldValue->populate(d->fileInfoGatherer.getInfo(info));
+        oldValue->isVisible = true;
+
+        parentNode->children.remove(oldName);
+        parentNode->visibleChildren.insert(visibleLocation, newName);
+
+        d->delayedSort();
+        emit fileRenamed(filePath(idx.parent()), oldName, newName);
+    }
+    return true;
+}
+
+/*!
+    \reimp
+*/
+QVariant QFileSystemModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+    switch (role) {
+    case Qt::DecorationRole:
+        if (section == 0) {
+            // ### TODO oh man this is ugly and doesn't even work all the way!
+            // it is still 2 pixels off
+            QImage pixmap(16, 1, QImage::Format_Mono);
+            pixmap.fill(0);
+            pixmap.setAlphaChannel(pixmap.createAlphaMask());
+            return pixmap;
+        }
+        break;
+    case Qt::TextAlignmentRole:
+        return Qt::AlignLeft;
+    }
+
+    if (orientation != Qt::Horizontal || role != Qt::DisplayRole)
+        return QAbstractItemModel::headerData(section, orientation, role);
+
+    QString returnValue;
+    switch (section) {
+    case 0: returnValue = tr("Name");
+            break;
+    case 1: returnValue = tr("Size");
+            break;
+    case 2: returnValue =
+#ifdef Q_OS_MAC
+                   tr("Kind", "Match OS X Finder");
+#else
+                   tr("Type", "All other platforms");
+#endif
+           break;
+    // Windows   - Type
+    // OS X      - Kind
+    // Konqueror - File Type
+    // Nautilus  - Type
+    case 3: returnValue = tr("Date Modified");
+            break;
+    default: return QVariant();
+    }
+    return returnValue;
+}
+
+/*!
+    \reimp
+*/
+Qt::ItemFlags QFileSystemModel::flags(const QModelIndex &index) const
+{
+    Q_D(const QFileSystemModel);
+    Qt::ItemFlags flags = QAbstractItemModel::flags(index);
+    if (!index.isValid())
+        return flags;
+
+    QFileSystemModelPrivate::QFileSystemNode *indexNode = d->node(index);
+    if (d->nameFilterDisables && !d->passNameFilters(indexNode)) {
+        flags &= ~Qt::ItemIsEnabled;
+        // ### TODO you shouldn't be able to set this as the current item, task 119433
+        return flags;
+    }
+
+    flags |= Qt::ItemIsDragEnabled;
+    if (d->readOnly)
+        return flags;
+    if ((index.column() == 0) && indexNode->permissions() & QFile::WriteUser) {
+        flags |= Qt::ItemIsEditable;
+        if (indexNode->isDir())
+            flags |= Qt::ItemIsDropEnabled;
+    }
+    return flags;
+}
+
+/*!
+    \internal
+*/
+void QFileSystemModelPrivate::_q_performDelayedSort()
+{
+    Q_Q(QFileSystemModel);
+    q->sort(sortColumn, sortOrder);
+}
+
+static inline QChar getNextChar(const QString &s, int location)
+{
+    return (location < s.length()) ? s.at(location) : QChar();
+}
+
+/*!
+    Natural number sort, skips spaces.
+
+    Examples:
+    1, 2, 10, 55, 100
+    01.jpg, 2.jpg, 10.jpg
+
+    Note on the algorithm:
+    Only as many characters as necessary are looked at and at most they all
+    are looked at once.
+
+    Slower then QString::compare() (of course)
+  */
+int QFileSystemModelPrivate::naturalCompare(const QString &s1, const QString &s2,  Qt::CaseSensitivity cs)
+{
+    for (int l1 = 0, l2 = 0; l1 <= s1.count() && l2 <= s2.count(); ++l1, ++l2) {
+        // skip spaces, tabs and 0's
+        QChar c1 = getNextChar(s1, l1);
+        while (c1.isSpace())
+            c1 = getNextChar(s1, ++l1);
+        QChar c2 = getNextChar(s2, l2);
+        while (c2.isSpace())
+            c2 = getNextChar(s2, ++l2);
+
+        if (c1.isDigit() && c2.isDigit()) {
+            while (c1.digitValue() == 0)
+                c1 = getNextChar(s1, ++l1);
+            while (c2.digitValue() == 0)
+                c2 = getNextChar(s2, ++l2);
+
+            int lookAheadLocation1 = l1;
+            int lookAheadLocation2 = l2;
+            int currentReturnValue = 0;
+            // find the last digit, setting currentReturnValue as we go if it isn't equal
+            for (
+                QChar lookAhead1 = c1, lookAhead2 = c2;
+                (lookAheadLocation1 <= s1.length() && lookAheadLocation2 <= s2.length());
+                lookAhead1 = getNextChar(s1, ++lookAheadLocation1),
+                lookAhead2 = getNextChar(s2, ++lookAheadLocation2)
+                ) {
+                bool is1ADigit = !lookAhead1.isNull() && lookAhead1.isDigit();
+                bool is2ADigit = !lookAhead2.isNull() && lookAhead2.isDigit();
+                if (!is1ADigit && !is2ADigit)
+                    break;
+                if (!is1ADigit)
+                    return -1;
+                if (!is2ADigit)
+                    return 1;
+                if (currentReturnValue == 0) {
+                    if (lookAhead1 < lookAhead2) {
+                        currentReturnValue = -1;
+                    } else if (lookAhead1 > lookAhead2) {
+                        currentReturnValue = 1;
+                    }
+                }
+            }
+            if (currentReturnValue != 0)
+                return currentReturnValue;
+        }
+
+        if (cs == Qt::CaseInsensitive) {
+            if (!c1.isLower()) c1 = c1.toLower();
+            if (!c2.isLower()) c2 = c2.toLower();
+        }
+        int r = QString::localeAwareCompare(c1, c2);
+        if (r < 0)
+            return -1;
+        if (r > 0)
+            return 1;
+    }
+    // The two strings are the same (02 == 2) so fall back to the normal sort
+    return QString::compare(s1, s2, cs);
+}
+
+/*
+    \internal
+    Helper functor used by sort()
+*/
+class QFileSystemModelSorter
+{
+public:
+    inline QFileSystemModelSorter(int column) : sortColumn(column) {}
+
+    bool compareNodes(const QFileSystemModelPrivate::QFileSystemNode *l,
+                    const QFileSystemModelPrivate::QFileSystemNode *r) const
+    {
+        switch (sortColumn) {
+        case 0: {
+#ifndef Q_OS_MAC
+            // place directories before files
+            bool left = l->isDir();
+            bool right = r->isDir();
+            if (left ^ right)
+                return left;
+#endif
+            return QFileSystemModelPrivate::naturalCompare(l->fileName,
+                                                r->fileName, Qt::CaseInsensitive) < 0;
+                }
+        case 1:
+            // Directories go first
+            if (l->isDir() && !r->isDir())
+                return true;
+            return l->size() < r->size();
+        case 2:
+            return l->type() < r->type();
+        case 3:
+            return l->lastModified() < r->lastModified();
+        }
+        Q_ASSERT(false);
+        return false;
+    }
+
+    bool operator()(const QPair<QFileSystemModelPrivate::QFileSystemNode*, int> &l,
+                           const QPair<QFileSystemModelPrivate::QFileSystemNode*, int> &r) const
+    {
+        return compareNodes(l.first, r.first);
+    }
+
+
+private:
+    int sortColumn;
+};
+
+/*
+    \internal
+
+    Sort all of the children of parent
+*/
+void QFileSystemModelPrivate::sortChildren(int column, const QModelIndex &parent)
+{
+    Q_Q(QFileSystemModel);
+    QFileSystemModelPrivate::QFileSystemNode *indexNode = node(parent);
+    if (indexNode->children.count() == 0)
+        return;
+
+    QList<QPair<QFileSystemModelPrivate::QFileSystemNode*, int> > values;
+    QHash<QString, QFileSystemNode *>::const_iterator iterator;
+    int i = 0;
+    for(iterator = indexNode->children.begin() ; iterator != indexNode->children.end() ; ++iterator) {
+        if (filtersAcceptsNode(iterator.value())) {
+            values.append(QPair<QFileSystemModelPrivate::QFileSystemNode*, int>((iterator.value()), i));
+        } else {
+            iterator.value()->isVisible = false;
+        }
+        i++;
+    }
+    QFileSystemModelSorter ms(column);
+    qStableSort(values.begin(), values.end(), ms);
+    // First update the new visible list
+    indexNode->visibleChildren.clear();
+    //No more dirty item we reset our internal dirty index
+    indexNode->dirtyChildrenIndex = -1;
+    for (int i = 0; i < values.count(); ++i) {
+        indexNode->visibleChildren.append(values.at(i).first->fileName);
+        values.at(i).first->isVisible = true;
+    }
+
+    if (!disableRecursiveSort) {
+        for (int i = 0; i < q->rowCount(parent); ++i) {
+            const QModelIndex childIndex = q->index(i, 0, parent);
+            QFileSystemModelPrivate::QFileSystemNode *indexNode = node(childIndex);
+            //Only do a recursive sort on visible nodes
+            if (indexNode->isVisible)
+                sortChildren(column, childIndex);
+        }
+    }
+}
+
+/*!
+    \reimp
+*/
+void QFileSystemModel::sort(int column, Qt::SortOrder order)
+{
+    Q_D(QFileSystemModel);
+    if (d->sortOrder == order && d->sortColumn == column && !d->forceSort)
+        return;
+
+    emit layoutAboutToBeChanged();
+    QModelIndexList oldList = persistentIndexList();
+    QList<QPair<QFileSystemModelPrivate::QFileSystemNode*, int> > oldNodes;
+    for (int i = 0; i < oldList.count(); ++i) {
+        QPair<QFileSystemModelPrivate::QFileSystemNode*, int> pair(d->node(oldList.at(i)), oldList.at(i).column());
+        oldNodes.append(pair);
+    }
+
+    if (!(d->sortColumn == column && d->sortOrder != order && !d->forceSort)) {
+        //we sort only from where we are, don't need to sort all the model
+        d->sortChildren(column, index(rootPath()));
+        d->sortColumn = column;
+        d->forceSort = false;
+    }
+    d->sortOrder = order;
+
+    QModelIndexList newList;
+    for (int i = 0; i < oldNodes.count(); ++i) {
+        QModelIndex idx = d->index(oldNodes.at(i).first);
+        idx = idx.sibling(idx.row(), oldNodes.at(i).second);
+        newList.append(idx);
+    }
+    changePersistentIndexList(oldList, newList);
+    emit layoutChanged();
+}
+
+/*!
+    Returns a list of MIME types that can be used to describe a list of items
+    in the model.
+*/
+QStringList QFileSystemModel::mimeTypes() const
+{
+    return QStringList(QLatin1String("text/uri-list"));
+}
+
+/*!
+    Returns an object that contains a serialized description of the specified
+    \a indexes. The format used to describe the items corresponding to the
+    indexes is obtained from the mimeTypes() function.
+
+    If the list of indexes is empty, 0 is returned rather than a serialized
+    empty list.
+*/
+QMimeData *QFileSystemModel::mimeData(const QModelIndexList &indexes) const
+{
+    QList<QUrl> urls;
+    QList<QModelIndex>::const_iterator it = indexes.begin();
+    for (; it != indexes.end(); ++it)
+        if ((*it).column() == 0)
+            urls << QUrl::fromLocalFile(filePath(*it));
+    QMimeData *data = new QMimeData();
+    data->setUrls(urls);
+    return data;
+}
+
+/*!
+    Handles the \a data supplied by a drag and drop operation that ended with
+    the given \a action over the row in the model specified by the \a row and
+    \a column and by the \a parent index.
+
+    \sa supportedDropActions()
+*/
+bool QFileSystemModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
+                             int row, int column, const QModelIndex &parent)
+{
+    Q_UNUSED(row);
+    Q_UNUSED(column);
+    if (!parent.isValid() || isReadOnly())
+        return false;
+
+    bool success = true;
+    QString to = filePath(parent) + QDir::separator();
+
+    QList<QUrl> urls = data->urls();
+    QList<QUrl>::const_iterator it = urls.constBegin();
+
+    switch (action) {
+    case Qt::CopyAction:
+        for (; it != urls.constEnd(); ++it) {
+            QString path = (*it).toLocalFile();
+            success = QFile::copy(path, to + QFileInfo(path).fileName()) && success;
+        }
+        break;
+    case Qt::LinkAction:
+        for (; it != urls.constEnd(); ++it) {
+            QString path = (*it).toLocalFile();
+            success = QFile::link(path, to + QFileInfo(path).fileName()) && success;
+        }
+        break;
+    case Qt::MoveAction:
+        for (; it != urls.constEnd(); ++it) {
+            QString path = (*it).toLocalFile();
+            success = QFile::rename(path, to + QFileInfo(path).fileName()) && success;
+        }
+        break;
+    default:
+        return false;
+    }
+
+    return success;
+}
+
+/*!
+    \reimp
+*/
+Qt::DropActions QFileSystemModel::supportedDropActions() const
+{
+    return Qt::CopyAction | Qt::MoveAction | Qt::LinkAction;
+}
+
+/*!
+    Returns the path of the item stored in the model under the
+    \a index given.
+*/
+QString QFileSystemModel::filePath(const QModelIndex &index) const
+{
+    Q_D(const QFileSystemModel);
+    QString fullPath = d->filePath(index);
+    QFileSystemModelPrivate::QFileSystemNode *dirNode = d->node(index);
+    if (dirNode->isSymLink() && d->fileInfoGatherer.resolveSymlinks()
+        && d->resolvedSymLinks.contains(fullPath)
+        && dirNode->isDir()) {
+        QFileInfo resolvedInfo(fullPath);
+        resolvedInfo = resolvedInfo.canonicalFilePath();
+        if (resolvedInfo.exists())
+            return resolvedInfo.filePath();
+    }
+    return fullPath;
+}
+
+QString QFileSystemModelPrivate::filePath(const QModelIndex &index) const
+{
+    Q_Q(const QFileSystemModel);
+    Q_UNUSED(q);
+    if (!index.isValid())
+        return QString();
+    Q_ASSERT(index.model() == q);
+
+    QStringList path;
+    QModelIndex idx = index;
+    while (idx.isValid()) {
+        QFileSystemModelPrivate::QFileSystemNode *dirNode = node(idx);
+        if (dirNode)
+            path.prepend(dirNode->fileName);
+        idx = idx.parent();
+    }
+    QString fullPath = QDir::fromNativeSeparators(path.join(QDir::separator()));
+#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE)
+    if ((fullPath.length() > 2) && fullPath[0] == QLatin1Char('/') && fullPath[1] == QLatin1Char('/'))
+        fullPath = fullPath.mid(1);
+#endif
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+    if (fullPath.length() == 2 && fullPath.endsWith(QLatin1Char(':')))
+        fullPath.append(QLatin1Char('/'));
+#endif
+    return fullPath;
+}
+
+/*!
+    Create a directory with the \a name in the \a parent model index.
+*/
+QModelIndex QFileSystemModel::mkdir(const QModelIndex &parent, const QString &name)
+{
+    Q_D(QFileSystemModel);
+    if (!parent.isValid())
+        return parent;
+
+    QDir dir(filePath(parent));
+    if (!dir.mkdir(name))
+        return QModelIndex();
+    QFileSystemModelPrivate::QFileSystemNode *parentNode = d->node(parent);
+    d->addNode(parentNode, name, QFileInfo());
+    Q_ASSERT(parentNode->children.contains(name));
+    QFileSystemModelPrivate::QFileSystemNode *node = parentNode->children[name];
+    node->populate(d->fileInfoGatherer.getInfo(QFileInfo(dir.absolutePath() + QDir::separator() + name)));
+    d->addVisibleFiles(parentNode, QStringList(name));
+    return d->index(node);
+}
+
+/*!
+    Returns the complete OR-ed together combination of QFile::Permission for the \a index.
+ */
+QFile::Permissions QFileSystemModel::permissions(const QModelIndex &index) const
+{
+    Q_D(const QFileSystemModel);
+    QFile::Permissions p = d->node(index)->permissions();
+    if (d->readOnly) {
+        p ^= (QFile::WriteOwner | QFile::WriteUser
+            | QFile::WriteGroup | QFile::WriteOther);
+    }
+    return p;
+}
+
+/*!
+    Sets the directory that is being watched by the model to \a newPath by
+    installing a \l{QFileSystemWatcher}{file system watcher} on it. Any
+    changes to files and directories within this directory will be
+    reflected in the model.
+
+    If the path is changed, the rootPathChanged() signal will be emitted.
+
+    \note This function does not change the structure of the model or
+    modify the data available to views. In other words, the "root" of
+    the model is \e not changed to include only files and directories
+    within the directory specified by \a newPath in the file system.
+  */
+QModelIndex QFileSystemModel::setRootPath(const QString &newPath)
+{
+    Q_D(QFileSystemModel);
+#ifdef Q_OS_WIN
+#ifdef Q_OS_WIN32
+    QString longNewPath = qt_GetLongPathName(newPath);
+#else
+    QString longNewPath = QDir::fromNativeSeparators(newPath);
+#endif
+#else
+    QString longNewPath = newPath;
+#endif
+    QDir newPathDir(longNewPath);
+    //we remove .. and . from the given path if exist
+    if (!newPath.isEmpty()) {
+        longNewPath = QDir::cleanPath(longNewPath);
+        newPathDir.setPath(longNewPath);
+    }
+
+    d->setRootPath = true;
+
+    //user don't ask for the root path ("") but the conversion failed
+    if (!newPath.isEmpty() && longNewPath.isEmpty())
+        return d->index(rootPath());
+
+    if (d->rootDir.path() == longNewPath)
+        return d->index(rootPath());
+
+    bool showDrives = (longNewPath.isEmpty() || longNewPath == d->myComputer());
+    if (!showDrives && !newPathDir.exists())
+        return d->index(rootPath());
+
+    //We remove the watcher on the previous path
+    if (!rootPath().isEmpty() && rootPath() != QLatin1String(".")) {
+        //This remove the watcher for the old rootPath
+        d->fileInfoGatherer.removePath(rootPath());
+        //This line "marks" the node as dirty, so the next fetchMore
+        //call on the path will ask the gatherer to install a watcher again
+        //But it doesn't re-fetch everything
+        d->node(rootPath())->populatedChildren = false;
+    }
+
+    // We have a new valid root path
+    d->rootDir = newPathDir;
+    QModelIndex newRootIndex;
+    if (showDrives) {
+        // otherwise dir will become '.'
+        d->rootDir.setPath(QLatin1String(""));
+    } else {
+        newRootIndex = d->index(newPathDir.path());
+    }
+    fetchMore(newRootIndex);
+    emit rootPathChanged(longNewPath);
+    d->forceSort = true;
+    d->delayedSort();
+    return newRootIndex;
+}
+
+/*!
+    The currently set root path
+
+    \sa rootDirectory()
+*/
+QString QFileSystemModel::rootPath() const
+{
+    Q_D(const QFileSystemModel);
+    return d->rootDir.path();
+}
+
+/*!
+    The currently set directory
+
+    \sa rootPath()
+*/
+QDir QFileSystemModel::rootDirectory() const
+{
+    Q_D(const QFileSystemModel);
+    QDir dir(d->rootDir);
+    dir.setNameFilters(nameFilters());
+    dir.setFilter(filter());
+    return dir;
+}
+
+/*!
+    Sets the \a provider of file icons for the directory model.
+*/
+void QFileSystemModel::setIconProvider(QFileIconProvider *provider)
+{
+    Q_D(QFileSystemModel);
+    d->fileInfoGatherer.setIconProvider(provider);
+    d->root.updateIcon(provider, QString());
+}
+
+/*!
+    Returns the file icon provider for this directory model.
+*/
+QFileIconProvider *QFileSystemModel::iconProvider() const
+{
+    Q_D(const QFileSystemModel);
+    return d->fileInfoGatherer.iconProvider();
+}
+
+/*!
+    Sets the directory model's filter to that specified by \a filters.
+
+    Note that the filter you set should always include the QDir::AllDirs enum value,
+    otherwise QFileSystemModel won't be able to read the directory structure.
+
+    \sa QDir::Filters
+*/
+void QFileSystemModel::setFilter(QDir::Filters filters)
+{
+    Q_D(QFileSystemModel);
+    if (d->filters == filters)
+        return;
+    d->filters = filters;
+    // CaseSensitivity might have changed
+    setNameFilters(nameFilters());
+    d->forceSort = true;
+    d->delayedSort();
+}
+
+/*!
+    Returns the filter specified for the directory model.
+
+    If a filter has not been set, the default filter is QDir::AllEntries |
+    QDir::NoDotAndDotDot | QDir::AllDirs.
+
+    \sa QDir::Filters
+*/
+QDir::Filters QFileSystemModel::filter() const
+{
+    Q_D(const QFileSystemModel);
+    return d->filters;
+}
+
+/*!
+    \property QFileSystemModel::resolveSymlinks
+    \brief Whether the directory model should resolve symbolic links
+
+    This is only relevant on operating systems that support symbolic links.
+
+    By default, this property is false.
+*/
+void QFileSystemModel::setResolveSymlinks(bool enable)
+{
+    Q_D(QFileSystemModel);
+    d->fileInfoGatherer.setResolveSymlinks(enable);
+}
+
+bool QFileSystemModel::resolveSymlinks() const
+{
+    Q_D(const QFileSystemModel);
+    return d->fileInfoGatherer.resolveSymlinks();
+}
+
+/*!
+    \property QFileSystemModel::readOnly
+    \brief Whether the directory model allows writing to the file system
+
+    If this property is set to false, the directory model will allow renaming, copying
+    and deleting of files and directories.
+
+    This property is true by default
+*/
+void QFileSystemModel::setReadOnly(bool enable)
+{
+    Q_D(QFileSystemModel);
+    d->readOnly = enable;
+}
+
+bool QFileSystemModel::isReadOnly() const
+{
+    Q_D(const QFileSystemModel);
+    return d->readOnly;
+}
+
+/*!
+    \property QFileSystemModel::nameFilterDisables
+    \brief Whether files that don't pass the name filter are hidden or disabled
+
+    This property is true by default
+*/
+void QFileSystemModel::setNameFilterDisables(bool enable)
+{
+    Q_D(QFileSystemModel);
+    if (d->nameFilterDisables == enable)
+        return;
+    d->nameFilterDisables = enable;
+    d->forceSort = true;
+    d->delayedSort();
+}
+
+bool QFileSystemModel::nameFilterDisables() const
+{
+    Q_D(const QFileSystemModel);
+    return d->nameFilterDisables;
+}
+
+/*!
+    Sets the name \a filters to apply against the existing files.
+*/
+void QFileSystemModel::setNameFilters(const QStringList &filters)
+{
+    // Prep the regexp's ahead of time
+#ifndef QT_NO_REGEXP
+    Q_D(QFileSystemModel);
+
+    if (!d->bypassFilters.isEmpty()) {
+        // update the bypass filter to only bypass the stuff that must be kept around
+        d->bypassFilters.clear();
+        // We guarantee that rootPath will stick around
+        QPersistentModelIndex root(index(rootPath()));
+        QModelIndexList persistantList = persistentIndexList();
+        for (int i = 0; i < persistantList.count(); ++i) {
+            QFileSystemModelPrivate::QFileSystemNode *node;
+            node = d->node(persistantList.at(i));
+            while (node) {
+                if (d->bypassFilters.contains(node))
+                    break;
+                if (node->isDir())
+                    d->bypassFilters[node] = true;
+                node = node->parent;
+            }
+        }
+    }
+
+    d->nameFilters.clear();
+    const Qt::CaseSensitivity caseSensitive =
+        (filter() & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive;
+    for (int i = 0; i < filters.size(); ++i) {
+        d->nameFilters << QRegExp(filters.at(i), caseSensitive, QRegExp::Wildcard);
+    }
+    d->forceSort = true;
+    d->delayedSort();
+#endif
+}
+
+/*!
+    Returns a list of filters applied to the names in the model.
+*/
+QStringList QFileSystemModel::nameFilters() const
+{
+    Q_D(const QFileSystemModel);
+    QStringList filters;
+#ifndef QT_NO_REGEXP
+    for (int i = 0; i < d->nameFilters.size(); ++i) {
+         filters << d->nameFilters.at(i).pattern();
+    }
+#endif
+    return filters;
+}
+
+/*!
+    \reimp
+*/
+bool QFileSystemModel::event(QEvent *event)
+{
+    Q_D(QFileSystemModel);
+    if (event->type() == QEvent::LanguageChange) {
+        d->root.retranslateStrings(d->fileInfoGatherer.iconProvider(), QString());
+        return true;
+    }
+    return QAbstractItemModel::event(event);
+}
+
+bool QFileSystemModel::rmdir(const QModelIndex &aindex) const
+{
+    QString path = filePath(aindex);
+    QFileSystemModelPrivate * d = const_cast<QFileSystemModelPrivate*>(d_func());
+    d->fileInfoGatherer.removePath(path);
+    return QDir().rmdir(path);
+}
+
+/*!
+     \internal
+
+    Performed quick listing and see if any files have been added or removed,
+    then fetch more information on visible files.
+ */
+void QFileSystemModelPrivate::_q_directoryChanged(const QString &directory, const QStringList &files)
+{
+    QFileSystemModelPrivate::QFileSystemNode *parentNode = node(directory, false);
+    if (parentNode->children.count() == 0)
+        return;
+    QStringList toRemove;
+#if defined(Q_OS_SYMBIAN)
+    // Filename case must be exact in qBinaryFind below, so create a list of all lowercase names.
+    QStringList newFiles;
+    for(int i = 0; i < files.size(); i++) {
+        newFiles << files.at(i).toLower();
+    }
+#else
+    QStringList newFiles = files;
+#endif
+    qSort(newFiles.begin(), newFiles.end());
+    QHash<QString, QFileSystemNode*>::const_iterator i = parentNode->children.constBegin();
+    while (i != parentNode->children.constEnd()) {
+        QStringList::iterator iterator;
+        iterator = qBinaryFind(newFiles.begin(), newFiles.end(),
+#if defined(Q_OS_SYMBIAN)
+                    i.value()->fileName.toLower());
+#else
+                    i.value()->fileName);
+#endif
+        if (iterator == newFiles.end()) {
+            toRemove.append(i.value()->fileName);
+        }
+        ++i;
+    }
+    for (int i = 0 ; i < toRemove.count() ; ++i )
+        removeNode(parentNode, toRemove[i]);
+}
+
+/*!
+    \internal
+
+    Adds a new file to the children of parentNode
+
+    *WARNING* this will change the count of children
+*/
+QFileSystemModelPrivate::QFileSystemNode* QFileSystemModelPrivate::addNode(QFileSystemNode *parentNode, const QString &fileName, const QFileInfo& info)
+{
+    // In the common case, itemLocation == count() so check there first
+    QFileSystemModelPrivate::QFileSystemNode *node = new QFileSystemModelPrivate::QFileSystemNode(fileName, parentNode);
+#ifndef QT_NO_FILESYSTEMWATCHER
+    node->populate(info);
+#endif
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+    //The parentNode is "" so we are listing the drives
+    if (parentNode->fileName.isEmpty()) {
+        wchar_t name[MAX_PATH + 1];
+        //GetVolumeInformation requires to add trailing backslash
+        const QString nodeName = fileName + QLatin1String("\\");
+        BOOL success = ::GetVolumeInformation((wchar_t *)(nodeName.utf16()),
+                name, MAX_PATH + 1, NULL, 0, NULL, NULL, 0);
+        if (success && name[0])
+            node->volumeName = QString::fromWCharArray(name);
+    }
+#endif
+    parentNode->children.insert(fileName, node);
+    return node;
+}
+
+/*!
+    \internal
+
+    File at parentNode->children(itemLocation) has been removed, remove from the lists
+    and emit signals if necessary
+
+    *WARNING* this will change the count of children and could change visibleChildren
+ */
+void QFileSystemModelPrivate::removeNode(QFileSystemModelPrivate::QFileSystemNode *parentNode, const QString& name)
+{
+    Q_Q(QFileSystemModel);
+    QModelIndex parent = index(parentNode);
+    bool indexHidden = isHiddenByFilter(parentNode, parent);
+
+    int vLocation = parentNode->visibleLocation(name);
+    if (vLocation >= 0 && !indexHidden)
+        q->beginRemoveRows(parent, translateVisibleLocation(parentNode, vLocation),
+                                       translateVisibleLocation(parentNode, vLocation));
+    QFileSystemNode * node = parentNode->children.take(name);
+    delete node;
+    // cleanup sort files after removing rather then re-sorting which is O(n)
+    if (vLocation >= 0)
+        parentNode->visibleChildren.removeAt(vLocation);
+    if (vLocation >= 0 && !indexHidden)
+        q->endRemoveRows();
+}
+
+/*
+    \internal
+    Helper functor used by addVisibleFiles()
+*/
+class QFileSystemModelVisibleFinder
+{
+public:
+    inline QFileSystemModelVisibleFinder(QFileSystemModelPrivate::QFileSystemNode *node, QFileSystemModelSorter *sorter) : parentNode(node), sorter(sorter) {}
+
+    bool operator()(const QString &, QString r) const
+    {
+        return sorter->compareNodes(parentNode->children.value(name), parentNode->children.value(r));
+    }
+
+    QString name;
+private:
+    QFileSystemModelPrivate::QFileSystemNode *parentNode;
+    QFileSystemModelSorter *sorter;
+};
+
+/*!
+    \internal
+
+    File at parentNode->children(itemLocation) was not visible before, but now should be
+    and emit signals if necessary.
+
+    *WARNING* this will change the visible count
+ */
+void QFileSystemModelPrivate::addVisibleFiles(QFileSystemNode *parentNode, const QStringList &newFiles)
+{
+    Q_Q(QFileSystemModel);
+    QModelIndex parent = index(parentNode);
+    bool indexHidden = isHiddenByFilter(parentNode, parent);
+    if (!indexHidden) {
+        q->beginInsertRows(parent, parentNode->visibleChildren.count() , parentNode->visibleChildren.count() + newFiles.count() - 1);
+    }
+
+    if (parentNode->dirtyChildrenIndex == -1)
+        parentNode->dirtyChildrenIndex = parentNode->visibleChildren.count();
+
+    for (int i = 0; i < newFiles.count(); ++i) {
+            parentNode->visibleChildren.append(newFiles.at(i));
+            parentNode->children[newFiles.at(i)]->isVisible = true;
+        }
+    if (!indexHidden)
+      q->endInsertRows();
+}
+
+/*!
+    \internal
+
+    File was visible before, but now should NOT be
+
+    *WARNING* this will change the visible count
+ */
+void QFileSystemModelPrivate::removeVisibleFile(QFileSystemNode *parentNode, int vLocation)
+{
+    Q_Q(QFileSystemModel);
+    if (vLocation == -1)
+        return;
+    QModelIndex parent = index(parentNode);
+    bool indexHidden = isHiddenByFilter(parentNode, parent);
+    if (!indexHidden)
+        q->beginRemoveRows(parent, translateVisibleLocation(parentNode, vLocation),
+                                       translateVisibleLocation(parentNode, vLocation));
+    parentNode->children[parentNode->visibleChildren.at(vLocation)]->isVisible = false;
+    parentNode->visibleChildren.removeAt(vLocation);
+    if (!indexHidden)
+        q->endRemoveRows();
+}
+
+/*!
+    \internal
+
+    The thread has received new information about files,
+    update and emit dataChanged if it has actually changed.
+ */
+void QFileSystemModelPrivate::_q_fileSystemChanged(const QString &path, const QList<QPair<QString, QFileInfo> > &updates)
+{
+    Q_Q(QFileSystemModel);
+    QVector<QString> rowsToUpdate;
+    QStringList newFiles;
+    QFileSystemModelPrivate::QFileSystemNode *parentNode = node(path, false);
+    QModelIndex parentIndex = index(parentNode);
+    for (int i = 0; i < updates.count(); ++i) {
+        QString fileName = updates.at(i).first;
+        Q_ASSERT(!fileName.isEmpty());
+        QExtendedInformation info = fileInfoGatherer.getInfo(updates.at(i).second);
+        bool previouslyHere = parentNode->children.contains(fileName);
+        if (!previouslyHere) {
+            addNode(parentNode, fileName, info.fileInfo());
+        }
+        QFileSystemModelPrivate::QFileSystemNode * node = parentNode->children.value(fileName);
+        bool isCaseSensitive = parentNode->caseSensitive();
+        if (isCaseSensitive) {
+            if (node->fileName != fileName)
+                continue;
+        } else {
+            if (QString::compare(node->fileName,fileName,Qt::CaseInsensitive) != 0)
+                continue;
+        }
+        if (isCaseSensitive) {
+            Q_ASSERT(node->fileName == fileName);
+        } else {
+            node->fileName = fileName;
+        }
+
+        if (info.size() == -1 && !info.isSymLink()) {
+            removeNode(parentNode, fileName);
+            continue;
+        }
+        if (*node != info ) {
+            node->populate(info);
+            bypassFilters.remove(node);
+            // brand new information.
+            if (filtersAcceptsNode(node)) {
+                if (!node->isVisible) {
+                    newFiles.append(fileName);
+                } else {
+                    rowsToUpdate.append(fileName);
+                }
+            } else {
+                if (node->isVisible) {
+                    int visibleLocation = parentNode->visibleLocation(fileName);
+                    removeVisibleFile(parentNode, visibleLocation);
+                } else {
+                    // The file is not visible, don't do anything
+                }
+            }
+        }
+    }
+
+    // bundle up all of the changed signals into as few as possible.
+    qSort(rowsToUpdate.begin(), rowsToUpdate.end());
+    QString min;
+    QString max;
+    for (int i = 0; i < rowsToUpdate.count(); ++i) {
+        QString value = rowsToUpdate.at(i);
+        //##TODO is there a way to bundle signals with QString as the content of the list?
+        /*if (min.isEmpty()) {
+            min = value;
+            if (i != rowsToUpdate.count() - 1)
+                continue;
+        }
+        if (i != rowsToUpdate.count() - 1) {
+            if ((value == min + 1 && max.isEmpty()) || value == max + 1) {
+                max = value;
+                continue;
+            }
+        }*/
+        max = value;
+        min = value;
+        int visibleMin = parentNode->visibleLocation(min);
+        int visibleMax = parentNode->visibleLocation(max);
+        if (visibleMin >= 0
+            && visibleMin < parentNode->visibleChildren.count()
+            && parentNode->visibleChildren.at(visibleMin) == min
+            && visibleMax >= 0) {
+            QModelIndex bottom = q->index(translateVisibleLocation(parentNode, visibleMin), 0, parentIndex);
+            QModelIndex top = q->index(translateVisibleLocation(parentNode, visibleMax), 3, parentIndex);
+            emit q->dataChanged(bottom, top);
+        }
+
+        /*min = QString();
+        max = QString();*/
+    }
+
+    if (newFiles.count() > 0) {
+        addVisibleFiles(parentNode, newFiles);
+    }
+
+    if (newFiles.count() > 0 || (sortColumn != 0 && rowsToUpdate.count() > 0)) {
+        forceSort = true;
+        delayedSort();
+    }
+}
+
+/*!
+    \internal
+*/
+void QFileSystemModelPrivate::_q_resolvedName(const QString &fileName, const QString &resolvedName)
+{
+    resolvedSymLinks[fileName] = resolvedName;
+}
+
+/*!
+    \internal
+*/
+void QFileSystemModelPrivate::init()
+{
+    Q_Q(QFileSystemModel);
+    qRegisterMetaType<QList<QPair<QString,QFileInfo> > >("QList<QPair<QString,QFileInfo> >");
+    q->connect(&fileInfoGatherer, SIGNAL(newListOfFiles(QString,QStringList)),
+               q, SLOT(_q_directoryChanged(QString,QStringList)));
+    q->connect(&fileInfoGatherer, SIGNAL(updates(QString,QList<QPair<QString,QFileInfo> >)),
+            q, SLOT(_q_fileSystemChanged(QString,QList<QPair<QString,QFileInfo> >)));
+    q->connect(&fileInfoGatherer, SIGNAL(nameResolved(QString,QString)),
+            q, SLOT(_q_resolvedName(QString,QString)));
+    q->connect(&fileInfoGatherer, SIGNAL(directoryLoaded(QString)),
+               q, SIGNAL(directoryLoaded(QString)));
+    q->connect(&delayedSortTimer, SIGNAL(timeout()), q, SLOT(_q_performDelayedSort()), Qt::QueuedConnection);
+
+    QHash<int, QByteArray> roles = q->roleNames();
+    roles.insertMulti(QFileSystemModel::FileIconRole, "fileIcon"); // == Qt::decoration
+    roles.insert(QFileSystemModel::FilePathRole, "filePath");
+    roles.insert(QFileSystemModel::FileNameRole, "fileName");
+    roles.insert(QFileSystemModel::FilePermissions, "filePermissions");
+    q->setRoleNames(roles);
+}
+
+/*!
+    \internal
+
+    Returns false if node doesn't pass the filters otherwise true
+
+    QDir::Modified is not supported
+    QDir::Drives is not supported
+*/
+bool QFileSystemModelPrivate::filtersAcceptsNode(const QFileSystemNode *node) const
+{
+    // always accept drives
+    if (node->parent == &root || bypassFilters.contains(node))
+        return true;
+
+    // If we don't know anything yet don't accept it
+    if (!node->hasInformation())
+        return false;
+
+    const bool filterPermissions = ((filters & QDir::PermissionMask)
+                                   && (filters & QDir::PermissionMask) != QDir::PermissionMask);
+    const bool hideDirs          = !(filters & (QDir::Dirs | QDir::AllDirs));
+    const bool hideFiles         = !(filters & QDir::Files);
+    const bool hideReadable      = !(!filterPermissions || (filters & QDir::Readable));
+    const bool hideWritable      = !(!filterPermissions || (filters & QDir::Writable));
+    const bool hideExecutable    = !(!filterPermissions || (filters & QDir::Executable));
+    const bool hideHidden        = !(filters & QDir::Hidden);
+    const bool hideSystem        = !(filters & QDir::System);
+    const bool hideSymlinks      = (filters & QDir::NoSymLinks);
+    const bool hideDot           = (filters & QDir::NoDot) || (filters & QDir::NoDotAndDotDot); // ### Qt5: simplify (because NoDotAndDotDot=NoDot|NoDotDot)
+    const bool hideDotDot        = (filters & QDir::NoDotDot) || (filters & QDir::NoDotAndDotDot); // ### Qt5: simplify (because NoDotAndDotDot=NoDot|NoDotDot)
+
+    // Note that we match the behavior of entryList and not QFileInfo on this and this
+    // incompatibility won't be fixed until Qt 5 at least
+    bool isDot    = (node->fileName == QLatin1String("."));
+    bool isDotDot = (node->fileName == QLatin1String(".."));
+    if (   (hideHidden && !(isDot || isDotDot) && node->isHidden())
+        || (hideSystem && node->isSystem())
+        || (hideDirs && node->isDir())
+        || (hideFiles && node->isFile())
+        || (hideSymlinks && node->isSymLink())
+        || (hideReadable && node->isReadable())
+        || (hideWritable && node->isWritable())
+        || (hideExecutable && node->isExecutable())
+        || (hideDot && isDot)
+        || (hideDotDot && isDotDot))
+        return false;
+
+    return nameFilterDisables || passNameFilters(node);
+}
+
+/*
+    \internal
+
+    Returns true if node passes the name filters and should be visible.
+ */
+bool QFileSystemModelPrivate::passNameFilters(const QFileSystemNode *node) const
+{
+#ifndef QT_NO_REGEXP
+    if (nameFilters.isEmpty())
+        return true;
+
+    // Check the name regularexpression filters
+    if (!(node->isDir() && (filters & QDir::AllDirs))) {
+        for (int i = 0; i < nameFilters.size(); ++i) {
+            if (nameFilters.at(i).exactMatch(node->fileName))
+                return true;
+        }
+        return false;
+    }
+#endif
+    return true;
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qfilesystemmodel.cpp"
+
+#endif // QT_NO_FILESYSTEMMODEL
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qfontdialog.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,1077 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwindowdefs.h"
+
+#ifndef QT_NO_FONTDIALOG
+
+#include "qfontdialog.h"
+#include "qfontdialog_p.h"
+
+#include <qapplication.h>
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qevent.h>
+#include <qfontdatabase.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qstyle.h>
+#include <qdialogbuttonbox.h>
+#include <qheaderview.h>
+#include <qlistview.h>
+#include <qstringlistmodel.h>
+#include <qvalidator.h>
+#include <private/qdialog_p.h>
+#include <private/qfont_p.h>
+
+#if defined(Q_WS_S60)
+#include <QtGui/qdesktopwidget.h>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+class QFontListView : public QListView
+{
+    Q_OBJECT
+public:
+    QFontListView(QWidget *parent);
+    inline QStringListModel *model() const {
+        return static_cast<QStringListModel *>(QListView::model());
+    }
+    inline void setCurrentItem(int item) {
+        QListView::setCurrentIndex(static_cast<QAbstractListModel*>(model())->index(item));
+    }
+    inline int currentItem() const {
+        return QListView::currentIndex().row();
+    }
+    inline int count() const {
+        return model()->rowCount();
+    }
+    inline QString currentText() const {
+        int row = QListView::currentIndex().row();
+        return row < 0 ? QString() : model()->stringList().at(row);
+    }
+    void currentChanged(const QModelIndex &current, const QModelIndex &previous) {
+        QListView::currentChanged(current, previous);
+        if (current.isValid())
+            emit highlighted(current.row());
+    }
+    QString text(int i) const {
+        return model()->stringList().at(i);
+    }
+signals:
+    void highlighted(int);
+};
+
+QFontListView::QFontListView(QWidget *parent)
+    : QListView(parent)
+{
+    setModel(new QStringListModel(parent));
+    setEditTriggers(NoEditTriggers);
+}
+
+static const Qt::WindowFlags DefaultWindowFlags =
+        Qt::Dialog | Qt::WindowSystemMenuHint;
+
+/*!
+  \class QFontDialog
+  \ingroup standard-dialogs
+
+  \brief The QFontDialog class provides a dialog widget for selecting a font.
+
+    A font dialog is created through one of the static getFont()
+    functions.
+
+  Examples:
+
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 0
+
+    The dialog can also be used to set a widget's font directly:
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 1
+  If the user clicks OK the font they chose will be used for myWidget,
+  and if they click Cancel the original font is used.
+
+  \image plastique-fontdialog.png A font dialog in the Plastique widget style.
+
+  \sa QFont, QFontInfo, QFontMetrics, QColorDialog, QFileDialog, QPrintDialog,
+      {Standard Dialogs Example}
+*/
+
+/*!
+    \since 4.5
+
+    Constructs a standard font dialog.
+
+    Use setCurrentFont() to set the initial font attributes.
+
+    The \a parent parameter is passed to the QDialog constructor.
+
+    \sa getFont()
+*/
+QFontDialog::QFontDialog(QWidget *parent)
+    : QDialog(*new QFontDialogPrivate, parent, DefaultWindowFlags)
+{
+    Q_D(QFontDialog);
+    d->init();
+}
+
+/*!
+    \since 4.5
+
+    Constructs a standard font dialog with the given \a parent and specified
+    \a initial font.
+*/
+QFontDialog::QFontDialog(const QFont &initial, QWidget *parent)
+    : QDialog(*new QFontDialogPrivate, parent, DefaultWindowFlags)
+{
+    Q_D(QFontDialog);
+    d->init();
+    setCurrentFont(initial);
+}
+
+void QFontDialogPrivate::init()
+{
+    Q_Q(QFontDialog);
+
+#ifdef Q_WS_MAC
+    nativeDialogInUse = false;
+    delegate = 0;
+#endif
+
+    q->setSizeGripEnabled(true);
+    q->setWindowTitle(QFontDialog::tr("Select Font"));
+
+    // grid
+    familyEdit = new QLineEdit(q);
+    familyEdit->setReadOnly(true);
+    familyList = new QFontListView(q);
+    familyEdit->setFocusProxy(familyList);
+
+    familyAccel = new QLabel(q);
+#ifndef QT_NO_SHORTCUT
+    familyAccel->setBuddy(familyList);
+#endif
+    familyAccel->setIndent(2);
+
+    styleEdit = new QLineEdit(q);
+    styleEdit->setReadOnly(true);
+    styleList = new QFontListView(q);
+    styleEdit->setFocusProxy(styleList);
+
+    styleAccel = new QLabel(q);
+#ifndef QT_NO_SHORTCUT
+    styleAccel->setBuddy(styleList);
+#endif
+    styleAccel->setIndent(2);
+
+    sizeEdit = new QLineEdit(q);
+    sizeEdit->setFocusPolicy(Qt::ClickFocus);
+    QIntValidator *validator = new QIntValidator(1, 512, q);
+    sizeEdit->setValidator(validator);
+    sizeList = new QFontListView(q);
+
+    sizeAccel = new QLabel(q);
+#ifndef QT_NO_SHORTCUT
+    sizeAccel->setBuddy(sizeEdit);
+#endif
+    sizeAccel->setIndent(2);
+
+    // effects box
+    effects = new QGroupBox(q);
+    QVBoxLayout *vbox = new QVBoxLayout(effects);
+    strikeout = new QCheckBox(effects);
+    vbox->addWidget(strikeout);
+    underline = new QCheckBox(effects);
+    vbox->addWidget(underline);
+
+    sample = new QGroupBox(q);
+    QHBoxLayout *hbox = new QHBoxLayout(sample);
+    sampleEdit = new QLineEdit(sample);
+    sampleEdit->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored));
+    sampleEdit->setAlignment(Qt::AlignCenter);
+    // Note that the sample text is *not* translated with tr(), as the
+    // characters used depend on the charset encoding.
+    sampleEdit->setText(QLatin1String("AaBbYyZz"));
+    hbox->addWidget(sampleEdit);
+
+    writingSystemCombo = new QComboBox(q);
+
+    writingSystemAccel = new QLabel(q);
+#ifndef QT_NO_SHORTCUT
+    writingSystemAccel->setBuddy(writingSystemCombo);
+#endif
+    writingSystemAccel->setIndent(2);
+
+    size = 0;
+    smoothScalable = false;
+
+    QObject::connect(writingSystemCombo, SIGNAL(activated(int)), q, SLOT(_q_writingSystemHighlighted(int)));
+    QObject::connect(familyList, SIGNAL(highlighted(int)), q, SLOT(_q_familyHighlighted(int)));
+    QObject::connect(styleList, SIGNAL(highlighted(int)), q, SLOT(_q_styleHighlighted(int)));
+    QObject::connect(sizeList, SIGNAL(highlighted(int)), q, SLOT(_q_sizeHighlighted(int)));
+    QObject::connect(sizeEdit, SIGNAL(textChanged(QString)), q, SLOT(_q_sizeChanged(QString)));
+
+    QObject::connect(strikeout, SIGNAL(clicked()), q, SLOT(_q_updateSample()));
+    QObject::connect(underline, SIGNAL(clicked()), q, SLOT(_q_updateSample()));
+
+    for (int i = 0; i < QFontDatabase::WritingSystemsCount; ++i) {
+        QFontDatabase::WritingSystem ws = QFontDatabase::WritingSystem(i);
+        QString writingSystemName = QFontDatabase::writingSystemName(ws);
+        if (writingSystemName.isEmpty())
+            break;
+        writingSystemCombo->addItem(writingSystemName);
+    }
+
+    updateFamilies();
+    if (familyList->count() != 0)
+        familyList->setCurrentItem(0);
+
+    // grid layout
+    QGridLayout *mainGrid = new QGridLayout(q);
+
+    int spacing = mainGrid->spacing();
+    if (spacing >= 0) {     // uniform spacing
+       mainGrid->setSpacing(0);
+
+       mainGrid->setColumnMinimumWidth(1, spacing);
+       mainGrid->setColumnMinimumWidth(3, spacing);
+
+       int margin = 0;
+       mainGrid->getContentsMargins(0, 0, 0, &margin);
+
+       mainGrid->setRowMinimumHeight(3, margin);
+       mainGrid->setRowMinimumHeight(6, 2);
+       mainGrid->setRowMinimumHeight(8, margin);
+    }
+
+    mainGrid->addWidget(familyAccel, 0, 0);
+    mainGrid->addWidget(familyEdit, 1, 0);
+    mainGrid->addWidget(familyList, 2, 0);
+
+    mainGrid->addWidget(styleAccel, 0, 2);
+    mainGrid->addWidget(styleEdit, 1, 2);
+    mainGrid->addWidget(styleList, 2, 2);
+
+    mainGrid->addWidget(sizeAccel, 0, 4);
+    mainGrid->addWidget(sizeEdit, 1, 4);
+    mainGrid->addWidget(sizeList, 2, 4);
+
+    mainGrid->setColumnStretch(0, 38);
+    mainGrid->setColumnStretch(2, 24);
+    mainGrid->setColumnStretch(4, 10);
+
+    mainGrid->addWidget(effects, 4, 0);
+
+    mainGrid->addWidget(sample, 4, 2, 4, 3);
+
+    mainGrid->addWidget(writingSystemAccel, 5, 0);
+    mainGrid->addWidget(writingSystemCombo, 7, 0);
+
+    buttonBox = new QDialogButtonBox(q);
+    mainGrid->addWidget(buttonBox, 9, 0, 1, 5);
+
+    QPushButton *button
+            = static_cast<QPushButton *>(buttonBox->addButton(QDialogButtonBox::Ok));
+    QObject::connect(buttonBox, SIGNAL(accepted()), q, SLOT(accept()));
+    button->setDefault(true);
+
+    buttonBox->addButton(QDialogButtonBox::Cancel);
+    QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject()));
+
+#if defined(Q_WS_WINCE)
+    q->resize(180, 120);
+#elif defined(Q_WS_S60)
+    q->resize(QApplication::desktop()->availableGeometry(QCursor::pos()).size());
+#else
+    q->resize(500, 360);
+#endif // Q_WS_WINCE
+
+    sizeEdit->installEventFilter(q);
+    familyList->installEventFilter(q);
+    styleList->installEventFilter(q);
+    sizeList->installEventFilter(q);
+
+    familyList->setFocus();
+    retranslateStrings();
+}
+
+/*!
+  \internal
+ Destroys the font dialog and frees up its storage.
+*/
+
+QFontDialog::~QFontDialog()
+{
+#ifdef Q_WS_MAC
+    Q_D(QFontDialog);
+    if (d->delegate) {
+        d->closeCocoaFontPanel();
+        return;
+    }
+#endif
+}
+
+/*!
+  Executes a modal font dialog and returns a font.
+
+  If the user clicks \gui OK, the selected font is returned. If the user
+  clicks \gui Cancel, the \a initial font is returned.
+
+  The dialog is constructed with the given \a parent and the options specified
+  in \a options. \a title is shown as the window title of the dialog and  \a
+  initial is the initially selected font. If the \a ok parameter is not-null,
+  the value it refers to is set to true if the user clicks \gui OK, and set to
+  false if the user clicks \gui Cancel.
+
+  Examples:
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 2
+
+    The dialog can also be used to set a widget's font directly:
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 3
+  In this example, if the user clicks OK the font they chose will be
+  used, and if they click Cancel the original font is used.
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QFontDialog constructors.
+*/
+QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget *parent, const QString &title,
+                           FontDialogOptions options)
+{
+    return QFontDialogPrivate::getFont(ok, initial, parent, title, options);
+}
+
+/*!
+    \overload
+    \since 4.5
+*/
+QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget *parent, const QString &title)
+{
+    return QFontDialogPrivate::getFont(ok, initial, parent, title, 0);
+}
+
+/*!
+    \overload
+*/
+QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget *parent)
+{
+    return QFontDialogPrivate::getFont(ok, initial, parent, QString(), 0);
+}
+
+/*!
+    \overload
+
+  Executes a modal font dialog and returns a font.
+
+  If the user clicks \gui OK, the selected font is returned. If the user
+  clicks \gui Cancel, the Qt default font is returned.
+
+  The dialog is constructed with the given \a parent.
+  If the \a ok parameter is not-null, the value it refers to is set
+  to true if the user clicks \gui OK, and false if the user clicks
+  \gui Cancel.
+
+  Example:
+  \snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 4
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QFontDialog constructors.
+*/
+QFont QFontDialog::getFont(bool *ok, QWidget *parent)
+{
+    QFont initial;
+    return QFontDialogPrivate::getFont(ok, initial, parent, QString(), 0);
+}
+
+QFont QFontDialogPrivate::getFont(bool *ok, const QFont &initial, QWidget *parent,
+                                  const QString &title, QFontDialog::FontDialogOptions options)
+{
+    QFontDialog dlg(parent);
+    dlg.setOptions(options);
+    dlg.setCurrentFont(initial);
+    if (!title.isEmpty())
+        dlg.setWindowTitle(title);
+
+    int ret = (dlg.exec() || (options & QFontDialog::NoButtons));
+    if (ok)
+        *ok = !!ret;
+    if (ret) {
+        return dlg.selectedFont();
+    } else {
+        return initial;
+    }
+}
+
+/*!
+    \internal
+    An event filter to make the Up, Down, PageUp and PageDown keys work
+    correctly in the line edits. The source of the event is the object
+    \a o and the event is \a e.
+*/
+
+bool QFontDialog::eventFilter(QObject *o , QEvent *e)
+{
+    Q_D(QFontDialog);
+    if (e->type() == QEvent::KeyPress) {
+        QKeyEvent *k = (QKeyEvent *)e;
+        if (o == d->sizeEdit &&
+        (k->key() == Qt::Key_Up ||
+             k->key() == Qt::Key_Down ||
+         k->key() == Qt::Key_PageUp ||
+         k->key() == Qt::Key_PageDown)) {
+
+            int ci = d->sizeList->currentItem();
+            (void)QApplication::sendEvent(d->sizeList, k);
+
+            if (ci != d->sizeList->currentItem()
+                    && style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, this))
+                d->sizeEdit->selectAll();
+            return true;
+        } else if ((o == d->familyList || o == d->styleList) &&
+                    (k->key() == Qt::Key_Return || k->key() == Qt::Key_Enter)) {
+            k->accept();
+        accept();
+            return true;
+        }
+    } else if (e->type() == QEvent::FocusIn
+               && style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, this)) {
+        if (o == d->familyList)
+            d->familyEdit->selectAll();
+        else if (o == d->styleList)
+            d->styleEdit->selectAll();
+        else if (o == d->sizeList)
+            d->sizeEdit->selectAll();
+    } else if (e->type() == QEvent::MouseButtonPress && o == d->sizeList) {
+            d->sizeEdit->setFocus();
+    }
+    return QDialog::eventFilter(o, e);
+}
+
+/*
+    Updates the contents of the "font family" list box. This
+    function can be reimplemented if you have special requirements.
+*/
+
+void QFontDialogPrivate::updateFamilies()
+{
+    Q_Q(QFontDialog);
+
+    enum match_t { MATCH_NONE = 0, MATCH_LAST_RESORT = 1, MATCH_APP = 2, MATCH_FAMILY = 3 };
+
+    QStringList familyNames = fdb.families(writingSystem);
+
+    familyList->model()->setStringList(familyNames);
+
+    QString foundryName1, familyName1, foundryName2, familyName2;
+    int bestFamilyMatch = -1;
+    match_t bestFamilyType = MATCH_NONE;
+
+    QFont f;
+
+    // ##### do the right thing for a list of family names in the font.
+    QFontDatabase::parseFontName(family, foundryName1, familyName1);
+
+    QStringList::const_iterator it = familyNames.constBegin();
+    int i = 0;
+    for(; it != familyNames.constEnd(); ++it, ++i) {
+        QFontDatabase::parseFontName(*it, foundryName2, familyName2);
+
+        //try to match...
+        if (familyName1 == familyName2) {
+            bestFamilyType = MATCH_FAMILY;
+            if (foundryName1 == foundryName2) {
+                bestFamilyMatch = i;
+                break;
+            }
+            if (bestFamilyMatch < MATCH_FAMILY)
+                bestFamilyMatch = i;
+        }
+
+        //and try some fall backs
+        match_t type = MATCH_NONE;
+        if (bestFamilyType <= MATCH_NONE && familyName2 == f.lastResortFamily())
+            type = MATCH_LAST_RESORT;
+        if (bestFamilyType <= MATCH_LAST_RESORT && familyName2 == f.family())
+            type = MATCH_APP;
+        // ### add fallback for writingSystem
+        if (type != MATCH_NONE) {
+            bestFamilyType = type;
+            bestFamilyMatch = i;
+        }
+    }
+
+    if (i != -1 && bestFamilyType != MATCH_NONE)
+        familyList->setCurrentItem(bestFamilyMatch);
+    else
+        familyList->setCurrentItem(0);
+    familyEdit->setText(familyList->currentText());
+    if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+            && familyList->hasFocus())
+        familyEdit->selectAll();
+
+    updateStyles();
+}
+
+/*
+    Updates the contents of the "font style" list box. This
+    function can be reimplemented if you have special requirements.
+*/
+void QFontDialogPrivate::updateStyles()
+{
+    Q_Q(QFontDialog);
+    QStringList styles = fdb.styles(familyList->currentText());
+    styleList->model()->setStringList(styles);
+
+    if (styles.isEmpty()) {
+        styleEdit->clear();
+        smoothScalable = false;
+    } else {
+        if (!style.isEmpty()) {
+            bool found = false;
+            bool first = true;
+            QString cstyle = style;
+
+        redo:
+            for (int i = 0; i < (int)styleList->count(); i++) {
+                if (cstyle == styleList->text(i)) {
+                     styleList->setCurrentItem(i);
+                     found = true;
+                     break;
+                 }
+            }
+            if (!found && first) {
+                if (cstyle.contains(QLatin1String("Italic"))) {
+                    cstyle.replace(QLatin1String("Italic"), QLatin1String("Oblique"));
+                    first = false;
+                    goto redo;
+                } else if (cstyle.contains(QLatin1String("Oblique"))) {
+                    cstyle.replace(QLatin1String("Oblique"), QLatin1String("Italic"));
+                    first = false;
+                    goto redo;
+                }
+            }
+            if (!found)
+                styleList->setCurrentItem(0);
+        } else {
+            styleList->setCurrentItem(0);
+        }
+
+        styleEdit->setText(styleList->currentText());
+        if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+                && styleList->hasFocus())
+            styleEdit->selectAll();
+
+        smoothScalable = fdb.isSmoothlyScalable(familyList->currentText(), styleList->currentText());
+    }
+
+    updateSizes();
+}
+
+/*!
+    \internal
+    Updates the contents of the "font size" list box. This
+  function can be reimplemented if you have special requirements.
+*/
+
+void QFontDialogPrivate::updateSizes()
+{
+    Q_Q(QFontDialog);
+
+    if (!familyList->currentText().isEmpty()) {
+        QList<int> sizes = fdb.pointSizes(familyList->currentText(), styleList->currentText());
+
+        int i = 0;
+        int current = -1;
+        QStringList str_sizes;
+        for(QList<int>::const_iterator it = sizes.constBegin(); it != sizes.constEnd(); ++it) {
+            str_sizes.append(QString::number(*it));
+            if (current == -1 && *it >= size)
+                current = i;
+            ++i;
+        }
+        sizeList->model()->setStringList(str_sizes);
+        if (current == -1) {
+            // we request a size bigger than the ones in the list, select the biggest one
+            current = sizeList->count() - 1;
+        }
+        sizeList->setCurrentItem(current);
+
+        sizeEdit->blockSignals(true);
+        sizeEdit->setText((smoothScalable ? QString::number(size) : sizeList->currentText()));
+        if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+                && sizeList->hasFocus())
+            sizeEdit->selectAll();
+        sizeEdit->blockSignals(false);
+    } else {
+        sizeEdit->clear();
+    }
+
+    _q_updateSample();
+}
+
+void QFontDialogPrivate::_q_updateSample()
+{
+    // compute new font
+    int pSize = sizeEdit->text().toInt();
+    QFont newFont(fdb.font(familyList->currentText(), style, pSize));
+    newFont.setStrikeOut(strikeout->isChecked());
+    newFont.setUnderline(underline->isChecked());
+
+    if (familyList->currentText().isEmpty())
+        sampleEdit->clear();
+
+    updateSampleFont(newFont);
+}
+
+void QFontDialogPrivate::updateSampleFont(const QFont &newFont)
+{
+    Q_Q(QFontDialog);
+    if (newFont != sampleEdit->font()) {
+        sampleEdit->setFont(newFont);
+        emit q->currentFontChanged(newFont);
+    }
+}
+
+/*!
+    \internal
+*/
+void QFontDialogPrivate::_q_writingSystemHighlighted(int index)
+{
+    writingSystem = QFontDatabase::WritingSystem(index);
+    sampleEdit->setText(fdb.writingSystemSample(writingSystem));
+    updateFamilies();
+}
+
+/*!
+    \internal
+*/
+void QFontDialogPrivate::_q_familyHighlighted(int i)
+{
+    Q_Q(QFontDialog);
+    family = familyList->text(i);
+    familyEdit->setText(family);
+    if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+            && familyList->hasFocus())
+        familyEdit->selectAll();
+
+    updateStyles();
+}
+
+
+/*!
+    \internal
+*/
+
+void QFontDialogPrivate::_q_styleHighlighted(int index)
+{
+    Q_Q(QFontDialog);
+    QString s = styleList->text(index);
+    styleEdit->setText(s);
+    if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+            && styleList->hasFocus())
+        styleEdit->selectAll();
+
+    style = s;
+
+    updateSizes();
+}
+
+
+/*!
+    \internal
+*/
+
+void QFontDialogPrivate::_q_sizeHighlighted(int index)
+{
+    Q_Q(QFontDialog);
+    QString s = sizeList->text(index);
+    sizeEdit->setText(s);
+    if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+            && sizeEdit->hasFocus())
+        sizeEdit->selectAll();
+
+    size = s.toInt();
+    _q_updateSample();
+}
+
+/*!
+    \internal
+    This slot is called if the user changes the font size.
+    The size is passed in the \a s argument as a \e string.
+*/
+
+void QFontDialogPrivate::_q_sizeChanged(const QString &s)
+{
+    // no need to check if the conversion is valid, since we have an QIntValidator in the size edit
+    int size = s.toInt();
+    if (this->size == size)
+        return;
+
+    this->size = size;
+    if (sizeList->count() != 0) {
+        int i;
+        for (i = 0; i < sizeList->count() - 1; i++) {
+            if (sizeList->text(i).toInt() >= this->size)
+                break;
+        }
+        sizeList->blockSignals(true);
+        sizeList->setCurrentItem(i);
+        sizeList->blockSignals(false);
+    }
+    _q_updateSample();
+}
+
+void QFontDialogPrivate::retranslateStrings()
+{
+    familyAccel->setText(QFontDialog::tr("&Font"));
+    styleAccel->setText(QFontDialog::tr("Font st&yle"));
+    sizeAccel->setText(QFontDialog::tr("&Size"));
+#ifndef Q_WS_S60
+    // Removed the title due to lack of screen estate in small S60 screen.
+    // The effects are descriptive without a title (strikeout, underline).
+    effects->setTitle(QFontDialog::tr("Effects"));
+#endif
+    strikeout->setText(QFontDialog::tr("Stri&keout"));
+    underline->setText(QFontDialog::tr("&Underline"));
+    sample->setTitle(QFontDialog::tr("Sample"));
+    writingSystemAccel->setText(QFontDialog::tr("Wr&iting System"));
+}
+
+/*!
+    \reimp
+*/
+void QFontDialog::changeEvent(QEvent *e)
+{
+    Q_D(QFontDialog);
+    if (e->type() == QEvent::LanguageChange) {
+        d->retranslateStrings();
+    }
+    QDialog::changeEvent(e);
+}
+
+/*!
+    \since 4.5
+
+    \property QFontDialog::currentFont
+    \brief the current font of the dialog.
+*/
+
+/*!
+    \since 4.5
+
+    Sets the font highlighted in the QFontDialog to the given \a font.
+
+    \sa selectedFont()
+*/
+void QFontDialog::setCurrentFont(const QFont &font)
+{
+    Q_D(QFontDialog);
+    d->family = font.family();
+    d->style = d->fdb.styleString(font);
+    d->size = font.pointSize();
+    if (d->size == -1) {
+        QFontInfo fi(font);
+        d->size = fi.pointSize();
+    }
+    d->strikeout->setChecked(font.strikeOut());
+    d->underline->setChecked(font.underline());
+    d->updateFamilies();
+
+#ifdef Q_WS_MAC
+    if (d->delegate)
+        QFontDialogPrivate::setFont(d->delegate, font);
+#endif
+}
+
+/*!
+    \since 4.5
+
+    Returns the current font.
+
+    \sa selectedFont()
+*/
+QFont QFontDialog::currentFont() const
+{
+    Q_D(const QFontDialog);
+    return d->sampleEdit->font();
+}
+
+/*!
+    Returns the font that the user selected by clicking the \gui{OK}
+    or equivalent button.
+
+    \note This font is not always the same as the font held by the
+    \l currentFont property since the user can choose different fonts
+    before finally selecting the one to use.
+*/
+QFont QFontDialog::selectedFont() const
+{
+    Q_D(const QFontDialog);
+    return d->selectedFont;
+}
+
+/*!
+    \enum QFontDialog::FontDialogOption
+    \since 4.5
+
+    This enum specifies various options that affect the look and feel
+    of a font dialog.
+
+    \value NoButtons Don't display \gui{OK} and \gui{Cancel} buttons. (Useful for "live dialogs".)
+    \value DontUseNativeDialog Use Qt's standard font dialog on the Mac instead of Apple's
+                               native font panel. (Currently, the native dialog is never used,
+                               but this is likely to change in future Qt releases.)
+
+    \sa options, setOption(), testOption()
+*/
+
+/*!
+    Sets the given \a option to be enabled if \a on is true;
+    otherwise, clears the given \a option.
+
+    \sa options, testOption()
+*/
+void QFontDialog::setOption(FontDialogOption option, bool on)
+{
+    Q_D(QFontDialog);
+    if (!(d->opts & option) != !on)
+        setOptions(d->opts ^ option);
+}
+
+/*!
+    Returns true if the given \a option is enabled; otherwise, returns
+    false.
+
+    \sa options, setOption()
+*/
+bool QFontDialog::testOption(FontDialogOption option) const
+{
+    Q_D(const QFontDialog);
+    return (d->opts & option) != 0;
+}
+
+/*!
+    \property QFontDialog::options
+    \brief the various options that affect the look and feel of the dialog
+    \since 4.5
+
+    By default, all options are disabled.
+
+    Options should be set before showing the dialog. Setting them while the
+    dialog is visible is not guaranteed to have an immediate effect on the
+    dialog (depending on the option and on the platform).
+
+    \sa setOption(), testOption()
+*/
+void QFontDialog::setOptions(FontDialogOptions options)
+{
+    Q_D(QFontDialog);
+
+    FontDialogOptions changed = (options ^ d->opts);
+    if (!changed)
+        return;
+
+    d->opts = options;
+    d->buttonBox->setVisible(!(options & NoButtons));
+}
+
+QFontDialog::FontDialogOptions QFontDialog::options() const
+{
+    Q_D(const QFontDialog);
+    return d->opts;
+}
+
+#ifdef Q_WS_MAC
+// can only have one Cocoa font panel active
+bool QFontDialogPrivate::sharedFontPanelAvailable = true;
+#endif
+
+/*!
+    \since 4.5
+    \overload
+
+    Opens the dialog and connects its fontSelected() signal to the slot specified
+    by \a receiver and \a member.
+
+    The signal will be disconnected from the slot when the dialog is closed.
+*/
+void QFontDialog::open(QObject *receiver, const char *member)
+{
+    Q_D(QFontDialog);
+    connect(this, SIGNAL(fontSelected(QFont)), receiver, member);
+    d->receiverToDisconnectOnClose = receiver;
+    d->memberToDisconnectOnClose = member;
+    QDialog::open();
+}
+
+/*!
+    \since 4.5
+
+    \fn void QFontDialog::currentFontChanged(const QFont &font)
+
+    This signal is emitted when the current font is changed. The new font is
+    specified in \a font.
+
+    The signal is emitted while a user is selecting a font. Ultimately, the
+    chosen font may differ from the font currently selected.
+
+    \sa currentFont, fontSelected(), selectedFont()
+*/
+
+/*!
+    \since 4.5
+
+    \fn void QFontDialog::fontSelected(const QFont &font)
+
+    This signal is emitted when a font has been selected. The selected font is
+    specified in \a font.
+
+    The signal is only emitted when a user has chosen the final font to be
+    used. It is not emitted while the user is changing the current font in the
+    font dialog.
+
+    \sa selectedFont(), currentFontChanged(), currentFont
+*/
+
+/*!
+    \reimp
+*/
+void QFontDialog::setVisible(bool visible)
+{
+    if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden) != visible)
+        return;
+#ifdef Q_WS_MAC
+    Q_D(QFontDialog);
+    if (d->canBeNativeDialog()){
+        if (d->setVisible_sys(visible)){
+            d->nativeDialogInUse = true;
+            // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below
+            // updates the state correctly, but skips showing the non-native version:
+            setAttribute(Qt::WA_DontShowOnScreen, true);
+        } else {
+            d->nativeDialogInUse = false;
+            setAttribute(Qt::WA_DontShowOnScreen, false);
+        }
+    }
+#endif // Q_WS_MAC
+    QDialog::setVisible(visible);
+}
+
+/*!
+  Closes the dialog and sets its result code to \a result. If this dialog
+  is shown with exec(), done() causes the local event loop to finish,
+  and exec() to return \a result.
+
+  \sa QDialog::done()
+*/
+void QFontDialog::done(int result)
+{
+    Q_D(QFontDialog);
+    QDialog::done(result);
+    if (result == Accepted) {
+        // We check if this is the same font we had before, if so we emit currentFontChanged
+        QFont selectedFont = currentFont();
+        if(selectedFont != d->selectedFont)
+            emit(currentFontChanged(selectedFont));
+        d->selectedFont = selectedFont;
+        emit fontSelected(d->selectedFont);
+    } else
+        d->selectedFont = QFont();
+    if (d->receiverToDisconnectOnClose) {
+        disconnect(this, SIGNAL(fontSelected(QFont)),
+                   d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
+        d->receiverToDisconnectOnClose = 0;
+    }
+    d->memberToDisconnectOnClose.clear();
+}
+
+#ifdef Q_WS_MAC
+bool QFontDialogPrivate::canBeNativeDialog()
+{
+    Q_Q(QFontDialog);
+    if (nativeDialogInUse)
+        return true;
+    if (q->testAttribute(Qt::WA_DontShowOnScreen))
+        return false;
+    if (opts & QFontDialog::DontUseNativeDialog)
+        return false;
+
+    QLatin1String staticName(QFontDialog::staticMetaObject.className());
+    QLatin1String dynamicName(q->metaObject()->className());
+    return (staticName == dynamicName);
+}
+#endif // Q_WS_MAC
+
+/*!
+    \fn QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget* parent, const char* name)
+    \since 4.5
+
+    Call getFont(\a ok, \a initial, \a parent) instead.
+
+    \warning Do not delete \a parent during the execution of the dialog.
+             If you want to do this, you should create the dialog
+             yourself using one of the QFontDialog constructors.
+
+    The \a name parameter is ignored.
+*/
+
+/*!
+    \fn QFont QFontDialog::getFont(bool *ok, QWidget* parent, const char* name)
+
+    Call getFont(\a ok, \a parent) instead.
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QFontDialog constructors.
+
+    The \a name parameter is ignored.
+*/
+
+QT_END_NAMESPACE
+
+#include "qfontdialog.moc"
+#include "moc_qfontdialog.cpp"
+
+#endif // QT_NO_FONTDIALOG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qhelpsearchquerywidget.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,593 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qhelpsearchquerywidget.h"
+
+#include <QtCore/QAbstractListModel>
+#include <QtCore/QObject>
+#include <QtCore/QStringList>
+#include <QtCore/QtGlobal>
+
+#include <QtGui/QCompleter>
+#include <QtGui/QLabel>
+#include <QtGui/QLayout>
+#include <QtGui/QLineEdit>
+#include <QtGui/QFocusEvent>
+#include <QtGui/QPushButton>
+#include <QtGui/QToolButton>
+
+QT_BEGIN_NAMESPACE
+
+class QHelpSearchQueryWidgetPrivate : public QObject
+{
+    Q_OBJECT
+
+private:
+    struct QueryHistory {
+        explicit QueryHistory() : curQuery(-1) {}
+        QList<QList<QHelpSearchQuery> > queries;
+        int curQuery;
+    };
+
+    class CompleterModel : public QAbstractListModel
+    {
+    public:
+        explicit CompleterModel(QObject *parent)
+          : QAbstractListModel(parent) {}
+
+        int rowCount(const QModelIndex &parent = QModelIndex()) const
+        {
+            return parent.isValid() ? 0 : termList.size();
+        }
+
+        QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const
+        {
+            if (!index.isValid() || index.row() >= termList.count()||
+                (role != Qt::EditRole && role != Qt::DisplayRole))
+                return QVariant();
+            return termList.at(index.row());
+        }
+
+        void addTerm(const QString &term)
+        {
+            if (!termList.contains(term)) {
+                termList.append(term);
+                reset();
+            }
+        }
+
+    private:
+        QStringList termList;
+    };
+
+    QHelpSearchQueryWidgetPrivate()
+        : QObject()
+        , simpleSearch(true)
+        , searchCompleter(new CompleterModel(this), this)
+    {
+        searchButton = 0;
+        advancedSearchWidget = 0;
+        showHideAdvancedSearchButton = 0;
+        defaultQuery = 0;
+        exactQuery = 0;
+        similarQuery = 0;
+        withoutQuery = 0;
+        allQuery = 0;
+        atLeastQuery = 0;
+    }
+
+    ~QHelpSearchQueryWidgetPrivate()
+    {
+        // nothing todo
+    }
+
+    void retranslate()
+    {
+        simpleSearchLabel->setText(QHelpSearchQueryWidget::tr("Search for:"));
+        prevQueryButton->setToolTip(QHelpSearchQueryWidget::tr("Previous search"));
+        nextQueryButton->setToolTip(QHelpSearchQueryWidget::tr("Next search"));
+        searchButton->setText(QHelpSearchQueryWidget::tr("Search"));
+#ifdef QT_CLUCENE_SUPPORT
+        advancedSearchLabel->setText(QHelpSearchQueryWidget::tr("Advanced search"));
+        similarLabel->setText(QHelpSearchQueryWidget::tr("words <B>similar</B> to:"));
+        withoutLabel->setText(QHelpSearchQueryWidget::tr("<B>without</B> the words:"));
+        exactLabel->setText(QHelpSearchQueryWidget::tr("with <B>exact phrase</B>:"));
+        allLabel->setText(QHelpSearchQueryWidget::tr("with <B>all</B> of the words:"));
+        atLeastLabel->setText(QHelpSearchQueryWidget::tr("with <B>at least one</B> of the words:"));
+#endif
+    }
+
+    QStringList buildTermList(const QString query)
+    {
+        bool s = false;
+        QString phrase;
+        QStringList wordList;
+        QString searchTerm = query;
+
+        for (int i = 0; i < searchTerm.length(); ++i) {
+            if (searchTerm[i] == QLatin1Char('\"') && !s) {
+                s = true;
+                phrase = searchTerm[i];
+                continue;
+            }
+            if (searchTerm[i] != QLatin1Char('\"') && s)
+                phrase += searchTerm[i];
+            if (searchTerm[i] == QLatin1Char('\"') && s) {
+                s = false;
+                phrase += searchTerm[i];
+                wordList.append(phrase);
+                searchTerm.remove(phrase);
+            }
+        }
+        if (s)
+            searchTerm.replace(phrase, phrase.mid(1));
+
+        const QRegExp exp(QLatin1String("\\s+"));
+        wordList += searchTerm.split(exp, QString::SkipEmptyParts);
+        return wordList;
+    }
+
+    void saveQuery(const QList<QHelpSearchQuery> &query, QueryHistory &queryHist)
+    {
+        // We only add the query to the list if it is different from the last one.
+        bool insert = false;
+        if (queryHist.queries.empty())
+            insert = true;
+        else {
+            const QList<QHelpSearchQuery> &lastQuery = queryHist.queries.last();
+            if (lastQuery.size() != query.size()) {
+                insert = true;
+            } else {
+                for (int i = 0; i < query.size(); ++i) {
+                    if (query.at(i).fieldName != lastQuery.at(i).fieldName
+                        || query.at(i).wordList != lastQuery.at(i).wordList) {
+                        insert = true;
+                        break;
+                    }
+                }
+            }
+        }
+        if (insert) {
+            queryHist.queries.append(query);
+            foreach (const QHelpSearchQuery &queryPart, query) {
+                static_cast<CompleterModel *>(searchCompleter.model())->
+                        addTerm(queryPart.wordList.join(" "));
+            }
+        }
+    }
+
+    void nextOrPrevQuery(int maxOrMinIndex, int addend, QToolButton *thisButton,
+        QToolButton *otherButton)
+    {
+        QueryHistory *queryHist;
+        QList<QLineEdit *> lineEdits;
+        if (simpleSearch) {
+            queryHist = &simpleQueries;
+            lineEdits << defaultQuery;
+        } else {
+            queryHist = &complexQueries;
+            lineEdits << allQuery << atLeastQuery << similarQuery
+                << withoutQuery << exactQuery;
+        }
+        foreach (QLineEdit *lineEdit, lineEdits)
+            lineEdit->clear();
+
+        // Otherwise, the respective button would be disabled.
+        Q_ASSERT(queryHist->curQuery != maxOrMinIndex);
+
+        queryHist->curQuery += addend;
+        const QList<QHelpSearchQuery> &query =
+            queryHist->queries.at(queryHist->curQuery);
+        foreach (const QHelpSearchQuery &queryPart, query) {
+            if (QLineEdit *lineEdit = lineEditFor(queryPart.fieldName))
+                lineEdit->setText(queryPart.wordList.join(" "));
+        }
+
+        if (queryHist->curQuery == maxOrMinIndex)
+            thisButton->setEnabled(false);
+        otherButton->setEnabled(true);
+    }
+
+    QLineEdit* lineEditFor(const QHelpSearchQuery::FieldName &fieldName) const
+    {
+        switch (fieldName) {
+            case QHelpSearchQuery::DEFAULT:
+                return defaultQuery;
+            case QHelpSearchQuery::ALL:
+                return allQuery;
+            case QHelpSearchQuery::ATLEAST:
+                return atLeastQuery;
+            case QHelpSearchQuery::FUZZY:
+                return similarQuery;
+            case QHelpSearchQuery::WITHOUT:
+                return withoutQuery;
+            case QHelpSearchQuery::PHRASE:
+                return exactQuery;
+            default:
+                Q_ASSERT(0);
+        }
+        return 0;
+    }
+
+    void enableOrDisableToolButtons()
+    {
+        const QueryHistory &queryHist = simpleSearch ? simpleQueries
+            : complexQueries;
+        prevQueryButton->setEnabled(queryHist.curQuery > 0);
+        nextQueryButton->setEnabled(queryHist.curQuery
+            < queryHist.queries.size() - 1);
+    }
+
+private slots:
+    void showHideAdvancedSearch()
+    {
+        if (simpleSearch) {
+            advancedSearchWidget->show();
+            showHideAdvancedSearchButton->setText((QLatin1String("-")));
+        } else {
+            advancedSearchWidget->hide();
+            showHideAdvancedSearchButton->setText((QLatin1String("+")));
+        }
+
+        simpleSearch = !simpleSearch;
+        defaultQuery->setEnabled(simpleSearch);
+        enableOrDisableToolButtons();
+    }
+
+    void searchRequested()
+    {
+        QList<QHelpSearchQuery> queryList;
+#if !defined(QT_CLUCENE_SUPPORT)
+        queryList.append(QHelpSearchQuery(QHelpSearchQuery::DEFAULT,
+            QStringList(defaultQuery->text())));
+
+#else
+        if (defaultQuery->isEnabled()) {
+            queryList.append(QHelpSearchQuery(QHelpSearchQuery::DEFAULT,
+                buildTermList(defaultQuery->text())));
+        } else {
+            const QRegExp exp(QLatin1String("\\s+"));
+            QStringList lst = similarQuery->text().split(exp,
+                QString::SkipEmptyParts);
+            if (!lst.isEmpty()) {
+                QStringList fuzzy;
+                foreach (const QString &term, lst)
+                    fuzzy += buildTermList(term);
+                queryList.append(QHelpSearchQuery(QHelpSearchQuery::FUZZY,
+                    fuzzy));
+            }
+
+            lst = withoutQuery->text().split(exp, QString::SkipEmptyParts);
+            if (!lst.isEmpty()) {
+                QStringList without;
+                foreach (const QString &term, lst)
+                    without.append(term);
+                queryList.append(QHelpSearchQuery(QHelpSearchQuery::WITHOUT,
+                    without));
+            }
+
+            if (!exactQuery->text().isEmpty()) {
+                QString phrase = exactQuery->text().remove(QLatin1Char('\"'));
+                phrase = phrase.simplified();
+                queryList.append(QHelpSearchQuery(QHelpSearchQuery::PHRASE,
+                    QStringList(phrase)));
+            }
+
+            lst = allQuery->text().split(exp, QString::SkipEmptyParts);
+            if (!lst.isEmpty()) {
+                QStringList all;
+                foreach (const QString &term, lst)
+                    all.append(term);
+                queryList.append(QHelpSearchQuery(QHelpSearchQuery::ALL, all));
+            }
+
+            lst = atLeastQuery->text().split(exp, QString::SkipEmptyParts);
+            if (!lst.isEmpty()) {
+                QStringList atLeast;
+                foreach (const QString &term, lst)
+                    atLeast += buildTermList(term);
+                queryList.append(QHelpSearchQuery(QHelpSearchQuery::ATLEAST,
+                    atLeast));
+            }
+        }
+#endif
+        QueryHistory &queryHist = simpleSearch ? simpleQueries : complexQueries;
+        saveQuery(queryList, queryHist);
+        queryHist.curQuery = queryHist.queries.size() - 1;
+        if (queryHist.curQuery > 0)
+            prevQueryButton->setEnabled(true);
+        nextQueryButton->setEnabled(false);
+    }
+
+    void nextQuery()
+    {
+        nextOrPrevQuery((simpleSearch ? simpleQueries
+            : complexQueries).queries.size() - 1, 1, nextQueryButton,
+                prevQueryButton);
+    }
+
+    void prevQuery()
+    {
+        nextOrPrevQuery(0, -1, prevQueryButton, nextQueryButton);
+    }
+
+private:
+    friend class QHelpSearchQueryWidget;
+
+    bool simpleSearch;
+    QLabel *simpleSearchLabel;
+    QLabel *advancedSearchLabel;
+    QLabel *similarLabel;
+    QLabel *withoutLabel;
+    QLabel *exactLabel;
+    QLabel *allLabel;
+    QLabel *atLeastLabel;
+    QPushButton *searchButton;
+    QWidget* advancedSearchWidget;
+    QToolButton *showHideAdvancedSearchButton;
+    QLineEdit *defaultQuery;
+    QLineEdit *exactQuery;
+    QLineEdit *similarQuery;
+    QLineEdit *withoutQuery;
+    QLineEdit *allQuery;
+    QLineEdit *atLeastQuery;
+    QToolButton *nextQueryButton;
+    QToolButton *prevQueryButton;
+    QueryHistory simpleQueries;
+    QueryHistory complexQueries;
+    QCompleter searchCompleter;
+};
+
+#include "qhelpsearchquerywidget.moc"
+
+
+/*!
+    \class QHelpSearchQueryWidget
+    \since 4.4
+    \inmodule QtHelp
+    \brief The QHelpSearchQueryWidget class provides a simple line edit or
+    an advanced widget to enable the user to input a search term in a
+    standardized input mask.
+*/
+
+/*!
+    \fn void QHelpSearchQueryWidget::search()
+
+    This signal is emitted when a the user has the search button invoked.
+    After reciving the signal you can ask the QHelpSearchQueryWidget for the
+    build list of QHelpSearchQuery's that you may pass to the QHelpSearchEngine's
+    search() function.
+*/
+
+/*!
+    Constructs a new search query widget with the given \a parent.
+*/
+QHelpSearchQueryWidget::QHelpSearchQueryWidget(QWidget *parent)
+    : QWidget(parent)
+{
+    d = new QHelpSearchQueryWidgetPrivate();
+
+    QVBoxLayout *vLayout = new QVBoxLayout(this);
+    vLayout->setMargin(0);
+
+    QHBoxLayout* hBoxLayout = new QHBoxLayout();
+    d->simpleSearchLabel = new QLabel(this);
+    d->defaultQuery = new QLineEdit(this);
+    d->defaultQuery->setCompleter(&d->searchCompleter);
+    d->prevQueryButton = new QToolButton(this);
+    d->prevQueryButton->setArrowType(Qt::LeftArrow);
+    d->prevQueryButton->setEnabled(false);
+    d->nextQueryButton = new QToolButton(this);
+    d->nextQueryButton->setArrowType(Qt::RightArrow);
+    d->nextQueryButton->setEnabled(false);
+    d->searchButton = new QPushButton(this);
+    hBoxLayout->addWidget(d->simpleSearchLabel);
+    hBoxLayout->addWidget(d->defaultQuery);
+    hBoxLayout->addWidget(d->prevQueryButton);
+    hBoxLayout->addWidget(d->nextQueryButton);
+    hBoxLayout->addWidget(d->searchButton);
+
+    vLayout->addLayout(hBoxLayout);
+
+    connect(d->prevQueryButton, SIGNAL(clicked()), d, SLOT(prevQuery()));
+    connect(d->nextQueryButton, SIGNAL(clicked()), d, SLOT(nextQuery()));
+    connect(d->searchButton, SIGNAL(clicked()), this, SIGNAL(search()));
+    connect(d->defaultQuery, SIGNAL(returnPressed()), this, SIGNAL(search()));
+
+#if defined(QT_CLUCENE_SUPPORT)
+    hBoxLayout = new QHBoxLayout();
+    d->showHideAdvancedSearchButton = new QToolButton(this);
+    d->showHideAdvancedSearchButton->setText(QLatin1String("+"));
+    d->showHideAdvancedSearchButton->setMinimumSize(25, 20);
+
+    d->advancedSearchLabel = new QLabel(this);
+    QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
+    sizePolicy.setHeightForWidth(d->advancedSearchLabel->sizePolicy().hasHeightForWidth());
+    d->advancedSearchLabel->setSizePolicy(sizePolicy);
+
+    QFrame* hLine = new QFrame(this);
+    hLine->setFrameStyle(QFrame::HLine);
+    hBoxLayout->addWidget(d->showHideAdvancedSearchButton);
+    hBoxLayout->addWidget(d->advancedSearchLabel);
+    hBoxLayout->addWidget(hLine);
+
+    vLayout->addLayout(hBoxLayout);
+
+    // setup advanced search layout
+    d->advancedSearchWidget = new QWidget(this);
+    QGridLayout *gLayout = new QGridLayout(d->advancedSearchWidget);
+    gLayout->setMargin(0);
+
+    d->similarLabel = new QLabel(this);
+    gLayout->addWidget(d->similarLabel, 0, 0);
+    d->similarQuery = new QLineEdit(this);
+    d->similarQuery->setCompleter(&d->searchCompleter);
+    gLayout->addWidget(d->similarQuery, 0, 1);
+
+    d->withoutLabel = new QLabel(this);
+    gLayout->addWidget(d->withoutLabel, 1, 0);
+    d->withoutQuery = new QLineEdit(this);
+    d->withoutQuery->setCompleter(&d->searchCompleter);
+    gLayout->addWidget(d->withoutQuery, 1, 1);
+
+    d->exactLabel = new QLabel(this);
+    gLayout->addWidget(d->exactLabel, 2, 0);
+    d->exactQuery = new QLineEdit(this);
+    d->exactQuery->setCompleter(&d->searchCompleter);
+    gLayout->addWidget(d->exactQuery, 2, 1);
+
+    d->allLabel = new QLabel(this);
+    gLayout->addWidget(d->allLabel, 3, 0);
+    d->allQuery = new QLineEdit(this);
+    d->allQuery->setCompleter(&d->searchCompleter);
+    gLayout->addWidget(d->allQuery, 3, 1);
+
+    d->atLeastLabel = new QLabel(this);
+    gLayout->addWidget(d->atLeastLabel, 4, 0);
+    d->atLeastQuery = new QLineEdit(this);
+    d->atLeastQuery->setCompleter(&d->searchCompleter);
+    gLayout->addWidget(d->atLeastQuery, 4, 1);
+
+    vLayout->addWidget(d->advancedSearchWidget);
+    d->advancedSearchWidget->hide();
+
+    d->retranslate();
+
+    connect(d->exactQuery, SIGNAL(returnPressed()), this, SIGNAL(search()));
+    connect(d->similarQuery, SIGNAL(returnPressed()), this, SIGNAL(search()));
+    connect(d->withoutQuery, SIGNAL(returnPressed()), this, SIGNAL(search()));
+    connect(d->allQuery, SIGNAL(returnPressed()), this, SIGNAL(search()));
+    connect(d->atLeastQuery, SIGNAL(returnPressed()), this, SIGNAL(search()));
+    connect(d->showHideAdvancedSearchButton, SIGNAL(clicked()),
+        d, SLOT(showHideAdvancedSearch()));
+#endif
+    connect(this, SIGNAL(search()), d, SLOT(searchRequested()));
+}
+
+/*!
+    Destroys the search query widget.
+*/
+QHelpSearchQueryWidget::~QHelpSearchQueryWidget()
+{
+    delete d;
+}
+
+/*!
+    \since 4.8
+
+    Expands the search query widget so that the extended search fields are shown.
+*/
+void QHelpSearchQueryWidget::expandExtendedSearch()
+{
+    if (d->simpleSearch)
+        d->showHideAdvancedSearch();
+}
+
+/*!
+    \since 4.8
+
+    Collapses the search query widget so that only the default search field is
+    shown.
+*/
+void QHelpSearchQueryWidget::collapseExtendedSearch()
+{
+    if (!d->simpleSearch)
+        d->showHideAdvancedSearch();
+}
+
+/*!
+    Returns a list of queries to use in combination with the search engines
+    search(QList<QHelpSearchQuery> &queryList) function.
+*/
+QList<QHelpSearchQuery> QHelpSearchQueryWidget::query() const
+{
+    const QHelpSearchQueryWidgetPrivate::QueryHistory &queryHist =
+        d->simpleSearch ? d->simpleQueries : d->complexQueries;
+    return queryHist.queries.isEmpty() ?
+        QList<QHelpSearchQuery>() : queryHist.queries.last();
+}
+
+/*!
+    \since 4.8
+
+    Sets the QHelpSearchQueryWidget input fields to the values specified by
+    \a queryList search field name. Please note that one has to call the search
+    engine's search(QList<QHelpSearchQuery> &queryList) function to perform the
+    actual search.
+*/
+void QHelpSearchQueryWidget::setQuery(const QList<QHelpSearchQuery> &queryList)
+{
+    QList<QLineEdit *> lineEdits;
+    lineEdits << d->defaultQuery << d->allQuery << d->atLeastQuery
+        << d->similarQuery << d->withoutQuery << d->exactQuery;
+    foreach (QLineEdit *lineEdit, lineEdits)
+        lineEdit->clear();
+
+    const QLatin1String space(" ");
+    foreach (const QHelpSearchQuery &q, queryList) {
+        if (QLineEdit *lineEdit = d->lineEditFor(q.fieldName))
+            lineEdit->setText(lineEdit->text() + q.wordList.join(space) + space);
+    }
+    d->searchRequested();
+}
+
+/*!
+    \reimp
+*/
+void QHelpSearchQueryWidget::focusInEvent(QFocusEvent *focusEvent)
+{
+    if (focusEvent->reason() != Qt::MouseFocusReason) {
+        d->defaultQuery->selectAll();
+        d->defaultQuery->setFocus();
+    }
+}
+
+/*! \reimp
+*/
+void QHelpSearchQueryWidget::changeEvent(QEvent *event)
+{
+    if (event->type() == QEvent::LanguageChange)
+        d->retranslate();
+    else
+        QWidget::changeEvent(event);
+}
+
+QT_END_NAMESPACE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qinputdialog.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,1489 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qinputdialog.h"
+
+#ifndef QT_NO_INPUTDIALOG
+
+#include "qapplication.h"
+#include "qcombobox.h"
+#include "qdialogbuttonbox.h"
+#include "qlabel.h"
+#include "qlayout.h"
+#include "qlineedit.h"
+#include "qlistwidget.h"
+#include "qpushbutton.h"
+#include "qspinbox.h"
+#include "qstackedlayout.h"
+#include "qvalidator.h"
+#include "qevent.h"
+#include "qdialog_p.h"
+
+QT_USE_NAMESPACE
+
+static const char *signalForMember(const char *member)
+{
+    static const int NumCandidates = 4;
+    static const char * const candidateSignals[NumCandidates] = {
+        SIGNAL(textValueSelected(QString)),
+        SIGNAL(intValueSelected(int)),
+        SIGNAL(doubleValueSelected(double)),
+        SIGNAL(accepted())
+    };
+
+    QByteArray normalizedMember(QMetaObject::normalizedSignature(member));
+
+    int i = 0;
+    while (i < NumCandidates - 1) { // sic
+        if (QMetaObject::checkConnectArgs(candidateSignals[i], normalizedMember))
+            break;
+        ++i;
+    }
+    return candidateSignals[i];
+}
+
+QT_BEGIN_NAMESPACE
+
+/*
+    These internal classes add extra validation to QSpinBox and QDoubleSpinBox by emitting
+    textChanged(bool) after events that may potentially change the visible text. Return or
+    Enter key presses are not propagated if the visible text is invalid. Instead, the visible
+    text is modified to the last valid value.
+*/
+class QInputDialogSpinBox : public QSpinBox
+{
+    Q_OBJECT
+
+public:
+    QInputDialogSpinBox(QWidget *parent)
+        : QSpinBox(parent) {
+        connect(lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(notifyTextChanged()));
+        connect(this, SIGNAL(editingFinished()), this, SLOT(notifyTextChanged()));
+    }
+
+signals:
+    void textChanged(bool);
+
+private slots:
+    void notifyTextChanged() { emit textChanged(hasAcceptableInput()); }
+
+private:
+    void keyPressEvent(QKeyEvent *event) {
+        if ((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) && !hasAcceptableInput()) {
+#ifndef QT_NO_PROPERTIES
+            setProperty("value", property("value"));
+#endif
+        } else {
+            QSpinBox::keyPressEvent(event);
+        }
+        notifyTextChanged();
+    }
+
+    void mousePressEvent(QMouseEvent *event) {
+        QSpinBox::mousePressEvent(event);
+        notifyTextChanged();
+    }
+};
+
+class QInputDialogDoubleSpinBox : public QDoubleSpinBox
+{
+    Q_OBJECT
+
+public:
+    QInputDialogDoubleSpinBox(QWidget *parent = 0)
+        : QDoubleSpinBox(parent) {
+        connect(lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(notifyTextChanged()));
+        connect(this, SIGNAL(editingFinished()), this, SLOT(notifyTextChanged()));
+    }
+
+signals:
+    void textChanged(bool);
+
+private slots:
+    void notifyTextChanged() { emit textChanged(hasAcceptableInput()); }
+
+private:
+    void keyPressEvent(QKeyEvent *event) {
+        if ((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) && !hasAcceptableInput()) {
+#ifndef QT_NO_PROPERTIES
+            setProperty("value", property("value"));
+#endif
+        } else {
+            QDoubleSpinBox::keyPressEvent(event);
+        }
+        notifyTextChanged();
+    }
+
+    void mousePressEvent(QMouseEvent *event) {
+        QDoubleSpinBox::mousePressEvent(event);
+        notifyTextChanged();
+    }
+};
+
+QT_BEGIN_INCLUDE_NAMESPACE
+#include "qinputdialog.moc"
+QT_END_INCLUDE_NAMESPACE
+
+class QInputDialogPrivate : public QDialogPrivate
+{
+    Q_DECLARE_PUBLIC(QInputDialog)
+
+public:
+    QInputDialogPrivate();
+
+    void ensureLayout();
+    void ensureLineEdit();
+    void ensureComboBox();
+    void ensureListView();
+    void ensureIntSpinBox();
+    void ensureDoubleSpinBox();
+    void ensureEnabledConnection(QAbstractSpinBox *spinBox);
+    void setInputWidget(QWidget *widget);
+    void chooseRightTextInputWidget();
+    void setComboBoxText(const QString &text);
+    void setListViewText(const QString &text);
+    QString listViewText() const;
+    void ensureLayout() const { const_cast<QInputDialogPrivate *>(this)->ensureLayout(); }
+    bool useComboBoxOrListView() const { return comboBox && comboBox->count() > 0; }
+    void _q_textChanged(const QString &text);
+    void _q_currentRowChanged(const QModelIndex &newIndex, const QModelIndex &oldIndex);
+
+    mutable QLabel *label;
+    mutable QDialogButtonBox *buttonBox;
+    mutable QLineEdit *lineEdit;
+    mutable QSpinBox *intSpinBox;
+    mutable QDoubleSpinBox *doubleSpinBox;
+    mutable QComboBox *comboBox;
+    mutable QListView *listView;
+    mutable QWidget *inputWidget;
+    mutable QVBoxLayout *mainLayout;
+    QInputDialog::InputDialogOptions opts;
+    QString textValue;
+    QPointer<QObject> receiverToDisconnectOnClose;
+    QByteArray memberToDisconnectOnClose;
+};
+
+QInputDialogPrivate::QInputDialogPrivate()
+    : label(0), buttonBox(0), lineEdit(0), intSpinBox(0), doubleSpinBox(0), comboBox(0), listView(0),
+      inputWidget(0), mainLayout(0)
+{
+}
+
+void QInputDialogPrivate::ensureLayout()
+{
+    Q_Q(QInputDialog);
+
+    if (mainLayout)
+        return;
+
+    if (!inputWidget) {
+        ensureLineEdit();
+        inputWidget = lineEdit;
+    }
+
+    if (!label)
+        label = new QLabel(QInputDialog::tr("Enter a value:"), q);
+#ifndef QT_NO_SHORTCUT
+    label->setBuddy(inputWidget);
+#endif
+    label->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+
+    buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, q);
+    QObject::connect(buttonBox, SIGNAL(accepted()), q, SLOT(accept()));
+    QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject()));
+
+    mainLayout = new QVBoxLayout(q);
+    //we want to let the input dialog grow to available size on Symbian.
+#ifndef Q_OS_SYMBIAN
+    mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
+#else
+    label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+#endif
+    mainLayout->addWidget(label);
+    mainLayout->addWidget(inputWidget);
+    mainLayout->addWidget(buttonBox);
+    ensureEnabledConnection(qobject_cast<QAbstractSpinBox *>(inputWidget));
+    inputWidget->show();
+}
+
+void QInputDialogPrivate::ensureLineEdit()
+{
+    Q_Q(QInputDialog);
+    if (!lineEdit) {
+        lineEdit = new QLineEdit(q);
+#ifndef QT_NO_IM
+        qt_widget_private(lineEdit)->inheritsInputMethodHints = 1;
+#endif
+        lineEdit->hide();
+        QObject::connect(lineEdit, SIGNAL(textChanged(QString)),
+                         q, SLOT(_q_textChanged(QString)));
+    }
+}
+
+void QInputDialogPrivate::ensureComboBox()
+{
+    Q_Q(QInputDialog);
+    if (!comboBox) {
+        comboBox = new QComboBox(q);
+#ifndef QT_NO_IM
+        qt_widget_private(comboBox)->inheritsInputMethodHints = 1;
+#endif
+        comboBox->hide();
+        QObject::connect(comboBox, SIGNAL(editTextChanged(QString)),
+                         q, SLOT(_q_textChanged(QString)));
+        QObject::connect(comboBox, SIGNAL(currentIndexChanged(QString)),
+                         q, SLOT(_q_textChanged(QString)));
+    }
+}
+
+void QInputDialogPrivate::ensureListView()
+{
+    Q_Q(QInputDialog);
+    if (!listView) {
+        ensureComboBox();
+
+        listView = new QListView(q);
+        listView->hide();
+        listView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+        listView->setSelectionMode(QAbstractItemView::SingleSelection);
+        listView->setModel(comboBox->model());
+        listView->setCurrentIndex(QModelIndex()); // ###
+        QObject::connect(listView->selectionModel(),
+                         SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
+                         q, SLOT(_q_currentRowChanged(QModelIndex,QModelIndex)));
+    }
+}
+
+void QInputDialogPrivate::ensureIntSpinBox()
+{
+    Q_Q(QInputDialog);
+    if (!intSpinBox) {
+        intSpinBox = new QInputDialogSpinBox(q);
+        intSpinBox->hide();
+        QObject::connect(intSpinBox, SIGNAL(valueChanged(int)),
+                         q, SIGNAL(intValueChanged(int)));
+    }
+}
+
+void QInputDialogPrivate::ensureDoubleSpinBox()
+{
+    Q_Q(QInputDialog);
+    if (!doubleSpinBox) {
+        doubleSpinBox = new QInputDialogDoubleSpinBox(q);
+        doubleSpinBox->hide();
+        QObject::connect(doubleSpinBox, SIGNAL(valueChanged(double)),
+                         q, SIGNAL(doubleValueChanged(double)));
+    }
+}
+
+void QInputDialogPrivate::ensureEnabledConnection(QAbstractSpinBox *spinBox)
+{
+    if (spinBox) {
+        QAbstractButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
+        QObject::connect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool)), Qt::UniqueConnection);
+    }
+}
+
+void QInputDialogPrivate::setInputWidget(QWidget *widget)
+{
+    Q_ASSERT(widget);
+    if (inputWidget == widget)
+        return;
+
+    if (mainLayout) {
+        Q_ASSERT(inputWidget);
+        mainLayout->removeWidget(inputWidget);
+        inputWidget->hide();
+        mainLayout->insertWidget(1, widget);
+        widget->show();
+
+        // disconnect old input widget
+        QAbstractButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
+        if (QAbstractSpinBox *spinBox = qobject_cast<QAbstractSpinBox *>(inputWidget))
+            QObject::disconnect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool)));
+
+        // connect new input widget and update enabled state of OK button
+        QAbstractSpinBox *spinBox = qobject_cast<QAbstractSpinBox *>(widget);
+        ensureEnabledConnection(spinBox);
+        okButton->setEnabled(!spinBox || spinBox->hasAcceptableInput());
+    }
+
+    inputWidget = widget;
+
+    // synchronize the text shown in the new text editor with the current
+    // textValue
+    if (widget == lineEdit) {
+        lineEdit->setText(textValue);
+    } else if (widget == comboBox) {
+        setComboBoxText(textValue);
+    } else if (widget == listView) {
+        setListViewText(textValue);
+        ensureLayout();
+        buttonBox->button(QDialogButtonBox::Ok)->setEnabled(listView->selectionModel()->hasSelection());
+    }
+}
+
+void QInputDialogPrivate::chooseRightTextInputWidget()
+{
+    QWidget *widget;
+
+    if (useComboBoxOrListView()) {
+        if ((opts & QInputDialog::UseListViewForComboBoxItems) && !comboBox->isEditable()) {
+            ensureListView();
+            widget = listView;
+        } else {
+            widget = comboBox;
+        }
+    } else {
+        ensureLineEdit();
+        widget = lineEdit;
+    }
+
+    setInputWidget(widget);
+
+    if (inputWidget == comboBox) {
+        _q_textChanged(comboBox->currentText());
+    } else if (inputWidget == listView) {
+        _q_textChanged(listViewText());
+    }
+}
+
+void QInputDialogPrivate::setComboBoxText(const QString &text)
+{
+    int index = comboBox->findText(text);
+    if (index != -1) {
+        comboBox->setCurrentIndex(index);
+    } else if (comboBox->isEditable()) {
+        comboBox->setEditText(text);
+    }
+}
+
+void QInputDialogPrivate::setListViewText(const QString &text)
+{
+    int row = comboBox->findText(text);
+    if (row != -1) {
+        QModelIndex index(comboBox->model()->index(row, 0));
+        listView->selectionModel()->setCurrentIndex(index, QItemSelectionModel::Clear
+                                                         | QItemSelectionModel::SelectCurrent);
+    }
+}
+
+QString QInputDialogPrivate::listViewText() const
+{
+    if (listView->selectionModel()->hasSelection()) {
+        int row = listView->selectionModel()->selectedRows().value(0).row();
+        return comboBox->itemText(row);
+    } else {
+        return QString();
+    }
+}
+
+void QInputDialogPrivate::_q_textChanged(const QString &text)
+{
+    Q_Q(QInputDialog);
+    if (textValue != text) {
+        textValue = text;
+        emit q->textValueChanged(text);
+    }
+}
+
+void QInputDialogPrivate::_q_currentRowChanged(const QModelIndex &newIndex,
+                                               const QModelIndex & /* oldIndex */)
+{
+    _q_textChanged(comboBox->model()->data(newIndex).toString());
+    buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
+}
+
+/*!
+    \class QInputDialog
+    \brief The QInputDialog class provides a simple convenience dialog to get a
+    single value from the user.
+    \ingroup standard-dialogs
+
+
+    The input value can be a string, a number or an item from a list. A label
+    must be set to tell the user what they should enter.
+
+    Four static convenience functions are provided: getText(), getInt(),
+    getDouble(), and getItem(). All the functions can be used in a similar way,
+    for example:
+
+    \snippet examples/dialogs/standarddialogs/dialog.cpp 3
+
+    The \c ok variable is set to true if the user clicks \gui OK; otherwise it
+    is set to false.
+
+    \img inputdialogs.png Input Dialogs
+
+    The \l{dialogs/standarddialogs}{Standard Dialogs} example shows how to use
+    QInputDialog as well as other built-in Qt dialogs.
+
+    \sa QMessageBox, {Standard Dialogs Example}
+*/
+
+/*!
+    \enum QInputDialog::InputMode
+    \since 4.5
+
+    This enum describes the different modes of input that can be selected for
+    the dialog.
+
+    \value TextInput   Used to input text strings.
+    \value IntInput    Used to input integers.
+    \value DoubleInput Used to input floating point numbers with double
+                       precision accuracy.
+
+    \sa inputMode
+*/
+
+/*!
+    \since 4.5
+
+    Constructs a new input dialog with the given \a parent and window \a flags.
+*/
+QInputDialog::QInputDialog(QWidget *parent, Qt::WindowFlags flags)
+    : QDialog(*new QInputDialogPrivate, parent, flags)
+{
+}
+
+/*!
+    \since 4.5
+
+    Destroys the input dialog.
+*/
+QInputDialog::~QInputDialog()
+{
+}
+
+/*!
+    \since 4.5
+
+    \property QInputDialog::inputMode
+
+    \brief the mode used for input
+
+    This property help determines which widget is used for entering input into
+    the dialog.
+*/
+void QInputDialog::setInputMode(InputMode mode)
+{
+    Q_D(QInputDialog);
+
+    QWidget *widget;
+
+    /*
+        Warning: Some functions in QInputDialog rely on implementation details
+        of the code below. Look for the comments that accompany the calls to
+        setInputMode() throughout this file before you change the code below.
+    */
+
+    switch (mode) {
+    case IntInput:
+        d->ensureIntSpinBox();
+        widget = d->intSpinBox;
+        break;
+    case DoubleInput:
+        d->ensureDoubleSpinBox();
+        widget = d->doubleSpinBox;
+        break;
+    default:
+        Q_ASSERT(mode == TextInput);
+        d->chooseRightTextInputWidget();
+        return;
+    }
+
+    d->setInputWidget(widget);
+}
+
+QInputDialog::InputMode QInputDialog::inputMode() const
+{
+    Q_D(const QInputDialog);
+
+    if (d->inputWidget) {
+        if (d->inputWidget == d->intSpinBox) {
+            return IntInput;
+        } else if (d->inputWidget == d->doubleSpinBox) {
+            return DoubleInput;
+        }
+    }
+
+    return TextInput;
+}
+
+/*!
+    \since 4.5
+
+    \property QInputDialog::labelText
+
+    \brief the text to for the label to describe what needs to be input
+*/
+void QInputDialog::setLabelText(const QString &text)
+{
+    Q_D(QInputDialog);
+    if (!d->label) {
+        d->label = new QLabel(text, this);
+    } else {
+        d->label->setText(text);
+    }
+#ifdef Q_OS_SYMBIAN
+    d->label->setWordWrap(true);
+#endif
+}
+
+QString QInputDialog::labelText() const
+{
+    Q_D(const QInputDialog);
+    d->ensureLayout();
+    return d->label->text();
+}
+
+/*!
+    \enum QInputDialog::InputDialogOption
+
+    \since 4.5
+
+    This enum specifies various options that affect the look and feel
+    of an input dialog.
+
+    \value NoButtons Don't display \gui{OK} and \gui{Cancel} buttons. (Useful for "live dialogs".)
+    \value UseListViewForComboBoxItems Use a QListView rather than a non-editable QComboBox for
+                                       displaying the items set with setComboBoxItems().
+
+    \sa options, setOption(), testOption()
+*/
+
+/*!
+    Sets the given \a option to be enabled if \a on is true;
+    otherwise, clears the given \a option.
+
+    \sa options, testOption()
+*/
+void QInputDialog::setOption(InputDialogOption option, bool on)
+{
+    Q_D(QInputDialog);
+    if (!(d->opts & option) != !on)
+        setOptions(d->opts ^ option);
+}
+
+/*!
+    Returns true if the given \a option is enabled; otherwise, returns
+    false.
+
+    \sa options, setOption()
+*/
+bool QInputDialog::testOption(InputDialogOption option) const
+{
+    Q_D(const QInputDialog);
+    return (d->opts & option) != 0;
+}
+
+/*!
+    \property QInputDialog::options
+    \brief the various options that affect the look and feel of the dialog
+    \since 4.5
+
+    By default, all options are disabled.
+
+    \sa setOption(), testOption()
+*/
+void QInputDialog::setOptions(InputDialogOptions options)
+{
+    Q_D(QInputDialog);
+
+    InputDialogOptions changed = (options ^ d->opts);
+    if (!changed)
+        return;
+
+    d->opts = options;
+    d->ensureLayout();
+
+    if (changed & NoButtons)
+        d->buttonBox->setVisible(!(options & NoButtons));
+    if ((changed & UseListViewForComboBoxItems) && inputMode() == TextInput)
+        d->chooseRightTextInputWidget();
+}
+
+QInputDialog::InputDialogOptions QInputDialog::options() const
+{
+    Q_D(const QInputDialog);
+    return d->opts;
+}
+
+/*!
+    \since 4.5
+
+    \property QInputDialog::textValue
+
+    \brief the text value for the input dialog
+
+    This property is only relevant when the input dialog is used in
+    TextInput mode.
+*/
+void QInputDialog::setTextValue(const QString &text)
+{
+    Q_D(QInputDialog);
+
+    setInputMode(TextInput);
+    if (d->inputWidget == d->lineEdit) {
+        d->lineEdit->setText(text);
+    } else if (d->inputWidget == d->comboBox) {
+        d->setComboBoxText(text);
+    } else {
+        d->setListViewText(text);
+    }
+}
+
+QString QInputDialog::textValue() const
+{
+    Q_D(const QInputDialog);
+    return d->textValue;
+}
+
+/*!
+    \since 4.5
+
+    \property QInputDialog::textEchoMode
+
+    \brief the echo mode for the text value
+
+    This property is only relevant when the input dialog is used in
+    TextInput mode.
+*/
+void QInputDialog::setTextEchoMode(QLineEdit::EchoMode mode)
+{
+    Q_D(QInputDialog);
+    d->ensureLineEdit();
+    d->lineEdit->setEchoMode(mode);
+}
+
+QLineEdit::EchoMode QInputDialog::textEchoMode() const
+{
+    Q_D(const QInputDialog);
+    if (d->lineEdit) {
+        return d->lineEdit->echoMode();
+    } else {
+        return QLineEdit::Normal;
+    }
+}
+
+/*!
+    \since 4.5
+
+    \property QInputDialog::comboBoxEditable
+
+    \brief whether or not the combo box is used in the input dialog is editable
+*/
+void QInputDialog::setComboBoxEditable(bool editable)
+{
+    Q_D(QInputDialog);
+    d->ensureComboBox();
+    d->comboBox->setEditable(editable);
+    if (inputMode() == TextInput)
+        d->chooseRightTextInputWidget();
+}
+
+bool QInputDialog::isComboBoxEditable() const
+{
+    Q_D(const QInputDialog);
+    if (d->comboBox) {
+        return d->comboBox->isEditable();
+    } else {
+        return false;
+    }
+}
+
+/*!
+    \since 4.5
+
+    \property QInputDialog::comboBoxItems
+
+    \brief the items used in the combobox for the input dialog
+*/
+void QInputDialog::setComboBoxItems(const QStringList &items)
+{
+    Q_D(QInputDialog);
+
+    d->ensureComboBox();
+    d->comboBox->blockSignals(true);
+    d->comboBox->clear();
+    d->comboBox->addItems(items);
+    d->comboBox->blockSignals(false);
+
+    if (inputMode() == TextInput)
+        d->chooseRightTextInputWidget();
+}
+
+QStringList QInputDialog::comboBoxItems() const
+{
+    Q_D(const QInputDialog);
+    QStringList result;
+    if (d->comboBox) {
+        const int count = d->comboBox->count();
+        for (int i = 0; i < count; ++i)
+            result.append(d->comboBox->itemText(i));
+    }
+    return result;
+}
+
+/*!
+    \property QInputDialog::intValue
+    \since 4.5
+    \brief the current integer value accepted as input
+
+    This property is only relevant when the input dialog is used in
+    IntInput mode.
+*/
+void QInputDialog::setIntValue(int value)
+{
+    Q_D(QInputDialog);
+    setInputMode(IntInput);
+    d->intSpinBox->setValue(value);
+}
+
+int QInputDialog::intValue() const
+{
+    Q_D(const QInputDialog);
+    if (d->intSpinBox) {
+        return d->intSpinBox->value();
+    } else {
+        return 0;
+    }
+}
+
+/*!
+    \property QInputDialog::intMinimum
+    \since 4.5
+    \brief the minimum integer value accepted as input
+
+    This property is only relevant when the input dialog is used in
+    IntInput mode.
+*/
+void QInputDialog::setIntMinimum(int min)
+{
+    Q_D(QInputDialog);
+    d->ensureIntSpinBox();
+    d->intSpinBox->setMinimum(min);
+}
+
+int QInputDialog::intMinimum() const
+{
+    Q_D(const QInputDialog);
+    if (d->intSpinBox) {
+        return d->intSpinBox->minimum();
+    } else {
+        return 0;
+    }
+}
+
+/*!
+    \property QInputDialog::intMaximum
+    \since 4.5
+    \brief the maximum integer value accepted as input
+
+    This property is only relevant when the input dialog is used in
+    IntInput mode.
+*/
+void QInputDialog::setIntMaximum(int max)
+{
+    Q_D(QInputDialog);
+    d->ensureIntSpinBox();
+    d->intSpinBox->setMaximum(max);
+}
+
+int QInputDialog::intMaximum() const
+{
+    Q_D(const QInputDialog);
+    if (d->intSpinBox) {
+        return d->intSpinBox->maximum();
+    } else {
+        return 99;
+    }
+}
+
+/*!
+    Sets the range of integer values accepted by the dialog when used in
+    IntInput mode, with minimum and maximum values specified by \a min and
+    \a max respectively.
+*/
+void QInputDialog::setIntRange(int min, int max)
+{
+    Q_D(QInputDialog);
+    d->ensureIntSpinBox();
+    d->intSpinBox->setRange(min, max);
+}
+
+/*!
+    \property QInputDialog::intStep
+    \since 4.5
+    \brief the step by which the integer value is increased and decreased
+
+    This property is only relevant when the input dialog is used in
+    IntInput mode.
+*/
+void QInputDialog::setIntStep(int step)
+{
+    Q_D(QInputDialog);
+    d->ensureIntSpinBox();
+    d->intSpinBox->setSingleStep(step);
+}
+
+int QInputDialog::intStep() const
+{
+    Q_D(const QInputDialog);
+    if (d->intSpinBox) {
+        return d->intSpinBox->singleStep();
+    } else {
+        return 1;
+    }
+}
+
+/*!
+    \property QInputDialog::doubleValue
+    \since 4.5
+    \brief the current double precision floating point value accepted as input
+
+    This property is only relevant when the input dialog is used in
+    DoubleInput mode.
+*/
+void QInputDialog::setDoubleValue(double value)
+{
+    Q_D(QInputDialog);
+    setInputMode(DoubleInput);
+    d->doubleSpinBox->setValue(value);
+}
+
+double QInputDialog::doubleValue() const
+{
+    Q_D(const QInputDialog);
+    if (d->doubleSpinBox) {
+        return d->doubleSpinBox->value();
+    } else {
+        return 0.0;
+    }
+}
+
+/*!
+    \property QInputDialog::doubleMinimum
+    \since 4.5
+    \brief the minimum double precision floating point value accepted as input
+
+    This property is only relevant when the input dialog is used in
+    DoubleInput mode.
+*/
+void QInputDialog::setDoubleMinimum(double min)
+{
+    Q_D(QInputDialog);
+    d->ensureDoubleSpinBox();
+    d->doubleSpinBox->setMinimum(min);
+}
+
+double QInputDialog::doubleMinimum() const
+{
+    Q_D(const QInputDialog);
+    if (d->doubleSpinBox) {
+        return d->doubleSpinBox->minimum();
+    } else {
+        return 0.0;
+    }
+}
+
+/*!
+    \property QInputDialog::doubleMaximum
+    \since 4.5
+    \brief the maximum double precision floating point value accepted as input
+
+    This property is only relevant when the input dialog is used in
+    DoubleInput mode.
+*/
+void QInputDialog::setDoubleMaximum(double max)
+{
+    Q_D(QInputDialog);
+    d->ensureDoubleSpinBox();
+    d->doubleSpinBox->setMaximum(max);
+}
+
+double QInputDialog::doubleMaximum() const
+{
+    Q_D(const QInputDialog);
+    if (d->doubleSpinBox) {
+        return d->doubleSpinBox->maximum();
+    } else {
+        return 99.99;
+    }
+}
+
+/*!
+    Sets the range of double precision floating point values accepted by the
+    dialog when used in DoubleInput mode, with minimum and maximum values
+    specified by \a min and \a max respectively.
+*/
+void QInputDialog::setDoubleRange(double min, double max)
+{
+    Q_D(QInputDialog);
+    d->ensureDoubleSpinBox();
+    d->doubleSpinBox->setRange(min, max);
+}
+
+/*!
+    \since 4.5
+
+    \property QInputDialog::doubleDecimals
+
+    \brief sets the percision of the double spinbox in decimals
+
+    \sa QDoubleSpinBox::setDecimals()
+*/
+void QInputDialog::setDoubleDecimals(int decimals)
+{
+    Q_D(QInputDialog);
+    d->ensureDoubleSpinBox();
+    d->doubleSpinBox->setDecimals(decimals);
+}
+
+int QInputDialog::doubleDecimals() const
+{
+    Q_D(const QInputDialog);
+    if (d->doubleSpinBox) {
+        return d->doubleSpinBox->decimals();
+    } else {
+        return 2;
+    }
+}
+
+/*!
+    \since 4.5
+
+    \property QInputDialog::okButtonText
+
+    \brief the text for the button used to accept the entry in the dialog
+*/
+void QInputDialog::setOkButtonText(const QString &text)
+{
+    Q_D(const QInputDialog);
+    d->ensureLayout();
+    d->buttonBox->button(QDialogButtonBox::Ok)->setText(text);
+}
+
+QString QInputDialog::okButtonText() const
+{
+    Q_D(const QInputDialog);
+    d->ensureLayout();
+    return d->buttonBox->button(QDialogButtonBox::Ok)->text();
+}
+
+/*!
+    \since 4.5
+
+    \property QInputDialog::cancelButtonText
+    \brief the text for the button used to cancel the dialog
+*/
+void QInputDialog::setCancelButtonText(const QString &text)
+{
+    Q_D(const QInputDialog);
+    d->ensureLayout();
+    d->buttonBox->button(QDialogButtonBox::Cancel)->setText(text);
+}
+
+QString QInputDialog::cancelButtonText() const
+{
+    Q_D(const QInputDialog);
+    d->ensureLayout();
+    return d->buttonBox->button(QDialogButtonBox::Cancel)->text();
+}
+
+/*!
+    \since 4.5
+    \overload
+
+    This function connects one of its signals to the slot specified by \a receiver
+    and \a member. The specific signal depends on the arguments that are specified
+    in \a member. These are:
+
+    \list
+      \o textValueSelected() if \a member has a QString for its first argument.
+      \o intValueSelected() if \a member has an int for its first argument.
+      \o doubleValueSelected() if \a member has a double for its first argument.
+      \o accepted() if \a member has NO arguments.
+    \endlist
+
+    The signal will be disconnected from the slot when the dialog is closed.
+*/
+void QInputDialog::open(QObject *receiver, const char *member)
+{
+    Q_D(QInputDialog);
+    connect(this, signalForMember(member), receiver, member);
+    d->receiverToDisconnectOnClose = receiver;
+    d->memberToDisconnectOnClose = member;
+    QDialog::open();
+}
+
+/*!
+    \reimp
+*/
+QSize QInputDialog::minimumSizeHint() const
+{
+    Q_D(const QInputDialog);
+    d->ensureLayout();
+    return QDialog::minimumSizeHint();
+}
+
+/*!
+    \reimp
+*/
+QSize QInputDialog::sizeHint() const
+{
+    Q_D(const QInputDialog);
+    d->ensureLayout();
+    return QDialog::sizeHint();
+}
+
+/*!
+    \reimp
+*/
+void QInputDialog::setVisible(bool visible)
+{
+    Q_D(const QInputDialog);
+    if (visible) {
+        d->ensureLayout();
+        d->inputWidget->setFocus();
+        if (d->inputWidget == d->lineEdit) {
+            d->lineEdit->selectAll();
+        } else if (d->inputWidget == d->intSpinBox) {
+            d->intSpinBox->selectAll();
+        } else if (d->inputWidget == d->doubleSpinBox) {
+            d->doubleSpinBox->selectAll();
+        }
+    }
+    QDialog::setVisible(visible);
+}
+
+/*!
+  Closes the dialog and sets its result code to \a result. If this dialog
+  is shown with exec(), done() causes the local event loop to finish,
+  and exec() to return \a result.
+
+  \sa QDialog::done()
+*/
+void QInputDialog::done(int result)
+{
+    Q_D(QInputDialog);
+    QDialog::done(result);
+    if (result) {
+        InputMode mode = inputMode();
+        switch (mode) {
+        case DoubleInput:
+            emit doubleValueSelected(doubleValue());
+            break;
+        case IntInput:
+            emit intValueSelected(intValue());
+            break;
+        default:
+            Q_ASSERT(mode == TextInput);
+            emit textValueSelected(textValue());
+        }
+    }
+    if (d->receiverToDisconnectOnClose) {
+        disconnect(this, signalForMember(d->memberToDisconnectOnClose),
+                   d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
+        d->receiverToDisconnectOnClose = 0;
+    }
+    d->memberToDisconnectOnClose.clear();
+}
+
+/*!
+    Static convenience function to get a string from the user.
+
+    \a title is the text which is displayed in the title bar of the dialog.
+    \a label is the text which is shown to the user (it should say what should
+    be entered).
+    \a text is the default text which is placed in the line edit.
+    \a mode is the echo mode the line edit will use.
+    \a inputMethodHints is the input method hints that will be used in the
+    edit widget if an input method is active.
+
+    If \a ok is nonnull \e *\a ok will be set to true if the user pressed
+    \gui OK and to false if the user pressed \gui Cancel. The dialog's parent
+    is \a parent. The dialog will be modal and uses the specified widget
+    \a flags.
+
+    If the dialog is accepted, this function returns the text in the dialog's
+    line edit. If the dialog is rejected, a null QString is returned.
+
+    Use this static function like this:
+
+    \snippet examples/dialogs/standarddialogs/dialog.cpp 3
+
+    \warning Do not delete \a parent during the execution of the dialog. If you
+    want to do this, you should create the dialog yourself using one of the
+    QInputDialog constructors.
+
+    \sa getInt(), getDouble(), getItem()
+*/
+
+QString QInputDialog::getText(QWidget *parent, const QString &title, const QString &label,
+                              QLineEdit::EchoMode mode, const QString &text, bool *ok,
+                              Qt::WindowFlags flags, Qt::InputMethodHints inputMethodHints)
+{
+    QInputDialog dialog(parent, flags);
+    dialog.setWindowTitle(title);
+    dialog.setLabelText(label);
+    dialog.setTextValue(text);
+    dialog.setTextEchoMode(mode);
+    dialog.setInputMethodHints(inputMethodHints);
+
+    int ret = dialog.exec();
+    if (ok)
+        *ok = !!ret;
+    if (ret) {
+        return dialog.textValue();
+    } else {
+        return QString();
+    }
+}
+
+/*!
+    \internal
+*/
+// ### Qt 5: Use only the version above.
+QString QInputDialog::getText(QWidget *parent, const QString &title, const QString &label,
+                              QLineEdit::EchoMode mode, const QString &text, bool *ok,
+                              Qt::WindowFlags flags)
+{
+    return getText(parent, title, label, mode, text, ok, flags, Qt::ImhNone);
+}
+
+/*!
+    \since 4.5
+
+    Static convenience function to get an integer input from the user.
+
+    \a title is the text which is displayed in the title bar of the dialog.
+    \a label is the text which is shown to the user (it should say what should
+    be entered).
+    \a value is the default integer which the spinbox will be set to.
+    \a min and \a max are the minimum and maximum values the user may choose.
+    \a step is the amount by which the values change as the user presses the
+    arrow buttons to increment or decrement the value.
+
+    If \a ok is nonnull *\a ok will be set to true if the user pressed \gui OK
+    and to false if the user pressed \gui Cancel. The dialog's parent is
+    \a parent. The dialog will be modal and uses the widget \a flags.
+
+    On success, this function returns the integer which has been entered by the
+    user; on failure, it returns the initial \a value.
+
+    Use this static function like this:
+
+    \snippet examples/dialogs/standarddialogs/dialog.cpp 0
+
+    \warning Do not delete \a parent during the execution of the dialog. If you
+    want to do this, you should create the dialog yourself using one of the
+    QInputDialog constructors.
+
+    \sa getText(), getDouble(), getItem()
+*/
+
+int QInputDialog::getInt(QWidget *parent, const QString &title, const QString &label, int value,
+                         int min, int max, int step, bool *ok, Qt::WindowFlags flags)
+{
+    QInputDialog dialog(parent, flags);
+    dialog.setWindowTitle(title);
+    dialog.setLabelText(label);
+    dialog.setIntRange(min, max);
+    dialog.setIntValue(value);
+    dialog.setIntStep(step);
+
+    int ret = dialog.exec();
+    if (ok)
+        *ok = !!ret;
+    if (ret) {
+        return dialog.intValue();
+    } else {
+        return value;
+    }
+}
+
+/*!
+    Static convenience function to get a floating point number from the user.
+
+    \a title is the text which is displayed in the title bar of the dialog.
+    \a label is the text which is shown to the user (it should say what should
+    be entered).
+    \a value is the default floating point number that the line edit will be
+    set to.
+    \a min and \a max are the minimum and maximum values the user may choose.
+    \a decimals is the maximum number of decimal places the number may have.
+
+    If \a ok is nonnull, *\a ok will be set to true if the user pressed \gui OK
+    and to false if the user pressed \gui Cancel. The dialog's parent is
+    \a parent. The dialog will be modal and uses the widget \a flags.
+
+    This function returns the floating point number which has been entered by
+    the user.
+
+    Use this static function like this:
+
+    \snippet examples/dialogs/standarddialogs/dialog.cpp 1
+
+    \warning Do not delete \a parent during the execution of the dialog. If you
+    want to do this, you should create the dialog yourself using one of the
+    QInputDialog constructors.
+
+    \sa getText(), getInt(), getItem()
+*/
+
+double QInputDialog::getDouble(QWidget *parent, const QString &title, const QString &label,
+                               double value, double min, double max, int decimals, bool *ok,
+                               Qt::WindowFlags flags)
+{
+    QInputDialog dialog(parent, flags);
+    dialog.setWindowTitle(title);
+    dialog.setLabelText(label);
+    dialog.setDoubleDecimals(decimals);
+    dialog.setDoubleRange(min, max);
+    dialog.setDoubleValue(value);
+
+    int ret = dialog.exec();
+    if (ok)
+        *ok = !!ret;
+    if (ret) {
+        return dialog.doubleValue();
+    } else {
+        return value;
+    }
+}
+
+/*!
+    Static convenience function to let the user select an item from a string
+    list.
+
+    \a title is the text which is displayed in the title bar of the dialog.
+    \a label is the text which is shown to the user (it should say what should
+    be entered).
+    \a items is the string list which is inserted into the combobox.
+    \a current is the number  of the item which should be the current item.
+    \a inputMethodHints is the input method hints that will be used if the
+    combobox is editable and an input method is active.
+
+    If \a editable is true the user can enter their own text; otherwise the
+    user may only select one of the existing items.
+
+    If \a ok is nonnull \e *\a ok will be set to true if the user pressed
+    \gui OK and to false if the user pressed \gui Cancel. The dialog's parent
+    is \a parent. The dialog will be modal and uses the widget \a flags.
+
+    This function returns the text of the current item, or if \a editable is
+    true, the current text of the combobox.
+
+    Use this static function like this:
+
+    \snippet examples/dialogs/standarddialogs/dialog.cpp 2
+
+    \warning Do not delete \a parent during the execution of the dialog. If you
+    want to do this, you should create the dialog yourself using one of the
+    QInputDialog constructors.
+
+    \sa getText(), getInt(), getDouble()
+*/
+
+QString QInputDialog::getItem(QWidget *parent, const QString &title, const QString &label,
+                              const QStringList &items, int current, bool editable, bool *ok,
+                              Qt::WindowFlags flags, Qt::InputMethodHints inputMethodHints)
+{
+    QString text(items.value(current));
+
+    QInputDialog dialog(parent, flags);
+    dialog.setWindowTitle(title);
+    dialog.setLabelText(label);
+    dialog.setComboBoxItems(items);
+    dialog.setTextValue(text);
+    dialog.setComboBoxEditable(editable);
+    dialog.setInputMethodHints(inputMethodHints);
+
+    int ret = dialog.exec();
+    if (ok)
+        *ok = !!ret;
+    if (ret) {
+        return dialog.textValue();
+    } else {
+        return text;
+    }
+}
+
+/*!
+    \internal
+*/
+// ### Qt 5: Use only the version above.
+QString QInputDialog::getItem(QWidget *parent, const QString &title, const QString &label,
+                              const QStringList &items, int current, bool editable, bool *ok,
+                              Qt::WindowFlags flags)
+{
+    return getItem(parent, title, label, items, current, editable, ok, flags, Qt::ImhNone);
+}
+
+/*!
+    \obsolete
+
+    Use getInt() instead.
+*/
+int QInputDialog::getInteger(QWidget *parent, const QString &title, const QString &label,
+                             int value, int min, int max, int step, bool *ok,
+                             Qt::WindowFlags flags)
+{
+    return getInt(parent, title, label, value, min, max, step, ok, flags);
+}
+
+/*!
+    \fn QString QInputDialog::getText(const QString &title, const QString &label,
+                                      QLineEdit::EchoMode echo = QLineEdit::Normal,
+                                      const QString &text = QString(), bool *ok = 0,
+                                      QWidget *parent = 0, const char *name = 0, Qt::WindowFlags flags = 0)
+
+    Call getText(\a parent, \a title, \a label, \a echo, \a text, \a
+    ok, \a flags) instead.
+
+    The \a name parameter is ignored.
+*/
+
+/*!
+    \fn int QInputDialog::getInteger(const QString &title, const QString &label, int value = 0,
+                                     int min = -2147483647, int max = 2147483647,
+                                     int step = 1, bool *ok = 0,
+                                     QWidget *parent = 0, const char *name = 0, Qt::WindowFlags flags = 0)
+
+
+    Call getInteger(\a parent, \a title, \a label, \a value, \a
+    min, \a max, \a step, \a ok, \a flags) instead.
+
+    The \a name parameter is ignored.
+*/
+
+/*!
+    \fn double QInputDialog::getDouble(const QString &title, const QString &label, double value = 0,
+                                       double min = -2147483647, double max = 2147483647,
+                                       int decimals = 1, bool *ok = 0,
+                                       QWidget *parent = 0, const char *name = 0, Qt::WindowFlags flags = 0)
+
+    Call getDouble(\a parent, \a title, \a label, \a value, \a
+    min, \a max, \a decimals, \a ok, \a flags).
+
+    The \a name parameter is ignored.
+*/
+
+/*!
+    \fn QString QInputDialog::getItem(const QString &title, const QString &label, const QStringList &list,
+                                      int current = 0, bool editable = true, bool *ok = 0,
+                                      QWidget *parent = 0, const char *name = 0, Qt::WindowFlags flags = 0)
+
+    Call getItem(\a parent, \a title, \a label, \a list, \a current,
+    \a editable, \a ok, \a flags) instead.
+
+    The \a name parameter is ignored.
+*/
+
+/*!
+    \fn void QInputDialog::doubleValueChanged(double value)
+
+    This signal is emitted whenever the double value changes in the dialog.
+    The current value is specified by \a value.
+
+    This signal is only relevant when the input dialog is used in
+    DoubleInput mode.
+*/
+
+/*!
+    \fn void QInputDialog::doubleValueSelected(double value)
+
+    This signal is emitted whenever the user selects a double value by
+    accepting the dialog; for example, by clicking the \gui{OK} button.
+    The selected value is specified by \a value.
+
+    This signal is only relevant when the input dialog is used in
+    DoubleInput mode.
+*/
+
+/*!
+    \fn void QInputDialog::intValueChanged(int value)
+
+    This signal is emitted whenever the integer value changes in the dialog.
+    The current value is specified by \a value.
+
+    This signal is only relevant when the input dialog is used in
+    IntInput mode.
+*/
+
+/*!
+    \fn void QInputDialog::intValueSelected(int value)
+
+    This signal is emitted whenever the user selects a integer value by
+    accepting the dialog; for example, by clicking the \gui{OK} button.
+    The selected value is specified by \a value.
+
+    This signal is only relevant when the input dialog is used in
+    IntInput mode.
+*/
+
+/*!
+    \fn void QInputDialog::textValueChanged(const QString &text)
+
+    This signal is emitted whenever the text string changes in the dialog.
+    The current string is specified by \a text.
+
+    This signal is only relevant when the input dialog is used in
+    TextInput mode.
+*/
+
+/*!
+    \fn void QInputDialog::textValueSelected(const QString &text)
+
+    This signal is emitted whenever the user selects a text string by
+    accepting the dialog; for example, by clicking the \gui{OK} button.
+    The selected string is specified by \a text.
+
+    This signal is only relevant when the input dialog is used in
+    TextInput mode.
+*/
+
+QT_END_NAMESPACE
+
+#include "moc_qinputdialog.cpp"
+
+#endif // QT_NO_INPUTDIALOG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qmessagebox.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,2764 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qmessagebox.h>
+
+#ifndef QT_NO_MESSAGEBOX
+
+#include <QtGui/qdialogbuttonbox.h>
+#include "private/qlabel_p.h"
+#include "private/qapplication_p.h"
+#include <QtCore/qlist.h>
+#include <QtCore/qdebug.h>
+#include <QtGui/qstyle.h>
+#include <QtGui/qstyleoption.h>
+#include <QtGui/qgridlayout.h>
+#include <QtGui/qdesktopwidget.h>
+#include <QtGui/qpushbutton.h>
+#include <QtGui/qaccessible.h>
+#include <QtGui/qicon.h>
+#include <QtGui/qtextdocument.h>
+#include <QtGui/qapplication.h>
+#include <QtGui/qtextedit.h>
+#include <QtGui/qtextbrowser.h>
+#include <QtGui/qmenu.h>
+#include "qdialog_p.h"
+#include <QtGui/qfont.h>
+#include <QtGui/qfontmetrics.h>
+#include <QtGui/qclipboard.h>
+
+#ifndef QT_NO_STYLE_S60
+#include <qs60style.h>
+#endif
+
+#ifdef Q_WS_WINCE
+extern bool qt_wince_is_mobile();    //defined in qguifunctions_wince.cpp
+extern bool qt_wince_is_smartphone();//defined in qguifunctions_wince.cpp
+extern bool qt_wince_is_pocket_pc(); //defined in qguifunctions_wince.cpp
+
+#include "qguifunctions_wince.h"
+#endif
+
+QT_BEGIN_NAMESPACE
+
+enum Button { Old_Ok = 1, Old_Cancel = 2, Old_Yes = 3, Old_No = 4, Old_Abort = 5, Old_Retry = 6,
+              Old_Ignore = 7, Old_YesAll = 8, Old_NoAll = 9, Old_ButtonMask = 0xFF,
+              NewButtonMask = 0xFFFFFC00 };
+
+enum DetailButtonLabel { ShowLabel = 0, HideLabel = 1 };
+#ifndef QT_NO_TEXTEDIT
+class QMessageBoxDetailsText : public QWidget
+{
+public:
+    class TextEdit : public QTextEdit
+    {
+    public:
+        TextEdit(QWidget *parent=0) : QTextEdit(parent) { }
+        void contextMenuEvent(QContextMenuEvent * e)
+        {
+#ifndef QT_NO_CONTEXTMENU
+            QMenu *menu = createStandardContextMenu();
+            menu->setAttribute(Qt::WA_DeleteOnClose);
+            menu->popup(e->globalPos());
+#else
+            Q_UNUSED(e);
+#endif
+        }
+    };
+
+    QMessageBoxDetailsText(QWidget *parent=0)
+        : QWidget(parent)
+    {
+        QVBoxLayout *layout = new QVBoxLayout;
+        layout->setMargin(0);
+        QFrame *line = new QFrame(this);
+        line->setFrameShape(QFrame::HLine);
+        line->setFrameShadow(QFrame::Sunken);
+        layout->addWidget(line);
+        textEdit = new TextEdit();
+        textEdit->setFixedHeight(100);
+        textEdit->setFocusPolicy(Qt::NoFocus);
+        textEdit->setReadOnly(true);
+        layout->addWidget(textEdit);
+        setLayout(layout);
+    }
+    void setText(const QString &text) { textEdit->setPlainText(text); }
+    QString text() const { return textEdit->toPlainText(); }
+private:
+    TextEdit *textEdit;
+};
+#endif // QT_NO_TEXTEDIT
+
+class DetailButton : public QPushButton
+{
+public:
+    DetailButton(QWidget *parent) : QPushButton(label(ShowLabel), parent)
+    {
+        setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+    }
+
+    QString label(DetailButtonLabel label) const
+    { return label == ShowLabel ? QMessageBox::tr("Show Details...") : QMessageBox::tr("Hide Details..."); }
+
+    void setLabel(DetailButtonLabel lbl)
+    { setText(label(lbl)); }
+
+    QSize sizeHint() const
+    {
+        ensurePolished();
+        QStyleOptionButton opt;
+        initStyleOption(&opt);
+        const QFontMetrics fm = fontMetrics();
+        opt.text = label(ShowLabel);
+        QSize sz = fm.size(Qt::TextShowMnemonic, opt.text);
+        QSize ret = style()->sizeFromContents(QStyle::CT_PushButton, &opt, sz, this).
+                      expandedTo(QApplication::globalStrut());
+        opt.text = label(HideLabel);
+        sz = fm.size(Qt::TextShowMnemonic, opt.text);
+        ret = ret.expandedTo(style()->sizeFromContents(QStyle::CT_PushButton, &opt, sz, this).
+                      expandedTo(QApplication::globalStrut()));
+        return ret;
+    }
+};
+
+
+class QMessageBoxPrivate : public QDialogPrivate
+{
+    Q_DECLARE_PUBLIC(QMessageBox)
+
+public:
+    QMessageBoxPrivate() : escapeButton(0), defaultButton(0), clickedButton(0), detailsButton(0),
+#ifndef QT_NO_TEXTEDIT
+                           detailsText(0),
+#endif
+                           compatMode(false), autoAddOkButton(true),
+                           detectedEscapeButton(0), informativeLabel(0) { }
+
+    void init(const QString &title = QString(), const QString &text = QString());
+    void _q_buttonClicked(QAbstractButton *);
+
+    QAbstractButton *findButton(int button0, int button1, int button2, int flags);
+    void addOldButtons(int button0, int button1, int button2);
+
+    QAbstractButton *abstractButtonForId(int id) const;
+    int execReturnCode(QAbstractButton *button);
+
+    void detectEscapeButton();
+    void updateSize();
+    int layoutMinimumWidth();
+    void retranslateStrings();
+
+#ifdef Q_WS_WINCE
+    void hideSpecial();
+#endif
+
+    static int showOldMessageBox(QWidget *parent, QMessageBox::Icon icon,
+                                 const QString &title, const QString &text,
+                                 int button0, int button1, int button2);
+    static int showOldMessageBox(QWidget *parent, QMessageBox::Icon icon,
+                                 const QString &title, const QString &text,
+                                 const QString &button0Text,
+                                 const QString &button1Text,
+                                 const QString &button2Text,
+                                 int defaultButtonNumber,
+                                 int escapeButtonNumber);
+
+    static QMessageBox::StandardButton showNewMessageBox(QWidget *parent,
+                QMessageBox::Icon icon, const QString& title, const QString& text,
+                QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton);
+
+    static QPixmap standardIcon(QMessageBox::Icon icon, QMessageBox *mb);
+
+    QLabel *label;
+    QMessageBox::Icon icon;
+    QLabel *iconLabel;
+    QDialogButtonBox *buttonBox;
+    QList<QAbstractButton *> customButtonList;
+    QAbstractButton *escapeButton;
+    QPushButton *defaultButton;
+    QAbstractButton *clickedButton;
+    DetailButton *detailsButton;
+#ifndef QT_NO_TEXTEDIT
+    QMessageBoxDetailsText *detailsText;
+#endif
+    bool compatMode;
+    bool autoAddOkButton;
+    QAbstractButton *detectedEscapeButton;
+    QLabel *informativeLabel;
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+    QTextBrowser *textBrowser;
+#endif
+    QPointer<QObject> receiverToDisconnectOnClose;
+    QByteArray memberToDisconnectOnClose;
+    QByteArray signalToDisconnectOnClose;
+};
+
+void QMessageBoxPrivate::init(const QString &title, const QString &text)
+{
+    Q_Q(QMessageBox);
+
+    label = new QLabel;
+    label->setObjectName(QLatin1String("qt_msgbox_label"));
+    label->setTextInteractionFlags(Qt::TextInteractionFlags(q->style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, q)));
+    label->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
+    label->setOpenExternalLinks(true);
+#if defined(Q_WS_MAC)
+    label->setContentsMargins(16, 0, 0, 0);
+#elif !defined(Q_WS_QWS)
+    label->setContentsMargins(2, 0, 0, 0);
+    label->setIndent(9);
+#endif
+    icon = QMessageBox::NoIcon;
+    iconLabel = new QLabel;
+    iconLabel->setObjectName(QLatin1String("qt_msgboxex_icon_label"));
+    iconLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+
+    buttonBox = new QDialogButtonBox;
+    buttonBox->setObjectName(QLatin1String("qt_msgbox_buttonbox"));
+    buttonBox->setCenterButtons(q->style()->styleHint(QStyle::SH_MessageBox_CenterButtons, 0, q));
+    QObject::connect(buttonBox, SIGNAL(clicked(QAbstractButton*)),
+                     q, SLOT(_q_buttonClicked(QAbstractButton*)));
+
+    QGridLayout *grid = new QGridLayout;
+#ifndef Q_WS_MAC
+#ifdef Q_WS_S60
+    const int preferredIconColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 1 : 0;
+    const int preferredTextColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 0 : 1;
+#else
+    const int preferredIconColumn = 0;
+    const int preferredTextColumn = 1;
+#endif
+    grid->addWidget(iconLabel, 0, preferredIconColumn, 2, 1, Qt::AlignTop);
+    grid->addWidget(label, 0, preferredTextColumn, 1, 1);
+    // -- leave space for information label --
+    grid->addWidget(buttonBox, 2, 0, 1, 2);
+#else
+    grid->setMargin(0);
+    grid->setVerticalSpacing(8);
+    grid->setHorizontalSpacing(0);
+    q->setContentsMargins(24, 15, 24, 20);
+    grid->addWidget(iconLabel, 0, 0, 2, 1, Qt::AlignTop | Qt::AlignLeft);
+    grid->addWidget(label, 0, 1, 1, 1);
+    // -- leave space for information label --
+    grid->setRowStretch(1, 100);
+    grid->setRowMinimumHeight(2, 6);
+    grid->addWidget(buttonBox, 3, 1, 1, 1);
+#endif
+
+    grid->setSizeConstraint(QLayout::SetNoConstraint);
+    q->setLayout(grid);
+
+    if (!title.isEmpty() || !text.isEmpty()) {
+        q->setWindowTitle(title);
+        q->setText(text);
+    }
+    q->setModal(true);
+
+#ifdef Q_WS_MAC
+    QFont f = q->font();
+    f.setBold(true);
+    label->setFont(f);
+#endif
+    retranslateStrings();
+}
+
+int QMessageBoxPrivate::layoutMinimumWidth()
+{
+    layout->activate();
+    return layout->totalMinimumSize().width();
+}
+
+void QMessageBoxPrivate::updateSize()
+{
+    Q_Q(QMessageBox);
+
+    if (!q->isVisible())
+        return;
+
+    QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
+#if defined(Q_WS_QWS) || defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN)
+    // the width of the screen, less the window border.
+    int hardLimit = screenSize.width() - (q->frameGeometry().width() - q->geometry().width());
+#else
+    int hardLimit = qMin(screenSize.width() - 480, 1000); // can never get bigger than this
+    // on small screens allows the messagebox be the same size as the screen
+    if (screenSize.width() <= 1024)
+        hardLimit = screenSize.width();
+#endif
+#ifdef Q_WS_MAC
+    int softLimit = qMin(screenSize.width()/2, 420);
+#elif defined(Q_WS_QWS)
+    int softLimit = qMin(hardLimit, 500);
+#else
+    // note: ideally on windows, hard and soft limits but it breaks compat
+#ifndef Q_WS_WINCE
+    int softLimit = qMin(screenSize.width()/2, 500);
+#else
+    int softLimit = qMin(screenSize.width() * 3 / 4, 500);
+#endif //Q_WS_WINCE
+#endif
+
+    if (informativeLabel)
+        informativeLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+
+    label->setWordWrap(false); // makes the label return min size
+    int width = layoutMinimumWidth();
+
+    if (width > softLimit) {
+        label->setWordWrap(true);
+        width = qMax(softLimit, layoutMinimumWidth());
+
+        if (width > hardLimit) {
+            label->d_func()->ensureTextControl();
+            if (QTextControl *control = label->d_func()->control) {
+                QTextOption opt = control->document()->defaultTextOption();
+                opt.setWrapMode(QTextOption::WrapAnywhere);
+                control->document()->setDefaultTextOption(opt);
+            }
+            width = hardLimit;
+        }
+    }
+#ifdef Q_WS_S60
+        // in S60 portait messageBoxes should always occupy maximum width
+        if (QApplication::desktop()->size().height() > QApplication::desktop()->size().width()){
+            width = hardLimit;
+        } else {
+            // in landscape the messageBoxes should be of same width as in portrait
+            width = qMin(QApplication::desktop()->size().height(), hardLimit);
+        }
+#endif
+
+    if (informativeLabel) {
+        label->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+        QSizePolicy policy(QSizePolicy::Minimum, QSizePolicy::Preferred);
+        policy.setHeightForWidth(true);
+        informativeLabel->setSizePolicy(policy);
+        width = qMax(width, layoutMinimumWidth());
+        if (width > hardLimit) { // longest word is really big, so wrap anywhere
+            informativeLabel->d_func()->ensureTextControl();
+            if (QTextControl *control = informativeLabel->d_func()->control) {
+                QTextOption opt = control->document()->defaultTextOption();
+                opt.setWrapMode(QTextOption::WrapAnywhere);
+                control->document()->setDefaultTextOption(opt);
+            }
+            width = hardLimit;
+        }
+        policy.setHeightForWidth(label->wordWrap());
+        label->setSizePolicy(policy);
+    }
+
+    QFontMetrics fm(QApplication::font("QWorkspaceTitleBar"));
+    int windowTitleWidth = qMin(fm.width(q->windowTitle()) + 50, hardLimit);
+    if (windowTitleWidth > width)
+        width = windowTitleWidth;
+
+    layout->activate();
+    int height = (layout->hasHeightForWidth())
+                     ? layout->totalHeightForWidth(width)
+                     : layout->totalMinimumSize().height();
+
+#ifndef QT_NO_STYLE_S60
+        QS60Style *s60Style = 0;
+        s60Style = qobject_cast<QS60Style *>(QApplication::style());
+
+        //use custom pixel metric to deduce the minimum height of the messagebox
+        if (s60Style)
+            height = qMax(height, s60Style->pixelMetric((QStyle::PixelMetric)PM_MessageBoxHeight));
+#endif
+
+    q->setFixedSize(width, height);
+    QCoreApplication::removePostedEvents(q, QEvent::LayoutRequest);
+}
+
+
+#ifdef Q_WS_WINCE
+/*!
+  \internal
+  Hides special buttons which are rather shown in the title bar
+  on WinCE, to conserve screen space.
+*/
+
+void QMessageBoxPrivate::hideSpecial()
+{
+    Q_Q(QMessageBox);
+    QList<QPushButton*> list = q->findChildren<QPushButton*>();
+        for (int i=0; i<list.size(); ++i) {
+            QPushButton *pb = list.at(i);
+            QString text = pb->text();
+            text.remove(QChar::fromLatin1('&'));
+            if (text == QApplication::translate("QMessageBox", "OK" ))
+                pb->setFixedSize(0,0);
+        }
+}
+#endif
+
+static int oldButton(int button)
+{
+    switch (button & QMessageBox::ButtonMask) {
+    case QMessageBox::Ok:
+        return Old_Ok;
+    case QMessageBox::Cancel:
+        return Old_Cancel;
+    case QMessageBox::Yes:
+        return Old_Yes;
+    case QMessageBox::No:
+        return Old_No;
+    case QMessageBox::Abort:
+        return Old_Abort;
+    case QMessageBox::Retry:
+        return Old_Retry;
+    case QMessageBox::Ignore:
+        return Old_Ignore;
+    case QMessageBox::YesToAll:
+        return Old_YesAll;
+    case QMessageBox::NoToAll:
+        return Old_NoAll;
+    default:
+        return 0;
+    }
+}
+
+int QMessageBoxPrivate::execReturnCode(QAbstractButton *button)
+{
+    int ret = buttonBox->standardButton(button);
+    if (ret == QMessageBox::NoButton) {
+        ret = customButtonList.indexOf(button); // if button == 0, correctly sets ret = -1
+    } else if (compatMode) {
+        ret = oldButton(ret);
+    }
+    return ret;
+}
+
+void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
+{
+    Q_Q(QMessageBox);
+#ifndef QT_NO_TEXTEDIT
+    if (detailsButton && detailsText && button == detailsButton) {
+        detailsButton->setLabel(detailsText->isHidden() ? HideLabel : ShowLabel);
+        detailsText->setHidden(!detailsText->isHidden());
+        updateSize();
+    } else
+#endif
+    {
+        clickedButton = button;
+        q->done(execReturnCode(button)); // does not trigger closeEvent
+        emit q->buttonClicked(button);
+
+        if (receiverToDisconnectOnClose) {
+            QObject::disconnect(q, signalToDisconnectOnClose, receiverToDisconnectOnClose,
+                                memberToDisconnectOnClose);
+            receiverToDisconnectOnClose = 0;
+        }
+        signalToDisconnectOnClose.clear();
+        memberToDisconnectOnClose.clear();
+    }
+}
+
+/*!
+    \class QMessageBox
+
+    \brief The QMessageBox class provides a modal dialog for informing
+    the user or for asking the user a question and receiving an answer.
+
+    \ingroup standard-dialogs
+
+
+    A message box displays a primary \l{QMessageBox::text}{text} to
+    alert the user to a situation, an \l{QMessageBox::informativeText}
+    {informative text} to further explain the alert or to ask the user
+    a question, and an optional \l{QMessageBox::detailedText}
+    {detailed text} to provide even more data if the user requests
+    it. A message box can also display an \l{QMessageBox::icon} {icon}
+    and \l{QMessageBox::standardButtons} {standard buttons} for
+    accepting a user response.
+
+    Two APIs for using QMessageBox are provided, the property-based
+    API, and the static functions. Calling one of the static functions
+    is the simpler approach, but it is less flexible than using the
+    property-based API, and the result is less informative. Using the
+    property-based API is recommended.
+
+    \section1 The Property-based API
+
+    To use the property-based API, construct an instance of
+    QMessageBox, set the desired properties, and call exec() to show
+    the message. The simplest configuration is to set only the
+    \l{QMessageBox::text} {message text} property.
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 5
+
+    The user must click the \gui{OK} button to dismiss the message
+    box. The rest of the GUI is blocked until the message box is
+    dismissed.
+
+    \image msgbox1.png
+
+    A better approach than just alerting the user to an event is to
+    also ask the user what to do about it. Store the question in the
+    \l{QMessageBox::informativeText} {informative text} property, and
+    set the \l{QMessageBox::standardButtons} {standard buttons}
+    property to the set of buttons you want as the set of user
+    responses. The buttons are specified by combining values from
+    StandardButtons using the bitwise OR operator. The display order
+    for the buttons is platform-dependent. For example, on Windows,
+    \gui{Save} is displayed to the left of \gui{Cancel}, whereas on
+    Mac OS, the order is reversed.
+
+    Mark one of your standard buttons to be your
+    \l{QMessageBox::defaultButton()} {default button}.
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 6
+
+    This is the approach recommended in the
+    \l{http://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Windows/Windows.html#//apple_ref/doc/uid/20000961-BABCAJID}
+    {Mac OS X Guidelines}. Similar guidelines apply for the other
+    platforms, but note the different ways the
+    \l{QMessageBox::informativeText} {informative text} is handled for
+    different platforms.
+
+    \image msgbox2.png
+
+    The exec() slot returns the StandardButtons value of the button
+    that was clicked.
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 7
+
+    To give the user more information to help him answer the question,
+    set the \l{QMessageBox::detailedText} {detailed text} property. If
+    the \l{QMessageBox::detailedText} {detailed text} property is set,
+    the \gui{Show Details...} button will be shown.
+
+    \image msgbox3.png
+
+    Clicking the \gui{Show Details...} button displays the detailed text.
+
+    \image msgbox4.png
+
+    \section2 Rich Text and the Text Format Property
+
+    The \l{QMessageBox::detailedText} {detailed text} property is
+    always interpreted as plain text. The \l{QMessageBox::text} {main
+    text} and \l{QMessageBox::informativeText} {informative text}
+    properties can be either plain text or rich text. These strings
+    are interpreted according to the setting of the
+    \l{QMessageBox::textFormat} {text format} property. The default
+    setting is \l{Qt::AutoText} {auto-text}.
+
+    Note that for some plain text strings containing XML
+    meta-characters, the auto-text \l{Qt::mightBeRichText()} {rich
+    text detection test} may fail causing your plain text string to be
+    interpreted incorrectly as rich text. In these rare cases, use
+    Qt::convertFromPlainText() to convert your plain text string to a
+    visually equivalent rich text string, or set the
+    \l{QMessageBox::textFormat} {text format} property explicitly with
+    setTextFormat().
+
+    \section2 Severity Levels and the Icon and Pixmap Properties
+
+    QMessageBox supports four predefined message severity levels, or message
+    types, which really only differ in the predefined icon they each show.
+    Specify one of the four predefined message types by setting the
+    \l{QMessageBox::icon}{icon} property to one of the
+    \l{QMessageBox::Icon}{predefined icons}. The following rules are
+    guidelines:
+
+    \table
+    \row
+    \o \img qmessagebox-quest.png
+    \o \l Question
+    \o For asking a question during normal operations.
+    \row
+    \o \img qmessagebox-info.png
+    \o \l Information
+    \o For reporting information about normal operations.
+    \row
+    \o \img qmessagebox-warn.png
+    \o \l Warning
+    \o For reporting non-critical errors.
+    \row
+    \o \img qmessagebox-crit.png
+    \o \l Critical
+    \o For reporting critical errors.
+    \endtable
+
+    \l{QMessageBox::Icon}{Predefined icons} are not defined by QMessageBox, but
+    provided by the style. The default value is \l{QMessageBox::NoIcon}
+    {No Icon}. The message boxes are otherwise the same for all cases. When
+    using a standard icon, use the one recommended in the table, or use the
+    one recommended by the style guidelines for your platform. If none of the
+    standard icons is right for your message box, you can use a custom icon by
+    setting the \l{QMessageBox::iconPixmap}{icon pixmap} property instead of
+    setting the \l{QMessageBox::icon}{icon} property.
+
+    In summary, to set an icon, use \e{either} setIcon() for one of the
+    standard icons, \e{or} setIconPixmap() for a custom icon.
+
+    \section1 The Static Functions API
+
+    Building message boxes with the static functions API, although
+    convenient, is less flexible than using the property-based API,
+    because the static function signatures lack parameters for setting
+    the \l{QMessageBox::informativeText} {informative text} and
+    \l{QMessageBox::detailedText} {detailed text} properties. One
+    work-around for this has been to use the \c{title} parameter as
+    the message box main text and the \c{text} parameter as the
+    message box informative text. Because this has the obvious
+    drawback of making a less readable message box, platform
+    guidelines do not recommend it. The \e{Microsoft Windows User
+    Interface Guidelines} recommend using the
+    \l{QCoreApplication::applicationName} {application name} as the
+    \l{QMessageBox::setWindowTitle()} {window's title}, which means
+    that if you have an informative text in addition to your main
+    text, you must concatenate it to the \c{text} parameter.
+
+    Note that the static function signatures have changed with respect
+    to their button parameters, which are now used to set the
+    \l{QMessageBox::standardButtons} {standard buttons} and the
+    \l{QMessageBox::defaultButton()} {default button}.
+
+    Static functions are available for creating information(),
+    question(), warning(), and critical() message boxes.
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 0
+
+    The \l{dialogs/standarddialogs}{Standard Dialogs} example shows
+    how to use QMessageBox and the other built-in Qt dialogs.
+
+    \section1 Advanced Usage
+
+    If the \l{QMessageBox::StandardButtons} {standard buttons} are not
+    flexible enough for your message box, you can use the addButton()
+    overload that takes a text and a ButtonRoleto to add custom
+    buttons. The ButtonRole is used by QMessageBox to determine the
+    ordering of the buttons on screen (which varies according to the
+    platform). You can test the value of clickedButton() after calling
+    exec(). For example,
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 2
+
+    \section1 Default and Escape Keys
+
+    The default button (i.e., the button activated when \key Enter is
+    pressed) can be specified using setDefaultButton(). If a default
+    button is not specified, QMessageBox tries to find one based on
+    the \l{ButtonRole} {button roles} of the buttons used in the
+    message box.
+
+    The escape button (the button activated when \key Esc is pressed)
+    can be specified using setEscapeButton().  If an escape button is
+    not specified, QMessageBox tries to find one using these rules:
+
+    \list 1
+
+    \o If there is only one button, it is the button activated when
+    \key Esc is pressed.
+
+    \o If there is a \l Cancel button, it is the button activated when
+    \key Esc is pressed.
+
+    \o If there is exactly one button having either
+       \l{QMessageBox::RejectRole} {the Reject role} or the
+       \l{QMessageBox::NoRole} {the No role}, it is the button
+       activated when \key Esc is pressed.
+
+    \endlist
+
+    When an escape button can't be determined using these rules,
+    pressing \key Esc has no effect.
+
+    \sa QDialogButtonBox, {fowler}{GUI Design Handbook: Message Box}, {Standard Dialogs Example}, {Application Example}
+*/
+
+/*!
+    \enum QMessageBox::StandardButton
+    \since 4.2
+
+    These enums describe flags for standard buttons. Each button has a
+    defined \l ButtonRole.
+
+    \value Ok An "OK" button defined with the \l AcceptRole.
+    \value Open A "Open" button defined with the \l AcceptRole.
+    \value Save A "Save" button defined with the \l AcceptRole.
+    \value Cancel A "Cancel" button defined with the \l RejectRole.
+    \value Close A "Close" button defined with the \l RejectRole.
+    \value Discard A "Discard" or "Don't Save" button, depending on the platform,
+                    defined with the \l DestructiveRole.
+    \value Apply An "Apply" button defined with the \l ApplyRole.
+    \value Reset A "Reset" button defined with the \l ResetRole.
+    \value RestoreDefaults A "Restore Defaults" button defined with the \l ResetRole.
+    \value Help A "Help" button defined with the \l HelpRole.
+    \value SaveAll A "Save All" button defined with the \l AcceptRole.
+    \value Yes A "Yes" button defined with the \l YesRole.
+    \value YesToAll A "Yes to All" button defined with the \l YesRole.
+    \value No A "No" button defined with the \l NoRole.
+    \value NoToAll A "No to All" button defined with the \l NoRole.
+    \value Abort An "Abort" button defined with the \l RejectRole.
+    \value Retry A "Retry" button defined with the \l AcceptRole.
+    \value Ignore An "Ignore" button defined with the \l AcceptRole.
+
+    \value NoButton An invalid button.
+
+    \omitvalue FirstButton
+    \omitvalue LastButton
+
+    The following values are obsolete:
+
+    \value YesAll Use YesToAll instead.
+    \value NoAll Use NoToAll instead.
+    \value Default Use the \c defaultButton argument of
+           information(), warning(), etc. instead, or call
+           setDefaultButton().
+    \value Escape Call setEscapeButton() instead.
+    \value FlagMask
+    \value ButtonMask
+
+    \sa ButtonRole, standardButtons
+*/
+
+/*!
+    \fn void QMessageBox::buttonClicked(QAbstractButton *button)
+
+    This signal is emitted whenever a button is clicked inside the QMessageBox.
+    The button that was clicked in returned in \a button.
+*/
+
+/*!
+    Constructs a message box with no text and no buttons. \a parent is
+    passed to the QDialog constructor.
+
+    On Mac OS X, if you want your message box to appear
+    as a Qt::Sheet of its \a parent, set the message box's
+    \l{setWindowModality()} {window modality} to Qt::WindowModal or use open().
+    Otherwise, the message box will be a standard dialog.
+
+*/
+QMessageBox::QMessageBox(QWidget *parent)
+    : QDialog(*new QMessageBoxPrivate, parent, Qt::MSWindowsFixedSizeDialogHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint)
+{
+    Q_D(QMessageBox);
+    d->init();
+}
+
+/*!
+    Constructs a message box with the given \a icon, \a title, \a
+    text, and standard \a buttons. Standard or custom buttons can be
+    added at any time using addButton(). The \a parent and \a f
+    arguments are passed to the QDialog constructor.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+    On Mac OS X, if \a parent is not 0 and you want your message box
+    to appear as a Qt::Sheet of that parent, set the message box's
+    \l{setWindowModality()} {window modality} to Qt::WindowModal
+    (default). Otherwise, the message box will be a standard dialog.
+
+    \sa setWindowTitle(), setText(), setIcon(), setStandardButtons()
+*/
+QMessageBox::QMessageBox(Icon icon, const QString &title, const QString &text,
+                         StandardButtons buttons, QWidget *parent,
+                         Qt::WindowFlags f)
+: QDialog(*new QMessageBoxPrivate, parent, f | Qt::MSWindowsFixedSizeDialogHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint)
+{
+    Q_D(QMessageBox);
+    d->init(title, text);
+    setIcon(icon);
+    if (buttons != NoButton)
+        setStandardButtons(buttons);
+}
+
+/*!
+    Destroys the message box.
+*/
+QMessageBox::~QMessageBox()
+{
+}
+
+/*!
+    \since 4.2
+
+    Adds the given \a button to the message box with the specified \a
+    role.
+
+    \sa removeButton(), button(), setStandardButtons()
+*/
+void QMessageBox::addButton(QAbstractButton *button, ButtonRole role)
+{
+    Q_D(QMessageBox);
+    if (!button)
+        return;
+    removeButton(button);
+    d->buttonBox->addButton(button, (QDialogButtonBox::ButtonRole)role);
+    d->customButtonList.append(button);
+    d->autoAddOkButton = false;
+}
+
+/*!
+    \since 4.2
+    \overload
+
+    Creates a button with the given \a text, adds it to the message box for the
+    specified \a role, and returns it.
+*/
+QPushButton *QMessageBox::addButton(const QString& text, ButtonRole role)
+{
+    Q_D(QMessageBox);
+    QPushButton *pushButton = new QPushButton(text);
+    addButton(pushButton, role);
+    d->updateSize();
+    return pushButton;
+}
+
+/*!
+    \since 4.2
+    \overload
+
+    Adds a standard \a button to the message box if it is valid to do so, and
+    returns the push button.
+
+    \sa setStandardButtons()
+*/
+QPushButton *QMessageBox::addButton(StandardButton button)
+{
+    Q_D(QMessageBox);
+    QPushButton *pushButton = d->buttonBox->addButton((QDialogButtonBox::StandardButton)button);
+    if (pushButton)
+        d->autoAddOkButton = false;
+    return pushButton;
+}
+
+/*!
+    \since 4.2
+
+    Removes \a button from the button box without deleting it.
+
+    \sa addButton(), setStandardButtons()
+*/
+void QMessageBox::removeButton(QAbstractButton *button)
+{
+    Q_D(QMessageBox);
+    d->customButtonList.removeAll(button);
+    if (d->escapeButton == button)
+        d->escapeButton = 0;
+    if (d->defaultButton == button)
+        d->defaultButton = 0;
+    d->buttonBox->removeButton(button);
+    d->updateSize();
+}
+
+/*!
+    \property QMessageBox::standardButtons
+    \brief collection of standard buttons in the message box
+    \since 4.2
+
+    This property controls which standard buttons are used by the message box.
+
+    By default, this property contains no standard buttons.
+
+    \sa addButton()
+*/
+void QMessageBox::setStandardButtons(StandardButtons buttons)
+{
+    Q_D(QMessageBox);
+    d->buttonBox->setStandardButtons(QDialogButtonBox::StandardButtons(int(buttons)));
+
+    QList<QAbstractButton *> buttonList = d->buttonBox->buttons();
+    if (!buttonList.contains(d->escapeButton))
+        d->escapeButton = 0;
+    if (!buttonList.contains(d->defaultButton))
+        d->defaultButton = 0;
+    d->autoAddOkButton = false;
+    d->updateSize();
+}
+
+QMessageBox::StandardButtons QMessageBox::standardButtons() const
+{
+    Q_D(const QMessageBox);
+    return QMessageBox::StandardButtons(int(d->buttonBox->standardButtons()));
+}
+
+/*!
+    \since 4.2
+
+    Returns the standard button enum value corresponding to the given \a button,
+    or NoButton if the given \a button isn't a standard button.
+
+    \sa button(), standardButtons()
+*/
+QMessageBox::StandardButton QMessageBox::standardButton(QAbstractButton *button) const
+{
+    Q_D(const QMessageBox);
+    return (QMessageBox::StandardButton)d->buttonBox->standardButton(button);
+}
+
+/*!
+    \since 4.2
+
+    Returns a pointer corresponding to the standard button \a which,
+    or 0 if the standard button doesn't exist in this message box.
+
+    \sa standardButtons, standardButton()
+*/
+QAbstractButton *QMessageBox::button(StandardButton which) const
+{
+    Q_D(const QMessageBox);
+    return d->buttonBox->button(QDialogButtonBox::StandardButton(which));
+}
+
+/*!
+    \since 4.2
+
+    Returns the button that is activated when escape is pressed.
+
+    By default, QMessageBox attempts to automatically detect an
+    escape button as follows:
+
+    \list 1
+    \o If there is only one button, it is made the escape button.
+    \o If there is a \l Cancel button, it is made the escape button.
+    \o On Mac OS X only, if there is exactly one button with the role
+       QMessageBox::RejectRole, it is made the escape button.
+    \endlist
+
+    When an escape button could not be automatically detected, pressing
+    \key Esc has no effect.
+
+    \sa addButton()
+*/
+QAbstractButton *QMessageBox::escapeButton() const
+{
+    Q_D(const QMessageBox);
+    return d->escapeButton;
+}
+
+/*!
+    \since 4.2
+
+    Sets the button that gets activated when the \key Escape key is
+    pressed to \a button.
+
+    \sa addButton(), clickedButton()
+*/
+void QMessageBox::setEscapeButton(QAbstractButton *button)
+{
+    Q_D(QMessageBox);
+    if (d->buttonBox->buttons().contains(button))
+        d->escapeButton = button;
+}
+
+/*!
+    \since 4.3
+
+    Sets the buttons that gets activated when the \key Escape key is
+    pressed to \a button.
+
+    \sa addButton(), clickedButton()
+*/
+void QMessageBox::setEscapeButton(QMessageBox::StandardButton button)
+{
+    Q_D(QMessageBox);
+    setEscapeButton(d->buttonBox->button(QDialogButtonBox::StandardButton(button)));
+}
+
+void QMessageBoxPrivate::detectEscapeButton()
+{
+    if (escapeButton) { // escape button explicitly set
+        detectedEscapeButton = escapeButton;
+        return;
+    }
+
+    // Cancel button automatically becomes escape button
+    detectedEscapeButton = buttonBox->button(QDialogButtonBox::Cancel);
+    if (detectedEscapeButton)
+        return;
+
+    // If there is only one button, make it the escape button
+    const QList<QAbstractButton *> buttons = buttonBox->buttons();
+    if (buttons.count() == 1) {
+        detectedEscapeButton = buttons.first();
+        return;
+    }
+
+    // if the message box has one RejectRole button, make it the escape button
+    for (int i = 0; i < buttons.count(); i++) {
+        if (buttonBox->buttonRole(buttons.at(i)) == QDialogButtonBox::RejectRole) {
+            if (detectedEscapeButton) { // already detected!
+                detectedEscapeButton = 0;
+                break;
+            }
+            detectedEscapeButton = buttons.at(i);
+        }
+    }
+    if (detectedEscapeButton)
+        return;
+
+    // if the message box has one NoRole button, make it the escape button
+    for (int i = 0; i < buttons.count(); i++) {
+        if (buttonBox->buttonRole(buttons.at(i)) == QDialogButtonBox::NoRole) {
+            if (detectedEscapeButton) { // already detected!
+                detectedEscapeButton = 0;
+                break;
+            }
+            detectedEscapeButton = buttons.at(i);
+        }
+    }
+}
+
+/*!
+    \since 4.2
+
+    Returns the button that was clicked by the user,
+    or 0 if the user hit the \key Esc key and
+    no \l{setEscapeButton()}{escape button} was set.
+
+    If exec() hasn't been called yet, returns 0.
+
+    Example:
+
+    \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 3
+
+    \sa standardButton(), button()
+*/
+QAbstractButton *QMessageBox::clickedButton() const
+{
+    Q_D(const QMessageBox);
+    return d->clickedButton;
+}
+
+/*!
+    \since 4.2
+
+    Returns the button that should be the message box's
+    \l{QPushButton::setDefault()}{default button}. Returns 0
+    if no default button was set.
+
+    \sa addButton(), QPushButton::setDefault()
+*/
+QPushButton *QMessageBox::defaultButton() const
+{
+    Q_D(const QMessageBox);
+    return d->defaultButton;
+}
+
+/*!
+    \since 4.2
+
+    Sets the message box's \l{QPushButton::setDefault()}{default button}
+    to \a button.
+
+    \sa addButton(), QPushButton::setDefault()
+*/
+void QMessageBox::setDefaultButton(QPushButton *button)
+{
+    Q_D(QMessageBox);
+    if (!d->buttonBox->buttons().contains(button))
+        return;
+    d->defaultButton = button;
+    button->setDefault(true);
+    button->setFocus();
+}
+
+/*!
+    \since 4.3
+
+    Sets the message box's \l{QPushButton::setDefault()}{default button}
+    to \a button.
+
+    \sa addButton(), QPushButton::setDefault()
+*/
+void QMessageBox::setDefaultButton(QMessageBox::StandardButton button)
+{
+    Q_D(QMessageBox);
+    setDefaultButton(d->buttonBox->button(QDialogButtonBox::StandardButton(button)));
+}
+
+/*!
+  \property QMessageBox::text
+  \brief the message box text to be displayed.
+
+  The text will be interpreted either as a plain text or as rich text,
+  depending on the text format setting (\l QMessageBox::textFormat).
+  The default setting is Qt::AutoText, i.e., the message box will try
+  to auto-detect the format of the text.
+
+  The default value of this property is an empty string.
+
+  \sa textFormat, QMessageBox::informativeText, QMessageBox::detailedText
+*/
+QString QMessageBox::text() const
+{
+    Q_D(const QMessageBox);
+    return d->label->text();
+}
+
+void QMessageBox::setText(const QString &text)
+{
+    Q_D(QMessageBox);
+    d->label->setText(text);
+    d->label->setWordWrap(d->label->textFormat() == Qt::RichText
+        || (d->label->textFormat() == Qt::AutoText && Qt::mightBeRichText(text)));
+    d->updateSize();
+}
+
+/*!
+    \enum QMessageBox::Icon
+
+    This enum has the following values:
+
+    \value NoIcon the message box does not have any icon.
+
+    \value Question an icon indicating that
+    the message is asking a question.
+
+    \value Information an icon indicating that
+    the message is nothing out of the ordinary.
+
+    \value Warning an icon indicating that the
+    message is a warning, but can be dealt with.
+
+    \value Critical an icon indicating that
+    the message represents a critical problem.
+
+*/
+
+/*!
+    \property QMessageBox::icon
+    \brief the message box's icon
+
+    The icon of the message box can be specified with one of the
+    values:
+
+    \list
+    \o QMessageBox::NoIcon
+    \o QMessageBox::Question
+    \o QMessageBox::Information
+    \o QMessageBox::Warning
+    \o QMessageBox::Critical
+    \endlist
+
+    The default is QMessageBox::NoIcon.
+
+    The pixmap used to display the actual icon depends on the current
+    \l{QWidget::style()} {GUI style}. You can also set a custom pixmap
+    for the icon by setting the \l{QMessageBox::iconPixmap} {icon
+    pixmap} property.
+
+    \sa iconPixmap
+*/
+QMessageBox::Icon QMessageBox::icon() const
+{
+    Q_D(const QMessageBox);
+    return d->icon;
+}
+
+void QMessageBox::setIcon(Icon icon)
+{
+    Q_D(QMessageBox);
+    setIconPixmap(QMessageBoxPrivate::standardIcon((QMessageBox::Icon)icon,
+                                                   this));
+    d->icon = icon;
+}
+
+/*!
+    \property QMessageBox::iconPixmap
+    \brief the current icon
+
+    The icon currently used by the message box. Note that it's often
+    hard to draw one pixmap that looks appropriate in all GUI styles;
+    you may want to supply a different pixmap for each platform.
+
+    By default, this property is undefined.
+
+    \sa icon
+*/
+QPixmap QMessageBox::iconPixmap() const
+{
+    Q_D(const QMessageBox);
+    if (d->iconLabel && d->iconLabel->pixmap())
+        return *d->iconLabel->pixmap();
+    return QPixmap();
+}
+
+void QMessageBox::setIconPixmap(const QPixmap &pixmap)
+{
+    Q_D(QMessageBox);
+    d->iconLabel->setPixmap(pixmap);
+    d->updateSize();
+    d->icon = NoIcon;
+}
+
+/*!
+    \property QMessageBox::textFormat
+    \brief the format of the text displayed by the message box
+
+    The current text format used by the message box. See the \l
+    Qt::TextFormat enum for an explanation of the possible options.
+
+    The default format is Qt::AutoText.
+
+    \sa setText()
+*/
+Qt::TextFormat QMessageBox::textFormat() const
+{
+    Q_D(const QMessageBox);
+    return d->label->textFormat();
+}
+
+void QMessageBox::setTextFormat(Qt::TextFormat format)
+{
+    Q_D(QMessageBox);
+    d->label->setTextFormat(format);
+    d->label->setWordWrap(format == Qt::RichText
+                    || (format == Qt::AutoText && Qt::mightBeRichText(d->label->text())));
+    d->updateSize();
+}
+
+/*!
+    \reimp
+*/
+bool QMessageBox::event(QEvent *e)
+{
+    bool result =QDialog::event(e);
+    switch (e->type()) {
+        case QEvent::LayoutRequest:
+            d_func()->updateSize();
+            break;
+        case QEvent::LanguageChange:
+            d_func()->retranslateStrings();
+            break;
+#ifdef Q_WS_WINCE
+        case QEvent::OkRequest:
+        case QEvent::HelpRequest: {
+          QString bName =
+              (e->type() == QEvent::OkRequest)
+              ? QApplication::translate("QMessageBox", "OK")
+              : QApplication::translate("QMessageBox", "Help");
+          QList<QPushButton*> list = findChildren<QPushButton*>();
+          for (int i=0; i<list.size(); ++i) {
+              QPushButton *pb = list.at(i);
+              if (pb->text() == bName) {
+                  if (pb->isEnabled())
+                      pb->click();
+                  return pb->isEnabled();
+              }
+          }
+        }
+#endif
+        default:
+            break;
+    }
+    return result;
+}
+
+/*!
+    \reimp
+*/
+void QMessageBox::resizeEvent(QResizeEvent *event)
+{
+    QDialog::resizeEvent(event);
+}
+
+/*!
+    \reimp
+*/
+void QMessageBox::closeEvent(QCloseEvent *e)
+{
+    Q_D(QMessageBox);
+    if (!d->detectedEscapeButton) {
+        e->ignore();
+        return;
+    }
+    QDialog::closeEvent(e);
+    d->clickedButton = d->detectedEscapeButton;
+    setResult(d->execReturnCode(d->detectedEscapeButton));
+}
+
+/*!
+    \reimp
+*/
+void QMessageBox::changeEvent(QEvent *ev)
+{
+    Q_D(QMessageBox);
+    switch (ev->type()) {
+    case QEvent::StyleChange:
+    {
+        if (d->icon != NoIcon)
+            setIcon(d->icon);
+        Qt::TextInteractionFlags flags(style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, this));
+        d->label->setTextInteractionFlags(flags);
+        d->buttonBox->setCenterButtons(style()->styleHint(QStyle::SH_MessageBox_CenterButtons, 0, this));
+        if (d->informativeLabel)
+            d->informativeLabel->setTextInteractionFlags(flags);
+        // intentional fall through
+    }
+    case QEvent::FontChange:
+    case QEvent::ApplicationFontChange:
+#ifdef Q_WS_MAC
+    {
+        QFont f = font();
+        f.setBold(true);
+        d->label->setFont(f);
+    }
+#endif
+    default:
+        break;
+    }
+    QDialog::changeEvent(ev);
+}
+
+/*!
+    \reimp
+*/
+void QMessageBox::keyPressEvent(QKeyEvent *e)
+{
+    Q_D(QMessageBox);
+    if (e->key() == Qt::Key_Escape
+#ifdef Q_WS_MAC
+        || (e->modifiers() == Qt::ControlModifier && e->key() == Qt::Key_Period)
+#endif
+        ) {
+            if (d->detectedEscapeButton) {
+#ifdef Q_WS_MAC
+                d->detectedEscapeButton->animateClick();
+#else
+                d->detectedEscapeButton->click();
+#endif
+            }
+            return;
+        }
+
+#if defined (Q_OS_WIN) && !defined(QT_NO_CLIPBOARD) && !defined(QT_NO_SHORTCUT)
+        if (e == QKeySequence::Copy) {
+            QString separator = QString::fromLatin1("---------------------------\n");
+            QString textToCopy = separator;
+            separator.prepend(QLatin1Char('\n'));
+            textToCopy += windowTitle() + separator; // title
+            textToCopy += d->label->text() + separator; // text
+
+            if (d->informativeLabel)
+                textToCopy += d->informativeLabel->text() + separator;
+
+            QString buttonTexts;
+            QList<QAbstractButton *> buttons = d->buttonBox->buttons();
+            for (int i = 0; i < buttons.count(); i++) {
+                buttonTexts += buttons[i]->text() + QLatin1String("   ");
+            }
+            textToCopy += buttonTexts + separator;
+
+            QApplication::clipboard()->setText(textToCopy);
+            return;
+        }
+#endif //QT_NO_SHORTCUT QT_NO_CLIPBOARD Q_OS_WIN
+
+#ifndef QT_NO_SHORTCUT
+    if (!(e->modifiers() & Qt::AltModifier)) {
+        int key = e->key() & ~((int)Qt::MODIFIER_MASK|(int)Qt::UNICODE_ACCEL);
+        if (key) {
+            const QList<QAbstractButton *> buttons = d->buttonBox->buttons();
+            for (int i = 0; i < buttons.count(); ++i) {
+                QAbstractButton *pb = buttons.at(i);
+                int acc = pb->shortcut() & ~((int)Qt::MODIFIER_MASK|(int)Qt::UNICODE_ACCEL);
+                if (acc == key) {
+                    pb->animateClick();
+                    return;
+                }
+            }
+        }
+    }
+#endif
+    QDialog::keyPressEvent(e);
+}
+
+#ifdef Q_WS_WINCE
+/*!
+    \reimp
+*/
+void QMessageBox::setVisible(bool visible)
+{
+    Q_D(QMessageBox);
+    if (visible)
+        d->hideSpecial();
+    QDialog::setVisible(visible);
+}
+#endif
+
+
+/*!
+    \overload
+
+    Opens the dialog and connects its finished() or buttonClicked() signal to
+    the slot specified by \a receiver and \a member. If the slot in \a member
+    has a pointer for its first parameter the connection is to buttonClicked(),
+    otherwise the connection is to finished().
+
+    The signal will be disconnected from the slot when the dialog is closed.
+*/
+void QMessageBox::open(QObject *receiver, const char *member)
+{
+    Q_D(QMessageBox);
+    const char *signal = member && strchr(member, '*') ? SIGNAL(buttonClicked(QAbstractButton*))
+                                                       : SIGNAL(finished(int));
+    connect(this, signal, receiver, member);
+    d->signalToDisconnectOnClose = signal;
+    d->receiverToDisconnectOnClose = receiver;
+    d->memberToDisconnectOnClose = member;
+    QDialog::open();
+}
+
+/*!
+    \since 4.5
+
+    Returns a list of all the buttons that have been added to the message box.
+
+    \sa buttonRole(), addButton(), removeButton()
+*/
+QList<QAbstractButton *> QMessageBox::buttons() const
+{
+    Q_D(const QMessageBox);
+    return d->buttonBox->buttons();
+}
+
+/*!
+    \since 4.5
+
+    Returns the button role for the specified \a button. This function returns
+    \l InvalidRole if \a button is 0 or has not been added to the message box.
+
+    \sa buttons(), addButton()
+*/
+QMessageBox::ButtonRole QMessageBox::buttonRole(QAbstractButton *button) const
+{
+    Q_D(const QMessageBox);
+    return QMessageBox::ButtonRole(d->buttonBox->buttonRole(button));
+}
+
+/*!
+    \reimp
+*/
+void QMessageBox::showEvent(QShowEvent *e)
+{
+    Q_D(QMessageBox);
+    if (d->autoAddOkButton) {
+        addButton(Ok);
+#if defined(Q_WS_WINCE)
+        d->hideSpecial();
+#endif
+    }
+    if (d->detailsButton)
+        addButton(d->detailsButton, QMessageBox::ActionRole);
+    d->detectEscapeButton();
+    d->updateSize();
+
+#ifndef QT_NO_ACCESSIBILITY
+    QAccessible::updateAccessibility(this, 0, QAccessible::Alert);
+#endif
+#ifdef Q_WS_WIN
+    HMENU systemMenu = GetSystemMenu((HWND)winId(), FALSE);
+    if (!d->detectedEscapeButton) {
+        EnableMenuItem(systemMenu, SC_CLOSE, MF_BYCOMMAND|MF_GRAYED);
+    }
+    else {
+        EnableMenuItem(systemMenu, SC_CLOSE, MF_BYCOMMAND|MF_ENABLED);
+    }
+#endif
+    QDialog::showEvent(e);
+}
+
+
+static QMessageBox::StandardButton showNewMessageBox(QWidget *parent,
+    QMessageBox::Icon icon,
+    const QString& title, const QString& text,
+    QMessageBox::StandardButtons buttons,
+    QMessageBox::StandardButton defaultButton)
+{
+    // necessary for source compatibility with Qt 4.0 and 4.1
+    // handles (Yes, No) and (Yes|Default, No)
+    if (defaultButton && !(buttons & defaultButton))
+        return (QMessageBox::StandardButton)
+                    QMessageBoxPrivate::showOldMessageBox(parent, icon, title,
+                                                            text, int(buttons),
+                                                            int(defaultButton), 0);
+
+    QMessageBox msgBox(icon, title, text, QMessageBox::NoButton, parent);
+    QDialogButtonBox *buttonBox = msgBox.findChild<QDialogButtonBox*>();
+    Q_ASSERT(buttonBox != 0);
+
+    uint mask = QMessageBox::FirstButton;
+    while (mask <= QMessageBox::LastButton) {
+        uint sb = buttons & mask;
+        mask <<= 1;
+        if (!sb)
+            continue;
+        QPushButton *button = msgBox.addButton((QMessageBox::StandardButton)sb);
+        // Choose the first accept role as the default
+        if (msgBox.defaultButton())
+            continue;
+        if ((defaultButton == QMessageBox::NoButton && buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole)
+            || (defaultButton != QMessageBox::NoButton && sb == uint(defaultButton)))
+            msgBox.setDefaultButton(button);
+    }
+    if (msgBox.exec() == -1)
+        return QMessageBox::Cancel;
+    return msgBox.standardButton(msgBox.clickedButton());
+}
+
+/*!
+    \since 4.2
+
+    Opens an information message box with the given \a title and
+    \a text in front of the specified \a parent widget.
+
+    The standard \a buttons are added to the message box.
+    \a defaultButton specifies the button used when \key Enter is pressed.
+    \a defaultButton must refer to a button that was given in \a buttons.
+    If \a defaultButton is QMessageBox::NoButton, QMessageBox
+    chooses a suitable default automatically.
+
+    Returns the identity of the standard button that was clicked. If
+    \key Esc was pressed instead, the \l{Default and Escape Keys}
+    {escape button} is returned.
+
+    The message box is an \l{Qt::ApplicationModal}{application modal}
+    dialog box.
+
+    \warning Do not delete \a parent during the execution of the dialog.
+             If you want to do this, you should create the dialog
+             yourself using one of the QMessageBox constructors.
+
+    \sa question(), warning(), critical()
+*/
+QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QString &title,
+                               const QString& text, StandardButtons buttons,
+                               StandardButton defaultButton)
+{
+    return showNewMessageBox(parent, Information, title, text, buttons,
+                             defaultButton);
+}
+
+
+/*!
+    \since 4.2
+
+    Opens a question message box with the given \a title and \a
+    text in front of the specified \a parent widget.
+
+    The standard \a buttons are added to the message box. \a
+    defaultButton specifies the button used when \key Enter is
+    pressed. \a defaultButton must refer to a button that was given in \a buttons.
+    If \a defaultButton is QMessageBox::NoButton, QMessageBox
+    chooses a suitable default automatically.
+
+    Returns the identity of the standard button that was clicked. If
+    \key Esc was pressed instead, the \l{Default and Escape Keys}
+    {escape button} is returned.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+    \warning Do not delete \a parent during the execution of the dialog.
+             If you want to do this, you should create the dialog
+             yourself using one of the QMessageBox constructors.
+
+    \sa information(), warning(), critical()
+*/
+QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString &title,
+                            const QString& text, StandardButtons buttons,
+                            StandardButton defaultButton)
+{
+    return showNewMessageBox(parent, Question, title, text, buttons, defaultButton);
+}
+
+/*!
+    \since 4.2
+
+    Opens a warning message box with the given \a title and \a
+    text in front of the specified \a parent widget.
+
+    The standard \a buttons are added to the message box. \a
+    defaultButton specifies the button used when \key Enter is
+    pressed. \a defaultButton must refer to a button that was given in \a buttons.
+    If \a defaultButton is QMessageBox::NoButton, QMessageBox
+    chooses a suitable default automatically.
+
+    Returns the identity of the standard button that was clicked. If
+    \key Esc was pressed instead, the \l{Default and Escape Keys}
+    {escape button} is returned.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+    \warning Do not delete \a parent during the execution of the dialog.
+             If you want to do this, you should create the dialog
+             yourself using one of the QMessageBox constructors.
+
+    \sa question(), information(), critical()
+*/
+QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString &title,
+                        const QString& text, StandardButtons buttons,
+                        StandardButton defaultButton)
+{
+    return showNewMessageBox(parent, Warning, title, text, buttons, defaultButton);
+}
+
+/*!
+    \since 4.2
+
+    Opens a critical message box with the given \a title and \a
+    text in front of the specified \a parent widget.
+
+    The standard \a buttons are added to the message box. \a
+    defaultButton specifies the button used when \key Enter is
+    pressed. \a defaultButton must refer to a button that was given in \a buttons.
+    If \a defaultButton is QMessageBox::NoButton, QMessageBox
+    chooses a suitable default automatically.
+
+    Returns the identity of the standard button that was clicked. If
+    \key Esc was pressed instead, the \l{Default and Escape Keys}
+    {escape button} is returned.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+    \warning Do not delete \a parent during the execution of the dialog.
+             If you want to do this, you should create the dialog
+             yourself using one of the QMessageBox constructors.
+
+    \sa question(), warning(), information()
+*/
+QMessageBox::StandardButton QMessageBox::critical(QWidget *parent, const QString &title,
+                         const QString& text, StandardButtons buttons,
+                         StandardButton defaultButton)
+{
+    return showNewMessageBox(parent, Critical, title, text, buttons, defaultButton);
+}
+
+/*!
+    Displays a simple about box with title \a title and text \a
+    text. The about box's parent is \a parent.
+
+    about() looks for a suitable icon in four locations:
+
+    \list 1
+    \o It prefers \link QWidget::windowIcon() parent->icon() \endlink
+    if that exists.
+    \o If not, it tries the top-level widget containing \a parent.
+    \o If that fails, it tries the \link
+    QApplication::activeWindow() active window. \endlink
+    \o As a last resort it uses the Information icon.
+    \endlist
+
+    The about box has a single button labelled "OK". On Mac OS X, the
+    about box is popped up as a modeless window; on other platforms,
+    it is currently application modal.
+
+    \sa QWidget::windowIcon(), QApplication::activeWindow()
+*/
+void QMessageBox::about(QWidget *parent, const QString &title, const QString &text)
+{
+#ifdef Q_WS_MAC
+    static QPointer<QMessageBox> oldMsgBox;
+
+    if (oldMsgBox && oldMsgBox->text() == text) {
+        oldMsgBox->show();
+        oldMsgBox->raise();
+        oldMsgBox->activateWindow();
+        return;
+    }
+#endif
+
+    QMessageBox *msgBox = new QMessageBox(title, text, Information, 0, 0, 0, parent
+#ifdef Q_WS_MAC
+                                          , Qt::WindowTitleHint | Qt::WindowSystemMenuHint
+#endif
+    );
+    msgBox->setAttribute(Qt::WA_DeleteOnClose);
+    QIcon icon = msgBox->windowIcon();
+    QSize size = icon.actualSize(QSize(64, 64));
+    msgBox->setIconPixmap(icon.pixmap(size));
+
+    // should perhaps be a style hint
+#ifdef Q_WS_MAC
+    oldMsgBox = msgBox;
+#if 0
+    // ### doesn't work until close button is enabled in title bar
+    msgBox->d_func()->autoAddOkButton = false;
+#else
+    msgBox->d_func()->buttonBox->setCenterButtons(true);
+#endif
+    msgBox->show();
+#else
+    msgBox->exec();
+#endif
+}
+
+/*!
+    Displays a simple message box about Qt, with the given \a title
+    and centered over \a parent (if \a parent is not 0). The message
+    includes the version number of Qt being used by the application.
+
+    This is useful for inclusion in the \gui Help menu of an application,
+    as shown in the \l{mainwindows/menus}{Menus} example.
+
+    QApplication provides this functionality as a slot.
+
+    On Mac OS X, the about box is popped up as a modeless window; on
+    other platforms, it is currently application modal.
+
+    \sa QApplication::aboutQt()
+*/
+void QMessageBox::aboutQt(QWidget *parent, const QString &title)
+{
+#ifdef Q_WS_MAC
+    static QPointer<QMessageBox> oldMsgBox;
+
+    if (oldMsgBox) {
+        oldMsgBox->show();
+        oldMsgBox->raise();
+        oldMsgBox->activateWindow();
+        return;
+    }
+#endif
+
+    QString translatedTextAboutQtCaption;
+    translatedTextAboutQtCaption = QMessageBox::tr(
+        "<h3>About Qt</h3>"
+        "<p>This program uses Qt version %1.</p>"
+        ).arg(QLatin1String(QT_VERSION_STR));
+    QString translatedTextAboutQtText;
+    translatedTextAboutQtText = QMessageBox::tr(
+        "<p>Qt is a C++ toolkit for cross-platform application "
+        "development.</p>"
+        "<p>Qt provides single-source portability across all major desktop "
+        "operating systems. It is also available for embedded Linux and other "
+        "embedded and mobile operating systems.</p>"
+        "<p>Qt is available under three different licensing options designed "
+        "to accommodate the needs of our various users.</p>"
+        "<p>Qt licensed under our commercial license agreement is appropriate "
+        "for development of proprietary/commercial software where you do not "
+        "want to share any source code with third parties or otherwise cannot "
+        "comply with the terms of the GNU LGPL version 3 or GNU LGPL version 2.1.</p>"
+        "<p>Qt licensed under the GNU LGPL version 3 is appropriate for the "
+        "development of Qt&nbsp;applications provided you can comply with the terms "
+        "and conditions of the GNU LGPL version 3.</p>"
+        "<p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the "
+        "development of Qt&nbsp;applications provided you can comply with the terms "
+        "and conditions of the GNU LGPL version 2.1.</p>"
+        "<p>Please see <a href=\"http://%2/\">%2</a> "
+        "for an overview of Qt licensing.</p>"
+        "<p>Copyright (C) %1 The Qt Company Ltd and other "
+        "contributors.</p>"
+        "<p>Qt and the Qt logo are trademarks of The Qt Company Ltd.</p>"
+        "<p>Qt is The Qt Company Ltd product developed as an open source "
+        "project. See <a href=\"http://%3/\">%3</a> for more information.</p>"
+        ).arg(QLatin1String("2015"),
+              QLatin1String("qt.io/licensing"),
+              QLatin1String("qt.io"));
+    QMessageBox *msgBox = new QMessageBox(parent);
+    msgBox->setAttribute(Qt::WA_DeleteOnClose);
+    msgBox->setWindowTitle(title.isEmpty() ? tr("About Qt") : title);
+    msgBox->setText(translatedTextAboutQtCaption);
+    msgBox->setInformativeText(translatedTextAboutQtText);
+
+    QPixmap pm(QLatin1String(":/trolltech/qmessagebox/images/qtlogo-64.png"));
+    if (!pm.isNull())
+        msgBox->setIconPixmap(pm);
+#if defined(Q_WS_WINCE)
+    msgBox->setDefaultButton(msgBox->addButton(QMessageBox::Ok));
+#endif
+
+    // should perhaps be a style hint
+#ifdef Q_WS_MAC
+    oldMsgBox = msgBox;
+#if 0
+    // ### doesn't work until close button is enabled in title bar
+    msgBox->d_func()->autoAddOkButton = false;
+#else
+    msgBox->d_func()->buttonBox->setCenterButtons(true);
+#endif
+    msgBox->show();
+#else
+    msgBox->exec();
+#endif
+}
+
+/*!
+    \internal
+*/
+QSize QMessageBox::sizeHint() const
+{
+    // ### Qt 5: remove
+    return QDialog::sizeHint();
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Source and binary compatibility routines for 4.0 and 4.1
+
+static QMessageBox::StandardButton newButton(int button)
+{
+    // this is needed for source compatibility with Qt 4.0 and 4.1
+    if (button == QMessageBox::NoButton || (button & NewButtonMask))
+        return QMessageBox::StandardButton(button & QMessageBox::ButtonMask);
+
+#if QT_VERSION < 0x050000
+    // this is needed for binary compatibility with Qt 4.0 and 4.1
+    switch (button & Old_ButtonMask) {
+    case Old_Ok:
+        return QMessageBox::Ok;
+    case Old_Cancel:
+        return QMessageBox::Cancel;
+    case Old_Yes:
+        return QMessageBox::Yes;
+    case Old_No:
+        return QMessageBox::No;
+    case Old_Abort:
+        return QMessageBox::Abort;
+    case Old_Retry:
+        return QMessageBox::Retry;
+    case Old_Ignore:
+        return QMessageBox::Ignore;
+    case Old_YesAll:
+        return QMessageBox::YesToAll;
+    case Old_NoAll:
+        return QMessageBox::NoToAll;
+    default:
+        return QMessageBox::NoButton;
+    }
+#endif
+}
+
+static bool detectedCompat(int button0, int button1, int button2)
+{
+    if (button0 != 0 && !(button0 & NewButtonMask))
+        return true;
+    if (button1 != 0 && !(button1 & NewButtonMask))
+        return true;
+    if (button2 != 0 && !(button2 & NewButtonMask))
+        return true;
+    return false;
+}
+
+QAbstractButton *QMessageBoxPrivate::findButton(int button0, int button1, int button2, int flags)
+{
+    Q_Q(QMessageBox);
+    int button = 0;
+
+    if (button0 & flags) {
+        button = button0;
+    } else if (button1 & flags) {
+        button = button1;
+    } else if (button2 & flags) {
+        button = button2;
+    }
+    return q->button(newButton(button));
+}
+
+void QMessageBoxPrivate::addOldButtons(int button0, int button1, int button2)
+{
+    Q_Q(QMessageBox);
+    q->addButton(newButton(button0));
+    q->addButton(newButton(button1));
+    q->addButton(newButton(button2));
+    q->setDefaultButton(
+        static_cast<QPushButton *>(findButton(button0, button1, button2, QMessageBox::Default)));
+    q->setEscapeButton(findButton(button0, button1, button2, QMessageBox::Escape));
+    compatMode = detectedCompat(button0, button1, button2);
+}
+
+QAbstractButton *QMessageBoxPrivate::abstractButtonForId(int id) const
+{
+    Q_Q(const QMessageBox);
+    QAbstractButton *result = customButtonList.value(id);
+    if (result)
+        return result;
+    if (id & QMessageBox::FlagMask)    // for compatibility with Qt 4.0/4.1 (even if it is silly)
+        return 0;
+    return q->button(newButton(id));
+}
+
+int QMessageBoxPrivate::showOldMessageBox(QWidget *parent, QMessageBox::Icon icon,
+                                          const QString &title, const QString &text,
+                                          int button0, int button1, int button2)
+{
+    QMessageBox messageBox(icon, title, text, QMessageBox::NoButton, parent);
+    messageBox.d_func()->addOldButtons(button0, button1, button2);
+    return messageBox.exec();
+}
+
+int QMessageBoxPrivate::showOldMessageBox(QWidget *parent, QMessageBox::Icon icon,
+                                            const QString &title, const QString &text,
+                                            const QString &button0Text,
+                                            const QString &button1Text,
+                                            const QString &button2Text,
+                                            int defaultButtonNumber,
+                                            int escapeButtonNumber)
+{
+    QMessageBox messageBox(icon, title, text, QMessageBox::NoButton, parent);
+    QString myButton0Text = button0Text;
+    if (myButton0Text.isEmpty())
+        myButton0Text = QDialogButtonBox::tr("OK");
+    messageBox.addButton(myButton0Text, QMessageBox::ActionRole);
+    if (!button1Text.isEmpty())
+        messageBox.addButton(button1Text, QMessageBox::ActionRole);
+    if (!button2Text.isEmpty())
+        messageBox.addButton(button2Text, QMessageBox::ActionRole);
+
+    const QList<QAbstractButton *> &buttonList = messageBox.d_func()->customButtonList;
+    messageBox.setDefaultButton(static_cast<QPushButton *>(buttonList.value(defaultButtonNumber)));
+    messageBox.setEscapeButton(buttonList.value(escapeButtonNumber));
+
+    return messageBox.exec();
+}
+
+void QMessageBoxPrivate::retranslateStrings()
+{
+#ifndef QT_NO_TEXTEDIT
+    if (detailsButton)
+        detailsButton->setLabel(detailsText->isHidden() ? ShowLabel : HideLabel);
+#endif
+}
+
+/*!
+    \obsolete
+
+    Constructs a message box with a \a title, a \a text, an \a icon,
+    and up to three buttons.
+
+    The \a icon must be one of the following:
+    \list
+    \o QMessageBox::NoIcon
+    \o QMessageBox::Question
+    \o QMessageBox::Information
+    \o QMessageBox::Warning
+    \o QMessageBox::Critical
+    \endlist
+
+    Each button, \a button0, \a button1 and \a button2, can have one
+    of the following values:
+    \list
+    \o QMessageBox::NoButton
+    \o QMessageBox::Ok
+    \o QMessageBox::Cancel
+    \o QMessageBox::Yes
+    \o QMessageBox::No
+    \o QMessageBox::Abort
+    \o QMessageBox::Retry
+    \o QMessageBox::Ignore
+    \o QMessageBox::YesAll
+    \o QMessageBox::NoAll
+    \endlist
+
+    Use QMessageBox::NoButton for the later parameters to have fewer
+    than three buttons in your message box. If you don't specify any
+    buttons at all, QMessageBox will provide an Ok button.
+
+    One of the buttons can be OR-ed with the QMessageBox::Default
+    flag to make it the default button (clicked when Enter is
+    pressed).
+
+    One of the buttons can be OR-ed with the QMessageBox::Escape flag
+    to make it the cancel or close button (clicked when \key Esc is
+    pressed).
+
+    \snippet doc/src/snippets/dialogs/dialogs.cpp 2
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+    The \a parent and \a f arguments are passed to
+    the QDialog constructor.
+
+    \sa setWindowTitle(), setText(), setIcon()
+*/
+QMessageBox::QMessageBox(const QString &title, const QString &text, Icon icon,
+                         int button0, int button1, int button2, QWidget *parent,
+                         Qt::WindowFlags f)
+    : QDialog(*new QMessageBoxPrivate, parent,
+              f /*| Qt::MSWindowsFixedSizeDialogHint #### */| Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint)
+{
+    Q_D(QMessageBox);
+    d->init(title, text);
+    setIcon(icon);
+    d->addOldButtons(button0, button1, button2);
+}
+
+/*!
+    \obsolete
+
+    Opens an information message box with the given \a title and the
+    \a text. The dialog may have up to three buttons. Each of the
+    buttons, \a button0, \a button1 and \a button2 may be set to one
+    of the following values:
+
+    \list
+    \o QMessageBox::NoButton
+    \o QMessageBox::Ok
+    \o QMessageBox::Cancel
+    \o QMessageBox::Yes
+    \o QMessageBox::No
+    \o QMessageBox::Abort
+    \o QMessageBox::Retry
+    \o QMessageBox::Ignore
+    \o QMessageBox::YesAll
+    \o QMessageBox::NoAll
+    \endlist
+
+    If you don't want all three buttons, set the last button, or last
+    two buttons to QMessageBox::NoButton.
+
+    One button can be OR-ed with QMessageBox::Default, and one
+    button can be OR-ed with QMessageBox::Escape.
+
+    Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.)
+    of the button that was clicked.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QMessageBox constructors.
+
+    \sa question(), warning(), critical()
+*/
+int QMessageBox::information(QWidget *parent, const QString &title, const QString& text,
+                               int button0, int button1, int button2)
+{
+    return QMessageBoxPrivate::showOldMessageBox(parent, Information, title, text,
+                                                   button0, button1, button2);
+}
+
+/*!
+    \obsolete
+    \overload
+
+    Displays an information message box with the given \a title and
+    \a text, as well as one, two or three buttons. Returns the index
+    of the button that was clicked (0, 1 or 2).
+
+    \a button0Text is the text of the first button, and is optional.
+    If \a button0Text is not supplied, "OK" (translated) will be
+    used. \a button1Text is the text of the second button, and is
+    optional. \a button2Text is the text of the third button, and is
+    optional. \a defaultButtonNumber (0, 1 or 2) is the index of the
+    default button; pressing Return or Enter is the same as clicking
+    the default button. It defaults to 0 (the first button). \a
+    escapeButtonNumber is the index of the escape button; pressing
+    \key Esc is the same as clicking this button. It defaults to -1;
+    supply 0, 1 or 2 to make pressing \key Esc equivalent to clicking
+    the relevant button.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QMessageBox constructors.
+
+    \sa question(), warning(), critical()
+*/
+
+int QMessageBox::information(QWidget *parent, const QString &title, const QString& text,
+                               const QString& button0Text, const QString& button1Text,
+                               const QString& button2Text, int defaultButtonNumber,
+                               int escapeButtonNumber)
+{
+    return QMessageBoxPrivate::showOldMessageBox(parent, Information, title, text,
+                                                   button0Text, button1Text, button2Text,
+                                                   defaultButtonNumber, escapeButtonNumber);
+}
+
+/*!
+    \obsolete
+
+    Opens a question message box with the given \a title and \a text.
+    The dialog may have up to three buttons. Each of the buttons, \a
+    button0, \a button1 and \a button2 may be set to one of the
+    following values:
+
+    \list
+    \o QMessageBox::NoButton
+    \o QMessageBox::Ok
+    \o QMessageBox::Cancel
+    \o QMessageBox::Yes
+    \o QMessageBox::No
+    \o QMessageBox::Abort
+    \o QMessageBox::Retry
+    \o QMessageBox::Ignore
+    \o QMessageBox::YesAll
+    \o QMessageBox::NoAll
+    \endlist
+
+    If you don't want all three buttons, set the last button, or last
+    two buttons to QMessageBox::NoButton.
+
+    One button can be OR-ed with QMessageBox::Default, and one
+    button can be OR-ed with QMessageBox::Escape.
+
+    Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.)
+    of the button that was clicked.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QMessageBox constructors.
+
+    \sa information(), warning(), critical()
+*/
+int QMessageBox::question(QWidget *parent, const QString &title, const QString& text,
+                            int button0, int button1, int button2)
+{
+    return QMessageBoxPrivate::showOldMessageBox(parent, Question, title, text,
+                                                   button0, button1, button2);
+}
+
+/*!
+    \obsolete
+    \overload
+
+    Displays a question message box with the given \a title and \a
+    text, as well as one, two or three buttons. Returns the index of
+    the button that was clicked (0, 1 or 2).
+
+    \a button0Text is the text of the first button, and is optional.
+    If \a button0Text is not supplied, "OK" (translated) will be used.
+    \a button1Text is the text of the second button, and is optional.
+    \a button2Text is the text of the third button, and is optional.
+    \a defaultButtonNumber (0, 1 or 2) is the index of the default
+    button; pressing Return or Enter is the same as clicking the
+    default button. It defaults to 0 (the first button). \a
+    escapeButtonNumber is the index of the Escape button; pressing
+    Escape is the same as clicking this button. It defaults to -1;
+    supply 0, 1 or 2 to make pressing Escape equivalent to clicking
+    the relevant button.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QMessageBox constructors.
+
+    \sa information(), warning(), critical()
+*/
+int QMessageBox::question(QWidget *parent, const QString &title, const QString& text,
+                            const QString& button0Text, const QString& button1Text,
+                            const QString& button2Text, int defaultButtonNumber,
+                            int escapeButtonNumber)
+{
+    return QMessageBoxPrivate::showOldMessageBox(parent, Question, title, text,
+                                                   button0Text, button1Text, button2Text,
+                                                   defaultButtonNumber, escapeButtonNumber);
+}
+
+
+/*!
+    \obsolete
+
+    Opens a warning message box with the given \a title and \a text.
+    The dialog may have up to three buttons. Each of the button
+    parameters, \a button0, \a button1 and \a button2 may be set to
+    one of the following values:
+
+    \list
+    \o QMessageBox::NoButton
+    \o QMessageBox::Ok
+    \o QMessageBox::Cancel
+    \o QMessageBox::Yes
+    \o QMessageBox::No
+    \o QMessageBox::Abort
+    \o QMessageBox::Retry
+    \o QMessageBox::Ignore
+    \o QMessageBox::YesAll
+    \o QMessageBox::NoAll
+    \endlist
+
+    If you don't want all three buttons, set the last button, or last
+    two buttons to QMessageBox::NoButton.
+
+    One button can be OR-ed with QMessageBox::Default, and one
+    button can be OR-ed with QMessageBox::Escape.
+
+    Returns the identity (QMessageBox::Ok or QMessageBox::No or ...)
+    of the button that was clicked.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QMessageBox constructors.
+
+    \sa information(), question(), critical()
+*/
+int QMessageBox::warning(QWidget *parent, const QString &title, const QString& text,
+                           int button0, int button1, int button2)
+{
+    return QMessageBoxPrivate::showOldMessageBox(parent, Warning, title, text,
+                                                   button0, button1, button2);
+}
+
+/*!
+    \obsolete
+    \overload
+
+    Displays a warning message box with the given \a title and \a
+    text, as well as one, two, or three buttons. Returns the number
+    of the button that was clicked (0, 1, or 2).
+
+    \a button0Text is the text of the first button, and is optional.
+    If \a button0Text is not supplied, "OK" (translated) will be used.
+    \a button1Text is the text of the second button, and is optional,
+    and \a button2Text is the text of the third button, and is
+    optional. \a defaultButtonNumber (0, 1 or 2) is the index of the
+    default button; pressing Return or Enter is the same as clicking
+    the default button. It defaults to 0 (the first button). \a
+    escapeButtonNumber is the index of the Escape button; pressing
+    Escape is the same as clicking this button. It defaults to -1;
+    supply 0, 1, or 2 to make pressing Escape equivalent to clicking
+    the relevant button.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QMessageBox constructors.
+
+    \sa information(), question(), critical()
+*/
+int QMessageBox::warning(QWidget *parent, const QString &title, const QString& text,
+                           const QString& button0Text, const QString& button1Text,
+                           const QString& button2Text, int defaultButtonNumber,
+                           int escapeButtonNumber)
+{
+    return QMessageBoxPrivate::showOldMessageBox(parent, Warning, title, text,
+                                                   button0Text, button1Text, button2Text,
+                                                   defaultButtonNumber, escapeButtonNumber);
+}
+
+/*!
+    \obsolete
+
+    Opens a critical message box with the given \a title and \a text.
+    The dialog may have up to three buttons. Each of the button
+    parameters, \a button0, \a button1 and \a button2 may be set to
+    one of the following values:
+
+    \list
+    \o QMessageBox::NoButton
+    \o QMessageBox::Ok
+    \o QMessageBox::Cancel
+    \o QMessageBox::Yes
+    \o QMessageBox::No
+    \o QMessageBox::Abort
+    \o QMessageBox::Retry
+    \o QMessageBox::Ignore
+    \o QMessageBox::YesAll
+    \o QMessageBox::NoAll
+    \endlist
+
+    If you don't want all three buttons, set the last button, or last
+    two buttons to QMessageBox::NoButton.
+
+    One button can be OR-ed with QMessageBox::Default, and one
+    button can be OR-ed with QMessageBox::Escape.
+
+    Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.)
+    of the button that was clicked.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QMessageBox constructors.
+
+    \sa information(), question(), warning()
+*/
+
+int QMessageBox::critical(QWidget *parent, const QString &title, const QString& text,
+                          int button0, int button1, int button2)
+{
+    return QMessageBoxPrivate::showOldMessageBox(parent, Critical, title, text,
+                                                 button0, button1, button2);
+}
+
+/*!
+    \obsolete
+    \overload
+
+    Displays a critical error message box with the given \a title and
+    \a text, as well as one, two, or three buttons. Returns the
+    number of the button that was clicked (0, 1 or 2).
+
+    \a button0Text is the text of the first button, and is optional.
+    If \a button0Text is not supplied, "OK" (translated) will be used.
+    \a button1Text is the text of the second button, and is optional,
+    and \a button2Text is the text of the third button, and is
+    optional. \a defaultButtonNumber (0, 1 or 2) is the index of the
+    default button; pressing Return or Enter is the same as clicking
+    the default button. It defaults to 0 (the first button). \a
+    escapeButtonNumber is the index of the Escape button; pressing
+    Escape is the same as clicking this button. It defaults to -1;
+    supply 0, 1, or 2 to make pressing Escape equivalent to clicking
+    the relevant button.
+
+    The message box is an \l{Qt::ApplicationModal} {application modal}
+    dialog box.
+
+  \warning Do not delete \a parent during the execution of the dialog.
+           If you want to do this, you should create the dialog
+           yourself using one of the QMessageBox constructors.
+
+    \sa information(), question(), warning()
+*/
+int QMessageBox::critical(QWidget *parent, const QString &title, const QString& text,
+                            const QString& button0Text, const QString& button1Text,
+                            const QString& button2Text, int defaultButtonNumber,
+                            int escapeButtonNumber)
+{
+    return QMessageBoxPrivate::showOldMessageBox(parent, Critical, title, text,
+                                                   button0Text, button1Text, button2Text,
+                                                   defaultButtonNumber, escapeButtonNumber);
+}
+
+
+/*!
+    \obsolete
+
+    Returns the text of the message box button \a button, or
+    an empty string if the message box does not contain the button.
+
+    Use button() and QPushButton::text() instead.
+*/
+QString QMessageBox::buttonText(int button) const
+{
+    Q_D(const QMessageBox);
+
+    if (QAbstractButton *abstractButton = d->abstractButtonForId(button)) {
+        return abstractButton->text();
+    } else if (d->buttonBox->buttons().isEmpty() && (button == Ok || button == Old_Ok)) {
+        // for compatibility with Qt 4.0/4.1
+        return QDialogButtonBox::tr("OK");
+    }
+    return QString();
+}
+
+/*!
+    \obsolete
+
+    Sets the text of the message box button \a button to \a text.
+    Setting the text of a button that is not in the message box is
+    silently ignored.
+
+    Use addButton() instead.
+*/
+void QMessageBox::setButtonText(int button, const QString &text)
+{
+    Q_D(QMessageBox);
+    if (QAbstractButton *abstractButton = d->abstractButtonForId(button)) {
+        abstractButton->setText(text);
+    } else if (d->buttonBox->buttons().isEmpty() && (button == Ok || button == Old_Ok)) {
+        // for compatibility with Qt 4.0/4.1
+        addButton(QMessageBox::Ok)->setText(text);
+    }
+}
+
+#ifndef QT_NO_TEXTEDIT
+/*!
+  \property QMessageBox::detailedText
+  \brief the text to be displayed in the details area.
+  \since 4.2
+
+  The text will be interpreted as a plain text.
+
+  By default, this property contains an empty string.
+
+  \sa QMessageBox::text, QMessageBox::informativeText
+*/
+QString QMessageBox::detailedText() const
+{
+    Q_D(const QMessageBox);
+    return d->detailsText ? d->detailsText->text() : QString();
+}
+
+void QMessageBox::setDetailedText(const QString &text)
+{
+    Q_D(QMessageBox);
+    if (text.isEmpty()) {
+        delete d->detailsText;
+        d->detailsText = 0;
+        removeButton(d->detailsButton);
+        delete d->detailsButton;
+        d->detailsButton = 0;
+        return;
+    }
+
+    if (!d->detailsText) {
+        d->detailsText = new QMessageBoxDetailsText(this);
+        QGridLayout* grid = qobject_cast<QGridLayout*>(layout());
+        if (grid)
+            grid->addWidget(d->detailsText, grid->rowCount(), 0, 1, grid->columnCount());
+        d->detailsText->hide();
+    }
+    if (!d->detailsButton)
+        d->detailsButton = new DetailButton(this);
+    d->detailsText->setText(text);
+}
+#endif // QT_NO_TEXTEDIT
+
+/*!
+  \property QMessageBox::informativeText
+
+  \brief the informative text that provides a fuller description for
+  the message
+
+  \since 4.2
+
+  Infromative text can be used to expand upon the text() to give more
+  information to the user. On the Mac, this text appears in small
+  system font below the text().  On other platforms, it is simply
+  appended to the existing text.
+
+  By default, this property contains an empty string.
+
+  \sa QMessageBox::text, QMessageBox::detailedText
+*/
+QString QMessageBox::informativeText() const
+{
+    Q_D(const QMessageBox);
+    return d->informativeLabel ? d->informativeLabel->text() : QString();
+}
+
+void QMessageBox::setInformativeText(const QString &text)
+{
+    Q_D(QMessageBox);
+    if (text.isEmpty()) {
+        layout()->removeWidget(d->informativeLabel);
+        delete d->informativeLabel;
+        d->informativeLabel = 0;
+#ifndef Q_WS_MAC
+        d->label->setContentsMargins(2, 0, 0, 0);
+#endif
+        d->updateSize();
+        return;
+    }
+
+    if (!d->informativeLabel) {
+        QLabel *label = new QLabel(this);
+        label->setObjectName(QLatin1String("qt_msgbox_informativelabel"));
+        label->setTextInteractionFlags(Qt::TextInteractionFlags(style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, this)));
+        label->setAlignment(Qt::AlignTop | Qt::AlignLeft);
+        label->setOpenExternalLinks(true);
+        label->setWordWrap(true);
+#ifndef Q_WS_MAC
+        d->label->setContentsMargins(2, 0, 0, 0);
+        label->setContentsMargins(2, 0, 0, 6);
+        label->setIndent(9);
+#else
+        label->setContentsMargins(16, 0, 0, 0);
+        // apply a smaller font the information label on the mac
+        label->setFont(qt_app_fonts_hash()->value("QTipLabel"));
+#endif
+        label->setWordWrap(true);
+        QGridLayout *grid = static_cast<QGridLayout *>(layout());
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+        label->hide();
+        QTextBrowser *textBrowser = new QTextBrowser(this);
+        textBrowser->setOpenExternalLinks(true);
+#if defined(Q_OS_SYMBIAN)
+        const int preferredTextColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 0 : 1;
+#else
+        const int preferredTextColumn = 1;
+#endif
+        grid->addWidget(textBrowser, 1, preferredTextColumn, 1, 1);
+        d->textBrowser = textBrowser;
+#else
+        grid->addWidget(label, 1, 1, 1, 1);
+#endif
+        d->informativeLabel = label;
+    }
+    d->informativeLabel->setText(text);
+
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+    //We need to put the informative label inside textBrowser to enable scrolling of long texts.
+    d->textBrowser->setText(d->informativeLabel->text());
+#endif
+
+    d->updateSize();
+}
+
+/*!
+    \since 4.2
+
+    This function shadows QWidget::setWindowTitle().
+
+    Sets the title of the message box to \a title. On Mac OS X,
+    the window title is ignored (as required by the Mac OS X
+    Guidelines).
+*/
+void QMessageBox::setWindowTitle(const QString &title)
+{
+    // Message boxes on the mac do not have a title
+#ifndef Q_WS_MAC
+    QDialog::setWindowTitle(title);
+#else
+    Q_UNUSED(title);
+#endif
+}
+
+
+/*!
+    \since 4.2
+
+    This function shadows QWidget::setWindowModality().
+
+    Sets the modality of the message box to \a windowModality.
+
+    On Mac OS X, if the modality is set to Qt::WindowModal and the message box
+    has a parent, then the message box will be a Qt::Sheet, otherwise the
+    message box will be a standard dialog.
+*/
+void QMessageBox::setWindowModality(Qt::WindowModality windowModality)
+{
+    QDialog::setWindowModality(windowModality);
+
+    if (parentWidget() && windowModality == Qt::WindowModal)
+        setParent(parentWidget(), Qt::Sheet);
+    else
+        setParent(parentWidget(), Qt::Dialog);
+    setDefaultButton(d_func()->defaultButton);
+}
+
+#ifdef QT3_SUPPORT
+/*!
+    \compat
+
+    Constructs a message box with the given \a parent, \a name, and
+    window flags, \a f.
+    The window title is specified by \a title, and the message box
+    displays message text and an icon specified by \a text and \a icon.
+
+    The buttons that the user can access to respond to the message are
+    defined by \a button0, \a button1, and \a button2.
+*/
+QMessageBox::QMessageBox(const QString& title,
+                         const QString &text, Icon icon,
+                         int button0, int button1, int button2,
+                         QWidget *parent, const char *name,
+                         bool modal, Qt::WindowFlags f)
+    : QDialog(*new QMessageBoxPrivate, parent,
+              f | Qt::WStyle_Customize | Qt::WStyle_DialogBorder | Qt::WStyle_Title | Qt::WStyle_SysMenu | Qt::WindowCloseButtonHint)
+{
+    Q_D(QMessageBox);
+    setObjectName(QString::fromAscii(name));
+    d->init(title, text);
+    d->addOldButtons(button0, button1, button2);
+    setModal(modal);
+    setIcon(icon);
+}
+
+/*!
+    \compat
+    Constructs a message box with the given \a parent and \a name.
+*/
+QMessageBox::QMessageBox(QWidget *parent, const char *name)
+    : QDialog(*new QMessageBoxPrivate, parent,
+              Qt::WStyle_Customize | Qt::WStyle_DialogBorder | Qt::WStyle_Title | Qt::WStyle_SysMenu | Qt::WindowCloseButtonHint)
+{
+    Q_D(QMessageBox);
+    setObjectName(QString::fromAscii(name));
+    d->init();
+}
+
+/*!
+  Returns the pixmap used for a standard icon. This
+  allows the pixmaps to be used in more complex message boxes.
+  \a icon specifies the required icon, e.g. QMessageBox::Information,
+  QMessageBox::Warning or QMessageBox::Critical.
+
+  \a style is unused.
+*/
+
+QPixmap QMessageBox::standardIcon(Icon icon, Qt::GUIStyle style)
+{
+    Q_UNUSED(style);
+    return QMessageBox::standardIcon(icon);
+}
+
+/*!
+    \fn int QMessageBox::message(const QString &title, const QString &text,
+                                 const QString &buttonText, QWidget *parent = 0,
+                                 const char *name = 0)
+
+    Opens a modal message box with the given \a title and showing the
+    given \a text. The message box has a single button which has the
+    given \a buttonText (or tr("OK")). The message box is centred over
+    its \a parent and is called \a name.
+
+    Use information(), warning(), question(), or critical() instead.
+
+    \oldcode
+        QMessageBox::message(tr("My App"), tr("All occurrences replaced."),
+                             tr("Close"), this);
+    \newcode
+        QMessageBox::information(this, tr("My App"),
+                                 tr("All occurrences replaced."),
+                                 QMessageBox::Close);
+    \endcode
+*/
+
+/*!
+    \fn bool QMessageBox::query(const QString &caption,
+                                const QString& text,
+                                const QString& yesButtonText,
+                                const QString& noButtonText,
+                                QWidget *parent, const char *name)
+
+    \obsolete
+
+    Queries the user using a modal message box with up to two buttons.
+    The message box has the given \a caption (although some window
+    managers don't show it), and shows the given \a text. The left
+    button has the \a yesButtonText (or tr("OK")), and the right button
+    has the \a noButtonText (or isn't shown). The message box is centred
+    over its \a parent and is called \a name.
+
+    Use information(), question(), warning(), or critical() instead.
+*/
+
+#endif
+
+QPixmap QMessageBoxPrivate::standardIcon(QMessageBox::Icon icon, QMessageBox *mb)
+{
+    QStyle *style = mb ? mb->style() : QApplication::style();
+    int iconSize = style->pixelMetric(QStyle::PM_MessageBoxIconSize, 0, mb);
+    QIcon tmpIcon;
+    switch (icon) {
+    case QMessageBox::Information:
+        tmpIcon = style->standardIcon(QStyle::SP_MessageBoxInformation, 0, mb);
+        break;
+    case QMessageBox::Warning:
+        tmpIcon = style->standardIcon(QStyle::SP_MessageBoxWarning, 0, mb);
+        break;
+    case QMessageBox::Critical:
+        tmpIcon = style->standardIcon(QStyle::SP_MessageBoxCritical, 0, mb);
+        break;
+    case QMessageBox::Question:
+        tmpIcon = style->standardIcon(QStyle::SP_MessageBoxQuestion, 0, mb);
+    default:
+        break;
+    }
+    if (!tmpIcon.isNull())
+        return tmpIcon.pixmap(iconSize, iconSize);
+    return QPixmap();
+}
+
+/*!
+    \obsolete
+
+    Returns the pixmap used for a standard icon. This allows the
+    pixmaps to be used in more complex message boxes. \a icon
+    specifies the required icon, e.g. QMessageBox::Question,
+    QMessageBox::Information, QMessageBox::Warning or
+    QMessageBox::Critical.
+
+    Call QStyle::standardIcon() with QStyle::SP_MessageBoxInformation etc.
+    instead.
+*/
+
+QPixmap QMessageBox::standardIcon(Icon icon)
+{
+    return QMessageBoxPrivate::standardIcon(icon, 0);
+}
+
+/*!
+    \typedef QMessageBox::Button
+    \obsolete
+
+    Use QMessageBox::StandardButton instead.
+*/
+
+/*!
+    \fn int QMessageBox::information(QWidget *parent, const QString &title,
+                                     const QString& text, StandardButton button0,
+                                     StandardButton button1)
+    \fn int QMessageBox::warning(QWidget *parent, const QString &title,
+                                 const QString& text, StandardButton button0,
+                                 StandardButton button1)
+    \fn int QMessageBox::critical(QWidget *parent, const QString &title,
+                                  const QString& text, StandardButton button0,
+                                  StandardButton button1)
+    \fn int QMessageBox::question(QWidget *parent, const QString &title,
+                                  const QString& text, StandardButton button0,
+                                  StandardButton button1)
+    \internal
+
+    ### Needed for Qt 4 source compatibility
+*/
+
+/*!
+  \fn int QMessageBox::exec()
+
+  Shows the message box as a \l{QDialog#Modal Dialogs}{modal dialog},
+  blocking until the user closes it.
+
+  When using a QMessageBox with standard buttons, this functions returns a
+  \l StandardButton value indicating the standard button that was clicked.
+  When using QMessageBox with custom buttons, this function returns an
+  opaque value; use clickedButton() to determine which button was clicked.
+
+  \note The result() function returns also \l StandardButton value instead of \l QDialog::DialogCode
+
+  Users cannot interact with any other window in the same
+  application until they close the dialog, either by clicking a
+  button or by using a mechanism provided by the window system.
+
+  \sa show(), result()
+*/
+
+QT_END_NAMESPACE
+
+#include "moc_qmessagebox.cpp"
+
+#endif // QT_NO_MESSAGEBOX
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qpagesetupdialog.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,240 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <private/qabstractpagesetupdialog_p.h>
+
+#ifndef QT_NO_PRINTDIALOG
+
+QT_BEGIN_NAMESPACE
+
+/*!
+    \class QPageSetupDialog
+
+    \brief The QPageSetupDialog class provides a configuration dialog
+    for the page-related options on a printer.
+
+    \ingroup standard-dialogs
+    \ingroup printing
+
+    On Windows and Mac OS X the page setup dialog is implemented using
+    the native page setup dialogs.
+
+    Note that on Windows and Mac OS X custom paper sizes won't be
+    reflected in the native page setup dialogs. Additionally, custom
+    page margins set on a QPrinter won't show in the native Mac OS X
+    page setup dialog.
+
+    In Symbian, there is no support for printing. Hence, this dialog should not
+    be used in Symbian.
+
+    \sa QPrinter, QPrintDialog
+*/
+
+
+/*!
+    \fn QPageSetupDialog::QPageSetupDialog(QPrinter *printer, QWidget *parent)
+
+    Constructs a page setup dialog that configures \a printer with \a
+    parent as the parent widget.
+*/
+
+/*!
+    \since 4.5
+
+    \fn QPageSetupDialog::QPageSetupDialog(QWidget *parent)
+
+    Constructs a page setup dialog that configures a default-constructed
+    QPrinter with \a parent as the parent widget.
+
+    \sa printer()
+*/
+
+/*!
+    \fn QPrinter *QPageSetupDialog::printer()
+
+    Returns the printer that was passed to the QPageSetupDialog
+    constructor.
+*/
+
+// hack
+class QPageSetupDialogPrivate : public QAbstractPageSetupDialogPrivate
+{
+};
+
+/*!
+    \enum QPageSetupDialog::PageSetupDialogOption
+    \since 4.4
+
+    Used to specify options to the page setup dialog
+
+    This value is obsolete and does nothing since Qt 4.5:
+
+    \value DontUseSheet In previous versions of QDialog::exec() the
+    page setup dialog would create a sheet by default if the dialog
+    was given a parent.  This is no longer supported from Qt 4.5.  If
+    you want to use sheets, use QPageSetupDialog::open() instead.
+
+    \omitvalue None
+    \omitvalue OwnsPrinter
+*/
+
+/*!
+    Sets the given \a option to be enabled if \a on is true;
+    otherwise, clears the given \a option.
+
+    \sa options, testOption()
+*/
+void QPageSetupDialog::setOption(PageSetupDialogOption option, bool on)
+{
+    Q_D(QPageSetupDialog);
+    if (!(d->opts & option) != !on)
+        setOptions(d->opts ^ option);
+}
+
+/*!
+    Returns true if the given \a option is enabled; otherwise, returns
+    false.
+
+    \sa options, setOption()
+*/
+bool QPageSetupDialog::testOption(PageSetupDialogOption option) const
+{
+    Q_D(const QPageSetupDialog);
+    return (d->opts & option) != 0;
+}
+
+/*!
+    \property QPageSetupDialog::options
+    \brief the various options that affect the look and feel of the dialog
+    \since 4.5
+
+    By default, all options are disabled.
+
+    Options should be set before showing the dialog. Setting them while the
+    dialog is visible is not guaranteed to have an immediate effect on the
+    dialog (depending on the option and on the platform).
+
+    \sa setOption(), testOption()
+*/
+void QPageSetupDialog::setOptions(PageSetupDialogOptions options)
+{
+    Q_D(QPageSetupDialog);
+
+    PageSetupDialogOptions changed = (options ^ d->opts);
+    if (!changed)
+        return;
+
+    d->opts = options;
+}
+
+QPageSetupDialog::PageSetupDialogOptions QPageSetupDialog::options() const
+{
+    Q_D(const QPageSetupDialog);
+    return d->opts;
+}
+
+/*!
+    \obsolete
+
+    Use setOption(\a option, true) instead.
+*/
+void QPageSetupDialog::addEnabledOption(PageSetupDialogOption option)
+{
+    setOption(option, true);
+}
+
+/*!
+    \obsolete
+
+    Use setOptions(\a options) instead.
+*/
+void QPageSetupDialog::setEnabledOptions(PageSetupDialogOptions options)
+{
+    setOptions(options);
+}
+
+/*!
+    \obsolete
+
+    Use options() instead.
+*/
+QPageSetupDialog::PageSetupDialogOptions QPageSetupDialog::enabledOptions() const
+{
+    return options();
+}
+
+/*!
+    \obsolete
+
+    Use testOption(\a option) instead.
+*/
+bool QPageSetupDialog::isOptionEnabled(PageSetupDialogOption option) const
+{
+    return testOption(option);
+}
+
+/*!
+    \overload
+    \since 4.5
+
+    Opens the dialog and connects its accepted() signal to the slot specified
+    by \a receiver and \a member.
+
+    The signal will be disconnected from the slot when the dialog is closed.
+*/
+void QPageSetupDialog::open(QObject *receiver, const char *member)
+{
+    Q_D(QPageSetupDialog);
+    connect(this, SIGNAL(accepted()), receiver, member);
+    d->receiverToDisconnectOnClose = receiver;
+    d->memberToDisconnectOnClose = member;
+    QDialog::open();
+}
+
+#if defined(Q_WS_MAC) || defined(Q_OS_WIN)
+/*! \fn void QPageSetupDialog::setVisible(bool visible)
+    \reimp
+*/
+#endif
+
+QT_END_NAMESPACE
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qpagesetupdialog_unix.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,620 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qpagesetupdialog.h"
+
+#ifndef QT_NO_PRINTDIALOG
+#include "qpagesetupdialog_unix_p.h"
+
+#include "qpainter.h"
+#include "qprintdialog.h"
+#include "qdialogbuttonbox.h"
+#include <ui_qpagesetupwidget.h>
+
+#include <QtGui/qprinter.h>
+#include <private/qabstractpagesetupdialog_p.h>
+#include <private/qprinter_p.h>
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+#  include <private/qcups_p.h>
+#  include <cups/cups.h>
+#  include <private/qpdf_p.h>
+#endif
+
+
+QT_BEGIN_NAMESPACE
+
+QSizeF qt_printerPaperSize(QPrinter::Orientation, QPrinter::PaperSize, QPrinter::Unit, int);
+
+// Disabled until we have support for papersources on unix
+// #define PSD_ENABLE_PAPERSOURCE
+
+static void populatePaperSizes(QComboBox* cb)
+{
+    cb->addItem(QPrintDialog::tr("A0"), QPrinter::A0);
+    cb->addItem(QPrintDialog::tr("A1"), QPrinter::A1);
+    cb->addItem(QPrintDialog::tr("A2"), QPrinter::A2);
+    cb->addItem(QPrintDialog::tr("A3"), QPrinter::A3);
+    cb->addItem(QPrintDialog::tr("A4"), QPrinter::A4);
+    cb->addItem(QPrintDialog::tr("A5"), QPrinter::A5);
+    cb->addItem(QPrintDialog::tr("A6"), QPrinter::A6);
+    cb->addItem(QPrintDialog::tr("A7"), QPrinter::A7);
+    cb->addItem(QPrintDialog::tr("A8"), QPrinter::A8);
+    cb->addItem(QPrintDialog::tr("A9"), QPrinter::A9);
+    cb->addItem(QPrintDialog::tr("B0"), QPrinter::B0);
+    cb->addItem(QPrintDialog::tr("B1"), QPrinter::B1);
+    cb->addItem(QPrintDialog::tr("B2"), QPrinter::B2);
+    cb->addItem(QPrintDialog::tr("B3"), QPrinter::B3);
+    cb->addItem(QPrintDialog::tr("B4"), QPrinter::B4);
+    cb->addItem(QPrintDialog::tr("B5"), QPrinter::B5);
+    cb->addItem(QPrintDialog::tr("B6"), QPrinter::B6);
+    cb->addItem(QPrintDialog::tr("B7"), QPrinter::B7);
+    cb->addItem(QPrintDialog::tr("B8"), QPrinter::B8);
+    cb->addItem(QPrintDialog::tr("B9"), QPrinter::B9);
+    cb->addItem(QPrintDialog::tr("B10"), QPrinter::B10);
+    cb->addItem(QPrintDialog::tr("C5E"), QPrinter::C5E);
+    cb->addItem(QPrintDialog::tr("DLE"), QPrinter::DLE);
+    cb->addItem(QPrintDialog::tr("Executive"), QPrinter::Executive);
+    cb->addItem(QPrintDialog::tr("Folio"), QPrinter::Folio);
+    cb->addItem(QPrintDialog::tr("Ledger"), QPrinter::Ledger);
+    cb->addItem(QPrintDialog::tr("Legal"), QPrinter::Legal);
+    cb->addItem(QPrintDialog::tr("Letter"), QPrinter::Letter);
+    cb->addItem(QPrintDialog::tr("Tabloid"), QPrinter::Tabloid);
+    cb->addItem(QPrintDialog::tr("US Common #10 Envelope"), QPrinter::Comm10E);
+    cb->addItem(QPrintDialog::tr("Custom"), QPrinter::Custom);
+}
+
+
+static QSizeF sizeForOrientation(QPrinter::Orientation orientation, const QSizeF &size)
+{
+    return (orientation == QPrinter::Portrait) ? size : QSizeF(size.height(), size.width());
+}
+
+#ifdef PSD_ENABLE_PAPERSOURCE
+static const char *paperSourceNames[] = {
+    "Only One",
+    "Lower",
+    "Middle",
+    "Manual",
+    "Envelope",
+    "Envelope manual",
+    "Auto",
+    "Tractor",
+    "Small format",
+    "Large format",
+    "Large capacity",
+    "Cassette",
+    "Form source",
+    0
+};
+
+struct PaperSourceNames
+{
+    PaperSourceNames(const char *nam, QPrinter::PaperSource ps)
+        : paperSource(ps), name(nam) {}
+    QPrinter::PaperSource paperSource;
+    const char *name;
+};
+#endif
+
+
+class QPagePreview : public QWidget
+{
+public:
+    QPagePreview(QWidget *parent) : QWidget(parent)
+    {
+        setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+        setMinimumSize(50, 50);
+    }
+
+    void setPaperSize(const QSizeF& size)
+    {
+        m_size = size;
+        update();
+    }
+
+    void setMargins(qreal left, qreal top, qreal right, qreal bottom)
+    {
+        m_left = left;
+        m_top = top;
+        m_right = right;
+        m_bottom = bottom;
+        update();
+    }
+
+protected:
+    void paintEvent(QPaintEvent *)
+    {
+        QRect pageRect;
+        QSizeF adjustedSize(m_size);
+        adjustedSize.scale(width()-10, height()-10, Qt::KeepAspectRatio);
+        pageRect = QRect(QPoint(0,0), adjustedSize.toSize());
+        pageRect.moveCenter(rect().center());
+
+        qreal width_factor = pageRect.width() / m_size.width();
+        qreal height_factor = pageRect.height() / m_size.height();
+        int leftSize = qRound(m_left*width_factor);
+        int topSize = qRound(m_top*height_factor);
+        int rightSize = qRound(m_right*width_factor);
+        int bottomSize = qRound(m_bottom * height_factor);
+        QRect marginRect(pageRect.x()+leftSize,
+                         pageRect.y()+topSize,
+                         pageRect.width() - (leftSize+rightSize+1),
+                         pageRect.height() - (topSize+bottomSize+1));
+
+        QPainter p(this);
+        QColor shadow(palette().mid().color());
+        for (int i=1; i<6; ++i) {
+            shadow.setAlpha(180-i*30);
+            QRect offset(pageRect.adjusted(i, i, i, i));
+            p.setPen(shadow);
+            p.drawLine(offset.left(), offset.bottom(), offset.right(), offset.bottom());
+            p.drawLine(offset.right(), offset.top(), offset.right(), offset.bottom()-1);
+        }
+        p.fillRect(pageRect, palette().light());
+
+        if (marginRect.isValid()) {
+            p.setPen(QPen(palette().color(QPalette::Dark), 0, Qt::DotLine));
+            p.drawRect(marginRect);
+
+            marginRect.adjust(2, 2, -1, -1);
+            p.setClipRect(marginRect);
+            QFont font;
+            font.setPointSizeF(font.pointSizeF()*0.25);
+            p.setFont(font);
+            p.setPen(palette().color(QPalette::Dark));
+            QString text(QLatin1String("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi."));
+            for (int i=0; i<3; ++i)
+                text += text;
+            p.drawText(marginRect, Qt::TextWordWrap|Qt::AlignVCenter, text);
+        }
+    }
+
+private:
+    // all these are in points
+    qreal m_left, m_top, m_right, m_bottom;
+    QSizeF m_size;
+};
+
+
+class QPageSetupDialogPrivate : public QAbstractPageSetupDialogPrivate
+{
+    Q_DECLARE_PUBLIC(QPageSetupDialog)
+
+public:
+    ~QPageSetupDialogPrivate();
+    void init();
+
+    QPageSetupWidget *widget;
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    QCUPSSupport *cups;
+#endif
+};
+
+QPageSetupDialogPrivate::~QPageSetupDialogPrivate()
+{
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    delete cups;
+#endif
+}
+
+void QPageSetupDialogPrivate::init()
+{
+    Q_Q(QPageSetupDialog);
+
+    widget = new QPageSetupWidget(q);
+    widget->setPrinter(printer);
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    if (printer->outputFormat() == QPrinter::NativeFormat && QCUPSSupport::isAvailable()) {
+        cups = new QCUPSSupport;
+        widget->selectPrinter(cups);
+    } else {
+        cups = 0;
+    }
+#endif
+
+    QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok
+                                                     | QDialogButtonBox::Cancel,
+                                                     Qt::Horizontal, q);
+    QObject::connect(buttons, SIGNAL(accepted()), q, SLOT(accept()));
+    QObject::connect(buttons, SIGNAL(rejected()), q, SLOT(reject()));
+
+    QVBoxLayout *lay = new QVBoxLayout(q);
+    lay->addWidget(widget);
+    lay->addWidget(buttons);
+}
+
+QPageSetupWidget::QPageSetupWidget(QWidget *parent)
+    : QWidget(parent),
+    m_printer(0),
+    m_blockSignals(false),
+    m_cups(0)
+{
+    widget.setupUi(this);
+
+    QString suffix = (QLocale::system().measurementSystem() == QLocale::ImperialSystem)
+                     ? QString::fromLatin1(" in")
+                     : QString::fromLatin1(" mm");
+    widget.topMargin->setSuffix(suffix);
+    widget.bottomMargin->setSuffix(suffix);
+    widget.leftMargin->setSuffix(suffix);
+    widget.rightMargin->setSuffix(suffix);
+    widget.paperWidth->setSuffix(suffix);
+    widget.paperHeight->setSuffix(suffix);
+
+    QVBoxLayout *lay = new QVBoxLayout(widget.preview);
+    widget.preview->setLayout(lay);
+    m_pagePreview = new QPagePreview(widget.preview);
+    lay->addWidget(m_pagePreview);
+
+    setAttribute(Qt::WA_WState_Polished, false);
+
+#ifdef PSD_ENABLE_PAPERSOURCE
+    for (int i=0; paperSourceNames[i]; ++i)
+        widget.paperSource->insertItem(paperSourceNames[i]);
+#else
+    widget.paperSourceLabel->setVisible(false);
+    widget.paperSource->setVisible(false);
+#endif
+
+    widget.reverseLandscape->setVisible(false);
+    widget.reversePortrait->setVisible(false);
+
+    populatePaperSizes(widget.paperSize);
+
+    QStringList units;
+    units << tr("Centimeters (cm)") << tr("Millimeters (mm)") << tr("Inches (in)") << tr("Points (pt)");
+    widget.unit->addItems(units);
+    connect(widget.unit, SIGNAL(activated(int)), this, SLOT(unitChanged(int)));
+    widget.unit->setCurrentIndex((QLocale::system().measurementSystem() == QLocale::ImperialSystem) ? 2 : 1);
+
+    connect(widget.paperSize, SIGNAL(currentIndexChanged(int)), this, SLOT(_q_paperSizeChanged()));
+    connect(widget.paperWidth, SIGNAL(valueChanged(double)), this, SLOT(_q_paperSizeChanged()));
+    connect(widget.paperHeight, SIGNAL(valueChanged(double)), this, SLOT(_q_paperSizeChanged()));
+
+    connect(widget.leftMargin, SIGNAL(valueChanged(double)), this, SLOT(setLeftMargin(double)));
+    connect(widget.topMargin, SIGNAL(valueChanged(double)), this, SLOT(setTopMargin(double)));
+    connect(widget.rightMargin, SIGNAL(valueChanged(double)), this, SLOT(setRightMargin(double)));
+    connect(widget.bottomMargin, SIGNAL(valueChanged(double)), this, SLOT(setBottomMargin(double)));
+
+    connect(widget.portrait, SIGNAL(clicked()), this, SLOT(_q_pageOrientationChanged()));
+    connect(widget.landscape, SIGNAL(clicked()), this, SLOT(_q_pageOrientationChanged()));
+}
+
+void QPageSetupWidget::setPrinter(QPrinter *printer)
+{
+    m_printer = printer;
+    m_blockSignals = true;
+    selectPdfPsPrinter(printer);
+    printer->getPageMargins(&m_leftMargin, &m_topMargin, &m_rightMargin, &m_bottomMargin, QPrinter::Point);
+    unitChanged(widget.unit->currentIndex());
+    m_pagePreview->setMargins(m_leftMargin, m_topMargin, m_rightMargin, m_bottomMargin);
+    m_paperSize = printer->paperSize(QPrinter::Point);
+    widget.paperWidth->setValue(m_paperSize.width() / m_currentMultiplier);
+    widget.paperHeight->setValue(m_paperSize.height() / m_currentMultiplier);
+
+    widget.landscape->setChecked(printer->orientation() == QPrinter::Landscape);
+
+#ifdef PSD_ENABLE_PAPERSOURCE
+    widget.paperSource->setCurrentItem(printer->paperSource());
+#endif
+    Q_ASSERT(m_blockSignals);
+    m_blockSignals = false;
+    _q_paperSizeChanged();
+}
+
+// set gui data on printer
+void QPageSetupWidget::setupPrinter() const
+{
+    QPrinter::Orientation orientation = widget.portrait->isChecked()
+                                        ? QPrinter::Portrait
+                                        : QPrinter::Landscape;
+    m_printer->setOrientation(orientation);
+    // paper format
+    QVariant val = widget.paperSize->itemData(widget.paperSize->currentIndex());
+    int ps = m_printer->pageSize();
+    if (val.type() == QVariant::Int) {
+        ps = val.toInt();
+    }
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    else if (m_cups && QCUPSSupport::isAvailable() && m_cups->currentPPD()) {
+        QByteArray cupsPageSize = val.toByteArray();
+        QPrintEngine *engine = m_printer->printEngine();
+        engine->setProperty(PPK_CupsStringPageSize, QString::fromLatin1(cupsPageSize));
+        engine->setProperty(PPK_CupsOptions, m_cups->options());
+
+        QRect pageRect = m_cups->pageRect(cupsPageSize);
+        engine->setProperty(PPK_CupsPageRect, pageRect);
+
+        QRect paperRect = m_cups->paperRect(cupsPageSize);
+        engine->setProperty(PPK_CupsPaperRect, paperRect);
+
+        for(ps = 0; ps < QPrinter::NPaperSize; ++ps) {
+            QPdf::PaperSize size = QPdf::paperSize(QPrinter::PaperSize(ps));
+            if (size.width == paperRect.width() && size.height == paperRect.height())
+                break;
+        }
+    }
+#endif
+    if (ps == QPrinter::Custom)
+        m_printer->setPaperSize(sizeForOrientation(orientation, m_paperSize), QPrinter::Point);
+    else
+        m_printer->setPaperSize(static_cast<QPrinter::PaperSize>(ps));
+
+#ifdef PSD_ENABLE_PAPERSOURCE
+    m_printer->setPaperSource((QPrinter::PaperSource)widget.paperSource->currentIndex());
+#endif
+    m_printer->setPageMargins(m_leftMargin, m_topMargin, m_rightMargin, m_bottomMargin, QPrinter::Point);
+
+}
+
+void QPageSetupWidget::selectPrinter(QCUPSSupport *cups)
+{
+    m_cups = cups;
+    widget.paperSize->clear();
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    if (m_cups && QCUPSSupport::isAvailable()) {
+        const ppd_option_t* pageSizes = m_cups->pageSizes();
+        const int numChoices = pageSizes ? pageSizes->num_choices : 0;
+
+        int cupsDefaultSize = 0;
+        QSize qtPreferredSize = m_printer->paperSize(QPrinter::Point).toSize();
+        bool preferredSizeMatched = false;
+        for (int i = 0; i < numChoices; ++i) {
+            widget.paperSize->addItem(QString::fromLocal8Bit(pageSizes->choices[i].text), QByteArray(pageSizes->choices[i].choice));
+            if (static_cast<int>(pageSizes->choices[i].marked) == 1)
+                cupsDefaultSize = i;
+            if (m_printer->d_func()->hasUserSetPageSize) {
+                QRect cupsPaperSize = m_cups->paperRect(pageSizes->choices[i].choice);
+                QSize diff = cupsPaperSize.size() - qtPreferredSize;
+                if (qAbs(diff.width()) < 5 && qAbs(diff.height()) < 5) {
+                    widget.paperSize->setCurrentIndex(i);
+                    preferredSizeMatched = true;
+                }
+            }
+        }
+        if (!preferredSizeMatched)
+            widget.paperSize->setCurrentIndex(cupsDefaultSize);
+        if (m_printer->d_func()->hasCustomPageMargins) {
+            m_printer->getPageMargins(&m_leftMargin, &m_topMargin, &m_rightMargin, &m_bottomMargin, QPrinter::Point);
+        } else {
+            QByteArray cupsPaperSizeChoice = widget.paperSize->itemData(widget.paperSize->currentIndex()).toByteArray();
+            QRect paper = m_cups->paperRect(cupsPaperSizeChoice);
+            QRect content = m_cups->pageRect(cupsPaperSizeChoice);
+
+            m_leftMargin = content.x() - paper.x();
+            m_topMargin = content.y() - paper.y();
+            m_rightMargin = paper.right() - content.right();
+            m_bottomMargin = paper.bottom() - content.bottom();
+        }
+    }
+#endif
+    if (widget.paperSize->count() == 0) {
+        populatePaperSizes(widget.paperSize);
+        widget.paperSize->setCurrentIndex(widget.paperSize->findData(
+            QLocale::system().measurementSystem() == QLocale::ImperialSystem ? QPrinter::Letter : QPrinter::A4));
+    }
+
+    unitChanged(widget.unit->currentIndex());
+    m_pagePreview->setMargins(m_leftMargin, m_topMargin, m_rightMargin, m_bottomMargin);
+}
+
+void QPageSetupWidget::selectPdfPsPrinter(const QPrinter *p)
+{
+    m_cups = 0;
+    widget.paperSize->clear();
+    populatePaperSizes(widget.paperSize);
+    widget.paperSize->setCurrentIndex(widget.paperSize->findData(p->paperSize()));
+
+    m_leftMargin = 90;
+    m_topMargin = 72;
+    m_bottomMargin = 72;
+    m_rightMargin = 90;
+    unitChanged(widget.unit->currentIndex());
+    m_pagePreview->setMargins(m_leftMargin, m_topMargin, m_rightMargin, m_bottomMargin);
+}
+
+// Updates size/preview after the combobox has been changed.
+void QPageSetupWidget::_q_paperSizeChanged()
+{
+    QVariant val = widget.paperSize->itemData(widget.paperSize->currentIndex());
+    int index = m_printer->pageSize();
+    if (val.type() == QVariant::Int) {
+        index = val.toInt();
+    }
+
+    if (m_blockSignals) return;
+    m_blockSignals = true;
+
+    QPrinter::PaperSize size = QPrinter::PaperSize(index);
+    QPrinter::Orientation orientation = widget.portrait->isChecked()
+                                        ? QPrinter::Portrait
+                                        : QPrinter::Landscape;
+
+    bool custom = size == QPrinter::Custom;
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    custom = custom ? !m_cups : custom;
+#endif
+
+    widget.paperWidth->setEnabled(custom);
+    widget.paperHeight->setEnabled(custom);
+    widget.widthLabel->setEnabled(custom);
+    widget.heightLabel->setEnabled(custom);
+    if (custom) {
+        m_paperSize.setWidth( widget.paperWidth->value() * m_currentMultiplier);
+        m_paperSize.setHeight( widget.paperHeight->value() * m_currentMultiplier);
+        m_pagePreview->setPaperSize(m_paperSize);
+    } else {
+        Q_ASSERT(m_printer);
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+        if (m_cups) { // combobox is filled with cups based data
+            QByteArray cupsPageSize = widget.paperSize->itemData(widget.paperSize->currentIndex()).toByteArray();
+            m_paperSize = m_cups->paperRect(cupsPageSize).size();
+            if (orientation == QPrinter::Landscape)
+                m_paperSize = QSizeF(m_paperSize.height(), m_paperSize.width()); // swap
+        }
+        else
+#endif
+            m_paperSize = qt_printerPaperSize(orientation, size, QPrinter::Point, 1);
+
+        m_pagePreview->setPaperSize(m_paperSize);
+        widget.paperWidth->setValue(m_paperSize.width() / m_currentMultiplier);
+        widget.paperHeight->setValue(m_paperSize.height() / m_currentMultiplier);
+    }
+    m_blockSignals = false;
+}
+
+void QPageSetupWidget::_q_pageOrientationChanged()
+{
+    if (QPrinter::PaperSize(widget.paperSize->currentIndex()) == QPrinter::Custom) {
+        double tmp = widget.paperWidth->value();
+        widget.paperWidth->setValue(widget.paperHeight->value());
+        widget.paperHeight->setValue(tmp);
+    }
+    _q_paperSizeChanged();
+}
+
+extern double qt_multiplierForUnit(QPrinter::Unit unit, int resolution);
+
+void QPageSetupWidget::unitChanged(int item)
+{
+    QString suffix;
+    switch(item) {
+    case 0:
+        m_currentMultiplier = 10 * qt_multiplierForUnit(QPrinter::Millimeter, 1);
+        suffix = QString::fromLatin1(" cm");
+        break;
+    case 2:
+        m_currentMultiplier = qt_multiplierForUnit(QPrinter::Inch, 1);
+        suffix = QString::fromLatin1(" in");
+        break;
+    case 3:
+        m_currentMultiplier = qt_multiplierForUnit(QPrinter::Point, 1);
+        suffix = QString::fromLatin1(" pt");
+        break;
+    case 1:
+    default:
+        m_currentMultiplier = qt_multiplierForUnit(QPrinter::Millimeter, 1);
+        suffix = QString::fromLatin1(" mm");
+        break;
+    }
+    const bool old = m_blockSignals;
+    m_blockSignals = true;
+    widget.topMargin->setSuffix(suffix);
+    widget.leftMargin->setSuffix(suffix);
+    widget.rightMargin->setSuffix(suffix);
+    widget.bottomMargin->setSuffix(suffix);
+    widget.paperWidth->setSuffix(suffix);
+    widget.paperHeight->setSuffix(suffix);
+    widget.topMargin->setValue(m_topMargin / m_currentMultiplier);
+    widget.leftMargin->setValue(m_leftMargin / m_currentMultiplier);
+    widget.rightMargin->setValue(m_rightMargin / m_currentMultiplier);
+    widget.bottomMargin->setValue(m_bottomMargin / m_currentMultiplier);
+    widget.paperWidth->setValue(m_paperSize.width() / m_currentMultiplier);
+    widget.paperHeight->setValue(m_paperSize.height() / m_currentMultiplier);
+    m_blockSignals = old;
+}
+
+void QPageSetupWidget::setTopMargin(double newValue)
+{
+    if (m_blockSignals) return;
+    m_topMargin = newValue * m_currentMultiplier;
+    m_pagePreview->setMargins(m_leftMargin, m_topMargin, m_rightMargin, m_bottomMargin);
+}
+
+void QPageSetupWidget::setBottomMargin(double newValue)
+{
+    if (m_blockSignals) return;
+    m_bottomMargin = newValue * m_currentMultiplier;
+    m_pagePreview->setMargins(m_leftMargin, m_topMargin, m_rightMargin, m_bottomMargin);
+}
+
+void QPageSetupWidget::setLeftMargin(double newValue)
+{
+    if (m_blockSignals) return;
+    m_leftMargin = newValue * m_currentMultiplier;
+    m_pagePreview->setMargins(m_leftMargin, m_topMargin, m_rightMargin, m_bottomMargin);
+}
+
+void QPageSetupWidget::setRightMargin(double newValue)
+{
+    if (m_blockSignals) return;
+    m_rightMargin = newValue * m_currentMultiplier;
+    m_pagePreview->setMargins(m_leftMargin, m_topMargin, m_rightMargin, m_bottomMargin);
+}
+
+
+
+QPageSetupDialog::QPageSetupDialog(QPrinter *printer, QWidget *parent)
+    : QAbstractPageSetupDialog(*(new QPageSetupDialogPrivate), printer, parent)
+{
+    Q_D(QPageSetupDialog);
+    d->init();
+}
+
+
+QPageSetupDialog::QPageSetupDialog(QWidget *parent)
+    : QAbstractPageSetupDialog(*(new QPageSetupDialogPrivate), 0, parent)
+{
+    Q_D(QPageSetupDialog);
+    d->init();
+}
+
+/*!
+    \internal
+*/
+int QPageSetupDialog::exec()
+{
+    Q_D(QPageSetupDialog);
+
+    int ret = QDialog::exec();
+    if (ret == Accepted)
+        d->widget->setupPrinter();
+    return ret;
+}
+
+
+QT_END_NAMESPACE
+
+#include "moc_qpagesetupdialog.cpp"
+
+#endif // QT_NO_PRINTDIALOG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qpagesetupdialog_win.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,165 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qpagesetupdialog.h"
+
+#ifndef QT_NO_PRINTDIALOG
+#include <qapplication.h>
+
+#include <private/qprintengine_win_p.h>
+#include <private/qabstractpagesetupdialog_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QPageSetupDialogPrivate : public QAbstractPageSetupDialogPrivate
+{
+};
+
+QPageSetupDialog::QPageSetupDialog(QPrinter *printer, QWidget *parent)
+    : QAbstractPageSetupDialog(*(new QPageSetupDialogPrivate), printer, parent)
+{
+}
+
+QPageSetupDialog::QPageSetupDialog(QWidget *parent)
+    : QAbstractPageSetupDialog(*(new QPageSetupDialogPrivate), 0, parent)
+{
+}
+
+int QPageSetupDialog::exec()
+{
+    Q_D(QPageSetupDialog);
+
+    if (d->printer->outputFormat() != QPrinter::NativeFormat)
+        return Rejected;
+
+    QWin32PrintEngine *engine = static_cast<QWin32PrintEngine*>(d->printer->paintEngine());
+    QWin32PrintEnginePrivate *ep = static_cast<QWin32PrintEnginePrivate *>(engine->d_ptr.data());
+
+    PAGESETUPDLG psd;
+    memset(&psd, 0, sizeof(PAGESETUPDLG));
+    psd.lStructSize = sizeof(PAGESETUPDLG);
+
+    // we need a temp DEVMODE struct if we don't have a global DEVMODE
+    HGLOBAL hDevMode = 0;
+    int devModeSize = 0;
+    if (!ep->globalDevMode) {
+        devModeSize = sizeof(DEVMODE) + ep->devMode->dmDriverExtra;
+        hDevMode = GlobalAlloc(GHND, devModeSize);
+        if (hDevMode) {
+            void *dest = GlobalLock(hDevMode);
+            memcpy(dest, ep->devMode, devModeSize);
+            GlobalUnlock(hDevMode);
+        }
+        psd.hDevMode = hDevMode;
+    } else {
+        psd.hDevMode = ep->devMode;
+    }
+
+    HGLOBAL *tempDevNames = ep->createDevNames();
+    psd.hDevNames = tempDevNames;
+
+    QWidget *parent = parentWidget();
+    parent = parent ? parent->window() : QApplication::activeWindow();
+    Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
+    psd.hwndOwner = parent ? parent->winId() : 0;
+
+    psd.Flags = PSD_MARGINS;
+    double multiplier = 1;
+    switch (QLocale::system().measurementSystem()) {
+    case QLocale::MetricSystem:
+        psd.Flags |= PSD_INHUNDREDTHSOFMILLIMETERS;
+        multiplier = 1;
+        break;
+    case QLocale::ImperialSystem:
+        psd.Flags |= PSD_INTHOUSANDTHSOFINCHES;
+        multiplier = 25.4/10;
+        break;
+    }
+
+    QRect marginRect = ep->getPageMargins();
+    psd.rtMargin.left   = marginRect.left()   / multiplier;
+    psd.rtMargin.top    = marginRect.top()    / multiplier;
+    psd.rtMargin.right  = marginRect.width()  / multiplier;;
+    psd.rtMargin.bottom = marginRect.height() / multiplier;;
+
+    bool result = PageSetupDlg(&psd);
+    if (result) {
+        ep->readDevnames(psd.hDevNames);
+        ep->readDevmode(psd.hDevMode);
+
+        QRect theseMargins = QRect(psd.rtMargin.left   * multiplier,
+                                   psd.rtMargin.top    * multiplier,
+                                   psd.rtMargin.right  * multiplier,
+                                   psd.rtMargin.bottom * multiplier);
+
+        if (theseMargins != marginRect) {
+            ep->setPageMargins(psd.rtMargin.left   * multiplier,
+                               psd.rtMargin.top    * multiplier,
+                               psd.rtMargin.right  * multiplier,
+                               psd.rtMargin.bottom * multiplier);
+        }
+
+        ep->updateCustomPaperSize();
+
+        // copy from our temp DEVMODE struct
+        if (!ep->globalDevMode && hDevMode) {
+            void *src = GlobalLock(hDevMode);
+            memcpy(ep->devMode, src, devModeSize);
+            GlobalUnlock(hDevMode);
+        }
+    }
+
+    if (!ep->globalDevMode && hDevMode)
+        GlobalFree(hDevMode);
+    GlobalFree(tempDevNames);
+    done(result);
+    return result;
+}
+
+void QPageSetupDialog::setVisible(bool visible)
+{
+    if (!visible)
+        return;
+    exec();
+}
+
+QT_END_NAMESPACE
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qplatformtheme.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,798 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qplatformtheme.h"
+
+#include "qplatformtheme_p.h"
+
+#include <QtCore/QVariant>
+#include <QtCore/QStringList>
+#include <QtCore/qfileinfo.h>
+#include <qicon.h>
+#include <qpalette.h>
+#include <qtextformat.h>
+#include <private/qiconloader_p.h>
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
+#include <qpa/qplatformdialoghelper.h>
+
+#include <algorithm>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+    \class QPlatformTheme
+    \since 5.0
+    \internal
+    \preliminary
+    \ingroup qpa
+    \brief The QPlatformTheme class allows customizing the UI based on themes.
+
+*/
+
+/*!
+    \enum QPlatformTheme::ThemeHint
+
+    This enum describes the available theme hints.
+
+    \value CursorFlashTime (int) Cursor flash time in ms, overriding
+                                 QPlatformIntegration::styleHint.
+
+    \value KeyboardInputInterval (int) Keyboard input interval in ms, overriding
+                                 QPlatformIntegration::styleHint.
+
+    \value MouseDoubleClickInterval (int) Mouse double click interval in ms,
+                                    overriding QPlatformIntegration::styleHint.
+
+    \value MouseDoubleClickDistance (int) The maximum distance in logical pixels which the mouse can travel
+                        between clicks in order for the click sequence to be handled as a double click.
+                        The default value is 5 logical pixels.
+
+    \value MousePressAndHoldInterval (int) Mouse press and hold interval in ms,
+                                    overriding QPlatformIntegration::styleHint.
+
+    \value StartDragDistance (int) Start drag distance,
+                             overriding QPlatformIntegration::styleHint.
+
+    \value StartDragTime (int) Start drag time in ms,
+                               overriding QPlatformIntegration::styleHint.
+
+    \value WheelScrollLines (int) The number of lines to scroll a widget, when the mouse wheel is rotated.
+                        The default value is 3.  \sa QApplication::wheelScrollLines()
+
+    \value KeyboardAutoRepeatRate (int) Keyboard auto repeat rate,
+                                  overriding QPlatformIntegration::styleHint.
+
+    \value PasswordMaskDelay (int) Pass word mask delay in ms,
+                                   overriding QPlatformIntegration::styleHint.
+
+    \value StartDragVelocity (int) Velocity of a drag,
+                                   overriding QPlatformIntegration::styleHint.
+
+    \value TextCursorWidth  (int) Determines the width of the text cursor.
+
+    \value DropShadow       (bool) Determines whether the drop shadow effect for
+                            tooltips or whatsthis is enabled.
+
+    \value MaximumScrollBarDragDistance (int) Determines the value returned by
+                            QStyle::pixelMetric(PM_MaximumDragDistance)
+
+    \value ToolButtonStyle (int) A value representing a Qt::ToolButtonStyle.
+
+    \value ToolBarIconSize Icon size for tool bars.
+
+    \value SystemIconThemeName (QString) Name of the icon theme.
+
+    \value SystemIconFallbackThemeName (QString) Name of the fallback icon theme.
+
+    \value IconThemeSearchPaths (QStringList) Search paths for icons.
+
+    \value ItemViewActivateItemOnSingleClick (bool) Activate items by single click.
+
+    \value StyleNames (QStringList) A list of preferred style names.
+
+    \value WindowAutoPlacement (bool) A boolean value indicating whether Windows
+                               (particularly dialogs) are placed by the system
+                               (see _NET_WM_FULL_PLACEMENT in X11).
+
+    \value DialogButtonBoxLayout (int) An integer representing a
+                                 QDialogButtonBox::ButtonLayout value.
+
+    \value DialogButtonBoxButtonsHaveIcons (bool) A boolean value indicating whether
+                                            the buttons of a QDialogButtonBox should have icons.
+
+    \value UseFullScreenForPopupMenu (bool) Pop menus can cover the full screen including task bar.
+
+    \value KeyboardScheme (int) An integer value (enum KeyboardSchemes) specifying the
+                           keyboard scheme.
+
+    \value UiEffects (int) A flag value consisting of UiEffect values specifying the enabled UI animations.
+
+    \value SpellCheckUnderlineStyle (int) A QTextCharFormat::UnderlineStyle specifying
+                                    the underline style used misspelled words when spell checking.
+
+    \value TabFocusBehavior (int) A Qt::TabFocusBehavior specifying
+                         the behavior of focus change when tab key was pressed.
+                         This enum value was added in Qt 5.5.
+
+    \value DialogSnapToDefaultButton (bool) Whether the mouse should snap to the default button when a dialog
+                                     becomes visible.
+
+    \value ContextMenuOnMouseRelease (bool) Whether the context menu should be shown on mouse release.
+
+    \value TouchDoubleTapDistance (int) The maximum distance in logical pixels which a touchpoint can travel
+                        between taps in order for the tap sequence to be handled as a double tap.
+                        The default value is double the MouseDoubleClickDistance, or 10 logical pixels
+                        if that is not specified.
+
+    \value ShowShortcutsInContextMenus (bool) Whether to display shortcut key sequences in context menus.
+
+    \sa themeHint(), QStyle::pixelMetric()
+*/
+
+
+#if QT_CONFIG(shortcut)
+// Table of key bindings. It must be sorted on key sequence:
+// The integer value of VK_KEY | Modifier Keys (e.g., VK_META, and etc.)
+// A priority of 1 indicates that this is the primary key binding when multiple are defined.
+
+enum KeyPlatform {
+    KB_Win = (1 << QPlatformTheme::WindowsKeyboardScheme),
+    KB_Mac = (1 << QPlatformTheme::MacKeyboardScheme),
+    KB_X11 = (1 << QPlatformTheme::X11KeyboardScheme),
+    KB_KDE = (1 << QPlatformTheme::KdeKeyboardScheme),
+    KB_Gnome = (1 << QPlatformTheme::GnomeKeyboardScheme),
+    KB_CDE = (1 << QPlatformTheme::CdeKeyboardScheme),
+    KB_All = 0xffff
+};
+
+const QKeyBinding QPlatformThemePrivate::keyBindings[] = {
+    //   StandardKey                            Priority    Key Sequence                            Platforms
+    {QKeySequence::HelpContents,            1,          Qt::CTRL | Qt::Key_Question,            KB_Mac},
+    {QKeySequence::HelpContents,            0,          Qt::Key_F1,                             KB_Win | KB_X11},
+    {QKeySequence::WhatsThis,               1,          Qt::SHIFT | Qt::Key_F1,                 KB_All},
+    {QKeySequence::Open,                    1,          Qt::CTRL | Qt::Key_O,                   KB_All},
+    {QKeySequence::Close,                   0,          Qt::CTRL | Qt::Key_F4,                  KB_Mac},
+    {QKeySequence::Close,                   1,          Qt::CTRL | Qt::Key_F4,                  KB_Win},
+    {QKeySequence::Close,                   1,          Qt::CTRL | Qt::Key_W,                   KB_Mac},
+    {QKeySequence::Close,                   0,          Qt::CTRL | Qt::Key_W,                   KB_Win | KB_X11},
+    {QKeySequence::Save,                    1,          Qt::CTRL | Qt::Key_S,                   KB_All},
+    {QKeySequence::New,                     1,          Qt::CTRL | Qt::Key_N,                   KB_All},
+    {QKeySequence::Delete,                  0,          Qt::CTRL | Qt::Key_D,                   KB_X11}, //emacs (line edit only)
+    {QKeySequence::Delete,                  1,          Qt::Key_Delete,                         KB_All},
+    {QKeySequence::Delete,                  0,          Qt::META | Qt::Key_D,                   KB_Mac},
+    {QKeySequence::Cut,                     1,          Qt::CTRL | Qt::Key_X,                   KB_All},
+    {QKeySequence::Cut,                     0,          Qt::SHIFT | Qt::Key_Delete,             KB_Win | KB_X11}, //## Check if this should work on mac
+    {QKeySequence::Cut,                     0,          Qt::Key_F20,                            KB_X11}, //Cut on sun keyboards
+    {QKeySequence::Cut,                     0,          Qt::META | Qt::Key_K,                   KB_Mac},
+    {QKeySequence::Copy,                    0,          Qt::CTRL | Qt::Key_Insert,              KB_X11 | KB_Win},
+    {QKeySequence::Copy,                    1,          Qt::CTRL | Qt::Key_C,                   KB_All},
+    {QKeySequence::Copy,                    0,          Qt::Key_F16,                            KB_X11}, //Copy on sun keyboards
+    {QKeySequence::Paste,                   0,          Qt::CTRL | Qt::SHIFT | Qt::Key_Insert,  KB_X11},
+    {QKeySequence::Paste,                   1,          Qt::CTRL | Qt::Key_V,                   KB_All},
+    {QKeySequence::Paste,                   0,          Qt::SHIFT | Qt::Key_Insert,             KB_Win | KB_X11},
+    {QKeySequence::Paste,                   0,          Qt::Key_F18,                            KB_X11}, //Paste on sun keyboards
+    {QKeySequence::Paste,                   0,          Qt::META | Qt::Key_Y,                   KB_Mac},
+    {QKeySequence::Undo,                    0,          Qt::ALT  | Qt::Key_Backspace,           KB_Win},
+    {QKeySequence::Undo,                    1,          Qt::CTRL | Qt::Key_Z,                   KB_All},
+    {QKeySequence::Undo,                    0,          Qt::Key_F14,                            KB_X11}, //Undo on sun keyboards
+    {QKeySequence::Redo,                    0,          Qt::ALT  | Qt::SHIFT | Qt::Key_Backspace,KB_Win},
+    {QKeySequence::Redo,                    0,          Qt::CTRL | Qt::SHIFT | Qt::Key_Z,       KB_Mac},
+    {QKeySequence::Redo,                    0,          Qt::CTRL | Qt::SHIFT | Qt::Key_Z,       KB_Win | KB_X11},
+    {QKeySequence::Redo,                    1,          Qt::CTRL | Qt::Key_Y,                   KB_Win},
+    {QKeySequence::Back,                    1,          Qt::ALT  | Qt::Key_Left,                KB_Win | KB_X11},
+    {QKeySequence::Back,                    0,          Qt::CTRL | Qt::Key_Left,                KB_Mac},
+    {QKeySequence::Back,                    1,          Qt::CTRL | Qt::Key_BracketLeft,         KB_Mac},
+    {QKeySequence::Back,                    0,          Qt::Key_Backspace,                      KB_Win},
+    {QKeySequence::Forward,                 1,          Qt::ALT  | Qt::Key_Right,               KB_Win | KB_X11},
+    {QKeySequence::Forward,                 0,          Qt::CTRL | Qt::Key_Right,               KB_Mac},
+    {QKeySequence::Forward,                 1,          Qt::CTRL | Qt::Key_BracketRight,        KB_Mac},
+    {QKeySequence::Forward,                 0,          Qt::SHIFT | Qt::Key_Backspace,          KB_Win},
+    {QKeySequence::Refresh,                 1,          Qt::CTRL | Qt::Key_R,                   KB_Gnome | KB_Mac},
+    {QKeySequence::Refresh,                 0,          Qt::Key_F5,                             KB_Win | KB_X11},
+    {QKeySequence::ZoomIn,                  1,          Qt::CTRL | Qt::Key_Plus,                KB_All},
+    {QKeySequence::ZoomOut,                 1,          Qt::CTRL | Qt::Key_Minus,               KB_All},
+    {QKeySequence::Print,                   1,          Qt::CTRL | Qt::Key_P,                   KB_All},
+    {QKeySequence::AddTab,                  1,          Qt::CTRL | Qt::SHIFT | Qt::Key_N,       KB_KDE},
+    {QKeySequence::AddTab,                  0,          Qt::CTRL | Qt::Key_T,                   KB_All},
+    {QKeySequence::NextChild,               0,          Qt::CTRL | Qt::Key_F6,                  KB_Win},
+    {QKeySequence::NextChild,               0,          Qt::CTRL | Qt::Key_Tab,                 KB_Mac}, //different priority from above
+    {QKeySequence::NextChild,               1,          Qt::CTRL | Qt::Key_Tab,                 KB_Win | KB_X11},
+    {QKeySequence::NextChild,               1,          Qt::CTRL | Qt::Key_BraceRight,          KB_Mac},
+    {QKeySequence::NextChild,               0,          Qt::CTRL | Qt::Key_Comma,               KB_KDE},
+    {QKeySequence::NextChild,               0,          Qt::Key_Forward,                        KB_All},
+    {QKeySequence::PreviousChild,           0,          Qt::CTRL | Qt::SHIFT | Qt::Key_F6,      KB_Win},
+    {QKeySequence::PreviousChild,           0,          Qt::CTRL | Qt::SHIFT | Qt::Key_Backtab, KB_Mac },//different priority from above
+    {QKeySequence::PreviousChild,           1,          Qt::CTRL | Qt::SHIFT | Qt::Key_Backtab, KB_Win | KB_X11},
+    {QKeySequence::PreviousChild,           1,          Qt::CTRL | Qt::Key_BraceLeft,           KB_Mac},
+    {QKeySequence::PreviousChild,           0,          Qt::CTRL | Qt::Key_Period,              KB_KDE},
+    {QKeySequence::PreviousChild,           0,          Qt::Key_Back,                           KB_All},
+    {QKeySequence::Find,                    0,          Qt::CTRL | Qt::Key_F,                   KB_All},
+    {QKeySequence::FindNext,                0,          Qt::CTRL | Qt::Key_G,                   KB_Win},
+    {QKeySequence::FindNext,                1,          Qt::CTRL | Qt::Key_G,                   KB_Gnome | KB_Mac},
+    {QKeySequence::FindNext,                1,          Qt::Key_F3,                             KB_Win},
+    {QKeySequence::FindNext,                0,          Qt::Key_F3,                             KB_X11},
+    {QKeySequence::FindPrevious,            0,          Qt::CTRL | Qt::SHIFT | Qt::Key_G,       KB_Win},
+    {QKeySequence::FindPrevious,            1,          Qt::CTRL | Qt::SHIFT | Qt::Key_G,       KB_Gnome | KB_Mac},
+    {QKeySequence::FindPrevious,            1,          Qt::SHIFT | Qt::Key_F3,                 KB_Win},
+    {QKeySequence::FindPrevious,            0,          Qt::SHIFT | Qt::Key_F3,                 KB_X11},
+    {QKeySequence::Replace,                 0,          Qt::CTRL | Qt::Key_R,                   KB_KDE},
+    {QKeySequence::Replace,                 0,          Qt::CTRL | Qt::Key_H,                   KB_Gnome},
+    {QKeySequence::Replace,                 0,          Qt::CTRL | Qt::Key_H,                   KB_Win},
+    {QKeySequence::SelectAll,               1,          Qt::CTRL | Qt::Key_A,                   KB_All},
+    {QKeySequence::Bold,                    1,          Qt::CTRL | Qt::Key_B,                   KB_All},
+    {QKeySequence::Italic,                  0,          Qt::CTRL | Qt::Key_I,                   KB_All},
+    {QKeySequence::Underline,               1,          Qt::CTRL | Qt::Key_U,                   KB_All},
+    {QKeySequence::MoveToNextChar,          1,          Qt::Key_Right,                          KB_All},
+    {QKeySequence::MoveToNextChar,          0,          Qt::META | Qt::Key_F,                   KB_Mac},
+    {QKeySequence::MoveToPreviousChar,      1,          Qt::Key_Left,                           KB_All},
+    {QKeySequence::MoveToPreviousChar,      0,          Qt::META | Qt::Key_B,                   KB_Mac},
+    {QKeySequence::MoveToNextWord,          0,          Qt::ALT  | Qt::Key_Right,               KB_Mac},
+    {QKeySequence::MoveToNextWord,          0,          Qt::CTRL | Qt::Key_Right,               KB_Win | KB_X11},
+    {QKeySequence::MoveToPreviousWord,      0,          Qt::ALT  | Qt::Key_Left,                KB_Mac},
+    {QKeySequence::MoveToPreviousWord,      0,          Qt::CTRL | Qt::Key_Left,                KB_Win | KB_X11},
+    {QKeySequence::MoveToNextLine,          1,          Qt::Key_Down,                           KB_All},
+    {QKeySequence::MoveToNextLine,          0,          Qt::META | Qt::Key_N,                   KB_Mac},
+    {QKeySequence::MoveToPreviousLine,      1,          Qt::Key_Up,                             KB_All},
+    {QKeySequence::MoveToPreviousLine,      0,          Qt::META | Qt::Key_P,                   KB_Mac},
+    {QKeySequence::MoveToNextPage,          0,          Qt::META | Qt::Key_PageDown,            KB_Mac},
+    {QKeySequence::MoveToNextPage,          0,          Qt::META | Qt::Key_Down,                KB_Mac},
+    {QKeySequence::MoveToNextPage,          0,          Qt::META | Qt::Key_V,                   KB_Mac},
+    {QKeySequence::MoveToNextPage,          0,          Qt::ALT  | Qt::Key_PageDown,            KB_Mac },
+    {QKeySequence::MoveToNextPage,          1,          Qt::Key_PageDown,                       KB_All},
+    {QKeySequence::MoveToPreviousPage,      0,          Qt::META | Qt::Key_PageUp,              KB_Mac},
+    {QKeySequence::MoveToPreviousPage,      0,          Qt::META | Qt::Key_Up,                  KB_Mac},
+    {QKeySequence::MoveToPreviousPage,      0,          Qt::ALT  | Qt::Key_PageUp,              KB_Mac },
+    {QKeySequence::MoveToPreviousPage,      1,          Qt::Key_PageUp,                         KB_All},
+    {QKeySequence::MoveToStartOfLine,       0,          Qt::META | Qt::Key_Left,                KB_Mac},
+    {QKeySequence::MoveToStartOfLine,       0,          Qt::CTRL | Qt::Key_Left,                KB_Mac },
+    {QKeySequence::MoveToStartOfLine,       0,          Qt::Key_Home,                           KB_Win | KB_X11},
+    {QKeySequence::MoveToEndOfLine,         0,          Qt::META | Qt::Key_Right,               KB_Mac},
+    {QKeySequence::MoveToEndOfLine,         0,          Qt::CTRL | Qt::Key_Right,               KB_Mac },
+    {QKeySequence::MoveToEndOfLine,         0,          Qt::Key_End,                            KB_Win | KB_X11},
+    {QKeySequence::MoveToEndOfLine,         0,          Qt::CTRL + Qt::Key_E,                   KB_X11},
+    {QKeySequence::MoveToStartOfBlock,      0,          Qt::META | Qt::Key_A,                   KB_Mac},
+    {QKeySequence::MoveToStartOfBlock,      1,          Qt::ALT  | Qt::Key_Up,                  KB_Mac}, //mac only
+    {QKeySequence::MoveToEndOfBlock,        0,          Qt::META | Qt::Key_E,                   KB_Mac},
+    {QKeySequence::MoveToEndOfBlock,        1,          Qt::ALT  | Qt::Key_Down,                KB_Mac}, //mac only
+    {QKeySequence::MoveToStartOfDocument,   1,          Qt::CTRL | Qt::Key_Up,                  KB_Mac},
+    {QKeySequence::MoveToStartOfDocument,   0,          Qt::CTRL | Qt::Key_Home,                KB_Win | KB_X11},
+    {QKeySequence::MoveToStartOfDocument,   0,          Qt::Key_Home,                           KB_Mac},
+    {QKeySequence::MoveToEndOfDocument,     1,          Qt::CTRL | Qt::Key_Down,                KB_Mac},
+    {QKeySequence::MoveToEndOfDocument,     0,          Qt::CTRL | Qt::Key_End,                 KB_Win | KB_X11},
+    {QKeySequence::MoveToEndOfDocument,     0,          Qt::Key_End,                            KB_Mac},
+    {QKeySequence::SelectNextChar,          0,          Qt::SHIFT | Qt::Key_Right,              KB_All},
+    {QKeySequence::SelectPreviousChar,      0,          Qt::SHIFT | Qt::Key_Left,               KB_All},
+    {QKeySequence::SelectNextWord,          0,          Qt::ALT  | Qt::SHIFT | Qt::Key_Right,   KB_Mac},
+    {QKeySequence::SelectNextWord,          0,          Qt::CTRL | Qt::SHIFT | Qt::Key_Right,   KB_Win | KB_X11},
+    {QKeySequence::SelectPreviousWord,      0,          Qt::ALT  | Qt::SHIFT | Qt::Key_Left,    KB_Mac},
+    {QKeySequence::SelectPreviousWord,      0,          Qt::CTRL | Qt::SHIFT | Qt::Key_Left,    KB_Win | KB_X11},
+    {QKeySequence::SelectNextLine,          0,          Qt::SHIFT | Qt::Key_Down,               KB_All},
+    {QKeySequence::SelectPreviousLine,      0,          Qt::SHIFT | Qt::Key_Up,                 KB_All},
+    {QKeySequence::SelectNextPage,          0,          Qt::SHIFT | Qt::Key_PageDown,           KB_All},
+    {QKeySequence::SelectPreviousPage,      0,          Qt::SHIFT | Qt::Key_PageUp,             KB_All},
+    {QKeySequence::SelectStartOfLine,       0,          Qt::META | Qt::SHIFT | Qt::Key_Left,    KB_Mac},
+    {QKeySequence::SelectStartOfLine,       1,          Qt::CTRL | Qt::SHIFT | Qt::Key_Left,    KB_Mac },
+    {QKeySequence::SelectStartOfLine,       0,          Qt::SHIFT | Qt::Key_Home,               KB_Win | KB_X11},
+    {QKeySequence::SelectEndOfLine,         0,          Qt::META | Qt::SHIFT | Qt::Key_Right,   KB_Mac},
+    {QKeySequence::SelectEndOfLine,         1,          Qt::CTRL | Qt::SHIFT | Qt::Key_Right,   KB_Mac },
+    {QKeySequence::SelectEndOfLine,         0,          Qt::SHIFT | Qt::Key_End,                KB_Win | KB_X11},
+    {QKeySequence::SelectStartOfBlock,      1,          Qt::ALT  | Qt::SHIFT | Qt::Key_Up,      KB_Mac}, //mac only
+    {QKeySequence::SelectStartOfBlock,      0,          Qt::META | Qt::SHIFT | Qt::Key_A,       KB_Mac},
+    {QKeySequence::SelectEndOfBlock,        1,          Qt::ALT  | Qt::SHIFT | Qt::Key_Down,    KB_Mac}, //mac only
+    {QKeySequence::SelectEndOfBlock,        0,          Qt::META | Qt::SHIFT | Qt::Key_E,       KB_Mac},
+    {QKeySequence::SelectStartOfDocument,   1,          Qt::CTRL | Qt::SHIFT | Qt::Key_Up,      KB_Mac},
+    {QKeySequence::SelectStartOfDocument,   0,          Qt::CTRL | Qt::SHIFT | Qt::Key_Home,    KB_Win | KB_X11},
+    {QKeySequence::SelectStartOfDocument,   0,          Qt::SHIFT | Qt::Key_Home,               KB_Mac},
+    {QKeySequence::SelectEndOfDocument,     1,          Qt::CTRL | Qt::SHIFT | Qt::Key_Down,    KB_Mac},
+    {QKeySequence::SelectEndOfDocument,     0,          Qt::CTRL | Qt::SHIFT | Qt::Key_End,     KB_Win | KB_X11},
+    {QKeySequence::SelectEndOfDocument,     0,          Qt::SHIFT | Qt::Key_End,                KB_Mac},
+    {QKeySequence::DeleteStartOfWord,       0,          Qt::ALT  | Qt::Key_Backspace,           KB_Mac},
+    {QKeySequence::DeleteStartOfWord,       0,          Qt::CTRL | Qt::Key_Backspace,           KB_X11 | KB_Win},
+    {QKeySequence::DeleteEndOfWord,         0,          Qt::ALT  | Qt::Key_Delete,              KB_Mac},
+    {QKeySequence::DeleteEndOfWord,         0,          Qt::CTRL | Qt::Key_Delete,              KB_X11 | KB_Win},
+    {QKeySequence::DeleteEndOfLine,         0,          Qt::CTRL | Qt::Key_K,                   KB_X11}, //emacs (line edit only)
+    {QKeySequence::InsertParagraphSeparator,0,          Qt::Key_Enter,                          KB_All},
+    {QKeySequence::InsertParagraphSeparator,0,          Qt::Key_Return,                         KB_All},
+    {QKeySequence::InsertLineSeparator,     0,          Qt::META | Qt::Key_Enter,               KB_Mac},
+    {QKeySequence::InsertLineSeparator,     0,          Qt::META | Qt::Key_Return,              KB_Mac},
+    {QKeySequence::InsertLineSeparator,     0,          Qt::SHIFT | Qt::Key_Enter,              KB_All},
+    {QKeySequence::InsertLineSeparator,     0,          Qt::SHIFT | Qt::Key_Return,             KB_All},
+    {QKeySequence::InsertLineSeparator,     0,          Qt::META | Qt::Key_O,                   KB_Mac},
+    {QKeySequence::SaveAs,                  0,          Qt::CTRL | Qt::SHIFT | Qt::Key_S,       KB_Gnome | KB_Mac},
+    {QKeySequence::Preferences,             0,          Qt::CTRL | Qt::Key_Comma,               KB_Mac},
+    {QKeySequence::Quit,                    0,          Qt::CTRL | Qt::Key_Q,                   KB_X11 | KB_Gnome | KB_KDE | KB_Mac},
+    {QKeySequence::FullScreen,              1,          Qt::META | Qt::CTRL | Qt::Key_F,        KB_Mac},
+    {QKeySequence::FullScreen,              0,          Qt::ALT  | Qt::Key_Enter,               KB_Win},
+    {QKeySequence::FullScreen,              0,          Qt::CTRL | Qt::SHIFT | Qt::Key_F,       KB_KDE},
+    {QKeySequence::FullScreen,              1,          Qt::CTRL | Qt::Key_F11,                 KB_Gnome},
+    {QKeySequence::FullScreen,              1,          Qt::Key_F11,                            KB_Win | KB_KDE},
+    {QKeySequence::Deselect,                0,          Qt::CTRL | Qt::SHIFT | Qt::Key_A,       KB_X11},
+    {QKeySequence::DeleteCompleteLine,      0,          Qt::CTRL | Qt::Key_U,                   KB_X11},
+    {QKeySequence::Backspace,               0,          Qt::META | Qt::Key_H,                   KB_Mac},
+    {QKeySequence::Cancel,                  0,          Qt::Key_Escape,                         KB_All},
+    {QKeySequence::Cancel,                  0,          Qt::CTRL | Qt::Key_Period,              KB_Mac}
+};
+
+const uint QPlatformThemePrivate::numberOfKeyBindings = sizeof(QPlatformThemePrivate::keyBindings)/(sizeof(QKeyBinding));
+#endif
+
+QPlatformThemePrivate::QPlatformThemePrivate()
+        : systemPalette(nullptr)
+{ }
+
+QPlatformThemePrivate::~QPlatformThemePrivate()
+{
+    delete systemPalette;
+}
+
+Q_GUI_EXPORT QPalette qt_fusionPalette();
+
+void QPlatformThemePrivate::initializeSystemPalette()
+{
+    Q_ASSERT(!systemPalette);
+    systemPalette = new QPalette(qt_fusionPalette());
+}
+
+QPlatformTheme::QPlatformTheme()
+    : d_ptr(new QPlatformThemePrivate)
+{
+
+}
+
+QPlatformTheme::QPlatformTheme(QPlatformThemePrivate *priv)
+    : d_ptr(priv)
+{ }
+
+QPlatformTheme::~QPlatformTheme()
+{
+
+}
+
+bool QPlatformTheme::usePlatformNativeDialog(DialogType type) const
+{
+    Q_UNUSED(type);
+    return false;
+}
+
+QPlatformDialogHelper *QPlatformTheme::createPlatformDialogHelper(DialogType type) const
+{
+    Q_UNUSED(type);
+    return nullptr;
+}
+
+const QPalette *QPlatformTheme::palette(Palette type) const
+{
+    Q_D(const QPlatformTheme);
+    if (type == QPlatformTheme::SystemPalette) {
+        if (!d->systemPalette)
+            const_cast<QPlatformTheme *>(this)->d_ptr->initializeSystemPalette();
+        return d->systemPalette;
+    }
+    return nullptr;
+}
+
+const QFont *QPlatformTheme::font(Font type) const
+{
+    Q_UNUSED(type)
+    return nullptr;
+}
+
+QPixmap QPlatformTheme::standardPixmap(StandardPixmap sp, const QSizeF &size) const
+{
+    Q_UNUSED(sp);
+    Q_UNUSED(size);
+    // TODO Should return QCommonStyle pixmaps?
+    return QPixmap();
+}
+
+/*!
+    \brief Return an icon for \a fileInfo, observing \a iconOptions.
+
+    This function is queried by QFileIconProvider and similar classes to obtain
+    an icon for a file. If it does not return a non-null icon, fileIconPixmap()
+    is queried for a specific size.
+
+    \since 5.8
+*/
+
+QIcon QPlatformTheme::fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions) const
+{
+    Q_UNUSED(fileInfo);
+    Q_UNUSED(iconOptions);
+    // TODO Should return QCommonStyle pixmaps?
+    return QIcon();
+}
+
+QVariant QPlatformTheme::themeHint(ThemeHint hint) const
+{
+    // For theme hints which mirror platform integration style hints, query
+    // the platform integration. The base QPlatformIntegration::styleHint()
+    // function will in turn query QPlatformTheme::defaultThemeHint() if there
+    // is no custom value.
+    switch (hint) {
+    case QPlatformTheme::CursorFlashTime:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::CursorFlashTime);
+    case QPlatformTheme::KeyboardInputInterval:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardInputInterval);
+    case QPlatformTheme::KeyboardAutoRepeatRate:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::KeyboardAutoRepeatRate);
+    case QPlatformTheme::MouseDoubleClickInterval:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MouseDoubleClickInterval);
+    case QPlatformTheme::StartDragDistance:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragDistance);
+    case QPlatformTheme::StartDragTime:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragTime);
+    case QPlatformTheme::StartDragVelocity:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::StartDragVelocity);
+    case QPlatformTheme::PasswordMaskDelay:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskDelay);
+    case QPlatformTheme::PasswordMaskCharacter:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::PasswordMaskCharacter);
+    case QPlatformTheme::MousePressAndHoldInterval:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::MousePressAndHoldInterval);
+    case QPlatformTheme::ItemViewActivateItemOnSingleClick:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ItemViewActivateItemOnSingleClick);
+    case QPlatformTheme::UiEffects:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::UiEffects);
+    case QPlatformTheme::ShowShortcutsInContextMenus:
+        return QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ShowShortcutsInContextMenus);
+    default:
+        return QPlatformTheme::defaultThemeHint(hint);
+    }
+}
+
+QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
+{
+    switch (hint) {
+    case QPlatformTheme::CursorFlashTime:
+        return QVariant(1000);
+    case QPlatformTheme::KeyboardInputInterval:
+        return QVariant(400);
+    case QPlatformTheme::KeyboardAutoRepeatRate:
+        return QVariant(30);
+    case QPlatformTheme::MouseDoubleClickInterval:
+        return QVariant(400);
+    case QPlatformTheme::StartDragDistance:
+        return QVariant(10);
+    case QPlatformTheme::StartDragTime:
+        return QVariant(500);
+    case QPlatformTheme::PasswordMaskDelay:
+        return QVariant(int(0));
+    case QPlatformTheme::PasswordMaskCharacter:
+        return QVariant(QChar(0x25CF));
+    case QPlatformTheme::StartDragVelocity:
+        return QVariant(int(0)); // no limit
+    case QPlatformTheme::UseFullScreenForPopupMenu:
+        return QVariant(false);
+    case QPlatformTheme::WindowAutoPlacement:
+        return QVariant(false);
+    case QPlatformTheme::DialogButtonBoxLayout:
+        return QVariant(int(0));
+    case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
+        return QVariant(false);
+    case QPlatformTheme::ItemViewActivateItemOnSingleClick:
+        return QVariant(false);
+    case QPlatformTheme::ToolButtonStyle:
+        return QVariant(int(Qt::ToolButtonIconOnly));
+    case QPlatformTheme::ToolBarIconSize:
+        return QVariant(int(0));
+    case QPlatformTheme::SystemIconThemeName:
+    case QPlatformTheme::SystemIconFallbackThemeName:
+        return QVariant(QString());
+    case QPlatformTheme::IconThemeSearchPaths:
+        return QVariant(QStringList());
+    case QPlatformTheme::IconFallbackSearchPaths:
+        return QVariant(QStringList());
+    case QPlatformTheme::StyleNames:
+        return QVariant(QStringList());
+    case QPlatformTheme::ShowShortcutsInContextMenus:
+        return QVariant(true);
+    case TextCursorWidth:
+        return QVariant(1);
+    case DropShadow:
+        return QVariant(false);
+    case MaximumScrollBarDragDistance:
+        return QVariant(-1);
+    case KeyboardScheme:
+        return QVariant(int(WindowsKeyboardScheme));
+    case UiEffects:
+        return QVariant(int(0));
+    case SpellCheckUnderlineStyle:
+        return QVariant(int(QTextCharFormat::WaveUnderline));
+    case TabFocusBehavior:
+        return QVariant(int(Qt::TabFocusAllControls));
+    case IconPixmapSizes:
+        return QVariant::fromValue(QList<int>());
+    case DialogSnapToDefaultButton:
+    case ContextMenuOnMouseRelease:
+        return QVariant(false);
+    case MousePressAndHoldInterval:
+        return QVariant(800);
+    case MouseDoubleClickDistance:
+        {
+            bool ok = false;
+            const int dist = qEnvironmentVariableIntValue("QT_DBL_CLICK_DIST", &ok);
+            return QVariant(ok ? dist : 5);
+        }
+    case WheelScrollLines:
+        return QVariant(3);
+    case TouchDoubleTapDistance:
+        {
+            bool ok = false;
+            int dist = qEnvironmentVariableIntValue("QT_DBL_TAP_DIST", &ok);
+            if (!ok)
+                dist = defaultThemeHint(MouseDoubleClickDistance).toInt(&ok) * 2;
+            return QVariant(ok ? dist : 10);
+        }
+    case MouseQuickSelectionThreshold:
+        return QVariant(10);
+    }
+    return QVariant();
+}
+
+QPlatformMenuItem *QPlatformTheme::createPlatformMenuItem() const
+{
+    return nullptr;
+}
+
+QPlatformMenu *QPlatformTheme::createPlatformMenu() const
+{
+    return nullptr;
+}
+
+QPlatformMenuBar *QPlatformTheme::createPlatformMenuBar() const
+{
+    return nullptr;
+}
+
+#ifndef QT_NO_SYSTEMTRAYICON
+/*!
+   Factory function for QSystemTrayIcon. This function will return 0 if the platform
+   integration does not support creating any system tray icon.
+*/
+QPlatformSystemTrayIcon *QPlatformTheme::createPlatformSystemTrayIcon() const
+{
+    return nullptr;
+}
+#endif
+
+/*!
+   Factory function for the QIconEngine used by QIcon::fromTheme(). By default this
+   function returns a QIconLoaderEngine, but subclasses can reimplement it to
+   provide their own.
+
+   It is especially useful to benefit from some platform specific facilities or
+   optimizations like an inter-process cache in systems mostly built with Qt.
+
+   \since 5.1
+*/
+QIconEngine *QPlatformTheme::createIconEngine(const QString &iconName) const
+{
+    return new QIconLoaderEngine(iconName);
+}
+
+#if defined(Q_OS_MACX)
+static inline int maybeSwapShortcut(int shortcut)
+{
+    if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
+        uint oldshortcut = shortcut;
+        shortcut &= ~(Qt::CTRL | Qt::META);
+        if (oldshortcut & Qt::CTRL)
+            shortcut |= Qt::META;
+        if (oldshortcut & Qt::META)
+            shortcut |= Qt::CTRL;
+    }
+    return shortcut;
+}
+#endif
+
+#if QT_CONFIG(shortcut)
+// mixed-mode predicate: all of these overloads are actually needed (but not all for every compiler)
+struct ByStandardKey {
+    typedef bool result_type;
+
+    bool operator()(QKeySequence::StandardKey lhs, QKeySequence::StandardKey rhs) const
+    { return lhs < rhs; }
+
+    bool operator()(const QKeyBinding& lhs, const QKeyBinding& rhs) const
+    { return operator()(lhs.standardKey, rhs.standardKey); }
+
+    bool operator()(QKeySequence::StandardKey lhs, const QKeyBinding& rhs) const
+    { return operator()(lhs, rhs.standardKey); }
+
+    bool operator()(const QKeyBinding& lhs, QKeySequence::StandardKey rhs) const
+    { return operator()(lhs.standardKey, rhs); }
+};
+
+/*!
+   Returns the key sequence that should be used for a standard action.
+
+  \since 5.2
+ */
+QList<QKeySequence> QPlatformTheme::keyBindings(QKeySequence::StandardKey key) const
+{
+    const uint platform = QPlatformThemePrivate::currentKeyPlatforms();
+    QList <QKeySequence> list;
+
+    std::pair<const QKeyBinding *, const QKeyBinding *> range =
+        std::equal_range(QPlatformThemePrivate::keyBindings,
+                         QPlatformThemePrivate::keyBindings + QPlatformThemePrivate::numberOfKeyBindings,
+                         key, ByStandardKey());
+
+    for (const QKeyBinding *it = range.first; it < range.second; ++it) {
+        if (!(it->platform & platform))
+            continue;
+
+        uint shortcut =
+#if defined(Q_OS_MACX)
+            maybeSwapShortcut(it->shortcut);
+#else
+            it->shortcut;
+#endif
+        if (it->priority > 0)
+            list.prepend(QKeySequence(shortcut));
+        else
+            list.append(QKeySequence(shortcut));
+    }
+
+    return list;
+}
+#endif
+
+/*!
+   Returns the text of a standard \a button.
+
+  \since 5.3
+  \sa QPlatformDialogHelper::StandardButton
+ */
+
+QString QPlatformTheme::standardButtonText(int button) const
+{
+    return QPlatformTheme::defaultStandardButtonText(button);
+}
+
+#if QT_CONFIG(shortcut)
+/*!
+   Returns the mnemonic that should be used for a standard \a button.
+
+  \since 5.9
+  \sa QPlatformDialogHelper::StandardButton
+ */
+
+QKeySequence QPlatformTheme::standardButtonShortcut(int button) const
+{
+    Q_UNUSED(button)
+    return QKeySequence();
+}
+#endif // QT_CONFIG(shortcut)
+
+QString QPlatformTheme::defaultStandardButtonText(int button)
+{
+    switch (button) {
+    case QPlatformDialogHelper::Ok:
+        return QCoreApplication::translate("QPlatformTheme", "OK");
+    case QPlatformDialogHelper::Save:
+        return QCoreApplication::translate("QPlatformTheme", "Save");
+    case QPlatformDialogHelper::SaveAll:
+        return QCoreApplication::translate("QPlatformTheme", "Save All");
+    case QPlatformDialogHelper::Open:
+        return QCoreApplication::translate("QPlatformTheme", "Open");
+    case QPlatformDialogHelper::Yes:
+        return QCoreApplication::translate("QPlatformTheme", "&Yes");
+    case QPlatformDialogHelper::YesToAll:
+        return QCoreApplication::translate("QPlatformTheme", "Yes to &All");
+    case QPlatformDialogHelper::No:
+        return QCoreApplication::translate("QPlatformTheme", "&No");
+    case QPlatformDialogHelper::NoToAll:
+        return QCoreApplication::translate("QPlatformTheme", "N&o to All");
+    case QPlatformDialogHelper::Abort:
+        return QCoreApplication::translate("QPlatformTheme", "Abort");
+    case QPlatformDialogHelper::Retry:
+        return QCoreApplication::translate("QPlatformTheme", "Retry");
+    case QPlatformDialogHelper::Ignore:
+        return QCoreApplication::translate("QPlatformTheme", "Ignore");
+    case QPlatformDialogHelper::Close:
+        return QCoreApplication::translate("QPlatformTheme", "Close");
+    case QPlatformDialogHelper::Cancel:
+        return QCoreApplication::translate("QPlatformTheme", "Cancel");
+    case QPlatformDialogHelper::Discard:
+        return QCoreApplication::translate("QPlatformTheme", "Discard");
+    case QPlatformDialogHelper::Help:
+        return QCoreApplication::translate("QPlatformTheme", "Help");
+    case QPlatformDialogHelper::Apply:
+        return QCoreApplication::translate("QPlatformTheme", "Apply");
+    case QPlatformDialogHelper::Reset:
+        return QCoreApplication::translate("QPlatformTheme", "Reset");
+    case QPlatformDialogHelper::RestoreDefaults:
+        return QCoreApplication::translate("QPlatformTheme", "Restore Defaults");
+    default:
+        break;
+    }
+    return QString();
+}
+
+QString QPlatformTheme::removeMnemonics(const QString &original)
+{
+    QString returnText(original.size(), 0);
+    int finalDest = 0;
+    int currPos = 0;
+    int l = original.length();
+    while (l) {
+        if (original.at(currPos) == QLatin1Char('&')) {
+            ++currPos;
+            --l;
+            if (l == 0)
+                break;
+        } else if (original.at(currPos) == QLatin1Char('(') && l >= 4 &&
+                   original.at(currPos + 1) == QLatin1Char('&') &&
+                   original.at(currPos + 2) != QLatin1Char('&') &&
+                   original.at(currPos + 3) == QLatin1Char(')')) {
+            /* remove mnemonics its format is "\s*(&X)" */
+            int n = 0;
+            while (finalDest > n && returnText.at(finalDest - n - 1).isSpace())
+                ++n;
+            finalDest -= n;
+            currPos += 4;
+            l -= 4;
+            continue;
+        }
+        returnText[finalDest] = original.at(currPos);
+        ++currPos;
+        ++finalDest;
+        --l;
+    }
+    returnText.truncate(finalDest);
+    return returnText;
+}
+
+unsigned QPlatformThemePrivate::currentKeyPlatforms()
+{
+    const uint keyboardScheme = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::KeyboardScheme).toInt();
+    unsigned result = 1u << keyboardScheme;
+#if QT_CONFIG(shortcut)
+    if (keyboardScheme == QPlatformTheme::KdeKeyboardScheme
+        || keyboardScheme == QPlatformTheme::GnomeKeyboardScheme
+        || keyboardScheme == QPlatformTheme::CdeKeyboardScheme)
+        result |= KB_X11;
+#endif
+    return result;
+}
+
+QT_END_NAMESPACE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qprintdialog_qws.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,567 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qplatformdefs.h"
+
+#include <private/qabstractprintdialog_p.h>
+#include "qprintdialog.h"
+
+#ifndef QT_NO_PRINTDIALOG
+
+#include "qapplication.h"
+#include "qbuttongroup.h"
+#include "qradiobutton.h"
+#include "qcombobox.h"
+#include "qspinbox.h"
+#include "qprinter.h"
+#include "qlineedit.h"
+#include "qdir.h"
+#include "qmessagebox.h"
+#include "qinputdialog.h"
+#include "qlayout.h"
+#include "qlabel.h"
+
+#include "qlibrary.h"
+
+#ifndef QT_NO_NIS
+
+#ifndef BOOL_DEFINED
+#define BOOL_DEFINED
+#endif
+
+#include <rpcsvc/ypclnt.h>
+#include <rpcsvc/yp_prot.h>
+
+#endif //QT_NO_NIS
+
+#include <ctype.h>
+#include <stdlib.h>
+
+#include <qdebug.h>
+
+QT_BEGIN_NAMESPACE
+
+typedef void (*QPrintDialogCreator)(QPrintDialog *parent);
+Q_GUI_EXPORT QPrintDialogCreator _qt_print_dialog_creator;
+
+class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
+{
+    Q_DECLARE_PUBLIC(QPrintDialog)
+public:
+    QButtonGroup *printerOrFile;
+    bool outputToFile;
+    QRadioButton *printToPrinterButton;
+    QRadioButton *printToFileButton;
+    QLineEdit *fileName;
+
+    QButtonGroup *colorMode;
+    QRadioButton *printColor;
+    QRadioButton *printGray;
+    QPrinter::ColorMode colorMode2;
+
+    QComboBox *orientationCombo, *sizeCombo;
+    QPrinter::PaperSize pageSize;
+    QPrinter::Orientation orientation;
+
+    QSpinBox *copies;
+    int numCopies;
+    QPrinter::PaperSize indexToPaperSize[QPrinter::NPaperSize];
+
+    QComboBox *rangeCombo;
+    QSpinBox *firstPage;
+    QSpinBox *lastPage;
+
+    QComboBox *pageOrderCombo;
+    QPrinter::PageOrder pageOrder2;
+
+    QString faxNum;
+
+    void init();
+
+    void _q_okClicked();
+    void _q_printerOrFileSelected(QAbstractButton *b);
+    void _q_paperSizeSelected(int);
+    void _q_orientSelected(int);
+    void _q_pageOrderSelected(int);
+    void _q_colorModeSelected(QAbstractButton *);
+    void _q_setNumCopies(int);
+    void _q_printRangeSelected(int);
+    void _q_setFirstPage(int);
+    void _q_setLastPage(int);
+    void _q_fileNameEditChanged(const QString &text);
+
+    void setupDestination();
+    void setupPrinterSettings();
+    void setupPaper();
+    void setupOptions();
+
+    void setPrinter(QPrinter *p, bool pickUpSettings);
+};
+
+static void isc(QPrintDialogPrivate *d, const QString & text,
+                 QPrinter::PaperSize ps);
+
+void QPrintDialogPrivate::_q_okClicked()
+{
+    Q_Q(QPrintDialog);
+#ifndef QT_NO_MESSAGEBOX
+    if (outputToFile && fileName->isModified() && QFileInfo(fileName->text()).exists()) {
+        int confirm = QMessageBox::warning(
+            q, QPrintDialog::tr("File exists"),
+            QPrintDialog::tr("<qt>Do you want to overwrite it?</qt>"),
+            QMessageBox::Yes, QMessageBox::No);
+        if (confirm == QMessageBox::No)
+            return;
+    }
+#endif // QT_NO_MESSAGEBOX
+
+    lastPage->interpretText();
+    firstPage->interpretText();
+    copies->interpretText();
+    if (outputToFile) {
+        printer->setOutputFileName(fileName->text());
+    }
+    printer->setOrientation(orientation);
+    printer->setPaperSize(pageSize);
+    printer->setPageOrder(pageOrder2);
+    printer->setColorMode(colorMode2);
+    printer->setCopyCount(numCopies);
+
+    switch ((rangeCombo->itemData(rangeCombo->currentIndex())).toInt()){
+    case (int)QPrintDialog::AllPages:
+        q->setPrintRange(QPrintDialog::AllPages);
+        q->setFromTo(0, 0);
+        break;
+    case (int)QPrintDialog::Selection:
+        q->setPrintRange(QPrintDialog::Selection);
+        q->setFromTo(0, 0);
+        break;
+    case (int)QPrintDialog::PageRange:
+        q->setPrintRange(QPrintDialog::PageRange);
+        q->setFromTo(firstPage->value(), lastPage->value());
+        break;
+    case (int)QPrintDialog::CurrentPage:
+        q->setPrintRange(QPrintDialog::CurrentPage);
+        q->setFromTo(0, 0);
+        break;
+    }
+    q->accept();
+}
+
+void QPrintDialogPrivate::_q_printerOrFileSelected(QAbstractButton *b)
+{
+    outputToFile = (b == printToFileButton);
+    if (outputToFile) {
+        _q_fileNameEditChanged(fileName->text());
+        if (!fileName->isModified() && fileName->text().isEmpty()) {
+            QString file = "print.tiff";
+            fileName->setText(file);
+            fileName->setCursorPosition(file.length());
+            fileName->selectAll();
+            fileName->setModified(true); // confirm overwrite when OK clicked
+
+        }
+        fileName->setEnabled(true);
+        fileName->setFocus();
+    } else {
+        fileName->setText(QString());
+        if (fileName->isEnabled())
+            fileName->setEnabled(false);
+    }
+}
+
+void QPrintDialogPrivate::_q_paperSizeSelected(int id)
+{
+    if (id < QPrinter::NPaperSize)
+        pageSize = QPrinter::PaperSize(indexToPaperSize[id]);
+}
+
+void QPrintDialogPrivate::_q_orientSelected(int id)
+{
+    orientation = (QPrinter::Orientation)id;
+}
+
+void QPrintDialogPrivate::_q_pageOrderSelected(int id)
+{
+    pageOrder2 = (QPrinter::PageOrder)id;
+}
+
+void QPrintDialogPrivate::_q_colorModeSelected(QAbstractButton *b)
+{
+    colorMode2 = (b == printColor) ? QPrinter::Color : QPrinter::GrayScale;
+}
+
+void QPrintDialogPrivate::_q_setNumCopies(int copies)
+{
+    numCopies = copies;
+}
+
+void QPrintDialogPrivate::_q_printRangeSelected(int id)
+{
+    bool enable = (rangeCombo->itemData(id).toInt() == (int)QPrintDialog::PageRange);
+    firstPage->setEnabled(enable);
+    lastPage->setEnabled(enable);
+}
+
+void QPrintDialogPrivate::_q_setFirstPage(int fp)
+{
+    Q_Q(QPrintDialog);
+    if (printer) {
+        lastPage->setMinimum(fp);
+        lastPage->setMaximum(qMax(fp, q->maxPage()));
+    }
+}
+
+void QPrintDialogPrivate::_q_setLastPage(int lp)
+{
+    Q_Q(QPrintDialog);
+    if (printer) {
+        firstPage->setMinimum(qMin(lp, q->minPage()));
+        firstPage->setMaximum(lp);
+    }
+}
+
+void QPrintDialogPrivate::_q_fileNameEditChanged(const QString &text)
+{
+    Q_UNUSED(text);
+}
+
+void QPrintDialogPrivate::setupDestination()
+{
+    Q_Q(QPrintDialog);
+
+    // print destinations
+    printerOrFile = new QButtonGroup(q);
+    QObject::connect(printerOrFile, SIGNAL(buttonClicked(QAbstractButton*)),
+            q, SLOT(_q_printerOrFileSelected(QAbstractButton*)));
+
+    printToPrinterButton = q->findChild<QRadioButton *>("printToPrinterButton");
+    printerOrFile->addButton(printToPrinterButton);
+    printToFileButton = q->findChild<QRadioButton *>("printToFileButton");
+    printerOrFile->addButton(printToFileButton);
+
+    // file name
+    fileName = q->findChild<QLineEdit *>("fileName");
+    QObject::connect(fileName, SIGNAL(textChanged(QString)),
+            q, SLOT(_q_fileNameEditChanged(QString)));
+
+    outputToFile = false;
+}
+
+void QPrintDialogPrivate::setupPrinterSettings()
+{
+    Q_Q(QPrintDialog);
+
+    // color mode
+    colorMode = new QButtonGroup(q);
+    QObject::connect(colorMode, SIGNAL(buttonClicked(QAbstractButton*)),
+        q, SLOT(_q_colorModeSelected(QAbstractButton*)));
+
+    printColor = q->findChild<QRadioButton *>("printColor");
+    colorMode->addButton(printColor);
+    printGray = q->findChild<QRadioButton *>("printGray");
+    colorMode->addButton(printGray);
+}
+
+void isc(QPrintDialogPrivate *ptr, const QString & text, QPrinter::PaperSize ps)
+{
+    if (ptr && !text.isEmpty() && ps < QPrinter::NPaperSize) {
+        ptr->sizeCombo->addItem(text);
+        int index = ptr->sizeCombo->count()-1;
+        if (index >= 0 && index < QPrinter::NPaperSize)
+            ptr->indexToPaperSize[index] = ps;
+    }
+}
+
+void QPrintDialogPrivate::setupPaper()
+{
+    Q_Q(QPrintDialog);
+
+    pageSize = QPrinter::A4;
+
+    // paper orientation
+    orientationCombo = q->findChild<QComboBox *>("orientationCombo");
+    orientation = QPrinter::Portrait;
+    QObject::connect(orientationCombo, SIGNAL(activated(int)),
+            q, SLOT(_q_orientSelected(int)));
+
+    // paper size
+    sizeCombo = q->findChild<QComboBox *>("sizeCombo");
+
+    int n;
+    for(n=0; n<QPrinter::NPaperSize; n++)
+        indexToPaperSize[n] = QPrinter::A4;
+
+    isc(this, QPrintDialog::tr("A0 (841 x 1189 mm)"), QPrinter::A0);
+    isc(this, QPrintDialog::tr("A1 (594 x 841 mm)"), QPrinter::A1);
+    isc(this, QPrintDialog::tr("A2 (420 x 594 mm)"), QPrinter::A2);
+    isc(this, QPrintDialog::tr("A3 (297 x 420 mm)"), QPrinter::A3);
+    isc(this, QPrintDialog::tr("A4 (210 x 297 mm, 8.26 x 11.7 inches)"), QPrinter::A4);
+    isc(this, QPrintDialog::tr("A5 (148 x 210 mm)"), QPrinter::A5);
+    isc(this, QPrintDialog::tr("A6 (105 x 148 mm)"), QPrinter::A6);
+    isc(this, QPrintDialog::tr("A7 (74 x 105 mm)"), QPrinter::A7);
+    isc(this, QPrintDialog::tr("A8 (52 x 74 mm)"), QPrinter::A8);
+    isc(this, QPrintDialog::tr("A9 (37 x 52 mm)"), QPrinter::A9);
+    isc(this, QPrintDialog::tr("B0 (1000 x 1414 mm)"), QPrinter::B0);
+    isc(this, QPrintDialog::tr("B1 (707 x 1000 mm)"), QPrinter::B1);
+    isc(this, QPrintDialog::tr("B2 (500 x 707 mm)"), QPrinter::B2);
+    isc(this, QPrintDialog::tr("B3 (353 x 500 mm)"), QPrinter::B3);
+    isc(this, QPrintDialog::tr("B4 (250 x 353 mm)"), QPrinter::B4);
+    isc(this, QPrintDialog::tr("B5 (176 x 250 mm, 6.93 x 9.84 inches)"), QPrinter::B5);
+    isc(this, QPrintDialog::tr("B6 (125 x 176 mm)"), QPrinter::B6);
+    isc(this, QPrintDialog::tr("B7 (88 x 125 mm)"), QPrinter::B7);
+    isc(this, QPrintDialog::tr("B8 (62 x 88 mm)"), QPrinter::B8);
+    isc(this, QPrintDialog::tr("B9 (44 x 62 mm)"), QPrinter::B9);
+    isc(this, QPrintDialog::tr("B10 (31 x 44 mm)"), QPrinter::B10);
+    isc(this, QPrintDialog::tr("C5E (163 x 229 mm)"), QPrinter::C5E);
+    isc(this, QPrintDialog::tr("DLE (110 x 220 mm)"), QPrinter::DLE);
+    isc(this, QPrintDialog::tr("Executive (7.5 x 10 inches, 191 x 254 mm)"), QPrinter::Executive);
+    isc(this, QPrintDialog::tr("Folio (210 x 330 mm)"), QPrinter::Folio);
+    isc(this, QPrintDialog::tr("Ledger (432 x 279 mm)"), QPrinter::Ledger);
+    isc(this, QPrintDialog::tr("Legal (8.5 x 14 inches, 216 x 356 mm)"), QPrinter::Legal);
+    isc(this, QPrintDialog::tr("Letter (8.5 x 11 inches, 216 x 279 mm)"), QPrinter::Letter);
+    isc(this, QPrintDialog::tr("Tabloid (279 x 432 mm)"), QPrinter::Tabloid);
+    isc(this, QPrintDialog::tr("US Common #10 Envelope (105 x 241 mm)"), QPrinter::Comm10E);
+
+    QObject::connect(sizeCombo, SIGNAL(activated(int)),
+             q, SLOT(_q_paperSizeSelected(int)));
+}
+
+void QPrintDialogPrivate::setupOptions()
+{
+    Q_Q(QPrintDialog);
+
+    // no. of copies
+    copies = q->findChild<QSpinBox *>("copies");
+    QObject::connect(copies, SIGNAL(valueChanged(int)),
+            q, SLOT(_q_setNumCopies(int)));
+
+    // print range
+    rangeCombo = q->findChild<QComboBox *>("rangeCombo");
+    rangeCombo->addItem(QPrintDialog::tr("Print all"), QPrintDialog::AllPages);
+    rangeCombo->addItem(QPrintDialog::tr("Print selection"), QPrintDialog::Selection);
+    rangeCombo->addItem(QPrintDialog::tr("Print range"), QPrintDialog::PageRange);
+    rangeCombo->addItem(QPrintDialog::tr("Print current page"), QPrintDialog::CurrentPage);
+    QObject::connect(rangeCombo, SIGNAL(activated(int)),
+            q, SLOT(_q_printRangeSelected(int)));
+
+    // page range
+    firstPage = q->findChild<QSpinBox *>("firstPage");
+    firstPage->setRange(1, 9999);
+    firstPage->setValue(1);
+    QObject::connect(firstPage, SIGNAL(valueChanged(int)),
+            q, SLOT(_q_setFirstPage(int)));
+
+    lastPage = q->findChild<QSpinBox *>("lastPage");
+    lastPage->setRange(1, 9999);
+    lastPage->setValue(1);
+    QObject::connect(lastPage, SIGNAL(valueChanged(int)),
+            q, SLOT(_q_setLastPage(int)));
+
+    // print order
+    pageOrderCombo = q->findChild<QComboBox *>("pageOrderCombo");
+    QObject::connect(pageOrderCombo, SIGNAL(activated(int)),
+            q, SLOT(_q_pageOrderSelected(int)));
+}
+
+bool QPrintDialog::eventFilter(QObject *o, QEvent *e)
+{
+    Q_UNUSED(o);
+
+    Q_D(QPrintDialog);
+    switch (e->type()){
+    case QEvent::KeyPress:
+        switch (static_cast<QKeyEvent*>(e)->key()) {
+        case Qt::Key_Back:
+            d->_q_okClicked();
+            return true;
+        }
+        break;
+    default:
+        break;
+    }
+    return false;
+}
+
+QPrintDialog::QPrintDialog(QPrinter *printer, QWidget *parent)
+    : QAbstractPrintDialog(*(new QPrintDialogPrivate), printer, parent)
+{
+    d_func()->init();
+}
+
+QPrintDialog::QPrintDialog(QWidget *parent)
+    : QAbstractPrintDialog(*(new QPrintDialogPrivate), 0, parent)
+{
+    d_func()->init();
+}
+
+QPrintDialog::~QPrintDialog()
+{
+}
+
+void QPrintDialogPrivate::setPrinter(QPrinter *p, bool pickUpSettings)
+{
+    Q_Q(QPrintDialog);
+    printer = p;
+
+    if (p && pickUpSettings) {
+        // top to bottom in the old dialog.
+        // printer or file
+        outputToFile = !p->outputFileName().isEmpty() && q->isOptionEnabled(QPrintDialog::PrintToFile);
+        if (outputToFile)
+            printToFileButton->setChecked(true);
+        else
+            printToPrinterButton->setChecked(true);
+        fileName->setEnabled(outputToFile);
+
+        // file name
+        if (q->isOptionEnabled(QPrintDialog::PrintToFile)) {
+            fileName->setText(p->outputFileName());
+            fileName->setModified(!fileName->text().isEmpty());
+        } else {
+            printToFileButton->setEnabled(false);
+        }
+
+        // orientation
+        orientationCombo->setCurrentIndex((int)p->orientation());
+        _q_orientSelected(p->orientation());
+
+        // page size
+        int n = 0;
+        while (n < QPrinter::NPaperSize &&
+                indexToPaperSize[n] != p->pageSize())
+            n++;
+        sizeCombo->setCurrentIndex(n);
+        _q_paperSizeSelected(n);
+
+        // page order
+        pageOrder2 = p->pageOrder();
+        pageOrderCombo->setCurrentIndex((int)pageOrder2);
+
+        // color mode
+        colorMode2 = p->colorMode();
+        if (colorMode2 == QPrinter::Color)
+            printColor->setChecked(true);
+        else
+            printGray->setChecked(true);
+
+        // number of copies
+        copies->setValue(p->copyCount());
+        _q_setNumCopies(p->copyCount());
+    }
+
+    if (p) {
+        if (!q->isOptionEnabled(QPrintDialog::PrintSelection)
+                && rangeCombo->findData(QPrintDialog::Selection) > 0)
+            rangeCombo->removeItem(rangeCombo->findData(QPrintDialog::Selection));
+        if (!q->isOptionEnabled(QPrintDialog::PrintPageRange)
+                && rangeCombo->findData(QPrintDialog::PageRange) > 0)
+            rangeCombo->removeItem(rangeCombo->findData(QPrintDialog::PageRange));
+        if (!q->isOptionEnabled(QPrintDialog::PrintCurrentPage)
+                && rangeCombo->findData(QPrintDialog::CurrentPage) > 0)
+            rangeCombo->removeItem(rangeCombo->findData(QPrintDialog::CurrentPage));
+
+        switch (q->printRange()) {
+        case QPrintDialog::AllPages:
+            rangeCombo->setCurrentIndex((int)(QPrintDialog::AllPages));
+            break;
+        case QPrintDialog::Selection:
+            rangeCombo->setCurrentIndex((int)(QPrintDialog::Selection));
+            break;
+        case QPrintDialog::PageRange:
+            rangeCombo->setCurrentIndex((int)(QPrintDialog::PageRange));
+            break;
+        case QPrintDialog::CurrentPage:
+            rangeCombo->setCurrentIndex((int)(QPrintDialog::CurrentPage));
+            break;
+        }
+    }
+
+    if (p && q->maxPage()) {
+        int from = q->minPage();
+        int to = q->maxPage();
+        if (q->printRange() == QPrintDialog::PageRange) {
+            from = q->fromPage();
+            to = q->toPage();
+        }
+        firstPage->setRange(q->minPage(), to);
+        lastPage->setRange(from, q->maxPage());
+        firstPage->setValue(from);
+        lastPage->setValue(to);
+    }
+}
+
+int QPrintDialog::exec()
+{
+    Q_D(QPrintDialog);
+    d->setPrinter(d->printer, true);
+    return QDialog::exec();
+}
+
+void QPrintDialogPrivate::init()
+{
+    Q_Q(QPrintDialog);
+    numCopies = 1;
+
+    if (_qt_print_dialog_creator)
+        (*_qt_print_dialog_creator)(q);
+
+    setupDestination();
+    setupPrinterSettings();
+    setupPaper();
+    setupOptions();
+
+    setPrinter(printer, true);
+
+    q->installEventFilter(q);
+}
+
+void QPrintDialog::setVisible(bool visible)
+{
+    QAbstractPrintDialog::setVisible(visible);
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qprintdialog.cpp"
+#include "qrc_qprintdialog.cpp"
+
+#endif // QT_NO_PRINTDIALOG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qprintdialog_unix.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,1309 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qplatformdefs.h"
+
+#ifndef QT_NO_PRINTDIALOG
+
+#include "private/qabstractprintdialog_p.h"
+#include <QtGui/qmessagebox.h>
+#include "qprintdialog.h"
+#include "qfiledialog.h"
+#include <QtCore/qdir.h>
+#include <QtGui/qevent.h>
+#include <QtGui/qfilesystemmodel.h>
+#include <QtGui/qstyleditemdelegate.h>
+#include <QtGui/qprinter.h>
+
+#include <QtGui/qdialogbuttonbox.h>
+
+#include "qfscompleter_p.h"
+#include "ui_qprintpropertieswidget.h"
+#include "ui_qprintsettingsoutput.h"
+#include "ui_qprintwidget.h"
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+#  include <private/qcups_p.h>
+#  include <cups/cups.h>
+#  include <private/qpdf_p.h>
+#else
+#  include <QtCore/qlibrary.h>
+#endif
+
+#include <private/qprinterinfo_unix_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QOptionTreeItem;
+class QPPDOptionsModel;
+
+class QPrintPropertiesDialog : public QDialog
+{
+    Q_OBJECT
+public:
+    QPrintPropertiesDialog(QAbstractPrintDialog *parent = 0);
+    ~QPrintPropertiesDialog();
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    void setCups(QCUPSSupport *cups) { m_cups = cups; }
+    void addItemToOptions(QOptionTreeItem *parent, QList<const ppd_option_t*>& options, QList<const char*>& markedOptions) const;
+#endif
+
+    void selectPrinter();
+    void selectPdfPsPrinter(const QPrinter *p);
+
+    /// copy printer properties to the widget
+    void applyPrinterProperties(QPrinter *p);
+    void setupPrinter() const;
+
+protected:
+    void showEvent(QShowEvent* event);
+
+private:
+    Ui::QPrintPropertiesWidget widget;
+    QDialogButtonBox *m_buttons;
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    QCUPSSupport *m_cups;
+    QPPDOptionsModel *m_cupsOptionsModel;
+#endif
+};
+
+class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
+{
+    Q_DECLARE_PUBLIC(QPrintDialog)
+    Q_DECLARE_TR_FUNCTIONS(QPrintDialog)
+public:
+    QPrintDialogPrivate();
+    ~QPrintDialogPrivate();
+
+    void init();
+    /// copy printer properties to the widget
+    void applyPrinterProperties(QPrinter *p);
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    void selectPrinter(QCUPSSupport *cups);
+#endif
+
+    void _q_chbPrintLastFirstToggled(bool);
+#ifndef QT_NO_MESSAGEBOX
+    void _q_checkFields();
+#endif
+    void _q_collapseOrExpandDialog();
+
+    void setupPrinter();
+    void updateWidgets();
+
+    virtual void setTabs(const QList<QWidget*> &tabs);
+
+    Ui::QPrintSettingsOutput options;
+    QUnixPrintWidget *top;
+    QWidget *bottom;
+    QDialogButtonBox *buttons;
+    QPushButton *collapseButton;
+};
+
+#if defined (Q_OS_UNIX)
+class QUnixPrintWidgetPrivate
+{
+public:
+    QUnixPrintWidgetPrivate(QUnixPrintWidget *q);
+    ~QUnixPrintWidgetPrivate();
+
+    /// copy printer properties to the widget
+    void applyPrinterProperties(QPrinter *p);
+    bool checkFields();
+    void setupPrinter();
+    void setOptionsPane(QPrintDialogPrivate *pane);
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    void setCupsProperties();
+#endif
+
+// slots
+    void _q_printerChanged(int index);
+    void _q_btnPropertiesClicked();
+    void _q_btnBrowseClicked();
+
+    QUnixPrintWidget * const parent;
+    QPrintPropertiesDialog *propertiesDialog;
+    Ui::QPrintWidget widget;
+    QAbstractPrintDialog * q;
+    QPrinter *printer;
+    QList<QPrinterDescription> lprPrinters;
+    void updateWidget();
+
+private:
+    QPrintDialogPrivate *optionsPane;
+    bool filePrintersAdded;
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    QCUPSSupport* cups;
+    int cupsPrinterCount;
+    const cups_dest_t* cupsPrinters;
+    const ppd_file_t* cupsPPD;
+#endif
+};
+#endif
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+class QOptionTreeItem
+{
+public:
+    enum ItemType { Root, Group, Option, Choice };
+
+    QOptionTreeItem(ItemType t, int i, const void* p, const char* desc, QOptionTreeItem* pi)
+        : type(t),
+          index(i),
+          ptr(p),
+          description(desc),
+          selected(-1),
+          selDescription(0),
+          parentItem(pi) {}
+
+    ~QOptionTreeItem() {
+        while (!childItems.isEmpty())
+            delete childItems.takeFirst();
+    }
+
+    ItemType type;
+    int index;
+    const void* ptr;
+    const char* description;
+    int selected;
+    const char* selDescription;
+    QOptionTreeItem* parentItem;
+    QList<QOptionTreeItem*> childItems;
+};
+
+class QPPDOptionsModel : public QAbstractItemModel
+{
+    friend class QPPDOptionsEditor;
+public:
+    QPPDOptionsModel(QCUPSSupport *cups, QObject *parent = 0);
+    ~QPPDOptionsModel();
+
+    int columnCount(const QModelIndex& parent = QModelIndex()) const;
+    int rowCount(const QModelIndex& parent = QModelIndex()) const;
+    QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
+    QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
+    QModelIndex parent(const QModelIndex& index) const;
+    Qt::ItemFlags flags(const QModelIndex& index) const;
+    QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+
+    QOptionTreeItem* rootItem;
+    QCUPSSupport *cups;
+    const ppd_file_t* ppd;
+    void parseItems();
+    void parseGroups(QOptionTreeItem* parent);
+    void parseOptions(QOptionTreeItem* parent);
+    void parseChoices(QOptionTreeItem* parent);
+};
+
+class QPPDOptionsEditor : public QStyledItemDelegate
+{
+    Q_OBJECT
+public:
+    QPPDOptionsEditor(QObject* parent = 0) : QStyledItemDelegate(parent) {}
+    ~QPPDOptionsEditor() {}
+
+    QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
+    void setEditorData(QWidget* editor, const QModelIndex& index) const;
+    void setModelData( QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
+
+private slots:
+    void cbChanged(int index);
+
+};
+
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+QPrintPropertiesDialog::QPrintPropertiesDialog(QAbstractPrintDialog *parent)
+    : QDialog(parent)
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    , m_cups(0), m_cupsOptionsModel(0)
+#endif
+{
+    QVBoxLayout *lay = new QVBoxLayout(this);
+    this->setLayout(lay);
+    QWidget *content = new QWidget(this);
+    widget.setupUi(content);
+    m_buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
+    lay->addWidget(content);
+    lay->addWidget(m_buttons);
+
+    connect(m_buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(accept()));
+    connect(m_buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(reject()));
+}
+
+QPrintPropertiesDialog::~QPrintPropertiesDialog()
+{
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    delete m_cupsOptionsModel;
+#else
+    delete widget.cupsPropertiesPage;
+#endif
+}
+
+void QPrintPropertiesDialog::applyPrinterProperties(QPrinter *p)
+{
+    widget.pageSetup->setPrinter(p);
+}
+
+void QPrintPropertiesDialog::setupPrinter() const
+{
+    widget.pageSetup->setupPrinter();
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    QPPDOptionsModel* model = static_cast<QPPDOptionsModel*>(widget.treeView->model());
+    if (model) {
+        QOptionTreeItem* rootItem = model->rootItem;
+        QList<const ppd_option_t*> options;
+        QList<const char*> markedOptions;
+
+        addItemToOptions(rootItem, options, markedOptions);
+        model->cups->saveOptions(options, markedOptions);
+    }
+#endif
+}
+
+void QPrintPropertiesDialog::selectPrinter()
+{
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    widget.pageSetup->selectPrinter(m_cups);
+    widget.treeView->setModel(0);
+    if (m_cups && QCUPSSupport::isAvailable()) {
+
+        if (m_cupsOptionsModel == 0) {
+            m_cupsOptionsModel = new QPPDOptionsModel(m_cups);
+
+            widget.treeView->setItemDelegate(new QPPDOptionsEditor(this));
+        } else {
+            // update the model
+            m_cupsOptionsModel->parseItems();
+        }
+
+        if (m_cupsOptionsModel->rowCount() > 0) {
+            widget.treeView->setModel(m_cupsOptionsModel);
+
+            for (int i = 0; i < m_cupsOptionsModel->rowCount(); ++i)
+                widget.treeView->expand(m_cupsOptionsModel->index(i,0));
+
+            widget.tabs->setTabEnabled(1, true); // enable the advanced tab
+        } else {
+            widget.tabs->setTabEnabled(1, false);
+        }
+
+    } else
+#endif
+    {
+        widget.cupsPropertiesPage->setEnabled(false);
+        widget.pageSetup->selectPrinter(0);
+    }
+}
+
+void QPrintPropertiesDialog::selectPdfPsPrinter(const QPrinter *p)
+{
+    widget.treeView->setModel(0);
+    widget.pageSetup->selectPdfPsPrinter(p);
+    widget.tabs->setTabEnabled(1, false); // disable the advanced tab
+}
+
+void QPrintPropertiesDialog::showEvent(QShowEvent* event)
+{
+    widget.treeView->resizeColumnToContents(0);
+    event->accept();
+}
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+void QPrintPropertiesDialog::addItemToOptions(QOptionTreeItem *parent, QList<const ppd_option_t*>& options, QList<const char*>& markedOptions) const
+{
+    for (int i = 0; i < parent->childItems.count(); ++i) {
+        QOptionTreeItem *itm = parent->childItems.at(i);
+        if (itm->type == QOptionTreeItem::Option) {
+            const ppd_option_t* opt = reinterpret_cast<const ppd_option_t*>(itm->ptr);
+            options << opt;
+            if (qstrcmp(opt->defchoice, opt->choices[itm->selected].choice) != 0) {
+                markedOptions << opt->keyword << opt->choices[itm->selected].choice;
+            }
+        } else {
+            addItemToOptions(itm, options, markedOptions);
+        }
+    }
+}
+#endif
+
+QPrintDialogPrivate::QPrintDialogPrivate()
+    : top(0), bottom(0), buttons(0), collapseButton(0)
+{
+}
+
+QPrintDialogPrivate::~QPrintDialogPrivate()
+{
+}
+
+void QPrintDialogPrivate::init()
+{
+    Q_Q(QPrintDialog);
+
+    top = new QUnixPrintWidget(0, q);
+    bottom = new QWidget(q);
+    options.setupUi(bottom);
+    options.color->setIconSize(QSize(32, 32));
+    options.color->setIcon(QIcon(QLatin1String(":/trolltech/dialogs/qprintdialog/images/status-color.png")));
+    options.grayscale->setIconSize(QSize(32, 32));
+    options.grayscale->setIcon(QIcon(QLatin1String(":/trolltech/dialogs/qprintdialog/images/status-gray-scale.png")));
+    top->d->setOptionsPane(this);
+
+    buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, q);
+    collapseButton = new QPushButton(QPrintDialog::tr("&Options >>"), buttons);
+    buttons->addButton(collapseButton, QDialogButtonBox::ResetRole);
+    bottom->setVisible(false);
+
+    QPushButton *printButton = buttons->button(QDialogButtonBox::Ok);
+    printButton->setText(QPrintDialog::tr("&Print"));
+    printButton->setDefault(true);
+
+    QVBoxLayout *lay = new QVBoxLayout(q);
+    q->setLayout(lay);
+    lay->addWidget(top);
+    lay->addWidget(bottom);
+    lay->addWidget(buttons);
+
+    QPrinter* p = q->printer();
+
+    applyPrinterProperties(p);
+
+#ifdef QT_NO_MESSAGEBOX
+    QObject::connect(buttons, SIGNAL(accepted()), q, SLOT(accept()));
+#else
+    QObject::connect(buttons, SIGNAL(accepted()), q, SLOT(_q_checkFields()));
+#endif
+    QObject::connect(buttons, SIGNAL(rejected()), q, SLOT(reject()));
+
+    QObject::connect(options.reverse, SIGNAL(toggled(bool)),
+                     q, SLOT(_q_chbPrintLastFirstToggled(bool)));
+
+    QObject::connect(collapseButton, SIGNAL(released()), q, SLOT(_q_collapseOrExpandDialog()));
+}
+
+void QPrintDialogPrivate::applyPrinterProperties(QPrinter *p)
+{
+    if (p->colorMode() == QPrinter::Color)
+        options.color->setChecked(true);
+    else
+        options.grayscale->setChecked(true);
+
+    switch(p->duplex()) {
+    case QPrinter::DuplexNone:
+        options.noDuplex->setChecked(true); break;
+    case QPrinter::DuplexLongSide:
+    case QPrinter::DuplexAuto:
+        options.duplexLong->setChecked(true); break;
+    case QPrinter::DuplexShortSide:
+        options.duplexShort->setChecked(true); break;
+    }
+    options.copies->setValue(p->copyCount());
+    options.collate->setChecked(p->collateCopies());
+    options.reverse->setChecked(p->pageOrder() == QPrinter::LastPageFirst);
+    top->d->applyPrinterProperties(p);
+}
+
+void QPrintDialogPrivate::_q_chbPrintLastFirstToggled(bool checked)
+{
+    Q_Q(QPrintDialog);
+    if (checked)
+        q->printer()->setPageOrder(QPrinter::LastPageFirst);
+    else
+        q->printer()->setPageOrder(QPrinter::FirstPageFirst);
+}
+
+void QPrintDialogPrivate::_q_collapseOrExpandDialog()
+{
+    int collapseHeight = 0;
+    Q_Q(QPrintDialog);
+    QWidget *widgetToHide = bottom;
+    if (widgetToHide->isVisible()) {
+        collapseButton->setText(QPrintDialog::tr("&Options >>"));
+        collapseHeight = widgetToHide->y() + widgetToHide->height() - (top->y() + top->height());
+    }
+    else
+        collapseButton->setText(QPrintDialog::tr("&Options <<"));
+    widgetToHide->setVisible(! widgetToHide->isVisible());
+    if (! widgetToHide->isVisible()) { // make it shrink
+        q->layout()->activate();
+        q->resize( QSize(q->width(), q->height() - collapseHeight) );
+    }
+}
+
+#ifndef QT_NO_MESSAGEBOX
+void QPrintDialogPrivate::_q_checkFields()
+{
+    Q_Q(QPrintDialog);
+    if (top->d->checkFields())
+        q->accept();
+}
+#endif // QT_NO_MESSAGEBOX
+
+void QPrintDialogPrivate::setupPrinter()
+{
+    Q_Q(QPrintDialog);
+    QPrinter* p = q->printer();
+
+    if (options.duplex->isEnabled()) {
+        if (options.noDuplex->isChecked())
+            p->setDuplex(QPrinter::DuplexNone);
+        else if (options.duplexLong->isChecked())
+            p->setDuplex(QPrinter::DuplexLongSide);
+        else
+            p->setDuplex(QPrinter::DuplexShortSide);
+    }
+
+    p->setColorMode( options.color->isChecked() ? QPrinter::Color : QPrinter::GrayScale );
+
+    // print range
+    if (options.printAll->isChecked()) {
+        p->setPrintRange(QPrinter::AllPages);
+        p->setFromTo(0,0);
+    } else if (options.printSelection->isChecked()) {
+        p->setPrintRange(QPrinter::Selection);
+        p->setFromTo(0,0);
+    } else if (options.printCurrentPage->isChecked()) {
+        p->setPrintRange(QPrinter::CurrentPage);
+        p->setFromTo(0,0);
+    } else if (options.printRange->isChecked()) {
+        p->setPrintRange(QPrinter::PageRange);
+        p->setFromTo(options.from->value(), qMax(options.from->value(), options.to->value()));
+    }
+
+    // copies
+    p->setCopyCount(options.copies->value());
+    p->setCollateCopies(options.collate->isChecked());
+
+    top->d->setupPrinter();
+}
+
+void QPrintDialogPrivate::updateWidgets()
+{
+    Q_Q(QPrintDialog);
+    options.gbPrintRange->setVisible(q->isOptionEnabled(QPrintDialog::PrintPageRange) ||
+                                     q->isOptionEnabled(QPrintDialog::PrintSelection) ||
+                                     q->isOptionEnabled(QPrintDialog::PrintCurrentPage));
+
+    options.printRange->setEnabled(q->isOptionEnabled(QPrintDialog::PrintPageRange));
+    options.printSelection->setVisible(q->isOptionEnabled(QPrintDialog::PrintSelection));
+    options.printCurrentPage->setVisible(q->isOptionEnabled(QPrintDialog::PrintCurrentPage));
+    options.collate->setVisible(q->isOptionEnabled(QPrintDialog::PrintCollateCopies));
+
+    switch (q->printRange()) {
+    case QPrintDialog::AllPages:
+        options.printAll->setChecked(true);
+        break;
+    case QPrintDialog::Selection:
+        options.printSelection->setChecked(true);
+        break;
+    case QPrintDialog::PageRange:
+        options.printRange->setChecked(true);
+        break;
+    case QPrintDialog::CurrentPage:
+        if (q->isOptionEnabled(QPrintDialog::PrintCurrentPage))
+            options.printCurrentPage->setChecked(true);
+        break;
+    default:
+        break;
+    }
+    const int minPage = qMax(1, qMin(q->minPage() , q->maxPage()));
+    const int maxPage = qMax(1, q->maxPage() == INT_MAX ? 9999 : q->maxPage());
+
+    options.from->setMinimum(minPage);
+    options.to->setMinimum(minPage);
+    options.from->setMaximum(maxPage);
+    options.to->setMaximum(maxPage);
+
+    options.from->setValue(q->fromPage());
+    options.to->setValue(q->toPage());
+    top->d->updateWidget();
+}
+
+void QPrintDialogPrivate::setTabs(const QList<QWidget*> &tabWidgets)
+{
+    while(options.tabs->count() > 2)
+        delete options.tabs->widget(2);
+
+    QList<QWidget*>::ConstIterator iter = tabWidgets.begin();
+    while(iter != tabWidgets.constEnd()) {
+        QWidget *tab = *iter;
+        options.tabs->addTab(tab, tab->windowTitle());
+        ++iter;
+    }
+}
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups)
+{
+    options.duplex->setEnabled(cups && cups->ppdOption("Duplex"));
+}
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+
+QPrintDialog::QPrintDialog(QPrinter *printer, QWidget *parent)
+    : QAbstractPrintDialog(*(new QPrintDialogPrivate), printer, parent)
+{
+    Q_D(QPrintDialog);
+    d->init();
+}
+
+/*!
+    Constructs a print dialog with the given \a parent.
+*/
+QPrintDialog::QPrintDialog(QWidget *parent)
+    : QAbstractPrintDialog(*(new QPrintDialogPrivate), 0, parent)
+{
+    Q_D(QPrintDialog);
+    d->init();
+}
+
+QPrintDialog::~QPrintDialog()
+{
+}
+
+void QPrintDialog::setVisible(bool visible)
+{
+    Q_D(QPrintDialog);
+
+    if (visible)
+        d->updateWidgets();
+
+    QAbstractPrintDialog::setVisible(visible);
+}
+
+int QPrintDialog::exec()
+{
+    return QDialog::exec();
+}
+
+void QPrintDialog::accept()
+{
+    Q_D(QPrintDialog);
+    d->setupPrinter();
+    QDialog::accept();
+}
+
+#ifdef QT3_SUPPORT
+QPrinter *QPrintDialog::printer() const
+{
+    Q_D(const QPrintDialog);
+    return d->printer;
+}
+
+void QPrintDialog::setPrinter(QPrinter *printer, bool pickupSettings)
+{
+    if (!printer)
+        return;
+
+    Q_D(QPrintDialog);
+    d->printer = printer;
+
+    if (pickupSettings)
+        d->applyPrinterProperties(printer);
+}
+
+void QPrintDialog::addButton(QPushButton *button)
+{
+    Q_D(QPrintDialog);
+    d->buttons->addButton(button, QDialogButtonBox::HelpRole);
+}
+#endif // QT3_SUPPORT
+
+#if defined (Q_OS_UNIX)
+
+/*! \internal
+*/
+QUnixPrintWidgetPrivate::QUnixPrintWidgetPrivate(QUnixPrintWidget *p)
+    : parent(p), propertiesDialog(0), printer(0), optionsPane(0), filePrintersAdded(false)
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    , cups(0), cupsPrinterCount(0), cupsPrinters(0), cupsPPD(0)
+#endif
+{
+    q = 0;
+    if (parent)
+        q = qobject_cast<QAbstractPrintDialog*> (parent->parent());
+
+    widget.setupUi(parent);
+
+    int currentPrinterIndex = 0;
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    cups = new QCUPSSupport;
+    if (QCUPSSupport::isAvailable()) {
+        cupsPPD = cups->currentPPD();
+        cupsPrinterCount = cups->availablePrintersCount();
+        cupsPrinters = cups->availablePrinters();
+
+        for (int i = 0; i < cupsPrinterCount; ++i) {
+            QString printerName(QString::fromLocal8Bit(cupsPrinters[i].name));
+            if (cupsPrinters[i].instance)
+                printerName += QLatin1Char('/') + QString::fromLocal8Bit(cupsPrinters[i].instance);
+
+            widget.printers->addItem(printerName);
+            if (cupsPrinters[i].is_default)
+                widget.printers->setCurrentIndex(i);
+        }
+        // the model depends on valid ppd. so before enabling the
+        // properties button we make sure the ppd is in fact valid.
+        if (cupsPrinterCount && cups->currentPPD()) {
+            widget.properties->setEnabled(true);
+        }
+        currentPrinterIndex = cups->currentPrinterIndex();
+    } else {
+#endif
+        currentPrinterIndex = qt_getLprPrinters(lprPrinters);
+        // populating printer combo
+        QList<QPrinterDescription>::const_iterator i = lprPrinters.constBegin();
+        for(; i != lprPrinters.constEnd(); ++i)
+            widget.printers->addItem((*i).name);
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    }
+#endif
+
+#if !defined(QT_NO_FILESYSTEMMODEL) && !defined(QT_NO_COMPLETER)
+    QFileSystemModel *fsm = new QFileSystemModel(widget.filename);
+    fsm->setRootPath(QDir::homePath());
+    widget.filename->setCompleter(new QCompleter(fsm, widget.filename));
+#endif
+    _q_printerChanged(currentPrinterIndex);
+
+    QObject::connect(widget.printers, SIGNAL(currentIndexChanged(int)),
+                     parent, SLOT(_q_printerChanged(int)));
+    QObject::connect(widget.fileBrowser, SIGNAL(clicked()), parent, SLOT(_q_btnBrowseClicked()));
+    QObject::connect(widget.properties, SIGNAL(clicked()), parent, SLOT(_q_btnPropertiesClicked()));
+
+    // disable features that QPrinter does not yet support.
+    widget.preview->setVisible(false);
+}
+
+void QUnixPrintWidgetPrivate::updateWidget()
+{
+    const bool printToFile = q == 0 || q->isOptionEnabled(QPrintDialog::PrintToFile);
+    if (printToFile && !filePrintersAdded) {
+        if (widget.printers->count())
+            widget.printers->insertSeparator(widget.printers->count());
+        widget.printers->addItem(QPrintDialog::tr("Print to File (PDF)"));
+        widget.printers->addItem(QPrintDialog::tr("Print to File (Postscript)"));
+        filePrintersAdded = true;
+    }
+    if (!printToFile && filePrintersAdded) {
+        widget.printers->removeItem(widget.printers->count()-1);
+        widget.printers->removeItem(widget.printers->count()-1);
+        if (widget.printers->count())
+            widget.printers->removeItem(widget.printers->count()-1); // remove separator
+        filePrintersAdded = false;
+    }
+    if (printer && filePrintersAdded && (printer->outputFormat() != QPrinter::NativeFormat
+                                         || printer->printerName().isEmpty()))
+    {
+        if (printer->outputFormat() == QPrinter::PdfFormat)
+            widget.printers->setCurrentIndex(widget.printers->count() - 2);
+        else if (printer->outputFormat() == QPrinter::PostScriptFormat)
+            widget.printers->setCurrentIndex(widget.printers->count() - 1);
+        widget.filename->setEnabled(true);
+        widget.lOutput->setEnabled(true);
+    }
+
+    widget.filename->setVisible(printToFile);
+    widget.lOutput->setVisible(printToFile);
+    widget.fileBrowser->setVisible(printToFile);
+
+    widget.properties->setVisible(q->isOptionEnabled(QAbstractPrintDialog::PrintShowPageSize));
+}
+
+QUnixPrintWidgetPrivate::~QUnixPrintWidgetPrivate()
+{
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    delete cups;
+#endif
+}
+
+void QUnixPrintWidgetPrivate::_q_printerChanged(int index)
+{
+    if (index < 0)
+        return;
+    const int printerCount = widget.printers->count();
+    widget.filename->setEnabled(false);
+    widget.lOutput->setEnabled(false);
+
+    if (filePrintersAdded) {
+        Q_ASSERT(index != printerCount - 3); // separator
+        if (index > printerCount - 3) { // PDF or postscript
+            bool pdfPrinter = (index == printerCount - 2);
+            widget.location->setText(QPrintDialog::tr("Local file"));
+            widget.type->setText(QPrintDialog::tr("Write %1 file").arg(pdfPrinter ? QString::fromLatin1("PDF")
+                                                                       : QString::fromLatin1("PostScript")));
+            widget.properties->setEnabled(true);
+            widget.filename->setEnabled(true);
+            QString filename = widget.filename->text();
+            QString suffix = QFileInfo(filename).suffix();
+            if (pdfPrinter && suffix == QLatin1String("ps"))
+                filename = filename.replace(QLatin1String(".ps"), QLatin1String(".pdf"));
+            if (!pdfPrinter && suffix == QLatin1String("pdf"))
+                filename = filename.replace(QLatin1String(".pdf"), QLatin1String(".ps"));
+            widget.filename->setText(filename);
+            widget.lOutput->setEnabled(true);
+            if (propertiesDialog)
+                propertiesDialog->selectPdfPsPrinter(printer);
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+            if (optionsPane)
+                optionsPane->selectPrinter(0);
+#endif
+            return;
+        }
+    }
+
+    widget.location->setText(QString());
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    if (QCUPSSupport::isAvailable()) {
+        cups->setCurrentPrinter(index);
+
+        const cups_option_t *opt = cups->printerOption(QString::fromLatin1("printer-location"));
+        QString location;
+        if (opt)
+            location = QString::fromLocal8Bit(opt->value);
+        widget.location->setText(location);
+
+        cupsPPD = cups->currentPPD();
+        // set printer type line
+        QString type;
+        if (cupsPPD)
+            type = QString::fromLocal8Bit(cupsPPD->manufacturer) + QLatin1String(" - ") + QString::fromLocal8Bit(cupsPPD->modelname);
+        widget.type->setText(type);
+        if (propertiesDialog)
+            propertiesDialog->selectPrinter();
+        if (optionsPane)
+            optionsPane->selectPrinter(cups);
+    } else {
+        if (optionsPane)
+            optionsPane->selectPrinter(0);
+#endif
+        if (lprPrinters.count() > 0) {
+            QString type = lprPrinters.at(index).name + QLatin1Char('@') + lprPrinters.at(index).host;
+            if (!lprPrinters.at(index).comment.isEmpty())
+            type += QLatin1String(", ") + lprPrinters.at(index).comment;
+            widget.type->setText(type);
+            if (propertiesDialog)
+                propertiesDialog->selectPrinter();
+        }
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    }
+#endif
+}
+
+void QUnixPrintWidgetPrivate::setOptionsPane(QPrintDialogPrivate *pane)
+{
+    optionsPane = pane;
+    if (optionsPane)
+        _q_printerChanged(widget.printers->currentIndex());
+}
+
+void QUnixPrintWidgetPrivate::_q_btnBrowseClicked()
+{
+    QString filename = widget.filename->text();
+#ifndef QT_NO_FILEDIALOG
+    filename = QFileDialog::getSaveFileName(parent, QPrintDialog::tr("Print To File ..."), filename,
+                                            QString(), 0, QFileDialog::DontConfirmOverwrite);
+#else
+    filename.clear();
+#endif
+    if (!filename.isEmpty()) {
+        widget.filename->setText(filename);
+        if (filename.endsWith(QString::fromLatin1(".ps"), Qt::CaseInsensitive))
+            widget.printers->setCurrentIndex(widget.printers->count() - 1); // the postscript one
+        else if (filename.endsWith(QString::fromLatin1(".pdf"), Qt::CaseInsensitive))
+            widget.printers->setCurrentIndex(widget.printers->count() - 2); // the pdf one
+        else if (widget.printers->currentIndex() != widget.printers->count() - 1) // if ps is not selected, pdf is default
+            widget.printers->setCurrentIndex(widget.printers->count() - 2); // the pdf one
+    }
+}
+
+void QUnixPrintWidgetPrivate::applyPrinterProperties(QPrinter *p)
+{
+    if (p == 0)
+        return;
+    printer = p;
+    if (p->outputFileName().isEmpty()) {
+        QString home = QString::fromLocal8Bit(qgetenv("HOME").constData());
+        QString cur = QDir::currentPath();
+        if (home.at(home.length()-1) != QLatin1Char('/'))
+            home += QLatin1Char('/');
+        if (cur.at(cur.length()-1) != QLatin1Char('/'))
+            cur += QLatin1Char('/');
+        if (cur.left(home.length()) != home)
+            cur = home;
+#ifdef Q_WS_X11
+        if (p->docName().isEmpty()) {
+            if (p->outputFormat() == QPrinter::PostScriptFormat)
+                cur += QLatin1String("print.ps");
+            else
+                cur += QLatin1String("print.pdf");
+        } else {
+            QRegExp re(QString::fromLatin1("(.*)\\.\\S+"));
+            if (re.exactMatch(p->docName()))
+                cur += re.cap(1);
+            else
+                cur += p->docName();
+            if (p->outputFormat() == QPrinter::PostScriptFormat)
+                cur += QLatin1String(".ps");
+            else
+                cur += QLatin1String(".pdf");
+        }
+#endif
+        widget.filename->setText(cur);
+    }
+    else
+        widget.filename->setText( p->outputFileName() );
+    QString printer = p->printerName();
+    if (!printer.isEmpty()) {
+        for (int i = 0; i < widget.printers->count(); ++i) {
+            if (widget.printers->itemText(i) == printer) {
+                widget.printers->setCurrentIndex(i);
+                break;
+            }
+        }
+    }
+    // PDF and PS printers are not added to the dialog yet, we'll handle those cases in QUnixPrintWidgetPrivate::updateWidget
+
+    if (propertiesDialog)
+        propertiesDialog->applyPrinterProperties(p);
+}
+
+#ifndef QT_NO_MESSAGEBOX
+bool QUnixPrintWidgetPrivate::checkFields()
+{
+    if (widget.filename->isEnabled()) {
+        QString file = widget.filename->text();
+        QFile f(file);
+        QFileInfo fi(f);
+        bool exists = fi.exists();
+        bool opened = false;
+        if (exists && fi.isDir()) {
+            QMessageBox::warning(q, q->windowTitle(),
+                            QPrintDialog::tr("%1 is a directory.\nPlease choose a different file name.").arg(file));
+            return false;
+        } else if ((exists && !fi.isWritable()) || !(opened = f.open(QFile::Append))) {
+            QMessageBox::warning(q, q->windowTitle(),
+                            QPrintDialog::tr("File %1 is not writable.\nPlease choose a different file name.").arg(file));
+            return false;
+        } else if (exists) {
+            int ret = QMessageBox::question(q, q->windowTitle(),
+                                            QPrintDialog::tr("%1 already exists.\nDo you want to overwrite it?").arg(file),
+                                            QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
+            if (ret == QMessageBox::No)
+                return false;
+        }
+        if (opened) {
+            f.close();
+            if (!exists)
+                f.remove();
+        }
+    }
+
+    // Every test passed. Accept the dialog.
+    return true;
+}
+#endif // QT_NO_MESSAGEBOX
+
+void QUnixPrintWidgetPrivate::_q_btnPropertiesClicked()
+{
+    if (!propertiesDialog) {
+        propertiesDialog = new QPrintPropertiesDialog(q);
+        propertiesDialog->setResult(QDialog::Rejected);
+    }
+
+    if (propertiesDialog->result() == QDialog::Rejected) {
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+        propertiesDialog->setCups(cups);
+#endif
+        propertiesDialog->applyPrinterProperties(q->printer());
+
+        if (q->isOptionEnabled(QPrintDialog::PrintToFile)
+            && (widget.printers->currentIndex() > widget.printers->count() - 3)) // PDF or postscript
+            propertiesDialog->selectPdfPsPrinter(q->printer());
+        else
+            propertiesDialog->selectPrinter();
+    }
+    propertiesDialog->exec();
+}
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+void QUnixPrintWidgetPrivate::setCupsProperties()
+{
+    if (cups && QCUPSSupport::isAvailable() && cups->pageSizes()) {
+        QPrintEngine *engine = printer->printEngine();
+        const ppd_option_t* pageSizes = cups->pageSizes();
+        QByteArray cupsPageSize;
+        for (int i = 0; i < pageSizes->num_choices; ++i) {
+            if (static_cast<int>(pageSizes->choices[i].marked) == 1)
+                cupsPageSize = pageSizes->choices[i].choice;
+        }
+        engine->setProperty(PPK_CupsStringPageSize, QString::fromLatin1(cupsPageSize));
+        engine->setProperty(PPK_CupsOptions, cups->options());
+
+        QRect pageRect = cups->pageRect(cupsPageSize);
+        engine->setProperty(PPK_CupsPageRect, pageRect);
+
+        QRect paperRect = cups->paperRect(cupsPageSize);
+        engine->setProperty(PPK_CupsPaperRect, paperRect);
+
+        for (int ps = 0; ps < QPrinter::NPaperSize; ++ps) {
+            QPdf::PaperSize size = QPdf::paperSize(QPrinter::PaperSize(ps));
+            if (size.width == paperRect.width() && size.height == paperRect.height())
+                printer->setPaperSize(static_cast<QPrinter::PaperSize>(ps));
+        }
+    }
+}
+#endif
+
+void QUnixPrintWidgetPrivate::setupPrinter()
+{
+    const int printerCount = widget.printers->count();
+    const int index = widget.printers->currentIndex();
+
+    if (filePrintersAdded && index > printerCount - 3) { // PDF or postscript
+        printer->setPrinterName(QString());
+        Q_ASSERT(index != printerCount - 3); // separator
+        if (index == printerCount - 2)
+            printer->setOutputFormat(QPrinter::PdfFormat);
+        else
+            printer->setOutputFormat(QPrinter::PostScriptFormat);
+        QString path = widget.filename->text();
+        if (QDir::isRelativePath(path))
+            path = QDir::homePath() + QDir::separator() + path;
+        printer->setOutputFileName(path);
+    }
+    else {
+        printer->setPrinterName(widget.printers->currentText());
+        printer->setOutputFileName(QString());
+    }
+
+    if (propertiesDialog && propertiesDialog->result() == QDialog::Accepted)
+        propertiesDialog->setupPrinter();
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+    if (!propertiesDialog)
+        setCupsProperties();
+#endif
+}
+
+
+/*! \internal
+*/
+QUnixPrintWidget::QUnixPrintWidget(QPrinter *printer, QWidget *parent)
+    : QWidget(parent), d(new QUnixPrintWidgetPrivate(this))
+{
+    d->applyPrinterProperties(printer);
+}
+
+/*! \internal
+*/
+QUnixPrintWidget::~QUnixPrintWidget()
+{
+    delete d;
+}
+
+/*! \internal
+
+    Updates the printer with the states held in the QUnixPrintWidget.
+*/
+void QUnixPrintWidget::updatePrinter()
+{
+    d->setupPrinter();
+}
+
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+
+QPPDOptionsModel::QPPDOptionsModel(QCUPSSupport *c, QObject *parent)
+    : QAbstractItemModel(parent), rootItem(0), cups(c), ppd(c->currentPPD())
+{
+    parseItems();
+}
+
+QPPDOptionsModel::~QPPDOptionsModel()
+{
+}
+
+int QPPDOptionsModel::columnCount(const QModelIndex&) const
+{
+    return 2;
+}
+
+int QPPDOptionsModel::rowCount(const QModelIndex& parent) const
+{
+    QOptionTreeItem* itm;
+    if (!parent.isValid())
+        itm = rootItem;
+    else
+        itm = reinterpret_cast<QOptionTreeItem*>(parent.internalPointer());
+
+    if (itm->type == QOptionTreeItem::Option)
+        return 0;
+
+    return itm->childItems.count();
+}
+
+QVariant QPPDOptionsModel::data(const QModelIndex& index, int role) const
+{
+    switch(role) {
+        case Qt::FontRole: {
+            QOptionTreeItem* itm = reinterpret_cast<QOptionTreeItem*>(index.internalPointer());
+            if (itm && itm->type == QOptionTreeItem::Group){
+                QFont font = QApplication::font();
+                font.setBold(true);
+                return QVariant(font);
+            }
+            return QVariant();
+        }
+        break;
+
+        case Qt::DisplayRole: {
+            QOptionTreeItem* itm;
+            if (!index.isValid())
+                itm = rootItem;
+            else
+                itm = reinterpret_cast<QOptionTreeItem*>(index.internalPointer());
+
+            if (index.column() == 0)
+                return cups->unicodeString(itm->description);
+            else if (itm->type == QOptionTreeItem::Option && itm->selected > -1)
+                return cups->unicodeString(itm->selDescription);
+            else
+                return QVariant();
+        }
+        break;
+
+        default:
+            return QVariant();
+    }
+    if (role != Qt::DisplayRole)
+        return QVariant();
+}
+
+QModelIndex QPPDOptionsModel::index(int row, int column, const QModelIndex& parent) const
+{
+    QOptionTreeItem* itm;
+    if (!parent.isValid())
+        itm = rootItem;
+    else
+        itm = reinterpret_cast<QOptionTreeItem*>(parent.internalPointer());
+
+    return createIndex(row, column, itm->childItems.at(row));
+}
+
+
+QModelIndex QPPDOptionsModel::parent(const QModelIndex& index) const
+{
+    if (!index.isValid())
+        return QModelIndex();
+
+    QOptionTreeItem* itm = reinterpret_cast<QOptionTreeItem*>(index.internalPointer());
+
+    if (itm->parentItem && itm->parentItem != rootItem)
+        return createIndex(itm->parentItem->index, 0, itm->parentItem);
+    else
+        return QModelIndex();
+}
+
+Qt::ItemFlags QPPDOptionsModel::flags(const QModelIndex& index) const
+{
+    if (!index.isValid() || reinterpret_cast<QOptionTreeItem*>(index.internalPointer())->type == QOptionTreeItem::Group)
+        return Qt::ItemIsEnabled;
+
+    if (index.column() == 1)
+        return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
+
+    return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+}
+
+void QPPDOptionsModel::parseItems()
+{
+    emit layoutAboutToBeChanged();
+    ppd = cups->currentPPD();
+    delete rootItem;
+    rootItem = new QOptionTreeItem(QOptionTreeItem::Root, 0, ppd, "Root Item", 0);
+    parseGroups(rootItem);
+    emit layoutChanged();
+}
+
+void QPPDOptionsModel::parseGroups(QOptionTreeItem* parent)
+{
+    if (parent->type == QOptionTreeItem::Root) {
+
+        const ppd_file_t* ppdFile = reinterpret_cast<const ppd_file_t*>(parent->ptr);
+
+        if (ppdFile) {
+            for (int i = 0; i < ppdFile->num_groups; ++i) {
+                QOptionTreeItem* group = new QOptionTreeItem(QOptionTreeItem::Group, i, &ppdFile->groups[i], ppdFile->groups[i].text, parent);
+                parent->childItems.append(group);
+                parseGroups(group); // parse possible subgroups
+                parseOptions(group); // parse options
+            }
+        }
+    } else if (parent->type == QOptionTreeItem::Group) {
+
+        const ppd_group_t* group = reinterpret_cast<const ppd_group_t*>(parent->ptr);
+
+        if (group) {
+            for (int i = 0; i < group->num_subgroups; ++i) {
+                QOptionTreeItem* subgroup = new QOptionTreeItem(QOptionTreeItem::Group, i, &group->subgroups[i], group->subgroups[i].text, parent);
+                parent->childItems.append(subgroup);
+                parseGroups(subgroup); // parse possible subgroups
+                parseOptions(subgroup); // parse options
+            }
+        }
+    }
+}
+
+void QPPDOptionsModel::parseOptions(QOptionTreeItem* parent)
+{
+    const ppd_group_t* group = reinterpret_cast<const ppd_group_t*>(parent->ptr);
+    for (int i = 0; i < group->num_options; ++i) {
+        QOptionTreeItem* opt = new QOptionTreeItem(QOptionTreeItem::Option, i, &group->options[i], group->options[i].text, parent);
+        parent->childItems.append(opt);
+        parseChoices(opt);
+    }
+}
+
+void QPPDOptionsModel::parseChoices(QOptionTreeItem* parent)
+{
+    const ppd_option_t* option = reinterpret_cast<const ppd_option_t*>(parent->ptr);
+    bool marked = false;
+    for (int i = 0; i < option->num_choices; ++i) {
+        QOptionTreeItem* choice = new QOptionTreeItem(QOptionTreeItem::Choice, i, &option->choices[i], option->choices[i].text, parent);
+        if (static_cast<int>(option->choices[i].marked) == 1) {
+            parent->selected = i;
+            parent->selDescription = option->choices[i].text;
+            marked = true;
+        } else if (!marked && qstrcmp(option->choices[i].choice, option->defchoice) == 0) {
+            parent->selected = i;
+            parent->selDescription = option->choices[i].text;
+        }
+        parent->childItems.append(choice);
+    }
+}
+
+QVariant QPPDOptionsModel::headerData(int section, Qt::Orientation, int role) const
+{
+    if (role != Qt::DisplayRole)
+        return QVariant();
+
+    switch(section){
+        case 0:
+            return QVariant(QApplication::translate("QPPDOptionsModel", "Name"));
+        case 1:
+            return QVariant(QApplication::translate("QPPDOptionsModel", "Value"));
+        default:
+            return QVariant();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+QWidget* QPPDOptionsEditor::createEditor(QWidget* parent, const QStyleOptionViewItem&, const QModelIndex& index) const
+{
+    if (index.column() == 1 && reinterpret_cast<QOptionTreeItem*>(index.internalPointer())->type == QOptionTreeItem::Option)
+        return new QComboBox(parent);
+    else
+        return 0;
+}
+
+void QPPDOptionsEditor::setEditorData(QWidget* editor, const QModelIndex& index) const
+{
+    if (index.column() != 1)
+        return;
+
+    QComboBox* cb = static_cast<QComboBox*>(editor);
+    QOptionTreeItem* itm = reinterpret_cast<QOptionTreeItem*>(index.internalPointer());
+
+    if (itm->selected == -1)
+        cb->addItem(QString());
+
+    for (int i = 0; i < itm->childItems.count(); ++i)
+        cb->addItem(QString::fromLocal8Bit(itm->childItems.at(i)->description));
+
+    if (itm->selected > -1)
+        cb->setCurrentIndex(itm->selected);
+
+    connect(cb, SIGNAL(currentIndexChanged(int)), this, SLOT(cbChanged(int)));
+}
+
+void QPPDOptionsEditor::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
+{
+    QComboBox* cb = static_cast<QComboBox*>(editor);
+    QOptionTreeItem* itm = reinterpret_cast<QOptionTreeItem*>(index.internalPointer());
+
+    if (itm->selected == cb->currentIndex())
+        return;
+
+    const ppd_option_t* opt = reinterpret_cast<const ppd_option_t*>(itm->ptr);
+    QPPDOptionsModel* m = static_cast<QPPDOptionsModel*>(model);
+
+    if (m->cups->markOption(opt->keyword, opt->choices[cb->currentIndex()].choice) == 0) {
+        itm->selected = cb->currentIndex();
+        itm->selDescription = reinterpret_cast<const ppd_option_t*>(itm->ptr)->choices[itm->selected].text;
+    }
+}
+
+void QPPDOptionsEditor::cbChanged(int)
+{
+/*
+    emit commitData(static_cast<QWidget*>(sender()));
+*/
+}
+
+#endif
+
+QT_END_NAMESPACE
+
+#include "moc_qprintdialog.cpp"
+#include "qprintdialog_unix.moc"
+#include "qrc_qprintdialog.cpp"
+
+#endif // QT_NO_PRINTDIALOG
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/octave-qt/qprintdialog_win.cpp	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,318 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT_NO_PRINTDIALOG
+
+#include "qprintdialog.h"
+
+#include <qwidget.h>
+#include <qapplication.h>
+#include <qmessagebox.h>
+#include <private/qapplication_p.h>
+
+#include <private/qabstractprintdialog_p.h>
+#include <private/qprintengine_win_p.h>
+#include <private/qprinter_p.h>
+
+#if !defined(PD_NOCURRENTPAGE)
+#define PD_NOCURRENTPAGE    0x00800000
+#define PD_RESULT_PRINT	1
+#define PD_RESULT_APPLY	2
+#define START_PAGE_GENERAL  0XFFFFFFFF
+#endif
+
+QT_BEGIN_NAMESPACE
+
+extern void qt_win_eatMouseMove();
+
+class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
+{
+    Q_DECLARE_PUBLIC(QPrintDialog)
+public:
+    QPrintDialogPrivate()
+        : ep(0)
+    {
+    }
+
+    inline void _q_printToFileChanged(int) {}
+    inline void _q_rbPrintRangeToggled(bool) {}
+    inline void _q_printerChanged(int) {}
+    inline void _q_chbPrintLastFirstToggled(bool) {}
+    inline void _q_paperSizeChanged(int) {}
+    inline void _q_btnBrowseClicked() {}
+    inline void _q_btnPropertiesClicked() {}
+    int openWindowsPrintDialogModally();
+
+    QWin32PrintEnginePrivate *ep;
+};
+
+static void qt_win_setup_PRINTDLGEX(PRINTDLGEX *pd, QWidget *parent,
+                                    QPrintDialog *pdlg,
+                                    QPrintDialogPrivate *d, HGLOBAL *tempDevNames)
+{
+    DEVMODE *devMode = d->ep->devMode;
+
+    if (devMode) {
+        int size = sizeof(DEVMODE) + devMode->dmDriverExtra;
+        pd->hDevMode = GlobalAlloc(GHND, size);
+        {
+            void *dest = GlobalLock(pd->hDevMode);
+            memcpy(dest, devMode, size);
+            GlobalUnlock(pd->hDevMode);
+        }
+    } else {
+        pd->hDevMode = NULL;
+    }
+    pd->hDevNames  = tempDevNames;
+
+    pd->Flags = PD_RETURNDC;
+    pd->Flags |= PD_USEDEVMODECOPIESANDCOLLATE;
+
+    if (!pdlg->isOptionEnabled(QPrintDialog::PrintSelection))
+        pd->Flags |= PD_NOSELECTION;
+    if (pdlg->isOptionEnabled(QPrintDialog::PrintPageRange)) {
+        pd->nMinPage = pdlg->minPage();
+        pd->nMaxPage = pdlg->maxPage();
+    }
+
+    if(!pdlg->isOptionEnabled(QPrintDialog::PrintToFile))
+        pd->Flags |= PD_DISABLEPRINTTOFILE;
+
+    if (pdlg->isOptionEnabled(QPrintDialog::PrintSelection) && pdlg->printRange() == QPrintDialog::Selection)
+        pd->Flags |= PD_SELECTION;
+    else if (pdlg->isOptionEnabled(QPrintDialog::PrintPageRange) && pdlg->printRange() == QPrintDialog::PageRange)
+        pd->Flags |= PD_PAGENUMS;
+    else if (pdlg->isOptionEnabled(QPrintDialog::PrintCurrentPage) && pdlg->printRange() == QPrintDialog::CurrentPage)
+        pd->Flags |= PD_CURRENTPAGE;
+    else
+        pd->Flags |= PD_ALLPAGES;
+
+    // As stated by MSDN, to enable collate option when minpage==maxpage==0
+    // set the PD_NOPAGENUMS flag
+    if (pd->nMinPage==0 && pd->nMaxPage==0)
+        pd->Flags |= PD_NOPAGENUMS;
+
+    // Disable Current Page option if not required as default is Enabled
+    if (!pdlg->isOptionEnabled(QPrintDialog::PrintCurrentPage))
+        pd->Flags |= PD_NOCURRENTPAGE;
+
+    // Default to showing the General tab first
+    pd->nStartPage = START_PAGE_GENERAL;
+
+    // We don't support more than one page range in the QPrinter API yet.
+    pd->nPageRanges = 1;
+    pd->nMaxPageRanges = 1;
+
+    if (d->ep->printToFile)
+        pd->Flags |= PD_PRINTTOFILE;
+    Q_ASSERT(parent);
+    pd->hwndOwner = parent->window()->winId();
+    pd->lpPageRanges[0].nFromPage = qMax(pdlg->fromPage(), pdlg->minPage());
+    pd->lpPageRanges[0].nToPage   = (pdlg->toPage() > 0) ? qMin(pdlg->toPage(), pdlg->maxPage()) : 1;
+    pd->nCopies = d->ep->num_copies;
+}
+
+static void qt_win_read_back_PRINTDLGEX(PRINTDLGEX *pd, QPrintDialog *pdlg, QPrintDialogPrivate *d)
+{
+    if (pd->Flags & PD_SELECTION) {
+        pdlg->setPrintRange(QPrintDialog::Selection);
+        pdlg->setFromTo(0, 0);
+    } else if (pd->Flags & PD_PAGENUMS) {
+        pdlg->setPrintRange(QPrintDialog::PageRange);
+        pdlg->setFromTo(pd->lpPageRanges[0].nFromPage, pd->lpPageRanges[0].nToPage);
+    } else if (pd->Flags & PD_CURRENTPAGE) {
+        pdlg->setPrintRange(QPrintDialog::CurrentPage);
+        pdlg->setFromTo(0, 0);
+    } else { // PD_ALLPAGES
+        pdlg->setPrintRange(QPrintDialog::AllPages);
+        pdlg->setFromTo(0, 0);
+    }
+
+    d->ep->printToFile = (pd->Flags & PD_PRINTTOFILE) != 0;
+
+    d->ep->readDevnames(pd->hDevNames);
+    d->ep->readDevmode(pd->hDevMode);
+    d->ep->updateCustomPaperSize();
+
+    if (d->ep->printToFile && d->ep->fileName.isEmpty())
+        d->ep->fileName = d->ep->port;
+    else if (!d->ep->printToFile && d->ep->fileName == QLatin1String("FILE:"))
+        d->ep->fileName.clear();
+}
+
+static bool warnIfNotNative(QPrinter *printer)
+{
+    if (printer->outputFormat() != QPrinter::NativeFormat) {
+        qWarning("QPrintDialog: Cannot be used on non-native printers");
+        return false;
+    }
+    return true;
+}
+
+QPrintDialog::QPrintDialog(QPrinter *printer, QWidget *parent)
+    : QAbstractPrintDialog( *(new QPrintDialogPrivate), printer, parent)
+{
+    Q_D(QPrintDialog);
+    if (!warnIfNotNative(d->printer))
+        return;
+    d->ep = static_cast<QWin32PrintEngine *>(d->printer->paintEngine())->d_func();
+}
+
+QPrintDialog::QPrintDialog(QWidget *parent)
+    : QAbstractPrintDialog( *(new QPrintDialogPrivate), 0, parent)
+{
+    Q_D(QPrintDialog);
+    if (!warnIfNotNative(d->printer))
+        return;
+    d->ep = static_cast<QWin32PrintEngine *>(d->printer->paintEngine())->d_func();
+}
+
+QPrintDialog::~QPrintDialog()
+{
+}
+
+int QPrintDialog::exec()
+{
+    if (!warnIfNotNative(printer()))
+        return 0;
+
+    Q_D(QPrintDialog);
+    return d->openWindowsPrintDialogModally();
+}
+
+int QPrintDialogPrivate::openWindowsPrintDialogModally()
+{
+    Q_Q(QPrintDialog);
+    QWidget *parent = q->parentWidget();
+    if (parent)
+        parent = parent->window();
+    else
+        parent = QApplication::activeWindow();
+
+    // If there is no window, fall back to the print dialog itself
+    if (parent == 0)
+        parent = q;
+
+    QWidget modal_widget;
+    modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
+    modal_widget.setParent(parent, Qt::Window);
+    QApplicationPrivate::enterModal(&modal_widget);
+
+    HGLOBAL *tempDevNames = ep->createDevNames();
+
+    bool done;
+    bool result;
+    bool doPrinting;
+
+    PRINTPAGERANGE pageRange;
+    PRINTDLGEX pd;
+    memset(&pd, 0, sizeof(PRINTDLGEX));
+    pd.lStructSize = sizeof(PRINTDLGEX);
+    pd.lpPageRanges = &pageRange;
+    qt_win_setup_PRINTDLGEX(&pd, parent, q, this, tempDevNames);
+
+    do {
+        done = true;
+        doPrinting = false;
+        result = (PrintDlgEx(&pd) == S_OK);
+        if (result && (pd.dwResultAction == PD_RESULT_PRINT
+                       || pd.dwResultAction == PD_RESULT_APPLY))
+        {
+            doPrinting = (pd.dwResultAction == PD_RESULT_PRINT);
+            if ((pd.Flags & PD_PAGENUMS)
+                && (pd.lpPageRanges[0].nFromPage > pd.lpPageRanges[0].nToPage))
+            {
+                pd.lpPageRanges[0].nFromPage = 1;
+                pd.lpPageRanges[0].nToPage = 1;
+                done = false;
+            }
+            if (pd.hDC == 0)
+                result = false;
+        }
+
+        if (!done) {
+            QMessageBox::warning(0, QPrintDialog::tr("Print"),
+                                 QPrintDialog::tr("The 'From' value cannot be greater than the 'To' value."),
+                                 QPrintDialog::tr("OK"));
+        }
+    } while (!done);
+
+    QApplicationPrivate::leaveModal(&modal_widget);
+
+    qt_win_eatMouseMove();
+
+    // write values back...
+    if (result && (pd.dwResultAction == PD_RESULT_PRINT
+                   || pd.dwResultAction == PD_RESULT_APPLY))
+    {
+        qt_win_read_back_PRINTDLGEX(&pd, q, this);
+        // update printer validity
+        printer->d_func()->validPrinter = !ep->name.isEmpty();
+    }
+
+    // Cleanup...
+    GlobalFree(tempDevNames);
+
+    q->done(result && doPrinting);
+
+    return result && doPrinting;
+}
+
+void QPrintDialog::setVisible(bool visible)
+{
+    Q_D(QPrintDialog);
+
+    // its always modal, so we cannot hide a native print dialog
+    if (!visible)
+        return;
+
+    if (!warnIfNotNative(d->printer))
+        return;
+
+    (void)d->openWindowsPrintDialogModally();
+    return;
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qprintdialog.cpp"
+
+#endif // QT_NO_PRINTDIALOG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgui/languages/build_ts/update_ts_files	Thu Nov 24 16:16:52 2022 -0500
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+# This scripts has to be called from the folder libgui/languages
+# where the *.ts files for each provided translation are located
+
+# The paths with libgui sources to scan for text strings
+SEARCH_PATH_COMMON="../graphics ../qterminal ../src"
+
+# Path to Qt and QScintilla files with strings that should also be
+# translated by octave in case that Qt or QScintilla does not provide
+# translations for the current language
+SEARCH_PATH_QT="build_ts/octave-qt"
+SEARCH_PATH_QSCI="build_ts/octave-qsci"
+
+# Alwys add Qt search query widget since no translation is provided by Qt
+SEARCH_PATH_COMMON="$SEARCH_PATH_COMMON $SEARCH_PATH_QT/qhelpsearchquerywidget.cpp"
+
+# The directory with translations provided by Qt and QScintilla
+QT_LANG_DIR=/usr/share/qt5/translations
+
+# Now update all ts files
+for file in *.ts; do
+
+  xx=${file:0:2}
+  xx_yy=${file:0:5}
+
+  # Set the search path to the minimal one used for each ts file
+  SEARCH_PATH=$SEARCH_PATH_COMMON
+
+  # Look for translations provided by Qt and QScintilla and extend the search
+  # path if no existing translations are found. In this case we have to scan
+  # the locally collected source files.
+  if [ $xx_yy != "en_US" ]; then  # No trnaslation required for en_US
+    # Look for Qt translations
+    if [ "`ls $QT_LANG_DIR | grep -i qt_$xx.qm | wc -l`" -eq 0 ] &&
+       [ "`ls $QT_LANG_DIR | grep -i qt_$xx_yy.qm | wc -l`" -eq 0 ]; then
+       SEARCH_PATH="$SEARCH_PATH $SEARCH_PATH_QT"
+echo "QT"
+    fi
+    # Look for QScintilla translations
+    if [ "`ls $QT_LANG_DIR | grep -i qscintilla_$xx.qm | wc -l`" -eq 0 ] &&
+       [ "`ls $QT_LANG_DIR | grep -i qscintilla_$xx_yy.qm | wc -l`" -eq 0 ]; then
+       SEARCH_PATH="$SEARCH_PATH $SEARCH_PATH_QSCI"
+echo "QSCI"
+    fi
+  fi
+  echo
+  echo
+
+  # Do the update after user's confirmation
+  echo       "$file => scan for strings in following paths"
+  echo    "         => $SEARCH_PATH"
+  read -p "         => Update (y/[n])? " ANS;
+  ANS=${ANS:-n}
+  if [ $ANS = "y" ]; then
+    echo
+    lupdate -qt5 -no-obsolete -locations relative $SEARCH_PATH -ts $file
+  fi
+
+done
+
+echo
--- a/libgui/languages/ca_ES.ts	Thu Nov 24 06:30:22 2022 -0800
+++ b/libgui/languages/ca_ES.ts	Thu Nov 24 16:16:52 2022 -0500
@@ -2,9 +2,17 @@
 <!DOCTYPE TS>
 <TS version="2.1" language="ca_ES">
 <context>
+    <name>QFileSystemModel</name>
+    <message>
+        <location filename="../src/files-dock-widget.cc" line="+138"/>
+        <source>Invalid filename</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>QHelpSearchQueryWidget</name>
     <message>
-        <location filename="../../../octave-qt/qhelpsearchquerywidget.cpp" line="+124"/>
+        <location filename="build_ts/octave-qt/qhelpsearchquerywidget.cpp" line="+124"/>
         <source>Search for:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -57,7 +65,7 @@
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../src/settings-dialog.cc" line="+845"/>
+        <location filename="../src/settings-dialog.cc" line="+879"/>
         <source>Difference to the default size</source>
         <translation>Diferència amb la mida predeterminada</translation>
     </message>
@@ -151,7 +159,7 @@
 <context>
     <name>QWinTerminalImpl</name>
     <message>
-        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1786"/>
+        <location filename="../qterminal/libqterminal/win32/QWinTerminalImpl.cpp" line="+1782"/>
         <source>copied selection to clipboard</source>
         <translation>selecció desada al porta-retalls</translation>
     </message>
@@ -159,7 +167,7 @@
 <context>
     <name>QsciLexerBash</name>
     <message>
-        <location filename="../../../qsci/qscilexerbash.cpp" line="+203"/>
+        <location filename="build_ts/octave-qsci/qscilexerbash.cpp" line="+203"/>
         <source>Default</source>
         <translation type="unfinished">Per defecte</translation>
     </message>
@@ -232,7 +240,7 @@
 <context>
     <name>QsciLexerBatch</name>
     <message>
-        <location filename="../../../qsci/qscilexerbatch.cpp" line="+174"/>
+        <location filename="build_ts/octave-qsci/qscilexerbatch.cpp" line="+174"/>
         <source>Default</source>
         <translation type="unfinished">Per defecte</translation>
     </message>
@@ -275,7 +283,7 @@
 <context>
     <name>QsciLexerCPP</name>
     <message>
-        <location filename="../../../qsci/qscilexercpp.cpp" line="+364"/>
+        <location filename="build_ts/octave-qsci/qscilexercpp.cpp" line="+364"/>
         <source>Default</source>
         <translation type="unfinished">Per defecte</translation>
     </message>
@@ -558,7 +566,7 @@
 <context>
     <name>QsciLexerDiff</name>
     <message>
-        <location filename="../../../qsci/qscilexerdiff.cpp" line="+106"/>
+        <location filename="build_ts/octave-qsci/qscilexerdiff.cpp" line="+106"/>
         <source>Default</source>
         <translation type="unfinished">Per defecte</translation>
     </message>
@@ -621,7 +629,7 @@
 <context>
     <name>QsciLexerMatlab</name>
     <message>
-        <location filename="../../../qsci/qscilexermatlab.cpp" line="+133"/>
+        <location filename="build_ts/octave-qsci/qscilexermatlab.cpp" line="+133"/>
         <source>Default</source>
         <translation type="unfinished">Per defecte</translation>
     </message>
@@ -669,7 +677,7 @@
 <context>
     <name>QsciLexerPerl</name>
     <message>
-        <location filename="../../../qsci/qscilexerperl.cpp" line="+328"/>
+        <location filename="build_ts/octave-qsci/qscilexerperl.cpp" line="+328"/>
         <source>Default</source>
         <translation type="unfinished">Per defecte</translation>
     </message>
@@ -877,7 +885,7 @@
 <context>
     <name>QsciScintilla</name>
     <message>
-        <location filename="../../../qsci/qsciscintilla.cpp" line="+4475"/>
+        <location filename="build_ts/octave-qsci/qsciscintilla.cpp" line="+4475"/>
         <source>&amp;Undo</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1106,7 +1114,7 @@
 <context>
     <name>octave::command_widget</name>
     <message>
-        <location filename="../src/command-widget.cc" line="+57"/>
+        <location filename="../src/command-widget.cc" line="+58"/>
         <source>Pause</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1120,21 +1128,11 @@
         <source>Continue</source>
         <translation type="unfinished">Continua</translation>
     </message>
-    <message>
-        <location line="+2"/>
-        <source>Command Input</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+9"/>
-        <source>Command Output</source>
-        <translation type="unfinished"></translation>
-    </message>
 </context>
 <context>
     <name>octave::community_news</name>
     <message>
-        <location filename="../src/community-news.cc" line="+70"/>
+        <location filename="../src/community-news.cc" line="+71"/>
         <source>Octave Community News</source>
         <translation type="unfinished">Notícies de la comunitat de l&apos;Octave</translation>
     </message>
@@ -1142,7 +1140,7 @@
 <context>
     <name>octave::documentation</name>
     <message>
-        <location filename="../src/documentation.cc" line="+112"/>
+        <location filename="../src/documentation.cc" line="+113"/>
         <location line="+14"/>
         <location line="+735"/>
         <source>Octave Documentation</source>
@@ -1351,7 +1349,7 @@
         <location line="+9"/>
         <source>The file
 %1
-is not a valid XBEL file verison 1.0.</source>
+is not a valid XBEL file version 1.0.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -1363,7 +1361,7 @@
 <context>
     <name>octave::documentation_dock_widget</name>
     <message>
-        <location filename="../src/documentation-dock-widget.cc" line="+42"/>
+        <location filename="../src/documentation-dock-widget.cc" line="+41"/>
         <source>Documentation</source>
         <translation>Documentació</translation>
     </message>
@@ -1427,16 +1425,16 @@
 <context>
     <name>octave::file_editor</name>
     <message>
-        <location filename="../src/m-editor/file-editor.cc" line="+1081"/>
+        <location filename="../src/m-editor/file-editor.cc" line="+1097"/>
         <location line="+28"/>
-        <location line="+549"/>
+        <location line="+540"/>
         <location line="+18"/>
         <location line="+25"/>
         <source>Octave Editor</source>
         <translation>Editor de l&apos;Octave</translation>
     </message>
     <message>
-        <location line="-619"/>
+        <location line="-610"/>
         <source>File not saved! A file with the selected name
 %1
 is already open in the editor</source>
@@ -1450,7 +1448,7 @@
         <translation>La pestanya associada de l&apos;editor de text ha desaparegut.</translation>
     </message>
     <message>
-        <location line="+549"/>
+        <location line="+540"/>
         <source>Could not open file
 %1
 for read: %2.</source>
@@ -1487,7 +1485,7 @@
 en mode escriptura: %2.</translation>
     </message>
     <message>
-        <location line="+240"/>
+        <location line="+251"/>
         <source>&amp;File</source>
         <translation>&amp;Fitxer</translation>
     </message>
@@ -1792,7 +1790,7 @@
         <translation>Mida &amp;normal</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+6"/>
         <source>&amp;Sort Tabs Alphabetically</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1827,7 +1825,7 @@
         <translation>&amp;Executa</translation>
     </message>
     <message>
-        <location line="-2066"/>
+        <location line="-2085"/>
         <source>Save File and Run</source>
         <translation>Desa el fitxer i executa</translation>
     </message>
@@ -1837,7 +1835,7 @@
         <translation type="unfinished">Continua</translation>
     </message>
     <message>
-        <location line="+2080"/>
+        <location line="+2099"/>
         <source>Save File and Run / Continue</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1872,7 +1870,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+16"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
@@ -1880,7 +1878,7 @@
 <context>
     <name>octave::file_editor_tab</name>
     <message>
-        <location filename="../src/m-editor/file-editor-tab.cc" line="+159"/>
+        <location filename="../src/m-editor/file-editor-tab.cc" line="+160"/>
         <source>line:</source>
         <translation>línia:</translation>
     </message>
@@ -1910,11 +1908,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+62"/>
-        <location line="+1152"/>
+        <location line="+73"/>
+        <location line="+1179"/>
         <location line="+132"/>
-        <location line="+376"/>
-        <location line="+188"/>
+        <location line="+391"/>
+        <location line="+66"/>
+        <location line="+126"/>
         <location line="+26"/>
         <location line="+38"/>
         <location line="+38"/>
@@ -1924,13 +1923,13 @@
         <translation>Editor de l&apos;Octave</translation>
     </message>
     <message>
-        <location line="-2070"/>
+        <location line="-2116"/>
         <source>Cannot add breakpoint to modified or unnamed file.
 Save and add breakpoint, or cancel?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+828"/>
+        <location line="+855"/>
         <source>Goto line</source>
         <translation>Ves a la línia</translation>
     </message>
@@ -1990,13 +1989,13 @@
     </message>
     <message>
         <location line="+1"/>
-        <location line="+39"/>
+        <location line="+38"/>
         <source>Chan&amp;ge encoding</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-38"/>
-        <location line="+31"/>
+        <location line="-37"/>
+        <location line="+30"/>
         <source>&amp;Close</source>
         <translation type="unfinished">&amp;Tanca</translation>
     </message>
@@ -2027,14 +2026,20 @@
 Vols interrompre la depuració i desar?</translation>
     </message>
     <message>
-        <location line="+167"/>
+        <location line="+183"/>
         <source>Could not open file %1 for write:
 %2.</source>
         <translation>El fixer %1 no es pot obrir en mode escriptura:
 %2.</translation>
     </message>
     <message>
-        <location line="+214"/>
+        <location line="+66"/>
+        <source>The changes could not be saved to the file
+%1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+152"/>
         <source>The current encoding %1
 can not be applied.
 
@@ -2110,7 +2115,7 @@
 <context>
     <name>octave::files_dock_widget</name>
     <message>
-        <location filename="../src/files-dock-widget.cc" line="+77"/>
+        <location filename="../src/files-dock-widget.cc" line="+47"/>
         <source>File Browser</source>
         <translation>Explorador de fitxers</translation>
     </message>
@@ -2185,35 +2190,35 @@
         <translation>Mostra el directori d&apos;inici</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Set Browser Directory...</source>
         <translation>Estableix el directori del navegador...</translation>
     </message>
     <message>
         <location line="+4"/>
-        <location line="+422"/>
+        <location line="+440"/>
         <source>Find Files...</source>
         <translation>Cerca fitxers...</translation>
     </message>
     <message>
-        <location line="-418"/>
-        <location line="+431"/>
+        <location line="-436"/>
+        <location line="+448"/>
         <source>New File...</source>
         <translation>Nou fitxer...</translation>
     </message>
     <message>
-        <location line="-428"/>
-        <location line="+430"/>
+        <location line="-445"/>
+        <location line="+447"/>
         <source>New Directory...</source>
         <translation>Nou directori...</translation>
     </message>
     <message>
-        <location line="-375"/>
+        <location line="-392"/>
         <source>Double-click to open file/folder, right click for alternatives</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+314"/>
+        <location line="+332"/>
         <source>Open</source>
         <translation>Obre</translation>
     </message>
@@ -2270,46 +2275,22 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="-356"/>
         <source>Rename...</source>
         <translation>Reanomena...</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+371"/>
         <source>Delete...</source>
         <translation>Esborra...</translation>
     </message>
     <message>
-        <location line="+117"/>
-        <source>Rename file/directory</source>
-        <translation>Reanomena el fitxer/directori</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Rename file/directory:
-</source>
-        <translation>Reanomena el fitxer/directori:
-</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>
- to: </source>
-        <translation>
- a: </translation>
-    </message>
-    <message>
-        <location line="+12"/>
-        <source>Rename error</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="-579"/>
         <source>Could not rename file &quot;%1&quot; to &quot;%2&quot;.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+712"/>
         <location line="+11"/>
         <location line="+17"/>
         <source>Delete file/directory</source>
@@ -2446,7 +2427,7 @@
     </message>
     <message>
         <location line="+3"/>
-        <location filename="../src/m-editor/find-dialog.cc" line="+3"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+2"/>
         <source>Find &amp;what:</source>
         <translation>&amp;Cerca:</translation>
     </message>
@@ -2542,7 +2523,7 @@
     </message>
     <message>
         <location line="+179"/>
-        <location filename="../src/m-editor/find-dialog.cc" line="+179"/>
+        <location filename="../src/m-editor/find-dialog.cc" line="+173"/>
         <source>Search from end</source>
         <translation>Cerca des de la fi</translation>
     </message>
@@ -2786,7 +2767,7 @@
         <translation>Filtra</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+4"/>
         <source>Command History</source>
         <translation>Historial d&apos;ordres</translation>
     </message>
@@ -2825,7 +2806,7 @@
 <context>
     <name>octave::label_dock_widget</name>
     <message>
-        <location filename="../src/octave-dock-widget.cc" line="+79"/>
+        <location filename="../src/octave-dock-widget.cc" line="+83"/>
         <source>Undock widget</source>
         <translation>Desacobla el plafó</translation>
     </message>
@@ -2838,7 +2819,7 @@
 <context>
     <name>octave::main_window</name>
     <message>
-        <location filename="../src/main-window.cc" line="+658"/>
+        <location filename="../src/main-window.cc" line="+673"/>
         <source>Save Workspace As</source>
         <translation>Desa l&apos;espai de treball com a</translation>
     </message>
@@ -2848,34 +2829,34 @@
         <translation>Carrega un espai de treball</translation>
     </message>
     <message>
-        <location line="+204"/>
-        <location line="+1606"/>
+        <location line="+203"/>
+        <location line="+1656"/>
         <source>About Octave</source>
         <translation>Quant a l&apos;Octave</translation>
     </message>
     <message>
-        <location line="-1993"/>
+        <location line="-2042"/>
         <source>Octave</source>
         <translation>Octave</translation>
     </message>
     <message>
-        <location line="-344"/>
+        <location line="-355"/>
         <source>Profiler</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+345"/>
+        <location line="+356"/>
         <source>Are you sure you want to exit Octave?</source>
         <translation>N&apos;estàs segur que vols sortir de l&apos;Octave?</translation>
     </message>
     <message>
-        <location line="+553"/>
-        <location line="+1513"/>
+        <location line="+575"/>
+        <location line="+1540"/>
         <source>Browse directories</source>
         <translation>Explora directoris</translation>
     </message>
     <message>
-        <location line="-1260"/>
+        <location line="-1280"/>
         <source>Octave Files (*.m);;All Files (*)</source>
         <translation>Fitxers de l&apos;Octave (*.m);;Tots els fitxers (*)</translation>
     </message>
@@ -2907,7 +2888,7 @@
         <translation>Editor de l&apos;Octave</translation>
     </message>
     <message>
-        <location line="+689"/>
+        <location line="+709"/>
         <source>&amp;File</source>
         <translation>&amp;Fitxer</translation>
     </message>
@@ -3295,12 +3276,12 @@
         <translation>Oculta el plafó</translation>
     </message>
     <message>
-        <location line="+82"/>
+        <location line="+84"/>
         <source>Dock widget</source>
         <translation>Acobla el plafó</translation>
     </message>
     <message>
-        <location line="+59"/>
+        <location line="+58"/>
         <source>Undock widget</source>
         <translation>Desacobla el plafó</translation>
     </message>
@@ -3308,7 +3289,7 @@
 <context>
     <name>octave::octave_qscintilla</name>
     <message>
-        <location filename="../src/m-editor/octave-qscintilla.cc" line="+298"/>
+        <location filename="../src/m-editor/octave-qscintilla.cc" line="+297"/>
         <source>Help on</source>
         <translation>Ajuda quant a</translation>
     </message>
@@ -3342,7 +3323,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+286"/>
+        <location line="+292"/>
         <source>Press &apos;%1&apos; to replace all occurrences of &apos;%2&apos; with &apos;%3&apos;.</source>
         <translation>Fes clic a &apos;%1&apos; per substituir tots els casos de &apos;%2&apos; amb &apos;%3&apos;.</translation>
     </message>
@@ -3413,7 +3394,7 @@
 <context>
     <name>octave::release_notes</name>
     <message>
-        <location filename="../src/release-notes.cc" line="+80"/>
+        <location filename="../src/release-notes.cc" line="+84"/>
         <source>The release notes file &apos;%1&apos; is empty.</source>
         <translation type="unfinished">El fitxer de notes de versió %1 està buit.</translation>
     </message>
@@ -3431,7 +3412,7 @@
 <context>
     <name>octave::resource_manager</name>
     <message>
-        <location filename="../src/resource-manager.cc" line="+442"/>
+        <location filename="../src/resource-manager.cc" line="+486"/>
         <source>The settings file
 %1
 does not exist and can not be created.
@@ -3539,7 +3520,7 @@
 <context>
     <name>octave::settings_dialog</name>
     <message>
-        <location filename="../src/settings-dialog.cc" line="-767"/>
+        <location filename="../src/settings-dialog.cc" line="-801"/>
         <source>Octave Preferences</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3551,12 +3532,12 @@
     <message>
         <location line="+16"/>
         <location line="+5"/>
-        <location line="+892"/>
+        <location line="+931"/>
         <source>System setting</source>
         <translation type="unfinished">Configuració de sistema</translation>
     </message>
     <message>
-        <location line="-651"/>
+        <location line="-687"/>
         <source>IBeam Cursor</source>
         <translation type="unfinished">Cursor en forma d&apos;I</translation>
     </message>
@@ -3571,7 +3552,12 @@
         <translation type="unfinished">Cursor en forma de subratllat</translation>
     </message>
     <message>
-        <location line="+168"/>
+        <location line="+121"/>
+        <source>Color of highlighted current line (magenta (255,0,255) for automatic color)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+63"/>
         <source>Set Octave Startup Directory</source>
         <translation type="unfinished">Estableix el directori d&apos;inici de l&apos;Octave</translation>
     </message>
@@ -3581,7 +3567,7 @@
         <translation type="unfinished">Estableix el directori d&apos;inici de l&apos;explorador de fitxers</translation>
     </message>
     <message>
-        <location line="+707"/>
+        <location line="+727"/>
         <source>Enable attribute colors</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3611,7 +3597,7 @@
         <translation type="unfinished">cursor</translation>
     </message>
     <message>
-        <location filename="../src/gui-preferences-ed.h" line="+205"/>
+        <location filename="../src/gui-preferences-ed.h" line="+212"/>
         <source>Top</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3671,12 +3657,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/gui-preferences-global.h" line="+149"/>
+        <location filename="../src/gui-preferences-global.h" line="+186"/>
         <source>Environment Variables</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/gui-settings.h" line="+132"/>
+        <location filename="../src/gui-settings.h" line="+133"/>
         <source>Second color mode (light/dark)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4336,7 +4322,13 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-335"/>
+        <location line="+129"/>
+        <source>Add Shift modifier
+(allows one to enter number keys)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-464"/>
         <source>Zoom In</source>
         <translation>Amplia</translation>
     </message>
@@ -4512,13 +4504,7 @@
         <translation>Activa la drecera en introduir-la</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Add Shift modifier
-(allows to enter number keys)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+17"/>
+        <location line="+20"/>
         <source>Actual shortcut</source>
         <translation>Drecera actual</translation>
     </message>
@@ -4553,7 +4539,7 @@
 <context>
     <name>octave::terminal_dock_widget</name>
     <message>
-        <location filename="../src/terminal-dock-widget.cc" line="+87"/>
+        <location filename="../src/terminal-dock-widget.cc" line="+97"/>
         <source>Command Window</source>
         <translation>Finestra del terminal</translation>
     </message>
@@ -4561,7 +4547,7 @@
 <context>
     <name>octave::variable_dock_widget</name>
     <message>
-        <location filename="../src/variable-editor.cc" line="+175"/>
+        <location filename="../src/variable-editor.cc" line="+177"/>
         <source>Dock widget</source>
         <translation>Acobla el plafó</translation>
     </message>
@@ -4571,7 +4557,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+15"/>
         <source>Undock widget</source>
         <translation>Desacobla el plafó</translation>
     </message>
@@ -4599,7 +4585,7 @@
         <translation>Edita variables.</translation>
     </message>
     <message>
-        <location line="+548"/>
+        <location line="+547"/>
         <source>Variable Editor Toolbar</source>
         <translation>Barra d&apos;eines de l&apos;editor de variables</translation>
     </message>
@@ -4686,7 +4672,7 @@
 <context>
     <name>octave::variable_editor_stack</name>
     <message>
-        <location line="-1241"/>
+        <location line="-1240"/>
         <source>Save Variable %1 As</source>
         <translation>Desa la variable %1 com a</translation>
     </message>
@@ -4799,7 +4785,7 @@
 <context>
     <name>octave::workspace_view</name>
     <message>
-        <location filename="../src/workspace-view.cc" line="+59"/>
+        <location filename="../src/workspace-view.cc" line="+58"/>
         <source>Workspace</source>
         <translation>Espai de treball</translation>
     </message>
@@ -4888,13 +4874,13 @@
     <name>settings_dialog</name>
     <message>
         <location filename="../src/settings-dialog.ui" line="+45"/>
-        <location line="+831"/>
-        <location line="+1905"/>
+        <location line="+834"/>
+        <location line="+1909"/>
         <source>General</source>
         <translation>General</translation>
     </message>
     <message>
-        <location line="-2606"/>
+        <location line="-2390"/>
         <source>Octave logo only</source>
         <translation>Sols el logotip de l&apos;Octave</translation>
     </message>
@@ -4904,12 +4890,12 @@
         <translation>Icones tipogràfiques</translation>
     </message>
     <message>
-        <location line="-74"/>
+        <location line="-334"/>
         <source>Dock widget title bar</source>
         <translation>Acobla el plafó de la barra de títol</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+72"/>
         <source>Small</source>
         <translation>Petit</translation>
     </message>
@@ -4919,7 +4905,7 @@
         <translation>Gran</translation>
     </message>
     <message>
-        <location line="+170"/>
+        <location line="+105"/>
         <source>Custom style</source>
         <translation>Estil personalitzat</translation>
     </message>
@@ -4929,7 +4915,7 @@
         <translation>3D</translation>
     </message>
     <message>
-        <location line="+511"/>
+        <location line="+558"/>
         <source>Editor</source>
         <translation>Editor</translation>
     </message>
@@ -5116,43 +5102,38 @@
     </message>
     <message>
         <location line="-123"/>
-        <location line="+1859"/>
+        <location line="+1863"/>
         <source>Font</source>
         <translation>Tipus de lletra</translation>
     </message>
     <message>
-        <location line="-1569"/>
+        <location line="-1573"/>
         <source>Show line numbers</source>
         <translation>Mostra els números de línia</translation>
     </message>
     <message>
-        <location line="+152"/>
-        <source>Highlight current line</source>
-        <translation>Ressalta la línia actual</translation>
-    </message>
-    <message>
-        <location line="-1008"/>
+        <location line="-859"/>
         <source>Interface</source>
         <translation>Interfície</translation>
     </message>
     <message>
-        <location line="+418"/>
+        <location line="+421"/>
         <source>Confirm before exiting</source>
         <translation>Confirma abans de sortir</translation>
     </message>
     <message>
-        <location line="-292"/>
+        <location line="-72"/>
         <source>Graphic icons</source>
         <translation>Icones gràfiques</translation>
     </message>
     <message>
-        <location line="+272"/>
+        <location line="+52"/>
         <location line="+439"/>
         <source>Show status bar</source>
         <translation>Mostra la barra d&apos;estat</translation>
     </message>
     <message>
-        <location line="-630"/>
+        <location line="-677"/>
         <source>Text inactive</source>
         <translation>Text inactiu</translation>
     </message>
@@ -5168,18 +5149,18 @@
         <translation>Fons inactiu</translation>
     </message>
     <message>
-        <location line="+171"/>
+        <location line="+218"/>
         <source>Octave Startup</source>
         <translation>Inici de l&apos;Octave</translation>
     </message>
     <message>
         <location line="+46"/>
-        <location line="+1687"/>
+        <location line="+1691"/>
         <source>Browse</source>
         <translation>Explora</translation>
     </message>
     <message>
-        <location line="-1294"/>
+        <location line="-1298"/>
         <source>Show whitespace</source>
         <translation>Mostra els espais en blanc</translation>
     </message>
@@ -5215,7 +5196,7 @@
     </message>
     <message>
         <location line="+52"/>
-        <location line="+1749"/>
+        <location line="+1753"/>
         <source>Font size</source>
         <translation>Mida de la lletra</translation>
     </message>
@@ -5225,12 +5206,12 @@
         <translation>Explorador de fitxers</translation>
     </message>
     <message>
-        <location line="-2031"/>
+        <location line="-2017"/>
         <source>Normal</source>
         <translation>Normal</translation>
     </message>
     <message>
-        <location line="+370"/>
+        <location line="+352"/>
         <source>These preferences are applied after any .octaverc startup files.</source>
         <translation>Aquestes configuracions s&apos;apliquen després del fitxer d&apos;inici &quot;.octaverc&quot;.</translation>
     </message>
@@ -5250,42 +5231,47 @@
         <translation>Nombre de caràcters a partir del qual es mostra la llista: </translation>
     </message>
     <message>
-        <location line="-1802"/>
+        <location line="-1805"/>
         <source>Preferences</source>
         <translation type="unfinished">Preferències</translation>
     </message>
     <message>
-        <location line="+66"/>
+        <location line="+351"/>
         <source>(requires restart)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+355"/>
+        <location line="+73"/>
         <source>Use native file dialogs</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-280"/>
-        <source>Use system icon theme if available (requires restart)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+50"/>
+        <location line="-98"/>
         <source>Toolbar Icons</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+179"/>
+        <location line="-224"/>
         <source>Language</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+34"/>
+        <location line="-41"/>
+        <source>Dock widgets window icons</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Style</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+43"/>
+        <source>Icon theme (requires restart)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+380"/>
         <source>Initial working directory of Octave interpreter</source>
         <translation type="unfinished"></translation>
     </message>
@@ -5320,7 +5306,12 @@
         <translation>Mida relativa respecte a la lletra de l&apos;editor </translation>
     </message>
     <message>
-        <location line="+93"/>
+        <location line="+79"/>
+        <source>Highlight current line (color adjustable below with editor styles)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <source>Highlight all occurrences of a word selected by a double click</source>
         <translation>Ressalta totes les coincidències de la paraula seleccionada amb doble clic</translation>
     </message>
@@ -5440,12 +5431,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+39"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color, and background color (for the latter, the color magenta (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selecciona el tipus de lletra, mida (relativa a la mida per defecte), estil (&lt;b&gt;n&lt;/b&gt;egreta, &lt;b&gt;c&lt;/b&gt;ursiva, &lt;b&gt;s&lt;/b&gt;ubrallat), color i color de fons (per al color de fons, el color magenta (255,0,255) és el marcador de posició per defecte).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+62"/>
         <source>Behavior</source>
         <translation>Comportament</translation>
     </message>
@@ -5475,12 +5466,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+117"/>
-        <source>Disable menu accelerators of main window menus when Commmand Window has focus</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+37"/>
+        <location line="+154"/>
         <source>Import shortcut set</source>
         <translation>Importa el conjunt de dreceres</translation>
     </message>
@@ -5574,12 +5560,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-2360"/>
-        <source>Icon set for dock widgets</source>
-        <translation>Conjunt d&apos;icones per als plafons d&apos;acoblament</translation>
-    </message>
-    <message>
-        <location line="+1968"/>
+        <location line="-392"/>
         <source>Synchronize Octave working directory with file browser</source>
         <translation>Sincronitza el directori de treball de l&apos;Octave amb l&apos;explorador de fitxers</translation>
     </message>
@@ -5600,7 +5581,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+4"/>
+        <source>Disable menu accelerators of main window menus when Command Window has focus</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+50"/>
         <source>Export</source>
         <translation>Exporta</translation>
     </message>
--- a/libgui/languages/fr_FR.ts	Thu Nov 24 06:30:22 2022 -0800
+++ b/libgui/languages/fr_FR.ts	Thu Nov 24 16:16:52 2022 -0500
@@ -6,7 +6,7 @@
     <message>
         <location filename="../src/files-dock-widget.cc" line="+138"/>
         <source>Invalid filename</source>
-        <translation type="unfinished"></translation>
+        <translation>Nom de fichier non valide</translation>
     </message>
 </context>
 <context>
@@ -602,7 +602,9 @@
         <source>The file
 %1
 is not a valid XBEL file version 1.0.</source>
-        <translation type="unfinished"></translation>
+        <translation>Le fichier
+%1
+n&apos;est pas un fichier XBEL version 1 valide.</translation>
     </message>
     <message>
         <location line="+26"/>
@@ -1298,7 +1300,8 @@
         <location line="+66"/>
         <source>The changes could not be saved to the file
 %1</source>
-        <translation type="unfinished"></translation>
+        <translation>Les modification n&apos;ont pas pu être sauvegardées dans le fichier
+%1</translation>
     </message>
     <message>
         <location line="+152"/>
@@ -2840,7 +2843,7 @@
     <message>
         <location line="+121"/>
         <source>Color of highlighted current line (magenta (255,0,255) for automatic color)</source>
-        <translation type="unfinished"></translation>
+        <translation>Couleur pour faire ressortir la ligne courante (magenta (255,0,255) par défaut)</translation>
     </message>
     <message>
         <location line="+63"/>
@@ -3633,7 +3636,7 @@
         <location line="+129"/>
         <source>Add Shift modifier
 (allows one to enter number keys)</source>
-        <translation type="unfinished"></translation>
+        <translation>Ajouter la touche de modification Maj (permet d&apos;utiliser les touches de nombres)</translation>
     </message>
     <message>
         <location line="-464"/>
@@ -4466,7 +4469,7 @@
     <message>
         <location line="-41"/>
         <source>Dock widgets window icons</source>
-        <translation type="unfinished"></translation>
+        <translation>Icône des fenêtres</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -4476,7 +4479,7 @@
     <message>
         <location line="+43"/>
         <source>Icon theme (requires restart)</source>
-        <translation type="unfinished"></translation>
+        <translation>Thème d&apos;icônes (nécessite un redémarrage)</translation>
     </message>
     <message>
         <location line="+380"/>
@@ -4521,7 +4524,7 @@
     <message>
         <location line="+79"/>
         <source>Highlight current line (color adjustable below with editor styles)</source>
-        <translation type="unfinished"></translation>
+        <translation>Faire ressortir la ligne courante (couleur ajustable ci-dessous)</translation>
     </message>
     <message>
         <location line="+14"/>
@@ -4858,7 +4861,7 @@
     <message>
         <location line="+6"/>
         <source>Disable global shortcuts when Command Window has focus</source>
-        <translation>Désactiver les raccourcis globaux lorsque le Fenêtre de Commandes est active</translation>
+        <translation>Désactiver les raccourcis globaux lorsque la Fenêtre de Commandes est active</translation>
     </message>
     <message>
         <location line="-392"/>
@@ -4890,7 +4893,7 @@
     <message>
         <location line="+4"/>
         <source>Disable menu accelerators of main window menus when Command Window has focus</source>
-        <translation type="unfinished"></translation>
+        <translation>Désactiver les accélérateurs de menus lorsque la Fenêtre de Commandes est active</translation>
     </message>
     <message>
         <location line="+130"/>