From f735820b89ea61dcfe6cef2a93c7533417b0aabd Mon Sep 17 00:00:00 2001 From: Aurindam Jana <aurindam.jana@nokia.com> Date: Mon, 26 Mar 2012 10:57:29 +0200 Subject: [PATCH] QmlDebugging: Use Utils::StyledBar Use the StyledBar instead of custom widgets in inspector and messagelog window. Change-Id: I3bb8fc3aef20caf9c6c2b3c5e214d3642f5f8397 Reviewed-by: Kai Koehne <kai.koehne@nokia.com> --- src/plugins/debugger/qtmessagelogwindow.cpp | 2 +- src/plugins/qmljsinspector/qmljsinspector.cpp | 20 +------------------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/plugins/debugger/qtmessagelogwindow.cpp b/src/plugins/debugger/qtmessagelogwindow.cpp index 3be4b73af61..0272e4e5d7d 100644 --- a/src/plugins/debugger/qtmessagelogwindow.cpp +++ b/src/plugins/debugger/qtmessagelogwindow.cpp @@ -79,7 +79,7 @@ QtMessageLogWindow::QtMessageLogWindow(QWidget *parent) vbox->setMargin(0); vbox->setSpacing(0); - QWidget *statusbarContainer = new QWidget(); + QWidget *statusbarContainer = new Utils::StyledBar(); statusbarContainer->setFixedHeight(statusBarHeight); QHBoxLayout *hbox = new QHBoxLayout(statusbarContainer); hbox->setMargin(0); diff --git a/src/plugins/qmljsinspector/qmljsinspector.cpp b/src/plugins/qmljsinspector/qmljsinspector.cpp index c872bf2b25c..af53c0c85c5 100644 --- a/src/plugins/qmljsinspector/qmljsinspector.cpp +++ b/src/plugins/qmljsinspector/qmljsinspector.cpp @@ -122,24 +122,6 @@ enum { ConnectionAttemptSimultaneousInterval = 500 }; -/** - * A widget that has the base color. - */ -class StyledBackground : public QWidget -{ -public: - explicit StyledBackground(QWidget *parent = 0) - : QWidget(parent) - {} - -protected: - void paintEvent(QPaintEvent *e) - { - QPainter p(this); - p.fillRect(e->rect(), Utils::StyleHelper::baseColor()); - } -}; - InspectorUi *InspectorUi::m_instance = 0; QmlJS::ModelManagerInterface *modelManager() @@ -739,7 +721,7 @@ void InspectorUi::setupDockWidgets() inspectorWidget->setWindowTitle(tr("QML Inspector")); inspectorWidget->setObjectName(Debugger::Constants::DOCKWIDGET_QML_INSPECTOR); - QWidget *pathAndFilterWidget = new StyledBackground; + QWidget *pathAndFilterWidget = new Utils::StyledBar(); pathAndFilterWidget->setMaximumHeight(m_crumblePath->height()); QHBoxLayout *pathAndFilterLayout = new QHBoxLayout(pathAndFilterWidget); -- GitLab