Merge branch 'qPCR4vir-develop' into develop
This commit is contained in:
commit
c1df5197ae
@ -59,7 +59,7 @@ matrix:
|
||||
- llvm-toolchain-precise
|
||||
|
||||
before_install:
|
||||
- git clone --depth=1 --branch=hotfix-1.5 https://github.com/qPCR4vir/nana-demo.git ../nana-demo
|
||||
- git clone --depth=1 --branch=develop https://github.com/qPCR4vir/nana-demo.git ../nana-demo
|
||||
- export PATH="$HOME/bin:$PATH"
|
||||
#- mkdir ~/bin #it seemd that a bin already exists from 20170901
|
||||
- wget --no-check-certificate --no-clobber -O /tmp/tools/cmake https://cmake.org/files/v3.4/cmake-3.4.0-rc3-Linux-x86_64.sh || true
|
||||
@ -87,7 +87,7 @@ script:
|
||||
# we are in "... nana/../nana_lib/bin/" we need "../../nana" to get the CMakeList.txt of nana.
|
||||
# Thus, make install will put the nana.lib in "... nana/../nana_lib/lib/"
|
||||
# and the includes in "... nana/../nana_lib/include/"
|
||||
- cmake -G"Unix Makefiles" ../../nana -DCMAKE_INSTALL_PREFIX=.. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON
|
||||
- cmake -G"Unix Makefiles" ../../nana -DCMAKE_INSTALL_PREFIX=.. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON
|
||||
- make install
|
||||
- ls
|
||||
- cd ..
|
||||
|
||||
@ -55,6 +55,37 @@
|
||||
#define NANA_USING_BOOST_FILESYSTEM 1
|
||||
# include <chrono>
|
||||
# include <boost/filesystem.hpp>
|
||||
// dont include generic_u8string
|
||||
// http://www.boost.org/doc/libs/1_66_0/boost/filesystem/path.hpp
|
||||
// enable directory_iterator C++11 range-base for
|
||||
// http://www.boost.org/doc/libs/1_66_0/boost/filesystem/operations.hpp
|
||||
// but travis come with an oooold version of boost
|
||||
// NOT enable directory_iterator C++11 range-base for
|
||||
// http://www.boost.org/doc/libs/1_54_0/boost/filesystem/operations.hpp
|
||||
namespace boost
|
||||
{
|
||||
namespace filesystem
|
||||
{
|
||||
|
||||
// enable directory_iterator C++11 range-base for statement use --------------------//
|
||||
|
||||
// begin() and end() are only used by a range-based for statement in the context of
|
||||
// auto - thus the top-level const is stripped - so returning const is harmless and
|
||||
// emphasizes begin() is just a pass through.
|
||||
inline
|
||||
const directory_iterator& begin(const directory_iterator& iter) BOOST_NOEXCEPT
|
||||
{
|
||||
return iter;
|
||||
}
|
||||
inline
|
||||
directory_iterator end(const directory_iterator&) BOOST_NOEXCEPT
|
||||
{
|
||||
return directory_iterator();
|
||||
}
|
||||
|
||||
} // namespace filesystem
|
||||
}
|
||||
|
||||
|
||||
// add boost::filesystem into std::experimental::filesystem
|
||||
namespace std {
|
||||
@ -75,6 +106,16 @@ namespace std {
|
||||
socket = boost::filesystem::file_type::socket_file,
|
||||
unknown = boost::filesystem::file_type::type_unknown,
|
||||
};
|
||||
/// enable directory_iterator range-based for statements
|
||||
//inline directory_iterator begin(directory_iterator iter) noexcept
|
||||
//{
|
||||
// return iter;
|
||||
//}
|
||||
|
||||
//inline directory_iterator end(const directory_iterator&) noexcept
|
||||
//{
|
||||
// return {};
|
||||
//}
|
||||
} // filesystem
|
||||
} // experimental
|
||||
} // std
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
#define NANA_FILESYSTEM_EXT_HPP
|
||||
|
||||
#include <nana/filesystem/filesystem.hpp>
|
||||
#include <nana/deploy.hpp>
|
||||
|
||||
|
||||
namespace nana
|
||||
{
|
||||
@ -34,6 +36,16 @@ namespace filesystem_ext
|
||||
|
||||
std::experimental::filesystem::path path_user(); ///< extention ?
|
||||
|
||||
/// workaround Boost not having path.generic_u8string() - a good point for http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0251r0.pdf
|
||||
inline std::string generic_u8string(const std::experimental::filesystem::path& p)
|
||||
{
|
||||
#if NANA_USING_BOOST_FILESYSTEM
|
||||
return nana::to_utf8(p.generic_wstring());
|
||||
#else
|
||||
return p.generic_u8string();
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool is_directory(const std::experimental::filesystem::directory_entry& dir) noexcept
|
||||
{
|
||||
return is_directory(dir.status());
|
||||
|
||||
@ -987,9 +987,13 @@ namespace nana
|
||||
cat_proxy(essence*, size_type pos) noexcept;
|
||||
cat_proxy(essence*, category_t*) noexcept;
|
||||
|
||||
/// Append an item at abs end of the category, set_value determines whether assign T object to the value of item.
|
||||
template<typename T>
|
||||
item_proxy append(T&& t, bool set_value = false)
|
||||
/// Append an item at the end of this category using the oresolver to generate the texts to be put in each column.
|
||||
///
|
||||
/// First you have to make sure there is an overload of the operator<<() of the oresolver for the type of the object used here
|
||||
/// If a listbox have a model set, try call append_model instead.
|
||||
template<typename T>
|
||||
item_proxy append( T&& t, ///< Value used by the resolver to generate the texts to be put in each column of the item
|
||||
bool set_value = false) ///< determines whether to set the object as the value of this item.
|
||||
{
|
||||
oresolver ores(ess_);
|
||||
|
||||
@ -1039,7 +1043,7 @@ namespace nana
|
||||
|
||||
model_guard model();
|
||||
|
||||
/// Appends one item at the end of this category with the specifies text in the column fields
|
||||
/// Appends one item at the end of this category with the specifies texts in the column fields
|
||||
void append(std::initializer_list<std::string> texts_utf8);
|
||||
void append(std::initializer_list<std::wstring> texts);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user