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 37
37
38
38
#include < boost/filesystem.hpp>
39
39
#include < boost/filesystem/fstream.hpp>
40
- #if BOOST_FILESYSTEM_VERSION >= 3
41
40
#include < boost/filesystem/detail/utf8_codecvt_facet.hpp>
42
- #endif
43
41
#include < boost/scoped_array.hpp>
44
42
45
43
#include < QAbstractItemView>
67
65
#include < QFontDatabase>
68
66
#endif
69
67
70
- #if BOOST_FILESYSTEM_VERSION >= 3
71
68
static boost::filesystem::detail::utf8_codecvt_facet utf8;
72
- #endif
73
69
74
70
#if defined(Q_OS_MAC)
75
71
extern double NSAppKitVersionNumber;
@@ -860,7 +856,6 @@ void setClipboard(const QString& str)
860
856
QApplication::clipboard ()->setText (str, QClipboard::Selection);
861
857
}
862
858
863
- #if BOOST_FILESYSTEM_VERSION >= 3
864
859
boost::filesystem::path qstringToBoostPath (const QString &path)
865
860
{
866
861
return boost::filesystem::path (path.toStdString (), utf8);
@@ -870,18 +865,6 @@ QString boostPathToQString(const boost::filesystem::path &path)
870
865
{
871
866
return QString::fromStdString (path.string (utf8));
872
867
}
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
885
868
886
869
QString formatDurationStr (int secs)
887
870
{
Original file line number Diff line number Diff line change 11
11
#include < boost/filesystem.hpp>
12
12
13
13
boost::filesystem::path GetTempPath () {
14
- #if BOOST_FILESYSTEM_VERSION == 3
15
14
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
33
15
}
Original file line number Diff line number Diff line change @@ -3874,11 +3874,7 @@ bool CWallet::BackupWallet(const std::string& strDest)
3874
3874
pathDest /= strWalletFile;
3875
3875
3876
3876
try {
3877
- #if BOOST_VERSION >= 104000
3878
3877
boost::filesystem::copy_file (pathSrc, pathDest, boost::filesystem::copy_option::overwrite_if_exists);
3879
- #else
3880
- boost::filesystem::copy_file (pathSrc, pathDest);
3881
- #endif
3882
3878
LogPrintf (" copied %s to %s\n " , strWalletFile, pathDest.string ());
3883
3879
return true ;
3884
3880
} catch (const boost::filesystem::filesystem_error& e) {
You can’t perform that action at this time.
0 commit comments