changeset 21692:de138ebaa7a9

avoid including config.h multiple times * file-editor-tab.h: Don't include config.h. * GLCanvas.cc: Don't include config.h twice. * ToolBarButton.cc: Don't include config.h.
author John W. Eaton <jwe@octave.org>
date Fri, 13 May 2016 14:22:56 -0400
parents 263d18409fdf
children 2cb0dbd5154f
files libgui/graphics/GLCanvas.cc libgui/graphics/ToolBarButton.cc libgui/src/m-editor/file-editor-tab.h
diffstat 3 files changed, 5 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/GLCanvas.cc	Fri May 13 09:36:14 2016 -0400
+++ b/libgui/graphics/GLCanvas.cc	Fri May 13 14:22:56 2016 -0400
@@ -24,10 +24,6 @@
 #  include "config.h"
 #endif
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 #include "gl-render.h"
 #include "graphics.h"
 
--- a/libgui/graphics/ToolBarButton.cc	Fri May 13 09:36:14 2016 -0400
+++ b/libgui/graphics/ToolBarButton.cc	Fri May 13 14:22:56 2016 -0400
@@ -20,9 +20,9 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
+// This file should not include config.h.  It is only included in other
+// C++ source files that should have included config.h before including
+// this file.
 
 #include <QAction>
 #include <QWidget>
--- a/libgui/src/m-editor/file-editor-tab.h	Fri May 13 09:36:14 2016 -0400
+++ b/libgui/src/m-editor/file-editor-tab.h	Fri May 13 14:22:56 2016 -0400
@@ -33,13 +33,6 @@
 #include <QLabel>
 #include <QComboBox>
 
-// FIXME: We should not be including config.h in header files.
-// Only needed for octave_value_list type.
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#  include "ovl.h"
-#endif
-
 #include "find-dialog.h"
 #include "octave-qscintilla.h"
 #include "builtin-defun-decls.h"
@@ -48,6 +41,8 @@
                        typedefed elsewhere.  Could use common location. */
 
 
+class octave_value_list;
+
 class file_editor;
 
 class file_editor_tab : public QWidget