summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-09-28 06:46:21 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-09-29 02:20:26 (GMT)
commit5ca4464f247eb3fed442eeb03bcac2f3ad558a60 (patch)
tree6bb2bf8850b735756807acc2c4e55380924e5019
parent1a6d50b0553763c2c3418952f3e85b12359ab699 (diff)
Reduce unnecessary include dependencies, use forward declarations.
-rw-r--r--datahandlers/catalogdb.cpp13
-rw-r--r--datahandlers/catalogdb.h23
-rw-r--r--kstars/dialogs/detaildialog.h2
-rw-r--r--kstars/dialogs/finddialog.cpp1
-rw-r--r--kstars/dialogs/finddialog.h2
-rw-r--r--kstars/kstarsdbus.cpp2
-rw-r--r--kstars/oal/execute.cpp1
-rw-r--r--kstars/oal/log.cpp1
-rw-r--r--kstars/projections/lambertprojector.h1
-rw-r--r--kstars/skycomponents/catalogcomponent.cpp3
-rw-r--r--kstars/skycomponents/catalogcomponent.h1
-rw-r--r--kstars/skycomponents/syncedcatalogcomponent.cpp3
-rw-r--r--kstars/skycomponents/syncedcatalogcomponent.h3
-rw-r--r--kstars/tools/adddeepskyobject.cpp1
-rw-r--r--kstars/tools/altvstime.cpp4
-rw-r--r--kstars/tools/modcalcangdist.cpp1
-rw-r--r--kstars/tools/modcalcapcoord.cpp1
-rw-r--r--kstars/tools/modcalcgalcoord.cpp1
18 files changed, 44 insertions, 20 deletions
diff --git a/datahandlers/catalogdb.cpp b/datahandlers/catalogdb.cpp
index aee0d67..600efc7 100644
--- a/datahandlers/catalogdb.cpp
+++ b/datahandlers/catalogdb.cpp
@@ -16,9 +16,20 @@
***************************************************************************/
#include "catalogdb.h"
+#include "catalogdata.h"
+#include "catalogentrydata.h"
#include "kstars/version.h"
#include "../kstars/auxiliary/kspaths.h"
-
+#include "starobject.h"
+#include "deepskyobject.h"
+#include "skycomponent.h"
+#include "skyobject.h"
+
+#include <QVariant>
+#include <QHash>
+#include <QSqlTableModel>
+#include <QSqlRecord>
+#include <QSqlQuery>
bool CatalogDB::Initialize() {
skydb_ = QSqlDatabase::addDatabase("QSQLITE", "skydb");
diff --git a/datahandlers/catalogdb.h b/datahandlers/catalogdb.h
index 57e5902..0f9c68e 100644
--- a/datahandlers/catalogdb.h
+++ b/datahandlers/catalogdb.h
@@ -22,13 +22,7 @@
#include <KLocalizedString>
#include <QDebug>
#include <QSqlDatabase>
-#include <QSqlQuery>
-#include <QSqlRecord>
-#include <QSqlTableModel>
-#include <QString>
-#include <QHash>
#include <QSqlError>
-#include <QVariant>
#include <QFile>
#include <QDir>
@@ -37,11 +31,18 @@
#endif
#include "ksparser.h"
-#include "catalogdata.h"
-#include "catalogentrydata.h"
-#include "starobject.h"
-#include "deepskyobject.h"
-#include "skycomponent.h"
+
+#include <QString>
+#include <QStringList>
+#include <QList>
+#include <QPair>
+#include <QSqlQuery>
+
+
+class SkyObject;
+class CatalogComponent;
+class CatalogData;
+class CatalogEntryData;
/* Some notes about the database. (skycomponents.sqlite)
* 1) The uid for Object Designation is the uid being used by objects in KStars
diff --git a/kstars/dialogs/detaildialog.h b/kstars/dialogs/detaildialog.h
index d3156f5..700d753 100644
--- a/kstars/dialogs/detaildialog.h
+++ b/kstars/dialogs/detaildialog.h
@@ -28,7 +28,6 @@
#include <kpagedialog.h>
-#include "skyobjects/skyobject.h"
//UI headers
#include "ui_details_data.h"
#include "ui_details_data_comet.h"
@@ -45,6 +44,7 @@ class QString;
class QStringList;
class KStars;
class KStarsDateTime;
+class SkyObject;
class DataWidget;
class DataCometWidget;
diff --git a/kstars/dialogs/finddialog.cpp b/kstars/dialogs/finddialog.cpp
index f0c8c36..198428a 100644
--- a/kstars/dialogs/finddialog.cpp
+++ b/kstars/dialogs/finddialog.cpp
@@ -21,6 +21,7 @@
#include "Options.h"
#include "detaildialog.h"
#include "skyobjects/skyobject.h"
+#include "skyobjects/deepskyobject.h"
#include "skycomponents/starcomponent.h"
#include "skycomponents/syncedcatalogcomponent.h"
#include "skycomponents/skymapcomposite.h"
diff --git a/kstars/dialogs/finddialog.h b/kstars/dialogs/finddialog.h
index dc64e87..17da0fc 100644
--- a/kstars/dialogs/finddialog.h
+++ b/kstars/dialogs/finddialog.h
@@ -22,12 +22,12 @@
#include <QDialog>
#include "ui_finddialog.h"
-#include "skyobjects/skyobject.h"
class QTimer;
class QStringListModel;
class QSortFilterProxyModel;
class SkyObjectListModel;
+class SkyObject;
class FindDialogUI : public QFrame, public Ui::FindDialog {
Q_OBJECT
diff --git a/kstars/kstarsdbus.cpp b/kstars/kstarsdbus.cpp
index a3de595..c9898a6 100644
--- a/kstars/kstarsdbus.cpp
+++ b/kstars/kstarsdbus.cpp
@@ -38,6 +38,8 @@
#include "ksdssdownloader.h"
#include "skymap.h"
#include "skyobjects/skyobject.h"
+#include "skyobjects/starobject.h"
+#include "skyobjects/deepskyobject.h"
#include "skyobjects/ksplanetbase.h"
#include "skycomponents/skymapcomposite.h"
#include "simclock.h"
diff --git a/kstars/oal/execute.cpp b/kstars/oal/execute.cpp
index 73a0c08..752628d 100644
--- a/kstars/oal/execute.cpp
+++ b/kstars/oal/execute.cpp
@@ -31,6 +31,7 @@
#include "oal/lens.h"
#include "oal/filter.h"
#include "skyobjects/skyobject.h"
+#include "skyobjects/starobject.h"
#include "dialogs/locationdialog.h"
#include "dialogs/finddialog.h"
#include "skycomponents/skymapcomposite.h"
diff --git a/kstars/oal/log.cpp b/kstars/oal/log.cpp
index e4e5b8f..073043f 100644
--- a/kstars/oal/log.cpp
+++ b/kstars/oal/log.cpp
@@ -20,6 +20,7 @@
#include "kstars.h"
#include "kstarsdata.h"
#include "skyobjects/skyobject.h"
+#include "skyobjects/starobject.h"
#include "skymap.h"
#include "skycomponents/constellationboundarylines.h"
#include "skycomponents/skymapcomposite.h"
diff --git a/kstars/projections/lambertprojector.h b/kstars/projections/lambertprojector.h
index 27a569f..9725814 100644
--- a/kstars/projections/lambertprojector.h
+++ b/kstars/projections/lambertprojector.h
@@ -21,7 +21,6 @@
#define LAMBERTPROJECTOR_H
#include "projector.h"
-#include "skymap.h"
/**
* @class LambertProjector
diff --git a/kstars/skycomponents/catalogcomponent.cpp b/kstars/skycomponents/catalogcomponent.cpp
index 7fa7bbb..037294a 100644
--- a/kstars/skycomponents/catalogcomponent.cpp
+++ b/kstars/skycomponents/catalogcomponent.cpp
@@ -17,6 +17,8 @@
#include "catalogcomponent.h"
+#include "catalogdata.h"
+
#include <QDebug>
#include <KLocalizedString>
#ifndef KSTARS_LITE
@@ -36,6 +38,7 @@
#include "skypainter.h"
#include "skyobjects/starobject.h"
#include "skyobjects/deepskyobject.h"
+#include "catalogdb.h"
QStringList CatalogComponent::m_Columns
diff --git a/kstars/skycomponents/catalogcomponent.h b/kstars/skycomponents/catalogcomponent.h
index 4531d56..66f7bb0 100644
--- a/kstars/skycomponents/catalogcomponent.h
+++ b/kstars/skycomponents/catalogcomponent.h
@@ -21,7 +21,6 @@
#include "listcomponent.h"
#include "Options.h"
-#include "catalogdb.h"
struct stat;
diff --git a/kstars/skycomponents/syncedcatalogcomponent.cpp b/kstars/skycomponents/syncedcatalogcomponent.cpp
index 7d67a5d..1966655 100644
--- a/kstars/skycomponents/syncedcatalogcomponent.cpp
+++ b/kstars/skycomponents/syncedcatalogcomponent.cpp
@@ -18,9 +18,10 @@
/* Project Includes */
#include "syncedcatalogcomponent.h"
-#include "catalogdb.h"
#include "kstarsdata.h"
+#include "deepskyobject.h"
#include "Options.h"
+#include "catalogdata.h"
/* KDE Includes */
diff --git a/kstars/skycomponents/syncedcatalogcomponent.h b/kstars/skycomponents/syncedcatalogcomponent.h
index 9bf4851..d9d1ba7 100644
--- a/kstars/skycomponents/syncedcatalogcomponent.h
+++ b/kstars/skycomponents/syncedcatalogcomponent.h
@@ -21,7 +21,10 @@
#define SYNCEDCATALOGCOMPONENT_H
#include "catalogcomponent.h"
+#include "catalogentrydata.h"
+class DeepSkyObject;
+class SkyComposite;
/**
* @class SyncedCatalogComponent
*
diff --git a/kstars/tools/adddeepskyobject.cpp b/kstars/tools/adddeepskyobject.cpp
index cedb54c..30e585b 100644
--- a/kstars/tools/adddeepskyobject.cpp
+++ b/kstars/tools/adddeepskyobject.cpp
@@ -18,6 +18,7 @@
/* Project Includes */
#include "adddeepskyobject.h"
+#include "skyobjects/skyobject.h"
/* KDE Includes */
#include <KMessageBox>
diff --git a/kstars/tools/altvstime.cpp b/kstars/tools/altvstime.cpp
index ae583e8..76abb75 100644
--- a/kstars/tools/altvstime.cpp
+++ b/kstars/tools/altvstime.cpp
@@ -41,6 +41,7 @@
#include "geolocation.h"
#include "skyobjects/skypoint.h"
#include "skyobjects/skyobject.h"
+#include "skyobjects/starobject.h"
#include <kplotwidget.h>
#include "avtplotwidget.h"
@@ -1407,6 +1408,3 @@ QString AltVsTime::getObjectName(const SkyObject *o, bool translated)
return finalObjectName;
}
-
-
-
diff --git a/kstars/tools/modcalcangdist.cpp b/kstars/tools/modcalcangdist.cpp
index 497d9e1..29321e4 100644
--- a/kstars/tools/modcalcangdist.cpp
+++ b/kstars/tools/modcalcangdist.cpp
@@ -25,6 +25,7 @@
#include "dms.h"
#include "widgets/dmsbox.h"
#include "skyobjects/skypoint.h"
+#include "skyobjects/skyobject.h"
#include "dialogs/finddialog.h"
#include "kstars.h"
diff --git a/kstars/tools/modcalcapcoord.cpp b/kstars/tools/modcalcapcoord.cpp
index dae3e0d..22b2303 100644
--- a/kstars/tools/modcalcapcoord.cpp
+++ b/kstars/tools/modcalcapcoord.cpp
@@ -26,6 +26,7 @@
#include "kstars.h"
#include "dms.h"
#include "skyobjects/skypoint.h"
+#include "skyobjects/skyobject.h"
#include "kstarsdatetime.h"
#include "dialogs/finddialog.h"
#include "widgets/dmsbox.h"
diff --git a/kstars/tools/modcalcgalcoord.cpp b/kstars/tools/modcalcgalcoord.cpp
index 355e1ea..4896ad2 100644
--- a/kstars/tools/modcalcgalcoord.cpp
+++ b/kstars/tools/modcalcgalcoord.cpp
@@ -24,6 +24,7 @@
#include "dms.h"
#include "skyobjects/skypoint.h"
+#include "skyobjects/skyobject.h"
#include "kstars.h"
#include "dialogs/finddialog.h"
#include "widgets/dmsbox.h"