Fix Qt compatibility and VM script docs
Updates desktop shell and application code for cross-Qt compatibility: uses begin/endFilterChange for Qt 6.10+, gates LayerShell usage to Qt < 6.5, and adds include handling for generated QML type registration files so nebula-shell builds reliably. Also fixes qInfo size formatting casts and updates README commands to invoke run-sway-vm.sh via `sh` for more portable execution.
This commit is contained in:
@@ -183,7 +183,7 @@ sway -c compositor/sway/nebula-sway.conf
|
||||
or, recommended on the VM (sets cursor env and starts Sway from the repo root):
|
||||
|
||||
```bash
|
||||
./compositor/sway/dev/run-sway-vm.sh
|
||||
sh compositor/sway/dev/run-sway-vm.sh
|
||||
```
|
||||
|
||||
That should:
|
||||
|
||||
@@ -99,6 +99,19 @@ if(TARGET NebulaApplicationsplugin)
|
||||
target_link_libraries(nebula-shell PRIVATE NebulaApplicationsplugin)
|
||||
endif()
|
||||
|
||||
# Generated nebula-shell_qmltyperegistrations.cpp includes "OutputTracker.hpp"
|
||||
# via __has_include. Keep src/ on the include path so that succeeds.
|
||||
target_include_directories(nebula-shell PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
||||
)
|
||||
|
||||
set_source_files_properties(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nebula-shell_qmltyperegistrations.cpp"
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "-include;${CMAKE_CURRENT_SOURCE_DIR}/src/OutputTracker.hpp"
|
||||
)
|
||||
|
||||
set_target_properties(nebula-shell PROPERTIES
|
||||
OUTPUT_NAME nebula-shell
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#include "DesktopIconProvider.hpp"
|
||||
|
||||
#include <LayerShellQt/Shell>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QGuiApplication>
|
||||
@@ -11,6 +9,10 @@
|
||||
#include <QUrl>
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
|
||||
#include <LayerShellQt/Shell>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
void initializeIconTheme()
|
||||
@@ -45,7 +47,9 @@ void initializeIconTheme()
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
|
||||
LayerShellQt::Shell::useLayerShell();
|
||||
#endif
|
||||
|
||||
QGuiApplication app(argc, argv);
|
||||
app.setApplicationName(QStringLiteral("nebula-shell"));
|
||||
|
||||
Reference in New Issue
Block a user