From bf937d9cdbe299019fcc6f279114859ee6ec2942 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Fri, 20 Jan 2023 14:24:45 -0500 Subject: [PATCH] 2023-01-20 Fred Gleason * Fixed a bug in 'RDApplication' that could cause false detection of similarly-named windows when enforcing single instances. Signed-off-by: Fred Gleason --- ChangeLog | 3 +++ lib/rdapplication.cpp | 6 ++++-- rdlogmanager/rdlogmanager.cpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 249dd346..3a5fcd0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23940,3 +23940,6 @@ 2023-01-20 Fred Gleason * Fixed a regression in rdairplay(1) that broke the 'Audition Head' and 'Audition Tail' buttons in the Full Log widget. +2023-01-20 Fred Gleason + * Fixed a bug in 'RDApplication' that could cause false detection + of similarly-named windows when enforcing single instances. diff --git a/lib/rdapplication.cpp b/lib/rdapplication.cpp index 6bc92c70..9e89993e 100644 --- a/lib/rdapplication.cpp +++ b/lib/rdapplication.cpp @@ -71,8 +71,10 @@ bool RDApplication::makeSingleInstance(QString *err_msg) split("\n",QString::SkipEmptyParts); for(int i=0;i=4) { - if(f1.at(3).trimmed().toLower()==commandName()) { + if(f1.size()>=6) { + if((f1.at(3).trimmed().toLower()==commandName())&& + (f1.at(4)==(QString("v")+VERSION))&& + (f1.at(5)=="-")) { Raise(f1.at(0)); found=true; } diff --git a/rdlogmanager/rdlogmanager.cpp b/rdlogmanager/rdlogmanager.cpp index 7f6b4ea6..beda309c 100644 --- a/rdlogmanager/rdlogmanager.cpp +++ b/rdlogmanager/rdlogmanager.cpp @@ -59,7 +59,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent) } setWindowIcon(rda->iconEngine()-> applicationIcon(RDIconEngine::RdLogManager,22)); - setWindowTitle(tr("RDLogManager")); + setWindowTitle(QString("RDLogManager v")+VERSION+" -"); // // Ensure that we're the only instance