| 941 | } |
| 942 | |
| 943 | std::shared_ptr<LaunchProfile> PackProfile::getProfile() const |
| 944 | { |
| 945 | if(!d->m_profile) |
| 946 | { |
| 947 | try |
| 948 | { |
| 949 | auto profile = std::make_shared<LaunchProfile>(); |
| 950 | for(auto file: d->components) |
| 951 | { |
| 952 | qDebug() << "Applying" << file->getID() << (file->getProblemSeverity() == ProblemSeverity::Error ? "ERROR" : "GOOD"); |
| 953 | file->applyTo(profile.get()); |
| 954 | } |
| 955 | d->m_profile = profile; |
| 956 | } |
| 957 | catch (const Exception &error) |
| 958 | { |
| 959 | qWarning() << "Couldn't apply profile patches because: " << error.cause(); |
| 960 | } |
| 961 | } |
| 962 | return d->m_profile; |
| 963 | } |
| 964 | |
| 965 | bool PackProfile::setComponentVersion(const QString& uid, const QString& version, bool important) |
| 966 | { |
no test coverage detected