Core: Improve communication single-instance

This commit is contained in:
Pieter Hijma
2024-07-15 20:26:51 +02:00
parent 2364a48cb9
commit 5a029ccf0f
6 changed files with 52 additions and 36 deletions

View File

@@ -2001,10 +2001,9 @@ bool onlySingleInstance(GUISingleApplication& mainApp)
fn = QDir::cleanPath(fn);
}
QByteArray msg = fn.toUtf8();
msg.prepend("OpenFile:");
if (!mainApp.sendMessage(msg)) {
qWarning("Failed to send message to server");
fn.prepend(QLatin1String("OpenFile:"));
if (!mainApp.sendMessage(fn)) {
qWarning("Failed to send OpenFile message to server");
break;
}
}