aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/fancyactionbar.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2019-10-15 14:08:02 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2019-10-16 08:16:23 +0000
commite90a48e639af0c4a01f78a78ca3b33aef4f0a114 (patch)
tree0cc8e8fb44ee1776bf1ed6b309833f595c9f1d90 /src/plugins/coreplugin/fancyactionbar.cpp
parent42fba8ee3bee257974058e2c41f38f6dd77c6e23 (diff)
ProjectExplorer: Fix some problems with plugin unloading
It was not possible to return false from ProjectExplorerPlugin::initialize() without triggering crashes. Change-Id: I96b2f80c835e69769f64f9b9c61f473e9ff88623 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/fancyactionbar.cpp')
-rw-r--r--src/plugins/coreplugin/fancyactionbar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp
index 03f28778f6..284b68fdae 100644
--- a/src/plugins/coreplugin/fancyactionbar.cpp
+++ b/src/plugins/coreplugin/fancyactionbar.cpp
@@ -176,7 +176,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
: QIcon::Disabled;
QRect iconRect(0, 0, Constants::MODEBAR_ICON_SIZE, Constants::MODEBAR_ICON_SIZE);
- const bool isTitledAction = defaultAction()->property("titledAction").toBool();
+ const bool isTitledAction = defaultAction() && defaultAction()->property("titledAction").toBool();
// draw popup texts
if (isTitledAction && !m_iconsOnly) {
QFont normalFont(painter.font());
@@ -286,7 +286,7 @@ QSize FancyToolButton::sizeHint() const
}
QSizeF buttonSize = iconSize().expandedTo(QSize(64, 38));
- if (defaultAction()->property("titledAction").toBool()) {
+ if (defaultAction() && defaultAction()->property("titledAction").toBool()) {
QFont boldFont(font());
boldFont.setPointSizeF(StyleHelper::sidebarFontSize());
boldFont.setBold(true);