vcl/qt5/QtSystem.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit b19eba2142eb863aaca3e4d091ab25c480699510
Author:     Michael Weghorn <[email protected]>
AuthorDate: Fri Feb 27 23:04:32 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Sat Feb 28 16:37:01 2026 +0100

    qt: Implement QtSystem::ShowNativeMessageBox
    
    The method just didn't do anything so far.
    Implement actually showing an error dialog.
    
    With this in place, using the qt6 VCL
    plugin now also results in an error
    dialog actually shown when tested
    as described in previous commit
    
    Change-Id: Iaf2c803071698911f4834070ad00b9ad325374c9
    Author: Michael Weghorn <[email protected]>
    Date:   Fri Feb 27 22:27:37 2026 +0100
    
        vcl: Drop SalSystem::ShowNativeMessageBox return value
    
    Change-Id: I859065b1c896aa5d1a6feae683c0636fa3639daf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200660
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/qt5/QtSystem.cxx b/vcl/qt5/QtSystem.cxx
index 0a7060de8fce..398bf4205bd9 100644
--- a/vcl/qt5/QtSystem.cxx
+++ b/vcl/qt5/QtSystem.cxx
@@ -11,6 +11,9 @@
 #include <QtGui/QScreen>
 
 #include <tools/gen.hxx>
+#include <vcl/svapp.hxx>
+
+#include <QtInstance.hxx>
 #include <QtSystem.hxx>
 #include <QtTools.hxx>
 
@@ -22,6 +25,12 @@ AbsoluteScreenPixelRectangle 
QtSystem::GetDisplayScreenPosSizePixel(unsigned int
     return AbsoluteScreenPixelRectangle(toRectangle(scaledQRect(qRect, 
qApp->devicePixelRatio())));
 }
 
-void QtSystem::ShowNativeMessageBox(const OUString&, const OUString&) {}
+void QtSystem::ShowNativeMessageBox(const OUString& rTitle, const OUString& 
rMessage)
+{
+    SolarMutexGuard g;
+
+    GetQtInstance().RunInMainThread(
+        [&] { QMessageBox::critical(nullptr, toQString(rTitle), 
toQString(rMessage)); });
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */

Reply via email to