From 9e61c7c269d6455901c01cd60394b1acf204f292 Mon Sep 17 00:00:00 2001 From: Tobias Hammer Date: Fri, 24 Nov 2023 16:18:40 +0100 Subject: [PATCH] Allow mixing project and dlt files directly Decide which one it is based on extension. Simplifies usage from command line when dlt and project files are grouped in directories. Signed-off-by: Tobias Hammer --- qdlt/qdltoptmanager.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/qdlt/qdltoptmanager.cpp b/qdlt/qdltoptmanager.cpp index d7fa1e9d..d461f8aa 100644 --- a/qdlt/qdltoptmanager.cpp +++ b/qdlt/qdltoptmanager.cpp @@ -342,6 +342,19 @@ void QDltOptManager::parse(QStringList *opt) log = true; qDebug()<< "Loading logfile " << logFile; } + else if(opt->at(i).endsWith(".dlp") || opt->at(i).endsWith(".DLP")) + { + if (project == true) + { + qDebug() << "\nError: Can only load one project file\n"; + printUsage(); + exit(-1); + } + + projectFile = QString("%1").arg(opt->at(i)); + project = true; + qDebug()<< "Loading projectfile " << projectFile; + } } // end of for loop printVersion(opt->at(0));