[Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-07 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/compiler-warnings-201908-2 
into lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-07 Thread Klaus Halfmann
Review: Approve

local tests ok
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-07 Thread GunChleoc
The UI test sometimes fails because it takes too long for the game to close. I 
have implemented a fix in one of my other branches. Will rerun the Travis job.
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-07 Thread Klaus Halfmann
Mhh,one test in travis fails

test/maps/plain.wmf/scripting/test_ui.lua ... 
  Running Widelands ... FAIL

But only for GCC_VERSION="4.9" BUILD_TYPE="Debug" ?

will run the test loocally, too
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-07 Thread Klaus Halfmann
Review: Approve

Locally commpiles without issues. Start upto Lobby was fine.
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-07 Thread bunnybot
Refusing to merge, since Travis is not green. Use @bunnybot merge force for 
merging anyways.

Travis build 5399. State: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/581705807.
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-07 Thread GunChleoc
Thanks for the review!

I already did a code review on your branch, I guess you overlooked it.

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-07 Thread Klaus Halfmann
Review: Approve

* Replaced:
- widelands_ball_of_mud
+ widelands_options
-> fine

* Codestyle: using this for a member function makes no sense.

* Smuggeled in some USE_XDG handling :-)

Will compile and start this, not doing much testing.


Please: review my refactor_gamehost before merging it becomes to much pain.
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-06 Thread bunnybot
Continuous integration builds have changed state:

Travis build 5399. State: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/581705807.
Appveyor build 5169. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_compiler_warnings_201908_2-5169.
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-01 Thread bunnybot
Continuous integration builds have changed state:

Travis build 5378. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/579360487.
Appveyor build 5148. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_compiler_warnings_201908_2-5148.
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-01 Thread bunnybot
Continuous integration builds have changed state:

Travis build 5378. State: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/579360487.
Appveyor build 5148. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_compiler_warnings_201908_2-5148.
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-09-01 Thread GunChleoc
Review: Resubmit

I'm done checking the logs, so this is ready for review now.
-- 
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/compiler-warnings-201908-2.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands

2019-08-31 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands.

Commit message:
Fix compiler warnings and refactor config dir.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/compiler-warnings-201908-2/+merge/372111

Do not send the merge command yet, I want to check the Travis/AppVeyor logs 
first.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/compiler-warnings-201908-2 into lp:widelands.
=== modified file 'src/graphic/styles/font_style.h'
--- src/graphic/styles/font_style.h	2019-06-01 14:16:25 +
+++ src/graphic/styles/font_style.h	2019-08-31 10:33:28 +
@@ -67,7 +67,6 @@
 	   bool init_underline,
 	   bool init_shadow);
 	explicit FontStyleInfo(const FontStyleInfo& other);
-	FontStyleInfo& operator=(const FontStyleInfo& other) = default;
 
 	std::string as_font_tag(const std::string& text) const;
 

=== modified file 'src/graphic/styles/text_panel_style.h'
--- src/graphic/styles/text_panel_style.h	2019-05-26 17:21:15 +
+++ src/graphic/styles/text_panel_style.h	2019-08-31 10:33:28 +
@@ -38,7 +38,6 @@
 	   : background_(new UI::PanelStyleInfo(other.background())),
 	 font_(new UI::FontStyleInfo(other.font())) {
 	}
-	TextPanelStyleInfo& operator=(const TextPanelStyleInfo& other) = default;
 
 	const UI::FontStyleInfo& font() const {
 		return *font_.get();

=== modified file 'src/ui_fsmenu/options.cc'
--- src/ui_fsmenu/options.cc	2019-08-25 14:50:16 +
+++ src/ui_fsmenu/options.cc	2019-08-31 10:33:28 +
@@ -680,5 +680,5 @@
 	g_sh->save_config();
 
 	// Now write to file
-	write_config(WLApplication::get());
+	write_config();
 }

=== modified file 'src/wlapplication.cc'
--- src/wlapplication.cc	2019-08-28 06:12:07 +
+++ src/wlapplication.cc	2019-08-31 10:33:28 +
@@ -228,6 +228,9 @@
 
 // Set up the homedir. Exit 1 if the homedir is illegal or the logger couldn't be initialized for
 // Windows.
+// Also sets the config directory. This defaults to $XDG_CONFIG_HOME/widelands/config on Unix.
+// Defaults to homedir/config everywhere else, if homedir is set manually or if
+// built without XDG-support.
 void WLApplication::setup_homedir() {
 	// Check if we have a command line override
 	if (commandline_.count("homedir")) {
@@ -274,6 +277,12 @@
 		// Homedir is ready, so we can log normally from now on
 		log("Set home directory: %s\n", homedir_.c_str());
 	}
+
+#ifdef USE_XDG
+		set_config_directory(userconfigdir_);
+#else
+		set_config_directory(homedir_);
+#endif
 }
 
 WLApplication* WLApplication::the_singleton = nullptr;
@@ -766,7 +775,7 @@
 bool WLApplication::init_settings() {
 
 	// Read in the configuration file
-	read_config(this);
+	read_config();
 
 	// Then parse the commandline - overwrites conffile settings
 	handle_commandline_parameters();
@@ -846,7 +855,7 @@
 
 	// Save configuration now. Otherwise, the UUID is not saved
 	// when the game crashes, losing part of its advantage
-	write_config(this);
+	write_config();
 
 	return true;
 }
@@ -872,8 +881,7 @@
 void WLApplication::shutdown_settings() {
 	// To be proper, release our textdomain
 	i18n::release_textdomain();
-
-	write_config(this);
+	write_config();
 }
 
 void WLApplication::shutdown_hardware() {

=== modified file 'src/wlapplication.h'
--- src/wlapplication.h	2019-07-20 14:32:57 +
+++ src/wlapplication.h	2019-08-31 10:33:28 +
@@ -196,13 +196,6 @@
 	void replay();
 	static void emergency_save(Widelands::Game&);
 
-#ifdef USE_XDG
-	// this is only for src/wlapplication_options.cc
-	std::string get_userconfigdir() {
-		return userconfigdir_;
-	}
-#endif
-
 private:
 	WLApplication(int argc, char const* const* argv);
 

=== modified file 'src/wlapplication_options.cc'
--- src/wlapplication_options.cc	2019-08-28 06:12:07 +
+++ src/wlapplication_options.cc	2019-08-31 10:33:28 +
@@ -19,13 +19,17 @@
 
 #include "wlapplication_options.h"
 
+#include 
+#include 
+
 #include "base/log.h"
 #include "io/filesystem/disk_filesystem.h"
 #include "io/profile.h"
 #include "logic/filesystem_constants.h"
-#include "wlapplication.h"
-
-Profile g_options(Profile::err_log);
+
+static Profile g_options(Profile::err_log);
+
+static std::unique_ptr config_dir = nullptr;
 
 void check_config_used() {
 	g_options.check_used();
@@ -110,26 +114,22 @@
 	g_options.pull_section(section.c_str()).set_string(name.c_str(), value.c_str());
 }
 
-void read_config(WLApplication* wlapplication) {
-#ifdef USE_XDG
-	RealFSImpl dir(wlapplication->get_userconfigdir());
-	dir.ensure_directory_exists(".");
-	log("Set configuration file: %s/%s\n", wlapplication->get_userconfigdir().c_str(),
-	kConfigFile.c_str());
-	g_options.read(kConfigFile.c_str(), &q