Changeset 3b993fba in subsurface


Ignore:
Timestamp:
Jun 11, 2017, 1:55:41 PM (2 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
b14a522
Parents:
2d84891
git-author:
Dirk Hohndel <dirk@…> (06/05/17 23:22:19)
git-committer:
Dirk Hohndel <dirk@…> (06/11/17 13:55:41)
Message:

QML UI: adjust to modified logging API

appendTextToLog prepends the elapsed time which can be useful, so let's
not remove that but instead have it log to qDebug() instead.

Signed-off-by: Dirk Hohndel <dirk@…>

Location:
mobile-widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qmlmanager.cpp

    r78ee3f4 r3b993fba  
    121121        m_lastDevicePixelRatio = qApp->devicePixelRatio();
    122122        connect(qobject_cast<QApplication *>(QApplication::instance()), &QApplication::applicationStateChanged, this, &QMLManager::applicationStateChanged);
    123         appendTextToLog(getUserAgent());
    124         appendTextToLog(QStringLiteral("build with Qt Version %1, runtime from Qt Version %2").arg(QT_VERSION_STR).arg(qVersion()));
    125123        qDebug() << "Starting" << getUserAgent();
    126124        qDebug() << QStringLiteral("build with Qt Version %1, runtime from Qt Version %2").arg(QT_VERSION_STR).arg(qVersion());
     
    12711269        if (!timer.isValid())
    12721270                timer.start();
    1273         m_logText += "\n" + QString::number(timer.elapsed() / 1000.0,'f', 3) + ": " + newText;
    1274         emit logTextChanged();
     1271        qDebug() << QString::number(timer.elapsed() / 1000.0,'f', 3) + ": " + newText;
    12751272}
    12761273
  • mobile-widgets/qmlprofile.cpp

    r8525805 r3b993fba  
    6161        painterTransform.translate(-painterRect.width() * magicShiftFactor ,-painterRect.height() * magicShiftFactor);
    6262
    63 #if PROFILE_SCALING_DEBUG
     63#if defined(PROFILE_SCALING_DEBUG)
    6464        // some debugging messages to help adjust this in case the magic above is insufficient
    65         QMLManager::instance()->appendTextToLog(QString("dpr %1 profile viewport %2 %3 painter viewport %4 %5").arg(dpr).arg(profileRect.width()).arg(profileRect.height())
    66                                                 .arg(painterRect.width()).arg(painterRect.height()));
    67         QMLManager::instance()->appendTextToLog(QString("profile matrix %1 %2 %3 %4 %5 %6 %7 %8 %9").arg(profileTransform.m11()).arg(profileTransform.m12()).arg(profileTransform.m13())
    68                                                 .arg(profileTransform.m21()).arg(profileTransform.m22()).arg(profileTransform.m23())
    69                                                 .arg(profileTransform.m31()).arg(profileTransform.m32()).arg(profileTransform.m33()));
    70         QMLManager::instance()->appendTextToLog(QString("painter matrix %1 %2 %3 %4 %5 %6 %7 %8 %9").arg(painterTransform.m11()).arg(painterTransform.m12()).arg(painterTransform.m13())
    71                                                 .arg(painterTransform.m21()).arg(painterTransform.m22()).arg(painterTransform.m23())
    72                                                 .arg(painterTransform.m31()).arg(painterTransform.m32()).arg(painterTransform.m33()));
    73         qDebug() << "profile scaled by" << profileTransform.m11() << profileTransform.m22() << "and translated by" << profileTransform.m31() << profileTransform.m32();
     65        qDebug() << QString("dpr %1 profile viewport %2 %3 painter viewport %4 %5").arg(dpr).arg(profileRect.width()).arg(profileRect.height())
     66                    .arg(painterRect.width()).arg(painterRect.height());
     67        qDebug() << QString("profile matrix %1 %2 %3 %4 %5 %6 %7 %8 %9").arg(profileTransform.m11()).arg(profileTransform.m12()).arg(profileTransform.m13())
     68                    .arg(profileTransform.m21()).arg(profileTransform.m22()).arg(profileTransform.m23())
     69                    .arg(profileTransform.m31()).arg(profileTransform.m32()).arg(profileTransform.m33()));
     70        qDebug() << QString("painter matrix %1 %2 %3 %4 %5 %6 %7 %8 %9").arg(painterTransform.m11()).arg(painterTransform.m12()).arg(painterTransform.m13())
     71                    .arg(painterTransform.m21()).arg(painterTransform.m22()).arg(painterTransform.m23())
     72                    .arg(painterTransform.m31()).arg(painterTransform.m32()).arg(painterTransform.m33()));
    7473        qDebug() << "exist profile transform" << m_profileWidget->transform() << "painter transform" << painter->transform();
    7574#endif
Note: See TracChangeset for help on using the changeset viewer.