[Libreoffice-commits] core.git: vcl/inc

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Dec 13 23:43:11 UTC 2018


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

New commits:
commit 4ad69820b0614801ce0b43fd0adb53131d12a7b6
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Thu Dec 13 22:30:04 2018 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Fri Dec 14 00:42:43 2018 +0100

    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>

diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx
index 9f7469fa3f78..6d2d4b786497 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