1+ // system headers
2+ #include < filesystem>
3+
14// library headers
25#include < linuxdeploy/core/log.h>
36#include < linuxdeploy/util/util.h>
4- #include < boost/filesystem.hpp>
57
68// local headers
79#include " PlatformPluginsDeployer.h"
810
911using namespace linuxdeploy ::plugin::qt;
1012using namespace linuxdeploy ::core::log;
1113
12- namespace bf = boost ::filesystem;
14+ namespace fs = std ::filesystem;
1315
1416bool PlatformPluginsDeployer::deploy () {
1517 // calling the default code is optional, but it won't hurt for now
@@ -32,34 +34,34 @@ bool PlatformPluginsDeployer::deploy() {
3234 }
3335 }
3436
35- for (bf ::directory_iterator i (qtPluginsPath / " platforminputcontexts" ); i != bf ::directory_iterator (); ++i) {
37+ for (fs ::directory_iterator i (qtPluginsPath / " platforminputcontexts" ); i != fs ::directory_iterator (); ++i) {
3638 if (!appDir.deployLibrary (*i, appDir.path () / " usr/plugins/platforminputcontexts/" ))
3739 return false ;
3840 }
3941
40- for (bf ::directory_iterator i (qtPluginsPath / " imageformats" ); i != bf ::directory_iterator (); ++i) {
42+ for (fs ::directory_iterator i (qtPluginsPath / " imageformats" ); i != fs ::directory_iterator (); ++i) {
4143 if (!appDir.deployLibrary (*i, appDir.path () / " usr/plugins/imageformats/" ))
4244 return false ;
4345 }
4446
4547 // TODO: platform themes -- https://github.com/probonopd/linuxdeployqt/issues/236
4648
47- const bf ::path platformThemesPath = qtPluginsPath / " platformthemes" ;
48- const bf ::path stylesPath = qtPluginsPath / " styles" ;
49+ const fs ::path platformThemesPath = qtPluginsPath / " platformthemes" ;
50+ const fs ::path stylesPath = qtPluginsPath / " styles" ;
4951
50- const bf ::path platformThemesDestination = appDir.path () / " usr/plugins/platformthemes/" ;
51- const bf ::path stylesDestination = appDir.path () / " usr/plugins/styles/" ;
52+ const fs ::path platformThemesDestination = appDir.path () / " usr/plugins/platformthemes/" ;
53+ const fs ::path stylesDestination = appDir.path () / " usr/plugins/styles/" ;
5254
5355 if (getenv (" DEPLOY_PLATFORM_THEMES" ) != nullptr ) {
5456 ldLog () << LD_WARNING << " Deploying all platform themes and styles [experimental feature]" << std::endl;
5557
56- if (bf ::is_directory (platformThemesPath))
57- for (bf ::directory_iterator i (platformThemesPath); i != bf ::directory_iterator (); ++i)
58+ if (fs ::is_directory (platformThemesPath))
59+ for (fs ::directory_iterator i (platformThemesPath); i != fs ::directory_iterator (); ++i)
5860 if (!appDir.deployLibrary (*i, platformThemesDestination))
5961 return false ;
6062
61- if (bf ::is_directory (stylesPath))
62- for (bf ::directory_iterator i (stylesPath); i != bf ::directory_iterator (); ++i)
63+ if (fs ::is_directory (stylesPath))
64+ for (fs ::directory_iterator i (stylesPath); i != fs ::directory_iterator (); ++i)
6365 if (!appDir.deployLibrary (*i, stylesDestination))
6466 return false ;
6567 } else {
@@ -69,7 +71,7 @@ bool PlatformPluginsDeployer::deploy() {
6971
7072 for (const auto &file : {libqxdgPath}) {
7173 // we need to check whether the files exist at least, otherwise the deferred deployment operation fails
72- if (bf ::is_regular_file (file)) {
74+ if (fs ::is_regular_file (file)) {
7375 ldLog () << " Attempting to deploy" << file.filename () << " found at path" << file.parent_path () << std::endl;
7476 appDir.deployFile (file, platformThemesDestination);
7577 } else {
0 commit comments