fix: make QApp first in deskflow-core
This commit is contained in:
parent
330d9baec8
commit
74440b9d7a
2 changed files with 5 additions and 8 deletions
2
.github/actions/test-package/action.yml
vendored
2
.github/actions/test-package/action.yml
vendored
|
|
@ -41,7 +41,7 @@ runs:
|
||||||
echo "Unknown like: ${{inputs.like}}"
|
echo "Unknown like: ${{inputs.like}}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
deskflow-core --version
|
QT_QPA_PLATFORM=minimal deskflow-core --version
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Unknown OS: $RUNNER_OS"
|
echo "Unknown OS: $RUNNER_OS"
|
||||||
|
|
|
||||||
|
|
@ -73,17 +73,16 @@ int main(int argc, char **argv)
|
||||||
ArchMiscWindows::setInstanceWin32(GetModuleHandle(nullptr));
|
ArchMiscWindows::setInstanceWin32(GetModuleHandle(nullptr));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QApplication::setApplicationName(QStringLiteral("%1 Core").arg(kAppName));
|
||||||
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
Arch arch;
|
Arch arch;
|
||||||
arch.init();
|
arch.init();
|
||||||
|
|
||||||
Log log;
|
Log log;
|
||||||
qInstallMessageHandler(qtMessageHandler);
|
qInstallMessageHandler(qtMessageHandler);
|
||||||
|
|
||||||
QStringList args;
|
CoreArgParser parser(QCoreApplication::arguments());
|
||||||
for (int i = 0; i < argc; i++)
|
|
||||||
args.append(argv[i]);
|
|
||||||
|
|
||||||
CoreArgParser parser(args);
|
|
||||||
|
|
||||||
// Print any parser errors
|
// Print any parser errors
|
||||||
if (!parser.errorText().isEmpty()) {
|
if (!parser.errorText().isEmpty()) {
|
||||||
|
|
@ -121,8 +120,6 @@ int main(int argc, char **argv)
|
||||||
const auto processName = QFileInfo(argv[0]).fileName();
|
const auto processName = QFileInfo(argv[0]).fileName();
|
||||||
|
|
||||||
App *coreApp = createApp(parser, events, processName);
|
App *coreApp = createApp(parser, events, processName);
|
||||||
QApplication::setApplicationName(QStringLiteral("%1 Core").arg(kAppName));
|
|
||||||
QApplication app(argc, argv);
|
|
||||||
|
|
||||||
const auto ipcServer = new deskflow::core::ipc::CoreIpcServer(&app); // NOSONAR - Qt managed
|
const auto ipcServer = new deskflow::core::ipc::CoreIpcServer(&app); // NOSONAR - Qt managed
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue