logic: errorview fix non index errors, use filepath instead of string in
commandline parser <description>
This commit is contained in:
@@ -166,7 +166,7 @@ void CommandLineParser::processProjectfile(const std::string& file)
|
||||
|
||||
if (isValidProjectfile)
|
||||
{
|
||||
m_projectFile = projectfile.absolute().str();
|
||||
m_projectFile = projectfile;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -176,11 +176,10 @@ void CommandLineParser::processProjectfile(const std::string& file)
|
||||
|
||||
void CommandLineParser::projectLoad()
|
||||
{
|
||||
FilePath path(m_projectFile); // todo: use filepath as datatype for m_projectFile
|
||||
if (path.exists() && path.extension() == ".coatiproject")
|
||||
if (m_projectFile.exists() && m_projectFile.extension() == ".coatiproject")
|
||||
{
|
||||
MessageDispatchWhenLicenseValid(
|
||||
std::make_shared<MessageLoadProject>(path.str(), m_force)
|
||||
std::make_shared<MessageLoadProject>(m_projectFile.str(), m_force)
|
||||
).dispatch();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
#include "Application.h"
|
||||
#include "License.h"
|
||||
#include "utility/file/FilePath.h"
|
||||
|
||||
class CommandLineParser
|
||||
{
|
||||
@@ -19,7 +20,7 @@ public:
|
||||
private:
|
||||
void processProjectfile(const std::string& file);
|
||||
void processLicense(const bool isLoaded);
|
||||
std::string m_projectFile;
|
||||
FilePath m_projectFile;
|
||||
|
||||
bool m_force;
|
||||
bool m_quit;
|
||||
|
||||
Reference in New Issue
Block a user