diff --git a/include/nana/gui/detail/general_events.hpp b/include/nana/gui/detail/general_events.hpp index 9a9496e2..e912d7b5 100644 --- a/include/nana/gui/detail/general_events.hpp +++ b/include/nana/gui/detail/general_events.hpp @@ -1,7 +1,7 @@ /** * Definition of General Events * Nana C++ Library(http://www.nanapro.org) -* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com) +* Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at @@ -17,6 +17,7 @@ #include #include "event_code.hpp" #include "internal_scope_guard.hpp" +#include "../../filesystem/filesystem.hpp" #include #include #include @@ -470,9 +471,9 @@ namespace nana struct arg_dropfiles : public event_arg { - ::nana::window window_handle; ///< A handle to the event window - ::nana::point pos; ///< cursor position in the event window - std::vector files; ///< external filenames + ::nana::window window_handle; ///< A handle to the event window + ::nana::point pos; ///< cursor position in the event window + std::vector files; ///< external filenames }; struct arg_expose : public event_arg diff --git a/source/detail/platform_spec_posix.cpp b/source/detail/platform_spec_posix.cpp index bca68ea8..f7cbc9d6 100644 --- a/source/detail/platform_spec_posix.cpp +++ b/source/detail/platform_spec_posix.cpp @@ -1238,7 +1238,7 @@ namespace detail 0, AnyPropertyType, &type, &format, &len, &dummy_bytes_left, &data)) { - auto files = new std::vector; + auto files = new std::vector; std::stringstream ss(reinterpret_cast(data)); while(true) @@ -1258,7 +1258,7 @@ namespace detail break; } - files->push_back(file); + files->emplace_back(file); } if(files->size()) diff --git a/source/detail/posix/msg_packet.hpp b/source/detail/posix/msg_packet.hpp index 6a36f129..df7a4bcf 100644 --- a/source/detail/posix/msg_packet.hpp +++ b/source/detail/posix/msg_packet.hpp @@ -3,6 +3,7 @@ #include #include #include +#include namespace nana { @@ -29,7 +30,7 @@ namespace detail Window window; int x; int y; - std::vector * files; + std::vector * files; }mouse_drop; }u; }; diff --git a/source/gui/detail/bedrock_windows.cpp b/source/gui/detail/bedrock_windows.cpp index 30a05fb5..bd02a00d 100644 --- a/source/gui/detail/bedrock_windows.cpp +++ b/source/gui/detail/bedrock_windows.cpp @@ -1149,10 +1149,10 @@ namespace detail std::unique_ptr varbuf; std::size_t bufsize = 0; - unsigned size = ::DragQueryFile(drop, 0xFFFFFFFF, 0, 0); + unsigned size = ::DragQueryFile(drop, 0xFFFFFFFF, nullptr, 0); for(unsigned i = 0; i < size; ++i) { - unsigned reqlen = ::DragQueryFile(drop, i, 0, 0) + 1; + unsigned reqlen = ::DragQueryFile(drop, i, nullptr, 0) + 1; if(bufsize < reqlen) { varbuf.reset(new wchar_t[reqlen]); @@ -1160,8 +1160,7 @@ namespace detail } ::DragQueryFile(drop, i, varbuf.get(), reqlen); - - dropfiles.files.emplace_back(to_utf8(varbuf.get())); + dropfiles.files.emplace_back(varbuf.get()); } while(msgwnd && (msgwnd->flags.dropable == false))