MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / defaultStyle

Method defaultStyle

lib/QCodeEditor/src/internal/QSyntaxStyle.cpp:140–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140QSyntaxStyle *QSyntaxStyle::defaultStyle()
141{
142 static QSyntaxStyle style;
143
144 if (!style.isLoaded())
145 {
146 Q_INIT_RESOURCE(qcodeeditor_resources);
147 QFile fl(":/default_style.xml");
148
149 if (!fl.open(QIODevice::ReadOnly))
150 {
151 return &style;
152 }
153
154 if (!style.load(fl.readAll()))
155 {
156 qDebug() << "Can't load default style.";
157 }
158 }
159
160 return &style;
161}

Callers

nothing calls this directly

Calls 3

isLoadedMethod · 0.45
openMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected