widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #01495
[Merge] lp:~widelands-dev/widelands/boost-signals2 into lp:widelands
Jens Beyer (Qcumber-some) has proposed merging lp:~widelands-dev/widelands/boost-signals2 into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1201081 in widelands: "Building with boost 1.54: "Boost.Signals is no longer being maintained and is now deprecated. Please switch to Boost.Signals2.""
https://bugs.launchpad.net/widelands/+bug/1201081
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/boost-signals2/+merge/178361
Just for the kicks of it, I ported to (what I think is) boost signals2 ;-)
It compiles and runs fine on Ubuntu 12.04 LTS (with boost 1.46.1).
I also set boost 1.46.1 as minimum required boost version just to make sure, but I am open to set it to 1.39 as this is the version of the last stable API (as hjd says).
--
https://code.launchpad.net/~widelands-dev/widelands/boost-signals2/+merge/178361
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/boost-signals2 into lp:widelands.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-07-23 18:09:24 +0000
+++ CMakeLists.txt 2013-08-02 18:49:35 +0000
@@ -117,7 +117,7 @@
set (Boost_FIND_COMPONENTS unit_test_framework signals)
set (Boost_USE_MULTITHREADED ON)
set (Boost_DETAILED_FAILURE_MSG ON)
- find_package(Boost 1.35.0 COMPONENTS unit_test_framework signals REQUIRED)
+ find_package(Boost 1.46.1 COMPONENTS unit_test_framework signals REQUIRED)
if (NOT DEFINED MSVC)
# If boost unit test library is linked dynamically, BOOST_TEST_DYN_LINK must be defined
@@ -150,7 +150,7 @@
endif(DEFINED MSVC)
set (Boost_USE_MULTITHREADED ON)
set (Boost_DETAILED_FAILURE_MSG ON)
- find_package(Boost 1.35.0 COMPONENTS signals REQUIRED)
+ find_package(Boost 1.46.1 COMPONENTS signals REQUIRED)
endif (WL_UNIT_TESTS)
option (WL_STRICT "If strict compilation mode is requested (almost every warning is an error)" OFF)
=== modified file 'src/game_io/game_loader.cc'
--- src/game_io/game_loader.cc 2013-07-27 15:09:18 +0000
+++ src/game_io/game_loader.cc 2013-08-02 18:49:35 +0000
@@ -20,7 +20,7 @@
#include "game_io/game_loader.h"
#include <boost/bind.hpp>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "game_io/game_cmd_queue_data_packet.h"
#include "game_io/game_game_class_data_packet.h"
=== modified file 'src/logic/building.cc'
--- src/logic/building.cc 2013-07-27 10:37:24 +0000
+++ src/logic/building.cc 2013-08-02 18:49:35 +0000
@@ -448,7 +448,7 @@
PlayerImmovable::cleanup(egbase);
- BOOST_FOREACH(boost::signals::connection& c, options_window_connections)
+ BOOST_FOREACH(boost::signals2::connection& c, options_window_connections)
c.disconnect();
}
=== modified file 'src/logic/building.h'
--- src/logic/building.h 2013-07-26 20:19:36 +0000
+++ src/logic/building.h 2013-08-02 18:49:35 +0000
@@ -24,7 +24,7 @@
#include <string>
#include <vector>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "ai/ai_hints.h"
#include "logic/buildcost.h"
@@ -261,7 +261,7 @@
void add_worker(Worker &);
void remove_worker(Worker &);
- mutable boost::signal<void ()> workers_changed;
+ mutable boost::signals2::signal<void ()> workers_changed;
void send_message
(Game & game,
@@ -308,7 +308,7 @@
bool m_seeing;
// Signals connected for the option window
- std::vector<boost::signals::connection> options_window_connections;
+ std::vector<boost::signals2::connection> options_window_connections;
// The former buildings descrs, with the current one in last position.
FormerBuildings m_old_buildings;
=== modified file 'src/logic/instances.h'
--- src/logic/instances.h 2013-07-27 15:09:18 +0000
+++ src/logic/instances.h 2013-08-02 18:49:35 +0000
@@ -28,7 +28,7 @@
#include <boost/function.hpp>
#include <boost/noncopyable.hpp>
#include <boost/unordered_map.hpp>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "logic/cmd_queue.h"
#include "log.h"
@@ -202,7 +202,7 @@
* the game. No conncetion is handled in this class.
* \param serial : the object serial
*/
- boost::signal<void(uint32_t)> removed;
+ boost::signals2::signal<void(uint32_t)> removed;
/**
* Attributes are fixed boolean properties of an object.
=== modified file 'src/logic/message.h'
--- src/logic/message.h 2013-07-27 15:09:18 +0000
+++ src/logic/message.h 2013-08-02 18:49:35 +0000
@@ -21,7 +21,7 @@
#define MESSAGE_H
#include <string>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "logic/widelands.h"
#include "logic/widelands_geometry.h"
=== modified file 'src/logic/player.cc'
--- src/logic/player.cc 2013-08-01 08:33:15 +0000
+++ src/logic/player.cc 2013-08-02 18:49:35 +0000
@@ -20,7 +20,7 @@
#include "logic/player.h"
#include <boost/bind.hpp>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "economy/economy.h"
#include "economy/flag.h"
=== modified file 'src/logic/warelist.h'
--- src/logic/warelist.h 2013-07-26 20:19:36 +0000
+++ src/logic/warelist.h 2013-08-02 18:49:35 +0000
@@ -25,7 +25,7 @@
#include <SDL.h>
#include <boost/bind.hpp>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "logic/widelands.h"
@@ -62,7 +62,7 @@
bool operator== (const WareList &) const;
bool operator!= (const WareList & wl) const {return not (*this == wl);}
- mutable boost::signal<void ()> changed;
+ mutable boost::signals2::signal<void ()> changed;
private:
vector_type m_wares;
=== modified file 'src/ui_basic/button.h'
--- src/ui_basic/button.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/button.h 2013-08-02 18:49:35 +0000
@@ -22,7 +22,7 @@
#include <boost/bind.hpp>
#include <boost/function.hpp>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "constants.h"
#include "ui_basic/panel.h"
@@ -85,9 +85,9 @@
// If no background is drawn, the button is drawn over the current background
void set_draw_flat_background(bool set);
- boost::signal<void ()> sigclicked;
- boost::signal<void ()> sigmousein;
- boost::signal<void ()> sigmouseout;
+ boost::signals2::signal<void ()> sigclicked;
+ boost::signals2::signal<void ()> sigmousein;
+ boost::signals2::signal<void ()> sigmouseout;
protected:
virtual void clicked() {} /// Override this to react on the click.
=== modified file 'src/ui_basic/checkbox.h'
--- src/ui_basic/checkbox.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/checkbox.h 2013-08-02 18:49:35 +0000
@@ -20,7 +20,7 @@
#ifndef UI_CHECKBOX_H
#define UI_CHECKBOX_H
-#include <boost/signals.hpp>
+#include <boost/signals2.hpp>
#include "ui_basic/panel.h"
#include "rgbcolor.h"
@@ -42,9 +42,9 @@
const std::string & tooltip_text = std::string());
~Statebox();
- boost::signal<void ()> changed;
- boost::signal<void (bool)> changedto;
- boost::signal<void (bool)> clickedto; // same as changedto but only called when clicked
+ boost::signals2::signal<void ()> changed;
+ boost::signals2::signal<void (bool)> changedto;
+ boost::signals2::signal<void (bool)> clickedto; // same as changedto but only called when clicked
void set_enabled(bool enabled);
=== modified file 'src/ui_basic/editbox.h'
--- src/ui_basic/editbox.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/editbox.h 2013-08-02 18:49:35 +0000
@@ -21,7 +21,7 @@
#define UI_EDITBOX_H
#include <SDL_keyboard.h>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "align.h"
#include "ui_basic/button.h"
@@ -43,9 +43,9 @@
const Image* background = g_gr->images().get("pics/but2.png"), Align align = Align_Center);
virtual ~EditBox();
- boost::signal<void ()> changed;
- boost::signal<void ()> ok;
- boost::signal<void ()> cancel;
+ boost::signals2::signal<void ()> changed;
+ boost::signals2::signal<void ()> ok;
+ boost::signals2::signal<void ()> cancel;
const std::string & text() const;
void setText(const std::string &);
=== modified file 'src/ui_basic/icongrid.h'
--- src/ui_basic/icongrid.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/icongrid.h 2013-08-02 18:49:35 +0000
@@ -22,7 +22,7 @@
#include <vector>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "ui_basic/panel.h"
#include "ui_basic/textarea.h"
@@ -41,9 +41,9 @@
int32_t x, int32_t y, int32_t cellw, int32_t cellh,
int32_t cols);
- boost::signal<void (int32_t)> clicked;
- boost::signal<void (int32_t)> mouseout;
- boost::signal<void (int32_t)> mousein;
+ boost::signals2::signal<void (int32_t)> clicked;
+ boost::signals2::signal<void (int32_t)> mouseout;
+ boost::signals2::signal<void (int32_t)> mousein;
int32_t add
(const std::string & name,
=== modified file 'src/ui_basic/listselect.h'
--- src/ui_basic/listselect.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/listselect.h 2013-08-02 18:49:35 +0000
@@ -24,7 +24,7 @@
#include <deque>
#include <limits>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "align.h"
#include "ui_basic/panel.h"
@@ -51,9 +51,9 @@
bool show_check = false);
~BaseListselect();
- boost::signal<void (uint32_t)> selected;
- boost::signal<void (uint32_t)> clicked;
- boost::signal<void (uint32_t)> double_clicked;
+ boost::signals2::signal<void (uint32_t)> selected;
+ boost::signals2::signal<void (uint32_t)> clicked;
+ boost::signals2::signal<void (uint32_t)> double_clicked;
void clear();
void sort
=== modified file 'src/ui_basic/messagebox.h'
--- src/ui_basic/messagebox.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/messagebox.h 2013-08-02 18:49:35 +0000
@@ -20,7 +20,7 @@
#ifndef UI_MESSAGEBOX_H
#define UI_MESSAGEBOX_H
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "align.h"
#include "ui_basic/window.h"
@@ -61,9 +61,9 @@
Align = Align_Center);
~WLMessageBox();
- boost::signal<void ()> ok;
- boost::signal<void ()> yes;
- boost::signal<void ()> no;
+ boost::signals2::signal<void ()> ok;
+ boost::signals2::signal<void ()> yes;
+ boost::signals2::signal<void ()> no;
bool handle_mousepress (Uint8 btn, int32_t mx, int32_t my);
bool handle_mouserelease(Uint8 btn, int32_t mx, int32_t my);
=== modified file 'src/ui_basic/multilineeditbox.h'
--- src/ui_basic/multilineeditbox.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/multilineeditbox.h 2013-08-02 18:49:35 +0000
@@ -20,7 +20,7 @@
#ifndef UI_MULTILINEEDITBOX_H
#define UI_MULTILINEEDITBOX_H
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "ui_basic/panel.h"
@@ -36,7 +36,7 @@
Multiline_Editbox
(Panel *, int32_t x, int32_t y, uint32_t w, uint32_t h, const std::string & text);
- boost::signal<void ()> changed;
+ boost::signals2::signal<void ()> changed;
const std::string & get_text() const;
void set_text(const std::string &);
=== modified file 'src/ui_basic/panel.h'
--- src/ui_basic/panel.h 2013-07-26 19:16:51 +0000
+++ src/ui_basic/panel.h 2013-08-02 18:49:35 +0000
@@ -28,7 +28,7 @@
#include <SDL_keyboard.h>
#include <boost/noncopyable.hpp>
-#include <boost/signals/trackable.hpp>
+#include <boost/signals2/trackable.hpp>
#include "point.h"
@@ -57,7 +57,7 @@
* its desired size changes, this automatically changes the actual size (which then invokes
* \ref layout and \ref move_inside_parent).
*/
-struct Panel : boost::signals::trackable, boost::noncopyable {
+struct Panel : boost::signals2::trackable, boost::noncopyable {
enum {
pf_handle_mouse = 1, ///< receive mouse events
pf_think = 2, ///< call think() function during run
=== modified file 'src/ui_basic/radiobutton.h'
--- src/ui_basic/radiobutton.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/radiobutton.h 2013-08-02 18:49:35 +0000
@@ -58,9 +58,9 @@
Radiogroup();
~Radiogroup();
- boost::signal<void ()> changed;
- boost::signal<void (int32_t)> changedto;
- boost::signal<void ()> clicked; // clicked without things changed
+ boost::signals2::signal<void ()> changed;
+ boost::signals2::signal<void (int32_t)> changedto;
+ boost::signals2::signal<void ()> clicked; // clicked without things changed
int32_t add_button
(Panel * parent, Point, const Image* pic, const std::string& tooltip = "", Radiobutton ** = nullptr);
=== modified file 'src/ui_basic/scrollbar.h'
--- src/ui_basic/scrollbar.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/scrollbar.h 2013-08-02 18:49:35 +0000
@@ -20,7 +20,7 @@
#ifndef UI_SCROLLBAR_H
#define UI_SCROLLBAR_H
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "ui_basic/panel.h"
#include "rect.h"
@@ -50,7 +50,7 @@
(Panel * parent,
int32_t x, int32_t y, uint32_t w, uint32_t h, bool horiz);
- boost::signal<void (int32_t)> moved;
+ boost::signals2::signal<void (int32_t)> moved;
void set_steps(int32_t steps);
void set_singlestepsize(uint32_t singlestepsize);
=== modified file 'src/ui_basic/slider.h'
--- src/ui_basic/slider.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/slider.h 2013-08-02 18:49:35 +0000
@@ -19,7 +19,7 @@
#ifndef UI_SLIDER_H
#define UI_SLIDER_H
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "graphic/font.h"
#include "ui_basic/panel.h"
@@ -85,8 +85,8 @@
void set_highlighted(bool highlighted);
public:
- boost::signal<void ()> changed;
- boost::signal<void (int32_t)> changedto;
+ boost::signals2::signal<void ()> changed;
+ boost::signals2::signal<void (int32_t)> changedto;
private:
int32_t m_min_value; // cursor values
@@ -195,8 +195,8 @@
void set_labels(std::vector<std::string>);
- boost::signal<void ()> changed;
- boost::signal<void (int32_t)> changedto;
+ boost::signals2::signal<void ()> changed;
+ boost::signals2::signal<void (int32_t)> changedto;
protected:
virtual void draw(RenderTarget & dst);
=== modified file 'src/ui_basic/table.h'
--- src/ui_basic/table.h 2013-07-26 20:19:36 +0000
+++ src/ui_basic/table.h 2013-08-02 18:49:35 +0000
@@ -25,7 +25,7 @@
#include <vector>
#include <boost/function.hpp>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "align.h"
#include "ui_basic/panel.h"
@@ -54,8 +54,8 @@
bool descending = false);
~Table();
- boost::signal<void (uint32_t)> selected;
- boost::signal<void (uint32_t)> double_clicked;
+ boost::signals2::signal<void (uint32_t)> selected;
+ boost::signals2::signal<void (uint32_t)> double_clicked;
/// A column that has a title is sortable (by clicking on the title).
void add_column
@@ -160,8 +160,8 @@
bool descending = false);
~Table();
- boost::signal<void (uint32_t)> selected;
- boost::signal<void (uint32_t)> double_clicked;
+ boost::signals2::signal<void (uint32_t)> selected;
+ boost::signals2::signal<void (uint32_t)> double_clicked;
void add_column
(uint32_t width,
=== modified file 'src/wui/building_ui.cc'
--- src/wui/building_ui.cc 2013-07-26 20:19:36 +0000
+++ src/wui/building_ui.cc 2013-08-02 18:49:35 +0000
@@ -57,7 +57,7 @@
*/
void Building::hide_options()
{
- BOOST_FOREACH(boost::signals::connection& c, options_window_connections)
+ BOOST_FOREACH(boost::signals2::connection& c, options_window_connections)
c.disconnect();
delete m_optionswindow;
m_optionswindow = nullptr;
=== modified file 'src/wui/fieldaction.cc'
--- src/wui/fieldaction.cc 2013-07-26 20:19:36 +0000
+++ src/wui/fieldaction.cc 2013-08-02 18:49:35 +0000
@@ -65,9 +65,9 @@
int32_t x, int32_t y,
int32_t cols);
- boost::signal<void (Widelands::Building_Index::value_t)> buildclicked;
- boost::signal<void (Widelands::Building_Index::value_t)> buildmouseout;
- boost::signal<void (Widelands::Building_Index::value_t)> buildmousein;
+ boost::signals2::signal<void (Widelands::Building_Index::value_t)> buildclicked;
+ boost::signals2::signal<void (Widelands::Building_Index::value_t)> buildmouseout;
+ boost::signals2::signal<void (Widelands::Building_Index::value_t)> buildmousein;
void add(Widelands::Building_Index::value_t);
=== modified file 'src/wui/gamechatpanel.h'
--- src/wui/gamechatpanel.h 2013-07-26 19:16:51 +0000
+++ src/wui/gamechatpanel.h 2013-08-02 18:49:35 +0000
@@ -41,12 +41,12 @@
/**
* Signal is called when a message has been sent by the user.
*/
- boost::signal<void ()> sent;
+ boost::signals2::signal<void ()> sent;
/**
* Signal is called when the user has aborted entering a message.
*/
- boost::signal<void ()> aborted;
+ boost::signals2::signal<void ()> aborted;
const std::string & get_edit_text() const {return editbox.text();}
void set_edit_text(const std::string & text) {editbox.setText(text);}
=== modified file 'src/wui/mapview.h'
--- src/wui/mapview.h 2013-07-26 19:16:51 +0000
+++ src/wui/mapview.h 2013-08-02 18:49:35 +0000
@@ -21,7 +21,7 @@
#define MAPVIEW_H
#include <boost/function.hpp>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "logic/widelands_geometry.h"
#include "ui_basic/panel.h"
@@ -54,9 +54,9 @@
*
* Parameters are x/y position in screen coordinates.
*/
- boost::signal<void (int32_t, int32_t)> changeview;
+ boost::signals2::signal<void (int32_t, int32_t)> changeview;
- boost::signal<void ()> fieldclicked;
+ boost::signals2::signal<void ()> fieldclicked;
void warp_mouse_to_node(Widelands::Coords);
=== modified file 'src/wui/minimap.h'
--- src/wui/minimap.h 2013-02-09 23:18:23 +0000
+++ src/wui/minimap.h 2013-08-02 18:49:35 +0000
@@ -20,7 +20,7 @@
#ifndef MINIMAP_H
#define MINIMAP_H
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "ui_basic/button.h"
#include "ui_basic/unique_window.h"
@@ -36,7 +36,7 @@
MiniMap(Interactive_Base & parent, Registry *);
- boost::signal<void (int32_t, int32_t)> warpview;
+ boost::signals2::signal<void (int32_t, int32_t)> warpview;
void set_view_pos(int32_t const x, int32_t const y) {
m_view.set_view_pos(x, y);
=== modified file 'src/wui/waresdisplay.cc'
--- src/wui/waresdisplay.cc 2013-07-26 20:19:36 +0000
+++ src/wui/waresdisplay.cc 2013-08-02 18:49:35 +0000
@@ -275,7 +275,7 @@
void WaresDisplay::remove_all_warelists() {
m_warelists.clear();
- BOOST_FOREACH(boost::signals::connection& c, connections_)
+ BOOST_FOREACH(boost::signals2::connection& c, connections_)
c.disconnect();
connections_.clear();
update();
=== modified file 'src/wui/waresdisplay.h'
--- src/wui/waresdisplay.h 2013-07-26 19:16:51 +0000
+++ src/wui/waresdisplay.h 2013-08-02 18:49:35 +0000
@@ -22,7 +22,7 @@
#include <vector>
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "logic/tribe.h"
#include "logic/warelist.h"
@@ -144,7 +144,7 @@
private:
typedef std::vector<const Widelands::WareList *> vector_type;
vector_type m_warelists;
- std::vector<boost::signals::connection> connections_;
+ std::vector<boost::signals2::connection> connections_;
};
std::string waremap_to_richtext
=== modified file 'src/wui/watchwindow.cc'
--- src/wui/watchwindow.cc 2013-07-26 20:19:36 +0000
+++ src/wui/watchwindow.cc 2013-08-02 18:49:35 +0000
@@ -58,7 +58,7 @@
return ref_cast<Interactive_GameBase, UI::Panel>(*get_parent()).game();
}
- boost::signal<void (Point)> warp_mainview;
+ boost::signals2::signal<void (Point)> warp_mainview;
void add_view(Widelands::Coords);
void next_view(bool first = false);
Follow ups