virtual void AddDetails(mozilla::dom::ProfileTimelineMarker& aMarker) override { if (GetMetaData() == TRACING_INTERVAL_START) { aMarker.mType.Construct(GetCause()); aMarker.mEventPhase.Construct(mPhase); } }
void SolveWizard::GenerateNewHighGem() { for (auto straight : this->resolvingCells) { for (auto cs : straight.gems) { // generate C2 if (cs->resolving == 2) { cs->SetColorGemTypeDir(cs->GetColor(), GemType::Cross2, DIRECTION::DIR1); cs->resolving = 0; cs->exploded = false; } // generate C3 else if (cs->resolving == 3) { cs->SetColorGemTypeDir(cs->GetColor(), GemType::Cross3, DIRECTION::DIR1); cs->resolving = 0; cs->exploded = false; } } if (straight.gems.size() < 4) continue; GemType tc = GemType::Normal; Cell *cc = GetCause(straight); // Don't forget setting direction for type Straight4 // straight is not casued by user swapping, turn the first gem of the straight if (cc == NULL) { cc = straight.gems.front(); cc->SetColorGemTypeDir(cc->GetColor(), tc, straight.direction); } // generate S4 type high gem if (straight.gems.size() == 4) { tc = GemType::Straight4; cc->SetColorGemTypeDir(cc->GetColor(), tc, this->swapDir); } if (straight.gems.size() == 5) { tc = GemType::Straight5; // S5 has unique color cc->SetColorGemTypeDir(GemColor::S5, tc, this->swapDir); } cc->resolving = 0; cc->exploded = false; } }
IStatus::Pointer StatusUtil::NewStatus(IStatus::Severity severity, const QString& message, const ctkException& exc, const Status::SourceLocation& sl) { QString statusMessage = message; if (message.isNull() || message.trimmed().isEmpty()) { if (exc.message().isEmpty()) { statusMessage = exc.what(); } else { statusMessage = exc.message(); } } IStatus::Pointer status(new Status(severity, PlatformUI::PLUGIN_ID(), severity, statusMessage, GetCause(exc), sl)); return status; }
virtual void AddDetails(mozilla::dom::ProfileTimelineMarker& aMarker) { aMarker.mType.Construct(GetCause()); aMarker.mEventPhase.Construct(mPhase); }