Skip to content

Commit 1537613

Browse files
committed
BOOST_FOREACH -> Q_FFOREACH
1 parent c5d196f commit 1537613

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

Polyhedron/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <QVector>
88
#include <QSet>
99
#include <QDockWidget>
10-
#include <boost/foreach.hpp>
1110

1211
QAction*
1312
Polyhedron_demo_plugin_helper::
@@ -116,7 +115,7 @@ void Polyhedron_demo_plugin_helper::add_dock_widget(QDockWidget* dock_widget)
116115

117116
QList<QDockWidget*> dockWidgets = mw->findChildren<QDockWidget*>();
118117
int counter = 0;
119-
BOOST_FOREACH(QDockWidget* dock, dockWidgets) {
118+
Q_FOREACH(QDockWidget* dock, dockWidgets) {
120119
if( mw->dockWidgetArea(dock) != Qt::LeftDockWidgetArea ||
121120
dock == dock_widget )
122121
{ continue; }

Polyhedron/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
#include <boost/iterator/transform_iterator.hpp>
2727
#include <boost/optional/optional.hpp>
28-
#include <boost/foreach.hpp>
2928

3029
typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel;
3130

@@ -97,7 +96,7 @@ public Q_SLOTS:
9796
// place all selected polyhedron and point items to vectors below
9897
std::vector<const Polyhedron*> polys;
9998
std::vector<Point_set*> point_sets;
100-
BOOST_FOREACH(Scene_interface::Item_id id, scene->selectionIndices()) {
99+
Q_FOREACH(Scene_interface::Item_id id, scene->selectionIndices()) {
101100
Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene->item(id));
102101
if(poly_item) { polys.push_back(poly_item->polyhedron()); }
103102

@@ -149,7 +148,7 @@ public Q_SLOTS:
149148
print_message(QString("%1 points are selected. All Done!").arg(nb_selected));
150149

151150
// for repaint
152-
BOOST_FOREACH(Scene_interface::Item_id id, scene->selectionIndices()) {
151+
Q_FOREACH(Scene_interface::Item_id id, scene->selectionIndices()) {
153152
Scene_points_with_normal_item* point_item = qobject_cast<Scene_points_with_normal_item*>(scene->item(id));
154153
if(point_item) {
155154
scene->itemChanged(point_item);
@@ -168,7 +167,7 @@ public Q_SLOTS:
168167
// warning about '*bbox' not being initialized.
169168
// -- Laurent Rineau, 2014/10/30
170169

171-
BOOST_FOREACH(Scene_interface::Item_id id, scene->selectionIndices()) {
170+
Q_FOREACH(Scene_interface::Item_id id, scene->selectionIndices()) {
172171
Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(scene->item(id));
173172
if(poly_item) {
174173
if(!bbox) {

Surface_mesher/demo/Surface_mesher/mainwindow.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <algorithm> // std::max
2121
#include <cmath> // std::sqrt
2222
#include <boost/format.hpp>
23-
#include <boost/foreach.hpp>
2423

2524
#include "ui_mainwindow.h"
2625
#include "volume.h"
@@ -96,15 +95,15 @@ void MainWindow::show_only(QString tag)
9695
QTextStream err(&dummy);
9796
#endif
9897
err << "** Show only in \"" << tag << "\"\n";
99-
BOOST_FOREACH(QObject* object,
98+
Q_FOREACH(QObject* object,
10099
this->findChildren<QObject*>())
101100
{
102101
QStringList show_only_in = object->property("show_only_in").toStringList();
103102
if(!show_only_in.isEmpty())
104103
{
105104
err << object->metaObject()->className()
106105
<< " \"" << object->objectName() << "\" only in: ";
107-
BOOST_FOREACH(QString s, show_only_in)
106+
Q_FOREACH(QString s, show_only_in)
108107
err << s << " ";
109108
const bool visible = show_only_in.contains(tag);
110109
err << (visible ? "(enabled)\n" : "(disabled)\n");

0 commit comments

Comments
 (0)