]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/infosidebarpage.cpp
differ between pasting one folder, pasting one file and pasting n items
[dolphin.git] / src / infosidebarpage.cpp
index 9430338764a5a32fb27e51a3209b09047dadaa16..f9a0b4a7ea2cf15950dfb9ff5e2f0eec60c903bf 100644 (file)
@@ -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<QVBoxLayout*>(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;