From 3f96f9fbc549b40e374334ce6842cf77106e7d3a Mon Sep 17 00:00:00 2001 From: Reion Wong Date: Tue, 1 Sep 2026 05:00:48 -0400 Subject: [PATCH] refactor(session): use QCoreApplication --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++---------- session/CMakeLists.txt | 3 --- session/application.cpp | 2 +- session/application.h | 4 ++-- session/main.cpp | 5 ----- 5 files changed, 30 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1e2700..2cafeef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,14 +11,31 @@ jobs: name: Debian runs-on: ubuntu-latest container: docker.io/library/debian:sid + steps: - - name: Checkout Source - uses: actions/checkout@v3 - - name: Update repository - run: apt-get update -y - - name: Install the basic dev packages - run: apt-get install -y equivs curl git devscripts lintian build-essential automake autotools-dev cmake g++ - - name: Install build dependencies - run: mk-build-deps -i -t "apt-get --yes" -r - - name: Build Package - run: dpkg-buildpackage -b -uc -us -j$(nproc) + - name: Install basic tools + run: | + apt-get update + apt-get install -y git ca-certificates + + - name: Checkout source + uses: actions/checkout@v4 + + - name: Install build tools + run: | + apt-get install -y \ + equivs \ + curl \ + devscripts \ + lintian \ + build-essential \ + automake \ + autotools-dev \ + cmake \ + g++ + + - name: Install build dependencies + run: mk-build-deps -i -t "apt-get --yes" -r + + - name: Build package + run: dpkg-buildpackage -b -uc -us -j$(nproc) diff --git a/session/CMakeLists.txt b/session/CMakeLists.txt index f4c7623..85be550 100644 --- a/session/CMakeLists.txt +++ b/session/CMakeLists.txt @@ -21,9 +21,6 @@ set_source_files_properties(${DBUS_SOURCES} PROPERTIES SKIP_AUTOGEN ON) add_executable(${TARGET} ${SOURCES} ${DBUS_SOURCES}) target_link_libraries(${TARGET} Qt6::Core - Qt6::Gui - Qt6::Widgets - Qt6::Quick Qt6::DBus ) diff --git a/session/application.cpp b/session/application.cpp index 5980329..bad4b71 100644 --- a/session/application.cpp +++ b/session/application.cpp @@ -81,7 +81,7 @@ void setEnvironmentVariable(const QByteArray &name, const QByteArray &value) } Application::Application(int &argc, char **argv) - : QApplication(argc, argv) + : QCoreApplication(argc, argv) , m_processManager(new ProcessManager(this)) , m_networkProxyManager(new NetworkProxyManager) { diff --git a/session/application.h b/session/application.h index 34b8d37..78f9b9d 100644 --- a/session/application.h +++ b/session/application.h @@ -20,13 +20,13 @@ #ifndef APPLICATION_H #define APPLICATION_H -#include +#include #include "processmanager.h" #include "networkproxymanager.h" #include "powermanager/power.h" -class Application : public QApplication +class Application : public QCoreApplication { Q_OBJECT diff --git a/session/main.cpp b/session/main.cpp index ba787be..55f69ce 100644 --- a/session/main.cpp +++ b/session/main.cpp @@ -18,15 +18,10 @@ */ #include "application.h" -#include int main(int argc, char *argv[]) { - - QQuickWindow::setDefaultAlphaBuffer(true); - Application a(argc, argv); - a.setQuitOnLastWindowClosed(false); return a.exec(); }