diff options
Diffstat (limited to 'src/core/services/qsysteminformationservice.cpp')
-rw-r--r-- | src/core/services/qsysteminformationservice.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/core/services/qsysteminformationservice.cpp b/src/core/services/qsysteminformationservice.cpp index 564138b23..212038eea 100644 --- a/src/core/services/qsysteminformationservice.cpp +++ b/src/core/services/qsysteminformationservice.cpp @@ -48,10 +48,13 @@ #include <QtCore/QCoreApplication> #include <QtCore/QFile> #include <QtCore/QDateTime> -#include <QtCore/QCoreApplication> +#include <QtCore/QUrl> +#include <QtCore/QDir> +#include <QtGui/QDesktopServices> #include <Qt3DCore/QAspectEngine> #include <Qt3DCore/QAbstractAspect> +#include <Qt3DCore/private/qabstractaspect_p.h> #include <Qt3DCore/private/qaspectengine_p.h> #include <Qt3DCore/private/aspectcommanddebugger_p.h> @@ -382,6 +385,11 @@ void QSystemInformationService::writePreviousFrameTraces() d->writeFrameJobLogStats(); } +void QSystemInformationService::revealLogFolder() +{ + QDesktopServices::openUrl(QUrl::fromLocalFile(QDir::currentPath())); +} + QVariant QSystemInformationService::executeCommand(const QString &command) { Q_D(QSystemInformationService); @@ -409,6 +417,22 @@ QVariant QSystemInformationService::executeCommand(const QString &command) return d->m_aspectEngine->executeCommand(command); } +void QSystemInformationService::dumpCommand(const QString &command) +{ + QVariant res = executeCommand(command); + QObject *obj = res.value<QObject *>(); + if (obj) { + auto reply = qobject_cast<Qt3DCore::Debug::AsynchronousCommandReply*>(obj); + if (reply) { + connect(reply, &Debug::AsynchronousCommandReply::finished, this, [reply]() { + qWarning() << qPrintable( QLatin1String(reply->data()) ); + }); + return; + } + } + qWarning() << res; +} + } QT_END_NAMESPACE |