# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "21")
-set (RELEASE_SERVICE_VERSION_MINOR "08")
-set (RELEASE_SERVICE_VERSION_MICRO "1")
+set (RELEASE_SERVICE_VERSION_MINOR "11")
+set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(Dolphin VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION "5.15.0")
-set(KF5_MIN_VERSION "5.81.0")
+set(KF5_MIN_VERSION "5.82.0")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
+ {
+ "name": "dev-disable-deprecated",
+ "displayName": "Build as without deprecated methods",
+ "generator": "Ninja",
+ "binaryDir": "${sourceDir}/build-disable-deprecated",
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Debug",
+ "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
+ "CMAKE_CXX_FLAGS_INIT": "-DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000"
+ }
+ },
{
"name": "asan",
"displayName": "Build with Asan support.",
"name": "dev",
"configurePreset": "dev"
},
+ {
+ "name": "asan",
+ "configurePreset": "asan"
+ },
+ {
+ "name": "dev-disable-deprecated",
+ "configurePreset": "dev-disable-deprecated"
+ },
+ {
+ "name": "unity",
+ "configurePreset": "unity"
+ },
{
"name": "clazy",
"configurePreset": "clazy",
kitemviews/private/kdirectorycontentscounter.cpp
kitemviews/private/kdirectorycontentscounterworker.cpp
kitemviews/private/kfileitemclipboard.cpp
- kitemviews/private/kfileitemmodeldirlister.cpp
kitemviews/private/kfileitemmodelfilter.cpp
kitemviews/private/kitemlistheaderwidget.cpp
kitemviews/private/kitemlistkeyboardsearchmanager.cpp
#include "dolphin_generalsettings.h"
#include <KPropertiesDialog>
+#include <KWindowSystem>
#include <QApplication>
#include <QDBusConnection>
{
QDBusConnection::sessionBus().registerObject(QStringLiteral("/org/freedesktop/FileManager1"), this,
QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors);
- QDBusConnection::sessionBus().interface()->registerService(QStringLiteral("org.freedesktop.FileManager1"),
- QDBusConnectionInterface::QueueService);
+ QDBusConnectionInterface *sessionInterface = QDBusConnection::sessionBus().interface();
+ if (sessionInterface) {
+ sessionInterface->registerService(QStringLiteral("org.freedesktop.FileManager1"), QDBusConnectionInterface::QueueService);
+ }
}
void DBusInterface::ShowFolders(const QStringList& uriList, const QString& startUpId)
{
- Q_UNUSED(startUpId)
const QList<QUrl> urls = Dolphin::validateUris(uriList);
if (urls.isEmpty()) {
return;
}
+ KWindowSystem::setCurrentXdgActivationToken(startUpId);
const auto serviceName = isDaemon() ? QString() : QStringLiteral("org.kde.dolphin-%1").arg(QCoreApplication::applicationPid());
if(!Dolphin::attachToExistingInstance(urls, false, GeneralSettings::splitView(), serviceName)) {
Dolphin::openNewWindow(urls);
void DBusInterface::ShowItems(const QStringList& uriList, const QString& startUpId)
{
- Q_UNUSED(startUpId)
const QList<QUrl> urls = Dolphin::validateUris(uriList);
if (urls.isEmpty()) {
return;
}
+ KWindowSystem::setCurrentXdgActivationToken(startUpId);
const auto serviceName = isDaemon() ? QString() : QStringLiteral("org.kde.dolphin-%1").arg(QCoreApplication::applicationPid());
if(!Dolphin::attachToExistingInstance(urls, true, GeneralSettings::splitView(), serviceName)) {
Dolphin::openNewWindow(urls, nullptr, Dolphin::OpenNewWindowFlag::Select);
void DBusInterface::ShowItemProperties(const QStringList& uriList, const QString& startUpId)
{
- Q_UNUSED(startUpId)
const QList<QUrl> urls = Dolphin::validateUris(uriList);
if (!urls.isEmpty()) {
+ KWindowSystem::setCurrentXdgActivationToken(startUpId);
KPropertiesDialog::showDialog(urls);
}
}
QTimer::singleShot(0, this, &DolphinMainWindow::updateOpenPreferredSearchToolAction);
m_fileItemActions.setParentWidget(this);
-#if KIO_VERSION >= QT_VERSION_CHECK(5, 82, 0)
connect(&m_fileItemActions, &KFileItemActions::error, this, [this](const QString &errorMessage) {
showErrorMessage(errorMessage);
});
-#endif
}
DolphinMainWindow::~DolphinMainWindow()
stashSplit->setToolTip(i18nc("@info", "Opens the stash virtual directory in a split window"));
stashSplit->setIcon(QIcon::fromTheme(QStringLiteral("folder-stash")));
stashSplit->setCheckable(false);
- stashSplit->setVisible(QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("org.kde.kio.StashNotifier")));
+ QDBusConnectionInterface *sessionInterface = QDBusConnection::sessionBus().interface();
+ stashSplit->setVisible(sessionInterface && sessionInterface->isServiceRegistered(QStringLiteral("org.kde.kio.StashNotifier")));
connect(stashSplit, &QAction::triggered, this, &DolphinMainWindow::toggleSplitStash);
KStandardAction::redisplay(this, &DolphinMainWindow::reloadView, actionCollection());
#include "dolphinpart_ext.h"
#include "dolphinremoveaction.h"
#include "kitemviews/kfileitemmodel.h"
-#include "kitemviews/private/kfileitemmodeldirlister.h"
#include "views/dolphinnewfilemenuobserver.h"
#include "views/dolphinremoteencoding.h"
#include "views/dolphinview.h"
#include <KAuthorized>
#include <KConfigGroup>
#include <KDialogJobUiDelegate>
+#include <KDirLister>
#include <KFileItemListProperties>
#include <KIconLoader>
#include <KJobWidgets>
// action and the separator
QList<QAction*> actions = menu()->actions();
const int count = actions.size();
- for (int i = 2; i < count; ++i) {
+ for (int i = count - 1; i >= 2; i--) {
removeAction(actions.at(i));
}
Q_EMIT closedTabsCountChanged(0);
{
bool attached = false;
- // TODO: once Wayland clients can raise or activate themselves remove check from conditional
- if (KWindowSystem::isPlatformWayland() || inputUrls.isEmpty() || !GeneralSettings::openExternallyCalledFolderInNewTab()) {
+ if (inputUrls.isEmpty() || !GeneralSettings::openExternallyCalledFolderInNewTab()) {
return false;
}
}
// Look for dolphin instances among all available dbus services.
- const QStringList dbusServices = QDBusConnection::sessionBus().interface()->registeredServiceNames().value();
+ QDBusConnectionInterface *sessionInterface = QDBusConnection::sessionBus().interface();
+ const QStringList dbusServices = sessionInterface ? sessionInterface->registeredServiceNames().value() : QStringList();
// Don't match the service without trailing "-" (unique instance)
const QString pattern = QStringLiteral("org.kde.dolphin-");
// Don't match the pid without leading "-"
#include "dolphin_generalsettings.h"
#include "dolphin_detailsmodesettings.h"
#include "dolphindebug.h"
-#include "private/kfileitemmodeldirlister.h"
#include "private/kfileitemmodelsortalgorithm.h"
-#include <kio_version.h>
+#include <KDirLister>
+#include <KIO/Job>
#include <KLocalizedString>
#include <KUrlMimeData>
loadSortingSettings();
- m_dirLister = new KFileItemModelDirLister(this);
+ m_dirLister = new KDirLister(this);
+ m_dirLister->setAutoErrorHandlingEnabled(false);
m_dirLister->setDelayedMimeTypes(true);
const QWidget* parentWidget = qobject_cast<QWidget*>(parent);
m_dirLister->setMainWindow(parentWidget->window());
}
- connect(m_dirLister, &KFileItemModelDirLister::started, this, &KFileItemModel::directoryLoadingStarted);
+ connect(m_dirLister, &KCoreDirLister::started, this, &KFileItemModel::directoryLoadingStarted);
connect(m_dirLister, QOverload<>::of(&KCoreDirLister::canceled), this, &KFileItemModel::slotCanceled);
- connect(m_dirLister, &KFileItemModelDirLister::itemsAdded, this, &KFileItemModel::slotItemsAdded);
- connect(m_dirLister, &KFileItemModelDirLister::itemsDeleted, this, &KFileItemModel::slotItemsDeleted);
- connect(m_dirLister, &KFileItemModelDirLister::refreshItems, this, &KFileItemModel::slotRefreshItems);
+ connect(m_dirLister, &KCoreDirLister::itemsAdded, this, &KFileItemModel::slotItemsAdded);
+ connect(m_dirLister, &KCoreDirLister::itemsDeleted, this, &KFileItemModel::slotItemsDeleted);
+ connect(m_dirLister, &KCoreDirLister::refreshItems, this, &KFileItemModel::slotRefreshItems);
connect(m_dirLister, QOverload<>::of(&KCoreDirLister::clear), this, &KFileItemModel::slotClear);
- connect(m_dirLister, &KFileItemModelDirLister::infoMessage, this, &KFileItemModel::infoMessage);
- connect(m_dirLister, &KFileItemModelDirLister::errorMessage, this, &KFileItemModel::errorMessage);
- connect(m_dirLister, &KFileItemModelDirLister::percent, this, &KFileItemModel::directoryLoadingProgress);
+ connect(m_dirLister, &KCoreDirLister::infoMessage, this, &KFileItemModel::infoMessage);
+ connect(m_dirLister, &KCoreDirLister::jobError, this, &KFileItemModel::slotListerError);
+ connect(m_dirLister, &KCoreDirLister::percent, this, &KFileItemModel::directoryLoadingProgress);
connect(m_dirLister, QOverload<const QUrl&, const QUrl&>::of(&KCoreDirLister::redirection), this, &KFileItemModel::directoryRedirection);
- connect(m_dirLister, &KFileItemModelDirLister::urlIsFileError, this, &KFileItemModel::urlIsFileError);
-
-#if KIO_VERSION < QT_VERSION_CHECK(5, 79, 0)
- connect(m_dirLister, QOverload<const QUrl&>::of(&KCoreDirLister::completed), this, &KFileItemModel::slotCompleted);
-#else
connect(m_dirLister, &KCoreDirLister::listingDirCompleted, this, &KFileItemModel::slotCompleted);
-#endif
// Apply default roles that should be determined
resetRoles();
int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b, const QCollator& collator) const
{
+ // This function must never return 0, because that would break stable
+ // sorting, which leads to all kinds of bugs.
+ // See: https://bugs.kde.org/show_bug.cgi?id=433247
+ // If two items have equal sort values, let the fallbacks at the bottom of
+ // the function handle it.
const KFileItem& itemA = a->item;
const KFileItem& itemB = b->item;
auto valueA = a->values.value("count");
auto valueB = b->values.value("count");
if (valueA.isNull()) {
- if (valueB.isNull()) {
- result = 0;
- break;
- } else {
- result = -1;
- break;
+ if (!valueB.isNull()) {
+ return -1;
}
} else if (valueB.isNull()) {
- result = +1;
- break;
+ return +1;
} else {
if (valueA.toLongLong() < valueB.toLongLong()) {
- result = -1;
- break;
+ return -1;
} else if (valueA.toLongLong() > valueB.toLongLong()) {
- result = +1;
- break;
- } else {
- result = 0;
- break;
+ return +1;
}
}
+ break;
}
+
KIO::filesize_t sizeA = 0;
if (itemA.isDir()) {
sizeA = a->values.value("size").toULongLong();
} else {
sizeB = itemB.size();
}
- if (sizeA > sizeB) {
- result = +1;
- } else if (sizeA < sizeB) {
- result = -1;
- } else {
- result = 0;
+ if (sizeA < sizeB) {
+ return -1;
+ } else if (sizeA > sizeB) {
+ return +1;
}
break;
}
const long long dateTimeA = itemA.entry().numberValue(KIO::UDSEntry::UDS_MODIFICATION_TIME, -1);
const long long dateTimeB = itemB.entry().numberValue(KIO::UDSEntry::UDS_MODIFICATION_TIME, -1);
if (dateTimeA < dateTimeB) {
- result = -1;
+ return -1;
} else if (dateTimeA > dateTimeB) {
- result = +1;
+ return +1;
}
break;
}
const long long dateTimeA = itemA.entry().numberValue(KIO::UDSEntry::UDS_CREATION_TIME, -1);
const long long dateTimeB = itemB.entry().numberValue(KIO::UDSEntry::UDS_CREATION_TIME, -1);
if (dateTimeA < dateTimeB) {
- result = -1;
+ return -1;
} else if (dateTimeA > dateTimeB) {
- result = +1;
+ return +1;
}
break;
}
const QDateTime dateTimeA = a->values.value("deletiontime").toDateTime();
const QDateTime dateTimeB = b->values.value("deletiontime").toDateTime();
if (dateTimeA < dateTimeB) {
- result = -1;
+ return -1;
} else if (dateTimeA > dateTimeB) {
- result = +1;
+ return +1;
}
break;
}
const QString roleValueA = a->values.value(role).toString();
const QString roleValueB = b->values.value(role).toString();
if (!roleValueA.isEmpty() && roleValueB.isEmpty()) {
- result = -1;
+ return -1;
} else if (roleValueA.isEmpty() && !roleValueB.isEmpty()) {
- result = +1;
+ return +1;
} else if (isRoleValueNatural(m_sortRole)) {
result = stringCompare(roleValueA, roleValueB, collator);
} else {
return true;
}
+
+void KFileItemModel::slotListerError(KIO::Job *job)
+{
+ if (job->error() == KIO::ERR_IS_FILE) {
+ if (auto *listJob = qobject_cast<KIO::ListJob *>(job)) {
+ Q_EMIT urlIsFileError(listJob->url());
+ }
+ } else {
+ const QString errorString = job->errorString();
+ Q_EMIT errorMessage(!errorString.isEmpty() ? errorString : i18nc("@info:status", "Unknown error."));
+ }
+}
#include <functional>
-class KFileItemModelDirLister;
+class KDirLister;
+
class QTimer;
+namespace KIO {
+ class Job;
+}
+
/**
* @brief KItemModelBase implementation for KFileItems.
*
void slotRefreshItems(const QList<QPair<KFileItem, KFileItem> >& items);
void slotClear();
void slotSortingChoiceChanged();
+ void slotListerError(KIO::Job *job);
void dispatchPendingItemsToInsert();
bool isConsistent() const;
private:
- KFileItemModelDirLister* m_dirLister;
+ KDirLister *m_dirLister = nullptr;
QCollator m_collator;
bool m_naturalSorting;
void KStandardItemListWidgetInformant::calculateDetailsLayoutItemSizeHints(QVector<qreal>& logicalHeightHints, qreal& logicalWidthHint, const KItemListView* view) const
{
const KItemListStyleOption& option = view->styleOption();
- const qreal height = option.padding * 2 + qMax(option.iconSize, option.fontMetrics.height());
- logicalHeightHints.fill(height);
+
+ float zoomLevel = 1;
+ if (option.iconSize >= KIconLoader::SizeEnormous) {
+ zoomLevel = 2;
+ } else if (option.iconSize >= KIconLoader::SizeHuge) {
+ zoomLevel = 1.8;
+ } else if (option.iconSize >= KIconLoader::SizeLarge) {
+ zoomLevel = 1.6;
+ } else if (option.iconSize >= KIconLoader::SizeMedium) {
+ zoomLevel = 1.4;
+ } else if (option.iconSize >= KIconLoader::SizeSmallMedium) {
+ zoomLevel = 1.2;
+ }
+
+ const qreal contentHeight = qMax<qreal>(option.iconSize, zoomLevel * option.fontMetrics.height());
+ logicalHeightHints.fill(contentHeight + 2 * option.padding);
logicalWidthHint = -1.0;
}
+++ /dev/null
-/*
- * SPDX-FileCopyrightText: 2006-2012 Peter Penz <peter.penz19@gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-#include "kfileitemmodeldirlister.h"
-
-#include <KLocalizedString>
-#include <KIO/Job>
-#include <kio_version.h>
-
-KFileItemModelDirLister::KFileItemModelDirLister(QObject* parent) :
- KDirLister(parent)
-{
-#if KIO_VERSION < QT_VERSION_CHECK(5, 82, 0)
- setAutoErrorHandlingEnabled(false, nullptr);
-#else
- setAutoErrorHandlingEnabled(false);
-#endif
-}
-
-KFileItemModelDirLister::~KFileItemModelDirLister()
-{
-}
-
-void KFileItemModelDirLister::handleError(KIO::Job* job)
-{
- if (job->error() == KIO::ERR_IS_FILE) {
- Q_EMIT urlIsFileError(url());
- } else {
- const QString errorString = job->errorString();
- if (errorString.isEmpty()) {
- Q_EMIT errorMessage(i18nc("@info:status", "Unknown error."));
- } else {
- Q_EMIT errorMessage(errorString);
- }
- }
-}
-
+++ /dev/null
-/*
- * SPDX-FileCopyrightText: 2006-2012 Peter Penz <peter.penz19@gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-#ifndef KFILEITEMMODELDIRLISTER_H
-#define KFILEITEMMODELDIRLISTER_H
-
-#include "dolphin_export.h"
-
-#include <KDirLister>
-
-#include <QUrl>
-
-/**
- * @brief Extends the class KDirLister by emitting a signal when an
- * error occurred instead of showing an error dialog.
- * KDirLister::autoErrorHandlingEnabled() is set to false.
- */
-class DOLPHIN_EXPORT KFileItemModelDirLister : public KDirLister
-{
- Q_OBJECT
-
-public:
- explicit KFileItemModelDirLister(QObject* parent = nullptr);
- ~KFileItemModelDirLister() override;
-
-Q_SIGNALS:
- /** Is emitted whenever an error has occurred. */
- void errorMessage(const QString& msg);
-
- /**
- * Is emitted when the URL of the directory lister represents a file.
- * In this case no signal errorMessage() will be emitted.
- */
- void urlIsFileError(const QUrl& url);
-
-protected:
- void handleError(KIO::Job* job) override;
-};
-
-#endif
#include <KLocalizedString>
#include <Kdelibs4ConfigMigrator>
#include <KConfigGui>
+#include <KIO/PreviewJob>
#include <QApplication>
#include <QCommandLineParser>
QApplication app(argc, argv);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon()));
+ KIO::PreviewJob::setDefaultDevicePixelRatio(app.devicePixelRatio());
+
KCrash::initialize();
Kdelibs4ConfigMigrator migrate(QStringLiteral("dolphin"));
mainWindow->show();
- KDBusService dolphinDBusService;
+ // Allow starting Dolphin on a system that is not running DBus:
+ KDBusService::StartupOptions serviceOptions = KDBusService::Multiple;
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ serviceOptions |= KDBusService::NoExitOnFailure;
+ }
+ KDBusService dolphinDBusService(serviceOptions);
DBusInterface interface;
if (!app.isSessionRestored()) {
<summary xml:lang="zh-TW">檔案管理員</summary>
<description>
<p>Dolphin is KDE's file manager that lets you navigate and browse the contents of your hard drives, USB sticks, SD cards, and more. Creating, moving, or deleting files and folders is simple and fast.</p>
+ <p xml:lang="ar">دولفين هو مدير ملفات كدي الذي يتيح لك التنقل وتصفح محتويات محركات الأقراص الثابتة و USB وبطاقات SD والمزيد. يعد إنشاء الملفات والمجلدات أو نقلها أو حذفها أمرًا بسيطًا وسريعًا.</p>
<p xml:lang="az">Dolphin sizin sərt disklərinizin, USB yaddaş qurğularınızın, SD katlarınızın və s. tərkibindəkiləri nəzərdən keçirmənizə imkan verən fayl meneceridir. Faylların və qovluqların yaradılması, Köçürülməsi və ya silinməsi sadə, rahat və cəld icra edilir.</p>
<p xml:lang="ca">El Dolphin és el gestor de fitxers del KDE que permet navegar i explorar el contingut dels discs durs, memòries USB, targetes SD i més. Crear, moure o suprimir fitxers i carpetes és senzill i ràpid.</p>
<p xml:lang="de">Dolphin ist die Dateiverwaltung von KDE und ermöglicht es Ihnen, den Inhalt Ihrer Festplatten, USB-Sticks, SD-Speicherkarten und anderen Geräten einzusehen. Das Erstellen, Verschieben und Löschen von Dateien und Ordnern funktioniert einfach und schnell.</p>
<p xml:lang="x-test">xxDolphin is KDE's file manager that lets you navigate and browse the contents of your hard drives, USB sticks, SD cards, and more. Creating, moving, or deleting files and folders is simple and fast.xx</p>
<p xml:lang="zh-CN">Dolphin 是 KDE 的文件管理器,您可以使用它来浏览硬盘、U 盘、SD 卡和其他存储设备中的内容,也可以方便快捷地创建、移动、删除文件和文件夹。</p>
<p>Dolphin contains plenty of productivity features that will save you time. The multiple tabs and split view features allow navigating multiple folders at the same time, and you can easily drag and drop files between views to move or copy them. Dolphin's right-click menu provides with many quick actions that let you compress, share, and duplicate files, among many other things. You can also add your own custom actions.</p>
+ <p xml:lang="ar">يحتوي دولفين على الكثير من ميزات الإنتاجية التي ستوفر لك الوقت.تسمح علامات التبويب المتعددة وميزات العرض المقسم بالتنقل في مجلدات متعددة في نفس الوقت ، ويمكنك بسهولة سحب الملفات وإفلاتها بين طرق العرض لنقلها أو نسخها. توفر قائمة النقر بزر الفأرة الأيمن في دولفين العديد من الإجراءات السريعة التي تتيح لك ضغط الملفات ومشاركتها وتكرارها ، من بين أشياء أخرى كثيرة. يمكنك أيضًا إضافة الإجراءات المخصصة الخاصة بك.</p>
<p xml:lang="az">Dolphin, səmərəliyi artıracaq bir çox funksiyalardan ibarətdir və bu da sizə vaxtınıza qənaət edəcəkdir. Birdən çox vərəq və bölünmə funksiyaları, qovluqlar arasında rahat hərəkət etməyə imkan verir, həmçinin, siz faylları, həmin görünən qovluqlar arasında tutub yerini dəyişməklə köçürə və kopyalaya bilərsiniz. Siçanın sağ düyməsi ilə açılan Dolpin menyusunda faylları sıxmağa, paylaşmağa, yeni surətini yaratmağa və bu kimi başqa bir çox cəld əməlləri təqdim edir. Bundan başqa siz həmçinin öz fərdi əməlinizi də bu menyuya daxil edə bilərsiniz.</p>
<p xml:lang="ca">El Dolphin conté moltes característiques de productivitat que us estalviaran temps. Les característiques de múltiples pestanyes i de vista dividida permeten navegar per diverses carpetes al mateix temps, i poder arrossegar i deixar anar els fitxers amb facilitat entre les vistes per a moure'ls o copiar-los. El menú contextual del Dolphin ofereix moltes accions ràpides que us permeten comprimir, compartir i duplicar els fitxers, entre moltes altres coses. També podreu afegir-hi les vostres pròpies accions personalitzades.</p>
<p xml:lang="de">Dolphin beinhaltet eine Vielzahl von Produktivitätsfunktionen, die Ihnen Zeit sparen. Dank Registerkarten und geteilten Ansichten können Sie in mehreren Ordnern gleichzeitig navigieren und Sie können einfach Dateien zwischen verschiedenen Ansichten mittels Ziehen kopieren oder verschieben. Dolphins Kontextmenü bietet viele Schnellzugriffe zu Aktionen, mit denen Sie Dateien unter anderem komprimieren, teilen und duplizieren können. Sie können außerdem eigene Aktionen hinzufügen.</p>
<p xml:lang="x-test">xxDolphin contains plenty of productivity features that will save you time. The multiple tabs and split view features allow navigating multiple folders at the same time, and you can easily drag and drop files between views to move or copy them. Dolphin's right-click menu provides with many quick actions that let you compress, share, and duplicate files, among many other things. You can also add your own custom actions.xx</p>
<p xml:lang="zh-CN">Dolphin 内建了许多有助于提高工作效率的功能。多标签页窗口、拆分视图等功能可以让您同时浏览多个文件夹,还可以在标签页和拆分的视图之间拖放、复制、移动文件。Dolphin 的右键菜单内建了许多快捷操作功能,例如压缩、分享、创建文件的副本等。您还可以将自定义操作添加到右键菜单。</p>
<p>Dolphin is very lightweight, but at the same time, you can adapt it to your specific needs. This means that you can carry out your file management exactly the way you want to. Dolphin supports three different view modes: a classic grid view of all the files, a more detailed view, and a tree view. You can also configure most of Dolphin's behavior.</p>
+ <p xml:lang="ar">دولفين خفيف للغاية ، ولكن في نفس الوقت، يمكنك تكييفه مع احتياجاتك الخاصة. هذا يعني أنه يمكنك تنفيذ إدارة الملفات بالطريقة التي تريدها بالضبط. يدعم دولفين ثلاثة أوضاع عرض مختلفة: عرض الشبكة الكلاسيكي لجميع الملفات ، وعرض أكثر تفصيلاً ، وعرض شجرة. يمكنك أيضًا ضبط معظم سلوك دولفين. </p>
<p xml:lang="az">Dolphin çox yüngüldür, bununla belə siz onu öz ehtiyaclarınıza uyğunlaşdıra bilərsiniz. Bu o deməkdir ki, siz fayllarınızı istədiyiniz kimi idarə edə bilərsiniz. Dolphin üç müxtəlif baxış rejimini dəstəkləyir: bütün faylları üçün şəbəkə formasında klassik görünüş, budaqlanan şəkildə daha təfərrüatlı baxış forması. Siz həmçinin daha çox Dolphin davranışlarını tənzimləyə bilərsiniz.</p>
<p xml:lang="ca">El Dolphin és molt lleuger, però al mateix temps, podreu adaptar-lo a les vostres necessitats específiques. Això significa que podreu realitzar la gestió de fitxers exactament de la manera que vulgueu. El Dolphin admet tres modes de vista diferents: una vista de quadrícula clàssica amb tots els fitxers, una vista més detallada i una vista en arbre. També podreu configurar la major part del comportament del Dolphin.</p>
<p xml:lang="de">Dolphin ist sehr leichtgewichtig, kann dabei aber dennoch an Ihre spezifischen Bedürfnisse angepasst werden. Das bedeutet, dass Sie Ihre Dateiverwaltung so vornehmen können, wie Sie es wollen. Dolphin bietet drei unterschiedliche Ansichtsmodi: eine klassische Rasteransicht aller Dateien mit Symbolen, eine detailliertere Ansicht sowie eine Baumansicht. Sie können außerdem einen großen Teil des Verhaltens von Dolphin anpassen.</p>
<p xml:lang="x-test">xxDolphin is very lightweight, but at the same time, you can adapt it to your specific needs. This means that you can carry out your file management exactly the way you want to. Dolphin supports three different view modes: a classic grid view of all the files, a more detailed view, and a tree view. You can also configure most of Dolphin's behavior.xx</p>
<p xml:lang="zh-CN">Dolphin 虽然是一款轻量级的应用程序,但依然支持用户按照自己的需要对界面和功能进行深入定制,让文件管理操作更加得心应手。Dolphin 的文件视图有三种模式:经典的图标网格模式、简洁的紧凑模式、显示多栏元数据的详情模式。Dolphin 的绝大多数程序行为都能进行配置。</p>
<p>Dolphin can display files and folders from many Internet cloud services and other remote machines as if they were right there on your desktop.</p>
+ <p xml:lang="ar">يمكن لدولفين عرض الملفات والمجلدات من العديد من خدمات الإنترنت السحابية والأجهزة البعيدة الأخرى كما لو كانت موجودة على سطح المكتب.</p>
<p xml:lang="az">Dolphin, bir çox İnternet və digər uzaq maşınların bulud xidmətindən faylları və qovluqları birbaşa sizin İş Masanızdakı kimi göstərəcəkdir.</p>
<p xml:lang="ca">El Dolphin pot mostrar els fitxers i carpetes de molts serveis en el núvol d'Internet i altres màquines remotes com si hi estiguessin al vostre escriptori.</p>
<p xml:lang="de">Dolphin kann Dateien und Ordner vieler Internet-Clouddienste und anderer entfernter Maschinen anzeigen, als wären sie direkt lokal auf Ihrem Rechner.</p>
<p xml:lang="x-test">xxDolphin can display files and folders from many Internet cloud services and other remote machines as if they were right there on your desktop.xx</p>
<p xml:lang="zh-CN">Dolphin 可以显示多种云存储服务和远程计算机中的文件和文件夹,使用体验与本机文件完全一致。</p>
<p>Dolphin also comes with an integrated terminal that allows you to run commands on the current folder. You can extend the capabilities of Dolphin even further with powerful plugins to adapt it to your workflow. You can use the git integration plugin to interact with git repositories, or the Nextcloud plugin to synchronize your files online, and much more.</p>
+ <p xml:lang="ar">يأتي دولفين أيضًا مع محطة طرفية متكاملة تتيح لك تشغيل الأوامر في المجلد الحالي. يمكنك توسيع إمكانيات دولفين إلى أبعد من ذلك باستخدام المكونات الإضافية القوية لتكييفها مع سير عملك. يمكنك استخدام المكون الإضافي git للتكامل للتفاعل مع مستودعات git ، أو المكون الإضافي Nextcloud لمزامنة ملفاتك عبر الإنترنت ، وغير ذلك الكثير.</p>
<p xml:lang="az">Dolphin həmçinin daxilə quraşdırılmış terminalla təmin olunur ki, bu da cari qovluqda əmrləri başlatmağa imkan verir. Siz, Dolphinin imkanlarını iş prosesinizə uyğunlaşdıracaq, güclü qoşmaların köməyi ilə daha da genişləndirə bilərsiniz. Sİz git repazitoriyaları ilə işləmək üçün, qoşulmuş git inteqrasiya modulundan və ya fayllarınızı internet üzərindən sinxronlaşdırmaq üçün Nextcloud qoşmasından və s. istifadə edə bilərsiniz.</p>
<p xml:lang="ca">El Dolphin també ve amb un terminal integrat que permet executar ordres a la carpeta actual. Podreu estendre encara més les capacitats de Dolphin amb potents connectors per a que s'adapti al vostre flux de treball. Podreu utilitzar el connector d'integració amb el Git per a interactuar amb els repositoris de Git, o el connector de Nextcloud per a sincronitzar els vostres fitxers en línia, i molt més.</p>
<p xml:lang="de">Dolphin beinhaltet ein integriertes Terminal, in welchem Sie Befehle im aktuellen Ordner ausführen können. Sie können die Fähigkeiten von Dolphin mit zusätzlichen Modulen noch weiter ausbauen, um ihn an Ihre Arbeitsweise anzupassen. Sie können durch das Integrationsmodul für Git mit Git-Repositorys interagieren, mit dem Nextcloud-Modul Ihre Dateien online synchronisieren und vieles mehr.</p>
<screenshots>
<screenshot type="default">
<caption>File management in Dolphin</caption>
+ <caption xml:lang="ar">إدارة الملفات في دولفين</caption>
<caption xml:lang="ast">Xestión de ficheros en Dolphin</caption>
<caption xml:lang="az">Dolphində faylların idarə edilməsi</caption>
<caption xml:lang="ca">Gestió de fitxers al Dolphin</caption>
</screenshot>
<screenshot type="default">
<caption>Embedded Terminal in Dolphin</caption>
+ <caption xml:lang="ar">طرفية مضمنة في دولفين</caption>
<caption xml:lang="az">Dolphin daxilinə yerləşdirilmiş Terminal</caption>
<caption xml:lang="ca">Terminal incrustat en el Dolphin</caption>
<caption xml:lang="cs">Zabudovaný terminál v Dolphinu</caption>
</screenshot>
<screenshot>
<caption>Dolphin lets you configure your file manager exactly how you want</caption>
+ <caption xml:lang="ar">يتيح لك دولفين ضبط مدير الملفات الخاص بك بالطريقة التي تريدها بالضبط</caption>
<caption xml:lang="az">Dolphin, fayl bələdçisini tam istədiyiniz kimi tənzimləməyə imkan verir</caption>
<caption xml:lang="ca">El Dolphin permet configurar el gestor de fitxers exactament com es vol</caption>
<caption xml:lang="de">Mit Dolphin können Sie Ihre Dateiverwaltung genau so einrichten, wie Sie es wünschen</caption>
// adds a play arrow
// compute relative pixel positions
- const int zeroX = static_cast<int>(p.width() / 2 - PLAY_ARROW_SIZE / 2 / devicePixelRatio());
- const int zeroY = static_cast<int>(p.height() / 2 - PLAY_ARROW_SIZE / 2 / devicePixelRatio());
+ const int zeroX = static_cast<int>((p.width() / 2 - PLAY_ARROW_SIZE / 2) / pixmap.devicePixelRatio());
+ const int zeroY = static_cast<int>((p.height() / 2 - PLAY_ARROW_SIZE / 2) / pixmap.devicePixelRatio());
QPolygon arrow;
arrow << QPoint(zeroX, zeroY);
#include <QTabWidget>
#include <QVBoxLayout>
-K_PLUGIN_FACTORY(KCMDolphinGeneralConfigFactory, registerPlugin<DolphinGeneralConfigModule>(QStringLiteral("dolphingeneral"));)
+K_PLUGIN_FACTORY(KCMDolphinGeneralConfigFactory, registerPlugin<DolphinGeneralConfigModule>();)
DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget *parent, const QVariantList &args) :
KCModule(parent, args),
X-KDE-ServiceTypes=KCModule
X-KDE-Library=kcm_dolphingeneral
-X-KDE-PluginKeyword=dolphingeneral
X-DocPath=dolphin/configuring-dolphin.html#preferences-dialog
# ctxt: Random file browsing settings.
Name=General
#include <QVBoxLayout>
-K_PLUGIN_FACTORY(KCMDolphinNavigationConfigFactory, registerPlugin<DolphinNavigationConfigModule>(QStringLiteral("dolphinnavigation"));)
+K_PLUGIN_FACTORY(KCMDolphinNavigationConfigFactory, registerPlugin<DolphinNavigationConfigModule>();)
DolphinNavigationConfigModule::DolphinNavigationConfigModule(QWidget *parent, const QVariantList &args) :
KCModule(parent, args),
X-KDE-ServiceTypes=KCModule
X-KDE-Library=kcm_dolphinnavigation
-X-KDE-PluginKeyword=dolphinnavigation
X-DocPath=dolphin/configuring-dolphin.html#preferences-dialog-navigation
Name=Navigation
Name[ar]=التّنقّل
#include <QTabWidget>
#include <QVBoxLayout>
-K_PLUGIN_FACTORY(KCMDolphinViewModesConfigFactory, registerPlugin<DolphinViewModesConfigModule>(QStringLiteral("dolphinviewmodes"));)
+K_PLUGIN_FACTORY(KCMDolphinViewModesConfigFactory, registerPlugin<DolphinViewModesConfigModule>();)
DolphinViewModesConfigModule::DolphinViewModesConfigModule(QWidget *parent, const QVariantList &args) :
KCModule(parent, args),
X-KDE-ServiceTypes=KCModule
X-KDE-Library=kcm_dolphinviewmodes
-X-KDE-PluginKeyword=dolphinviewmodes
X-DocPath=dolphin/configuring-dolphin.html#preferences-dialog-viewmodes
Name=View Modes
Name[ar]=أوضاع المنظور
#include "kitemviews/kfileitemlistview.h"
#include "kitemviews/kfileitemmodel.h"
-#include "kitemviews/private/kfileitemmodeldirlister.h"
#include "testdir.h"
+#include <KDirLister>
+
#include <QGraphicsView>
#include <QTest>
#include <QSignalSpy>
#include <QTimer>
#include <QMimeData>
+#include <KDirLister>
#include <kio/job.h>
#include "kitemviews/kfileitemmodel.h"
-#include "kitemviews/private/kfileitemmodeldirlister.h"
#include "testdir.h"
void myMessageOutput(QtMsgType type, const QMessageLogContext& context, const QString& msg)
// The trash icon must always be updated dependent on whether
// the trash is empty or not. We use a KDirLister that automatically
// watches for changes if the number of items has been changed.
-#if KIO_VERSION < QT_VERSION_CHECK(5, 82, 0)
- m_trashDirLister->setAutoErrorHandlingEnabled(false, nullptr);
-#else
m_trashDirLister->setAutoErrorHandlingEnabled(false);
-#endif
m_trashDirLister->setDelayedMimeTypes(true);
auto trashDirContentChanged = [this]() {
bool isTrashEmpty = m_trashDirLister->items().isEmpty();
#include "dolphinview.h"
+#include "dolphin_compactmodesettings.h"
#include "dolphin_detailsmodesettings.h"
+#include "dolphin_iconsmodesettings.h"
#include "dolphin_generalsettings.h"
#include "dolphinitemlistview.h"
#include "dolphinnewfilemenuobserver.h"
void DolphinView::resetZoomLevel()
{
- ViewModeSettings::ViewMode mode;
-
+ // TODO : Switch to using ViewModeSettings after MR #256 is merged
+ int defaultIconSize = KIconLoader::SizeSmall;
switch (m_mode) {
- case IconsView: mode = ViewModeSettings::IconsMode; break;
- case CompactView: mode = ViewModeSettings::CompactMode; break;
- case DetailsView: mode = ViewModeSettings::DetailsMode; break;
+ case IconsView:
+ IconsModeSettings::self()->useDefaults(true);
+ defaultIconSize = IconsModeSettings::iconSize();
+ IconsModeSettings::self()->useDefaults(false);
+ break;
+ case DetailsView:
+ DetailsModeSettings::self()->useDefaults(true);
+ defaultIconSize = DetailsModeSettings::iconSize();
+ DetailsModeSettings::self()->useDefaults(false);
+ break;
+ case CompactView:
+ CompactModeSettings::self()->useDefaults(true);
+ defaultIconSize = CompactModeSettings::iconSize();
+ CompactModeSettings::self()->useDefaults(false);
+ break;
+ default:
+ Q_ASSERT(false);
+ break;
}
- const ViewModeSettings settings(mode);
- const QSize iconSize = QSize(settings.iconSize(), settings.iconSize());
- setZoomLevel(ZoomLevelInfo::zoomLevelForIconSize(iconSize));
+
+ setZoomLevel(ZoomLevelInfo::zoomLevelForIconSize(QSize(defaultIconSize, defaultIconSize)));
}
void DolphinView::observeCreatedItem(const QUrl& url)