X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/613a132a3697db603bca593a36f91ee3f9ccafdd..bd925ea49a7e4e7c6e652f4529dcd0c4e25fd19a:/src/infosidebarpage.cpp diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index 943033876..f9a0b4a7e 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -54,7 +54,7 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) : m_preview(0), m_nameLabel(0), m_infoLabel(0), - m_metadataWidget(0) + m_metaDataWidget(0) { const int spacing = KDialog::spacingHint(); @@ -85,7 +85,7 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) : m_infoLabel->setFont(KGlobalSettings::smallestReadableFont()); if (MetaDataWidget::metaDataAvailable()) { - m_metadataWidget = new MetaDataWidget(this); + m_metaDataWidget = new MetaDataWidget(this); } layout->addItem(new QSpacerItem(spacing, spacing, QSizePolicy::Preferred, QSizePolicy::Fixed)); @@ -93,9 +93,9 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) : layout->addWidget(m_nameLabel); layout->addWidget(new KSeparator(this)); layout->addWidget(m_infoLabel); - if (m_metadataWidget != 0) { + if (m_metaDataWidget != 0) { layout->addWidget(new KSeparator(this)); - layout->addWidget(m_metadataWidget); + layout->addWidget(m_metaDataWidget); } // ensure that widgets in the information side bar are aligned towards the top layout->addStretch(1); @@ -172,17 +172,6 @@ void InfoSidebarPage::resizeEvent(QResizeEvent* event) // try to increase the preview as large as possible m_preview->setSizeHint(QSize(maxWidth, maxWidth)); - - // --- - // TODO: The following workaround was not necessary with Qt 4.3.x - // but is mandatory with the current Qt4.4 beta version. Check with - // Qt 4.4.0 whether the issue is Dolphin specific - // (see PixmapViewer::setSizeHint()) or a regression in Qt. - QVBoxLayout* vBox = static_cast(layout()); - vBox->removeWidget(m_preview); - vBox->insertWidget(0, m_preview); - // --- - m_urlCandidate = m_shownUrl; // reset the URL candidate if a resizing is done m_timer->start(TimerDelay); @@ -346,16 +335,16 @@ void InfoSidebarPage::showMetaInfo() } } - if (MetaDataWidget::metaDataAvailable()) { - m_metadataWidget->setFile(fileItem.url()); + if (m_metaDataWidget != 0) { + m_metaDataWidget->setFile(fileItem.url()); } } else { - if (MetaDataWidget::metaDataAvailable()) { + if (m_metaDataWidget != 0) { KUrl::List urls; foreach (const KFileItem& item, selectedItems) { urls.append(item.url()); } - m_metadataWidget->setFiles(urls); + m_metaDataWidget->setFiles(urls); } unsigned long int totalSize = 0;