| 102 | static const int IDE_SETTING_DEFAULT = -1; |
| 103 | |
| 104 | QStyle *gammarayStyleOverride() |
| 105 | { |
| 106 | const auto styleNameOverride = qEnvironmentVariable("GAMMARAY_STYLE"); |
| 107 | if (styleNameOverride.isEmpty()) { |
| 108 | return nullptr; |
| 109 | } |
| 110 | |
| 111 | if (!QStyleFactory::keys().contains(styleNameOverride)) { |
| 112 | qWarning() << "Style" << styleNameOverride << "does not exit (enabled by GAMMARAY_STYLE environment variable)"; |
| 113 | qWarning() << "Existing styles: " << QStyleFactory::keys(); |
| 114 | } |
| 115 | |
| 116 | return QStyleFactory::create(styleNameOverride); |
| 117 | } |
| 118 | |
| 119 | QStyle *gammarayDefaultStyle() |
| 120 | { |