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}}"
|
||||
exit 1
|
||||
fi
|
||||
deskflow-core --version
|
||||
QT_QPA_PLATFORM=minimal deskflow-core --version
|
||||
|
||||
else
|
||||
echo "Unknown OS: $RUNNER_OS"
|
||||
|
|
|
|||
|
|
@ -73,17 +73,16 @@ int main(int argc, char **argv)
|
|||
ArchMiscWindows::setInstanceWin32(GetModuleHandle(nullptr));
|
||||
#endif
|
||||
|
||||
QApplication::setApplicationName(QStringLiteral("%1 Core").arg(kAppName));
|
||||
QApplication app(argc, argv);
|
||||
|
||||
Arch arch;
|
||||
arch.init();
|
||||
|
||||
Log log;
|
||||
qInstallMessageHandler(qtMessageHandler);
|
||||
|
||||
QStringList args;
|
||||
for (int i = 0; i < argc; i++)
|
||||
args.append(argv[i]);
|
||||
|
||||
CoreArgParser parser(args);
|
||||
CoreArgParser parser(QCoreApplication::arguments());
|
||||
|
||||
// Print any parser errors
|
||||
if (!parser.errorText().isEmpty()) {
|
||||
|
|
@ -121,8 +120,6 @@ int main(int argc, char **argv)
|
|||
const auto processName = QFileInfo(argv[0]).fileName();
|
||||
|
||||
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
|
||||
QObject::connect(
|
||||
|
|
|
|||
Loading…
Reference in a new issue