Skip to content

Instantly share code, notes, and snippets.

@jkseppan
Created February 24, 2015 18:41
Show Gist options
  • Save jkseppan/836934647cca55eba855 to your computer and use it in GitHub Desktop.
Save jkseppan/836934647cca55eba855 to your computer and use it in GitHub Desktop.
diff --git a/DebugImageView.h b/DebugImageView.h
index ad15d5f..921e012 100644
--- a/DebugImageView.h
+++ b/DebugImageView.h
@@ -22,8 +22,12 @@
#include "AutoRemovingFile.h"
#include <QStackedWidget>
#include <QWidget>
+#ifndef Q_MOC_RUN
#include <boost/intrusive/list.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
class QImage;
diff --git a/DebugImages.h b/DebugImages.h
index a116369..27093fe 100644
--- a/DebugImages.h
+++ b/DebugImages.h
@@ -22,7 +22,9 @@
#include "RefCountable.h"
#include "IntrusivePtr.h"
#include "AutoRemovingFile.h"
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
#include <QString>
#include <deque>
diff --git a/Despeckle.cpp b/Despeckle.cpp
index 868c9f0..1bebb35 100644
--- a/Despeckle.cpp
+++ b/Despeckle.cpp
@@ -24,7 +24,9 @@
#include "imageproc/BinaryImage.h"
#include "imageproc/ConnectivityMap.h"
#include "imageproc/Connectivity.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <QtGlobal>
#include <QImage>
#include <QDebug>
diff --git a/EstimateBackground.cpp b/EstimateBackground.cpp
index 1305b47..710149d 100644
--- a/EstimateBackground.cpp
+++ b/EstimateBackground.cpp
@@ -42,9 +42,15 @@
#include <QTransform>
#include <QDebug>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/control_structures.hpp>
+#endif
#include <vector>
#include <algorithm>
#include <stdint.h>
diff --git a/FileNameDisambiguator.cpp b/FileNameDisambiguator.cpp
index cbefd45..ea4178c 100644
--- a/FileNameDisambiguator.cpp
+++ b/FileNameDisambiguator.cpp
@@ -24,13 +24,27 @@
#include <QDomDocument>
#include <QDomElement>
#include <QMutex>
+#ifndef Q_MOC_RUN
#include <boost/multi_index_container.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/ordered_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/sequenced_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/member.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/composite_key.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
using namespace boost::multi_index;
diff --git a/FileNameDisambiguator.h b/FileNameDisambiguator.h
index a7814b9..f2bb1ad 100644
--- a/FileNameDisambiguator.h
+++ b/FileNameDisambiguator.h
@@ -21,7 +21,9 @@
#include "NonCopyable.h"
#include "RefCountable.h"
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
#include <memory>
#include <set>
diff --git a/FixDpiDialog.cpp b/FixDpiDialog.cpp
index 85b40e0..ea23c14 100644
--- a/FixDpiDialog.cpp
+++ b/FixDpiDialog.cpp
@@ -30,9 +30,15 @@
#include <QColor>
#include <Qt>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <vector>
#include <algorithm>
#include <assert.h>
diff --git a/ImageFileInfo.cpp b/ImageFileInfo.cpp
index ee3dccd..09398f1 100644
--- a/ImageFileInfo.cpp
+++ b/ImageFileInfo.cpp
@@ -17,8 +17,12 @@
*/
#include "ImageFileInfo.h"
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <algorithm>
bool
diff --git a/LoadFilesStatusDialog.cpp b/LoadFilesStatusDialog.cpp
index 01505e9..798a4c0 100644
--- a/LoadFilesStatusDialog.cpp
+++ b/LoadFilesStatusDialog.cpp
@@ -18,7 +18,9 @@
#include "LoadFilesStatusDialog.h"
#include <QPushButton>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
LoadFilesStatusDialog::LoadFilesStatusDialog(QWidget* parent)
: QDialog(parent)
diff --git a/MainWindow.cpp b/MainWindow.cpp
index ff8d150..4b383cc 100644
--- a/MainWindow.cpp
+++ b/MainWindow.cpp
@@ -94,9 +94,15 @@
#include "ui_StartBatchProcessingDialog.h"
#include "config.h"
#include "version.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <QApplication>
#include <QLineF>
#include <QPointer>
diff --git a/MainWindow.h b/MainWindow.h
index 6b47fee..fdc5b54 100644
--- a/MainWindow.h
+++ b/MainWindow.h
@@ -33,7 +33,9 @@
#include "PageRange.h"
#include "SelectedPage.h"
#include "BeforeOrAfter.h"
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
#include <QMainWindow>
#include <QString>
#include <QPointer>
diff --git a/NewOpenProjectPanel.cpp b/NewOpenProjectPanel.cpp
index 153ba19..596c1c0 100644
--- a/NewOpenProjectPanel.cpp
+++ b/NewOpenProjectPanel.cpp
@@ -19,8 +19,12 @@
#include "NewOpenProjectPanel.h.moc"
#include "RecentProjects.h"
#include "Utils.h"
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <QVBoxLayout>
#include <QPainter>
#include <QPalette>
diff --git a/NonOwningWidget.cpp b/NonOwningWidget.cpp
index 98115a3..2d40d19 100644
--- a/NonOwningWidget.cpp
+++ b/NonOwningWidget.cpp
@@ -17,7 +17,9 @@
*/
#include "NonOwningWidget.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
NonOwningWidget::NonOwningWidget(QWidget* parent)
: QWidget(parent)
diff --git a/OutOfMemoryHandler.h b/OutOfMemoryHandler.h
index a297623..f536b61 100644
--- a/OutOfMemoryHandler.h
+++ b/OutOfMemoryHandler.h
@@ -22,7 +22,9 @@
#include "NonCopyable.h"
#include <QObject>
#include <QMutex>
+#ifndef Q_MOC_RUN
#include <boost/scoped_array.hpp>
+#endif
#include <stddef.h>
class OutOfMemoryHandler : public QObject
diff --git a/PageRange.cpp b/PageRange.cpp
index 0adf36b..db6c461 100644
--- a/PageRange.cpp
+++ b/PageRange.cpp
@@ -17,7 +17,9 @@
*/
#include "PageRange.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
std::set<PageId>
PageRange::selectEveryOther(PageId const& base) const
diff --git a/PageSequence.cpp b/PageSequence.cpp
index 2c4f981..f5a2c51 100644
--- a/PageSequence.cpp
+++ b/PageSequence.cpp
@@ -17,7 +17,9 @@
*/
#include "PageSequence.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
void
PageSequence::append(PageInfo const& page_info)
diff --git a/ProcessingTaskQueue.cpp b/ProcessingTaskQueue.cpp
index ae30c1d..94217fe 100644
--- a/ProcessingTaskQueue.cpp
+++ b/ProcessingTaskQueue.cpp
@@ -17,7 +17,9 @@
*/
#include "ProcessingTaskQueue.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
ProcessingTaskQueue::Entry::Entry(
PageInfo const& page_info, BackgroundTaskPtr const& tsk)
diff --git a/ProjectCreationContext.cpp b/ProjectCreationContext.cpp
index 4060902..3f73b8b 100644
--- a/ProjectCreationContext.cpp
+++ b/ProjectCreationContext.cpp
@@ -22,8 +22,12 @@
#include "ImageFileInfo.h"
#include <QString>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <algorithm>
#include <assert.h>
diff --git a/ProjectFilesDialog.cpp b/ProjectFilesDialog.cpp
index f632b3c..044b888 100644
--- a/ProjectFilesDialog.cpp
+++ b/ProjectFilesDialog.cpp
@@ -40,9 +40,15 @@
#include <QBrush>
#include <QColor>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/construct.hpp>
+#endif
#include <vector>
#include <deque>
#include <algorithm>
diff --git a/ProjectOpeningContext.cpp b/ProjectOpeningContext.cpp
index 7f60f7e..97b7335 100644
--- a/ProjectOpeningContext.cpp
+++ b/ProjectOpeningContext.cpp
@@ -23,8 +23,12 @@
#include <QString>
#include <QMessageBox>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <algorithm>
#include <assert.h>
diff --git a/ProjectPages.cpp b/ProjectPages.cpp
index 700005a..9197976 100644
--- a/ProjectPages.cpp
+++ b/ProjectPages.cpp
@@ -25,11 +25,21 @@
#include "PageSequence.h"
#include "RelinkablePath.h"
#include "AbstractRelinker.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index_container.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/ordered_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/sequenced_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/member.hpp>
+#endif
#include <QMutexLocker>
#include <QFileInfo>
#include <QSize>
diff --git a/ProjectReader.cpp b/ProjectReader.cpp
index 19dfb62..84c0bc5 100644
--- a/ProjectReader.cpp
+++ b/ProjectReader.cpp
@@ -26,7 +26,9 @@
#include <QDir>
#include <QDomElement>
#include <QDomNode>
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
#include <set>
ProjectReader::ProjectReader(QDomDocument const& doc)
diff --git a/ProjectWriter.cpp b/ProjectWriter.cpp
index 44329d7..c2fd404 100644
--- a/ProjectWriter.cpp
+++ b/ProjectWriter.cpp
@@ -25,13 +25,19 @@
#include "ImageMetadata.h"
#include "AbstractFilter.h"
#include "FileNameDisambiguator.h"
+#ifndef Q_MOC_RUN
#include "compat/boost_multi_index_foreach_fix.h"
+#endif
#include <QtXml>
#include <QFile>
#include <QTextStream>
#include <QFileInfo>
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <stddef.h>
#include <assert.h>
diff --git a/ProjectWriter.h b/ProjectWriter.h
index 377bff3..d4ab0de 100644
--- a/ProjectWriter.h
+++ b/ProjectWriter.h
@@ -26,10 +26,18 @@
#include "PageId.h"
#include "SelectedPage.h"
#include "VirtualFunction.h"
+#ifndef Q_MOC_RUN
#include <boost/multi_index_container.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/sequenced_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/ordered_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/member.hpp>
+#endif
#include <QString>
#include <Qt>
#include <vector>
diff --git a/RecentProjects.cpp b/RecentProjects.cpp
index 3b7dd88..7bb9ca8 100644
--- a/RecentProjects.cpp
+++ b/RecentProjects.cpp
@@ -17,7 +17,9 @@
*/
#include "RecentProjects.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <QSettings>
#include <QFile>
#include <algorithm>
diff --git a/RelinkablePath.cpp b/RelinkablePath.cpp
index c3f548a..d673141 100644
--- a/RelinkablePath.cpp
+++ b/RelinkablePath.cpp
@@ -18,7 +18,9 @@
#include "RelinkablePath.h"
#include <QStringList>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
RelinkablePath::RelinkablePath(QString const& path, Type type)
: m_normalizedPath(normalize(path))
diff --git a/RelinkablePathVisualization.cpp b/RelinkablePathVisualization.cpp
index cacc42a..8edb73e 100644
--- a/RelinkablePathVisualization.cpp
+++ b/RelinkablePathVisualization.cpp
@@ -33,8 +33,12 @@
#include <QStyleOptionButton>
#include <QFile>
#include <QVariant>
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <vector>
struct RelinkablePathVisualization::PathComponent
diff --git a/RelinkingDialog.cpp b/RelinkingDialog.cpp
index 7c5b75e..5218a69 100644
--- a/RelinkingDialog.cpp
+++ b/RelinkingDialog.cpp
@@ -22,7 +22,9 @@
#include <QDir>
#include <QFileDialog>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <assert.h>
RelinkingDialog::RelinkingDialog(QString const& project_file_path, QWidget* parent)
diff --git a/RelinkingListView.cpp b/RelinkingListView.cpp
index 542b9c5..a7e9674 100644
--- a/RelinkingListView.cpp
+++ b/RelinkingListView.cpp
@@ -27,7 +27,9 @@
#include <QBrush>
#include <QColor>
#include <QVariant>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <vector>
class RelinkingListView::Delegate : public QStyledItemDelegate
diff --git a/RelinkingModel.cpp b/RelinkingModel.cpp
index ba63a07..72d1085 100644
--- a/RelinkingModel.cpp
+++ b/RelinkingModel.cpp
@@ -27,11 +27,21 @@
#include <QCoreApplication>
#include <QColor>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index_container.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/ordered_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/sequenced_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/member.hpp>
+#endif
#include <utility>
#include <iterator>
#include <algorithm>
diff --git a/StageListView.cpp b/StageListView.cpp
index ba4ba9e..aabee14 100644
--- a/StageListView.cpp
+++ b/StageListView.cpp
@@ -36,7 +36,9 @@
#include <QVariant>
#include <Qt>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
#include <memory>
#include <assert.h>
diff --git a/StageSequence.cpp b/StageSequence.cpp
index 320abef..8d839be 100644
--- a/StageSequence.cpp
+++ b/StageSequence.cpp
@@ -18,7 +18,9 @@
#include "StageSequence.h"
#include "ProjectPages.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
StageSequence::StageSequence(IntrusivePtr<ProjectPages> const& pages,
PageSelectionAccessor const& page_selection_accessor)
diff --git a/TabbedDebugImages.h b/TabbedDebugImages.h
index 8c25daf..c025def 100644
--- a/TabbedDebugImages.h
+++ b/TabbedDebugImages.h
@@ -21,7 +21,9 @@
#include "DebugImageView.h"
#include <QTabWidget>
+#ifndef Q_MOC_RUN
#include <boost/intrusive/list.hpp>
+#endif
class TabbedDebugImages : public QTabWidget
{
diff --git a/ThumbnailBase.cpp b/ThumbnailBase.cpp
index e254bed..1ae0ac5 100644
--- a/ThumbnailBase.cpp
+++ b/ThumbnailBase.cpp
@@ -23,7 +23,9 @@
#include "AbstractCommand.h"
#include "PixmapRenderer.h"
#include "imageproc/PolygonUtils.h"
+#ifndef Q_MOC_RUN
#include <boost/weak_ptr.hpp>
+#endif
#include <QPixmap>
#include <QPixmapCache>
#include <QPainter>
diff --git a/ThumbnailBase.h b/ThumbnailBase.h
index 9f4ea87..b728694 100644
--- a/ThumbnailBase.h
+++ b/ThumbnailBase.h
@@ -24,7 +24,9 @@
#include "ImageTransformation.h"
#include "IntrusivePtr.h"
#include "ThumbnailPixmapCache.h"
+#ifndef Q_MOC_RUN
#include <boost/shared_ptr.hpp>
+#endif
#include <QTransform>
#include <QGraphicsItem>
#include <QSizeF>
diff --git a/ThumbnailPixmapCache.cpp b/ThumbnailPixmapCache.cpp
index f1a0a50..2fe56a7 100644
--- a/ThumbnailPixmapCache.cpp
+++ b/ThumbnailPixmapCache.cpp
@@ -39,11 +39,21 @@
#include <QEvent>
#include <QSize>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/multi_index_container.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/ordered_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/sequenced_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/member.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
#include <vector>
#include <new>
diff --git a/ThumbnailPixmapCache.h b/ThumbnailPixmapCache.h
index a3fc671..34cc0db 100644
--- a/ThumbnailPixmapCache.h
+++ b/ThumbnailPixmapCache.h
@@ -23,7 +23,9 @@
#include "RefCountable.h"
#include "ThumbnailLoadResult.h"
#include "AbstractCommand.h"
+#ifndef Q_MOC_RUN
#include <boost/weak_ptr.hpp>
+#endif
#include <memory>
class ImageId;
diff --git a/ThumbnailSequence.cpp b/ThumbnailSequence.cpp
index 5b82ba3..01cb6c2 100644
--- a/ThumbnailSequence.cpp
+++ b/ThumbnailSequence.cpp
@@ -28,14 +28,30 @@
#include "RefCountable.h"
#include "IntrusivePtr.h"
#include "ScopedIncDec.h"
+#ifndef Q_MOC_RUN
#include <boost/multi_index_container.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/ordered_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/sequenced_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/mem_fun.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <QGraphicsScene>
#include <QGraphicsItem>
#include <QGraphicsItemGroup>
diff --git a/XmlMarshaller.cpp b/XmlMarshaller.cpp
index ecd1f97..8e3a4cc 100644
--- a/XmlMarshaller.cpp
+++ b/XmlMarshaller.cpp
@@ -21,7 +21,9 @@
#include "Margins.h"
#include "Dpi.h"
#include "Utils.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <QPointF>
#include <QLineF>
#include <QRect>
diff --git a/compat/boost_multi_index_foreach_fix.h b/compat/boost_multi_index_foreach_fix.h
index 7800c79..1b688c8 100644
--- a/compat/boost_multi_index_foreach_fix.h
+++ b/compat/boost_multi_index_foreach_fix.h
@@ -19,9 +19,15 @@
#ifndef BOOST_MULTI_INDEX_FOREACH_FIX_H_
#define BOOST_MULTI_INDEX_FOREACH_FIX_H_
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/mpl/bool.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/sequenced_index.hpp>
+#endif
// BOOST_FOREACH() in boost >= 1.47 has problems with gcc >= 4.6
// These problems aren't specific to boost::multi_index,
diff --git a/dewarping/Curve.cpp b/dewarping/Curve.cpp
index d48c70f..bf2686b 100644
--- a/dewarping/Curve.cpp
+++ b/dewarping/Curve.cpp
@@ -20,7 +20,9 @@
#include "XmlMarshaller.h"
#include "XmlUnmarshaller.h"
#include "VecNT.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <QByteArray>
#include <QDataStream>
#include <QDomDocument>
diff --git a/dewarping/CylindricalSurfaceDewarper.cpp b/dewarping/CylindricalSurfaceDewarper.cpp
index 1e161be..dc1ad25 100644
--- a/dewarping/CylindricalSurfaceDewarper.cpp
+++ b/dewarping/CylindricalSurfaceDewarper.cpp
@@ -24,7 +24,9 @@
#include <QLineF>
#include <QtGlobal>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
#include <math.h>
#include <assert.h>
diff --git a/dewarping/CylindricalSurfaceDewarper.h b/dewarping/CylindricalSurfaceDewarper.h
index 815aeff..e25430a 100644
--- a/dewarping/CylindricalSurfaceDewarper.h
+++ b/dewarping/CylindricalSurfaceDewarper.h
@@ -22,7 +22,9 @@
#include "HomographicTransform.h"
#include "PolylineIntersector.h"
#include "ArcLengthMapper.h"
+#ifndef Q_MOC_RUN
#include <boost/array.hpp>
+#endif
#include <vector>
#include <utility>
#include <QPointF>
diff --git a/dewarping/DetectVertContentBounds.cpp b/dewarping/DetectVertContentBounds.cpp
index d2695ff..69c25c1 100644
--- a/dewarping/DetectVertContentBounds.cpp
+++ b/dewarping/DetectVertContentBounds.cpp
@@ -32,9 +32,15 @@
#include <QColor>
#include <Qt>
#include <QtGlobal>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <vector>
#include <deque>
#include <algorithm>
diff --git a/dewarping/DistortionModel.cpp b/dewarping/DistortionModel.cpp
index 44fe6e1..4eb65df 100644
--- a/dewarping/DistortionModel.cpp
+++ b/dewarping/DistortionModel.cpp
@@ -26,7 +26,9 @@
#include <QString>
#include <QDomDocument>
#include <QDomElement>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
namespace dewarping
diff --git a/dewarping/DistortionModelBuilder.cpp b/dewarping/DistortionModelBuilder.cpp
index 7e5139a..e4ed977 100644
--- a/dewarping/DistortionModelBuilder.cpp
+++ b/dewarping/DistortionModelBuilder.cpp
@@ -39,7 +39,9 @@
#include <QPen>
#include <QColor>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
#include <exception>
#include <iterator>
diff --git a/dewarping/TextLineRefiner.cpp b/dewarping/TextLineRefiner.cpp
index ba25aff..bd8b15a 100644
--- a/dewarping/TextLineRefiner.cpp
+++ b/dewarping/TextLineRefiner.cpp
@@ -24,10 +24,18 @@
#include "imageproc/GrayImage.h"
#include "imageproc/GaussBlur.h"
#include "imageproc/Sobel.h"
+#ifndef Q_MOC_RUN
#include <boost/scoped_array.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <QImage>
#include <QPainter>
#include <QPen>
diff --git a/dewarping/TextLineTracer.cpp b/dewarping/TextLineTracer.cpp
index c0ac319..b7f2c0f 100644
--- a/dewarping/TextLineTracer.cpp
+++ b/dewarping/TextLineTracer.cpp
@@ -58,11 +58,21 @@
#include <QPen>
#include <QColor>
#include <QtGlobal>
+#ifndef Q_MOC_RUN
#include <boost/scoped_array.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/if.hpp>
+#endif
#include <algorithm>
#include <set>
#include <map>
diff --git a/dewarping/TopBottomEdgeTracer.cpp b/dewarping/TopBottomEdgeTracer.cpp
index dda3f89..b0ec6dd 100644
--- a/dewarping/TopBottomEdgeTracer.cpp
+++ b/dewarping/TopBottomEdgeTracer.cpp
@@ -39,9 +39,15 @@
#include <QColor>
#include <QtGlobal>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <limits>
#include <algorithm>
#include <math.h>
diff --git a/dewarping/TowardsLineTracer.cpp b/dewarping/TowardsLineTracer.cpp
index 8eb321f..2634949 100644
--- a/dewarping/TowardsLineTracer.cpp
+++ b/dewarping/TowardsLineTracer.cpp
@@ -23,9 +23,15 @@
#include "imageproc/SEDM.h"
#include <QRect>
#include <QtGlobal>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <algorithm>
#include <math.h>
#include <assert.h>
diff --git a/filters/deskew/Filter.cpp b/filters/deskew/Filter.cpp
index ba44962..976506e 100644
--- a/filters/deskew/Filter.cpp
+++ b/filters/deskew/Filter.cpp
@@ -27,8 +27,12 @@
#include "PageId.h"
#include "RelinkablePath.h"
#include "AbstractRelinker.h"
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <QString>
#include <QObject>
#include <QCoreApplication>
diff --git a/filters/deskew/ImageView.cpp b/filters/deskew/ImageView.cpp
index 1ccefdf..f99088d 100644
--- a/filters/deskew/ImageView.cpp
+++ b/filters/deskew/ImageView.cpp
@@ -32,7 +32,9 @@
#include <QScrollBar>
#include <QStyle>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
#include <algorithm>
#include <math.h>
diff --git a/filters/deskew/OptionsWidget.cpp b/filters/deskew/OptionsWidget.cpp
index 2a68fdb..7661fef 100644
--- a/filters/deskew/OptionsWidget.cpp
+++ b/filters/deskew/OptionsWidget.cpp
@@ -24,7 +24,9 @@
#include <Qt>
#include <math.h>
#include "ApplyDialog.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
namespace deskew
{
diff --git a/filters/deskew/Settings.cpp b/filters/deskew/Settings.cpp
index 83d7659..68f7479 100644
--- a/filters/deskew/Settings.cpp
+++ b/filters/deskew/Settings.cpp
@@ -21,7 +21,9 @@
#include "RelinkablePath.h"
#include "AbstractRelinker.h"
#include <QMutexLocker>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <cmath>
#include <iostream>
diff --git a/filters/fix_orientation/Filter.cpp b/filters/fix_orientation/Filter.cpp
index 4e5732f..7c77348 100644
--- a/filters/fix_orientation/Filter.cpp
+++ b/filters/fix_orientation/Filter.cpp
@@ -29,8 +29,12 @@
#include "ProjectWriter.h"
#include "XmlMarshaller.h"
#include "XmlUnmarshaller.h"
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <QString>
#include <QObject>
#include <QCoreApplication>
diff --git a/filters/fix_orientation/OptionsWidget.cpp b/filters/fix_orientation/OptionsWidget.cpp
index 1bd50eb..6262585 100644
--- a/filters/fix_orientation/OptionsWidget.cpp
+++ b/filters/fix_orientation/OptionsWidget.cpp
@@ -24,7 +24,9 @@
#include "ProjectPages.h"
#include "ImageId.h"
#include "PageId.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <vector>
#include <assert.h>
diff --git a/filters/fix_orientation/Settings.cpp b/filters/fix_orientation/Settings.cpp
index 49f6efe..31b226f 100644
--- a/filters/fix_orientation/Settings.cpp
+++ b/filters/fix_orientation/Settings.cpp
@@ -20,7 +20,9 @@
#include "Utils.h"
#include "RelinkablePath.h"
#include "AbstractRelinker.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
namespace fix_orientation
{
diff --git a/filters/output/ChangeDewarpingDialog.cpp b/filters/output/ChangeDewarpingDialog.cpp
index f667810..3738e8b 100644
--- a/filters/output/ChangeDewarpingDialog.cpp
+++ b/filters/output/ChangeDewarpingDialog.cpp
@@ -20,8 +20,12 @@
#include "ChangeDewarpingDialog.h.moc"
#include "PageSelectionAccessor.h"
#include "QtSignalForwarder.h"
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
namespace output
{
diff --git a/filters/output/ChangeDpiDialog.cpp b/filters/output/ChangeDpiDialog.cpp
index 5c34ebe..1e278e8 100644
--- a/filters/output/ChangeDpiDialog.cpp
+++ b/filters/output/ChangeDpiDialog.cpp
@@ -26,7 +26,9 @@
#include <QMessageBox>
#include <QLineEdit>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
namespace output
diff --git a/filters/output/DewarpingView.cpp b/filters/output/DewarpingView.cpp
index 28d200e..2704514 100644
--- a/filters/output/DewarpingView.cpp
+++ b/filters/output/DewarpingView.cpp
@@ -43,9 +43,15 @@
#include <QColor>
#include <Qt>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/array.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <vector>
#include <stdexcept>
diff --git a/filters/output/FillZoneEditor.cpp b/filters/output/FillZoneEditor.cpp
index 780da46..a726f8e 100644
--- a/filters/output/FillZoneEditor.cpp
+++ b/filters/output/FillZoneEditor.cpp
@@ -39,8 +39,12 @@
#include <QBrush>
#include <QPen>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <vector>
#include <assert.h>
diff --git a/filters/output/FillZoneEditor.h b/filters/output/FillZoneEditor.h
index 4a8dc93..e6a51d8 100644
--- a/filters/output/FillZoneEditor.h
+++ b/filters/output/FillZoneEditor.h
@@ -32,7 +32,9 @@
#include "EditableZoneSet.h"
#include "ZoomHandler.h"
#include "DragHandler.h"
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
#include <QPoint>
#include <QPointF>
#include <QColor>
diff --git a/filters/output/Filter.cpp b/filters/output/Filter.cpp
index d201492..b616e65 100644
--- a/filters/output/Filter.cpp
+++ b/filters/output/Filter.cpp
@@ -27,8 +27,12 @@
#include "ProjectReader.h"
#include "ProjectWriter.h"
#include "CacheDrivenTask.h"
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <QString>
#include <QObject>
#include <QCoreApplication>
diff --git a/filters/output/OptionsWidget.cpp b/filters/output/OptionsWidget.cpp
index b24263a..0d437fe 100644
--- a/filters/output/OptionsWidget.cpp
+++ b/filters/output/OptionsWidget.cpp
@@ -31,7 +31,9 @@
#include "../../Utils.h"
#include "ScopedIncDec.h"
#include "config.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <QtGlobal>
#include <QVariant>
#include <QColorDialog>
diff --git a/filters/output/OutputGenerator.cpp b/filters/output/OutputGenerator.cpp
index 062bf13..676c8c3 100644
--- a/filters/output/OutputGenerator.cpp
+++ b/filters/output/OutputGenerator.cpp
@@ -62,9 +62,15 @@
#include "imageproc/ConnectivityMap.h"
#include "imageproc/InfluenceMap.h"
#include "config.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/shared_ptr.hpp>
+#endif
#include <QImage>
#include <QSize>
#include <QPoint>
diff --git a/filters/output/OutputGenerator.h b/filters/output/OutputGenerator.h
index 2b7b3fd..3a2407f 100644
--- a/filters/output/OutputGenerator.h
+++ b/filters/output/OutputGenerator.h
@@ -27,7 +27,9 @@
#include "DespeckleLevel.h"
#include "DewarpingMode.h"
#include "ImageTransformation.h"
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
#include <QSize>
#include <QRect>
#include <QTransform>
diff --git a/filters/output/PictureZoneEditor.cpp b/filters/output/PictureZoneEditor.cpp
index 392cc04..d7f0d54 100644
--- a/filters/output/PictureZoneEditor.cpp
+++ b/filters/output/PictureZoneEditor.cpp
@@ -41,8 +41,12 @@
#include <QPen>
#include <QBrush>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <assert.h>
namespace output
diff --git a/filters/output/Settings.cpp b/filters/output/Settings.cpp
index 3ab6cf9..3b30f7b 100644
--- a/filters/output/Settings.cpp
+++ b/filters/output/Settings.cpp
@@ -23,7 +23,9 @@
#include "RelinkablePath.h"
#include "AbstractRelinker.h"
#include "../../Utils.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <Qt>
#include <QColor>
#include <QMutexLocker>
diff --git a/filters/output/Task.cpp b/filters/output/Task.cpp
index 2257a37..01e8565 100644
--- a/filters/output/Task.cpp
+++ b/filters/output/Task.cpp
@@ -59,8 +59,12 @@
#include "ErrorWidget.h"
#include "imageproc/BinaryImage.h"
#include "imageproc/PolygonUtils.h"
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/shared_ptr.hpp>
+#endif
#include <QImage>
#include <QString>
#include <QObject>
diff --git a/filters/page_layout/Filter.cpp b/filters/page_layout/Filter.cpp
index 842a31f..a8dc43c 100644
--- a/filters/page_layout/Filter.cpp
+++ b/filters/page_layout/Filter.cpp
@@ -32,8 +32,12 @@
#include "OrderByWidthProvider.h"
#include "OrderByHeightProvider.h"
#include "Utils.h"
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <QRectF>
#include <QSizeF>
#include <QString>
diff --git a/filters/page_layout/ImageView.cpp b/filters/page_layout/ImageView.cpp
index b5441db..015c4ec 100644
--- a/filters/page_layout/ImageView.cpp
+++ b/filters/page_layout/ImageView.cpp
@@ -38,8 +38,12 @@
#include <QColor>
#include <QDebug>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
#include <algorithm>
#include <math.h>
#include <assert.h>
diff --git a/filters/page_layout/OptionsWidget.cpp b/filters/page_layout/OptionsWidget.cpp
index 334e31f..9eeeb22 100644
--- a/filters/page_layout/OptionsWidget.cpp
+++ b/filters/page_layout/OptionsWidget.cpp
@@ -25,7 +25,9 @@
#include "PageInfo.h"
#include "PageId.h"
#include "imageproc/Constants.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <QPixmap>
#include <QString>
#include <QSettings>
diff --git a/filters/page_layout/Settings.cpp b/filters/page_layout/Settings.cpp
index da2cd64..d981be7 100644
--- a/filters/page_layout/Settings.cpp
+++ b/filters/page_layout/Settings.cpp
@@ -29,13 +29,27 @@
#include <QRectF>
#include <QMutex>
#include <QMutexLocker>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index_container.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/ordered_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/sequenced_index.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/member.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/mem_fun.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/multi_index/composite_key.hpp>
+#endif
#include <algorithm>
#include <functional> // for std::greater<>
#include <vector>
diff --git a/filters/page_split/Filter.cpp b/filters/page_split/Filter.cpp
index 556be3e..1dc0702 100644
--- a/filters/page_split/Filter.cpp
+++ b/filters/page_split/Filter.cpp
@@ -31,8 +31,12 @@
#include "Params.h"
#include "CacheDrivenTask.h"
#include "OrthogonalRotation.h"
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <QString>
#include <QObject>
#include <QCoreApplication>
diff --git a/filters/page_split/ImageView.cpp b/filters/page_split/ImageView.cpp
index 3040e17..99fa532 100644
--- a/filters/page_split/ImageView.cpp
+++ b/filters/page_split/ImageView.cpp
@@ -29,8 +29,12 @@
#include <QColor>
#include <QtGlobal>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
namespace page_split
diff --git a/filters/page_split/OptionsWidget.cpp b/filters/page_split/OptionsWidget.cpp
index 3091df6..ce120e6 100644
--- a/filters/page_split/OptionsWidget.cpp
+++ b/filters/page_split/OptionsWidget.cpp
@@ -27,7 +27,9 @@
#include "ProjectPages.h"
#include "ScopedIncDec.h"
#include <QPixmap>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <assert.h>
namespace page_split
diff --git a/filters/page_split/PageLayout.cpp b/filters/page_split/PageLayout.cpp
index d5bf0a9..70e0ee7 100644
--- a/filters/page_split/PageLayout.cpp
+++ b/filters/page_split/PageLayout.cpp
@@ -28,7 +28,9 @@
#include <QTransform>
#include <QDomElement>
#include <QDomDocument>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
#include <math.h>
#include <assert.h>
diff --git a/filters/page_split/PageLayoutEstimator.cpp b/filters/page_split/PageLayoutEstimator.cpp
index b66ea27..8274e2a 100644
--- a/filters/page_split/PageLayoutEstimator.cpp
+++ b/filters/page_split/PageLayoutEstimator.cpp
@@ -47,9 +47,15 @@
#include "imageproc/Grayscale.h"
#include "imageproc/GrayRasterOp.h"
#include "imageproc/PolygonRasterizer.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <QRect>
#include <QRectF>
#include <QSize>
diff --git a/filters/page_split/Settings.cpp b/filters/page_split/Settings.cpp
index 0959bc3..7c7e25b 100644
--- a/filters/page_split/Settings.cpp
+++ b/filters/page_split/Settings.cpp
@@ -20,7 +20,9 @@
#include "RelinkablePath.h"
#include "AbstractRelinker.h"
#include <QMutexLocker>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <assert.h>
namespace page_split
diff --git a/filters/page_split/UnremoveButton.h b/filters/page_split/UnremoveButton.h
index 948a255..f1b17da 100644
--- a/filters/page_split/UnremoveButton.h
+++ b/filters/page_split/UnremoveButton.h
@@ -25,7 +25,9 @@
#include <QPointF>
#include <QPixmap>
#include <QCoreApplication>
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
namespace page_split
{
diff --git a/filters/page_split/VertLineFinder.cpp b/filters/page_split/VertLineFinder.cpp
index ceeabb9..3bebf14 100644
--- a/filters/page_split/VertLineFinder.cpp
+++ b/filters/page_split/VertLineFinder.cpp
@@ -28,7 +28,9 @@
#include "imageproc/MorphGradientDetect.h"
#include "imageproc/HoughLineDetector.h"
#include "imageproc/Constants.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <QLineF>
#include <QSizeF>
#include <QColor>
diff --git a/filters/select_content/ContentBoxFinder.cpp b/filters/select_content/ContentBoxFinder.cpp
index f95140d..41bde76 100644
--- a/filters/select_content/ContentBoxFinder.cpp
+++ b/filters/select_content/ContentBoxFinder.cpp
@@ -42,7 +42,9 @@
#include "imageproc/ConnectivityMap.h"
#include "imageproc/InfluenceMap.h"
#include "imageproc/SEDM.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <QRect>
#include <QRectF>
#include <QPolygonF>
diff --git a/filters/select_content/Filter.cpp b/filters/select_content/Filter.cpp
index 3b92e23..d9a89ed 100644
--- a/filters/select_content/Filter.cpp
+++ b/filters/select_content/Filter.cpp
@@ -28,8 +28,12 @@
#include "CacheDrivenTask.h"
#include "OrderByWidthProvider.h"
#include "OrderByHeightProvider.h"
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <QString>
#include <QObject>
#include <QDomDocument>
diff --git a/filters/select_content/ImageView.cpp b/filters/select_content/ImageView.cpp
index aa74e57..00ad4c2 100644
--- a/filters/select_content/ImageView.cpp
+++ b/filters/select_content/ImageView.cpp
@@ -32,7 +32,9 @@
#include <QCursor>
#include <QDebug>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
#include <algorithm>
namespace select_content
diff --git a/filters/select_content/OptionsWidget.cpp b/filters/select_content/OptionsWidget.cpp
index 88a9c09..9f073de 100644
--- a/filters/select_content/OptionsWidget.cpp
+++ b/filters/select_content/OptionsWidget.cpp
@@ -22,7 +22,9 @@
#include "Settings.h"
#include "Params.h"
#include "ScopedIncDec.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <iostream>
diff --git a/filters/select_content/Settings.cpp b/filters/select_content/Settings.cpp
index f9aefb4..ea46f9a 100644
--- a/filters/select_content/Settings.cpp
+++ b/filters/select_content/Settings.cpp
@@ -21,7 +21,9 @@
#include "RelinkablePath.h"
#include "AbstractRelinker.h"
#include <QMutexLocker>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <cmath>
#include <iostream>
diff --git a/foundation/DynamicPool.h b/foundation/DynamicPool.h
index f9d2508..2dabd91 100644
--- a/foundation/DynamicPool.h
+++ b/foundation/DynamicPool.h
@@ -20,8 +20,12 @@
#define DYNAMIC_POOL_H_
#include "NonCopyable.h"
+#ifndef Q_MOC_RUN
#include <boost/intrusive/list.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/scoped_array.hpp>
+#endif
#include <stddef.h>
/**
diff --git a/foundation/FastQueue.h b/foundation/FastQueue.h
index 00d7368..56bfae1 100644
--- a/foundation/FastQueue.h
+++ b/foundation/FastQueue.h
@@ -20,9 +20,15 @@
#define FAST_QUEUE_H_
#include "NonCopyable.h"
+#ifndef Q_MOC_RUN
#include <boost/intrusive/list.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/type_traits/alignment_of.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <stddef.h>
#include <stdint.h>
#include <assert.h>
diff --git a/foundation/Grid.h b/foundation/Grid.h
index a269ead..ac00efe 100644
--- a/foundation/Grid.h
+++ b/foundation/Grid.h
@@ -19,7 +19,9 @@
#ifndef GRID_H_
#define GRID_H_
+#ifndef Q_MOC_RUN
#include <boost/scoped_array.hpp>
+#endif
template<typename Node>
class Grid
diff --git a/foundation/MatT.h b/foundation/MatT.h
index 96313a0..1ac0c36 100644
--- a/foundation/MatT.h
+++ b/foundation/MatT.h
@@ -19,7 +19,9 @@
#ifndef MAT_T_H_
#define MAT_T_H_
+#ifndef Q_MOC_RUN
#include <boost/scoped_array.hpp>
+#endif
#include <stddef.h>
#include <assert.h>
diff --git a/foundation/PropertySet.cpp b/foundation/PropertySet.cpp
index 6395671..301b31e 100644
--- a/foundation/PropertySet.cpp
+++ b/foundation/PropertySet.cpp
@@ -21,7 +21,9 @@
#include <QDomDocument>
#include <QDomElement>
#include <QString>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
PropertySet::PropertySet(QDomElement const& el, PropertyFactory const& factory)
{
diff --git a/foundation/QtSignalForwarder.h b/foundation/QtSignalForwarder.h
index 2f683b1..3f70a7a 100644
--- a/foundation/QtSignalForwarder.h
+++ b/foundation/QtSignalForwarder.h
@@ -21,7 +21,9 @@
#include "NonCopyable.h"
#include <QObject>
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
/**
* \brief Connects to a Qt signal and forwards it to a boost::function.
diff --git a/foundation/VecT.h b/foundation/VecT.h
index 92699a4..bfb869b 100644
--- a/foundation/VecT.h
+++ b/foundation/VecT.h
@@ -19,7 +19,9 @@
#ifndef VEC_T_H_
#define VEC_T_H_
+#ifndef Q_MOC_RUN
#include <boost/scoped_array.hpp>
+#endif
#include <stddef.h>
#include <assert.h>
diff --git a/imageproc/BinaryImage.cpp b/imageproc/BinaryImage.cpp
index 205a0b9..530a5e2 100644
--- a/imageproc/BinaryImage.cpp
+++ b/imageproc/BinaryImage.cpp
@@ -16,7 +16,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include "BinaryImage.h"
#include "ByteOrder.h"
#include "BitOps.h"
diff --git a/imageproc/ConnCompEraserExt.cpp b/imageproc/ConnCompEraserExt.cpp
index 030f847..94a28d0 100644
--- a/imageproc/ConnCompEraserExt.cpp
+++ b/imageproc/ConnCompEraserExt.cpp
@@ -19,7 +19,9 @@
#include "ConnCompEraserExt.h"
#include "RasterOp.h"
#include <QRect>
+#ifndef Q_MOC_RUN
#include <boost/cstdint.hpp>
+#endif
#include <string.h>
#include <stddef.h>
#include <assert.h>
diff --git a/imageproc/ConnectivityMap.cpp b/imageproc/ConnectivityMap.cpp
index 4a7e8eb..d507ce2 100644
--- a/imageproc/ConnectivityMap.cpp
+++ b/imageproc/ConnectivityMap.cpp
@@ -20,7 +20,9 @@
#include "BinaryImage.h"
#include "InfluenceMap.h"
#include "BitOps.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <QImage>
#include <QColor>
#include <QDebug>
diff --git a/imageproc/GaussBlur.cpp b/imageproc/GaussBlur.cpp
index cdb77d8..c55ead8 100644
--- a/imageproc/GaussBlur.cpp
+++ b/imageproc/GaussBlur.cpp
@@ -22,8 +22,12 @@
#include "GaussBlur.h"
#include "GrayImage.h"
#include "Constants.h"
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <stdint.h>
#include <math.h>
diff --git a/imageproc/GaussBlur.h b/imageproc/GaussBlur.h
index 1facb1c..44e4092 100644
--- a/imageproc/GaussBlur.h
+++ b/imageproc/GaussBlur.h
@@ -24,7 +24,9 @@
#include "ValueConv.h"
#include <QSize>
+#ifndef Q_MOC_RUN
#include <boost/scoped_array.hpp>
+#endif
#include <iterator>
#include <string.h>
diff --git a/imageproc/HoughLineDetector.cpp b/imageproc/HoughLineDetector.cpp
index 38f2346..6a6abba 100644
--- a/imageproc/HoughLineDetector.cpp
+++ b/imageproc/HoughLineDetector.cpp
@@ -36,7 +36,9 @@
#include <QColor>
#include <QPainter>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
#include <new>
#include <math.h>
diff --git a/imageproc/MaxWhitespaceFinder.cpp b/imageproc/MaxWhitespaceFinder.cpp
index 5635312..6b2ac23 100644
--- a/imageproc/MaxWhitespaceFinder.cpp
+++ b/imageproc/MaxWhitespaceFinder.cpp
@@ -19,7 +19,9 @@
#include "MaxWhitespaceFinder.h"
#include <QPoint>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
#include <limits>
#include <stddef.h>
diff --git a/imageproc/Morphology.cpp b/imageproc/Morphology.cpp
index e1e4043..257d618 100644
--- a/imageproc/Morphology.cpp
+++ b/imageproc/Morphology.cpp
@@ -25,7 +25,9 @@
#include <QSize>
#include <QRect>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <vector>
#include <stdexcept>
#include <algorithm>
diff --git a/imageproc/PolygonRasterizer.cpp b/imageproc/PolygonRasterizer.cpp
index e180de9..4203e90 100644
--- a/imageproc/PolygonRasterizer.cpp
+++ b/imageproc/PolygonRasterizer.cpp
@@ -26,7 +26,9 @@
#include <QPointF>
#include <QImage>
#include <QtGlobal>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <vector>
#include <iterator>
#include <algorithm>
diff --git a/imageproc/PolygonUtils.cpp b/imageproc/PolygonUtils.cpp
index 2535cd2..71874c4 100644
--- a/imageproc/PolygonUtils.cpp
+++ b/imageproc/PolygonUtils.cpp
@@ -20,7 +20,9 @@
#include <QPolygonF>
#include <QPointF>
#include <QLineF>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <algorithm>
#include <stddef.h>
#include <math.h>
diff --git a/imageproc/PolynomialSurface.cpp b/imageproc/PolynomialSurface.cpp
index fc79be3..9a0a3bf 100644
--- a/imageproc/PolynomialSurface.cpp
+++ b/imageproc/PolynomialSurface.cpp
@@ -24,7 +24,9 @@
#include "Grayscale.h"
#include "BitOps.h"
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <stdexcept>
#include <algorithm>
#include <math.h>
diff --git a/imageproc/RasterOp.h b/imageproc/RasterOp.h
index 2569c21..0b21527 100644
--- a/imageproc/RasterOp.h
+++ b/imageproc/RasterOp.h
@@ -23,7 +23,9 @@
#include <QPoint>
#include <QRect>
#include <QSize>
+#ifndef Q_MOC_RUN
#include <boost/cstdint.hpp>
+#endif
#include <stdexcept>
#include <assert.h>
diff --git a/imageproc/tests/TestBinarize.cpp b/imageproc/tests/TestBinarize.cpp
index 932628c..4b1f6f7 100644
--- a/imageproc/tests/TestBinarize.cpp
+++ b/imageproc/tests/TestBinarize.cpp
@@ -21,7 +21,9 @@
#include "Utils.h"
#include <QImage>
#include <QSize>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestBinaryImage.cpp b/imageproc/tests/TestBinaryImage.cpp
index 80e3a6a..3a438b5 100644
--- a/imageproc/tests/TestBinaryImage.cpp
+++ b/imageproc/tests/TestBinaryImage.cpp
@@ -20,7 +20,9 @@
#include "BWColor.h"
#include "Utils.h"
#include <QImage>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
#include <stdlib.h>
namespace imageproc
diff --git a/imageproc/tests/TestConnCompEraser.cpp b/imageproc/tests/TestConnCompEraser.cpp
index d043aca..c1f59f5 100644
--- a/imageproc/tests/TestConnCompEraser.cpp
+++ b/imageproc/tests/TestConnCompEraser.cpp
@@ -23,7 +23,9 @@
#include <QImage>
#include <list>
#include <algorithm>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestConnCompEraserExt.cpp b/imageproc/tests/TestConnCompEraserExt.cpp
index 24926ee..4b3bd51 100644
--- a/imageproc/tests/TestConnCompEraserExt.cpp
+++ b/imageproc/tests/TestConnCompEraserExt.cpp
@@ -25,7 +25,9 @@
#include <QImage>
#include <list>
#include <algorithm>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestDentFinder.cpp b/imageproc/tests/TestDentFinder.cpp
index a75ffc9..c11560d 100644
--- a/imageproc/tests/TestDentFinder.cpp
+++ b/imageproc/tests/TestDentFinder.cpp
@@ -20,7 +20,9 @@
#include "BinaryImage.h"
#include "Utils.h"
#include <QImage>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestGrayscale.cpp b/imageproc/tests/TestGrayscale.cpp
index caabc45..2063929 100644
--- a/imageproc/tests/TestGrayscale.cpp
+++ b/imageproc/tests/TestGrayscale.cpp
@@ -19,7 +19,9 @@
#include "Grayscale.h"
#include "Utils.h"
#include <QImage>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
#include <stdlib.h>
namespace imageproc
diff --git a/imageproc/tests/TestMorphology.cpp b/imageproc/tests/TestMorphology.cpp
index d31edc8..d3ac8ab 100644
--- a/imageproc/tests/TestMorphology.cpp
+++ b/imageproc/tests/TestMorphology.cpp
@@ -24,7 +24,9 @@
#include <QImage>
#include <QSize>
#include <QPoint>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestOrthogonalRotation.cpp b/imageproc/tests/TestOrthogonalRotation.cpp
index 44454fe..33121f9 100644
--- a/imageproc/tests/TestOrthogonalRotation.cpp
+++ b/imageproc/tests/TestOrthogonalRotation.cpp
@@ -21,7 +21,9 @@
#include "Utils.h"
#include <QImage>
#include <QRect>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestPolygonRasterizer.cpp b/imageproc/tests/TestPolygonRasterizer.cpp
index a80c2d9..7b0efff 100644
--- a/imageproc/tests/TestPolygonRasterizer.cpp
+++ b/imageproc/tests/TestPolygonRasterizer.cpp
@@ -32,7 +32,9 @@
#include <QColor>
#include <Qt>
#include <math.h>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestRasterOp.cpp b/imageproc/tests/TestRasterOp.cpp
index fa455ca..d8ce690 100644
--- a/imageproc/tests/TestRasterOp.cpp
+++ b/imageproc/tests/TestRasterOp.cpp
@@ -20,7 +20,9 @@
#include "BinaryImage.h"
#include "Utils.h"
#include <QImage>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
#include <vector>
#include <stddef.h>
#include <stdlib.h>
diff --git a/imageproc/tests/TestReduceThreshold.cpp b/imageproc/tests/TestReduceThreshold.cpp
index 2c043f3..529829a 100644
--- a/imageproc/tests/TestReduceThreshold.cpp
+++ b/imageproc/tests/TestReduceThreshold.cpp
@@ -20,7 +20,9 @@
#include "BinaryImage.h"
#include "Utils.h"
#include <QImage>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestSEDM.cpp b/imageproc/tests/TestSEDM.cpp
index 7549c85..3f3819a 100644
--- a/imageproc/tests/TestSEDM.cpp
+++ b/imageproc/tests/TestSEDM.cpp
@@ -22,7 +22,9 @@
#include "Utils.h"
#include <iostream>
#include <QImage>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
#include <math.h>
diff --git a/imageproc/tests/TestScale.cpp b/imageproc/tests/TestScale.cpp
index 14dd700..9b4bc4e 100644
--- a/imageproc/tests/TestScale.cpp
+++ b/imageproc/tests/TestScale.cpp
@@ -21,7 +21,9 @@
#include "Utils.h"
#include <QImage>
#include <QSize>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
#include <stdint.h>
#include <stdlib.h>
#include <math.h>
diff --git a/imageproc/tests/TestSeedFill.cpp b/imageproc/tests/TestSeedFill.cpp
index d60b9d0..4c41f8f 100644
--- a/imageproc/tests/TestSeedFill.cpp
+++ b/imageproc/tests/TestSeedFill.cpp
@@ -25,7 +25,9 @@
#include <QImage>
#include <QSize>
#include <QPoint>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestShear.cpp b/imageproc/tests/TestShear.cpp
index 89694e3..427d7b4 100644
--- a/imageproc/tests/TestShear.cpp
+++ b/imageproc/tests/TestShear.cpp
@@ -21,7 +21,9 @@
#include "BWColor.h"
#include "Utils.h"
#include <QImage>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestSkewFinder.cpp b/imageproc/tests/TestSkewFinder.cpp
index 9ea109c..2871eb1 100644
--- a/imageproc/tests/TestSkewFinder.cpp
+++ b/imageproc/tests/TestSkewFinder.cpp
@@ -24,7 +24,9 @@
#include <QTransform>
#include <QColor>
#include <QString>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
#include <math.h>
#include <stdlib.h>
diff --git a/imageproc/tests/TestSlicedHistogram.cpp b/imageproc/tests/TestSlicedHistogram.cpp
index 5646642..1d0429a 100644
--- a/imageproc/tests/TestSlicedHistogram.cpp
+++ b/imageproc/tests/TestSlicedHistogram.cpp
@@ -22,7 +22,9 @@
#include <QImage>
#include <stdexcept>
#include <stddef.h>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace imageproc
{
diff --git a/imageproc/tests/TestTransform.cpp b/imageproc/tests/TestTransform.cpp
index 41da64b..aa5b124 100644
--- a/imageproc/tests/TestTransform.cpp
+++ b/imageproc/tests/TestTransform.cpp
@@ -21,7 +21,9 @@
#include "Utils.h"
#include <QImage>
#include <QSize>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
#include <stdint.h>
#include <stdlib.h>
#include <math.h>
diff --git a/imageproc/tests/main.cpp b/imageproc/tests/main.cpp
index 8138ef7..6fc08b5 100644
--- a/imageproc/tests/main.cpp
+++ b/imageproc/tests/main.cpp
@@ -22,4 +22,6 @@
#define BOOST_AUTO_TEST_MAIN
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
diff --git a/interaction/DragHandler.h b/interaction/DragHandler.h
index 922ebc2..f875177 100644
--- a/interaction/DragHandler.h
+++ b/interaction/DragHandler.h
@@ -25,7 +25,9 @@
#include "InteractionState.h"
#include <QPoint>
#include <QCoreApplication>
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
class ImageViewBase;
diff --git a/interaction/DraggableLineSegment.h b/interaction/DraggableLineSegment.h
index 4c7881c..39ed22c 100644
--- a/interaction/DraggableLineSegment.h
+++ b/interaction/DraggableLineSegment.h
@@ -22,7 +22,9 @@
#include "DraggableObject.h"
#include <QPointF>
#include <QLineF>
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
class ObjectDragHandler;
diff --git a/interaction/DraggableObject.h b/interaction/DraggableObject.h
index f1ae369..0d3f974 100644
--- a/interaction/DraggableObject.h
+++ b/interaction/DraggableObject.h
@@ -21,7 +21,9 @@
#include "InteractionState.h"
#include "Proximity.h"
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
class ObjectDragHandler;
class QPoint;
diff --git a/interaction/DraggablePoint.h b/interaction/DraggablePoint.h
index 23f740d..c775b71 100644
--- a/interaction/DraggablePoint.h
+++ b/interaction/DraggablePoint.h
@@ -21,7 +21,9 @@
#include "DraggableObject.h"
#include <QPointF>
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
class DraggablePoint : public DraggableObject
{
diff --git a/interaction/InteractionHandler.cpp b/interaction/InteractionHandler.cpp
index 76a0b46..ba7aba9 100644
--- a/interaction/InteractionHandler.cpp
+++ b/interaction/InteractionHandler.cpp
@@ -24,9 +24,15 @@
#include <QMouseEvent>
#include <QWheelEvent>
#include <QContextMenuEvent>
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/construct.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
#include <assert.h>
#define DISPATCH(list, call) { \
diff --git a/interaction/InteractionHandler.h b/interaction/InteractionHandler.h
index 76c9287..63b3cf6 100644
--- a/interaction/InteractionHandler.h
+++ b/interaction/InteractionHandler.h
@@ -22,7 +22,9 @@
#include "NonCopyable.h"
#include "RefCountable.h"
#include "IntrusivePtr.h"
+#ifndef Q_MOC_RUN
#include <boost/intrusive/list.hpp>
+#endif
class InteractionState;
class QPainter;
diff --git a/interaction/InteractionState.h b/interaction/InteractionState.h
index 869ce9e..377eef8 100644
--- a/interaction/InteractionState.h
+++ b/interaction/InteractionState.h
@@ -21,7 +21,9 @@
#include "NonCopyable.h"
#include "Proximity.h"
+#ifndef Q_MOC_RUN
#include <boost/intrusive/list.hpp>
+#endif
#include <QCursor>
#include <QString>
diff --git a/interaction/InteractiveXSpline.cpp b/interaction/InteractiveXSpline.cpp
index 2f1991a..81b0e69 100644
--- a/interaction/InteractiveXSpline.cpp
+++ b/interaction/InteractiveXSpline.cpp
@@ -23,7 +23,9 @@
#include <QCursor>
#include <QMouseEvent>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
struct InteractiveXSpline::NoOp
{
diff --git a/interaction/InteractiveXSpline.h b/interaction/InteractiveXSpline.h
index 9551215..247448e 100644
--- a/interaction/InteractiveXSpline.h
+++ b/interaction/InteractiveXSpline.h
@@ -26,8 +26,12 @@
#include "VecNT.h"
#include <QPointF>
#include <QCoreApplication>
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/scoped_array.hpp>
+#endif
#include <stddef.h>
class InteractiveXSpline : public InteractionHandler
diff --git a/interaction/ZoomHandler.h b/interaction/ZoomHandler.h
index adf0f40..e6aa736 100644
--- a/interaction/ZoomHandler.h
+++ b/interaction/ZoomHandler.h
@@ -23,7 +23,9 @@
#include "InteractionState.h"
#include <QPoint>
#include <QCoreApplication>
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
class ImageViewBase;
diff --git a/math/ArcLengthMapper.cpp b/math/ArcLengthMapper.cpp
index 55d55e7..972f63d 100644
--- a/math/ArcLengthMapper.cpp
+++ b/math/ArcLengthMapper.cpp
@@ -17,7 +17,9 @@
*/
#include "ArcLengthMapper.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <math.h>
#include <assert.h>
diff --git a/math/LineBoundedByRect.cpp b/math/LineBoundedByRect.cpp
index b6b1c57..2f12634 100644
--- a/math/LineBoundedByRect.cpp
+++ b/math/LineBoundedByRect.cpp
@@ -19,7 +19,9 @@
#include "LineBoundedByRect.h"
#include "LineIntersectionScalar.h"
#include "NumericTraits.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
bool lineBoundedByRect(QLineF& line, QRectF const& rect)
{
diff --git a/math/LinearSolver.h b/math/LinearSolver.h
index 5e0b598..1b7334a 100644
--- a/math/LinearSolver.h
+++ b/math/LinearSolver.h
@@ -25,7 +25,9 @@
#include <limits>
#include <stdexcept>
#include <string>
+#ifndef Q_MOC_RUN
#include <boost/scoped_array.hpp>
+#endif
#include <stddef.h>
#include <assert.h>
diff --git a/math/XSpline.cpp b/math/XSpline.cpp
index e304583..a6a5c54 100644
--- a/math/XSpline.cpp
+++ b/math/XSpline.cpp
@@ -25,7 +25,9 @@
#include "adiff/Function.h"
#include <QLineF>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <string>
#include <stdexcept>
#include <algorithm>
diff --git a/math/adiff/tests/TestHessians.cpp b/math/adiff/tests/TestHessians.cpp
index 0b85921..dcffa26 100644
--- a/math/adiff/tests/TestHessians.cpp
+++ b/math/adiff/tests/TestHessians.cpp
@@ -20,8 +20,12 @@
#include "SparseMap.h"
#include "MatT.h"
#include "VecT.h"
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/test/floating_point_comparison.hpp>
+#endif
#include <stdlib.h>
#include <math.h>
diff --git a/math/spfit/ConstraintSet.cpp b/math/spfit/ConstraintSet.cpp
index c89c4d4..d24cb2d 100644
--- a/math/spfit/ConstraintSet.cpp
+++ b/math/spfit/ConstraintSet.cpp
@@ -18,7 +18,9 @@
#include "ConstraintSet.h"
#include "FittableSpline.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <assert.h>
namespace spfit
diff --git a/math/spfit/Optimizer.cpp b/math/spfit/Optimizer.cpp
index b4535ed..95e9a1f 100644
--- a/math/spfit/Optimizer.cpp
+++ b/math/spfit/Optimizer.cpp
@@ -18,7 +18,9 @@
#include "Optimizer.h"
#include "MatrixCalc.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <stdexcept>
#include <algorithm>
#include <assert.h>
diff --git a/math/spfit/PolylineModelShape.cpp b/math/spfit/PolylineModelShape.cpp
index d1b282c..1b623d1 100644
--- a/math/spfit/PolylineModelShape.cpp
+++ b/math/spfit/PolylineModelShape.cpp
@@ -23,7 +23,9 @@
#include "VecNT.h"
#include "ToLineProjector.h"
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <stdexcept>
#include <limits>
#include <math.h>
diff --git a/math/spfit/SplineFitter.cpp b/math/spfit/SplineFitter.cpp
index 425c3b9..120437e 100644
--- a/math/spfit/SplineFitter.cpp
+++ b/math/spfit/SplineFitter.cpp
@@ -22,7 +22,9 @@
#include "ConstraintSet.h"
#include "ModelShape.h"
#include "VirtualFunction.h"
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <stdexcept>
namespace spfit
diff --git a/math/spfit/tests/TestSqDistApproximant.cpp b/math/spfit/tests/TestSqDistApproximant.cpp
index a7f3967..1eaffdc 100644
--- a/math/spfit/tests/TestSqDistApproximant.cpp
+++ b/math/spfit/tests/TestSqDistApproximant.cpp
@@ -21,8 +21,12 @@
#include "ToLineProjector.h"
#include <QPointF>
#include <QLineF>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/test/floating_point_comparison.hpp>
+#endif
#include <stdlib.h>
#include <math.h>
diff --git a/tests/TestContentSpanFinder.cpp b/tests/TestContentSpanFinder.cpp
index 3cc7622..9df1be2 100644
--- a/tests/TestContentSpanFinder.cpp
+++ b/tests/TestContentSpanFinder.cpp
@@ -20,9 +20,15 @@
#include "imageproc/SlicedHistogram.h"
#include "Span.h"
#include <vector>
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/lambda/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace Tests
{
diff --git a/tests/TestMatrixCalc.cpp b/tests/TestMatrixCalc.cpp
index ecd54a0..5103d3a 100644
--- a/tests/TestMatrixCalc.cpp
+++ b/tests/TestMatrixCalc.cpp
@@ -17,8 +17,12 @@
*/
#include "MatrixCalc.h"
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/test/floating_point_comparison.hpp>
+#endif
namespace imageproc
{
diff --git a/tests/TestSmartFilenameOrdering.cpp b/tests/TestSmartFilenameOrdering.cpp
index 61a3004..6f29d60 100644
--- a/tests/TestSmartFilenameOrdering.cpp
+++ b/tests/TestSmartFilenameOrdering.cpp
@@ -19,7 +19,9 @@
#include "SmartFilenameOrdering.h"
#include <QFileInfo>
#include <QString>
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
namespace Tests
{
diff --git a/tests/main.cpp b/tests/main.cpp
index 8138ef7..6fc08b5 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -22,4 +22,6 @@
#define BOOST_AUTO_TEST_MAIN
+#ifndef Q_MOC_RUN
#include <boost/test/auto_unit_test.hpp>
+#endif
diff --git a/zones/BasicSplineVisualizer.cpp b/zones/BasicSplineVisualizer.cpp
index 355237b..d682039 100644
--- a/zones/BasicSplineVisualizer.cpp
+++ b/zones/BasicSplineVisualizer.cpp
@@ -21,7 +21,9 @@
#include <QPainter>
#include <QBrush>
#include <Qt>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
BasicSplineVisualizer::BasicSplineVisualizer()
: m_solidColor(0xcc1420),
diff --git a/zones/EditableSpline.cpp b/zones/EditableSpline.cpp
index f5d01e4..fcc4a7c 100644
--- a/zones/EditableSpline.cpp
+++ b/zones/EditableSpline.cpp
@@ -22,7 +22,9 @@
#include <QDomNode>
#include <QDomElement>
#include <QString>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <assert.h>
EditableSpline::EditableSpline()
diff --git a/zones/EditableZoneSet.h b/zones/EditableZoneSet.h
index 4ecfd0d..a393893 100644
--- a/zones/EditableZoneSet.h
+++ b/zones/EditableZoneSet.h
@@ -24,9 +24,15 @@
#include "PropertySet.h"
#include "IntrusivePtr.h"
#include <QObject>
+#ifndef Q_MOC_RUN
#include <boost/mpl/bool.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/iterator/iterator_facade.hpp>
+#endif
#include <map>
class EditableZoneSet : public QObject
diff --git a/zones/SerializableSpline.cpp b/zones/SerializableSpline.cpp
index 87e76cc..5454332 100644
--- a/zones/SerializableSpline.cpp
+++ b/zones/SerializableSpline.cpp
@@ -26,7 +26,9 @@
#include <QTransform>
#include <QString>
#include <QPointF>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
SerializableSpline::SerializableSpline(EditableSpline const& spline)
{
diff --git a/zones/SerializableSpline.h b/zones/SerializableSpline.h
index 72bfe50..bd77b9a 100644
--- a/zones/SerializableSpline.h
+++ b/zones/SerializableSpline.h
@@ -22,7 +22,9 @@
#include <QVector>
#include <QPointF>
#include <QPolygonF>
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
class EditableSpline;
class QTransform;
diff --git a/zones/ZoneContextMenuInteraction.cpp b/zones/ZoneContextMenuInteraction.cpp
index 65ff314..1acbd57 100644
--- a/zones/ZoneContextMenuInteraction.cpp
+++ b/zones/ZoneContextMenuInteraction.cpp
@@ -33,9 +33,15 @@
#include <QCursor>
#include <QMessageBox>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
+#ifndef Q_MOC_RUN
#include <boost/ref.hpp>
+#endif
#include <vector>
#include <assert.h>
diff --git a/zones/ZoneContextMenuInteraction.h b/zones/ZoneContextMenuInteraction.h
index daa151d..914366b 100644
--- a/zones/ZoneContextMenuInteraction.h
+++ b/zones/ZoneContextMenuInteraction.h
@@ -30,7 +30,9 @@
#include <QObject>
#include <QColor>
#include <QtGlobal>
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
#include <map>
#include <memory>
#include <vector>
diff --git a/zones/ZoneContextMenuItem.h b/zones/ZoneContextMenuItem.h
index 4d89ea5..efa8bdb 100644
--- a/zones/ZoneContextMenuItem.h
+++ b/zones/ZoneContextMenuItem.h
@@ -20,7 +20,9 @@
#define ZONE_CONTEXT_MENU_ITEM_H_
#include <QString>
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
class InteractionState;
class InteractionHandler;
diff --git a/zones/ZoneCreationInteraction.cpp b/zones/ZoneCreationInteraction.cpp
index cd80ec6..5d991da 100644
--- a/zones/ZoneCreationInteraction.cpp
+++ b/zones/ZoneCreationInteraction.cpp
@@ -30,7 +30,9 @@
#include <Qt>
#include <QLineF>
#include <QDebug>
+#ifndef Q_MOC_RUN
#include <boost/lambda/lambda.hpp>
+#endif
ZoneCreationInteraction::ZoneCreationInteraction(
ZoneInteractionContext& context, InteractionState& interaction)
diff --git a/zones/ZoneDefaultInteraction.cpp b/zones/ZoneDefaultInteraction.cpp
index b3a714d..e1c95b7 100644
--- a/zones/ZoneDefaultInteraction.cpp
+++ b/zones/ZoneDefaultInteraction.cpp
@@ -30,7 +30,9 @@
#include <QLinearGradient>
#include <Qt>
#include <QMouseEvent>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
#include <vector>
#include <assert.h>
diff --git a/zones/ZoneInteractionContext.cpp b/zones/ZoneInteractionContext.cpp
index 3ebefbb..6efb31c 100644
--- a/zones/ZoneInteractionContext.cpp
+++ b/zones/ZoneInteractionContext.cpp
@@ -21,7 +21,9 @@
#include "ZoneCreationInteraction.h"
#include "ZoneVertexDragInteraction.h"
#include "ZoneContextMenuInteraction.h"
+#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
+#endif
ZoneInteractionContext::ZoneInteractionContext(
ImageViewBase& image_view, EditableZoneSet& zones)
diff --git a/zones/ZoneInteractionContext.h b/zones/ZoneInteractionContext.h
index a973053..3e907fb 100644
--- a/zones/ZoneInteractionContext.h
+++ b/zones/ZoneInteractionContext.h
@@ -22,7 +22,9 @@
#include "EditableSpline.h"
#include "SplineVertex.h"
#include "EditableZoneSet.h"
+#ifndef Q_MOC_RUN
#include <boost/function.hpp>
+#endif
class InteractionHandler;
class InteractionState;
diff --git a/zones/ZoneSet.cpp b/zones/ZoneSet.cpp
index b21e797..fdbcc3a 100644
--- a/zones/ZoneSet.cpp
+++ b/zones/ZoneSet.cpp
@@ -21,7 +21,9 @@
#include <QDomDocument>
#include <QDomElement>
#include <QString>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
ZoneSet::ZoneSet(QDomElement const& el, PropertyFactory const& prop_factory)
{
diff --git a/zones/ZoneSet.h b/zones/ZoneSet.h
index 7ba8e62..d7fcc20 100644
--- a/zones/ZoneSet.h
+++ b/zones/ZoneSet.h
@@ -20,7 +20,9 @@
#define ZONE_SET_H_
#include "Zone.h"
+#ifndef Q_MOC_RUN
#include <boost/iterator/iterator_facade.hpp>
+#endif
#include <list>
class PropertyFactory;
diff --git a/zones/ZoneVertexDragInteraction.cpp b/zones/ZoneVertexDragInteraction.cpp
index 64a5831..e6e6d8c 100644
--- a/zones/ZoneVertexDragInteraction.cpp
+++ b/zones/ZoneVertexDragInteraction.cpp
@@ -27,7 +27,9 @@
#include <QLinearGradient>
#include <Qt>
#include <QLineF>
+#ifndef Q_MOC_RUN
#include <boost/foreach.hpp>
+#endif
ZoneVertexDragInteraction::ZoneVertexDragInteraction(
ZoneInteractionContext& context, InteractionState& interaction,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment