┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/informationpanelcontent.cpp
diff options
context:
space:
mode:
authorStefan Brüns <[email protected]>2019-04-14 14:44:02 +0200
committerStefan Brüns <[email protected]>2019-04-14 14:45:00 +0200
commit3b491c3ccdaddfcf843670d3008047ebe60e0532 (patch)
treeee293238a4c617acd81e8524198c2f45aab7d475 /src/panels/information/informationpanelcontent.cpp
parentb7db272af2f20fbeeea6bba33f4ef89d1d735bb9 (diff)
[Information Panel] Remove nullptr checks for MetaDataWidget member
Summary: The widget has the same livetime as the containing widget, no need to do any extra checks. Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20514
Diffstat (limited to 'src/panels/information/informationpanelcontent.cpp')
-rw-r--r--src/panels/information/informationpanelcontent.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp
index e2b90dcc8..e694dd8a0 100644
--- a/src/panels/information/informationpanelcontent.cpp
+++ b/src/panels/information/informationpanelcontent.cpp
@@ -210,11 +210,9 @@ void InformationPanelContent::refreshPreview() {
}
void InformationPanelContent::refreshMetaData() {
- if (m_metaDataWidget) {
- m_metaDataWidget->setDateFormat(static_cast<Baloo::DateFormats>(InformationPanelSettings::dateFormat()));
- m_metaDataWidget->show();
- m_metaDataWidget->setItems(KFileItemList() << m_item);
- }
+ m_metaDataWidget->setDateFormat(static_cast<Baloo::DateFormats>(InformationPanelSettings::dateFormat()));
+ m_metaDataWidget->show();
+ m_metaDataWidget->setItems(KFileItemList() << m_item);
}
void InformationPanelContent::showItems(const KFileItemList& items)
@@ -230,9 +228,7 @@ void InformationPanelContent::showItems(const KFileItemList& items)
);
setNameLabelText(i18ncp("@label", "%1 item selected", "%1 items selected", items.count()));
- if (m_metaDataWidget) {
- m_metaDataWidget->setItems(items);
- }
+ m_metaDataWidget->setItems(items);
m_phononWidget->hide();
@@ -349,9 +345,7 @@ void InformationPanelContent::adjustWidgetSizes(int width)
// The metadata widget also contains a text widget which may return
// a large preferred width.
- if (m_metaDataWidget) {
- m_metaDataWidget->setMaximumWidth(maxWidth);
- }
+ m_metaDataWidget->setMaximumWidth(maxWidth);
// try to increase the preview as large as possible
m_preview->setSizeHint(QSize(maxWidth, maxWidth));