vcl/qt5/QtInstanceBuilder.cxx       |    1 +
 vcl/qt5/QtInstanceMessageDialog.cxx |   11 ++++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit fe192195566d4de2939827a66ec521b341aa16c6
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Nov 8 22:42:41 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Sat Nov 9 19:04:41 2024 +0100

    tdf#130857 qt weld: Support "LibreOffice Help Not Installed" dlg
    
    Declare support for the "LibreOfficeDev Help Not Installed"
    dialog that shows when pressing F1 in a build that doesn't
    include the local help.
    
    This means that native Qt widgets are used for that dialog
    now when using the qt5 or qt6 VCL plugin and starting LO with
    environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
    
    Change-Id: I25254fd462b867a10e3ed6efc31d9b145466b0f5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176299
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx
index 957645896c1f..ae6567f0a3e8 100644
--- a/vcl/qt5/QtInstanceBuilder.cxx
+++ b/vcl/qt5/QtInstanceBuilder.cxx
@@ -59,6 +59,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& 
rUIFile)
         u"modules/swriter/ui/inforeadonlydialog.ui"_ustr,
         u"modules/swriter/ui/renameobjectdialog.ui"_ustr,
         u"modules/swriter/ui/wordcount.ui"_ustr,
+        u"sfx/ui/helpmanual.ui"_ustr,
         u"sfx/ui/licensedialog.ui"_ustr,
         u"sfx/ui/password.ui"_ustr,
         u"sfx/ui/querysavedialog.ui"_ustr,
commit 19b09cbc7f9092afadb1ae4902d7d3d7b74c4371
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Nov 8 22:35:09 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Sat Nov 9 19:04:32 2024 +0100

    tdf#130857 qt weld: Return actual msg dialog ret code
    
    If a synchronous message dialog is closed by means other than clicking
    a button, return the QDialog::exec response code in
    QtInstanceMessageDialog::run, comparable to what already
    happens in the async case (s. QtInstanceMessageDialog::dialogFinished)
    instead of always returning RET_CLOSE.
    
    This is relevant e.g. for the "LibreOfficeDev Help Not
    Installed" dialog that shows when pressing F1 in a build
    not including local help, which will be declared as
    supported in an upcoming commit. That dialog gets
    closed with a response code of RET_YES
    when the link button is clicked, see
    HelpManualMessage's DownloadClickHdl
    (in sfx2/source/appl/sfxhelp.cxx).
    
    Change-Id: Iaa1599dda618e61a5b19264f1984d570a45c6881
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176298
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/vcl/qt5/QtInstanceMessageDialog.cxx 
b/vcl/qt5/QtInstanceMessageDialog.cxx
index 9be7dd9c4f27..9991539cc866 100644
--- a/vcl/qt5/QtInstanceMessageDialog.cxx
+++ b/vcl/qt5/QtInstanceMessageDialog.cxx
@@ -148,11 +148,12 @@ int QtInstanceMessageDialog::run()
         return nRet;
     }
 
-    m_pMessageDialog->exec();
-    QAbstractButton* pClickedButton = m_pMessageDialog->clickedButton();
-    if (!pClickedButton)
-        return RET_CLOSE;
-    return pClickedButton->property(PROPERTY_VCL_RESPONSE_CODE).toInt();
+    // if a button was clicked, return its response code
+    int nRet = m_pMessageDialog->exec();
+    if (QAbstractButton* pClickedButton = m_pMessageDialog->clickedButton())
+        return pClickedButton->property(PROPERTY_VCL_RESPONSE_CODE).toInt();
+
+    return nRet;
 }
 
 void QtInstanceMessageDialog::dialogFinished(int nResult)

Reply via email to