logic: errorview fix non index errors, use filepath instead of string in

commandline parser

<description>
This commit is contained in:
Andreas Stallinger
2016-10-17 11:19:39 +02:00
parent 730eebe13a
commit 4e0ebaef12
4 changed files with 11 additions and 6 deletions
+5
View File
@@ -51,6 +51,10 @@ void prefillJavaRuntimePath()
settings->setJavaPath(paths.front().str());
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.
{
std::cout << "No or invalide License" << std::endl;
LOG_WARNING("Your current Coati license seems to be invalid. Please update your license info.");
return 0;
}
@@ -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;
+1 -1
View File
@@ -252,7 +252,7 @@ bool QtErrorView::isShownError(const StorageError& error)
{
return true;
}
if (error.fatal && !error.indexed && m_showNonIndexedErrors->checkState() == Qt::Checked)
if (!error.fatal && !error.indexed && m_showNonIndexedErrors->checkState() == Qt::Checked)
{
return true;
}