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;
@@ -863,7 +859,6 @@ void setClipboard(const QString& str)
863
859
QApplication::clipboard ()->setText (str, QClipboard::Selection);
864
860
}
865
861
866
- #if BOOST_FILESYSTEM_VERSION >= 3
867
862
boost::filesystem::path qstringToBoostPath (const QString &path)
868
863
{
869
864
return boost::filesystem::path (path.toStdString (), utf8);
@@ -873,18 +868,6 @@ QString boostPathToQString(const boost::filesystem::path &path)
873
868
{
874
869
return QString::fromStdString (path.string (utf8));
875
870
}
876
- #else
877
- #warning Conversion between boost path and QString can use invalid character encoding with boost_filesystem v2 and older
878
- boost::filesystem::path qstringToBoostPath (const QString &path)
879
- {
880
- return boost::filesystem::path (path.toStdString ());
881
- }
882
-
883
- QString boostPathToQString (const boost::filesystem::path &path)
884
- {
885
- return QString::fromStdString (path.string ());
886
- }
887
- #endif
888
871
889
872
QString formatDurationStr (int secs)
890
873
{
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 @@ -3892,11 +3892,7 @@ bool CWallet::BackupWallet(const std::string& strDest)
3892
3892
pathDest /= strWalletFile;
3893
3893
3894
3894
try {
3895
- #if BOOST_VERSION >= 104000
3896
3895
boost::filesystem::copy_file (pathSrc, pathDest, boost::filesystem::copy_option::overwrite_if_exists);
3897
- #else
3898
- boost::filesystem::copy_file (pathSrc, pathDest);
3899
- #endif
3900
3896
LogPrintf (" copied %s to %s\n " , strWalletFile, pathDest.string ());
3901
3897
return true ;
3902
3898
} catch (const boost::filesystem::filesystem_error& e) {
You can’t perform that action at this time.
0 commit comments