From 461c27265a812ccadb707151afbf22a1874cce04 Mon Sep 17 00:00:00 2001 From: Roland Wolf Date: Mon, 6 Sep 2010 16:23:27 +0200 Subject: fix for compilation with namespace --- examples/tutorials/modelview/3_changingmodel/mymodel.h | 6 +++++- examples/tutorials/modelview/5_edit/mainwindow.h | 6 +++++- examples/tutorials/modelview/6_treeview/mainwindow.h | 8 ++++++-- examples/tutorials/modelview/7_selections/mainwindow.h | 8 ++++++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/examples/tutorials/modelview/3_changingmodel/mymodel.h b/examples/tutorials/modelview/3_changingmodel/mymodel.h index 87c3dba..91e3cb9 100755 --- a/examples/tutorials/modelview/3_changingmodel/mymodel.h +++ b/examples/tutorials/modelview/3_changingmodel/mymodel.h @@ -42,7 +42,11 @@ #define MYMODEL_H #include -#include + +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +class QTimer; // forward declaration +QT_END_NAMESPACE + class MyModel : public QAbstractTableModel { diff --git a/examples/tutorials/modelview/5_edit/mainwindow.h b/examples/tutorials/modelview/5_edit/mainwindow.h index ac5b77b..41b15d1 100755 --- a/examples/tutorials/modelview/5_edit/mainwindow.h +++ b/examples/tutorials/modelview/5_edit/mainwindow.h @@ -42,7 +42,11 @@ #define MAINWINDOW_H #include -#include + +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +class QTableView; //forward declaration +QT_END_NAMESPACE + class MainWindow : public QMainWindow { diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.h b/examples/tutorials/modelview/6_treeview/mainwindow.h index 4c4ddb0..dcc9284 100755 --- a/examples/tutorials/modelview/6_treeview/mainwindow.h +++ b/examples/tutorials/modelview/6_treeview/mainwindow.h @@ -42,8 +42,12 @@ #define MAINWINDOW_H #include -#include -#include + +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +class QTreeView; //forward declarations +class QStandardItemModel; +class QStandardItem; +QT_END_NAMESPACE class MainWindow : public QMainWindow diff --git a/examples/tutorials/modelview/7_selections/mainwindow.h b/examples/tutorials/modelview/7_selections/mainwindow.h index a8f8488..5dc973c 100755 --- a/examples/tutorials/modelview/7_selections/mainwindow.h +++ b/examples/tutorials/modelview/7_selections/mainwindow.h @@ -42,8 +42,12 @@ #define MAINWINDOW_H #include -#include -#include + +QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +class QTreeView; //forward declarations +class QStandardItemModel; +class QItemSelection; +QT_END_NAMESPACE class MainWindow : public QMainWindow -- cgit v0.12