Skip to content

Commit

Permalink
Allow mixing project and dlt files directly
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tohammer committed Dec 19, 2023
1 parent e8b6bb9 commit 9e61c7c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions qdlt/qdltoptmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 9e61c7c

Please sign in to comment.