logic: errorview fix non index errors, use filepath instead of string in
commandline parser <description>
This commit is contained in:
@@ -51,6 +51,10 @@ void prefillJavaRuntimePath()
|
|||||||
settings->setJavaPath(paths.front().str());
|
settings->setJavaPath(paths.front().str());
|
||||||
settings->save();
|
settings->save();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "no javapath" << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,6 +140,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!checker->isCurrentLicenseValid()) // this works because the user cannot enter a license string while running the app in headless more.
|
if (!checker->isCurrentLicenseValid()) // this works because the user cannot enter a license string while running the app in headless more.
|
||||||
{
|
{
|
||||||
|
std::cout << "No or invalide License" << std::endl;
|
||||||
LOG_WARNING("Your current Coati license seems to be invalid. Please update your license info.");
|
LOG_WARNING("Your current Coati license seems to be invalid. Please update your license info.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ void CommandLineParser::processProjectfile(const std::string& file)
|
|||||||
|
|
||||||
if (isValidProjectfile)
|
if (isValidProjectfile)
|
||||||
{
|
{
|
||||||
m_projectFile = projectfile.absolute().str();
|
m_projectFile = projectfile;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -176,11 +176,10 @@ void CommandLineParser::processProjectfile(const std::string& file)
|
|||||||
|
|
||||||
void CommandLineParser::projectLoad()
|
void CommandLineParser::projectLoad()
|
||||||
{
|
{
|
||||||
FilePath path(m_projectFile); // todo: use filepath as datatype for m_projectFile
|
if (m_projectFile.exists() && m_projectFile.extension() == ".coatiproject")
|
||||||
if (path.exists() && path.extension() == ".coatiproject")
|
|
||||||
{
|
{
|
||||||
MessageDispatchWhenLicenseValid(
|
MessageDispatchWhenLicenseValid(
|
||||||
std::make_shared<MessageLoadProject>(path.str(), m_force)
|
std::make_shared<MessageLoadProject>(m_projectFile.str(), m_force)
|
||||||
).dispatch();
|
).dispatch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "License.h"
|
#include "License.h"
|
||||||
|
#include "utility/file/FilePath.h"
|
||||||
|
|
||||||
class CommandLineParser
|
class CommandLineParser
|
||||||
{
|
{
|
||||||
@@ -19,7 +20,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void processProjectfile(const std::string& file);
|
void processProjectfile(const std::string& file);
|
||||||
void processLicense(const bool isLoaded);
|
void processLicense(const bool isLoaded);
|
||||||
std::string m_projectFile;
|
FilePath m_projectFile;
|
||||||
|
|
||||||
bool m_force;
|
bool m_force;
|
||||||
bool m_quit;
|
bool m_quit;
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ bool QtErrorView::isShownError(const StorageError& error)
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (error.fatal && !error.indexed && m_showNonIndexedErrors->checkState() == Qt::Checked)
|
if (!error.fatal && !error.indexed && m_showNonIndexedErrors->checkState() == Qt::Checked)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user