src/ldConfig.cpp

changeset 941
f895379d7fab
parent 931
85080f7a1c20
equal deleted inserted replaced
940:edc716c1d8e1 941:f895379d7fab
43 // 43 //
44 void LDConfigParser::parseLDConfig() 44 void LDConfigParser::parseLDConfig()
45 { 45 {
46 QFile* fp = OpenLDrawFile ("LDConfig.ldr", false); 46 QFile* fp = OpenLDrawFile ("LDConfig.ldr", false);
47 47
48 if (fp == null) 48 if (fp == nullptr)
49 { 49 {
50 Critical (QObject::tr ("Unable to open LDConfig.ldr for parsing.")); 50 Critical (QObject::tr ("Unable to open LDConfig.ldr for parsing."));
51 return; 51 return;
52 } 52 }
53 53
101 if (not faceColor.isValid() or not edgeColor.isValid()) 101 if (not faceColor.isValid() or not edgeColor.isValid())
102 continue; 102 continue;
103 103
104 // Parse alpha if given. 104 // Parse alpha if given.
105 if (ParseLDConfigTag (pars, "ALPHA", valuestr)) 105 if (ParseLDConfigTag (pars, "ALPHA", valuestr))
106 alpha = Clamp (valuestr.toInt(), 0, 255); 106 alpha = clamp (valuestr.toInt(), 0, 255);
107 107
108 LDColorData* col = new LDColorData; 108 LDColorData* col = new LDColorData;
109 col->m_name = name; 109 col->m_name = name;
110 col->m_faceColor = faceColor; 110 col->m_faceColor = faceColor;
111 col->m_edgeColor = edgeColor; 111 col->m_edgeColor = edgeColor;

mercurial