mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Fix a bunch of Qt6/Kf6 warnings
This commit is contained in:
parent
d6da4a903f
commit
5887d1d852
|
@ -538,7 +538,7 @@ void DolphinMainWindow::showTarget()
|
|||
const KFileItem link = m_activeViewContainer->view()->selectedItems().at(0);
|
||||
const QUrl destinationUrl = link.url().resolved(QUrl(link.linkDest()));
|
||||
|
||||
auto job = KIO::statDetails(destinationUrl, KIO::StatJob::SourceSide, KIO::StatNoDetails);
|
||||
auto job = KIO::stat(destinationUrl, KIO::StatJob::SourceSide, KIO::StatNoDetails);
|
||||
|
||||
connect(job, &KJob::finished, this, [this, destinationUrl](KJob *job) {
|
||||
KIO::StatJob *statJob = static_cast<KIO::StatJob *>(job);
|
||||
|
|
|
@ -392,7 +392,7 @@ void DolphinTabWidget::tabDropEvent(int index, QDropEvent *event)
|
|||
const auto urls = event->mimeData()->urls();
|
||||
|
||||
for (const QUrl &url : urls) {
|
||||
auto *job = KIO::statDetails(url, KIO::StatJob::SourceSide, KIO::StatDetail::StatBasic, KIO::JobFlag::HideProgressInfo);
|
||||
auto *job = KIO::stat(url, KIO::StatJob::SourceSide, KIO::StatDetail::StatBasic, KIO::JobFlag::HideProgressInfo);
|
||||
connect(job, &KJob::result, this, [this, job]() {
|
||||
if (!job->error() && job->statResult().isDir()) {
|
||||
openNewTab(job->url(), QUrl(), NewTabPosition::AtEnd);
|
||||
|
|
|
@ -2565,7 +2565,7 @@ QList<QPair<int, QVariant>> KFileItemModel::permissionRoleGroups() const
|
|||
if (info.permission(QFile::ExeUser)) {
|
||||
user += i18nc("@item:intext Access permission, concatenated", "Execute, ");
|
||||
}
|
||||
user = user.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : user.mid(0, user.count() - 2);
|
||||
user = user.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : user.mid(0, user.length() - 2);
|
||||
|
||||
// Set group string
|
||||
QString group;
|
||||
|
@ -2578,7 +2578,7 @@ QList<QPair<int, QVariant>> KFileItemModel::permissionRoleGroups() const
|
|||
if (info.permission(QFile::ExeGroup)) {
|
||||
group += i18nc("@item:intext Access permission, concatenated", "Execute, ");
|
||||
}
|
||||
group = group.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : group.mid(0, group.count() - 2);
|
||||
group = group.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : group.mid(0, group.length() - 2);
|
||||
|
||||
// Set others string
|
||||
QString others;
|
||||
|
@ -2591,7 +2591,7 @@ QList<QPair<int, QVariant>> KFileItemModel::permissionRoleGroups() const
|
|||
if (info.permission(QFile::ExeOther)) {
|
||||
others += i18nc("@item:intext Access permission, concatenated", "Execute, ");
|
||||
}
|
||||
others = others.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : others.mid(0, others.count() - 2);
|
||||
others = others.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : others.mid(0, others.length() - 2);
|
||||
|
||||
const QString newGroupValue = i18nc("@title:group Files and folders by permissions", "User: %1 | Group: %2 | Others: %3", user, group, others);
|
||||
if (newGroupValue != groupValue) {
|
||||
|
|
|
@ -112,7 +112,7 @@ QHash<QByteArray, QVariant> KBalooRolesProvider::roleValues(const Baloo::File &f
|
|||
});
|
||||
values.insert(role, propertyInfo.formatAsDisplayString(list));
|
||||
} else {
|
||||
if (propertyInfo.valueType() == QVariant::DateTime) {
|
||||
if (propertyInfo.valueTypeId() == QMetaType::Type::DateTime) {
|
||||
// Let dolphin format later Dates
|
||||
values.insert(role, (*rangeBegin).second);
|
||||
} else {
|
||||
|
|
|
@ -244,7 +244,7 @@ void InformationPanel::showItemInfo()
|
|||
// No item is hovered and no selection has been done: provide
|
||||
// an item for the currently shown directory.
|
||||
m_shownUrl = url();
|
||||
m_folderStatJob = KIO::statDetails(m_shownUrl, KIO::StatJob::SourceSide, KIO::StatDefaultDetails | KIO::StatRecursiveSize, KIO::HideProgressInfo);
|
||||
m_folderStatJob = KIO::stat(m_shownUrl, KIO::StatJob::SourceSide, KIO::StatDefaultDetails | KIO::StatRecursiveSize, KIO::HideProgressInfo);
|
||||
if (m_folderStatJob->uiDelegate()) {
|
||||
KJobWidgets::setWindow(m_folderStatJob, this);
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ void StartupSettingsPage::applySettings()
|
|||
|
||||
const QUrl url(QUrl::fromUserInput(m_homeUrl->text(), QString(), QUrl::AssumeLocalFile));
|
||||
if (url.isValid() && KProtocolManager::supportsListing(url)) {
|
||||
KIO::StatJob *job = KIO::statDetails(url, KIO::StatJob::SourceSide, KIO::StatDetail::StatBasic, KIO::JobFlag::HideProgressInfo);
|
||||
KIO::StatJob *job = KIO::stat(url, KIO::StatJob::SourceSide, KIO::StatDetail::StatBasic, KIO::JobFlag::HideProgressInfo);
|
||||
connect(job, &KJob::result, this, [this, settings, url](KJob *job) {
|
||||
if (job->error() == 0 && qobject_cast<KIO::StatJob *>(job)->statResult().isDir()) {
|
||||
settings->setHomeUrl(url.toDisplayString(QUrl::PreferLocalFile));
|
||||
|
|
|
@ -87,7 +87,7 @@ void DolphinRemoteEncoding::fillMenu()
|
|||
QMenu *menu = m_menu->menu();
|
||||
menu->clear();
|
||||
|
||||
menu->addAction(i18n("Default"), this, SLOT(slotDefault()), 0)->setCheckable(true);
|
||||
menu->addAction(i18n("Default"), this, &DolphinRemoteEncoding::slotDefault)->setCheckable(true);
|
||||
for (int i = 0; i < m_encodingDescriptions.size(); i++) {
|
||||
QAction *action = new QAction(m_encodingDescriptions.at(i), this);
|
||||
action->setCheckable(true);
|
||||
|
@ -96,7 +96,7 @@ void DolphinRemoteEncoding::fillMenu()
|
|||
}
|
||||
menu->addSeparator();
|
||||
|
||||
menu->addAction(i18n("Reload"), this, SLOT(slotReload()), 0);
|
||||
menu->addAction(i18n("Reload"), this, &DolphinRemoteEncoding::slotReload);
|
||||
m_idDefault = m_encodingDescriptions.size() + 2;
|
||||
|
||||
connect(menu, &QMenu::triggered, this, &DolphinRemoteEncoding::slotItemSelected);
|
||||
|
|
|
@ -623,7 +623,7 @@ void DolphinView::requestStatusBarText()
|
|||
return;
|
||||
}
|
||||
|
||||
m_statJobForStatusBarText = KIO::statDetails(m_model->rootItem().url(), KIO::StatJob::SourceSide, KIO::StatRecursiveSize, KIO::HideProgressInfo);
|
||||
m_statJobForStatusBarText = KIO::stat(m_model->rootItem().url(), KIO::StatJob::SourceSide, KIO::StatRecursiveSize, KIO::HideProgressInfo);
|
||||
connect(m_statJobForStatusBarText, &KJob::result, this, &DolphinView::slotStatJobResult);
|
||||
m_statJobForStatusBarText->start();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue