-
Notifications
You must be signed in to change notification settings - Fork 5
/
tbb.2021.patch
2455 lines (2089 loc) · 81.9 KB
/
tbb.2021.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From 21a0e7fb08af80d114d0f4dfc40c66d8c521627b Mon Sep 17 00:00:00 2001
From: bartus <szczepaniak.bartek+github@gmail.com>
Date: Sat, 25 Jun 2022 14:36:06 +0200
Subject: [PATCH 01/13] Fix tbb:2021 emit() colision with QT emit()
---
libs/qCC_db/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/qCC_db/CMakeLists.txt b/libs/qCC_db/CMakeLists.txt
index 47f49240..e80132eb 100644
--- a/libs/qCC_db/CMakeLists.txt
+++ b/libs/qCC_db/CMakeLists.txt
@@ -12,7 +12,7 @@ target_link_libraries( ${PROJECT_NAME}
CC_FBO_LIB
)
-target_compile_definitions( ${PROJECT_NAME} PRIVATE QCC_DB_LIBRARY_BUILD )
+target_compile_definitions( ${PROJECT_NAME} PRIVATE QCC_DB_LIBRARY_BUILD QT_NO_KEYWORDS )
set_target_properties( ${PROJECT_NAME} PROPERTIES
CXX_VISIBILITY_PRESET hidden
--
2.36.1
From c5880a1faad55d0c74012d045281c083cdfb96b9 Mon Sep 17 00:00:00 2001
From: bartus <szczepaniak.bartek+github@gmail.com>
Date: Sat, 25 Jun 2022 14:46:32 +0200
Subject: [PATCH 02/13] Replace signals: with Q_SIGNALS: for QT_NO_KEYWORDS
---
libs/qCC_db/include/ccClipBox.h | 2 +-
libs/qCC_db/include/ccOctree.h | 2 +-
libs/qCC_db/include/ccProgressDialog.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/qCC_db/include/ccClipBox.h b/libs/qCC_db/include/ccClipBox.h
index 9e71c0c6..b59797d5 100644
--- a/libs/qCC_db/include/ccClipBox.h
+++ b/libs/qCC_db/include/ccClipBox.h
@@ -122,7 +122,7 @@ public:
//! Associated entity container
inline const ccHObject& getContainer() const { return m_entityContainer; }
-signals:
+Q_SIGNALS:
//! Signal sent each time the box is modified
void boxModified(const ccBBox* box);
diff --git a/libs/qCC_db/include/ccOctree.h b/libs/qCC_db/include/ccOctree.h
index bb11e9ea..09206e23 100644
--- a/libs/qCC_db/include/ccOctree.h
+++ b/libs/qCC_db/include/ccOctree.h
@@ -159,7 +159,7 @@ public: //HELPERS
const BestRadiusParams& params,
QWidget* parentWidget = nullptr);
-signals:
+Q_SIGNALS:
//! Signal sent when the octree organization is modified (cleared, etc.)
void updated();
diff --git a/libs/qCC_db/include/ccProgressDialog.h b/libs/qCC_db/include/ccProgressDialog.h
index e78a63aa..039645dd 100644
--- a/libs/qCC_db/include/ccProgressDialog.h
+++ b/libs/qCC_db/include/ccProgressDialog.h
@@ -78,7 +78,7 @@ protected:
**/
void refresh();
-signals:
+Q_SIGNALS:
//! Schedules a call to refresh
void scheduleRefresh();
--
2.36.1
From a4eb316dda57e4e35a685f07acfce41d427e385c Mon Sep 17 00:00:00 2001
From: bartus <szczepaniak.bartek+github@gmail.com>
Date: Sat, 25 Jun 2022 14:52:25 +0200
Subject: [PATCH 03/13] Replace emit() with Q_EMIT() for QT_NO_KEYWORDS
---
libs/qCC_db/src/ccClipBox.cpp | 10 +++++-----
libs/qCC_db/src/ccOctree.cpp | 2 +-
libs/qCC_db/src/ccProgressDialog.cpp | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libs/qCC_db/src/ccClipBox.cpp b/libs/qCC_db/src/ccClipBox.cpp
index 8710a4d3..9ad46d61 100644
--- a/libs/qCC_db/src/ccClipBox.cpp
+++ b/libs/qCC_db/src/ccClipBox.cpp
@@ -284,7 +284,7 @@ void ccClipBox::reset()
update();
//send 'modified' signal
- emit boxModified(&m_box);
+ Q_EMIT boxModified(&m_box);
}
void ccClipBox::set(const ccBBox& extents, const ccGLMatrix& transformation)
@@ -295,7 +295,7 @@ void ccClipBox::set(const ccBBox& extents, const ccGLMatrix& transformation)
update();
//send 'modified' signal
- emit boxModified(&m_box);
+ Q_EMIT boxModified(&m_box);
}
void ccClipBox::get(ccBBox& extents, ccGLMatrix& transformation)
@@ -498,7 +498,7 @@ bool ccClipBox::move3D(const CCVector3d& uInput)
}
//send 'modified' signal
- emit boxModified(&m_box);
+ Q_EMIT boxModified(&m_box);
}
else if (m_activeComponent == SPHERE)
{
@@ -589,7 +589,7 @@ void ccClipBox::setBox(const ccBBox& box)
update();
//send 'modified' signal
- emit boxModified(&m_box);
+ Q_EMIT boxModified(&m_box);
}
void ccClipBox::shift(const CCVector3& v)
@@ -600,7 +600,7 @@ void ccClipBox::shift(const CCVector3& v)
update();
//send 'modified' signal
- emit boxModified(&m_box);
+ Q_EMIT boxModified(&m_box);
}
void ccClipBox::flagPointsInside( ccGenericPointCloud* cloud,
diff --git a/libs/qCC_db/src/ccOctree.cpp b/libs/qCC_db/src/ccOctree.cpp
index 426027ef..0032f70f 100644
--- a/libs/qCC_db/src/ccOctree.cpp
+++ b/libs/qCC_db/src/ccOctree.cpp
@@ -81,7 +81,7 @@ void ccOctree::setDisplayMode(DisplayMode mode)
void ccOctree::clear()
{
//warn the others that the octree organization is going to change
- emit updated();
+ Q_EMIT updated();
QOpenGLContext* context = QOpenGLContext::currentContext();
if (context)
diff --git a/libs/qCC_db/src/ccProgressDialog.cpp b/libs/qCC_db/src/ccProgressDialog.cpp
index e59e94b7..f07becb3 100644
--- a/libs/qCC_db/src/ccProgressDialog.cpp
+++ b/libs/qCC_db/src/ccProgressDialog.cpp
@@ -67,7 +67,7 @@ void ccProgressDialog::update(float percent)
if (value != m_currentValue)
{
m_currentValue = value;
- emit scheduleRefresh();
+ Q_EMIT scheduleRefresh();
QCoreApplication::processEvents(); //we let the main thread breath (so that the call to 'refresh' can be performed)
}
}
--
2.36.1
From 7da58f1fd6c072eb581b9480d19bd1ffe31801cb Mon Sep 17 00:00:00 2001
From: bartus <szczepaniak.bartek+github@gmail.com>
Date: Sat, 25 Jun 2022 15:05:32 +0200
Subject: [PATCH 04/13] Plugins: add tbb:2021 fix (emit() colision with QT)
---
plugins/core/Standard/qFacets/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/plugins/core/Standard/qFacets/CMakeLists.txt b/plugins/core/Standard/qFacets/CMakeLists.txt
index b527d392..fe585a7b 100644
--- a/plugins/core/Standard/qFacets/CMakeLists.txt
+++ b/plugins/core/Standard/qFacets/CMakeLists.txt
@@ -8,6 +8,7 @@ if( PLUGIN_STANDARD_QFACETS )
project( QFACETS_PLUGIN )
AddPlugin( NAME ${PROJECT_NAME} )
+ target_compile_definitions( ${PROJECT_NAME} PRIVATE QT_NO_KEYWORDS )
add_subdirectory( include )
add_subdirectory( src )
--
2.36.1
From 5e0cd797caf3e7cb4ac9a0c99ad0757f0e145ac5 Mon Sep 17 00:00:00 2001
From: bartus <szczepaniak.bartek+github@gmail.com>
Date: Sat, 25 Jun 2022 15:16:36 +0200
Subject: [PATCH 05/13] Replace emit() with Q_EMIT() for QT_NO_KEYWORDS
---
plugins/core/Standard/qFacets/src/stereogramDlg.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/core/Standard/qFacets/src/stereogramDlg.cpp b/plugins/core/Standard/qFacets/src/stereogramDlg.cpp
index 21fb31b7..965ca498 100644
--- a/plugins/core/Standard/qFacets/src/stereogramDlg.cpp
+++ b/plugins/core/Standard/qFacets/src/stereogramDlg.cpp
@@ -310,7 +310,7 @@ void StereogramWidget::mousePressEvent(QMouseEvent* e)
if (m_clickDipDir_deg >= 360.0)
m_clickDipDir_deg -= 360.0;
- emit pointClicked(m_clickDip_deg, m_clickDipDir_deg);
+ Q_EMIT pointClicked(m_clickDip_deg, m_clickDipDir_deg);
e->accept();
return;
}
@@ -328,7 +328,7 @@ void StereogramWidget::enableMouseTracking(bool state, double dipSpan_deg/*=30*/
m_clickDipSpan_deg = dipSpan_deg;
m_clickDipDirSpan_deg = dipDirSpan_deg;
//to give to the parent dialog some feedback about the current marker position!
- emit pointClicked(m_clickDip_deg, m_clickDipDir_deg);
+ Q_EMIT pointClicked(m_clickDip_deg, m_clickDipDir_deg);
}
}
--
2.36.1
From 3991b9a35d95933a39ce8f6f2a504d57b32792d6 Mon Sep 17 00:00:00 2001
From: bartus <szczepaniak.bartek+github@gmail.com>
Date: Sat, 25 Jun 2022 15:17:02 +0200
Subject: [PATCH 06/13] Replace signals: with Q_SIGNALS: for QT_NO_KEYWORDS
---
libs/CCPluginAPI/include/ccColorScaleSelector.h | 2 +-
plugins/core/Standard/qFacets/include/stereogramDlg.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/CCPluginAPI/include/ccColorScaleSelector.h b/libs/CCPluginAPI/include/ccColorScaleSelector.h
index 2832262f..5827d2f4 100644
--- a/libs/CCPluginAPI/include/ccColorScaleSelector.h
+++ b/libs/CCPluginAPI/include/ccColorScaleSelector.h
@@ -52,7 +52,7 @@ public:
//! Returns a given color scale by index
ccColorScale::Shared getScale(int index) const;
-signals:
+Q_SIGNALS:
//! Signal emitted when a color scale is selected
void colorScaleSelected(int);
diff --git a/plugins/core/Standard/qFacets/include/stereogramDlg.h b/plugins/core/Standard/qFacets/include/stereogramDlg.h
index 9f7ed22f..1a3ed034 100644
--- a/plugins/core/Standard/qFacets/include/stereogramDlg.h
+++ b/plugins/core/Standard/qFacets/include/stereogramDlg.h
@@ -95,7 +95,7 @@ public:
//! Sets tracked center position
void setTrackedCenter(double dip_deg, double dipDir_deg);
-signals:
+Q_SIGNALS:
//! Signal emitted when the mouse (left) button is clicked
/** \param dip_deg dip angle (in degrees)
--
2.36.1
From 2ce0e256a47ed50d73d3204b14aec88d74a7f456 Mon Sep 17 00:00:00 2001
From: bartus <szczepaniak.bartek+github@gmail.com>
Date: Sat, 25 Jun 2022 15:27:26 +0200
Subject: [PATCH 07/13] Fix tbb:2021 emit() collsion with QT emit()
---
qCC/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/qCC/CMakeLists.txt b/qCC/CMakeLists.txt
index 79b3a290..27419dd0 100644
--- a/qCC/CMakeLists.txt
+++ b/qCC/CMakeLists.txt
@@ -34,6 +34,7 @@ elseif( APPLE )
add_executable( ${PROJECT_NAME} MACOSX_BUNDLE ${header_list} ${source_list} ${generated_ui_list} ${generated_qrc_list} ${txt_list} )
else()
add_executable( ${PROJECT_NAME} ${header_list} ${source_list} ${generated_ui_list} ${generated_qrc_list} ${rc_list} ${txt_list} )
+ target_compile_definitions( ${PROJECT_NAME} PRIVATE QT_NO_KEYWORDS )
endif()
if( WIN32 )
--
2.36.1
From f0892fb6e18b6c7666b691476f708b58f84f0b80 Mon Sep 17 00:00:00 2001
From: bartus <szczepaniak.bartek+github@gmail.com>
Date: Sat, 25 Jun 2022 15:34:07 +0200
Subject: [PATCH 08/13] Replace signals: with Q_SIGNALS: for QT_NO_KEYWORDS
---
qCC/ccHistogramWindow.h | 2 +-
qCC/ccPointPropertiesDlg.h | 2 +-
qCC/db_tree/ccDBRoot.h | 2 +-
qCC/db_tree/ccPropertiesTreeDelegate.h | 2 +-
qCC/db_tree/sfEditDlg.h | 2 +-
qCC/extern/QCustomPlot/qcustomplot.h | 28 +++++++++++++-------------
6 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/qCC/ccHistogramWindow.h b/qCC/ccHistogramWindow.h
index 80f65aca..3fb9f84b 100644
--- a/qCC/ccHistogramWindow.h
+++ b/qCC/ccHistogramWindow.h
@@ -141,7 +141,7 @@ public: //Axis label display Options
void setMinSatValue(double);
void setMaxSatValue(double);
-signals:
+Q_SIGNALS:
void sfMinDispValChanged(double);
void sfMaxDispValChanged(double);
diff --git a/qCC/ccPointPropertiesDlg.h b/qCC/ccPointPropertiesDlg.h
index f657cbe5..3c16913a 100644
--- a/qCC/ccPointPropertiesDlg.h
+++ b/qCC/ccPointPropertiesDlg.h
@@ -57,7 +57,7 @@ protected:
void processClickedPoint(int x, int y);
void close2DZone();
-signals:
+Q_SIGNALS:
//! Signal emitted when a new label is created
void newLabel(ccHObject*);
diff --git a/qCC/db_tree/ccDBRoot.h b/qCC/db_tree/ccDBRoot.h
index 6d2e1e32..7b437092 100644
--- a/qCC/db_tree/ccDBRoot.h
+++ b/qCC/db_tree/ccDBRoot.h
@@ -217,7 +217,7 @@ private:
void enableBubbleViewMode();
void editLabelScalarValue();
-signals:
+Q_SIGNALS:
void selectionChanged();
void dbIsEmpty();
void dbIsNotEmptyAnymore();
diff --git a/qCC/db_tree/ccPropertiesTreeDelegate.h b/qCC/db_tree/ccPropertiesTreeDelegate.h
index 80d5a3e3..0897baec 100644
--- a/qCC/db_tree/ccPropertiesTreeDelegate.h
+++ b/qCC/db_tree/ccPropertiesTreeDelegate.h
@@ -129,7 +129,7 @@ public:
//! Returns currently bound object
ccHObject* getCurrentObject();
-signals:
+Q_SIGNALS:
void ccObjectPropertiesChanged(ccHObject* hObject) const;
void ccObjectAppearanceChanged(ccHObject* hObject) const;
void ccObjectAndChildrenAppearanceChanged(ccHObject* hObject) const;
diff --git a/qCC/db_tree/sfEditDlg.h b/qCC/db_tree/sfEditDlg.h
index ce48726b..700a2f5e 100644
--- a/qCC/db_tree/sfEditDlg.h
+++ b/qCC/db_tree/sfEditDlg.h
@@ -61,7 +61,7 @@ public:
void symmetricalScaleChanged(bool);
void logScaleChanged(bool);
-signals:
+Q_SIGNALS:
//! Signal emitted when the SF display parameters have changed
void entitySFHasChanged();
diff --git a/qCC/extern/QCustomPlot/qcustomplot.h b/qCC/extern/QCustomPlot/qcustomplot.h
index 8f0f78b1..351f58f0 100644
--- a/qCC/extern/QCustomPlot/qcustomplot.h
+++ b/qCC/extern/QCustomPlot/qcustomplot.h
@@ -746,7 +746,7 @@ public:
// non-property methods:
bool realVisibility() const;
-signals:
+Q_SIGNALS:
void layerChanged(QCPLayer *newLayer);
protected:
@@ -1136,7 +1136,7 @@ public:
// non-property methods:
Q_SLOT void cancel();
-signals:
+Q_SIGNALS:
void started(QMouseEvent *event);
void changed(const QRect &rect, QMouseEvent *event);
void canceled(const QRect &rect, QInputEvent *event);
@@ -2289,7 +2289,7 @@ public:
static Qt::Orientation orientation(AxisType type) { return type==atBottom || type==atTop ? Qt::Horizontal : Qt::Vertical; }
static AxisType opposite(AxisType type);
-signals:
+Q_SIGNALS:
void rangeChanged(const QCPRange &newRange);
void rangeChanged(const QCPRange &newRange, const QCPRange &oldRange);
void scaleTypeChanged(QCPAxis::ScaleType scaleType);
@@ -3518,7 +3518,7 @@ public:
bool removeFromLegend(QCPLegend *legend) const;
bool removeFromLegend() const;
-signals:
+Q_SIGNALS:
void selectionChanged(bool selected);
void selectionChanged(const QCPDataSelection &selection);
void selectableChanged(QCP::SelectionType selectable);
@@ -3708,7 +3708,7 @@ public:
QCPItemAnchor *anchor(const QString &name) const;
bool hasAnchor(const QString &name) const;
-signals:
+Q_SIGNALS:
void selectionChanged(bool selected);
void selectableChanged(bool selectable);
@@ -3907,7 +3907,7 @@ public:
QCPAxis *xAxis, *yAxis, *xAxis2, *yAxis2;
QCPLegend *legend;
-signals:
+Q_SIGNALS:
void mouseDoubleClick(QMouseEvent *event);
void mousePress(QMouseEvent *event);
void mouseMove(QMouseEvent *event);
@@ -5045,7 +5045,7 @@ public:
// reimplemented virtual methods:
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
-signals:
+Q_SIGNALS:
void selectionChanged(bool selected);
void selectableChanged(bool selectable);
@@ -5182,7 +5182,7 @@ public:
void clearItems();
QList<QCPAbstractLegendItem*> selectedItems() const;
-signals:
+Q_SIGNALS:
void selectionChanged(QCPLegend::SelectableParts parts);
void selectableChanged(QCPLegend::SelectableParts parts);
@@ -5273,7 +5273,7 @@ public:
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE;
virtual void mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE;
-signals:
+Q_SIGNALS:
void selectionChanged(bool selected);
void selectableChanged(bool selectable);
void clicked(QMouseEvent *event);
@@ -5385,7 +5385,7 @@ public:
// reimplemented virtual methods:
virtual void update(UpdatePhase phase) Q_DECL_OVERRIDE;
-signals:
+Q_SIGNALS:
void dataRangeChanged(const QCPRange &newRange);
void dataScaleTypeChanged(QCPAxis::ScaleType scaleType);
void gradientChanged(const QCPColorGradient &newGradient);
@@ -6081,7 +6081,7 @@ public:
virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE;
virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE;
-signals:
+Q_SIGNALS:
void dataRangeChanged(const QCPRange &newRange);
void dataScaleTypeChanged(QCPAxis::ScaleType scaleType);
void gradientChanged(const QCPColorGradient &newGradient);
@@ -7118,7 +7118,7 @@ public:
double radiusToCoord(double radius) const;
SelectablePart getPartAt(const QPointF &pos) const;
-signals:
+Q_SIGNALS:
void rangeChanged(const QCPRange &newRange);
void rangeChanged(const QCPRange &newRange, const QCPRange &oldRange);
void scaleTypeChanged(QCPPolarAxisRadial::ScaleType scaleType);
@@ -7388,7 +7388,7 @@ public:
QPointF center() const { return mCenter; }
double radius() const { return mRadius; }
-signals:
+Q_SIGNALS:
void rangeChanged(const QCPRange &newRange);
void rangeChanged(const QCPRange &newRange, const QCPRange &oldRange);
void selectionChanged(const QCPPolarAxisAngular::SelectableParts &parts);
@@ -7672,7 +7672,7 @@ public:
virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const;
virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const;
-signals:
+Q_SIGNALS:
void selectionChanged(bool selected);
void selectionChanged(const QCPDataSelection &selection);
void selectableChanged(QCP::SelectionType selectable);
--
2.36.1
From 50ddae0f1ba6fa7b570d0db8c1f14a049c10b81c Mon Sep 17 00:00:00 2001
From: bartus <szczepaniak.bartek+github@gmail.com>
Date: Sat, 25 Jun 2022 15:39:36 +0200
Subject: [PATCH 09/13] Replace signals: with Q_SIGNALS: for QT_NO_KEYWORDS
---
libs/CCAppCommon/devices/3dConnexion/Mouse3DInput.h | 2 +-
libs/CCAppCommon/devices/gamepad/GamepadInput.h | 2 +-
libs/CCAppCommon/include/ccDisplayOptionsDlg.h | 2 +-
libs/CCPluginAPI/include/ccColorScaleEditorWidget.h | 6 +++---
libs/CCPluginAPI/include/ccOverlayDialog.h | 2 +-
libs/qCC_glWindow/include/ccGLWindow.h | 2 +-
libs/qCC_io/include/PlyOpenDlg.h | 2 +-
plugins/core/Standard/qPCL/PclUtils/filters/BaseFilter.h | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/libs/CCAppCommon/devices/3dConnexion/Mouse3DInput.h b/libs/CCAppCommon/devices/3dConnexion/Mouse3DInput.h
index d32e881d..7679379d 100644
--- a/libs/CCAppCommon/devices/3dConnexion/Mouse3DInput.h
+++ b/libs/CCAppCommon/devices/3dConnexion/Mouse3DInput.h
@@ -248,7 +248,7 @@ public:
**/
bool onSiEvent(void* siGetEventData);
-signals:
+Q_SIGNALS:
void sigMove3d(std::vector<float>& motionData);
void sigReleased();
diff --git a/libs/CCAppCommon/devices/gamepad/GamepadInput.h b/libs/CCAppCommon/devices/gamepad/GamepadInput.h
index cee497d0..14c31b34 100644
--- a/libs/CCAppCommon/devices/gamepad/GamepadInput.h
+++ b/libs/CCAppCommon/devices/gamepad/GamepadInput.h
@@ -48,7 +48,7 @@ public:
//! Updates a window with the current gamepad state
void update(ccGLWindow* win);
-signals:
+Q_SIGNALS:
void updated();
diff --git a/libs/CCAppCommon/include/ccDisplayOptionsDlg.h b/libs/CCAppCommon/include/ccDisplayOptionsDlg.h
index bce1d1e0..6c40cf7f 100644
--- a/libs/CCAppCommon/include/ccDisplayOptionsDlg.h
+++ b/libs/CCAppCommon/include/ccDisplayOptionsDlg.h
@@ -41,7 +41,7 @@ public:
explicit ccDisplayOptionsDlg(QWidget* parent);
~ccDisplayOptionsDlg() override;
-signals:
+Q_SIGNALS:
void aspectHasChanged();
protected:
diff --git a/libs/CCPluginAPI/include/ccColorScaleEditorWidget.h b/libs/CCPluginAPI/include/ccColorScaleEditorWidget.h
index 1ba900ea..0fbe519c 100644
--- a/libs/CCPluginAPI/include/ccColorScaleEditorWidget.h
+++ b/libs/CCPluginAPI/include/ccColorScaleEditorWidget.h
@@ -166,7 +166,7 @@ public:
//! Default constructor
ColorBarWidget(SharedColorScaleElementSliders sliders, QWidget* parent = nullptr, Qt::Orientation orientation = Qt::Horizontal);
-signals:
+Q_SIGNALS:
//! Signal emitted when the mouse (left) button is clicked
/** \param relativePos relative click position (between 0 and 1)
@@ -206,7 +206,7 @@ public:
//! Updates all sliders positions
void updateAllSlidersPos();
-signals:
+Q_SIGNALS:
//! Signal emitted when a slider is changed (position or color)
void sliderModified(int index);
@@ -307,7 +307,7 @@ public:
//inherited from ColorScaleEditorBaseWidget
void setSliders(SharedColorScaleElementSliders sliders) override;
-signals:
+Q_SIGNALS:
//! Signal emitted when a slider is selected
void stepSelected(int index);
diff --git a/libs/CCPluginAPI/include/ccOverlayDialog.h b/libs/CCPluginAPI/include/ccOverlayDialog.h
index 5c7b93e2..7b7ae925 100644
--- a/libs/CCPluginAPI/include/ccOverlayDialog.h
+++ b/libs/CCPluginAPI/include/ccOverlayDialog.h
@@ -65,7 +65,7 @@ public:
//! Returns whether the tool is currently started or not
bool started() const { return m_processing; }
-signals:
+Q_SIGNALS:
//! Signal emitted when process is finished
/** \param accepted specifies how the process finished (accepted or not)
diff --git a/libs/qCC_glWindow/include/ccGLWindow.h b/libs/qCC_glWindow/include/ccGLWindow.h
index 60cbb24c..2fad5447 100644
--- a/libs/qCC_glWindow/include/ccGLWindow.h
+++ b/libs/qCC_glWindow/include/ccGLWindow.h
@@ -666,7 +666,7 @@ protected:
//! Performs standard picking at the last clicked mouse position (see m_lastMousePos)
void doPicking();
-signals:
+Q_SIGNALS:
//! Signal emitted when an entity is selected in the 3D view
void entitySelectionChanged(ccHObject* entity);
diff --git a/libs/qCC_io/include/PlyOpenDlg.h b/libs/qCC_io/include/PlyOpenDlg.h
index 8713c390..857ea584 100644
--- a/libs/qCC_io/include/PlyOpenDlg.h
+++ b/libs/qCC_io/include/PlyOpenDlg.h
@@ -76,7 +76,7 @@ protected:
void apply();
void applyAll();
-signals:
+Q_SIGNALS:
void fullyAccepted();
protected:
diff --git a/plugins/core/Standard/qPCL/PclUtils/filters/BaseFilter.h b/plugins/core/Standard/qPCL/PclUtils/filters/BaseFilter.h
index de396a18..6f32870f 100644
--- a/plugins/core/Standard/qPCL/PclUtils/filters/BaseFilter.h
+++ b/plugins/core/Standard/qPCL/PclUtils/filters/BaseFilter.h
@@ -132,7 +132,7 @@ public: //default error codes (reserved between -10 and 1)
static constexpr int ComputationError = -4; //!< Generic computation error
static constexpr int NotEnoughMemory = -5; //!< Not enough memory
-signals:
+Q_SIGNALS:
//! Signal emitted when an entity is (visually) modified
void entityHasChanged(ccHObject*);
--
2.36.1
From ae018d677ef88008b2368a5b44bf97556c09a974 Mon Sep 17 00:00:00 2001
From: bartus <szczepaniak.bartek+github@gmail.com>
Date: Sat, 25 Jun 2022 15:41:40 +0200
Subject: [PATCH 10/13] Replace emit() with Q_EMIT() for QT_NO_KEYWORDS
---
.../devices/3dConnexion/Mouse3DInput.cpp | 12 +-
.../devices/gamepad/GamepadInput.cpp | 2 +-
libs/CCAppCommon/src/ccDisplayOptionsDlg.cpp | 4 +-
.../src/ccColorScaleEditorWidget.cpp | 12 +-
libs/CCPluginAPI/src/ccColorScaleSelector.cpp | 2 +-
libs/CCPluginAPI/src/ccOverlayDialog.cpp | 6 +-
libs/qCC_glWindow/src/ccGLWindow.cpp | 72 +++---
libs/qCC_io/src/PlyOpenDlg.cpp | 4 +-
.../qCloudLayers/src/ccAsprsModel.cpp | 10 +-
.../qPCL/PclUtils/filters/BaseFilter.cpp | 2 +-
.../qPCL/PclUtils/filters/ExtractSIFT.cpp | 2 +-
.../filters/FastGlobalRegistrationFilter.cpp | 2 +-
.../filters/MLSSmoothingUpsampling.cpp | 2 +-
.../PclUtils/filters/NormalEstimation.cpp | 2 +-
.../filters/StatisticalOutliersRemover.cpp | 2 +-
qCC/ccHistogramWindow.cpp | 8 +-
qCC/ccPointPropertiesDlg.cpp | 2 +-
qCC/db_tree/ccDBRoot.cpp | 18 +-
qCC/db_tree/ccPropertiesTreeDelegate.cpp | 10 +-
qCC/db_tree/sfEditDlg.cpp | 24 +-
qCC/extern/QCustomPlot/qcustomplot.cpp | 210 +++++++++---------
21 files changed, 204 insertions(+), 204 deletions(-)
diff --git a/libs/CCAppCommon/devices/3dConnexion/Mouse3DInput.cpp b/libs/CCAppCommon/devices/3dConnexion/Mouse3DInput.cpp
index f32ca1ef..8e8cb1be 100644
--- a/libs/CCAppCommon/devices/3dConnexion/Mouse3DInput.cpp
+++ b/libs/CCAppCommon/devices/3dConnexion/Mouse3DInput.cpp
@@ -220,7 +220,7 @@ bool Mouse3DInput::onSiEvent(void* siGetEventData)
case SI_ZERO_EVENT:
//FIXME: too flickery!
- emit sigReleased();
+ Q_EMIT sigReleased();
break;
case SI_BUTTON_EVENT:
@@ -271,27 +271,27 @@ bool Mouse3DInput::onSiEvent(void* siGetEventData)
void Mouse3DInput::move3d(std::vector<float>& motionData)
{
- emit sigMove3d(motionData);
+ Q_EMIT sigMove3d(motionData);
}
void Mouse3DInput::on3dmouseKeyDown(int virtualKeyCode)
{
- emit sigOn3dmouseKeyDown(virtualKeyCode);
+ Q_EMIT sigOn3dmouseKeyDown(virtualKeyCode);
}
void Mouse3DInput::on3dmouseCMDKeyDown(int virtualCMDCode)
{
- emit sigOn3dmouseCMDKeyDown(virtualCMDCode);
+ Q_EMIT sigOn3dmouseCMDKeyDown(virtualCMDCode);
}
void Mouse3DInput::on3dmouseKeyUp(int virtualKeyCode)
{
- emit sigOn3dmouseKeyUp(virtualKeyCode);
+ Q_EMIT sigOn3dmouseKeyUp(virtualKeyCode);
}
void Mouse3DInput::on3dmouseCMDKeyUp(int virtualCMDCode)
{
- emit sigOn3dmouseCMDKeyUp(virtualCMDCode);
+ Q_EMIT sigOn3dmouseCMDKeyUp(virtualCMDCode);
}
void Mouse3DInput::GetMatrix(const std::vector<float>& vec, ccGLMatrixd& mat)
diff --git a/libs/CCAppCommon/devices/gamepad/GamepadInput.cpp b/libs/CCAppCommon/devices/gamepad/GamepadInput.cpp
index 49c3e989..b92638fd 100644
--- a/libs/CCAppCommon/devices/gamepad/GamepadInput.cpp
+++ b/libs/CCAppCommon/devices/gamepad/GamepadInput.cpp
@@ -164,6 +164,6 @@ void GamepadInput::updateInternalState()
if (m_hasRotation || m_hasPanning || m_hasTranslation || m_zoom != 0)
{
- emit updated();
+ Q_EMIT updated();
}
}
diff --git a/libs/CCAppCommon/src/ccDisplayOptionsDlg.cpp b/libs/CCAppCommon/src/ccDisplayOptionsDlg.cpp
index e800f244..93370aee 100644
--- a/libs/CCAppCommon/src/ccDisplayOptionsDlg.cpp
+++ b/libs/CCAppCommon/src/ccDisplayOptionsDlg.cpp
@@ -441,7 +441,7 @@ void ccDisplayOptionsDlg::doReject()
ccGui::Set(m_oldParameters);
ccOptions::Set(m_oldOptions);
- emit aspectHasChanged();
+ Q_EMIT aspectHasChanged();
reject();
}
@@ -466,7 +466,7 @@ void ccDisplayOptionsDlg::apply()
ccApp->setAppStyle(style);
}
- emit aspectHasChanged();
+ Q_EMIT aspectHasChanged();
}
void ccDisplayOptionsDlg::doAccept()
diff --git a/libs/CCPluginAPI/src/ccColorScaleEditorWidget.cpp b/libs/CCPluginAPI/src/ccColorScaleEditorWidget.cpp
index 2490e648..8bdb6985 100644
--- a/libs/CCPluginAPI/src/ccColorScaleEditorWidget.cpp
+++ b/libs/CCPluginAPI/src/ccColorScaleEditorWidget.cpp
@@ -179,7 +179,7 @@ void ColorBarWidget::mousePressEvent(QMouseEvent* e)
relativePos = static_cast<double>(e->pos().y() - contentRect.top()) / contentRect.height();
}
- emit pointClicked(relativePos);
+ Q_EMIT pointClicked(relativePos);
e->accept();
return;
}
@@ -292,7 +292,7 @@ void SlidersWidget::select(int index, bool silent/*=false*/)
m_sliders->element(index)->setSelected(true);
if (!silent)
- emit sliderSelected(index);
+ Q_EMIT sliderSelected(index);
}
ColorScaleElementSlider* SlidersWidget::addNewSlider(double relativePos, QColor color)
@@ -417,7 +417,7 @@ void SlidersWidget::mouseMoveEvent(QMouseEvent* e)
m_sliders->sort();
- emit sliderModified(activeSliderIndex);
+ Q_EMIT sliderModified(activeSliderIndex);
e->accept();
@@ -449,7 +449,7 @@ void SlidersWidget::mouseDoubleClickEvent(QMouseEvent* e)
if (newColor.isValid() && newColor != slider->getColor())
{
slider->setColor(newColor);
- emit sliderModified(i);
+ Q_EMIT sliderModified(i);
}
break;
@@ -659,7 +659,7 @@ void ccColorScaleEditorWidget::onSliderModified(int sliderIndex)
if (m_labelsWidget)
m_labelsWidget->update();
- emit stepModified(sliderIndex);
+ Q_EMIT stepModified(sliderIndex);
}
void ccColorScaleEditorWidget::setSliders(SharedColorScaleElementSliders sliders)
@@ -685,7 +685,7 @@ void ccColorScaleEditorWidget::onSliderSelected(int sliderIndex)
if (m_slidersWidget)
m_slidersWidget->update();
- emit stepSelected(sliderIndex);
+ Q_EMIT stepSelected(sliderIndex);
}
void ccColorScaleEditorWidget::importColorScale(ccColorScale::Shared scale)
diff --git a/libs/CCPluginAPI/src/ccColorScaleSelector.cpp b/libs/CCPluginAPI/src/ccColorScaleSelector.cpp
index 905ce589..8b493519 100644
--- a/libs/CCPluginAPI/src/ccColorScaleSelector.cpp
+++ b/libs/CCPluginAPI/src/ccColorScaleSelector.cpp
@@ -112,5 +112,5 @@ void ccColorScaleSelector::setSelectedScale(QString uuid)
return;
m_comboBox->setCurrentIndex(pos);
- emit colorScaleSelected(pos);
+ Q_EMIT colorScaleSelected(pos);
}
diff --git a/libs/CCPluginAPI/src/ccOverlayDialog.cpp b/libs/CCPluginAPI/src/ccOverlayDialog.cpp
index 4aea0aae..2f7e5ff2 100644
--- a/libs/CCPluginAPI/src/ccOverlayDialog.cpp
+++ b/libs/CCPluginAPI/src/ccOverlayDialog.cpp
@@ -115,7 +115,7 @@ void ccOverlayDialog::stop(bool accepted)
linkWith(nullptr);
- emit processFinished(accepted);
+ Q_EMIT processFinished(accepted);
}
void ccOverlayDialog::reject()
@@ -138,7 +138,7 @@ bool ccOverlayDialog::eventFilter(QObject *obj, QEvent *e)
if (m_overriddenKeys.contains(keyEvent->key()))
{
- emit shortcutTriggered(keyEvent->key());
+ Q_EMIT shortcutTriggered(keyEvent->key());
return true;
}
else
@@ -150,7 +150,7 @@ bool ccOverlayDialog::eventFilter(QObject *obj, QEvent *e)
{
if (e->type() == QEvent::Show)
{
- emit shown();
+ Q_EMIT shown();
}
// standard event processing
diff --git a/libs/qCC_glWindow/src/ccGLWindow.cpp b/libs/qCC_glWindow/src/ccGLWindow.cpp
index 6a561107..c6a2cc35 100644
--- a/libs/qCC_glWindow/src/ccGLWindow.cpp
+++ b/libs/qCC_glWindow/src/ccGLWindow.cpp
@@ -814,7 +814,7 @@ bool ccGLWindow::initialize()
glFunc->glLoadIdentity();
//we emit the 'baseViewMatChanged' signal
- emit baseViewMatChanged(m_viewportParams.viewMat);
+ Q_EMIT baseViewMatChanged(m_viewportParams.viewMat);
//set viewport and visu. as invalid
invalidateViewport();
@@ -1126,7 +1126,7 @@ bool ccGLWindow::event(QEvent* evt)
float pseudo_wheelDelta_deg = dist < m_touchBaseDist ? -15.0f : 15.0f;
onWheelEvent(pseudo_wheelDelta_deg);
- emit mouseWheelRotated(pseudo_wheelDelta_deg);
+ Q_EMIT mouseWheelRotated(pseudo_wheelDelta_deg);
}
m_touchBaseDist = dist;
evt->accept();
@@ -2499,7 +2499,7 @@ void ccGLWindow::draw3D(CC_DRAW_CONTEXT& CONTEXT, RenderingParams& renderingPara
//for connected items
if (m_currentLODState.level == 0)
{
- emit drawing3D();
+ Q_EMIT drawing3D();
}
//update LOD information
@@ -2802,7 +2802,7 @@ void ccGLWindow::dropEvent(QDropEvent *event)
if (!fileNames.empty())
{
- emit filesDropped(fileNames);
+ Q_EMIT filesDropped(fileNames);
}
event->acceptProposedAction();
@@ -2997,7 +2997,7 @@ void ccGLWindow::setFocalDistance(double focalDistance)
if (m_viewportParams.objectCenteredView)
{
- emit cameraPosChanged(m_viewportParams.getCameraCenter());
+ Q_EMIT cameraPosChanged(m_viewportParams.getCameraCenter());
}
invalidateViewport();
@@ -3014,7 +3014,7 @@ void ccGLWindow::setCameraPos(const CCVector3d& P)
//ccLog::Print(QString("[ccGLWindow] Focal distance = %1").arg(m_viewportParams.getFocalDistance()));
- emit cameraPosChanged(P);
+ Q_EMIT cameraPosChanged(P);
invalidateViewport();
invalidateVisualization();
@@ -3055,7 +3055,7 @@ void ccGLWindow::setPivotPoint( const CCVector3d& P,
}
m_viewportParams.setPivotPoint(P, true);
- emit pivotPointChanged(P);
+ Q_EMIT pivotPointChanged(P);
if (verbose)
{
@@ -3544,7 +3544,7 @@ void ccGLWindow::setBaseViewMat(ccGLMatrixd& mat)
invalidateVisualization();
//we emit the 'baseViewMatChanged' signal
- emit baseViewMatChanged(m_viewportParams.viewMat);
+ Q_EMIT baseViewMatChanged(m_viewportParams.viewMat);
}
void ccGLWindow::getGLCameraParameters(ccGLCameraParameters& params)
@@ -3855,7 +3855,7 @@ void ccGLWindow::onItemPickedFast(ccHObject* pickedEntity, int pickedItemIndex,
}
}
- emit fastPickingFinished();
+ Q_EMIT fastPickingFinished();
}
void ccGLWindow::mousePressEvent(QMouseEvent *event)
@@ -3881,7 +3881,7 @@ void ccGLWindow::mousePressEvent(QMouseEvent *event)
if (m_interactionFlags & INTERACT_SIG_RB_CLICKED)
{
- emit rightButtonClicked(event->x(), event->y());
+ Q_EMIT rightButtonClicked(event->x(), event->y());
}
}
else if (event->buttons() & Qt::LeftButton)
@@ -3896,7 +3896,7 @@ void ccGLWindow::mousePressEvent(QMouseEvent *event)
if (m_interactionFlags & INTERACT_SIG_LB_CLICKED)
{
- emit leftButtonClicked(event->x(), event->y());
+ Q_EMIT leftButtonClicked(event->x(), event->y());
}
}
if (event->buttons() & Qt::MiddleButton)
@@ -3904,7 +3904,7 @@ void ccGLWindow::mousePressEvent(QMouseEvent *event)
//middle click = zooming
if (m_interactionFlags & INTERACT_SIG_MB_CLICKED)
{
- emit middleButtonClicked(event->x(), event->y());
+ Q_EMIT middleButtonClicked(event->x(), event->y());
}
}
else
@@ -3956,7 +3956,7 @@ void ccGLWindow::mouseMoveEvent(QMouseEvent *event)
if (m_interactionFlags & INTERACT_SIG_MOUSE_MOVED)
{
- emit mouseMoved(x, y, event->buttons());
+ Q_EMIT mouseMoved(x, y, event->buttons());
event->accept();
}
@@ -4030,7 +4030,7 @@ void ccGLWindow::mouseMoveEvent(QMouseEvent *event)
if (m_interactionFlags & INTERACT_TRANSFORM_ENTITIES)
{
- emit translation(u);
+ Q_EMIT translation(u);
}
else if (m_customLightEnabled)
{
@@ -4309,7 +4309,7 @@ void ccGLWindow::mouseMoveEvent(QMouseEvent *event)
rotMat = m_viewportParams.viewMat.transposed() * rotMat * m_viewportParams.viewMat;
//feedback for 'interactive transformation' mode
- emit rotation(rotMat);
+ Q_EMIT rotation(rotMat);
}
else
{
@@ -4319,7 +4319,7 @@ void ccGLWindow::mouseMoveEvent(QMouseEvent *event)
QApplication::changeOverrideCursor(QCursor(Qt::ClosedHandCursor));