Exemple #1
0
void QQmlMemoryScope::init(const char *string)
{
    if (memprofile_is_enabled()) {
        memprofile_push_location(string, 0);
        pushed = true;
    }
}
Exemple #2
0
QQmlMemoryScope::QQmlMemoryScope(const char *string) : pushed(false)
{
    if (openLibrary() && memprofile_is_enabled()) {
        memprofile_push_location(string, 0);
        pushed = true;
    }
}
Exemple #3
0
bool QQmlMemoryProfiler::isEnabled()
{
    if (QQmlMemoryScope::openLibrary())
        return memprofile_is_enabled();

    return false;
}
QQmlMemoryScope::QQmlMemoryScope(const QUrl &url) : pushed(false)
{
    if (openLibrary() && memprofile_is_enabled()) {
        memprofile_push_location(url.path().toUtf8().constData(), 0);
        pushed = true;
    }
}