Commit 5ca4464f authored by Akarsh Simha's avatar Akarsh Simha
Browse files

Reduce unnecessary include dependencies, use forward declarations.

parent 1a6d50b0
......@@ -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");
......
......@@ -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
......
......@@ -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;
......
......@@ -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"
......
......@@ -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
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -21,7 +21,6 @@
#define LAMBERTPROJECTOR_H
#include "projector.h"
#include "skymap.h"
/**
* @class LambertProjector
......
......@@ -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
......
......@@ -21,7 +21,6 @@
#include "listcomponent.h"
#include "Options.h"
#include "catalogdb.h"
struct stat;
......
......@@ -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 */
......
......@@ -21,7 +21,10 @@
#define SYNCEDCATALOGCOMPONENT_H
#include "catalogcomponent.h"
#include "catalogentrydata.h"
class DeepSkyObject;
class SkyComposite;
/**
* @class SyncedCatalogComponent
*
......
......@@ -18,6 +18,7 @@
/* Project Includes */
#include "adddeepskyobject.h"
#include "skyobjects/skyobject.h"
/* KDE Includes */
#include <KMessageBox>
......
......@@ -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;
}
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment