Skip to content

Commit 7bc321e

Browse files
authored
Merge pull request #62 from realnc/deploy-gtk3-xdgdp
Deploy gtk3 and xdgdesktopportal themes if found
2 parents 84fc3d7 + 84797c0 commit 7bc321e

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

src/deployers/PlatformPluginsDeployer.cpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,26 @@ bool PlatformPluginsDeployer::deploy() {
5757
// either loading succeeds, then the system Gtk shall be used anyway, otherwise loading fails and Qt will fall
5858
// back to the default UI theme
5959
// we don't care whether this works (it's an experimental feature), therefore we ignore the return values
60-
const auto libqgtk2Filename = "libqgtk2.so";
61-
const auto libqgtk2styleFilename = "libqgtk2style.so";
62-
63-
const auto libqgtk2Path = platformThemesPath / libqgtk2Filename;
64-
const auto libqgtk2stylePath = stylesPath / libqgtk2styleFilename;
65-
66-
// we need to check whether the files exist at least, otherwise the deferred deployment operation fails
67-
if (bf::is_regular_file(libqgtk2Path)) {
68-
ldLog() << "Attempting to deploy" << libqgtk2Filename << "found at path" << libqgtk2Path << std::endl;
69-
appDir.deployFile(libqgtk2Path, platformThemesDestination);
70-
} else {
71-
ldLog() << "Could not find" << libqgtk2Filename << "on system, skipping deployment" << std::endl;
60+
const auto libqgtk2Path = platformThemesPath / "libqgtk2.so";
61+
const auto libqgtk3Path = platformThemesPath / "libqgtk3.so";
62+
const auto libqxdgPath = platformThemesPath / "libqxdgdesktopportal.so";
63+
64+
for (const auto &file : {libqgtk2Path, libqgtk3Path, libqxdgPath}) {
65+
// we need to check whether the files exist at least, otherwise the deferred deployment operation fails
66+
if (bf::is_regular_file(file)) {
67+
ldLog() << "Attempting to deploy" << file.filename() << "found at path" << file.parent_path() << std::endl;
68+
appDir.deployFile(file, platformThemesDestination);
69+
} else {
70+
ldLog() << "Could not find" << file.filename() << "on system, skipping deployment" << std::endl;
71+
}
7272
}
7373

74+
const auto libqgtk2stylePath = stylesPath / "libqgtk2style.so";
7475
if (bf::is_regular_file(libqgtk2stylePath)) {
75-
ldLog() << "Attempting to deploy" << libqgtk2styleFilename << "found at path" << libqgtk2stylePath << std::endl;
76+
ldLog() << "Attempting to deploy" << libqgtk2stylePath.filename() << "found at path" << libqgtk2stylePath << std::endl;
7677
appDir.deployFile(libqgtk2stylePath, stylesDestination);
7778
} else {
78-
ldLog() << "Could not find" << libqgtk2styleFilename << "on system, skipping deployment" << std::endl;
79+
ldLog() << "Could not find" << libqgtk2stylePath.filename() << "on system, skipping deployment" << std::endl;
7980
}
8081
}
8182

0 commit comments

Comments
 (0)