From bc6b8f33d8cfe300d21ea03b95dedeeecc610803 Mon Sep 17 00:00:00 2001 From: kirigaya Date: Thu, 28 Dec 2017 17:04:48 +0800 Subject: [PATCH] fix(DDialog): reset DLineEdit theme error Change-Id: Iee4f3be97ca4eafe39edc7ba69f00dae1f72e65a --- src/widgets/ddialog.cpp | 2 +- src/widgets/dthememanager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/ddialog.cpp b/src/widgets/ddialog.cpp index c9ce3cd30..49d4c0a47 100644 --- a/src/widgets/ddialog.cpp +++ b/src/widgets/ddialog.cpp @@ -796,7 +796,7 @@ void DDialog::childEvent(QChildEvent *event) if (child->inherits("Dtk::Widget::DLineEdit")) { DThemeManager *dtm = DThemeManager::instance(); // NOTE(sbw): want to force reset to light theme. - QString qss = dtm->getQssForWidget(child->metaObject()->className(), "light"); + QString qss = dtm->getQssForWidget("DLineEdit", "light"); child->setStyleSheet(qss); dtm->disconnect(child); diff --git a/src/widgets/dthememanager.cpp b/src/widgets/dthememanager.cpp index 68de0d4f8..dfb6cf1dc 100644 --- a/src/widgets/dthememanager.cpp +++ b/src/widgets/dthememanager.cpp @@ -161,7 +161,7 @@ QString DThemeManager::getQssForWidget(const QString className, const QString &t qss = themeFile.readAll(); themeFile.close(); } else { - qWarning() << "open qss file failed" << themeURL; + qWarning() << "open qss file failed" << themeURL << themeFile.errorString(); } return qss;