avoid depend on qGuiApp directly

This commit is contained in:
2025-12-24 15:47:15 +08:00
parent cc79c9b9e2
commit b8f5165fc4
8 changed files with 531 additions and 29 deletions

22
xcbthread.h Normal file
View File

@@ -0,0 +1,22 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QThread>
#include <xcb/xcb.h>
namespace tray {
class XcbThread : public QThread {
Q_OBJECT
public:
XcbThread(xcb_connection_t *connection, QObject *parent = nullptr);
~XcbThread();
void run() override;
private:
xcb_connection_t *m_connection;
};
}