MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / updateStyle

Method updateStyle

src/moapplication.cpp:640–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638} // namespace
639
640void MOApplication::updateStyle(const QString& fileName)
641{
642 if (QStyleFactory::keys().contains(fileName)) {
643 setStyleSheet("");
644 setStyle(new ProxyStyle(QStyleFactory::create(fileName)));
645 } else {
646 QFile stylesheet(fileName);
647 if (stylesheet.exists()) {
648 setStyle(new ProxyStyle(QStyleFactory::create(
649 extractBaseStyleFromStyleSheet(stylesheet, m_defaultStyle))));
650 setStyleSheet(QString("file:///%1").arg(fileName));
651 } else {
652 log::warn("invalid stylesheet: {}", fileName);
653 }
654 }
655}
656
657MOSplash::MOSplash(const Settings& settings, const QString& dataPath,
658 const MOBase::IPluginGame* game)

Callers

nothing calls this directly

Calls 3

QStringClass · 0.85
existsMethod · 0.45

Tested by

no test coverage detected