diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-15 19:41:59 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-15 19:10:21 +0000 |
commit | f8542bd1332224fe30ad2aea1388647933838cab (patch) | |
tree | e70cb05dfbe5709c738a96a2561c6c14c3353cc4 /src | |
parent | a901a48e948c2f5441095f3a3cec81760853907d (diff) |
Platform: align logging output
Change-Id: I3438e1da864f6d7c710e4770f12aa2596f091a9d
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/platform/qquickplatformdialog.cpp | 7 | ||||
-rw-r--r-- | src/imports/platform/qquickplatformmenu.cpp | 2 | ||||
-rw-r--r-- | src/imports/platform/qquickplatformmenubar.cpp | 2 | ||||
-rw-r--r-- | src/imports/platform/qquickplatformsystemtrayicon.cpp | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/src/imports/platform/qquickplatformdialog.cpp b/src/imports/platform/qquickplatformdialog.cpp index 13f40d1a..6a772940 100644 --- a/src/imports/platform/qquickplatformdialog.cpp +++ b/src/imports/platform/qquickplatformdialog.cpp @@ -371,6 +371,11 @@ static QPlatformDialogHelper *createWidgetDialog(QPlatformTheme::DialogType type return dialog; } +static const char *qmlTypeName(const QObject *object) +{ + return object->metaObject()->className() + qstrlen("QQuickPlatform"); +} + bool QQuickPlatformDialog::create() { if (!m_handle) { @@ -378,7 +383,7 @@ bool QQuickPlatformDialog::create() m_handle = QGuiApplicationPrivate::platformTheme()->createPlatformDialogHelper(m_type); if (!m_handle) m_handle = createWidgetDialog(m_type, this); - qCDebug(qtLabsPlatformDialogs) << this << "created" << m_handle; + qCDebug(qtLabsPlatformDialogs) << qmlTypeName(this) << "->" << m_handle; if (m_handle) { onCreate(m_handle); connect(m_handle, &QPlatformDialogHelper::accept, this, &QQuickPlatformDialog::accept); diff --git a/src/imports/platform/qquickplatformmenu.cpp b/src/imports/platform/qquickplatformmenu.cpp index 2ddd2872..3fb93be9 100644 --- a/src/imports/platform/qquickplatformmenu.cpp +++ b/src/imports/platform/qquickplatformmenu.cpp @@ -189,7 +189,7 @@ QPlatformMenu * QQuickPlatformMenu::create() if (!m_handle) m_handle = new QWidgetPlatformMenu; #endif - qCDebug(qtLabsPlatformMenus) << "Menu:" << m_handle; + qCDebug(qtLabsPlatformMenus) << "Menu ->" << m_handle; if (m_handle) { connect(m_handle, &QPlatformMenu::aboutToShow, this, &QQuickPlatformMenu::aboutToShow); diff --git a/src/imports/platform/qquickplatformmenubar.cpp b/src/imports/platform/qquickplatformmenubar.cpp index 8c3624cb..00630a84 100644 --- a/src/imports/platform/qquickplatformmenubar.cpp +++ b/src/imports/platform/qquickplatformmenubar.cpp @@ -112,7 +112,7 @@ QQuickPlatformMenuBar::QQuickPlatformMenuBar(QObject *parent) m_handle(nullptr) { m_handle = QGuiApplicationPrivate::platformTheme()->createPlatformMenuBar(); - qCDebug(qtLabsPlatformMenus) << "MenuBar:" << m_handle; + qCDebug(qtLabsPlatformMenus) << "MenuBar ->" << m_handle; } QQuickPlatformMenuBar::~QQuickPlatformMenuBar() diff --git a/src/imports/platform/qquickplatformsystemtrayicon.cpp b/src/imports/platform/qquickplatformsystemtrayicon.cpp index 4b39d835..39101f8a 100644 --- a/src/imports/platform/qquickplatformsystemtrayicon.cpp +++ b/src/imports/platform/qquickplatformsystemtrayicon.cpp @@ -180,7 +180,7 @@ QQuickPlatformSystemTrayIcon::QQuickPlatformSystemTrayIcon(QObject *parent) if (!m_handle) m_handle = new QWidgetPlatformSystemTrayIcon(this); #endif - qCDebug(qtLabsPlatformTray) << "SystemTrayIcon:" << m_handle; + qCDebug(qtLabsPlatformTray) << "SystemTrayIcon ->" << m_handle; if (m_handle) { connect(m_handle, &QPlatformSystemTrayIcon::activated, this, &QQuickPlatformSystemTrayIcon::activated); |