File tree Expand file tree Collapse file tree 3 files changed +0
-39
lines changed
Expand file tree Collapse file tree 3 files changed +0
-39
lines changed Original file line number Diff line number Diff line change 3737
3838#include < boost/filesystem.hpp>
3939#include < boost/filesystem/fstream.hpp>
40- #if BOOST_FILESYSTEM_VERSION >= 3
4140#include < boost/filesystem/detail/utf8_codecvt_facet.hpp>
42- #endif
4341#include < boost/scoped_array.hpp>
4442
4543#include < QAbstractItemView>
6765#include < QFontDatabase>
6866#endif
6967
70- #if BOOST_FILESYSTEM_VERSION >= 3
7168static boost::filesystem::detail::utf8_codecvt_facet utf8;
72- #endif
7369
7470#if defined(Q_OS_MAC)
7571extern double NSAppKitVersionNumber;
@@ -860,7 +856,6 @@ void setClipboard(const QString& str)
860856 QApplication::clipboard ()->setText (str, QClipboard::Selection);
861857}
862858
863- #if BOOST_FILESYSTEM_VERSION >= 3
864859boost::filesystem::path qstringToBoostPath (const QString &path)
865860{
866861 return boost::filesystem::path (path.toStdString (), utf8);
@@ -870,18 +865,6 @@ QString boostPathToQString(const boost::filesystem::path &path)
870865{
871866 return QString::fromStdString (path.string (utf8));
872867}
873- #else
874- #warning Conversion between boost path and QString can use invalid character encoding with boost_filesystem v2 and older
875- boost::filesystem::path qstringToBoostPath (const QString &path)
876- {
877- return boost::filesystem::path (path.toStdString ());
878- }
879-
880- QString boostPathToQString (const boost::filesystem::path &path)
881- {
882- return QString::fromStdString (path.string ());
883- }
884- #endif
885868
886869QString formatDurationStr (int secs)
887870{
Original file line number Diff line number Diff line change 1111#include < boost/filesystem.hpp>
1212
1313boost::filesystem::path GetTempPath () {
14- #if BOOST_FILESYSTEM_VERSION == 3
1514 return boost::filesystem::temp_directory_path ();
16- #else
17- // TODO: remove when we don't support filesystem v2 anymore
18- boost::filesystem::path path;
19- #ifdef WIN32
20- char pszPath[MAX_PATH] = " " ;
21-
22- if (GetTempPathA (MAX_PATH, pszPath))
23- path = boost::filesystem::path (pszPath);
24- #else
25- path = boost::filesystem::path (" /tmp" );
26- #endif
27- if (path.empty () || !boost::filesystem::is_directory (path)) {
28- LogPrintf (" GetTempPath(): failed to find temp path\n " );
29- return boost::filesystem::path (" " );
30- }
31- return path;
32- #endif
3315}
Original file line number Diff line number Diff line change @@ -3874,11 +3874,7 @@ bool CWallet::BackupWallet(const std::string& strDest)
38743874 pathDest /= strWalletFile;
38753875
38763876 try {
3877- #if BOOST_VERSION >= 104000
38783877 boost::filesystem::copy_file (pathSrc, pathDest, boost::filesystem::copy_option::overwrite_if_exists);
3879- #else
3880- boost::filesystem::copy_file (pathSrc, pathDest);
3881- #endif
38823878 LogPrintf (" copied %s to %s\n " , strWalletFile, pathDest.string ());
38833879 return true ;
38843880 } catch (const boost::filesystem::filesystem_error& e) {
You can’t perform that action at this time.
0 commit comments