Skip to content

Commit 88ef561

Browse files
committed
Fix the call to Q_INIT_RESOURCE
For resources that are shipped by the CGAL_Qt4 library, one need to call CGAL_QT4_INIT_RESOURCES, a macro that calls CGAL_Qt4_init_resources (exported by the CGAL_Qt4 DLL)
1 parent d0b7e5d commit 88ef561

File tree

24 files changed

+53
-78
lines changed

24 files changed

+53
-78
lines changed

AABB_tree/demo/AABB_tree/AABB_demo.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include "MainWindow.h"
2626
#include <QApplication>
27+
#include <CGAL/Qt/resources.h>
2728

2829
int main(int argc, char **argv)
2930
{
@@ -34,10 +35,7 @@ int main(int argc, char **argv)
3435

3536
// Import resources from libCGALQt4.
3637
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
37-
Q_INIT_RESOURCE(File);
38-
Q_INIT_RESOURCE(Triangulation_2);
39-
Q_INIT_RESOURCE(Input);
40-
Q_INIT_RESOURCE(CGAL);
38+
CGAL_QT4_INIT_RESOURCES;
4139

4240
MainWindow mainWindow;
4341
mainWindow.show();

Alpha_shapes_3/demo/Alpha_shapes_3/Alpha_shape_3.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <QApplication>
55

66

7-
7+
#include <CGAL/Qt/resources.h>
88

99
int main(int argc, char** argv)
1010
{
@@ -16,9 +16,9 @@ int main(int argc, char** argv)
1616

1717
// Import resources from libCGALQt4.
1818
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
19-
Q_INIT_RESOURCE(File);
19+
CGAL_QT4_INIT_RESOURCES;
2020
Q_INIT_RESOURCE(Alpha_shape_3);
21-
Q_INIT_RESOURCE(CGAL);
21+
2222
MainWindow mw;
2323
mw.show();
2424

Boolean_set_operations_2/demo/Boolean_set_operations_2_GraphicsView/boolean_operations_2.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,7 @@ void MainWindow::zoomToFit()
16181618
}
16191619

16201620
#include "boolean_operations_2.moc"
1621+
#include <CGAL/Qt/resources.h>
16211622

16221623
int main(int argc, char **argv)
16231624
{
@@ -1629,9 +1630,7 @@ int main(int argc, char **argv)
16291630

16301631
// Import resources from libCGALQt4.
16311632
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
1632-
Q_INIT_RESOURCE(File);
1633-
Q_INIT_RESOURCE(Input);
1634-
Q_INIT_RESOURCE(CGAL);
1633+
CGAL_QT4_INIT_RESOURCES;
16351634

16361635
MainWindow mainWindow;
16371636
mainWindow.show();

GraphicsView/demo/Alpha_shapes_2/Alpha_shapes_2.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ MainWindow::on_actionRecenter_triggered()
289289

290290

291291
#include "Alpha_shapes_2.moc"
292+
#include <CGAL/Qt/resources.h>
292293

293294
int main(int argc, char **argv)
294295
{
@@ -300,10 +301,7 @@ int main(int argc, char **argv)
300301

301302
// Import resources from libCGALQt4.
302303
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
303-
Q_INIT_RESOURCE(File);
304-
Q_INIT_RESOURCE(Triangulation_2);
305-
Q_INIT_RESOURCE(Input);
306-
Q_INIT_RESOURCE(CGAL);
304+
CGAL_QT4_INIT_RESOURCES;
307305

308306
MainWindow mainWindow;
309307
mainWindow.show();

GraphicsView/demo/Apollonius_graph_2/Apollonius_graph_2.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ MainWindow::on_actionRecenter_triggered()
272272

273273

274274
#include "Apollonius_graph_2.moc"
275+
#include <CGAL/Qt/resources.h>
275276

276277
int main(int argc, char **argv)
277278
{
@@ -283,10 +284,8 @@ int main(int argc, char **argv)
283284

284285
// Import resources from libCGALQt4.
285286
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
286-
Q_INIT_RESOURCE(File);
287+
CGAL_QT4_INIT_RESOURCES;
287288
Q_INIT_RESOURCE(Apollonius_graph_2);
288-
Q_INIT_RESOURCE(Input);
289-
Q_INIT_RESOURCE(CGAL);
290289

291290
MainWindow mainWindow;
292291
mainWindow.show();

GraphicsView/demo/Bounding_volumes/Bounding_volumes.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ MainWindow::on_actionRecenter_triggered()
529529

530530

531531
#include "Bounding_volumes.moc"
532+
#include <CGAL/Qt/resources.h>
532533

533534
int main(int argc, char **argv)
534535
{
@@ -540,9 +541,7 @@ int main(int argc, char **argv)
540541

541542
// Import resources from libCGALQt4.
542543
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
543-
Q_INIT_RESOURCE(File);
544-
Q_INIT_RESOURCE(Input);
545-
Q_INIT_RESOURCE(CGAL);
544+
CGAL_QT4_INIT_RESOURCES;
546545

547546
MainWindow mainWindow;
548547
mainWindow.show();

GraphicsView/demo/Circular_kernel_2/Circular_kernel_2.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ MainWindow::on_actionRecenter_triggered()
278278

279279

280280
#include "Circular_kernel_2.moc"
281+
#include <CGAL/Qt/resources.h>
281282

282283
int main(int argc, char **argv)
283284
{
@@ -289,9 +290,7 @@ int main(int argc, char **argv)
289290

290291
// Import resources from libCGALQt4.
291292
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
292-
Q_INIT_RESOURCE(File);
293-
Q_INIT_RESOURCE(Input);
294-
Q_INIT_RESOURCE(CGAL);
293+
CGAL_QT4_INIT_RESOURCES;
295294

296295
MainWindow mainWindow;
297296
mainWindow.show();

GraphicsView/demo/Generator/Generator_2.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ MainWindow::clear()
271271

272272

273273
#include "Generator_2.moc"
274+
#include <CGAL/Qt/resources.h>
274275

275276
int main(int argc, char **argv)
276277
{
@@ -282,10 +283,8 @@ int main(int argc, char **argv)
282283

283284
// Import resources from libCGALQt4.
284285
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
285-
Q_INIT_RESOURCE(File);
286+
CGAL_QT4_INIT_RESOURCES;
286287
Q_INIT_RESOURCE(Generator_2);
287-
Q_INIT_RESOURCE(Input);
288-
Q_INIT_RESOURCE(CGAL);
289288

290289
MainWindow mainWindow;
291290
mainWindow.show();

GraphicsView/demo/L1_Voronoi_diagram_2/L1_voronoi_diagram_2.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ MainWindow::bounding_rect() {
374374

375375

376376
#include "L1_voronoi_diagram_2.moc"
377+
#include <CGAL/Qt/resources.h>
377378

378379
int main(int argc, char **argv)
379380
{
@@ -385,11 +386,7 @@ int main(int argc, char **argv)
385386

386387
// Import resources from libCGALQt4.
387388
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
388-
Q_INIT_RESOURCE(File);
389-
Q_INIT_RESOURCE(Triangulation_2);
390-
Q_INIT_RESOURCE(Input);
391-
Q_INIT_RESOURCE(CGAL);
392-
389+
CGAL_QT4_INIT_RESOURCES;
393390
MainWindow mainWindow;
394391
mainWindow.show();
395392
return app.exec();

GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ MainWindow::clear()
265265

266266

267267
#include "Largest_empty_rectangle_2.moc"
268+
#include <CGAL/Qt/resources.h>
268269

269270
int main(int argc, char **argv)
270271
{
@@ -276,10 +277,8 @@ int main(int argc, char **argv)
276277

277278
// Import resources from libCGALQt4.
278279
// See http://doc.trolltech.com/4.4/qdir.html#Q_INIT_RESOURCE
279-
Q_INIT_RESOURCE(File);
280+
CGAL_QT4_INIT_RESOURCES;
280281
Q_INIT_RESOURCE(Largest_empty_rectangle_2);
281-
Q_INIT_RESOURCE(Input);
282-
Q_INIT_RESOURCE(CGAL);
283282

284283
MainWindow mainWindow;
285284
mainWindow.show();

0 commit comments

Comments
 (0)