2023-01-20 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in 'RDApplication' that could cause false detection
	of similarly-named windows when enforcing single instances.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2023-01-20 14:24:45 -05:00
parent acc5e2d73f
commit bf937d9cdb
3 changed files with 8 additions and 3 deletions

View File

@@ -71,8 +71,10 @@ bool RDApplication::makeSingleInstance(QString *err_msg)
split("\n",QString::SkipEmptyParts);
for(int i=0;i<f0.size();i++) {
QStringList f1=f0.at(i).split(" ",QString::SkipEmptyParts);
if(f1.size()>=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;
}