Hi,
to be able to compile the (Qt-only) marble lib when using a self-compiled
Qt5 which was configured with a namespace (configure -qtnamespace MyNameSpace
...)
one has to use the Qt macro QT_FORWARD_DECLARE_CLASS when forward declaring a
Qt class
(or directly including the class header), so e.g. instead of
class QString;
one needs to write
QT_FORWARD_DECLARE_CLASS(QString)
Note that using this macro makes sure it compiles with or without namespace.
The attached patch does this for all marble files
(some files needed to be tweaked manually as the QT_FORWARD_DECLARE_CLASS macro
needs to be known
by a header, so sometimes it's simpler to just include the Qt header directly
instead of doing an include
of the header containing the macro and then using QT_FORWARD_DECLARE_CLASS)
Hope you can integrate it.
--
Best regards/Schöne Grüße
Martin
A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?
() ascii ribbon campaign - against html e-mail
/\ - against proprietary attachments
Geschenkideen, Accessoires, Seifen, Kulinarisches: www.bibibest.at
diff --git a/src/apps/marble-kde/KdeMainWindow.h b/src/apps/marble-kde/KdeMainWindow.h
index 7a94119..7135669 100644
--- a/src/apps/marble-kde/KdeMainWindow.h
+++ b/src/apps/marble-kde/KdeMainWindow.h
@@ -16,8 +16,8 @@
#include <KDE/KXmlGuiWindow>
-class QActionGroup;
-class QAction;
+QT_FORWARD_DECLARE_CLASS(QActionGroup)
+QT_FORWARD_DECLARE_CLASS(QAction)
namespace Marble
{
diff --git a/src/apps/marble-kde/marble_part.h b/src/apps/marble-kde/marble_part.h
index 6b71128..2d03ee7 100644
--- a/src/apps/marble-kde/marble_part.h
+++ b/src/apps/marble-kde/marble_part.h
@@ -32,10 +32,10 @@ class KToggleAction;
class KConfigDialog;
class KToolBar;
-class QLabel;
-class QPrinter;
-class QProgressBar;
-class QStandardItemModel;
+QT_FORWARD_DECLARE_CLASS(QLabel)
+QT_FORWARD_DECLARE_CLASS(QPrinter)
+QT_FORWARD_DECLARE_CLASS(QProgressBar)
+QT_FORWARD_DECLARE_CLASS(QStandardItemModel)
namespace KParts
{
diff --git a/src/apps/marble-mobile/MobileMainWindow.h b/src/apps/marble-mobile/MobileMainWindow.h
index 1355913..c55881c 100644
--- a/src/apps/marble-mobile/MobileMainWindow.h
+++ b/src/apps/marble-mobile/MobileMainWindow.h
@@ -21,7 +21,7 @@
#include "MapThemeManager.h"
-class QAction;
+QT_FORWARD_DECLARE_CLASS(QAction)
namespace Marble
{
diff --git a/src/apps/marble-qt/QtMainWindow.h b/src/apps/marble-qt/QtMainWindow.h
index b7c37dd..bfb3d76 100644
--- a/src/apps/marble-qt/QtMainWindow.h
+++ b/src/apps/marble-qt/QtMainWindow.h
@@ -20,12 +20,12 @@
#include <QVariantMap>
#include "ControlView.h"
-class QActionGroup;
-class QAction;
-class QLabel;
-class QMenu;
-class QPrinter;
-class QProgressBar;
+QT_FORWARD_DECLARE_CLASS(QActionGroup)
+QT_FORWARD_DECLARE_CLASS(QAction)
+QT_FORWARD_DECLARE_CLASS(QLabel)
+QT_FORWARD_DECLARE_CLASS(QMenu)
+QT_FORWARD_DECLARE_CLASS(QPrinter)
+QT_FORWARD_DECLARE_CLASS(QProgressBar)
namespace Marble
{
diff --git a/src/apps/marble-ui/ControlView.h b/src/apps/marble-ui/ControlView.h
index 8efd14f..4e8e010 100644
--- a/src/apps/marble-ui/ControlView.h
+++ b/src/apps/marble-ui/ControlView.h
@@ -24,13 +24,13 @@
#include "MarbleWidget.h"
-class QSplitter;
-class QPrintDialog;
-class QTextDocument;
-class QMainWindow;
-class QDockWidget;
-class QMenu;
-class QPrinter;
+QT_FORWARD_DECLARE_CLASS(QSplitter)
+QT_FORWARD_DECLARE_CLASS(QPrintDialog)
+QT_FORWARD_DECLARE_CLASS(QTextDocument)
+QT_FORWARD_DECLARE_CLASS(QMainWindow)
+QT_FORWARD_DECLARE_CLASS(QDockWidget)
+QT_FORWARD_DECLARE_CLASS(QMenu)
+QT_FORWARD_DECLARE_CLASS(QPrinter)
namespace Marble
{
diff --git a/src/lib/marble/AbstractDataPlugin.h b/src/lib/marble/AbstractDataPlugin.h
index 555ffa9..655da9d 100644
--- a/src/lib/marble/AbstractDataPlugin.h
+++ b/src/lib/marble/AbstractDataPlugin.h
@@ -16,11 +16,11 @@
#include "RenderPlugin.h"
#if QT_VERSION < 0x050000
-class QDeclarativeComponent;
+QT_FORWARD_DECLARE_CLASS(QDeclarativeComponent)
#else
-class QQmlComponent;
+QT_FORWARD_DECLARE_CLASS(QQmlComponent)
#endif
-class QGraphicsItem;
+QT_FORWARD_DECLARE_CLASS(QGraphicsItem)
namespace Marble
{
diff --git a/src/lib/marble/AbstractDataPluginItem.h b/src/lib/marble/AbstractDataPluginItem.h
index e4494d0..043e418 100644
--- a/src/lib/marble/AbstractDataPluginItem.h
+++ b/src/lib/marble/AbstractDataPluginItem.h
@@ -18,7 +18,7 @@
#include "BillboardGraphicsItem.h"
#include "marble_export.h"
-class QAction;
+QT_FORWARD_DECLARE_CLASS(QAction)
namespace Marble
{
diff --git a/src/lib/marble/AbstractDataPluginModel.h b/src/lib/marble/AbstractDataPluginModel.h
index 4d6ec9a..65e36b1 100644
--- a/src/lib/marble/AbstractDataPluginModel.h
+++ b/src/lib/marble/AbstractDataPluginModel.h
@@ -19,9 +19,9 @@
#include "marble_export.h"
#include "MarbleGlobal.h"
-class QPoint;
-class QUrl;
-class QAbstractItemModel;
+QT_FORWARD_DECLARE_CLASS(QPoint)
+QT_FORWARD_DECLARE_CLASS(QUrl)
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
namespace Marble
{
diff --git a/src/lib/marble/AbstractFloatItem.h b/src/lib/marble/AbstractFloatItem.h
index 818d7f9..c9e91c0 100644
--- a/src/lib/marble/AbstractFloatItem.h
+++ b/src/lib/marble/AbstractFloatItem.h
@@ -28,7 +28,7 @@
#include "marble_export.h"
-class QMenu;
+QT_FORWARD_DECLARE_CLASS(QMenu)
namespace Marble
{
diff --git a/src/lib/marble/ClipPainter.h b/src/lib/marble/ClipPainter.h
index 67715c5..8f87acc 100644
--- a/src/lib/marble/ClipPainter.h
+++ b/src/lib/marble/ClipPainter.h
@@ -18,8 +18,8 @@
#include "marble_export.h"
#include "MarbleGlobal.h"
-class QPaintDevice;
-class QPolygonF;
+QT_FORWARD_DECLARE_CLASS(QPaintDevice)
+QT_FORWARD_DECLARE_CLASS(QPolygonF)
namespace Marble
{
diff --git a/src/lib/marble/DialogConfigurationInterface.h b/src/lib/marble/DialogConfigurationInterface.h
index c848f38..fae17b0 100644
--- a/src/lib/marble/DialogConfigurationInterface.h
+++ b/src/lib/marble/DialogConfigurationInterface.h
@@ -13,7 +13,7 @@
#include <QObject> // for Q_DECLARE_INTERFACE macro
#include "marble_export.h"
-class QDialog;
+QT_FORWARD_DECLARE_CLASS(QDialog)
namespace Marble
{
@@ -43,6 +43,8 @@ class MARBLE_EXPORT DialogConfigurationInterface
}
+QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE( Marble::DialogConfigurationInterface, "org.kde.Marble.DialogConfigurationInterface/1.0" )
+QT_END_NAMESPACE
#endif
diff --git a/src/lib/marble/DiscCache.h b/src/lib/marble/DiscCache.h
index 11150d9..8258f87 100644
--- a/src/lib/marble/DiscCache.h
+++ b/src/lib/marble/DiscCache.h
@@ -16,7 +16,7 @@
#include <QPair>
#include <QString>
-class QByteArray;
+QT_FORWARD_DECLARE_CLASS(QByteArray)
namespace Marble
{
diff --git a/src/lib/marble/DownloadRegionDialog.h b/src/lib/marble/DownloadRegionDialog.h
index 23a32cb..fd38df2 100644
--- a/src/lib/marble/DownloadRegionDialog.h
+++ b/src/lib/marble/DownloadRegionDialog.h
@@ -20,8 +20,8 @@
#include "TileCoordsPyramid.h"
#include "marble_export.h"
-class QHideEvent;
-class QShowEvent;
+QT_FORWARD_DECLARE_CLASS(QHideEvent)
+QT_FORWARD_DECLARE_CLASS(QShowEvent)
namespace Marble
{
diff --git a/src/lib/marble/FileViewWidget.h b/src/lib/marble/FileViewWidget.h
index bd44e6d..a29ca75 100644
--- a/src/lib/marble/FileViewWidget.h
+++ b/src/lib/marble/FileViewWidget.h
@@ -17,7 +17,7 @@
// Qt
#include <QWidget>
-class QModelIndex;
+QT_FORWARD_DECLARE_CLASS(QModelIndex)
namespace Marble
{
diff --git a/src/lib/marble/GeoDataTreeModel.h b/src/lib/marble/GeoDataTreeModel.h
index b14dd42..ef90d6a 100644
--- a/src/lib/marble/GeoDataTreeModel.h
+++ b/src/lib/marble/GeoDataTreeModel.h
@@ -15,7 +15,7 @@
#include <QAbstractItemModel>
-class QItemSelectionModel;
+QT_FORWARD_DECLARE_CLASS(QItemSelectionModel)
namespace Marble
{
diff --git a/src/lib/marble/GeoPainter.h b/src/lib/marble/GeoPainter.h
index f1aa3cc..f342813 100644
--- a/src/lib/marble/GeoPainter.h
+++ b/src/lib/marble/GeoPainter.h
@@ -22,12 +22,12 @@
#include "ClipPainter.h"
-class QImage;
-class QPaintDevice;
-class QPolygonF;
-class QRect;
-class QRectF;
-class QString;
+QT_FORWARD_DECLARE_CLASS(QImage)
+QT_FORWARD_DECLARE_CLASS(QPaintDevice)
+QT_FORWARD_DECLARE_CLASS(QPolygonF)
+QT_FORWARD_DECLARE_CLASS(QRect)
+QT_FORWARD_DECLARE_CLASS(QRectF)
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble
diff --git a/src/lib/marble/GeoPainter_p.h b/src/lib/marble/GeoPainter_p.h
index 22b1dfe..a0ffdbf 100644
--- a/src/lib/marble/GeoPainter_p.h
+++ b/src/lib/marble/GeoPainter_p.h
@@ -15,10 +15,10 @@
#include "MarbleGlobal.h"
-class QPolygonF;
-class QSizeF;
-class QPainterPath;
-class QRectF;
+QT_FORWARD_DECLARE_CLASS(QPolygonF)
+QT_FORWARD_DECLARE_CLASS(QSizeF)
+QT_FORWARD_DECLARE_CLASS(QPainterPath)
+QT_FORWARD_DECLARE_CLASS(QRectF)
namespace Marble
{
diff --git a/src/lib/marble/GoToDialog.h b/src/lib/marble/GoToDialog.h
index cd02b92..aea3e27 100644
--- a/src/lib/marble/GoToDialog.h
+++ b/src/lib/marble/GoToDialog.h
@@ -16,7 +16,7 @@
#include <QDialog>
-class QModelIndex;
+QT_FORWARD_DECLARE_CLASS(QModelIndex)
namespace Marble
{
diff --git a/src/lib/marble/HttpDownloadManager.h b/src/lib/marble/HttpDownloadManager.h
index 2899edd..c3bf1b4 100644
--- a/src/lib/marble/HttpDownloadManager.h
+++ b/src/lib/marble/HttpDownloadManager.h
@@ -22,7 +22,7 @@
#include "MarbleGlobal.h"
#include "marble_export.h"
-class QUrl;
+QT_FORWARD_DECLARE_CLASS(QUrl)
namespace Marble
{
diff --git a/src/lib/marble/HttpJob.h b/src/lib/marble/HttpJob.h
index 013b36a..d46a934 100644
--- a/src/lib/marble/HttpJob.h
+++ b/src/lib/marble/HttpJob.h
@@ -24,7 +24,7 @@
#include "marble_export.h"
-class QNetworkAccessManager;
+QT_FORWARD_DECLARE_CLASS(QNetworkAccessManager)
namespace Marble
{
diff --git a/src/lib/marble/LayerManager.h b/src/lib/marble/LayerManager.h
index e1bf932..a1467fd 100644
--- a/src/lib/marble/LayerManager.h
+++ b/src/lib/marble/LayerManager.h
@@ -18,7 +18,7 @@
#include <QString>
#include <QRegion>
-class QPoint;
+QT_FORWARD_DECLARE_CLASS(QPoint)
namespace Marble
{
diff --git a/src/lib/marble/MapThemeManager.h b/src/lib/marble/MapThemeManager.h
index d18c8de..f51ba38 100644
--- a/src/lib/marble/MapThemeManager.h
+++ b/src/lib/marble/MapThemeManager.h
@@ -18,9 +18,9 @@
#include "marble_export.h"
-class QStandardItem;
-class QStandardItemModel;
-class QString;
+QT_FORWARD_DECLARE_CLASS(QStandardItem)
+QT_FORWARD_DECLARE_CLASS(QStandardItemModel)
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble
{
diff --git a/src/lib/marble/MapViewWidget.h b/src/lib/marble/MapViewWidget.h
index 9a86c1e..5ad0fe7 100644
--- a/src/lib/marble/MapViewWidget.h
+++ b/src/lib/marble/MapViewWidget.h
@@ -21,7 +21,7 @@
// Qt
#include <QWidget>
-class QStandardItemModel;
+QT_FORWARD_DECLARE_CLASS(QStandardItemModel)
namespace Marble
{
diff --git a/src/lib/marble/MapWizard.h b/src/lib/marble/MapWizard.h
index a8e7c71..bc61c37 100644
--- a/src/lib/marble/MapWizard.h
+++ b/src/lib/marble/MapWizard.h
@@ -21,7 +21,7 @@
* @author Utku Aydın <[email protected]>
*/
-class QNetworkReply;
+QT_FORWARD_DECLARE_CLASS(QNetworkReply)
namespace Marble {
diff --git a/src/lib/marble/MarbleControlBox.h b/src/lib/marble/MarbleControlBox.h
index 119dcb9..adee519 100644
--- a/src/lib/marble/MarbleControlBox.h
+++ b/src/lib/marble/MarbleControlBox.h
@@ -28,9 +28,9 @@
* @author Inge Wallin <[email protected]>
*/
-class QResizeEvent;
-class QString;
-class QStandardItemModel;
+QT_FORWARD_DECLARE_CLASS(QResizeEvent)
+QT_FORWARD_DECLARE_CLASS(QString)
+QT_FORWARD_DECLARE_CLASS(QStandardItemModel)
namespace Marble
{
diff --git a/src/lib/marble/MarbleDirs.h b/src/lib/marble/MarbleDirs.h
index 1d7a16e..8af6a05 100644
--- a/src/lib/marble/MarbleDirs.h
+++ b/src/lib/marble/MarbleDirs.h
@@ -16,8 +16,8 @@
#include <QDir>
-class QString;
-class QStringList;
+QT_FORWARD_DECLARE_CLASS(QString)
+QT_FORWARD_DECLARE_CLASS(QStringList)
namespace Marble
{
diff --git a/src/lib/marble/MarbleLegendBrowser.h b/src/lib/marble/MarbleLegendBrowser.h
index e7fb4b5..a8f90e1 100644
--- a/src/lib/marble/MarbleLegendBrowser.h
+++ b/src/lib/marble/MarbleLegendBrowser.h
@@ -23,8 +23,8 @@
#include "marble_export.h"
-class QEvent;
-class QUrl;
+QT_FORWARD_DECLARE_CLASS(QEvent)
+QT_FORWARD_DECLARE_CLASS(QUrl)
namespace Marble
{
diff --git a/src/lib/marble/MarbleMap.h b/src/lib/marble/MarbleMap.h
index 7019bfa..a44aea7 100644
--- a/src/lib/marble/MarbleMap.h
+++ b/src/lib/marble/MarbleMap.h
@@ -32,8 +32,8 @@
#include "GeoDataCoordinates.h" // In geodata/data/
// Qt
-class QAbstractItemModel;
-class QItemSelectionModel;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
+QT_FORWARD_DECLARE_CLASS(QItemSelectionModel)
namespace Marble
{
diff --git a/src/lib/marble/MarbleModel.h b/src/lib/marble/MarbleModel.h
index 3470b0e..911df36 100644
--- a/src/lib/marble/MarbleModel.h
+++ b/src/lib/marble/MarbleModel.h
@@ -37,9 +37,9 @@
#include "MarbleGlobal.h"
-class QItemSelectionModel;
-class QAbstractItemModel;
-class QTextDocument;
+QT_FORWARD_DECLARE_CLASS(QItemSelectionModel)
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
+QT_FORWARD_DECLARE_CLASS(QTextDocument)
namespace Marble
{
diff --git a/src/lib/marble/MarbleNavigator.h b/src/lib/marble/MarbleNavigator.h
index 55a8c30..53f1450 100644
--- a/src/lib/marble/MarbleNavigator.h
+++ b/src/lib/marble/MarbleNavigator.h
@@ -29,7 +29,7 @@
* @author Inge Wallin <[email protected]>
*/
-class QResizeEvent;
+QT_FORWARD_DECLARE_CLASS(QResizeEvent)
namespace Marble
{
diff --git a/src/lib/marble/MarblePluginSettingsWidget.h b/src/lib/marble/MarblePluginSettingsWidget.h
index 0761412..ec31c5d 100644
--- a/src/lib/marble/MarblePluginSettingsWidget.h
+++ b/src/lib/marble/MarblePluginSettingsWidget.h
@@ -24,7 +24,7 @@
#include "marble_export.h"
-class QModelIndex;
+QT_FORWARD_DECLARE_CLASS(QModelIndex)
/**
* @short A public class that adds methods to the UI Plugins Settings Widget.
diff --git a/src/lib/marble/MarbleWidget.h b/src/lib/marble/MarbleWidget.h
index 9f1ce2f..7b39bbd 100644
--- a/src/lib/marble/MarbleWidget.h
+++ b/src/lib/marble/MarbleWidget.h
@@ -29,9 +29,9 @@
#include "marble_export.h"
#include "GeoDataFolder.h"
// Qt
-class QAbstractItemModel;
-class QItemSelectionModel;
-class QSettings;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
+QT_FORWARD_DECLARE_CLASS(QItemSelectionModel)
+QT_FORWARD_DECLARE_CLASS(QSettings)
namespace Marble
{
diff --git a/src/lib/marble/MarbleWidgetInputHandler.h b/src/lib/marble/MarbleWidgetInputHandler.h
index f763d1e..1ddbed1 100644
--- a/src/lib/marble/MarbleWidgetInputHandler.h
+++ b/src/lib/marble/MarbleWidgetInputHandler.h
@@ -21,9 +21,9 @@
#include "marble_export.h"
-class QEvent;
-class QRubberBand;
-class QTimer;
+QT_FORWARD_DECLARE_CLASS(QEvent)
+QT_FORWARD_DECLARE_CLASS(QRubberBand)
+QT_FORWARD_DECLARE_CLASS(QTimer)
namespace Marble
{
diff --git a/src/lib/marble/MarbleWidgetPopupMenu.h b/src/lib/marble/MarbleWidgetPopupMenu.h
index 5e13abc..d9b31d9 100644
--- a/src/lib/marble/MarbleWidgetPopupMenu.h
+++ b/src/lib/marble/MarbleWidgetPopupMenu.h
@@ -17,7 +17,7 @@
#include <QObject>
#include <QPoint>
-class QAction;
+QT_FORWARD_DECLARE_CLASS(QAction)
namespace Marble
{
diff --git a/src/lib/marble/MergedLayerDecorator.h b/src/lib/marble/MergedLayerDecorator.h
index 5b2be58..915d3f9 100644
--- a/src/lib/marble/MergedLayerDecorator.h
+++ b/src/lib/marble/MergedLayerDecorator.h
@@ -22,8 +22,8 @@
#include "GeoSceneTextureTile.h"
-class QImage;
-class QString;
+QT_FORWARD_DECLARE_CLASS(QImage)
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble
{
diff --git a/src/lib/marble/MovieCaptureDialog.h b/src/lib/marble/MovieCaptureDialog.h
index 71885d9..19328e7 100644
--- a/src/lib/marble/MovieCaptureDialog.h
+++ b/src/lib/marble/MovieCaptureDialog.h
@@ -15,9 +15,11 @@
#include "marble_export.h"
+QT_BEGIN_NAMESPACE
namespace Ui {
class MovieCaptureDialog;
}
+QT_END_NAMESPACE
namespace Marble {
diff --git a/src/lib/marble/NavigationWidget.h b/src/lib/marble/NavigationWidget.h
index 4e02021..6c76f69 100644
--- a/src/lib/marble/NavigationWidget.h
+++ b/src/lib/marble/NavigationWidget.h
@@ -21,8 +21,8 @@
// Qt
#include <QWidget>
-class QModelIndex;
-class QAbstractItemModel;
+QT_FORWARD_DECLARE_CLASS(QModelIndex)
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
namespace Marble
{
diff --git a/src/lib/marble/NewstuffModel.h b/src/lib/marble/NewstuffModel.h
index 386ddf6..5baa506 100644
--- a/src/lib/marble/NewstuffModel.h
+++ b/src/lib/marble/NewstuffModel.h
@@ -16,7 +16,7 @@
#include <QAbstractListModel>
#include <QFileInfo>
-class QNetworkReply;
+QT_FORWARD_DECLARE_CLASS(QNetworkReply)
namespace Marble
{
diff --git a/src/lib/marble/ParseRunnerPlugin.h b/src/lib/marble/ParseRunnerPlugin.h
index e9ae34a..5a32641 100644
--- a/src/lib/marble/ParseRunnerPlugin.h
+++ b/src/lib/marble/ParseRunnerPlugin.h
@@ -65,6 +65,8 @@ private:
}
+QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE( Marble::ParseRunnerPlugin, "org.kde.Marble.ParseRunnerPlugin/1.01" )
+QT_END_NAMESPACE
#endif // MARBLE_PARSERUNNERPLUGIN_H
diff --git a/src/lib/marble/ParsingRunnerManager.h b/src/lib/marble/ParsingRunnerManager.h
index 8f122a6..776b7da 100644
--- a/src/lib/marble/ParsingRunnerManager.h
+++ b/src/lib/marble/ParsingRunnerManager.h
@@ -19,7 +19,7 @@
#include "GeoDataDocument.h"
-class QAbstractItemModel;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
namespace Marble
{
diff --git a/src/lib/marble/PlacemarkLayout.h b/src/lib/marble/PlacemarkLayout.h
index 84df0ba..bb19389 100644
--- a/src/lib/marble/PlacemarkLayout.h
+++ b/src/lib/marble/PlacemarkLayout.h
@@ -27,9 +27,9 @@
#include "GeoDataFeature.h"
-class QAbstractItemModel;
-class QItemSelectionModel;
-class QPoint;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
+QT_FORWARD_DECLARE_CLASS(QItemSelectionModel)
+QT_FORWARD_DECLARE_CLASS(QPoint)
namespace Marble
diff --git a/src/lib/marble/PluginInterface.h b/src/lib/marble/PluginInterface.h
index 959f381..1a30da7 100644
--- a/src/lib/marble/PluginInterface.h
+++ b/src/lib/marble/PluginInterface.h
@@ -92,6 +92,8 @@ class MARBLE_EXPORT PluginInterface
}
+QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE( Marble::PluginInterface, "org.kde.Marble.PluginInterface/1.1" )
+QT_END_NAMESPACE
#endif
diff --git a/src/lib/marble/PluginItemDelegate.h b/src/lib/marble/PluginItemDelegate.h
index b57cb4d..202dd34 100644
--- a/src/lib/marble/PluginItemDelegate.h
+++ b/src/lib/marble/PluginItemDelegate.h
@@ -16,10 +16,10 @@
#include <QModelIndex>
#include <QIcon>
-class QPainter;
-class QRect;
-class QStyleOptionButton;
-class QStyleOptionViewItem;
+QT_FORWARD_DECLARE_CLASS(QPainter)
+QT_FORWARD_DECLARE_CLASS(QRect)
+QT_FORWARD_DECLARE_CLASS(QStyleOptionButton)
+QT_FORWARD_DECLARE_CLASS(QStyleOptionViewItem)
namespace Marble
{
diff --git a/src/lib/marble/PopupItem.h b/src/lib/marble/PopupItem.h
index a52aa74..0e2e5f1 100644
--- a/src/lib/marble/PopupItem.h
+++ b/src/lib/marble/PopupItem.h
@@ -20,7 +20,7 @@
#include "BillboardGraphicsItem.h"
#include "ui_WebPopupWidget.h"
-class QPainter;
+QT_FORWARD_DECLARE_CLASS(QPainter)
namespace Marble
{
diff --git a/src/lib/marble/PositionProviderPluginInterface.h b/src/lib/marble/PositionProviderPluginInterface.h
index c96c3b1..f06386d 100644
--- a/src/lib/marble/PositionProviderPluginInterface.h
+++ b/src/lib/marble/PositionProviderPluginInterface.h
@@ -69,7 +69,9 @@ class MARBLE_EXPORT PositionProviderPluginInterface: public PluginInterface
}
+QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE( Marble::PositionProviderPluginInterface, "org.kde.Marble.PositionProviderPluginInterface/1.02" )
+QT_END_NAMESPACE
Q_DECLARE_METATYPE( Marble::PositionProviderStatus )
diff --git a/src/lib/marble/RenderPlugin.h b/src/lib/marble/RenderPlugin.h
index 0df8bfa..5566eaa 100644
--- a/src/lib/marble/RenderPlugin.h
+++ b/src/lib/marble/RenderPlugin.h
@@ -22,9 +22,9 @@
#include "marble_export.h"
-class QAction;
-class QActionGroup;
-class QStandardItem;
+QT_FORWARD_DECLARE_CLASS(QAction)
+QT_FORWARD_DECLARE_CLASS(QActionGroup)
+QT_FORWARD_DECLARE_CLASS(QStandardItem)
namespace Marble
{
diff --git a/src/lib/marble/RenderPluginInterface.h b/src/lib/marble/RenderPluginInterface.h
index 77ca61d..2965138 100644
--- a/src/lib/marble/RenderPluginInterface.h
+++ b/src/lib/marble/RenderPluginInterface.h
@@ -68,6 +68,8 @@ class RenderPluginInterface: public PluginInterface, public LayerInterface
}
+QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE( Marble::RenderPluginInterface, "org.kde.Marble.RenderPluginInterface/1.09" )
+QT_END_NAMESPACE
#endif
diff --git a/src/lib/marble/ReverseGeocodingRunnerManager.h b/src/lib/marble/ReverseGeocodingRunnerManager.h
index 6d6936c..3fdb7ff 100644
--- a/src/lib/marble/ReverseGeocodingRunnerManager.h
+++ b/src/lib/marble/ReverseGeocodingRunnerManager.h
@@ -17,7 +17,7 @@
#include "marble_export.h"
-class QAbstractItemModel;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
namespace Marble
{
diff --git a/src/lib/marble/ReverseGeocodingRunnerPlugin.h b/src/lib/marble/ReverseGeocodingRunnerPlugin.h
index 342e193..7bbcfe3 100644
--- a/src/lib/marble/ReverseGeocodingRunnerPlugin.h
+++ b/src/lib/marble/ReverseGeocodingRunnerPlugin.h
@@ -77,6 +77,8 @@ private:
}
+QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE( Marble::ReverseGeocodingRunnerPlugin, "org.kde.Marble.ReverseGeocodingRunnerPlugin/1.01" )
+QT_END_NAMESPACE
#endif // MARBLE_REVERSEGEOCODINGRUNNERPLUGIN_H
diff --git a/src/lib/marble/RoutingRunnerPlugin.h b/src/lib/marble/RoutingRunnerPlugin.h
index cd94e1d..be6c0e1 100644
--- a/src/lib/marble/RoutingRunnerPlugin.h
+++ b/src/lib/marble/RoutingRunnerPlugin.h
@@ -107,6 +107,8 @@ private:
}
+QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE( Marble::RoutingRunnerPlugin, "org.kde.Marble.RunnerRunnerPlugin/1.01" )
+QT_END_NAMESPACE
#endif // MARBLE_ROUTINGRUNNERPLUGIN_H
diff --git a/src/lib/marble/SearchInputWidget.h b/src/lib/marble/SearchInputWidget.h
index 95b2657..6b88c22 100644
--- a/src/lib/marble/SearchInputWidget.h
+++ b/src/lib/marble/SearchInputWidget.h
@@ -19,8 +19,8 @@
#include "MarbleGlobal.h"
#include "marble_export.h"
-class QAbstractItemModel;
-class QCompleter;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
+QT_FORWARD_DECLARE_CLASS(QCompleter)
namespace Marble {
diff --git a/src/lib/marble/SearchRunnerManager.h b/src/lib/marble/SearchRunnerManager.h
index 4b4678d..bd2d389 100644
--- a/src/lib/marble/SearchRunnerManager.h
+++ b/src/lib/marble/SearchRunnerManager.h
@@ -21,7 +21,7 @@
#include <QVector>
#include <QString>
-class QAbstractItemModel;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
namespace Marble
{
diff --git a/src/lib/marble/SearchRunnerPlugin.h b/src/lib/marble/SearchRunnerPlugin.h
index fdadc5b..c749e1f 100644
--- a/src/lib/marble/SearchRunnerPlugin.h
+++ b/src/lib/marble/SearchRunnerPlugin.h
@@ -75,6 +75,8 @@ private:
}
+QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE( Marble::SearchRunnerPlugin, "org.kde.Marble.SearchRunnerPlugin/1.01" )
+QT_END_NAMESPACE
#endif // MARBLE_SEARCHRUNNERPLUGIN_H
diff --git a/src/lib/marble/StackedTileLoader.h b/src/lib/marble/StackedTileLoader.h
index 6fa8cd4..42d35cc 100644
--- a/src/lib/marble/StackedTileLoader.h
+++ b/src/lib/marble/StackedTileLoader.h
@@ -31,8 +31,8 @@
#include "GeoSceneTiled.h"
#include "TileId.h"
-class QImage;
-class QString;
+QT_FORWARD_DECLARE_CLASS(QImage)
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble
{
diff --git a/src/lib/marble/StoragePolicy.h b/src/lib/marble/StoragePolicy.h
index d093aa9..bb403fb 100644
--- a/src/lib/marble/StoragePolicy.h
+++ b/src/lib/marble/StoragePolicy.h
@@ -17,7 +17,7 @@
#include <QString>
-class QByteArray;
+QT_FORWARD_DECLARE_CLASS(QByteArray)
namespace Marble
{
diff --git a/src/lib/marble/SunControlWidget.h b/src/lib/marble/SunControlWidget.h
index c9cc4e3..84372f2 100644
--- a/src/lib/marble/SunControlWidget.h
+++ b/src/lib/marble/SunControlWidget.h
@@ -19,10 +19,12 @@
#include "marble_export.h"
+QT_BEGIN_NAMESPACE
namespace Ui
{
class SunControlWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/lib/marble/TextureMapperInterface.h b/src/lib/marble/TextureMapperInterface.h
index b10f2bc..17c6871 100644
--- a/src/lib/marble/TextureMapperInterface.h
+++ b/src/lib/marble/TextureMapperInterface.h
@@ -12,7 +12,7 @@
#ifndef MARBLE_TEXTUREMAPPERINTERFACE_H
#define MARBLE_TEXTUREMAPPERINTERFACE_H
-class QRect;
+#include <QRect>
namespace Marble
{
diff --git a/src/lib/marble/TextureTile.h b/src/lib/marble/TextureTile.h
index ba2708b..5a9653c 100644
--- a/src/lib/marble/TextureTile.h
+++ b/src/lib/marble/TextureTile.h
@@ -26,7 +26,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "Tile.h"
#include "TileId.h"
-class QImage;
+QT_FORWARD_DECLARE_CLASS(QImage)
namespace Marble
{
diff --git a/src/lib/marble/TileCreatorDialog.h b/src/lib/marble/TileCreatorDialog.h
index b373cfb..af53ac9 100644
--- a/src/lib/marble/TileCreatorDialog.h
+++ b/src/lib/marble/TileCreatorDialog.h
@@ -20,7 +20,7 @@
#include "marble_export.h"
-class QString;
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble
{
diff --git a/src/lib/marble/TileLoader.h b/src/lib/marble/TileLoader.h
index 3896b6b..25c8158 100644
--- a/src/lib/marble/TileLoader.h
+++ b/src/lib/marble/TileLoader.h
@@ -29,9 +29,9 @@
#include "PluginManager.h"
#include "MarbleGlobal.h"
-class QByteArray;
-class QImage;
-class QUrl;
+QT_FORWARD_DECLARE_CLASS(QByteArray)
+QT_FORWARD_DECLARE_CLASS(QImage)
+QT_FORWARD_DECLARE_CLASS(QUrl)
namespace Marble
{
diff --git a/src/lib/marble/TimeControlWidget.h b/src/lib/marble/TimeControlWidget.h
index b3807b7..a6ae7cb 100644
--- a/src/lib/marble/TimeControlWidget.h
+++ b/src/lib/marble/TimeControlWidget.h
@@ -18,10 +18,12 @@
// Marble
#include "marble_export.h"
+QT_BEGIN_NAMESPACE
namespace Ui
{
class TimeControlWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/lib/marble/TourWidget.h b/src/lib/marble/TourWidget.h
index 3118260..dfe90f7 100644
--- a/src/lib/marble/TourWidget.h
+++ b/src/lib/marble/TourWidget.h
@@ -15,8 +15,8 @@
#include <QWidget>
-class QItemSelection;
-class QModelIndex;
+QT_FORWARD_DECLARE_CLASS(QItemSelection)
+QT_FORWARD_DECLARE_CLASS(QModelIndex)
namespace Marble
{
diff --git a/src/lib/marble/VectorTileModel.h b/src/lib/marble/VectorTileModel.h
index 72dbc65..8e8b7bb 100644
--- a/src/lib/marble/VectorTileModel.h
+++ b/src/lib/marble/VectorTileModel.h
@@ -19,7 +19,7 @@
#include "TileId.h"
-class QThreadPool;
+QT_FORWARD_DECLARE_CLASS(QThreadPool)
namespace Marble
{
diff --git a/src/lib/marble/ViewportParams.h b/src/lib/marble/ViewportParams.h
index c8f1900..d939237 100644
--- a/src/lib/marble/ViewportParams.h
+++ b/src/lib/marble/ViewportParams.h
@@ -28,7 +28,7 @@
#include "MarbleGlobal.h"
#include "marble_export.h"
-class QPolygonF;
+QT_FORWARD_DECLARE_CLASS(QPolygonF)
namespace Marble
{
diff --git a/src/lib/marble/blendings/Blending.h b/src/lib/marble/blendings/Blending.h
index ae56e7a..0867680 100644
--- a/src/lib/marble/blendings/Blending.h
+++ b/src/lib/marble/blendings/Blending.h
@@ -16,7 +16,7 @@
#ifndef MARBLE_BLENDING_H
#define MARBLE_BLENDING_H
-class QImage;
+#include <QImage>
namespace Marble
{
diff --git a/src/lib/marble/geodata/data/Serializable.h b/src/lib/marble/geodata/data/Serializable.h
index ca9627f..938152b 100644
--- a/src/lib/marble/geodata/data/Serializable.h
+++ b/src/lib/marble/geodata/data/Serializable.h
@@ -12,7 +12,7 @@
#ifndef MARBLE_SERIALIZABLE_H
#define MARBLE_SERIALIZABLE_H
-class QDataStream;
+QT_FORWARD_DECLARE_CLASS(QDataStream)
namespace Marble {
diff --git a/src/lib/marble/graphicsview/FrameGraphicsItem.h b/src/lib/marble/graphicsview/FrameGraphicsItem.h
index 5496264..abbfed7 100644
--- a/src/lib/marble/graphicsview/FrameGraphicsItem.h
+++ b/src/lib/marble/graphicsview/FrameGraphicsItem.h
@@ -15,7 +15,7 @@
#include "marble_export.h"
#include "ScreenGraphicsItem.h"
#include <QPainterPath>
-class QBrush;
+QT_FORWARD_DECLARE_CLASS(QBrush)
namespace Marble
{
diff --git a/src/lib/marble/graphicsview/GeoGraphicsItem.h b/src/lib/marble/graphicsview/GeoGraphicsItem.h
index c45a570..d41803e 100644
--- a/src/lib/marble/graphicsview/GeoGraphicsItem.h
+++ b/src/lib/marble/graphicsview/GeoGraphicsItem.h
@@ -15,7 +15,7 @@
// Marble
#include "marble_export.h"
-class QString;
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble
{
diff --git a/src/lib/marble/graphicsview/LabelGraphicsItem.h b/src/lib/marble/graphicsview/LabelGraphicsItem.h
index ad99153..736a302 100644
--- a/src/lib/marble/graphicsview/LabelGraphicsItem.h
+++ b/src/lib/marble/graphicsview/LabelGraphicsItem.h
@@ -15,8 +15,8 @@
#include "FrameGraphicsItem.h"
#include "marble_export.h"
-class QImage;
-class QIcon;
+QT_FORWARD_DECLARE_CLASS(QImage)
+QT_FORWARD_DECLARE_CLASS(QIcon)
namespace Marble
{
diff --git a/src/lib/marble/graphicsview/LabelGraphicsItem_p.h b/src/lib/marble/graphicsview/LabelGraphicsItem_p.h
index 1197e2d..e014991 100644
--- a/src/lib/marble/graphicsview/LabelGraphicsItem_p.h
+++ b/src/lib/marble/graphicsview/LabelGraphicsItem_p.h
@@ -16,7 +16,7 @@
#include <QImage>
#include <QIcon>
-class QFont;
+QT_FORWARD_DECLARE_CLASS(QFont)
namespace Marble
{
diff --git a/src/lib/marble/graphicsview/MarbleGraphicsItem.h b/src/lib/marble/graphicsview/MarbleGraphicsItem.h
index 03d808f..98980cc 100644
--- a/src/lib/marble/graphicsview/MarbleGraphicsItem.h
+++ b/src/lib/marble/graphicsview/MarbleGraphicsItem.h
@@ -19,9 +19,9 @@
#include <QRectF>
#include <QString>
-class QEvent;
-class QObject;
-class QPainter;
+QT_FORWARD_DECLARE_CLASS(QEvent)
+QT_FORWARD_DECLARE_CLASS(QObject)
+QT_FORWARD_DECLARE_CLASS(QPainter)
namespace Marble
{
diff --git a/src/lib/marble/graphicsview/ScreenGraphicsItem.h b/src/lib/marble/graphicsview/ScreenGraphicsItem.h
index c85776e..e348d85 100644
--- a/src/lib/marble/graphicsview/ScreenGraphicsItem.h
+++ b/src/lib/marble/graphicsview/ScreenGraphicsItem.h
@@ -18,7 +18,7 @@
// Qt
#include <QList>
-class QPoint;
+QT_FORWARD_DECLARE_CLASS(QPoint)
namespace Marble
{
diff --git a/src/lib/marble/graphicsview/WidgetGraphicsItem.h b/src/lib/marble/graphicsview/WidgetGraphicsItem.h
index 1a90267..577773e 100644
--- a/src/lib/marble/graphicsview/WidgetGraphicsItem.h
+++ b/src/lib/marble/graphicsview/WidgetGraphicsItem.h
@@ -18,7 +18,7 @@
// Qt
#include <QList>
-class QWidget;
+QT_FORWARD_DECLARE_CLASS(QWidget)
namespace Marble
{
diff --git a/src/lib/marble/graphicsview/WidgetGraphicsItem_p.h b/src/lib/marble/graphicsview/WidgetGraphicsItem_p.h
index e3033b7..2a7a3ae 100644
--- a/src/lib/marble/graphicsview/WidgetGraphicsItem_p.h
+++ b/src/lib/marble/graphicsview/WidgetGraphicsItem_p.h
@@ -13,7 +13,7 @@
#include "WidgetGraphicsItem.h"
-class QWidget;
+QT_FORWARD_DECLARE_CLASS(QWidget)
namespace Marble
{
diff --git a/src/lib/marble/layers/FpsLayer.h b/src/lib/marble/layers/FpsLayer.h
index a316bf9..c875ff8 100644
--- a/src/lib/marble/layers/FpsLayer.h
+++ b/src/lib/marble/layers/FpsLayer.h
@@ -11,8 +11,8 @@
#ifndef MARBLE_FPSLAYER_H
#define MARBLE_FPSLAYER_H
-class QPainter;
-class QTime;
+#include <QPainter>
+QT_FORWARD_DECLARE_CLASS(QTime)
namespace Marble
{
diff --git a/src/lib/marble/layers/GeometryLayer.h b/src/lib/marble/layers/GeometryLayer.h
index f868f26..0dddadb 100644
--- a/src/lib/marble/layers/GeometryLayer.h
+++ b/src/lib/marble/layers/GeometryLayer.h
@@ -16,8 +16,8 @@
#include <QObject>
#include "LayerInterface.h"
-class QAbstractItemModel;
-class QModelIndex;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
+QT_FORWARD_DECLARE_CLASS(QModelIndex)
namespace Marble
{
diff --git a/src/lib/marble/layers/PlacemarkLayer.h b/src/lib/marble/layers/PlacemarkLayer.h
index 7fc0256..b1546d9 100644
--- a/src/lib/marble/layers/PlacemarkLayer.h
+++ b/src/lib/marble/layers/PlacemarkLayer.h
@@ -26,9 +26,9 @@
#include "PlacemarkLayout.h"
-class QAbstractItemModel;
-class QItemSelectionModel;
-class QString;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
+QT_FORWARD_DECLARE_CLASS(QItemSelectionModel)
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble
{
diff --git a/src/lib/marble/layers/TextureLayer.h b/src/lib/marble/layers/TextureLayer.h
index 90042cb..e3bb6be 100644
--- a/src/lib/marble/layers/TextureLayer.h
+++ b/src/lib/marble/layers/TextureLayer.h
@@ -19,10 +19,10 @@
#include <QSize>
-class QAbstractItemModel;
-class QImage;
-class QRegion;
-class QRect;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
+QT_FORWARD_DECLARE_CLASS(QImage)
+QT_FORWARD_DECLARE_CLASS(QRegion)
+QT_FORWARD_DECLARE_CLASS(QRect)
namespace Marble
{
diff --git a/src/lib/marble/layers/VectorTileLayer.h b/src/lib/marble/layers/VectorTileLayer.h
index 0f4ef8f..0911c4a 100644
--- a/src/lib/marble/layers/VectorTileLayer.h
+++ b/src/lib/marble/layers/VectorTileLayer.h
@@ -26,9 +26,9 @@
#include <QSize>
-class QImage;
-class QRegion;
-class QRect;
+QT_FORWARD_DECLARE_CLASS(QImage)
+QT_FORWARD_DECLARE_CLASS(QRegion)
+QT_FORWARD_DECLARE_CLASS(QRect)
namespace Marble
{
diff --git a/src/lib/marble/routing/RoutingInputWidget.h b/src/lib/marble/routing/RoutingInputWidget.h
index 416bc0d..94192ff 100644
--- a/src/lib/marble/routing/RoutingInputWidget.h
+++ b/src/lib/marble/routing/RoutingInputWidget.h
@@ -17,7 +17,7 @@
#include <QWidget>
-class QAbstractItemModel;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
namespace Marble
{
diff --git a/src/lib/marble/routing/RoutingLayer.h b/src/lib/marble/routing/RoutingLayer.h
index 512317e..2e24f1f 100644
--- a/src/lib/marble/routing/RoutingLayer.h
+++ b/src/lib/marble/routing/RoutingLayer.h
@@ -19,7 +19,7 @@
#include <QRect>
#include <QItemSelection>
-class QAbstractProxyModel;
+QT_FORWARD_DECLARE_CLASS(QAbstractProxyModel)
namespace Marble
{
diff --git a/src/lib/marble/routing/RoutingProfileSettingsDialog.h b/src/lib/marble/routing/RoutingProfileSettingsDialog.h
index ea56b22..c8be41c 100644
--- a/src/lib/marble/routing/RoutingProfileSettingsDialog.h
+++ b/src/lib/marble/routing/RoutingProfileSettingsDialog.h
@@ -16,10 +16,12 @@
#include "RoutingRunnerPlugin.h"
-class QModelIndex;
-class QStandardItemModel;
-class QHBoxLayout;
+QT_FORWARD_DECLARE_CLASS(QModelIndex)
+QT_FORWARD_DECLARE_CLASS(QStandardItemModel)
+QT_FORWARD_DECLARE_CLASS(QHBoxLayout)
+QT_BEGIN_NAMESPACE
class Ui_RoutingProfileSettingsDialog;
+QT_END_NAMESPACE
namespace Marble {
diff --git a/src/plasmoid/worldclock.h b/src/plasmoid/worldclock.h
index 078f757..2db922b 100644
--- a/src/plasmoid/worldclock.h
+++ b/src/plasmoid/worldclock.h
@@ -23,14 +23,14 @@
#include "ui_worldclockConfig.h"
-class QGraphicsSceneHoverEvent;
-class QStyleOptionGraphicsItem;
-class QFont;
-class QRect;
-class QString;
-class QPainter;
-class QDateTime;
-class QPointF;
+QT_FORWARD_DECLARE_CLASS(QGraphicsSceneHoverEvent)
+QT_FORWARD_DECLARE_CLASS(QStyleOptionGraphicsItem)
+QT_FORWARD_DECLARE_CLASS(QFont)
+QT_FORWARD_DECLARE_CLASS(QRect)
+QT_FORWARD_DECLARE_CLASS(QString)
+QT_FORWARD_DECLARE_CLASS(QPainter)
+QT_FORWARD_DECLARE_CLASS(QDateTime)
+QT_FORWARD_DECLARE_CLASS(QPointF)
class KTimeZone;
diff --git a/src/plugins/declarative/Navigation.h b/src/plugins/declarative/Navigation.h
index 49a8b36..787d796 100644
--- a/src/plugins/declarative/Navigation.h
+++ b/src/plugins/declarative/Navigation.h
@@ -18,7 +18,7 @@
#include <QtQml/qqml.h>
#endif
-class QAbstractItemModel;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
class MarbleWidget;
class NavigationPrivate;
diff --git a/src/plugins/declarative/Routing.h b/src/plugins/declarative/Routing.h
index aa4e94f..be27a99 100644
--- a/src/plugins/declarative/Routing.h
+++ b/src/plugins/declarative/Routing.h
@@ -18,7 +18,7 @@
#include <QtQml/qqml.h>
#endif
-class QAbstractItemModel;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
class MarbleWidget;
class RoutingPrivate;
diff --git a/src/plugins/declarative/Search.h b/src/plugins/declarative/Search.h
index d64130d..d98ae02 100644
--- a/src/plugins/declarative/Search.h
+++ b/src/plugins/declarative/Search.h
@@ -21,7 +21,7 @@
#include <QQuickItem>
#endif
-class QAbstractItemModel;
+QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
namespace Marble {
class MarblePlacemarkModel;
diff --git a/src/plugins/designer/latloneditwidget/LatLonEditPlugin.h b/src/plugins/designer/latloneditwidget/LatLonEditPlugin.h
index e27be44..9ca0f12 100644
--- a/src/plugins/designer/latloneditwidget/LatLonEditPlugin.h
+++ b/src/plugins/designer/latloneditwidget/LatLonEditPlugin.h
@@ -13,10 +13,10 @@
#include <QDesignerCustomWidgetInterface>
#include <marble_export.h>
-class QObject;
-class QString;
-class QWidget;
-class QIcon;
+QT_FORWARD_DECLARE_CLASS(QObject)
+QT_FORWARD_DECLARE_CLASS(QString)
+QT_FORWARD_DECLARE_CLASS(QWidget)
+QT_FORWARD_DECLARE_CLASS(QIcon)
class LatLonEditPlugin : public QObject,
public QDesignerCustomWidgetInterface
diff --git a/src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.h b/src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.h
index ca4fb5a..2d8dbb3 100644
--- a/src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.h
+++ b/src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.h
@@ -12,7 +12,7 @@
#include "PositionProviderPlugin.h"
-class QUdpSocket;
+QT_FORWARD_DECLARE_CLASS(QUdpSocket)
namespace Marble
{
diff --git a/src/plugins/positionprovider/geoclue/GeoCute/Accuracy.h b/src/plugins/positionprovider/geoclue/GeoCute/Accuracy.h
index 39569b3..945d25f 100644
--- a/src/plugins/positionprovider/geoclue/GeoCute/Accuracy.h
+++ b/src/plugins/positionprovider/geoclue/GeoCute/Accuracy.h
@@ -18,7 +18,7 @@
#include "AccuracyLevel.h"
-class QDBusArgument;
+QT_FORWARD_DECLARE_CLASS(QDBusArgument)
namespace GeoCute
{
diff --git a/src/plugins/positionprovider/geoclue/GeoCute/PositionProvider.h b/src/plugins/positionprovider/geoclue/GeoCute/PositionProvider.h
index 088baf0..c966ecb 100644
--- a/src/plugins/positionprovider/geoclue/GeoCute/PositionProvider.h
+++ b/src/plugins/positionprovider/geoclue/GeoCute/PositionProvider.h
@@ -18,7 +18,7 @@
-class QString;
+QT_FORWARD_DECLARE_CLASS(QString)
namespace GeoCute
{
diff --git a/src/plugins/positionprovider/geoclue/GeoCute/VelocityProvider.h b/src/plugins/positionprovider/geoclue/GeoCute/VelocityProvider.h
index 9ad9cd8..7d13e7f 100644
--- a/src/plugins/positionprovider/geoclue/GeoCute/VelocityProvider.h
+++ b/src/plugins/positionprovider/geoclue/GeoCute/VelocityProvider.h
@@ -16,7 +16,7 @@
-class QString;
+QT_FORWARD_DECLARE_CLASS(QString)
namespace GeoCute
{
diff --git a/src/plugins/positionprovider/qtmobility/QtMobilityPositionProviderPlugin.h b/src/plugins/positionprovider/qtmobility/QtMobilityPositionProviderPlugin.h
index edf7528..53c2478 100644
--- a/src/plugins/positionprovider/qtmobility/QtMobilityPositionProviderPlugin.h
+++ b/src/plugins/positionprovider/qtmobility/QtMobilityPositionProviderPlugin.h
@@ -17,7 +17,7 @@
namespace Marble
{
-class QtMobilityPositionProviderPluginPrivate;
+QT_FORWARD_DECLARE_CLASS(QtMobilityPositionProviderPluginPrivate)
class QtMobilityPositionProviderPlugin: public PositionProviderPlugin
{
diff --git a/src/plugins/render/annotate/AnnotatePlugin.h b/src/plugins/render/annotate/AnnotatePlugin.h
index c4d1530..045dcc1 100644
--- a/src/plugins/render/annotate/AnnotatePlugin.h
+++ b/src/plugins/render/annotate/AnnotatePlugin.h
@@ -23,8 +23,8 @@
#include <QObject>
#include <QErrorMessage>
-class QNetworkAccessManager;
-class QNetworkReply;
+QT_FORWARD_DECLARE_CLASS(QNetworkAccessManager)
+QT_FORWARD_DECLARE_CLASS(QNetworkReply)
namespace Marble
diff --git a/src/plugins/render/annotate/TextEditor.h b/src/plugins/render/annotate/TextEditor.h
index 3ae29a2..6fed387 100644
--- a/src/plugins/render/annotate/TextEditor.h
+++ b/src/plugins/render/annotate/TextEditor.h
@@ -14,11 +14,11 @@
#include <QWidget>
-class QLineEdit;
-class QToolButton;
-class QTextEdit;
-class QHBoxLayout;
-class QVBoxLayout;
+QT_FORWARD_DECLARE_CLASS(QLineEdit)
+QT_FORWARD_DECLARE_CLASS(QToolButton)
+QT_FORWARD_DECLARE_CLASS(QTextEdit)
+QT_FORWARD_DECLARE_CLASS(QHBoxLayout)
+QT_FORWARD_DECLARE_CLASS(QVBoxLayout)
namespace Marble
{
diff --git a/src/plugins/render/aprs/AprsPlugin.h b/src/plugins/render/aprs/AprsPlugin.h
index 4a2758a..192f29f 100644
--- a/src/plugins/render/aprs/AprsPlugin.h
+++ b/src/plugins/render/aprs/AprsPlugin.h
@@ -23,11 +23,6 @@
#include "ui_AprsConfigWidget.h"
-namespace Ui
-{
- class AprsConfigWidget;
-}
-
namespace Marble
{
diff --git a/src/plugins/render/compass/CompassFloatItem.h b/src/plugins/render/compass/CompassFloatItem.h
index 5ea17a6..d8a7c14 100644
--- a/src/plugins/render/compass/CompassFloatItem.h
+++ b/src/plugins/render/compass/CompassFloatItem.h
@@ -16,11 +16,13 @@
#include "AbstractFloatItem.h"
#include "DialogConfigurationInterface.h"
-class QSvgRenderer;
+QT_FORWARD_DECLARE_CLASS(QSvgRenderer)
+QT_BEGIN_NAMESPACE
namespace Ui {
class CompassConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/crosshairs/CrosshairsPlugin.h b/src/plugins/render/crosshairs/CrosshairsPlugin.h
index 543f1c3..0c3f9b4 100644
--- a/src/plugins/render/crosshairs/CrosshairsPlugin.h
+++ b/src/plugins/render/crosshairs/CrosshairsPlugin.h
@@ -21,11 +21,13 @@
#include "RenderPlugin.h"
#include "DialogConfigurationInterface.h"
-class QSvgRenderer;
+QT_FORWARD_DECLARE_CLASS(QSvgRenderer)
+QT_BEGIN_NAMESPACE
namespace Ui {
class CrosshairsConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/earthquake/EarthquakePlugin.h b/src/plugins/render/earthquake/EarthquakePlugin.h
index 1cb88b7..11baaf2 100644
--- a/src/plugins/render/earthquake/EarthquakePlugin.h
+++ b/src/plugins/render/earthquake/EarthquakePlugin.h
@@ -16,10 +16,12 @@
#include <QDateTime>
+QT_BEGIN_NAMESPACE
namespace Ui
{
class EarthquakeConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/eclipses/EclipsesBrowserDialog.h b/src/plugins/render/eclipses/EclipsesBrowserDialog.h
index 26c3742..13dfc2b 100644
--- a/src/plugins/render/eclipses/EclipsesBrowserDialog.h
+++ b/src/plugins/render/eclipses/EclipsesBrowserDialog.h
@@ -16,9 +16,11 @@
#include <QListWidget>
#include <QListWidgetItem>
+QT_BEGIN_NAMESPACE
namespace Ui {
class EclipsesBrowserDialog;
}
+QT_END_NAMESPACE
namespace Marble {
diff --git a/src/plugins/render/eclipses/EclipsesPlugin.h b/src/plugins/render/eclipses/EclipsesPlugin.h
index 5484292..56abc81 100644
--- a/src/plugins/render/eclipses/EclipsesPlugin.h
+++ b/src/plugins/render/eclipses/EclipsesPlugin.h
@@ -18,10 +18,12 @@
#include <QMenu>
#include <QActionGroup>
+QT_BEGIN_NAMESPACE
namespace Ui {
class EclipsesConfigDialog;
class EclipsesReminderDialog;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.h b/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.h
index a855035..ac85f11 100644
--- a/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.h
+++ b/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.h
@@ -23,10 +23,12 @@
#include "LabelGraphicsItem.h"
+QT_BEGIN_NAMESPACE
namespace Ui
{
class ElevationProfileConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/fileview/FileViewFloatItem.h b/src/plugins/render/fileview/FileViewFloatItem.h
index da7b05d..44b79ea 100644
--- a/src/plugins/render/fileview/FileViewFloatItem.h
+++ b/src/plugins/render/fileview/FileViewFloatItem.h
@@ -14,8 +14,8 @@
#include <QObject>
// forward declarations
-class QListView;
-class QPersistentModelIndex;
+QT_FORWARD_DECLARE_CLASS(QListView)
+QT_FORWARD_DECLARE_CLASS(QPersistentModelIndex)
#include "AbstractFloatItem.h"
diff --git a/src/plugins/render/foursquare/FoursquareItem.h b/src/plugins/render/foursquare/FoursquareItem.h
index 0cf7dff..5bbe80e 100644
--- a/src/plugins/render/foursquare/FoursquareItem.h
+++ b/src/plugins/render/foursquare/FoursquareItem.h
@@ -12,7 +12,7 @@
#include "AbstractDataPluginItem.h"
-class QFont;
+QT_FORWARD_DECLARE_CLASS(QFont)
namespace Marble
{
diff --git a/src/plugins/render/graticule/GraticulePlugin.h b/src/plugins/render/graticule/GraticulePlugin.h
index 5ab0bad..b7bab0d 100644
--- a/src/plugins/render/graticule/GraticulePlugin.h
+++ b/src/plugins/render/graticule/GraticulePlugin.h
@@ -34,10 +34,12 @@
#include "GeoDataLatLonAltBox.h"
+QT_BEGIN_NAMESPACE
namespace Ui
{
class GraticuleConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/license/License.h b/src/plugins/render/license/License.h
index 74be899..07210d8 100644
--- a/src/plugins/render/license/License.h
+++ b/src/plugins/render/license/License.h
@@ -16,7 +16,7 @@
#include "AbstractFloatItem.h"
-class QLabel;
+QT_FORWARD_DECLARE_CLASS(QLabel)
namespace Marble
{
diff --git a/src/plugins/render/mapscale/MapScaleFloatItem.h b/src/plugins/render/mapscale/MapScaleFloatItem.h
index 4996c6c..a351533 100644
--- a/src/plugins/render/mapscale/MapScaleFloatItem.h
+++ b/src/plugins/render/mapscale/MapScaleFloatItem.h
@@ -16,10 +16,12 @@
#include "AbstractFloatItem.h"
#include "DialogConfigurationInterface.h"
+QT_BEGIN_NAMESPACE
namespace Ui
{
class MapScaleConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/measure/MeasureToolPlugin.h b/src/plugins/render/measure/MeasureToolPlugin.h
index bd01f50..fdcafef 100644
--- a/src/plugins/render/measure/MeasureToolPlugin.h
+++ b/src/plugins/render/measure/MeasureToolPlugin.h
@@ -28,9 +28,11 @@
#include <QPen>
#include <QAction>
+QT_BEGIN_NAMESPACE
namespace Ui {
class MeasureConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/navigation/NavigationFloatItem.h b/src/plugins/render/navigation/NavigationFloatItem.h
index 6cfaa15..8ec11e6 100644
--- a/src/plugins/render/navigation/NavigationFloatItem.h
+++ b/src/plugins/render/navigation/NavigationFloatItem.h
@@ -19,10 +19,12 @@
#include "AbstractFloatItem.h"
+QT_BEGIN_NAMESPACE
namespace Ui
{
class Navigation;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/opencaching/OpenCachingItem.h b/src/plugins/render/opencaching/OpenCachingItem.h
index c36f20d..86bd9ee 100644
--- a/src/plugins/render/opencaching/OpenCachingItem.h
+++ b/src/plugins/render/opencaching/OpenCachingItem.h
@@ -17,7 +17,7 @@
#include <QDate>
#include <QPixmap>
-class QFont;
+QT_FORWARD_DECLARE_CLASS(QFont)
namespace Ui
{
diff --git a/src/plugins/render/opencachingcom/OpenCachingComItem.h b/src/plugins/render/opencachingcom/OpenCachingComItem.h
index 51192d0..35de174 100644
--- a/src/plugins/render/opencachingcom/OpenCachingComItem.h
+++ b/src/plugins/render/opencachingcom/OpenCachingComItem.h
@@ -18,11 +18,13 @@
#include <QPixmap>
#include <QVariant>
-class QAction;
+QT_FORWARD_DECLARE_CLASS(QAction)
+QT_BEGIN_NAMESPACE
namespace Ui {
class CacheDetailsDialog;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/opendesktop/OpenDesktopItem.h b/src/plugins/render/opendesktop/OpenDesktopItem.h
index 0c0df9b..44ea973 100644
--- a/src/plugins/render/opendesktop/OpenDesktopItem.h
+++ b/src/plugins/render/opendesktop/OpenDesktopItem.h
@@ -16,7 +16,7 @@
#include "TinyWebBrowser.h"
#include "MarbleWidget.h"
-class QFont;
+QT_FORWARD_DECLARE_CLASS(QFont)
namespace Marble
{
diff --git a/src/plugins/render/opendesktop/OpenDesktopPlugin.h b/src/plugins/render/opendesktop/OpenDesktopPlugin.h
index 2998c2d..fb3c478 100644
--- a/src/plugins/render/opendesktop/OpenDesktopPlugin.h
+++ b/src/plugins/render/opendesktop/OpenDesktopPlugin.h
@@ -14,9 +14,11 @@
#include "AbstractDataPlugin.h"
#include "DialogConfigurationInterface.h"
+QT_BEGIN_NAMESPACE
namespace Ui {
class OpenDesktopConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble {
diff --git a/src/plugins/render/overviewmap/OverviewMap.h b/src/plugins/render/overviewmap/OverviewMap.h
index a4e08b2..d607d80 100644
--- a/src/plugins/render/overviewmap/OverviewMap.h
+++ b/src/plugins/render/overviewmap/OverviewMap.h
@@ -22,10 +22,12 @@
#include "AbstractFloatItem.h"
#include "DialogConfigurationInterface.h"
+QT_BEGIN_NAMESPACE
namespace Ui
{
class OverviewMapConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/photo/CoordinatesParser.h b/src/plugins/render/photo/CoordinatesParser.h
index b06b047..6d2012f 100644
--- a/src/plugins/render/photo/CoordinatesParser.h
+++ b/src/plugins/render/photo/CoordinatesParser.h
@@ -13,7 +13,7 @@
#include <QXmlStreamReader>
-class QIODevice;
+QT_FORWARD_DECLARE_CLASS(QIODevice)
namespace Marble
{
diff --git a/src/plugins/render/photo/FlickrParser.h b/src/plugins/render/photo/FlickrParser.h
index 54b6b21..11e3496 100644
--- a/src/plugins/render/photo/FlickrParser.h
+++ b/src/plugins/render/photo/FlickrParser.h
@@ -14,8 +14,8 @@
#include <QList>
#include <QXmlStreamReader>
-class QByteArray;
-class QObject;
+QT_FORWARD_DECLARE_CLASS(QByteArray)
+QT_FORWARD_DECLARE_CLASS(QObject)
namespace Marble
{
diff --git a/src/plugins/render/photo/PhotoPlugin.h b/src/plugins/render/photo/PhotoPlugin.h
index 63d11eb..d24bd8a 100644
--- a/src/plugins/render/photo/PhotoPlugin.h
+++ b/src/plugins/render/photo/PhotoPlugin.h
@@ -18,12 +18,14 @@
#include <QHash>
-class QIcon;
+QT_FORWARD_DECLARE_CLASS(QIcon)
+QT_BEGIN_NAMESPACE
namespace Ui
{
class PhotoConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/photo/PhotoPluginItem.h b/src/plugins/render/photo/PhotoPluginItem.h
index 2d83ad5..abad354 100644
--- a/src/plugins/render/photo/PhotoPluginItem.h
+++ b/src/plugins/render/photo/PhotoPluginItem.h
@@ -17,8 +17,8 @@
#include <QImage>
-class QAction;
-class QUrl;
+QT_FORWARD_DECLARE_CLASS(QAction)
+QT_FORWARD_DECLARE_CLASS(QUrl)
namespace Marble
{
diff --git a/src/plugins/render/positionmarker/PositionMarker.h b/src/plugins/render/positionmarker/PositionMarker.h
index cf24599..f3dc526 100644
--- a/src/plugins/render/positionmarker/PositionMarker.h
+++ b/src/plugins/render/positionmarker/PositionMarker.h
@@ -24,10 +24,12 @@
#include "GeoDataCoordinates.h"
#include "GeoDataLatLonAltBox.h"
+QT_BEGIN_NAMESPACE
namespace Ui
{
class PositionMarkerConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/satellites/SatellitesConfigDialog.h b/src/plugins/render/satellites/SatellitesConfigDialog.h
index bc5b422..0c36e03 100644
--- a/src/plugins/render/satellites/SatellitesConfigDialog.h
+++ b/src/plugins/render/satellites/SatellitesConfigDialog.h
@@ -16,9 +16,11 @@
#include <QListWidget>
#include <QListWidgetItem>
+QT_BEGIN_NAMESPACE
namespace Ui {
class SatellitesConfigDialog;
}
+QT_END_NAMESPACE
namespace Marble {
diff --git a/src/plugins/render/satellites/SatellitesMSCItem.h b/src/plugins/render/satellites/SatellitesMSCItem.h
index 36a0c11..97a81e8 100644
--- a/src/plugins/render/satellites/SatellitesMSCItem.h
+++ b/src/plugins/render/satellites/SatellitesMSCItem.h
@@ -18,7 +18,7 @@
#include <planetarySats.h>
-class QColor;
+QT_FORWARD_DECLARE_CLASS(QColor)
namespace Marble {
diff --git a/src/plugins/render/satellites/SatellitesTLEItem.h b/src/plugins/render/satellites/SatellitesTLEItem.h
index f0429ce..8b1fee7 100644
--- a/src/plugins/render/satellites/SatellitesTLEItem.h
+++ b/src/plugins/render/satellites/SatellitesTLEItem.h
@@ -18,7 +18,7 @@
#include "sgp4/sgp4unit.h"
-class QColor;
+QT_FORWARD_DECLARE_CLASS(QColor)
namespace Marble {
diff --git a/src/plugins/render/satellites/TrackerPluginItem.h b/src/plugins/render/satellites/TrackerPluginItem.h
index c74d838..7877bb1 100644
--- a/src/plugins/render/satellites/TrackerPluginItem.h
+++ b/src/plugins/render/satellites/TrackerPluginItem.h
@@ -13,7 +13,7 @@
#include <qglobal.h>
-class QString;
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble {
diff --git a/src/plugins/render/satellites/TrackerPluginModel.h b/src/plugins/render/satellites/TrackerPluginModel.h
index 8e92883..9982ebc 100644
--- a/src/plugins/render/satellites/TrackerPluginModel.h
+++ b/src/plugins/render/satellites/TrackerPluginModel.h
@@ -14,7 +14,7 @@
#include <QObject>
#include <QHash>
-class QUrl;
+QT_FORWARD_DECLARE_CLASS(QUrl)
namespace Marble
{
diff --git a/src/plugins/render/stars/StarsPlugin.h b/src/plugins/render/stars/StarsPlugin.h
index 0829af1..7f4e657 100644
--- a/src/plugins/render/stars/StarsPlugin.h
+++ b/src/plugins/render/stars/StarsPlugin.h
@@ -25,14 +25,16 @@
#include "Quaternion.h"
#include "DialogConfigurationInterface.h"
-class QDateTime;
-class QMenu;
+QT_FORWARD_DECLARE_CLASS(QDateTime)
+QT_FORWARD_DECLARE_CLASS(QMenu)
class SolarSystem;
+QT_BEGIN_NAMESPACE
namespace Ui
{
class StarsConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/weather/AbstractWeatherService.h b/src/plugins/render/weather/AbstractWeatherService.h
index 1eee166..3ed9264 100644
--- a/src/plugins/render/weather/AbstractWeatherService.h
+++ b/src/plugins/render/weather/AbstractWeatherService.h
@@ -14,7 +14,7 @@
#include <QObject>
#include <QStringList>
-class QUrl;
+QT_FORWARD_DECLARE_CLASS(QUrl)
namespace Marble
{
diff --git a/src/plugins/render/weather/BBCParser.h b/src/plugins/render/weather/BBCParser.h
index 1512f27..a656b38 100644
--- a/src/plugins/render/weather/BBCParser.h
+++ b/src/plugins/render/weather/BBCParser.h
@@ -23,7 +23,7 @@
#include <QStack>
#include <QXmlStreamReader>
-class QObject;
+QT_FORWARD_DECLARE_CLASS(QObject)
namespace Marble
{
diff --git a/src/plugins/render/weather/BBCStation.h b/src/plugins/render/weather/BBCStation.h
index 84f9e26..241f590 100644
--- a/src/plugins/render/weather/BBCStation.h
+++ b/src/plugins/render/weather/BBCStation.h
@@ -13,7 +13,7 @@
#include <QtGlobal>
-class QString;
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble
{
diff --git a/src/plugins/render/weather/BBCWeatherItem.h b/src/plugins/render/weather/BBCWeatherItem.h
index 3a2faef..8d4ef14 100644
--- a/src/plugins/render/weather/BBCWeatherItem.h
+++ b/src/plugins/render/weather/BBCWeatherItem.h
@@ -13,8 +13,8 @@
#include "WeatherItem.h"
-class QString;
-class QUrl;
+QT_FORWARD_DECLARE_CLASS(QString)
+QT_FORWARD_DECLARE_CLASS(QUrl)
namespace Marble
{
diff --git a/src/plugins/render/weather/FakeWeatherItem.h b/src/plugins/render/weather/FakeWeatherItem.h
index 5f42028..8b72bf1 100644
--- a/src/plugins/render/weather/FakeWeatherItem.h
+++ b/src/plugins/render/weather/FakeWeatherItem.h
@@ -13,7 +13,7 @@
#include "WeatherItem.h"
-class QString;
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble
{
diff --git a/src/plugins/render/weather/GeoNamesWeatherService.h b/src/plugins/render/weather/GeoNamesWeatherService.h
index 2edd241..b817fe6 100644
--- a/src/plugins/render/weather/GeoNamesWeatherService.h
+++ b/src/plugins/render/weather/GeoNamesWeatherService.h
@@ -14,7 +14,7 @@
#include "AbstractWeatherService.h"
#include "WeatherData.h"
-class QScriptValue;
+QT_FORWARD_DECLARE_CLASS(QScriptValue)
namespace Marble
{
diff --git a/src/plugins/render/weather/StationListParser.h b/src/plugins/render/weather/StationListParser.h
index 0e79841..7bdda9b 100644
--- a/src/plugins/render/weather/StationListParser.h
+++ b/src/plugins/render/weather/StationListParser.h
@@ -18,7 +18,7 @@
#include <QThread>
#include <QXmlStreamReader>
-class QString;
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Marble
{
diff --git a/src/plugins/render/weather/WeatherData.h b/src/plugins/render/weather/WeatherData.h
index c1afebc..664f80a 100644
--- a/src/plugins/render/weather/WeatherData.h
+++ b/src/plugins/render/weather/WeatherData.h
@@ -14,9 +14,9 @@
#include<QtGlobal>
#include<QCoreApplication>
-class QDate;
-class QDateTime;
-class QImage;
+QT_FORWARD_DECLARE_CLASS(QDate)
+QT_FORWARD_DECLARE_CLASS(QDateTime)
+QT_FORWARD_DECLARE_CLASS(QImage)
namespace Marble
{
diff --git a/src/plugins/render/weather/WeatherItem.h b/src/plugins/render/weather/WeatherItem.h
index c28de63..d6de28f 100644
--- a/src/plugins/render/weather/WeatherItem.h
+++ b/src/plugins/render/weather/WeatherItem.h
@@ -19,9 +19,9 @@
// Qt
#include <QMap>
-class QString;
-class QAction;
-class QDate;
+QT_FORWARD_DECLARE_CLASS(QString)
+QT_FORWARD_DECLARE_CLASS(QAction)
+QT_FORWARD_DECLARE_CLASS(QDate)
namespace Marble
{
diff --git a/src/plugins/render/weather/WeatherModel.h b/src/plugins/render/weather/WeatherModel.h
index 08813a1..9ee9df4 100644
--- a/src/plugins/render/weather/WeatherModel.h
+++ b/src/plugins/render/weather/WeatherModel.h
@@ -19,8 +19,8 @@
#include <QStringList>
-class QByteArray;
-class QTimer;
+QT_FORWARD_DECLARE_CLASS(QByteArray)
+QT_FORWARD_DECLARE_CLASS(QTimer)
namespace Marble
{
diff --git a/src/plugins/render/weather/WeatherPlugin.h b/src/plugins/render/weather/WeatherPlugin.h
index 3020d3f..663d31f 100644
--- a/src/plugins/render/weather/WeatherPlugin.h
+++ b/src/plugins/render/weather/WeatherPlugin.h
@@ -17,12 +17,14 @@
// Qt
#include <QHash>
-class QIcon;
+QT_FORWARD_DECLARE_CLASS(QIcon)
+QT_BEGIN_NAMESPACE
namespace Ui
{
class WeatherConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/render/wikipedia/GeonamesParser.h b/src/plugins/render/wikipedia/GeonamesParser.h
index 228f1c2..49c2866 100644
--- a/src/plugins/render/wikipedia/GeonamesParser.h
+++ b/src/plugins/render/wikipedia/GeonamesParser.h
@@ -14,8 +14,8 @@
#include <QList>
#include <QXmlStreamReader>
-class QByteArray;
-class QObject;
+QT_FORWARD_DECLARE_CLASS(QByteArray)
+QT_FORWARD_DECLARE_CLASS(QObject)
namespace Marble
{
diff --git a/src/plugins/render/wikipedia/WikipediaItem.h b/src/plugins/render/wikipedia/WikipediaItem.h
index f67126c..9c3c2aa 100644
--- a/src/plugins/render/wikipedia/WikipediaItem.h
+++ b/src/plugins/render/wikipedia/WikipediaItem.h
@@ -18,7 +18,7 @@
#include <QPixmap>
#include <QIcon>
-class QAction;
+QT_FORWARD_DECLARE_CLASS(QAction)
namespace Marble
{
diff --git a/src/plugins/render/wikipedia/WikipediaPlugin.h b/src/plugins/render/wikipedia/WikipediaPlugin.h
index 71471b7..19d0ef0 100644
--- a/src/plugins/render/wikipedia/WikipediaPlugin.h
+++ b/src/plugins/render/wikipedia/WikipediaPlugin.h
@@ -19,10 +19,12 @@
#include <QHash>
#include <QIcon>
+QT_BEGIN_NAMESPACE
namespace Ui
{
class WikipediaConfigWidget;
}
+QT_END_NAMESPACE
namespace Marble
{
diff --git a/src/plugins/runner/hostip/HostipRunner.h b/src/plugins/runner/hostip/HostipRunner.h
index d0634aa..7765d31 100644
--- a/src/plugins/runner/hostip/HostipRunner.h
+++ b/src/plugins/runner/hostip/HostipRunner.h
@@ -17,7 +17,7 @@
#include <QNetworkAccessManager>
#include <QNetworkRequest>
-class QNetworkReply;
+QT_FORWARD_DECLARE_CLASS(QNetworkReply)
namespace Marble
{
diff --git a/src/plugins/runner/monav/MonavConfigWidget.h b/src/plugins/runner/monav/MonavConfigWidget.h
index 6432bd7..6f55625 100644
--- a/src/plugins/runner/monav/MonavConfigWidget.h
+++ b/src/plugins/runner/monav/MonavConfigWidget.h
@@ -16,7 +16,7 @@
#include <QWidget>
-class QNetworkReply;
+QT_FORWARD_DECLARE_CLASS(QNetworkReply)
namespace Marble
{
diff --git a/src/plugins/runner/nominatim-reversegeocoding/OsmNominatimReverseGeocodingRunner.h b/src/plugins/runner/nominatim-reversegeocoding/OsmNominatimReverseGeocodingRunner.h
index 4e59a6a..ce70410 100644
--- a/src/plugins/runner/nominatim-reversegeocoding/OsmNominatimReverseGeocodingRunner.h
+++ b/src/plugins/runner/nominatim-reversegeocoding/OsmNominatimReverseGeocodingRunner.h
@@ -19,8 +19,8 @@
#include <QNetworkAccessManager>
#include <QNetworkRequest>
-class QNetworkReply;
-class QDomNodeList;
+QT_FORWARD_DECLARE_CLASS(QNetworkReply)
+QT_FORWARD_DECLARE_CLASS(QDomNodeList)
namespace Marble
{
diff --git a/src/plugins/runner/nominatim-search/OsmNominatimSearchRunner.h b/src/plugins/runner/nominatim-search/OsmNominatimSearchRunner.h
index 5c9df3e..6ee94a6 100644
--- a/src/plugins/runner/nominatim-search/OsmNominatimSearchRunner.h
+++ b/src/plugins/runner/nominatim-search/OsmNominatimSearchRunner.h
@@ -19,8 +19,8 @@
#include <QNetworkAccessManager>
#include <QNetworkRequest>
-class QNetworkReply;
-class QDomNodeList;
+QT_FORWARD_DECLARE_CLASS(QNetworkReply)
+QT_FORWARD_DECLARE_CLASS(QDomNodeList)
namespace Marble
{
diff --git a/src/plugins/runner/routino/RoutinoPlugin.h b/src/plugins/runner/routino/RoutinoPlugin.h
index 7d8e939..44086dc 100644
--- a/src/plugins/runner/routino/RoutinoPlugin.h
+++ b/src/plugins/runner/routino/RoutinoPlugin.h
@@ -14,9 +14,8 @@
#include "RoutingRunnerPlugin.h"
-namespace Ui {
- class RoutinoConfigWidget;
-}
+#include <ui_RoutinoConfigWidget.h>
+
namespace Marble
{
diff --git a/src/plugins/runner/yours/YoursRunner.h b/src/plugins/runner/yours/YoursRunner.h
index 85431bd..7f49a69 100644
--- a/src/plugins/runner/yours/YoursRunner.h
+++ b/src/plugins/runner/yours/YoursRunner.h
@@ -17,7 +17,7 @@
#include <QNetworkAccessManager>
#include <QNetworkReply>
-class QNetworkAccessManager;
+QT_FORWARD_DECLARE_CLASS(QNetworkAccessManager)
namespace Marble
{
diff --git a/src/plugins/templates/floatitem/FITemplateFloatItem.h b/src/plugins/templates/floatitem/FITemplateFloatItem.h
index 73b90df..04b2391 100644
--- a/src/plugins/templates/floatitem/FITemplateFloatItem.h
+++ b/src/plugins/templates/floatitem/FITemplateFloatItem.h
@@ -22,7 +22,7 @@
// Marble
#include "AbstractFloatItem.h"
-class QSvgRenderer;
+QT_FORWARD_DECLARE_CLASS(QSvgRenderer)
namespace Marble
{
diff --git a/tests/TestUtils.h b/tests/TestUtils.h
index 6c1bf07..f409e2c 100644
--- a/tests/TestUtils.h
+++ b/tests/TestUtils.h
@@ -19,6 +19,7 @@
#include <QBuffer>
#include <QTest>
+QT_BEGIN_NAMESPACE
namespace QTest
{
@@ -62,6 +63,7 @@ char *toString(const Marble::GeoDataLatLonAltBox &box)
}
}
+QT_END_NAMESPACE
#define QFUZZYCOMPARE(actual, expected, epsilon) \
do {\
diff --git a/tools/mapreproject/Thread.h b/tools/mapreproject/Thread.h
index d0b3013..48a3f6a 100644
--- a/tools/mapreproject/Thread.h
+++ b/tools/mapreproject/Thread.h
@@ -45,7 +45,7 @@
#include <QThread>
#include <QWaitCondition>
-class QSignalMapper;
+QT_FORWARD_DECLARE_CLASS(QSignalMapper)
class Thread: public QThread
{
_______________________________________________
Marble-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/marble-devel