Reorganize the backend directory #2

Merged
JoshStrobl merged 9 commits from backend-reorganization into main 2025-10-25 17:22:00 +02:00
Owner

While there are no functional changes, this is a pretty significant overhaul of the former backend. It now more closely follows other Qt projects, which should make it easier for people familiar with Qt to contribute. I also performed some general cleanup, like adding SPDX headers to all files. I would recommend looking at each commit to gain a more clear understanding of the changes.

There are still a couple of items that I am unsure of:

  • I feel like there is a better name for the Backend class (and backend.cpp/backend.hpp), I just don't know what it is yet.
  • The files in the layout and output directories can probably be moved up one level. I don't think there's a real good reason to have them live in subdirectories, myself.

Depends on #1

While there are no functional changes, this is a pretty significant overhaul of the former backend. It now more closely follows other Qt projects, which should make it easier for people familiar with Qt to contribute. I also performed some general cleanup, like adding SPDX headers to all files. I would recommend looking at each commit to gain a more clear understanding of the changes. There are still a couple of items that I am unsure of: - I feel like there is a better name for the Backend class (and `backend.cpp`/`backend.hpp`), I just don't know what it is yet. - The files in the `layout` and `output` directories can probably be moved up one level. I don't think there's a real good reason to have them live in subdirectories, myself. Depends on https://forge.moderndesktop.dev/BuddiesOfBudgie/budgie-display-configurator/pulls/1
This makes the CMake structure more like other CMake projects. This
should make it easier to work with if/when new parts or modules are
added to the project.

Changes:

- Required dependencies are declared in the root
- Desktop file is installed by the root CMake file
- Remove unused dependency on KIconTheme
- Remove `INCLUDE_QUIET_PACKAGES` from the summary (See
  https://github.com/EbonJaeger/bluejay/pull/42. It's also steadily
  being removed from other KDE projects.)

Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
At the same time, I changed the connection state enum to be a normal
QObject enum class.

Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
We really have no need to have anything inside of a namespace. Let's do
away with the slightly added complexity, and have a couple of shorter
lines.

Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
Even though we're not doing anything special, they should be defined.

Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
JoshStrobl left a comment
Owner

Seems like sensible changes to me. Some notes based off our discussion in Matrix as well as some from review:

  • We agreed on some renames, so those could probably be done: LayoutManager -> Layout.
  • Rename LayoutManager.{hpp,cpp} to layout.{hpp,cpp}.
  • Maybe we can rename DaemonConnectionState to ConnectionState (having it in bd namespace would be good :P), there isn't really anything else it's connecting to so the original verbosity is unnecessary.
  • Good idea having it in dedicated enums folder. 💯
  • TIL about the specific way of defining enums via the class + Q_ENUM. Shame it has to be that verbose.
  • Not sure what to think of the removal of using the bd namespace (though I could see it being renamed from bd since bd atm is already used by budgie-daemon, possibly bdc?). That's been intentional to avoid polluting the global namespace and risk collisions. It's not unlikely to happen, but something trivially avoidable by namespacing. 🤔
Seems like sensible changes to me. Some notes based off our discussion in Matrix as well as some from review: - We agreed on some renames, so those could probably be done: LayoutManager -> Layout. - Rename `LayoutManager.{hpp,cpp}` to `layout.{hpp,cpp}`. - Maybe we can rename `DaemonConnectionState` to `ConnectionState` (having it in bd namespace would be good :P), there isn't really anything else it's connecting to so the original verbosity is unnecessary. - Good idea having it in dedicated enums folder. 💯 - TIL about the _specific_ way of defining enums via the class + Q_ENUM. Shame it has to be that verbose. - Not sure what to think of the removal of using the `bd` namespace (though I could see it being renamed from `bd` since `bd` atm is already used by `budgie-daemon`, possibly `bdc`?). That's been intentional to avoid polluting the global namespace and risk collisions. It's not unlikely to happen, but something trivially avoidable by namespacing. 🤔
EbonJaeger force-pushed backend-reorganization from 07aea49f80 to e461d06de7 2025-10-21 19:38:41 +02:00 Compare
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
EbonJaeger changed title from WIP: Reorganize the backend directory to Reorganize the backend directory 2025-10-25 17:07:28 +02:00
JoshStrobl deleted branch backend-reorganization 2025-10-25 17:22:06 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Depends on
#1 build: Re-organize CMake files
BuddiesOfBudgie/budgie-display-configurator
Reference
BuddiesOfBudgie/budgie-display-configurator!2
No description provided.