#include "informationpanel.h"
#include "informationpanelcontent.h"
+
#include <KIO/Job>
#include <KIO/JobUiDelegate>
#include <KJobWidgets>
#include <KDirNotify>
+
#include <QApplication>
#include <QShowEvent>
#include <QVBoxLayout>
if (item.isNull()) {
// The cursor is above the viewport. If files are selected,
// show information regarding the selection.
- if (m_selection.size() > 0) {
+ if (!m_selection.isEmpty()) {
m_fileItem = KFileItem();
m_infoTimer->start();
}
void InformationPanel::contextMenuEvent(QContextMenuEvent* event)
{
// TODO: Move code from InformationPanelContent::configureSettings() here
- m_content->configureSettings(customContextMenuActions());
+ m_content->configureSettings(customContextMenuActions(), event->globalPos());
Panel::contextMenuEvent(event);
}
void InformationPanel::slotFolderStatFinished(KJob* job)
{
- m_folderStatJob = 0;
+ m_folderStatJob = nullptr;
const KIO::UDSEntry entry = static_cast<KIO::StatJob*>(job)->statResult();
m_content->showItem(KFileItem(entry, m_shownUrl));
}
void InformationPanel::cancelRequest()
{
delete m_folderStatJob;
- m_folderStatJob = 0;
+ m_folderStatJob = nullptr;
m_infoTimer->stop();
m_resetUrlTimer->stop();