[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/inc

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Wed May 22 15:04:34 UTC 2019


 vcl/inc/qt5/Qt5Menu.hxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d31279d119511e03adefec67047a64de1beff392
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Thu Dec 13 22:30:04 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed May 22 17:03:57 2019 +0200

    Qt5Menu.hxx: Add missing include/forward-declaration
    
    Since 'QObject' and the 'Q_OBJECT' macro are used,
    the corresponding header needs to be included.
    
    Without the include and forward-declaration given here,
    the compiler doesn't know about 'QObject' and 'QAction'
    which are used further below, unless another header that
    takes care of this is included before 'QtMenu.hxx'.
    
    The error could be provoked e.g. by moving the
    '#include <Qt5Menu.hxx>' in front of all other includes
    in 'vcl/qt5/Qt5Frame.cxx'.
    
    Change-Id: I76c15eb445cbe26774d6e4177e12c93658daf0ad
    Reviewed-on: https://gerrit.libreoffice.org/65130
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 4ad69820b0614801ce0b43fd0adb53131d12a7b6)
    Reviewed-on: https://gerrit.libreoffice.org/72733
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx
index dfd6192e2c73..ea8ae92e0b04 100644
--- a/vcl/inc/qt5/Qt5Menu.hxx
+++ b/vcl/inc/qt5/Qt5Menu.hxx
@@ -11,9 +11,12 @@
 
 #include <salmenu.hxx>
 
+#include <QtCore/QObject>
+
 #include <memory>
 
 class MenuItemList;
+class QAction;
 class QActionGroup;
 class QMenu;
 class QMenuBar;


More information about the Libreoffice-commits mailing list