Skip to content

Commit

Permalink
Move bundled presets install path to match decoration kcm .so path
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmcauley committed Oct 19, 2024
1 parent 11b65be commit 81dce7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kdecoration/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ target_link_libraries(kcm_klassydecoration
kcmutils_generate_desktop_file(kcm_klassydecoration)

#install bundled presets
install(DIRECTORY presets DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/plasma/kcms/klassy)
install(DIRECTORY presets DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/org.kde.kdecoration2.kcm/klassydecoration)
6 changes: 3 additions & 3 deletions libbreezecommon/presetsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ bool PresetsModel::isKeyValid(const QString &key)
return false;
}

// copies bundled presets in /usr/lib64/qt5/plugins/plasma/kcms/klassy/presets into ~/.config/klassy/klassyrc once per release
// copies bundled presets in /usr/lib64/qt6/plugins/org.kde.kdecoration2.kcm/klassydecoration/presets into ~/.config/klassy/klassyrc once per release
void PresetsModel::importBundledPresets(KConfig *presetsConfig)
{
// don't copy if BundledWindecoPresetsImportedVersion has been set for the current release version
Expand All @@ -359,14 +359,14 @@ void PresetsModel::importBundledPresets(KConfig *presetsConfig)
}
}

// qDebug() << "librarypaths: " << QCoreApplication::libraryPaths(); //librarypaths: ("/usr/lib64/qt5/plugins", "/usr/bin")
// qDebug() << "librarypaths: " << QCoreApplication::libraryPaths(); //librarypaths: ("/usr/lib64/qt6/plugins", "/usr/bin")

// delete bundled presets from a previous release first
// if the user modified the preset it will not contain the BundledPreset flag and hence won't be deleted
PresetsModel::deleteBundledPresets(presetsConfig);

for (QString libraryPath : QCoreApplication::libraryPaths()) {
libraryPath += "/plasma/kcms/klassy/presets";
libraryPath += "/org.kde.kdecoration2.kcm/klassydecoration/presets";
QDir presetsDir(libraryPath);
if (presetsDir.exists()) {
QStringList filters;
Expand Down

0 comments on commit 81dce7f

Please sign in to comment.