mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
[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
This commit is contained in:
parent
b7db272af2
commit
3b491c3ccd
|
@ -210,11 +210,9 @@ void InformationPanelContent::refreshPreview() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void InformationPanelContent::refreshMetaData() {
|
void InformationPanelContent::refreshMetaData() {
|
||||||
if (m_metaDataWidget) {
|
m_metaDataWidget->setDateFormat(static_cast<Baloo::DateFormats>(InformationPanelSettings::dateFormat()));
|
||||||
m_metaDataWidget->setDateFormat(static_cast<Baloo::DateFormats>(InformationPanelSettings::dateFormat()));
|
m_metaDataWidget->show();
|
||||||
m_metaDataWidget->show();
|
m_metaDataWidget->setItems(KFileItemList() << m_item);
|
||||||
m_metaDataWidget->setItems(KFileItemList() << m_item);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InformationPanelContent::showItems(const KFileItemList& items)
|
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()));
|
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();
|
m_phononWidget->hide();
|
||||||
|
|
||||||
|
@ -349,9 +345,7 @@ void InformationPanelContent::adjustWidgetSizes(int width)
|
||||||
|
|
||||||
// The metadata widget also contains a text widget which may return
|
// The metadata widget also contains a text widget which may return
|
||||||
// a large preferred width.
|
// a large preferred width.
|
||||||
if (m_metaDataWidget) {
|
m_metaDataWidget->setMaximumWidth(maxWidth);
|
||||||
m_metaDataWidget->setMaximumWidth(maxWidth);
|
|
||||||
}
|
|
||||||
|
|
||||||
// try to increase the preview as large as possible
|
// try to increase the preview as large as possible
|
||||||
m_preview->setSizeHint(QSize(maxWidth, maxWidth));
|
m_preview->setSizeHint(QSize(maxWidth, maxWidth));
|
||||||
|
|
Loading…
Reference in a new issue