diff --git a/include/nana/config.hpp b/include/nana/config.hpp index 3b0a85dd..3136f531 100644 --- a/include/nana/config.hpp +++ b/include/nana/config.hpp @@ -106,6 +106,12 @@ #if defined(__GLIBCPP__) || defined(__GLIBCXX__) // is a known issue on libstdc++, it works on libc++ #define STD_CODECVT_NOT_SUPPORTED + + + #ifndef STD_MAKE_UNIQUE_NOT_SUPPORTED + #define STD_MAKE_UNIQUE_NOT_SUPPORTED + #endif + #endif #elif defined(__GNUC__) //GCC diff --git a/include/nana/filesystem/filesystem.hpp b/include/nana/filesystem/filesystem.hpp index c60976dc..4f4423a1 100644 --- a/include/nana/filesystem/filesystem.hpp +++ b/include/nana/filesystem/filesystem.hpp @@ -364,6 +364,8 @@ namespace filesystem }//end namespace filesystem } //end namespace experimental + + namespace filesystem = experimental::filesystem; }//end namespace nana #endif diff --git a/source/gui/filebox.cpp b/source/gui/filebox.cpp index 60303d62..a0985165 100644 --- a/source/gui/filebox.cpp +++ b/source/gui/filebox.cpp @@ -142,7 +142,7 @@ namespace nana auto path = path_.caption(); auto root = path.substr(0, path.find('/')); if(root == "HOME") - path.replace(0, 4, to_nstring(nana::filesystem::path_user())); + path.replace(0, 4, nana::filesystem::path_user().native()); else if(root == "FILESYSTEM") path.erase(0, 10); else @@ -344,9 +344,9 @@ namespace nana else dir = saved_selected_path; - _m_load_cat_path(dir.size() ? dir : to_nstring(nana::filesystem::path_user())); + _m_load_cat_path(dir.size() ? dir : nana::filesystem::path_user().native()); - tb_file_.caption(file_with_path_removed); + tb_file_.caption(file_with_path_removed); } void add_filter(const std::string& desc, const std::string& type) @@ -430,7 +430,7 @@ namespace nana namespace fs = ::nana::experimental::filesystem; std::vector paths; - paths.emplace_back(nana::filesystem::path_user()); + paths.emplace_back(fs::path_user().native()); paths.emplace_back("/"); fs::directory_iterator end; @@ -474,7 +474,7 @@ namespace nana { auto begstr = path.substr(0, pos); if(begstr == "FS.HOME") - path.replace(0, 7, to_nstring(nana::filesystem::path_user())); + path.replace(0, 7, nana::filesystem::path_user().native()); else path.erase(0, pos); return begstr; @@ -534,7 +534,7 @@ namespace nana while(!beg_node.empty() && (beg_node != nodes_.home) && (beg_node != nodes_.filesystem)) beg_node = beg_node.owner(); - auto head = to_nstring(nana::filesystem::path_user()); + auto head = nana::filesystem::path_user().native(); if(path.size() >= head.size() && (path.substr(0, head.size()) == head)) {//This is HOME path_.caption("HOME"); diff --git a/source/gui/widgets/checkbox.cpp b/source/gui/widgets/checkbox.cpp index 104c54a0..e0e0aa75 100644 --- a/source/gui/widgets/checkbox.cpp +++ b/source/gui/widgets/checkbox.cpp @@ -263,7 +263,7 @@ namespace checkbox if (ui_container_.end() == i) return; - checkbox * target; + checkbox * target = nullptr; if (keyboard::os_arrow_up == arg.key) { @@ -280,8 +280,11 @@ namespace checkbox target = ui_container_.front().uiobj; } - target->check(true); - target->focus(); + if(target) + { + target->check(true); + target->focus(); + } }); diff --git a/source/paint/image.cpp b/source/paint/image.cpp index 7902b864..d037d4b8 100644 --- a/source/paint/image.cpp +++ b/source/paint/image.cpp @@ -237,7 +237,7 @@ namespace paint #if defined(NANA_WINDOWS) ptr = std::make_shared(true); #else - return false; + return ptr; #endif break; } @@ -247,7 +247,7 @@ namespace paint #if defined(NANA_ENABLE_PNG) ptr = std::make_shared; #else - return false; + return ptr; #endif break; } @@ -257,7 +257,7 @@ namespace paint #if defined(NANA_ENABLE_JPEG) ptr = std::make_shared(); #else - return false; + return ptr; #endif break; }