]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/information/informationpanelcontent.cpp
Fix build.
[dolphin.git] / src / panels / information / informationpanelcontent.cpp
index ee5e350af5e0afc0b3b92e4a83d966c2f9c6430f..1e660d5c98d27790aa8c7c56c779b4f2d81336db 100644 (file)
@@ -36,7 +36,7 @@
 #ifndef HAVE_BALOO
 #include <KFileMetaDataWidget>
 #else
-#include <baloo/filemetadatawidget.h>
+#include <Baloo/FileMetaDataWidget>
 #endif
 
 #include <panels/places/placesitem.h>
@@ -83,8 +83,8 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
     m_outdatedPreviewTimer = new QTimer(this);
     m_outdatedPreviewTimer->setInterval(300);
     m_outdatedPreviewTimer->setSingleShot(true);
-    connect(m_outdatedPreviewTimer, SIGNAL(timeout()),
-            this, SLOT(markOutdatedPreview()));
+    connect(m_outdatedPreviewTimer, &QTimer::timeout,
+            this, &InformationPanelContent::markOutdatedPreview);
 
     QVBoxLayout* layout = new QVBoxLayout(this);
     layout->setSpacing(KDialog::spacingHint());
@@ -99,8 +99,8 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
     m_phononWidget = new PhononWidget(parent);
     m_phononWidget->hide();
     m_phononWidget->setMinimumWidth(minPreviewWidth);
-    connect(m_phononWidget, SIGNAL(hasVideoChanged(bool)),
-            this, SLOT(slotHasVideoChanged(bool)));
+    connect(m_phononWidget, &PhononWidget::hasVideoChanged,
+            this, &InformationPanelContent::slotHasVideoChanged);
 
     // name
     m_nameLabel = new QLabel(parent);
@@ -116,12 +116,15 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
 
 #ifndef HAVE_BALOO
     m_metaDataWidget = new KFileMetaDataWidget(parent);
+    connect(m_metaDataWidget, &KFileMetaDataWidget::urlActivated,
+            this, &InformationPanelContent::urlActivated);
 #else
     m_metaDataWidget = new Baloo::FileMetaDataWidget(parent);
+    connect(m_metaDataWidget, &Baloo::FileMetaDataWidget::urlActivated,
+            this, &InformationPanelContent::urlActivated);
 #endif
     m_metaDataWidget->setFont(KGlobalSettings::smallestReadableFont());
     m_metaDataWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
-    connect(m_metaDataWidget, SIGNAL(urlActivated(KUrl)), this, SIGNAL(urlActivated(KUrl)));
 
     // Encapsulate the MetaDataWidget inside a container that has a dummy widget
     // at the bottom. This prevents that the meta data widget gets vertically stretched
@@ -198,10 +201,10 @@ void InformationPanelContent::showItem(const KFileItem& item)
                 KJobWidgets::setWindow(m_previewJob, this);
             }
 
-            connect(m_previewJob, SIGNAL(gotPreview(KFileItem,QPixmap)),
-                    this, SLOT(showPreview(KFileItem,QPixmap)));
-            connect(m_previewJob, SIGNAL(failed(KFileItem)),
-                    this, SLOT(showIcon(KFileItem)));
+            connect(m_previewJob.data(), &KIO::PreviewJob::gotPreview,
+                    this, &InformationPanelContent::showPreview);
+            connect(m_previewJob.data(), &KIO::PreviewJob::failed,
+                    this, &InformationPanelContent::showIcon);
         }
     }
 
@@ -273,6 +276,10 @@ bool InformationPanelContent::eventFilter(QObject* obj, QEvent* event)
         adjustWidgetSizes(parentWidget()->width());
         break;
 
+    case QEvent::FontChange:
+        m_metaDataWidget->setFont(KGlobalSettings::smallestReadableFont());
+        break;
+
     default:
         break;
     }
@@ -317,7 +324,7 @@ void InformationPanelContent::configureSettings(const QList<QAction*>& customCon
         dialog->show();
         dialog->raise();
         dialog->activateWindow();
-        connect(dialog, SIGNAL(destroyed()), this, SLOT(refreshMetaData()));
+        connect(dialog, &FileMetaDataConfigurationDialog::destroyed, this, &InformationPanelContent::refreshMetaData);
     }
 }