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
|
--- /dev/null 2018-11-10 15:32:26.332997437 +1100
+++ rstudio-1.1.463/src/cpp/core/include/core/BoostSignals.hpp 2018-11-17 21:24:35.285976284 +1100
@@ -0,0 +1,40 @@
+/*
+ * BoostSignals.hpp
+ *
+ * Copyright (C) 2009-18 by RStudio, Inc.
+ *
+ * Unless you have received this program directly from RStudio pursuant
+ * to the terms of a commercial license agreement with RStudio, then
+ * this program is licensed to you under the terms of version 3 of the
+ * GNU Affero General Public License. This program is distributed WITHOUT
+ * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
+ * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
+ *
+ */
+
+#ifndef CORE_RSTUDIO_BOOST_SIGNALS_HPP
+#define CORE_RSTUDIO_BOOST_SIGNALS_HPP
+
+#if RSTUDIO_BOOST_SIGNALS_VERSION == 1
+
+# include <boost/signals.hpp>
+# define RSTUDIO_BOOST_SIGNAL boost::signal
+# define RSTUDIO_BOOST_CONNECTION boost::signals::connection
+# define RSTUDIO_BOOST_SCOPED_CONNECTION boost::signals::scoped_connection
+# define RSTUDIO_BOOST_LAST_VALUE boost::last_value
+
+#elif RSTUDIO_BOOST_SIGNALS_VERSION == 2
+
+# include <boost/signals2.hpp>
+# define RSTUDIO_BOOST_SIGNAL boost::signals2::signal
+# define RSTUDIO_BOOST_CONNECTION boost::signals2::connection
+# define RSTUDIO_BOOST_SCOPED_CONNECTION boost::signals2::scoped_connection
+# define RSTUDIO_BOOST_LAST_VALUE boost::signals2::last_value
+
+#else
+# error "Unrecognized RSTUDIO_BOOST_SIGNALS_VERSION"
+#endif
+
+#endif // CORE_RSTUDIO_BOOST_SIGNALS_HPP
+
--- rstudio-1.1.463-orig/src/cpp/CMakeLists.txt 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/CMakeLists.txt 2018-11-17 21:24:35.285976284 +1100
@@ -208,6 +208,18 @@
message(STATUS "Using RStudio-provided Boost ${BOOST_VERSION}")
endif()
+# allow opt-in to using Boost.Signals2
+# TODO: remove this in RStudio v1.3 and port to signals2
+if(NOT RSTUDIO_BOOST_SIGNALS_VERSION)
+ if (BOOST_VERSION VERSION_LESS 1.69.0)
+ set(RSTUDIO_BOOST_SIGNALS_VERSION 1)
+ else()
+ set(RSTUDIO_BOOST_SIGNALS_VERSION 2)
+ endif()
+endif()
+
+message(STATUS "Using Booost.Signals version ${RSTUDIO_BOOST_SIGNALS_VERSION}")
+add_definitions(-DRSTUDIO_BOOST_SIGNALS_VERSION=${RSTUDIO_BOOST_SIGNALS_VERSION})
# add boost as system include directory
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
--- rstudio-1.1.463-orig/src/cpp/r/include/r/session/RConsoleHistory.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/r/include/r/session/RConsoleHistory.hpp 2018-11-17 21:24:35.285976284 +1100
@@ -20,8 +20,8 @@
#include <boost/utility.hpp>
#include <boost/circular_buffer.hpp>
-#include <boost/signal.hpp>
+#include <core/BoostSignals.hpp>
#include <core/json/Json.hpp>
namespace rstudio {
@@ -44,7 +44,7 @@
public:
typedef boost::circular_buffer<std::string>::value_type value_type;
typedef boost::circular_buffer<std::string>::const_iterator const_iterator;
- typedef boost::signal<void (const std::string&)> AddSignal;
+ typedef RSTUDIO_BOOST_SIGNAL<void (const std::string&)> AddSignal;
private:
ConsoleHistory();
@@ -86,8 +86,7 @@
core::Error loadFromFile(const core::FilePath& filePath, bool verifyFile);
core::Error saveToFile(const core::FilePath& filePath) const;
- boost::signals::connection connectOnAdd(
- const AddSignal::slot_function_type& slot)
+ RSTUDIO_BOOST_CONNECTION connectOnAdd(const AddSignal::slot_function_type& slot)
{
return onAdd_.connect(slot);
}
--- rstudio-1.1.463-orig/src/cpp/r/include/r/session/RGraphics.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/r/include/r/session/RGraphics.hpp 2018-11-17 21:24:35.286976293 +1100
@@ -19,6 +19,8 @@
#include <boost/system/error_code.hpp>
#include <boost/date_time/posix_time/ptime.hpp>
+#include <core/BoostSignals.hpp>
+
namespace rstudio {
namespace r {
namespace session {
@@ -56,8 +58,8 @@
#include <vector>
#include <boost/function.hpp>
-#include <boost/signal.hpp>
+#include <core/BoostSignals.hpp>
#include <core/Error.hpp>
#include <core/json/Json.hpp>
@@ -162,7 +164,7 @@
virtual void clear() = 0;
// subscribe to showManipulator event
- virtual boost::signal<void ()>& onShowManipulator() = 0;
+ virtual RSTUDIO_BOOST_SIGNAL<void ()>& onShowManipulator() = 0;
// set manipulator values
virtual void setPlotManipulatorValues(const core::json::Object& values) = 0;
--- rstudio-1.1.463-orig/src/cpp/r/session/graphics/RGraphicsPlotManager.cpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/r/session/graphics/RGraphicsPlotManager.cpp 2018-11-17 21:24:35.286976293 +1100
@@ -540,7 +540,7 @@
-boost::signal<void ()>& PlotManager::onShowManipulator()
+RSTUDIO_BOOST_SIGNAL<void ()>& PlotManager::onShowManipulator()
{
return plotManipulatorManager().onShowManipulator();
}
--- rstudio-1.1.463-orig/src/cpp/r/session/graphics/RGraphicsPlotManager.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/r/session/graphics/RGraphicsPlotManager.hpp 2018-11-17 21:24:35.287976303 +1100
@@ -22,10 +22,10 @@
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
-#include <boost/signal.hpp>
#include <boost/regex.hpp>
#include <boost/circular_buffer.hpp>
+#include <core/BoostSignals.hpp>
#include <core/Error.hpp>
#include <core/FilePath.hpp>
@@ -45,10 +45,10 @@
struct GraphicsDeviceEvents
{
- boost::signal<void (SEXP)> onNewPage;
- boost::signal<void ()> onDrawing;
- boost::signal<void ()> onResized;
- boost::signal<void ()> onClosed;
+ RSTUDIO_BOOST_SIGNAL<void (SEXP)> onNewPage;
+ RSTUDIO_BOOST_SIGNAL<void ()> onDrawing;
+ RSTUDIO_BOOST_SIGNAL<void ()> onResized;
+ RSTUDIO_BOOST_SIGNAL<void ()> onClosed;
};
class PlotManipulatorManager;
@@ -110,7 +110,7 @@
virtual void clear();
- virtual boost::signal<void ()>& onShowManipulator() ;
+ virtual RSTUDIO_BOOST_SIGNAL<void ()>& onShowManipulator() ;
virtual void setPlotManipulatorValues(const core::json::Object& values);
virtual void manipulatorPlotClicked(int x, int y);
--- rstudio-1.1.463-orig/src/cpp/r/session/graphics/RGraphicsPlotManipulatorManager.cpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/r/session/graphics/RGraphicsPlotManipulatorManager.cpp 2018-11-17 21:24:35.287976303 +1100
@@ -184,7 +184,7 @@
}
-boost::signal<void ()>& PlotManipulatorManager::onShowManipulator()
+RSTUDIO_BOOST_SIGNAL<void ()>& PlotManipulatorManager::onShowManipulator()
{
return onShowManipulator_;
}
--- rstudio-1.1.463-orig/src/cpp/r/session/graphics/RGraphicsPlotManipulatorManager.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/r/session/graphics/RGraphicsPlotManipulatorManager.hpp 2018-11-17 21:24:35.287976303 +1100
@@ -16,8 +16,7 @@
#ifndef R_SESSION_GRAPHICS_PLOT_MANIPULATOR_MANAGER_HPP
#define R_SESSION_GRAPHICS_PLOT_MANIPULATOR_MANAGER_HPP
-#include <boost/signal.hpp>
-
+#include <core/BoostSignals.hpp>
#include <core/Error.hpp>
#include <core/json/Json.hpp>
@@ -53,7 +52,7 @@
public:
core::Error initialize(const UnitConversionFunctions& convert);
- boost::signal<void ()>& onShowManipulator() ;
+ RSTUDIO_BOOST_SIGNAL<void ()>& onShowManipulator() ;
void setPlotManipulatorValues(const core::json::Object& values);
void manipulatorPlotClicked(int x, int y);
@@ -85,7 +84,7 @@
bool replayingManipulator_;
// manipulator event hook
- boost::signal<void ()> onShowManipulator_;
+ RSTUDIO_BOOST_SIGNAL<void ()> onShowManipulator_;
// unit conversion function
UnitConversionFunctions convert_;
--- rstudio-1.1.463-orig/src/cpp/server/include/server/ServerSessionManager.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/server/include/server/ServerSessionManager.hpp 2018-11-17 21:27:05.255436316 +1100
@@ -20,9 +20,9 @@
#include <vector>
#include <map>
-#include <boost/signals.hpp>
#include <boost/asio/io_service.hpp>
+#include <core/BoostSignals.hpp>
#include <core/Thread.hpp>
#include <core/system/PosixSystem.hpp>
--- rstudio-1.1.463-orig/src/cpp/session/SessionMain.cpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/SessionMain.cpp 2018-11-17 21:24:35.288976313 +1100
@@ -33,12 +33,12 @@
#include <boost/lexical_cast.hpp>
#include <boost/format.hpp>
-#include <boost/signals.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/join.hpp>
#include <core/Error.hpp>
+#include <core/BoostSignals.hpp>
#include <core/BoostThread.hpp>
#include <core/ConfigUtils.hpp>
#include <core/FilePath.hpp>
--- rstudio-1.1.463-orig/src/cpp/session/SessionModuleContext.cpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/SessionModuleContext.cpp 2018-11-17 21:24:35.289976322 +1100
@@ -19,10 +19,10 @@
#include <boost/assert.hpp>
#include <boost/utility.hpp>
-#include <boost/signal.hpp>
#include <boost/format.hpp>
#include <boost/numeric/conversion/cast.hpp>
+#include <core/BoostSignals.hpp>
#include <core/BoostThread.hpp>
#include <core/Error.hpp>
#include <core/FilePath.hpp>
@@ -586,13 +586,13 @@
int nextGroup_;
- boost::signal<void(const r::session::RSuspendOptions&,Settings*),
- boost::last_value<void>,
+ RSTUDIO_BOOST_SIGNAL<void(const r::session::RSuspendOptions&,Settings*),
+ RSTUDIO_BOOST_LAST_VALUE<void>,
int,
std::less<int> > suspendSignal_;
- boost::signal<void(const Settings&),
- boost::last_value<void>,
+ RSTUDIO_BOOST_SIGNAL<void(const Settings&),
+ RSTUDIO_BOOST_LAST_VALUE<void>,
int,
std::greater<int> > resumeSignal_;
};
--- rstudio-1.1.463-orig/src/cpp/session/include/session/SessionConsoleProcess.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/include/session/SessionConsoleProcess.hpp 2018-11-17 21:24:35.290976332 +1100
@@ -20,10 +20,10 @@
#include <deque>
#include <boost/regex.hpp>
-#include <boost/signals.hpp>
#include <boost/circular_buffer.hpp>
#include <boost/enable_shared_from_this.hpp>
+#include <core/BoostSignals.hpp>
#include <core/system/Process.hpp>
#include <core/terminal/PrivateCommand.hpp>
@@ -146,7 +146,7 @@
void setPromptHandler(
const boost::function<bool(const std::string&, Input*)>& onPrompt);
- boost::signal<void(int)>& onExit() { return onExit_; }
+ RSTUDIO_BOOST_SIGNAL<void(int)>& onExit() { return onExit_; }
std::string handle() const { return procInfo_->getHandle(); }
InteractionMode interactionMode() const { return procInfo_->getInteractionMode(); }
@@ -264,7 +264,7 @@
boost::mutex inputOutputQueueMutex_;
boost::function<bool(const std::string&, Input*)> onPrompt_;
- boost::signal<void(int)> onExit_;
+ RSTUDIO_BOOST_SIGNAL<void(int)> onExit_;
// regex for prompt detection
boost::regex controlCharsPattern_;
--- rstudio-1.1.463-orig/src/cpp/session/include/session/SessionModuleContext.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/include/session/SessionModuleContext.hpp 2018-11-17 21:28:25.019212857 +1100
@@ -21,9 +21,9 @@
#include <boost/utility.hpp>
#include <boost/function.hpp>
-#include <boost/signals.hpp>
#include <boost/shared_ptr.hpp>
+#include <core/BoostSignals.hpp>
#include <core/HtmlUtils.hpp>
#include <core/system/System.hpp>
#include <core/system/ShellUtils.hpp>
@@ -315,35 +315,35 @@
// session events
struct Events : boost::noncopyable
{
- boost::signal<void (core::json::Object*)> onSessionInfo;
- boost::signal<void ()> onClientInit;
- boost::signal<void ()> onBeforeExecute;
- boost::signal<void(const std::string&)> onConsolePrompt;
- boost::signal<void(const std::string&)> onConsoleInput;
- boost::signal<void(const std::string&, const std::string&)>
+ RSTUDIO_BOOST_SIGNAL<void (core::json::Object*)> onSessionInfo;
+ RSTUDIO_BOOST_SIGNAL<void ()> onClientInit;
+ RSTUDIO_BOOST_SIGNAL<void ()> onBeforeExecute;
+ RSTUDIO_BOOST_SIGNAL<void(const std::string&)> onConsolePrompt;
+ RSTUDIO_BOOST_SIGNAL<void(const std::string&)> onConsoleInput;
+ RSTUDIO_BOOST_SIGNAL<void(const std::string&, const std::string&)>
onActiveConsoleChanged;
- boost::signal<void (ConsoleOutputType, const std::string&)>
+ RSTUDIO_BOOST_SIGNAL<void (ConsoleOutputType, const std::string&)>
onConsoleOutput;
- boost::signal<void()> onUserInterrupt;
- boost::signal<void (ChangeSource)> onDetectChanges;
- boost::signal<void (core::FilePath)> onSourceEditorFileSaved;
- boost::signal<void(bool)> onDeferredInit;
- boost::signal<void(bool)> afterSessionInitHook;
- boost::signal<void(bool)> onBackgroundProcessing;
- boost::signal<void(bool)> onShutdown;
- boost::signal<void ()> onQuit;
- boost::signal<void ()> onDestroyed;
- boost::signal<void (const std::vector<std::string>&)>
+ RSTUDIO_BOOST_SIGNAL<void()> onUserInterrupt;
+ RSTUDIO_BOOST_SIGNAL<void (ChangeSource)> onDetectChanges;
+ RSTUDIO_BOOST_SIGNAL<void (core::FilePath)> onSourceEditorFileSaved;
+ RSTUDIO_BOOST_SIGNAL<void(bool)> onDeferredInit;
+ RSTUDIO_BOOST_SIGNAL<void(bool)> afterSessionInitHook;
+ RSTUDIO_BOOST_SIGNAL<void(bool)> onBackgroundProcessing;
+ RSTUDIO_BOOST_SIGNAL<void(bool)> onShutdown;
+ RSTUDIO_BOOST_SIGNAL<void ()> onQuit;
+ RSTUDIO_BOOST_SIGNAL<void ()> onDestroyed;
+ RSTUDIO_BOOST_SIGNAL<void (const std::vector<std::string>&)>
onLibPathsChanged;
- boost::signal<void (const std::string&)> onPackageLoaded;
- boost::signal<void ()> onPackageLibraryMutated;
- boost::signal<void ()> onPreferencesSaved;
- boost::signal<void (const core::DistributedEvent&)>
+ RSTUDIO_BOOST_SIGNAL<void (const std::string&)> onPackageLoaded;
+ RSTUDIO_BOOST_SIGNAL<void ()> onPackageLibraryMutated;
+ RSTUDIO_BOOST_SIGNAL<void ()> onPreferencesSaved;
+ RSTUDIO_BOOST_SIGNAL<void (const core::DistributedEvent&)>
onDistributedEvent;
- boost::signal<void (core::FilePath)> onPermissionsChanged;
+ RSTUDIO_BOOST_SIGNAL<void (core::FilePath)> onPermissionsChanged;
// signal for detecting extended type of documents
- boost::signal<std::string(boost::shared_ptr<source_database::SourceDocument>),
+ RSTUDIO_BOOST_SIGNAL<std::string(boost::shared_ptr<source_database::SourceDocument>),
firstNonEmpty<std::string> > onDetectSourceExtendedType;
};
--- rstudio-1.1.463-orig/src/cpp/session/include/session/SessionSourceDatabase.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/include/session/SessionSourceDatabase.hpp 2018-11-17 21:24:35.291976342 +1100
@@ -21,8 +21,8 @@
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
-#include <boost/signals.hpp>
+#include <core/BoostSignals.hpp>
#include <core/FilePath.hpp>
#include <core/json/Json.hpp>
@@ -204,14 +204,14 @@
// source database events
struct Events : boost::noncopyable
{
- boost::signal<void(boost::shared_ptr<SourceDocument>)> onDocUpdated;
- boost::signal<void(const std::string&,
+ RSTUDIO_BOOST_SIGNAL<void(boost::shared_ptr<SourceDocument>)> onDocUpdated;
+ RSTUDIO_BOOST_SIGNAL<void(const std::string&,
boost::shared_ptr<SourceDocument>)> onDocRenamed;
- boost::signal<void(const std::string&)> onDocAdded;
- boost::signal<void(
+ RSTUDIO_BOOST_SIGNAL<void(const std::string&)> onDocAdded;
+ RSTUDIO_BOOST_SIGNAL<void(
boost::shared_ptr<source_database::SourceDocument>)> onDocPendingRemove;
- boost::signal<void(const std::string&, const std::string&)> onDocRemoved;
- boost::signal<void()> onRemoveAll;
+ RSTUDIO_BOOST_SIGNAL<void(const std::string&, const std::string&)> onDocRemoved;
+ RSTUDIO_BOOST_SIGNAL<void()> onRemoveAll;
};
Events& events();
--- rstudio-1.1.463-orig/src/cpp/session/include/session/SessionUserSettings.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/include/session/SessionUserSettings.hpp 2018-11-17 21:24:35.291976342 +1100
@@ -20,8 +20,8 @@
#include <boost/utility.hpp>
#include <boost/scoped_ptr.hpp>
-#include <boost/signal.hpp>
+#include <core/BoostSignals.hpp>
#include <core/Settings.hpp>
#include <core/FilePath.hpp>
#include <core/StringUtils.hpp>
@@ -62,7 +62,7 @@
friend UserSettings& userSettings();
public:
- boost::signal<void()> onChanged;
+ RSTUDIO_BOOST_SIGNAL<void()> onChanged;
public:
// COPYING: boost::noncopyable
--- rstudio-1.1.463-orig/src/cpp/session/include/session/projects/SessionProjects.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/include/session/projects/SessionProjects.hpp 2018-11-17 21:24:35.291976342 +1100
@@ -22,8 +22,8 @@
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/foreach.hpp>
-#include <boost/signals.hpp>
+#include <core/BoostSignals.hpp>
#include <core/FileInfo.hpp>
#include <core/FilePath.hpp>
#include <core/Settings.hpp>
@@ -220,10 +220,10 @@
bool hasFileMonitor_;
std::vector<std::string> monitorSubscribers_;
- boost::signal<void(const tree<core::FileInfo>&)> onMonitoringEnabled_;
- boost::signal<void(const std::vector<core::system::FileChangeEvent>&)>
+ RSTUDIO_BOOST_SIGNAL<void(const tree<core::FileInfo>&)> onMonitoringEnabled_;
+ RSTUDIO_BOOST_SIGNAL<void(const std::vector<core::system::FileChangeEvent>&)>
onFilesChanged_;
- boost::signal<void()> onMonitoringDisabled_;
+ RSTUDIO_BOOST_SIGNAL<void()> onMonitoringDisabled_;
};
ProjectContext& projectContext();
--- rstudio-1.1.463-orig/src/cpp/session/modules/SessionPlots.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/SessionPlots.hpp 2018-11-17 21:24:35.292976352 +1100
@@ -16,7 +16,7 @@
#ifndef SESSION_PLOTS_HPP
#define SESSION_PLOTS_HPP
-#include <boost/signals.hpp>
+#include <core/BoostSignals.hpp>
namespace rstudio {
namespace core {
@@ -35,9 +35,9 @@
struct Events : boost::noncopyable
{
- boost::signal<void()> onBeforeNewPlot;
- boost::signal<void()> onBeforeNewGridPage;
- boost::signal<void()> onNewPlot;
+ RSTUDIO_BOOST_SIGNAL<void()> onBeforeNewPlot;
+ RSTUDIO_BOOST_SIGNAL<void()> onBeforeNewGridPage;
+ RSTUDIO_BOOST_SIGNAL<void()> onNewPlot;
};
Events& events();
--- rstudio-1.1.463-orig/src/cpp/session/modules/build/SessionSourceCpp.cpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/build/SessionSourceCpp.cpp 2018-11-17 21:24:35.293976361 +1100
@@ -15,11 +15,11 @@
#include "SessionSourceCpp.hpp"
-#include <boost/signal.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/join.hpp>
+#include <core/BoostSignals.hpp>
#include <core/Error.hpp>
#include <core/FilePath.hpp>
#include <core/StringUtils.hpp>
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookAlternateEngines.cpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookAlternateEngines.cpp 2018-11-17 21:24:35.294976371 +1100
@@ -142,7 +142,7 @@
LOG_ERROR(error);
// capture console output, error
- boost::signals::scoped_connection consoleHandler =
+ RSTUDIO_BOOST_SCOPED_CONNECTION consoleHandler =
module_context::events().onConsoleOutput.connect(
boost::bind(chunkConsoleOutputHandler,
_1,
@@ -219,7 +219,7 @@
LOG_ERROR(error);
// capture console output, error
- boost::signals::scoped_connection consoleHandler =
+ RSTUDIO_BOOST_SCOPED_CONNECTION consoleHandler =
module_context::events().onConsoleOutput.connect(
boost::bind(chunkConsoleOutputHandler,
_1,
@@ -363,7 +363,7 @@
LOG_ERROR(error);
// capture console output, error
- boost::signals::scoped_connection consoleHandler =
+ RSTUDIO_BOOST_SCOPED_CONNECTION consoleHandler =
module_context::events().onConsoleOutput.connect(
boost::bind(chunkConsoleOutputHandler,
_1,
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookCapture.cpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookCapture.cpp 2018-11-17 21:24:35.294976371 +1100
@@ -16,6 +16,8 @@
#include "SessionRmdNotebook.hpp"
#include "NotebookCapture.hpp"
+#include <boost/make_shared.hpp>
+
namespace rstudio {
namespace session {
namespace modules {
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookExec.cpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookExec.cpp 2018-11-17 21:24:35.295976381 +1100
@@ -441,7 +441,7 @@
}
// unhook all our event handlers
- BOOST_FOREACH(const boost::signals::connection connection, connections_)
+ BOOST_FOREACH(const RSTUDIO_BOOST_CONNECTION connection, connections_)
{
connection.disconnect();
}
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookExec.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookExec.hpp 2018-11-17 21:24:35.295976381 +1100
@@ -18,8 +18,7 @@
#include <session/SessionModuleContext.hpp>
-#include <boost/signal.hpp>
-
+#include <core/BoostSignals.hpp>
#include <core/json/Json.hpp>
#include <r/RSexp.hpp>
@@ -99,7 +98,7 @@
bool hasErrors_;
std::vector<boost::shared_ptr<NotebookCapture> > captures_;
- std::vector<boost::signals::connection> connections_;
+ std::vector<RSTUDIO_BOOST_CONNECTION> connections_;
};
} // namespace notebook
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookPlots.cpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookPlots.cpp 2018-11-17 21:24:35.295976381 +1100
@@ -20,11 +20,12 @@
#include <boost/format.hpp>
#include <boost/foreach.hpp>
-#include <boost/signals/connection.hpp>
-#include <core/system/FileMonitor.hpp>
-#include <core/StringUtils.hpp>
+#include <core/BoostSignals.hpp>
#include <core/Exec.hpp>
+#include <core/StringUtils.hpp>
+
+#include <core/system/FileMonitor.hpp>
#include <session/SessionModuleContext.hpp>
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookPlots.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookPlots.hpp 2018-11-17 21:24:35.296976391 +1100
@@ -18,8 +18,10 @@
#define SESSION_NOTEBOOK_PLOTS_HPP
#include <boost/function.hpp>
-#include <boost/signals/connection.hpp>
+
+#include <core/BoostSignals.hpp>
#include <core/FilePath.hpp>
+
#include <r/RSexp.hpp>
#include "NotebookCapture.hpp"
@@ -80,9 +82,9 @@
unsigned lastOrdinal_;
- boost::signals::connection onBeforeNewPlot_;
- boost::signals::connection onBeforeNewGridPage_;
- boost::signals::connection onNewPlot_;
+ RSTUDIO_BOOST_CONNECTION onBeforeNewPlot_;
+ RSTUDIO_BOOST_CONNECTION onBeforeNewGridPage_;
+ RSTUDIO_BOOST_CONNECTION onNewPlot_;
double width_;
double height_;
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookQueue.cpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookQueue.cpp 2018-11-17 21:24:35.296976391 +1100
@@ -87,7 +87,7 @@
pInput_->enque(kThreadQuitCommand);
// unregister handlers
- BOOST_FOREACH(boost::signals::connection connection, handlers_)
+ BOOST_FOREACH(RSTUDIO_BOOST_CONNECTION connection, handlers_)
{
connection.disconnect();
}
@@ -651,7 +651,7 @@
boost::shared_ptr<ChunkExecContext> execContext_;
// registered signal handlers
- std::vector<boost::signals::connection> handlers_;
+ std::vector<RSTUDIO_BOOST_CONNECTION> handlers_;
// the thread which submits console input, and the queue which feeds it
boost::thread console_;
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/SessionRmdNotebook.hpp 2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/SessionRmdNotebook.hpp 2018-11-17 21:24:35.296976391 +1100
@@ -18,7 +18,8 @@
#define SESSION_RMARKDOWN_NOTEBOOK_HPP
#include <ctime>
-#include <boost/signals.hpp>
+
+#include <core/BoostSignals.hpp>
#include <core/json/Json.hpp>
#define kChunkLibDir "lib"
@@ -76,24 +77,24 @@
struct Events : boost::noncopyable
{
// Document {0}, chunk {1} from context id {3} execution completed
- boost::signal<void(const std::string&, const std::string&,
+ RSTUDIO_BOOST_SIGNAL<void(const std::string&, const std::string&,
const std::string&)>
onChunkExecCompleted;
// Document {0}, chunk {1} had console output of type {2} and text {3}
- boost::signal<void(const std::string&, const std::string&, int,
+ RSTUDIO_BOOST_SIGNAL<void(const std::string&, const std::string&, int,
const std::string&)>
onChunkConsoleOutput;
- boost::signal<void(const core::FilePath&, const core::FilePath&,
+ RSTUDIO_BOOST_SIGNAL<void(const core::FilePath&, const core::FilePath&,
const core::json::Value& metadata, unsigned ordinal)>
onPlotOutput;
- boost::signal<void(const core::FilePath&, const core::FilePath&,
+ RSTUDIO_BOOST_SIGNAL<void(const core::FilePath&, const core::FilePath&,
const core::json::Value& metadata)> onHtmlOutput;
- boost::signal<void(const core::json::Object&)> onErrorOutput;
- boost::signal<void(const core::FilePath&, const core::FilePath&,
+ RSTUDIO_BOOST_SIGNAL<void(const core::json::Object&)> onErrorOutput;
+ RSTUDIO_BOOST_SIGNAL<void(const core::FilePath&, const core::FilePath&,
const core::json::Value& metadata)> onDataOutput;
- boost::signal<void(Condition condition, const std::string& message)>
+ RSTUDIO_BOOST_SIGNAL<void(Condition condition, const std::string& message)>
onCondition;
};
|