logic: Fixed log warnings of color scheme and edge

* fixed warnings for overriden node and edge colors
* fixed warnings for edges connecting the wrong node types
* removed tool tip from color scheme
* changed names in project setup screen
This commit is contained in:
Eberhard Graether
2015-12-16 11:33:59 +01:00
parent a44af51122
commit f06bb0e031
18 changed files with 60 additions and 39 deletions
+8
View File
@@ -28,6 +28,8 @@ std::string ColorScheme::getNodeTypeColor(Node::NodeType type, const std::string
std::string ColorScheme::getNodeTypeColor(const std::string& typeStr, const std::string& key, ColorState state) const
{
disableWarnings();
std::string type = getValue<std::string>("graph/node/" + typeStr + "/like", typeStr);
std::string color = getValue<std::string>("graph/node/" + type + "/" + key + "/" + stateToString(state), "");
@@ -41,6 +43,8 @@ std::string ColorScheme::getNodeTypeColor(const std::string& typeStr, const std:
color = getValue<std::string>("graph/node/default/" + key + "/" + stateToString(state), "");
}
enableWarnings();
if (!color.size() && state != NORMAL)
{
color = getValue<std::string>("graph/node/default/" + key + "/" + stateToString(NORMAL), "#FFFFFF");
@@ -56,6 +60,8 @@ std::string ColorScheme::getEdgeTypeColor(Edge::EdgeType type, ColorState state)
std::string ColorScheme::getEdgeTypeColor(const std::string& typeStr, ColorState state) const
{
disableWarnings();
std::string type = getValue<std::string>("graph/edge/" + typeStr + "/like", typeStr);
std::string color = getValue<std::string>("graph/edge/" + type + "/" + stateToString(state), "");
@@ -69,6 +75,8 @@ std::string ColorScheme::getEdgeTypeColor(const std::string& typeStr, ColorState
color = getValue<std::string>("graph/edge/default/" + stateToString(state), "");
}
enableWarnings();
if (!color.size() && state != NORMAL)
{
color = getValue<std::string>("graph/edge/default/" + stateToString(NORMAL), "#FFFFFF");
+1
View File
@@ -14,6 +14,7 @@ std::vector<std::string> ProjectSettings::getDefaultSourceExtensions()
defaultValues.push_back(".cpp");
defaultValues.push_back(".cxx");
defaultValues.push_back(".cc");
defaultValues.push_back(".c");
return defaultValues;
}
+10
View File
@@ -136,3 +136,13 @@ bool Settings::moveRelativePathValues(const std::string& key, const FilePath& fi
return setValues(key, values);
}
void Settings::enableWarnings() const
{
m_config->setWarnOnEmptyKey(true);
}
void Settings::disableWarnings() const
{
m_config->setWarnOnEmptyKey(false);
}
+3
View File
@@ -43,6 +43,9 @@ protected:
bool setPathValues(const std::string& key, const std::vector<FilePath>& paths);
bool moveRelativePathValues(const std::string& key, const FilePath& filePath);
void enableWarnings() const;
void disableWarnings() const;
private:
FilePath m_filePath;
std::shared_ptr<ConfigManager> m_config;