┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--src/dolphincontextmenu.cpp72
-rw-r--r--src/dolphindockwidget.cpp4
-rw-r--r--src/dolphinmainwindow.cpp20
-rw-r--r--src/dolphinpart.cpp1
-rw-r--r--src/dolphinpart.desktop2
-rw-r--r--src/dolphintabwidget.cpp9
-rw-r--r--src/dolphintabwidget.h2
-rw-r--r--src/dolphinviewcontainer.cpp3
-rw-r--r--src/icons/128-system-file-manager.pngbin0 -> 11652 bytes
-rw-r--r--src/icons/16-system-file-manager.pngbin0 -> 566 bytes
-rw-r--r--src/icons/22-system-file-manager.pngbin0 -> 802 bytes
-rw-r--r--src/icons/32-system-file-manager.pngbin0 -> 1273 bytes
-rw-r--r--src/icons/48-system-file-manager.pngbin0 -> 3145 bytes
-rw-r--r--src/icons/64-system-file-manager.pngbin0 -> 4522 bytes
-rw-r--r--src/kitemviews/kfileitemlistwidget.cpp2
-rw-r--r--src/kitemviews/kfileitemmodel.cpp76
-rw-r--r--src/kitemviews/kfileitemmodel.h6
-rw-r--r--src/kitemviews/kfileitemmodelrolesupdater.cpp2
-rw-r--r--src/kitemviews/kitemlistcontainer.cpp2
-rw-r--r--src/kitemviews/kitemlistcontroller.h2
-rw-r--r--src/kitemviews/kitemlistwidget.cpp4
-rw-r--r--src/kitemviews/private/kbaloorolesprovider.cpp1
-rw-r--r--src/kitemviews/private/kfileitemmodeldirlister.h2
-rw-r--r--src/kitemviews/private/kitemlistheaderwidget.h16
-rw-r--r--src/kitemviews/private/kitemlistroleeditor.h6
-rw-r--r--src/kitemviews/private/kitemlistselectiontoggle.h4
-rw-r--r--src/kitemviews/private/kitemlistsmoothscroller.h2
-rw-r--r--src/main.cpp2
-rw-r--r--src/org.kde.dolphin.appdata.xml12
-rw-r--r--src/panels/folders/folderspanel.cpp2
-rw-r--r--src/panels/folders/treeviewcontextmenu.cpp4
-rw-r--r--src/panels/information/informationpanel.cpp2
-rw-r--r--src/panels/information/informationpanelcontent.cpp2
-rw-r--r--src/panels/information/phononwidget.cpp2
-rw-r--r--src/panels/places/placesitemmodel.cpp2
-rw-r--r--src/panels/terminal/terminalpanel.cpp2
-rw-r--r--src/search/dolphinsearchbox.cpp19
-rw-r--r--src/search/dolphinsearchbox.h2
-rw-r--r--src/settings/dolphin_generalsettings.kcfg4
-rw-r--r--src/settings/kcm/kcmdolphingeneral.cpp1
-rw-r--r--src/settings/kcm/kcmdolphingeneral.desktop3
-rw-r--r--src/settings/kcm/kcmdolphinnavigation.cpp1
-rw-r--r--src/settings/kcm/kcmdolphinnavigation.desktop3
-rw-r--r--src/settings/kcm/kcmdolphinservices.cpp1
-rw-r--r--src/settings/kcm/kcmdolphinservices.desktop1
-rw-r--r--src/settings/kcm/kcmdolphinviewmodes.cpp1
-rw-r--r--src/settings/kcm/kcmdolphinviewmodes.desktop4
-rw-r--r--src/settings/startup/startupsettingspage.cpp8
-rw-r--r--src/settings/startup/startupsettingspage.h1
-rw-r--r--src/settings/viewpropertiesdialog.cpp2
-rw-r--r--src/tests/kfileitemmodeltest.cpp14
-rw-r--r--src/tests/kitemlistcontrollertest.cpp1
-rw-r--r--src/tests/kitemlistselectionmanagertest.cpp5
-rw-r--r--src/tests/kitemsettest.cpp8
-rw-r--r--src/tests/viewpropertiestest.cpp2
-rw-r--r--src/views/dolphinview.cpp4
-rw-r--r--src/views/renamedialog.cpp2
-rw-r--r--src/views/tooltips/filemetadatatooltip.cpp21
-rw-r--r--src/views/tooltips/filemetadatatooltip.h8
-rw-r--r--src/views/tooltips/tooltipmanager.cpp86
-rw-r--r--src/views/tooltips/tooltipmanager.h10
-rw-r--r--src/views/versioncontrol/fileviewversioncontrolplugin.desktop2
-rw-r--r--src/views/viewproperties.cpp31
-rw-r--r--src/views/viewproperties.h6
65 files changed, 227 insertions, 299 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 069096814..87300d60c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,3 +1,4 @@
+include(ECMAddAppIcon)
configure_file(config-baloo.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-baloo.h)
@@ -144,7 +145,6 @@ target_link_libraries(
KF5::KIOFileWidgets
KF5::Completion
KF5::TextWidgets
- KF5::WindowSystem
KF5::ConfigCore
KF5::NewStuff
KF5::Parts
@@ -268,8 +268,9 @@ if(NOT WIN32)
set(dolphin_SRCS ${dolphin_SRCS} panels/terminal/terminalpanel.cpp)
endif()
-# TODO Does anything replace kde4_add_app_icon ?
-#kde4_add_app_icon(dolphin_SRCS "${KDE4_ICON_INSTALL_DIR}/oxygen/*/apps/system-file-manager.png")
+# Sets the icon on Windows and OSX
+file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*system-file-manager.png")
+ecm_add_app_icon(dolphin_SRCS ICONS ${ICONS_SRCS})
kf5_add_kdeinit_executable(dolphin ${dolphin_SRCS})
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp
index 666b81c8d..58e2f4de5 100644
--- a/src/dolphincontextmenu.cpp
+++ b/src/dolphincontextmenu.cpp
@@ -34,7 +34,6 @@
#include <KIO/EmptyTrashJob>
#include <KIO/JobUiDelegate>
#include <KIO/Paste>
-#include <kio_version.h>
#include <KJobWidgets>
#include <KMimeTypeTrader>
#include <KNewFileMenu>
@@ -160,7 +159,7 @@ void DolphinContextMenu::openTrashContextMenu()
if (uiDelegate.askDeleteConfirmation(QList<QUrl>(), KIO::JobUiDelegate::EmptyTrash, KIO::JobUiDelegate::DefaultConfirmation)) {
KIO::Job* job = KIO::emptyTrash();
KJobWidgets::setWindow(job, m_mainWindow);
- job->ui()->setAutoErrorHandlingEnabled(true);
+ job->uiDelegate()->setAutoErrorHandlingEnabled(true);
}
}
}
@@ -487,76 +486,7 @@ void DolphinContextMenu::addServiceActions(KFileItemActions& fileItemActions)
void DolphinContextMenu::addFileItemPluginActions(KFileItemActions& fileItemActions)
{
-#if KIO_VERSION >= QT_VERSION_CHECK(5, 27, 0)
fileItemActions.addPluginActionsTo(this);
-#else
- Q_UNUSED(fileItemActions);
- KFileItemListProperties props;
- if (m_selectedItems.isEmpty()) {
- props.setItems(KFileItemList() << baseFileItem());
- } else {
- props = selectedItemsProperties();
- }
-
- QString commonMimeType = props.mimeType();
- if (commonMimeType.isEmpty()) {
- commonMimeType = QStringLiteral("application/octet-stream");
- }
-
- const KService::List pluginServices = KMimeTypeTrader::self()->query(commonMimeType, QStringLiteral("KFileItemAction/Plugin"), QStringLiteral("exist Library"));
- const KConfig config(QStringLiteral("kservicemenurc"), KConfig::NoGlobals);
- const KConfigGroup showGroup = config.group("Show");
-
- QSet<QString> addedPlugins;
- foreach (const KService::Ptr& service, pluginServices) {
- if (!showGroup.readEntry(service->desktopEntryName(), true)) {
- // The plugin has been disabled
- continue;
- }
-
- KAbstractFileItemActionPlugin* abstractPlugin = service->createInstance<KAbstractFileItemActionPlugin>();
- if (abstractPlugin) {
- abstractPlugin->setParent(this);
- addActions(abstractPlugin->actions(props, m_mainWindow));
- addedPlugins << service->desktopEntryName();
- }
- }
-
- const auto jsonPlugins = KPluginLoader::findPlugins(QStringLiteral("kf5/kfileitemaction"), [=](const KPluginMetaData& metaData) {
- if (!metaData.serviceTypes().contains(QStringLiteral("KFileItemAction/Plugin"))) {
- return false;
- }
-
- auto mimeType = QMimeDatabase().mimeTypeForName(commonMimeType);
- foreach (const auto& supportedMimeType, metaData.mimeTypes()) {
- if (mimeType.inherits(supportedMimeType)) {
- return true;
- }
- }
-
- return false;
- });
-
- foreach (const auto& jsonMetadata, jsonPlugins) {
- // The plugin has been disabled
- if (!showGroup.readEntry(jsonMetadata.pluginId(), true)) {
- continue;
- }
-
- // The plugin also has a .desktop file and has already been added.
- if (addedPlugins.contains(jsonMetadata.pluginId())) {
- continue;
- }
-
- KPluginFactory *factory = KPluginLoader(jsonMetadata.fileName()).factory();
- KAbstractFileItemActionPlugin* abstractPlugin = factory->create<KAbstractFileItemActionPlugin>();
- if (abstractPlugin) {
- abstractPlugin->setParent(this);
- addActions(abstractPlugin->actions(props, m_mainWindow));
- addedPlugins << jsonMetadata.pluginId();
- }
- }
-#endif
}
void DolphinContextMenu::addVersionControlPluginActions()
diff --git a/src/dolphindockwidget.cpp b/src/dolphindockwidget.cpp
index 82cf91186..ccbecb0d6 100644
--- a/src/dolphindockwidget.cpp
+++ b/src/dolphindockwidget.cpp
@@ -38,13 +38,13 @@ public:
DolphinDockTitleBar(QWidget* parent = 0) : QWidget(parent) {}
virtual ~DolphinDockTitleBar() {}
- virtual QSize minimumSizeHint() const
+ QSize minimumSizeHint() const Q_DECL_OVERRIDE
{
const int border = style()->pixelMetric(QStyle::PM_DockWidgetTitleBarButtonMargin);
return QSize(border, border);
}
- virtual QSize sizeHint() const
+ QSize sizeHint() const Q_DECL_OVERRIDE
{
return minimumSizeHint();
}
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index e5103fd42..5bca8d06f 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -50,7 +50,6 @@
#include <KActionMenu>
#include <KAuthorized>
#include <KConfig>
-#include <kconfigwidgets_version.h>
#include <kdualaction.h>
#include <KJobWidgets>
#include <QLineEdit>
@@ -723,7 +722,7 @@ void DolphinMainWindow::handleUrl(const QUrl& url)
} else if (KProtocolManager::supportsListing(url)) {
// stat the URL to see if it is a dir or not
m_lastHandleUrlStatJob = KIO::stat(url, KIO::HideProgressInfo);
- if (m_lastHandleUrlStatJob->ui()) {
+ if (m_lastHandleUrlStatJob->uiDelegate()) {
KJobWidgets::setWindow(m_lastHandleUrlStatJob, this);
}
connect(m_lastHandleUrlStatJob, &KIO::Job::result,
@@ -869,10 +868,8 @@ void DolphinMainWindow::updateControlMenu()
helpMenu->addSeparator();
helpMenu->addAction(ac->action(KStandardAction::name(KStandardAction::ReportBug)));
helpMenu->addSeparator();
-#if KCONFIGWIDGETS_VERSION >= QT_VERSION_CHECK(5, 26, 0)
helpMenu->addAction(ac->action(KStandardAction::name(KStandardAction::Donate)));
helpMenu->addSeparator();
-#endif
helpMenu->addAction(ac->action(KStandardAction::name(KStandardAction::SwitchApplicationLanguage)));
helpMenu->addSeparator();
helpMenu->addAction(ac->action(KStandardAction::name(KStandardAction::AboutApp)));
@@ -961,13 +958,17 @@ void DolphinMainWindow::setUrlAsCaption(const QUrl& url)
}
}
- QString fileName = url.adjusted(QUrl::StripTrailingSlash).fileName();
- if (fileName.isEmpty()) {
- fileName = '/';
+ if (GeneralSettings::showFullPathInTitlebar()) {
+ const QString path = url.adjusted(QUrl::StripTrailingSlash).path();
+ caption.append(path);
+ } else {
+ QString fileName = url.adjusted(QUrl::StripTrailingSlash).fileName();
+ if (fileName.isEmpty()) {
+ fileName = '/';
+ }
+ caption.append(fileName);
}
- caption.append(fileName);
-
setWindowTitle(caption);
}
@@ -1404,6 +1405,7 @@ void DolphinMainWindow::refreshViews()
const bool splitView = GeneralSettings::splitView();
m_tabWidget->currentTabPage()->setSplitViewEnabled(splitView);
updateSplitAction();
+ setUrlAsCaption(activeViewContainer()->url());
}
emit settingsChanged();
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
index aa9ab2986..b55bcabb2 100644
--- a/src/dolphinpart.cpp
+++ b/src/dolphinpart.cpp
@@ -78,6 +78,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL
this, &DolphinPart::slotErrorMessage);
connect(m_view, &DolphinView::directoryLoadingCompleted, this, static_cast<void(DolphinPart::*)()>(&DolphinPart::completed));
+ connect(m_view, &DolphinView::directoryLoadingCompleted, this, &DolphinPart::updatePasteAction);
connect(m_view, &DolphinView::directoryLoadingProgress, this, &DolphinPart::updateProgress);
connect(m_view, &DolphinView::errorMessage, this, &DolphinPart::slotErrorMessage);
diff --git a/src/dolphinpart.desktop b/src/dolphinpart.desktop
index 6b9398da8..da0a659d3 100644
--- a/src/dolphinpart.desktop
+++ b/src/dolphinpart.desktop
@@ -2,7 +2,6 @@
Type=Service
Name=Dolphin View
Name[ar]=منظور دولفين
-Name[ast]=Vista de Dolphin
Name[ca]=Vista del Dolphin
Name[ca@valencia]=Vista del Dolphin
Name[cs]=Pohled Dolphin
@@ -107,7 +106,6 @@ Exec=dolphin
[Desktop Action compact]
Name=Compact
Name[ar]=متراصّ
-Name[ast]=Compautu
Name[ca]=Compacta
Name[ca@valencia]=Compacta
Name[cs]=Kompaktní
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp
index 22674d1bd..bcd4a49fd 100644
--- a/src/dolphintabwidget.cpp
+++ b/src/dolphintabwidget.cpp
@@ -32,7 +32,8 @@
DolphinTabWidget::DolphinTabWidget(QWidget* parent) :
QTabWidget(parent),
- m_placesSelectorVisible(true)
+ m_placesSelectorVisible(true),
+ m_previousTab(-1)
{
connect(this, &DolphinTabWidget::tabCloseRequested,
this, static_cast<void (DolphinTabWidget::*)(int)>(&DolphinTabWidget::closeTab));
@@ -304,9 +305,15 @@ void DolphinTabWidget::tabUrlChanged(const QUrl& url)
void DolphinTabWidget::currentTabChanged(int index)
{
DolphinViewContainer* viewContainer = tabPageAt(index)->activeViewContainer();
+ viewContainer->setActive(true);
emit activeViewChanged(viewContainer);
emit currentUrlChanged(viewContainer->url());
viewContainer->view()->setFocus();
+
+ if (tabPageAt(m_previousTab)) {
+ tabPageAt(m_previousTab)->activeViewContainer()->setActive(false);
+ }
+ m_previousTab = index;
}
void DolphinTabWidget::tabInserted(int index)
diff --git a/src/dolphintabwidget.h b/src/dolphintabwidget.h
index 7b3a18814..50ebd602a 100644
--- a/src/dolphintabwidget.h
+++ b/src/dolphintabwidget.h
@@ -186,6 +186,8 @@ private:
private:
/** Caches the (negated) places panel visibility */
bool m_placesSelectorVisible;
+
+ int m_previousTab;
};
#endif
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 4e625c7d8..2ea5b7e00 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -361,6 +361,9 @@ QString DolphinViewContainer::placesText() const
if (text.isEmpty()) {
text = url().host();
}
+ if (text.isEmpty()) {
+ text = url().scheme();
+ }
}
return text;
diff --git a/src/icons/128-system-file-manager.png b/src/icons/128-system-file-manager.png
new file mode 100644
index 000000000..a199a712f
--- /dev/null
+++ b/src/icons/128-system-file-manager.png
Binary files differ
diff --git a/src/icons/16-system-file-manager.png b/src/icons/16-system-file-manager.png
new file mode 100644
index 000000000..2771c8543
--- /dev/null
+++ b/src/icons/16-system-file-manager.png
Binary files differ
diff --git a/src/icons/22-system-file-manager.png b/src/icons/22-system-file-manager.png
new file mode 100644
index 000000000..ac0c54aca
--- /dev/null
+++ b/src/icons/22-system-file-manager.png
Binary files differ
diff --git a/src/icons/32-system-file-manager.png b/src/icons/32-system-file-manager.png
new file mode 100644
index 000000000..c095d42d5
--- /dev/null
+++ b/src/icons/32-system-file-manager.png
Binary files differ
diff --git a/src/icons/48-system-file-manager.png b/src/icons/48-system-file-manager.png
new file mode 100644
index 000000000..a742a7344
--- /dev/null
+++ b/src/icons/48-system-file-manager.png
Binary files differ
diff --git a/src/icons/64-system-file-manager.png b/src/icons/64-system-file-manager.png
new file mode 100644
index 000000000..9a7ebdec4
--- /dev/null
+++ b/src/icons/64-system-file-manager.png
Binary files differ
diff --git a/src/kitemviews/kfileitemlistwidget.cpp b/src/kitemviews/kfileitemlistwidget.cpp
index 7e5b4bb13..e0548ab2a 100644
--- a/src/kitemviews/kfileitemlistwidget.cpp
+++ b/src/kitemviews/kfileitemlistwidget.cpp
@@ -80,7 +80,7 @@ QString KFileItemListWidgetInformant::roleText(const QByteArray& role,
const KIO::filesize_t size = roleValue.value<KIO::filesize_t>();
text = KFormat().formatByteSize(size);
}
- } else if (role == "date") {
+ } else if (role == "modificationtime" || role == "accesstime") {
const QDateTime dateTime = roleValue.toDateTime();
text = QLocale().toString(dateTime, QLocale::ShortFormat);
} else {
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 05f85a633..7e14baff0 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -80,6 +80,7 @@ KFileItemModel::KFileItemModel(QObject* parent) :
connect(m_dirLister, static_cast<void(KFileItemModelDirLister::*)()>(&KFileItemModelDirLister::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, static_cast<void(KFileItemModelDirLister::*)(const QUrl&, const QUrl&)>(&KFileItemModelDirLister::redirection), this, &KFileItemModel::directoryRedirection);
connect(m_dirLister, &KFileItemModelDirLister::urlIsFileError, this, &KFileItemModel::urlIsFileError);
@@ -327,7 +328,8 @@ QList<QPair<int, QVariant> > KFileItemModel::groups() const
switch (typeForRole(sortRole())) {
case NameRole: m_groups = nameRoleGroups(); break;
case SizeRole: m_groups = sizeRoleGroups(); break;
- case DateRole: m_groups = dateRoleGroups(); break;
+ case ModificationTimeRole: m_groups = timeRoleGroups(KFileItem::ModificationTime); break;
+ case AccessTimeRole: m_groups = timeRoleGroups(KFileItem::AccessTime); break;
case PermissionsRole: m_groups = permissionRoleGroups(); break;
case RatingRole: m_groups = ratingRoleGroups(); break;
default: m_groups = genericStringRoleGroups(sortRole()); break;
@@ -416,12 +418,15 @@ int KFileItemModel::index(const QUrl& url) const
foreach (const QUrl& url, indexesForUrl.uniqueKeys()) {
if (indexesForUrl.count(url) > 1) {
qCWarning(DolphinDebug) << "Multiple items found with the URL" << url;
- foreach (int index, indexesForUrl.values(url)) {
- const ItemData* data = m_itemData.at(index);
- qCWarning(DolphinDebug) << "index" << index << ":" << data->item;
+
+ auto it = indexesForUrl.find(url);
+ while (it != indexesForUrl.end() && it.key() == url) {
+ const ItemData* data = m_itemData.at(it.value());
+ qCWarning(DolphinDebug) << "index" << it.value() << ":" << data->item;
if (data->parent) {
qCWarning(DolphinDebug) << "parent" << data->parent->item;
}
+ ++it;
}
}
}
@@ -590,7 +595,12 @@ int KFileItemModel::expandedParentsCount(int index) const
QSet<QUrl> KFileItemModel::expandedDirectories() const
{
- return m_expandedDirs.values().toSet();
+ QSet<QUrl> result;
+ const auto dirs = m_expandedDirs;
+ for (const auto &dir : dirs) {
+ result.insert(dir);
+ }
+ return result;
}
void KFileItemModel::restoreExpandedDirectories(const QSet<QUrl> &urls)
@@ -1523,12 +1533,20 @@ QHash<QByteArray, QVariant> KFileItemModel::retrieveData(const KFileItem& item,
data.insert(sharedValue("size"), item.size());
}
- if (m_requestRole[DateRole]) {
+ if (m_requestRole[ModificationTimeRole]) {
// Don't use KFileItem::timeString() as this is too expensive when
// having several thousands of items. Instead the formatting of the
// date-time will be done on-demand by the view when the date will be shown.
const QDateTime dateTime = item.time(KFileItem::ModificationTime);
- data.insert(sharedValue("date"), dateTime);
+ data.insert(sharedValue("modificationtime"), dateTime);
+ }
+
+ if (m_requestRole[AccessTimeRole]) {
+ // Don't use KFileItem::timeString() as this is too expensive when
+ // having several thousands of items. Instead the formatting of the
+ // date-time will be done on-demand by the view when the date will be shown.
+ const QDateTime dateTime = item.time(KFileItem::AccessTime);
+ data.insert(sharedValue("accesstime"), dateTime);
}
if (m_requestRole[PermissionsRole]) {
@@ -1753,7 +1771,7 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b, const
break;
}
- case DateRole: {
+ case ModificationTimeRole: {
const QDateTime dateTimeA = itemA.time(KFileItem::ModificationTime);
const QDateTime dateTimeB = itemB.time(KFileItem::ModificationTime);
if (dateTimeA < dateTimeB) {
@@ -1933,7 +1951,7 @@ QList<QPair<int, QVariant> > KFileItemModel::sizeRoleGroups() const
return groups;
}
-QList<QPair<int, QVariant> > KFileItemModel::dateRoleGroups() const
+QList<QPair<int, QVariant> > KFileItemModel::timeRoleGroups(KFileItem::FileTimes which) const
{
Q_ASSERT(!m_itemData.isEmpty());
@@ -1942,26 +1960,26 @@ QList<QPair<int, QVariant> > KFileItemModel::dateRoleGroups() const
const QDate currentDate = QDate::currentDate();
- QDate previousModifiedDate;
+ QDate previousFileDate;
QString groupValue;
for (int i = 0; i <= maxIndex; ++i) {
if (isChildItem(i)) {
continue;
}
- const QDateTime modifiedTime = m_itemData.at(i)->item.time(KFileItem::ModificationTime);
- const QDate modifiedDate = modifiedTime.date();
- if (modifiedDate == previousModifiedDate) {
+ const QDateTime fileTime = m_itemData.at(i)->item.time(which);
+ const QDate fileDate = fileTime.date();
+ if (fileDate == previousFileDate) {
// The current item is in the same group as the previous item
continue;
}
- previousModifiedDate = modifiedDate;
+ previousFileDate = fileDate;
- const int daysDistance = modifiedDate.daysTo(currentDate);
+ const int daysDistance = fileDate.daysTo(currentDate);
QString newGroupValue;
- if (currentDate.year() == modifiedDate.year() &&
- currentDate.month() == modifiedDate.month()) {
+ if (currentDate.year() == fileDate.year() &&
+ currentDate.month() == fileDate.month()) {
switch (daysDistance / 7) {
case 0:
@@ -1969,7 +1987,7 @@ QList<QPair<int, QVariant> > KFileItemModel::dateRoleGroups() const
case 0: newGroupValue = i18nc("@title:group Date", "Today"); break;
case 1: newGroupValue = i18nc("@title:group Date", "Yesterday"); break;
default:
- newGroupValue = modifiedTime.toString(
+ newGroupValue = fileTime.toString(
i18nc("@title:group Date: The week day name: dddd", "dddd"));
newGroupValue = i18nc("Can be used to script translation of \"dddd\""
"with context @title:group Date", "%1", newGroupValue);
@@ -1993,18 +2011,18 @@ QList<QPair<int, QVariant> > KFileItemModel::dateRoleGroups() const
}
} else {
const QDate lastMonthDate = currentDate.addMonths(-1);
- if (lastMonthDate.year() == modifiedDate.year() &&
- lastMonthDate.month() == modifiedDate.month()) {
+ if (lastMonthDate.year() == fileDate.year() &&
+ lastMonthDate.month() == fileDate.month()) {
if (daysDistance == 1) {
- newGroupValue = modifiedTime.toString(i18nc("@title:group Date: "
+ newGroupValue = fileTime.toString(i18nc("@title:group Date: "
"MMMM is full month name in current locale, and yyyy is "
"full year number", "'Yesterday' (MMMM, yyyy)"));
newGroupValue = i18nc("Can be used to script translation of "
"\"'Yesterday' (MMMM, yyyy)\" with context @title:group Date",
"%1", newGroupValue);
} else if (daysDistance <= 7) {
- newGroupValue = modifiedTime.toString(i18nc("@title:group Date: "
+ newGroupValue = fileTime.toString(i18nc("@title:group Date: "
"The week day name: dddd, MMMM is full month name "
"in current locale, and yyyy is full year number",
"dddd (MMMM, yyyy)"));
@@ -2012,28 +2030,28 @@ QList<QPair<int, QVariant> > KFileItemModel::dateRoleGroups() const
"\"dddd (MMMM, yyyy)\" with context @title:group Date",
"%1", newGroupValue);
} else if (daysDistance <= 7 * 2) {
- newGroupValue = modifiedTime.toString(i18nc("@title:group Date: "
+ newGroupValue = fileTime.toString(i18nc("@title:group Date: "
"MMMM is full month name in current locale, and yyyy is "
"full year number", "'One Week Ago' (MMMM, yyyy)"));
newGroupValue = i18nc("Can be used to script translation of "
"\"'One Week Ago' (MMMM, yyyy)\" with context @title:group Date",
"%1", newGroupValue);
} else if (daysDistance <= 7 * 3) {
- newGroupValue = modifiedTime.toString(i18nc("@title:group Date: "
+ newGroupValue = fileTime.toString(i18nc("@title:group Date: "
"MMMM is full month name in current locale, and yyyy is "
"full year number", "'Two Weeks Ago' (MMMM, yyyy)"));
newGroupValue = i18nc("Can be used to script translation of "
"\"'Two Weeks Ago' (MMMM, yyyy)\" with context @title:group Date",
"%1", newGroupValue);
} else if (daysDistance <= 7 * 4) {
- newGroupValue = modifiedTime.toString(i18nc("@title:group Date: "
+ newGroupValue = fileTime.toString(i18nc("@title:group Date: "
"MMMM is full month name in current locale, and yyyy is "
"full year number", "'Three Weeks Ago' (MMMM, yyyy)"));
newGroupValue = i18nc("Can be used to script translation of "
"\"'Three Weeks Ago' (MMMM, yyyy)\" with context @title:group Date",
"%1", newGroupValue);
} else {
- newGroupValue = modifiedTime.toString(i18nc("@title:group Date: "
+ newGroupValue = fileTime.toString(i18nc("@title:group Date: "
"MMMM is full month name in current locale, and yyyy is "
"full year number", "'Earlier on' MMMM, yyyy"));
newGroupValue = i18nc("Can be used to script translation of "
@@ -2041,7 +2059,7 @@ QList<QPair<int, QVariant> > KFileItemModel::dateRoleGroups() const
"%1", newGroupValue);
}
} else {
- newGroupValue = modifiedTime.toString(i18nc("@title:group "
+ newGroupValue = fileTime.toString(i18nc("@title:group "
"The month and year: MMMM is full month name in current locale, "
"and yyyy is full year number", "MMMM, yyyy"));
newGroupValue = i18nc("Can be used to script translation of "
@@ -2212,11 +2230,13 @@ const KFileItemModel::RoleInfoMap* KFileItemModel::rolesInfoMap(int& count)
{ 0, NoRole, 0, 0, 0, 0, false, false },
{ "text", NameRole, I18N_NOOP2_NOSTRIP("@label", "Name"), 0, 0, false, false },
{ "size", SizeRole, I18N_NOOP2_NOSTRIP("@label", "Size"), 0, 0, false, false },
- { "date", DateRole, I18N_NOOP2_NOSTRIP("@label", "Date"), 0, 0, false, false },
+ { "modificationtime", ModificationTimeRole, I18N_NOOP2_NOSTRIP("@label", "Modified"), 0, 0, false, false },
+ { "accesstime", AccessTimeRole, I18N_NOOP2_NOSTRIP("@label", "Accessed"), 0, 0, false, false },
{ "type", TypeRole, I18N_NOOP2_NOSTRIP("@label", "Type"), 0, 0, false, false },
{ "rating", RatingRole, I18N_NOOP2_NOSTRIP("@label", "Rating"), 0, 0, true, false },
{ "tags", TagsRole, I18N_NOOP2_NOSTRIP("@label", "Tags"), 0, 0, true, false },
{ "comment", CommentRole, I18N_NOOP2_NOSTRIP("@label", "Comment"), 0, 0, true, false },
+ { "title", TitleRole, I18N_NOOP2_NOSTRIP("@label", "Title"), I18N_NOOP2_NOSTRIP("@label", "Document"), true, true },
{ "wordCount", WordCountRole, I18N_NOOP2_NOSTRIP("@label", "Word Count"), I18N_NOOP2_NOSTRIP("@label", "Document"), true, true },
{ "lineCount", LineCountRole, I18N_NOOP2_NOSTRIP("@label", "Line Count"), I18N_NOOP2_NOSTRIP("@label", "Document"), true, true },
{ "imageSize", ImageSizeRole, I18N_NOOP2_NOSTRIP("@label", "Image Size"), I18N_NOOP2_NOSTRIP("@label", "Image"), true, true },
diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h
index 8a0df72b9..dc5746a89 100644
--- a/src/kitemviews/kfileitemmodel.h
+++ b/src/kitemviews/kfileitemmodel.h
@@ -280,11 +280,11 @@ private slots:
private:
enum RoleType {
// User visible roles:
- NoRole, NameRole, SizeRole, DateRole, PermissionsRole, OwnerRole,
+ NoRole, NameRole, SizeRole, ModificationTimeRole, AccessTimeRole, PermissionsRole, OwnerRole,
GroupRole, TypeRole, DestinationRole, PathRole,
// User visible roles available with Baloo:
CommentRole, TagsRole, RatingRole, ImageSizeRole, OrientationRole,
- WordCountRole, LineCountRole, ArtistRole, AlbumRole, DurationRole, TrackRole,
+ WordCountRole, TitleRole, LineCountRole, ArtistRole, AlbumRole, DurationRole, TrackRole,
OriginUrlRole,
// Non-visible roles:
IsDirRole, IsLinkRole, IsExpandedRole, IsExpandableRole, ExpandedParentsCountRole,
@@ -383,7 +383,7 @@ private:
QList<QPair<int, QVariant> > nameRoleGroups() const;
QList<QPair<int, QVariant> > sizeRoleGroups() const;
- QList<QPair<int, QVariant> > dateRoleGroups() const;
+ QList<QPair<int, QVariant> > timeRoleGroups(KFileItem::FileTimes which) const;
QList<QPair<int, QVariant> > permissionRoleGroups() const;
QList<QPair<int, QVariant> > ratingRoleGroups() const;
QList<QPair<int, QVariant> > genericStringRoleGroups(const QByteArray& typeForRole) const;
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp
index 92a020003..6e1c3d3dd 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.cpp
+++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp
@@ -907,7 +907,7 @@ void KFileItemModelRolesUpdater::startPreviewJob()
KIO::PreviewJob* job = new KIO::PreviewJob(itemSubSet, cacheSize, &m_enabledPlugins);
job->setIgnoreMaximumSize(itemSubSet.first().isLocalFile());
- if (job->ui()) {
+ if (job->uiDelegate()) {
KJobWidgets::setWindow(job, qApp->activeWindow());
}
diff --git a/src/kitemviews/kitemlistcontainer.cpp b/src/kitemviews/kitemlistcontainer.cpp
index 6a0c5756c..b4ea62fac 100644
--- a/src/kitemviews/kitemlistcontainer.cpp
+++ b/src/kitemviews/kitemlistcontainer.cpp
@@ -48,7 +48,7 @@ class KItemListContainerViewport : public QGraphicsView
public:
KItemListContainerViewport(QGraphicsScene* scene, QWidget* parent);
protected:
- virtual void wheelEvent(QWheelEvent* event);
+ void wheelEvent(QWheelEvent* event) Q_DECL_OVERRIDE;
};
KItemListContainerViewport::KItemListContainerViewport(QGraphicsScene* scene, QWidget* parent) :
diff --git a/src/kitemviews/kitemlistcontroller.h b/src/kitemviews/kitemlistcontroller.h
index b8a93edac..5e5e6b7c3 100644
--- a/src/kitemviews/kitemlistcontroller.h
+++ b/src/kitemviews/kitemlistcontroller.h
@@ -59,7 +59,6 @@ class QTransform;
class DOLPHIN_EXPORT KItemListController : public QObject
{
Q_OBJECT
- Q_ENUMS(SelectionBehavior)
Q_PROPERTY(KItemModelBase* model READ model WRITE setModel)
Q_PROPERTY(KItemListView *view READ view WRITE setView)
Q_PROPERTY(SelectionBehavior selectionBehavior READ selectionBehavior WRITE setSelectionBehavior)
@@ -72,6 +71,7 @@ public:
SingleSelection,
MultiSelection
};
+ Q_ENUM(SelectionBehavior)
enum AutoActivationBehavior {
ActivationAndExpansion,
diff --git a/src/kitemviews/kitemlistwidget.cpp b/src/kitemviews/kitemlistwidget.cpp
index 9c31155b3..65fc911bd 100644
--- a/src/kitemviews/kitemlistwidget.cpp
+++ b/src/kitemviews/kitemlistwidget.cpp
@@ -179,8 +179,8 @@ QList<QByteArray> KItemListWidget::visibleRoles() const
void KItemListWidget::setColumnWidth(const QByteArray& role, qreal width)
{
- if (m_columnWidths.value(role) != width) {
- const qreal previousWidth = width;
+ const qreal previousWidth = m_columnWidths.value(role);
+ if (previousWidth != width) {
m_columnWidths.insert(role, width);
columnWidthChanged(role, width, previousWidth);
update();
diff --git a/src/kitemviews/private/kbaloorolesprovider.cpp b/src/kitemviews/private/kbaloorolesprovider.cpp
index 2ce1f7bf6..16e3935ca 100644
--- a/src/kitemviews/private/kbaloorolesprovider.cpp
+++ b/src/kitemviews/private/kbaloorolesprovider.cpp
@@ -138,6 +138,7 @@ KBalooRolesProvider::KBalooRolesProvider() :
{ "rating", "rating" },
{ "tag", "tags" },
{ "comment", "comment" },
+ { "title", "title" },
{ "wordCount", "wordCount" },
{ "lineCount", "lineCount" },
{ "width", "imageSize" },
diff --git a/src/kitemviews/private/kfileitemmodeldirlister.h b/src/kitemviews/private/kfileitemmodeldirlister.h
index c2c621aed..5aa2b6303 100644
--- a/src/kitemviews/private/kfileitemmodeldirlister.h
+++ b/src/kitemviews/private/kfileitemmodeldirlister.h
@@ -48,7 +48,7 @@ signals:
void urlIsFileError(const QUrl& url);
protected:
- virtual void handleError(KIO::Job* job);
+ void handleError(KIO::Job* job) Q_DECL_OVERRIDE;
};
#endif
diff --git a/src/kitemviews/private/kitemlistheaderwidget.h b/src/kitemviews/private/kitemlistheaderwidget.h
index 2a80c205d..2342b4907 100644
--- a/src/kitemviews/private/kitemlistheaderwidget.h
+++ b/src/kitemviews/private/kitemlistheaderwidget.h
@@ -64,7 +64,7 @@ public:
qreal minimumColumnWidth() const;
- virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) Q_DECL_OVERRIDE;
signals:
/**
@@ -104,13 +104,13 @@ signals:
void sortRoleChanged(const QByteArray& current, const QByteArray& previous);
protected:
- virtual void mousePressEvent(QGraphicsSceneMouseEvent* event);
- virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
- virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event);
- virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event);
- virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event);
- virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
- virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event);
+ void mousePressEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
+ void hoverEnterEvent(QGraphicsSceneHoverEvent* event) Q_DECL_OVERRIDE;
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) Q_DECL_OVERRIDE;
+ void hoverMoveEvent(QGraphicsSceneHoverEvent* event) Q_DECL_OVERRIDE;
private slots:
void slotSortRoleChanged(const QByteArray& current, const QByteArray& previous);
diff --git a/src/kitemviews/private/kitemlistroleeditor.h b/src/kitemviews/private/kitemlistroleeditor.h
index 3b8f96865..f889ea4f4 100644
--- a/src/kitemviews/private/kitemlistroleeditor.h
+++ b/src/kitemviews/private/kitemlistroleeditor.h
@@ -44,15 +44,15 @@ public:
void setRole(const QByteArray& role);
QByteArray role() const;
- virtual bool eventFilter(QObject* watched, QEvent* event);
+ bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;
signals:
void roleEditingFinished(const QByteArray& role, const QVariant& value);
void roleEditingCanceled(const QByteArray& role, const QVariant& value);
protected:
- virtual bool event(QEvent* event);
- virtual void keyPressEvent(QKeyEvent* event);
+ bool event(QEvent* event) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
private slots:
/**
diff --git a/src/kitemviews/private/kitemlistselectiontoggle.h b/src/kitemviews/private/kitemlistselectiontoggle.h
index d058ee988..e3f5bb63c 100644
--- a/src/kitemviews/private/kitemlistselectiontoggle.h
+++ b/src/kitemviews/private/kitemlistselectiontoggle.h
@@ -42,10 +42,10 @@ public:
void setHovered(bool hovered);
- virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) Q_DECL_OVERRIDE;
protected:
- virtual void resizeEvent(QGraphicsSceneResizeEvent* event);
+ void resizeEvent(QGraphicsSceneResizeEvent* event) Q_DECL_OVERRIDE;
private:
void updatePixmap();
diff --git a/src/kitemviews/private/kitemlistsmoothscroller.h b/src/kitemviews/private/kitemlistsmoothscroller.h
index a3576a3fd..7d01a6b62 100644
--- a/src/kitemviews/private/kitemlistsmoothscroller.h
+++ b/src/kitemviews/private/kitemlistsmoothscroller.h
@@ -83,7 +83,7 @@ public:
void handleWheelEvent(QWheelEvent* event);
protected:
- virtual bool eventFilter(QObject* obj, QEvent* event);
+ bool eventFilter(QObject* obj, QEvent* event) Q_DECL_OVERRIDE;
private slots:
void slotAnimationStateChanged(QAbstractAnimation::State newState,
diff --git a/src/main.cpp b/src/main.cpp
index 8987d351f..acba8daed 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -39,7 +39,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
{
QApplication app(argc, argv);
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
- app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager")));
+ app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon()));
KCrash::initialize();
diff --git a/src/org.kde.dolphin.appdata.xml b/src/org.kde.dolphin.appdata.xml
index 0498689fa..24e3d5687 100644
--- a/src/org.kde.dolphin.appdata.xml
+++ b/src/org.kde.dolphin.appdata.xml
@@ -93,7 +93,7 @@
<description>
<p>Dolphin is a lightweight file manager. It has been designed with ease of use and simplicity in mind, while still allowing flexibility and customisation. This means that you can do your file management exactly the way you want to do it.</p>
<p xml:lang="ar">دولفين هو مدير ملفات خفيف. صُمِّم دولفين مع أخذ سهولة الاستخدام والبساطة بعين الاعتبار، مع السماح بالمرونة والتخصيص. يعني هذا أنه يمكنك إدارة ملفاتك كما تريد تمامًا.</p>
- <p xml:lang="ast">Dolphin ye un xestor de ficheros llixeru. Diseñóse cola facilidá d'usu y cenciellez na miente entrín entá permite la flexibilidá y personalización. Esto quier dicir que pues facer la to xestión de ficheros exautamente como tu quies facela.</p>
+ <p xml:lang="ast">Dolphin ye un xestor de ficheros llixeru. Diseñóse cola facilidá y cenciellez d'usu en mente, el mesmu tiempu qu'entá permite la flixibilidá y personalización. Quier dicir que pues facer la to xestión de ficheros exautamente como quieras facelo.</p>
<p xml:lang="bs">Dolphinje lagan file manager. On je bio dizajniran sa lakoćom korišćenja i jednostavnosti u vidu, još omogućavajući fleksibilnost i prilagođavanje. To znači da možete da radite svoje upravljanje datotekama onako kako želite da to uradi.</p>
<p xml:lang="ca">El Dolphin és un gestor de fitxers lleuger. S'ha dissenyat pensant a facilitar el seu ús i que sigui simple, permetent la flexibilitat i la personalització. Això vol dir que podeu fer la gestió dels vostres fitxers de la manera exacta com ho vulgueu fer.</p>
<p xml:lang="ca-valencia">El Dolphin és un gestor de fitxers lleuger. S'ha dissenyat pensant a facilitar el seu ús i que siga simple, permetent la flexibilitat i la personalització. Això vol dir que podeu fer la gestió dels vostres fitxers de la manera exacta com ho vulgueu fer.</p>
@@ -133,7 +133,7 @@
<p xml:lang="zh-TW">Dolphin 是一套輕量級的檔案管理員。它設計的理念是易用與簡單,但仍然保持足夠的彈性。這表示您可以用您想要使用的方式來管理您的檔案。</p>
<p>Features:</p>
<p xml:lang="ar">المزايا:</p>
- <p xml:lang="ast">Carauterístiques</p>
+ <p xml:lang="ast">Carauterístiques:</p>
<p xml:lang="bs">Svojstva:</p>
<p xml:lang="ca">Característiques:</p>
<p xml:lang="ca-valencia">Característiques:</p>
@@ -177,7 +177,6 @@
<p xml:lang="zh-TW">功能:</p>
<ul>
<li>Navigation (or breadcrumb) bar for URLs, allowing you to quickly navigate through the hierarchy of files and folders.</li>
- <li xml:lang="ast">Barra de navegación </li>
<li xml:lang="bs">Navigacijska (ili mrvična) traka za URL, dopušta vam da se brzo krećete kroz hijerarhiju datoteka i direktorija.</li>
<li xml:lang="ca">Barra de navegació (o fil d'Ariadna) pels URL, permetent una navegació ràpida per la jerarquia dels fitxers i carpetes.</li>
<li xml:lang="ca-valencia">Barra de navegació (o fil d'Ariadna) pels URL, permetent una navegació ràpida per la jerarquia dels fitxers i carpetes.</li>
@@ -215,7 +214,6 @@
<li xml:lang="zh-TW">網址導覽列讓您可以快速瀏覽檔案與資料夾。</li>
<li>Supports several different kinds of view styles and properties and allows you to configure the view exactly how you want it.</li>
<li xml:lang="ar">يدعم العديد من الأنواع المختلفة من الخصائص وأنماط العرض ويسمح لك بضبط العرض كما تريد تمامًا.</li>
- <li xml:lang="ast">Sofitalla delles tribes de vista y propiedaes diferentes y permítete configurar la vista exautamente como tu quies.</li>
<li xml:lang="bs">Dopušta vište vrsta stilova pogleda i svojstava i dopšta vam da konfigurišete pogled baš kako želite.</li>
<li xml:lang="ca">Accepta diferents classes diverses d'estils de visualització i propietats i us permet configurar la visualització exactament com la vulgueu.</li>
<li xml:lang="ca-valencia">Accepta diferents classes diverses d'estils de visualització i propietats i vos permet configurar la visualització exactament com la vulgueu.</li>
@@ -254,7 +252,6 @@
<li xml:lang="zh-TW">網址導覽列讓您可以快速瀏覽檔案與資料夾。</li>
<li>Split view, allowing you to easily copy or move files between locations.</li>
<li xml:lang="ar">العرض المقسوم، يسمح لك بنسخ ونقل الملفات بين مكانين بسهولة.</li>
- <li xml:lang="ast">Vista dixebrada, permítete copiar y mover ficheros d'un mou cenciellu ente allugamientos.</li>
<li xml:lang="bs">Razdvaja pogled, dopuštajući lako kopiranje ili pomijeranje datoteka između lokacija</li>
<li xml:lang="ca">Divisió de visualització, permetent copiar o moure fitxers fàcilment entre les ubicacions.</li>
<li xml:lang="ca-valencia">Divisió de visualització, permetent copiar o moure fitxers fàcilment entre les ubicacions.</li>
@@ -293,7 +290,6 @@
<li xml:lang="zh-TW">支援數個檢視模式,您也可以調整檢視模式的屬性。</li>
<li>Additional information and shortcuts are available as dock-able panels, allowing you to move them around freely and display exactly what you want.</li>
<li xml:lang="ar">تتوفر معلومات واختصارات إضافية كلوحات قابلة للرصف، مما يسمح لك بنقلها بحريّة وعرضها بالضبط كما تريد.</li>
- <li xml:lang="ast">Tán disponibles atayos ya información adicional como paneles anclables, permitiéndote movelos pehí d'un mou llibre y amosar exautamente lo tu quies.</li>
<li xml:lang="bs">Dodatne informacije i kratice su dostupne kao usidreni paneli, dopuštajući vam da se krećete slobodno i prikažete šta želite.</li>
<li xml:lang="ca">Hi ha informació addicional i dreceres disponibles com a plafons que es poden acoblar, permetent moure'ls lliurement i mostrar exactament el què vulgueu.</li>
<li xml:lang="ca-valencia">Hi ha informació addicional i dreceres disponibles com a plafons que es poden acoblar, permetent moure'ls lliurement i mostrar exactament el què vulgueu.</li>
@@ -331,7 +327,6 @@
<li xml:lang="zh-TW">分割檢視讓您可以輕鬆複製或移動檔案。</li>
<li>Multiple tab support</li>
<li xml:lang="ar">دعم تعدّد الألسنة</li>
- <li xml:lang="ast">Sofitu de múltiples llingüetes</li>
<li xml:lang="bs">Podrška za više kartica</li>
<li xml:lang="ca">Admet pestanyes múltiples</li>
<li xml:lang="ca-valencia">Admet pestanyes múltiples</li>
@@ -374,7 +369,6 @@
<li xml:lang="zh-TW">額外資訊與嵌入式面板捷徑讓您可以輕易顯示您常用的項目。</li>
<li>Informational dialogues are displayed in an unobtrusive way.</li>
<li xml:lang="ar">حواريات المعلومات تُعرَض بطريقة غير مُزعجة.</li>
- <li xml:lang="ast">Los diálogos d'información amuésense d'un mou discretu.</li>
<li xml:lang="bs">Informativni dijalozi su prikazani na nenametljiv način.</li>
<li xml:lang="ca">Els diàlegs informatius es mostren d'una manera no molesta.</li>
<li xml:lang="ca-valencia">Els diàlegs informatius es mostren d'una manera no molesta.</li>
@@ -412,7 +406,6 @@
<li xml:lang="zh-TW">支援多分頁</li>
<li>Undo/redo support</li>
<li xml:lang="ar">دعم التراجع والإعادة</li>
- <li xml:lang="ast">Sofitu de desfechura/refechura</li>
<li xml:lang="bs">Podrška za poništavanje/ponavljanje akcija</li>
<li xml:lang="ca">Admet desfer/refer</li>
<li xml:lang="ca-valencia">Admet desfer/refer</li>
@@ -454,7 +447,6 @@
<li xml:lang="zh-TW">以不唐突的方式顯示資訊對話框。</li>
<li>Transparent network access through the KIO system.</li>
<li xml:lang="ar">اتصال شبكيّ مباشر باستخدام نظام KIO.</li>
- <li xml:lang="ast">Accesu tresparente a la rede pente'l sistema KIO.</li>
<li xml:lang="bs">Transparentni mrežni pristup kroz KIO sistem.</li>
<li xml:lang="ca">Accés transparent a la xarxa a través del sistema KIO.</li>
<li xml:lang="ca-valencia">Accés transparent a la xarxa a través del sistema KIO.</li>
diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp
index 276cf5672..8b759d813 100644
--- a/src/panels/folders/folderspanel.cpp
+++ b/src/panels/folders/folderspanel.cpp
@@ -260,7 +260,7 @@ void FoldersPanel::slotRoleEditingFinished(int index, const QByteArray& role, co
KIO::Job* job = KIO::moveAs(oldUrl, newUrl);
KJobWidgets::setWindow(job, this);
KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job);
- job->ui()->setAutoErrorHandlingEnabled(true);
+ job->uiDelegate()->setAutoErrorHandlingEnabled(true);
}
}
}
diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp
index ec4186db2..51fc229c1 100644
--- a/src/panels/folders/treeviewcontextmenu.cpp
+++ b/src/panels/folders/treeviewcontextmenu.cpp
@@ -201,7 +201,7 @@ void TreeViewContextMenu::moveToTrash()
KIO::Job* job = KIO::trash(list);
KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Trash, list, QUrl(QStringLiteral("trash:/")), job);
KJobWidgets::setWindow(job, m_parent);
- job->ui()->setAutoErrorHandlingEnabled(true);
+ job->uiDelegate()->setAutoErrorHandlingEnabled(true);
}
}
@@ -213,7 +213,7 @@ void TreeViewContextMenu::deleteItem()
if (uiDelegate.askDeleteConfirmation(list, KIO::JobUiDelegate::Delete, KIO::JobUiDelegate::DefaultConfirmation)) {
KIO::Job* job = KIO::del(list);
KJobWidgets::setWindow(job, m_parent);
- job->ui()->setAutoErrorHandlingEnabled(true);
+ job->uiDelegate()->setAutoErrorHandlingEnabled(true);
}
}
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp
index 3f778b07a..16dc721b2 100644
--- a/src/panels/information/informationpanel.cpp
+++ b/src/panels/information/informationpanel.cpp
@@ -185,7 +185,7 @@ void InformationPanel::showItemInfo()
// No item is hovered and no selection has been done: provide
// an item for the currently shown directory.
m_folderStatJob = KIO::stat(url(), KIO::HideProgressInfo);
- if (m_folderStatJob->ui()) {
+ if (m_folderStatJob->uiDelegate()) {
KJobWidgets::setWindow(m_folderStatJob, this);
}
connect(m_folderStatJob, &KIO::Job::result,
diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp
index f56f5eaf6..fa4868e52 100644
--- a/src/panels/information/informationpanelcontent.cpp
+++ b/src/panels/information/informationpanelcontent.cpp
@@ -191,7 +191,7 @@ void InformationPanelContent::showItem(const KFileItem& item)
m_previewJob = new KIO::PreviewJob(KFileItemList() << item, QSize(m_preview->width(), m_preview->height()));
m_previewJob->setScaleType(KIO::PreviewJob::Unscaled);
m_previewJob->setIgnoreMaximumSize(item.isLocalFile());
- if (m_previewJob->ui()) {
+ if (m_previewJob->uiDelegate()) {
KJobWidgets::setWindow(m_previewJob, this);
}
diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp
index e4885ab76..ac4a32506 100644
--- a/src/panels/information/phononwidget.cpp
+++ b/src/panels/information/phononwidget.cpp
@@ -52,7 +52,7 @@ class EmbeddedVideoPlayer : public Phonon::VideoWidget
updateGeometry();
}
- virtual QSize sizeHint() const
+ QSize sizeHint() const Q_DECL_OVERRIDE
{
return m_sizeHint.isValid() ? m_sizeHint : Phonon::VideoWidget::sizeHint();
}
diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp
index 25c4d51f6..8a02ead01 100644
--- a/src/panels/places/placesitemmodel.cpp
+++ b/src/panels/places/placesitemmodel.cpp
@@ -872,7 +872,7 @@ PlacesItem* PlacesItemModel::createSystemPlacesItem(const SystemBookmarkData& da
props.setVisibleRoles({"text"});
} else if (data.url.scheme() == QLatin1String("timeline")) {
props.setViewMode(DolphinView::DetailsView);
- props.setVisibleRoles({"text", "date"});
+ props.setVisibleRoles({"text", "modificationtime"});
}
}
}
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp
index da68210c1..e952f23a0 100644
--- a/src/panels/terminal/terminalpanel.cpp
+++ b/src/panels/terminal/terminalpanel.cpp
@@ -137,7 +137,7 @@ void TerminalPanel::changeDir(const QUrl& url)
sendCdToTerminal(url.toLocalFile());
} else {
m_mostLocalUrlJob = KIO::mostLocalUrl(url, KIO::HideProgressInfo);
- if (m_mostLocalUrlJob->ui()) {
+ if (m_mostLocalUrlJob->uiDelegate()) {
KJobWidgets::setWindow(m_mostLocalUrlJob, this);
}
connect(m_mostLocalUrlJob, &KIO::StatJob::result, this, &TerminalPanel::slotMostLocalUrlResult);
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp
index 60a4a7567..5d5906b78 100644
--- a/src/search/dolphinsearchbox.cpp
+++ b/src/search/dolphinsearchbox.cpp
@@ -26,6 +26,7 @@
#include <QLineEdit>
#include <KLocalizedString>
#include <KSeparator>
+#include <KNS3/KMoreToolsMenuFactory>
#include <QButtonGroup>
#include <QDir>
@@ -385,6 +386,20 @@ void DolphinSearchBox::init()
searchLocationGroup->addButton(m_fromHereButton);
searchLocationGroup->addButton(m_everywhereButton);
+ auto moreSearchToolsButton = new QToolButton(this);
+ moreSearchToolsButton->setAutoRaise(true);
+ moreSearchToolsButton->setPopupMode(QToolButton::InstantPopup);
+ moreSearchToolsButton->setIcon(QIcon::fromTheme("arrow-down-double"));
+ moreSearchToolsButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+ moreSearchToolsButton->setText(i18n("More Search Tools"));
+ moreSearchToolsButton->setMenu(new QMenu(this));
+ connect(moreSearchToolsButton->menu(), &QMenu::aboutToShow, moreSearchToolsButton->menu(), [this, moreSearchToolsButton]()
+ {
+ m_menuFactory.reset(new KMoreToolsMenuFactory("dolphin/search-tools"));
+ moreSearchToolsButton->menu()->clear();
+ m_menuFactory->fillMenuFromGroupingNames(moreSearchToolsButton->menu(), { "files-find" }, this->m_searchPath);
+ } );
+
// Create "Facets" widgets
m_facetsToggleButton = new QToolButton(this);
m_facetsToggleButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
@@ -404,8 +419,10 @@ void DolphinSearchBox::init()
optionsLayout->addWidget(m_separator);
optionsLayout->addWidget(m_fromHereButton);
optionsLayout->addWidget(m_everywhereButton);
- optionsLayout->addStretch(1);
+ optionsLayout->addWidget(new KSeparator(Qt::Vertical, this));
optionsLayout->addWidget(m_facetsToggleButton);
+ optionsLayout->addWidget(moreSearchToolsButton);
+ optionsLayout->addStretch(1);
// Put the options into a QScrollArea. This prevents increasing the view width
// in case that not enough width for the options is available.
diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h
index b747679ec..5063c2bf5 100644
--- a/src/search/dolphinsearchbox.h
+++ b/src/search/dolphinsearchbox.h
@@ -30,6 +30,7 @@ class QToolButton;
class QScrollArea;
class QLabel;
class QVBoxLayout;
+class KMoreToolsMenuFactory;
/**
* @brief Input box for searching files with or without Baloo.
@@ -176,6 +177,7 @@ private:
DolphinFacetsWidget* m_facetsWidget;
QUrl m_searchPath;
+ QScopedPointer<KMoreToolsMenuFactory> m_menuFactory;
QTimer* m_startSearchTimer;
};
diff --git a/src/settings/dolphin_generalsettings.kcfg b/src/settings/dolphin_generalsettings.kcfg
index c724afcd1..5878abcbe 100644
--- a/src/settings/dolphin_generalsettings.kcfg
+++ b/src/settings/dolphin_generalsettings.kcfg
@@ -22,6 +22,10 @@
<label>Should the full path be shown inside the location bar</label>
<default>false</default>
</entry>
+ <entry name="ShowFullPathInTitlebar" type="Bool">
+ <label>Should the full path be shown in the title bar</label>
+ <default>false</default>
+ </entry>
<entry name="Version" type="Int">
<label>Internal version of Dolphin, containing 3 digits for major, minor, bugfix</label>
<default>0</default>
diff --git a/src/settings/kcm/kcmdolphingeneral.cpp b/src/settings/kcm/kcmdolphingeneral.cpp
index 3cf7e7652..f5ac4cd55 100644
--- a/src/settings/kcm/kcmdolphingeneral.cpp
+++ b/src/settings/kcm/kcmdolphingeneral.cpp
@@ -32,7 +32,6 @@
#include <QTabWidget>
K_PLUGIN_FACTORY(KCMDolphinGeneralConfigFactory, registerPlugin<DolphinGeneralConfigModule>(QStringLiteral("dolphingeneral"));)
-K_EXPORT_PLUGIN(KCMDolphinGeneralConfigFactory("kcmdolphingeneral"))
DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget* parent, const QVariantList& args) :
KCModule(parent),
diff --git a/src/settings/kcm/kcmdolphingeneral.desktop b/src/settings/kcm/kcmdolphingeneral.desktop
index 962fb7778..556231e44 100644
--- a/src/settings/kcm/kcmdolphingeneral.desktop
+++ b/src/settings/kcm/kcmdolphingeneral.desktop
@@ -1,6 +1,5 @@
Name=Dolphin General
Name[ar]=دولفين العامّ
-Name[ast]=Xeneral de Dolphin
Name[ca]=General del Dolphin
Name[ca@valencia]=General del Dolphin
Name[cs]=Obecný Dolphin
@@ -43,7 +42,6 @@ Name[zh_CN]=Dolphin 常规
Name[zh_TW]=Dolphin 一般
Comment=This service allows configuration of general Dolphin settings.
Comment[ar]=تسمح هذه الخدمة بضبط إعدادات دولفين العامّة.
-Comment[ast]=Esti serviciu permite la configuración de los axustes xenerales de Dolphin.
Comment[ca]=Aquest servei permet la configuració de l'arranjament general del Dolphin.
Comment[ca@valencia]=Este servei permet la configuració de l'arranjament general del Dolphin.
Comment[cs]=Tato služba umožňuje obecné nastavení Dolphinu.
@@ -139,7 +137,6 @@ Name[zh_CN]=常规
Name[zh_TW]=一般
Comment=Configure general file manager settings
Comment[ar]=اضبط إعدادات مدير الملفّات العامّة
-Comment[ast]=Configura los axustes xenerales del xestor de ficheros
Comment[ca]=Configura les opcions generals del gestor de fitxers
Comment[ca@valencia]=Configura les opcions generals del gestor de fitxers
Comment[cs]=Obecné nastavení správce souborů
diff --git a/src/settings/kcm/kcmdolphinnavigation.cpp b/src/settings/kcm/kcmdolphinnavigation.cpp
index 7bdcfc534..9ec6ca166 100644
--- a/src/settings/kcm/kcmdolphinnavigation.cpp
+++ b/src/settings/kcm/kcmdolphinnavigation.cpp
@@ -27,7 +27,6 @@
#include <QVBoxLayout>
K_PLUGIN_FACTORY(KCMDolphinNavigationConfigFactory, registerPlugin<DolphinNavigationConfigModule>(QStringLiteral("dolphinnavigation"));)
-K_EXPORT_PLUGIN(KCMDolphinNavigationConfigFactory("kcmdolphinnavigation"))
DolphinNavigationConfigModule::DolphinNavigationConfigModule(QWidget* parent, const QVariantList& args) :
KCModule(parent),
diff --git a/src/settings/kcm/kcmdolphinnavigation.desktop b/src/settings/kcm/kcmdolphinnavigation.desktop
index eaca4f141..9280624d6 100644
--- a/src/settings/kcm/kcmdolphinnavigation.desktop
+++ b/src/settings/kcm/kcmdolphinnavigation.desktop
@@ -1,6 +1,5 @@
Name=Dolphin Navigation
Name[ar]=التّنقّل في دولفين
-Name[ast]=Navegación de Dolphin
Name[ca]=Navegació del Dolphin
Name[ca@valencia]=Navegació del Dolphin
Name[cs]=Navigace Dolphinu
@@ -43,7 +42,6 @@ Name[zh_CN]=Dolphin 导航
Name[zh_TW]=Dolphin 導覽
Comment=This service allows configuration of the Dolphin navigation.
Comment[ar]=تسمح هذه الخدمة بضبط التّنقّل في دولفين.
-Comment[ast]=Esti serviciu permite la configuración de la navegación de Dolphin.
Comment[ca]=Aquest servei permet la configuració de la navegació del Dolphin.
Comment[ca@valencia]=Este servei permet la configuració de la navegació del Dolphin.
Comment[cs]=Tato služba umožňuje nastavení navigace v Dolphinu.
@@ -139,7 +137,6 @@ Name[zh_CN]=导航
Name[zh_TW]=導覽
Comment=Configure file manager navigation
Comment[ar]=اضبط التّنقّل في مدير الملفّات
-Comment[ast]=Configura la navegación del xestor de ficheros
Comment[ca]=Configura la navegació del gestor de fitxers
Comment[ca@valencia]=Configura la navegació del gestor de fitxers
Comment[cs]=Nastavení navigace správce souborů
diff --git a/src/settings/kcm/kcmdolphinservices.cpp b/src/settings/kcm/kcmdolphinservices.cpp
index 4885adf4f..39136724e 100644
--- a/src/settings/kcm/kcmdolphinservices.cpp
+++ b/src/settings/kcm/kcmdolphinservices.cpp
@@ -27,7 +27,6 @@
#include <QVBoxLayout>
K_PLUGIN_FACTORY(KCMDolphinServicesConfigFactory, registerPlugin<DolphinServicesConfigModule>(QStringLiteral("dolphinservices"));)
-K_EXPORT_PLUGIN(KCMDolphinServicesConfigFactory("kcmdolphinservices"))
DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget* parent, const QVariantList& args) :
KCModule(parent),
diff --git a/src/settings/kcm/kcmdolphinservices.desktop b/src/settings/kcm/kcmdolphinservices.desktop
index 1775f7eff..42e0538fa 100644
--- a/src/settings/kcm/kcmdolphinservices.desktop
+++ b/src/settings/kcm/kcmdolphinservices.desktop
@@ -95,7 +95,6 @@ Name[zh_CN]=服务
Name[zh_TW]=服務
Comment=Configure file manager services
Comment[ar]=اضبط خدمات مدير الملفّات
-Comment[ast]=Configura los servicios del xestor de ficheros
Comment[ca]=Configura els serveis del gestor de fitxers
Comment[ca@valencia]=Configura els serveis del gestor de fitxers
Comment[cs]=Nastavení služeb správce souborů
diff --git a/src/settings/kcm/kcmdolphinviewmodes.cpp b/src/settings/kcm/kcmdolphinviewmodes.cpp
index 9b4aa0dc7..710ebc70b 100644
--- a/src/settings/kcm/kcmdolphinviewmodes.cpp
+++ b/src/settings/kcm/kcmdolphinviewmodes.cpp
@@ -33,7 +33,6 @@
#include <QTabWidget>
K_PLUGIN_FACTORY(KCMDolphinViewModesConfigFactory, registerPlugin<DolphinViewModesConfigModule>(QStringLiteral("dolphinviewmodes"));)
-K_EXPORT_PLUGIN(KCMDolphinViewModesConfigFactory("kcmdolphinviewmodes"))
DolphinViewModesConfigModule::DolphinViewModesConfigModule(QWidget* parent, const QVariantList& args) :
KCModule(parent),
diff --git a/src/settings/kcm/kcmdolphinviewmodes.desktop b/src/settings/kcm/kcmdolphinviewmodes.desktop
index d1b5abe49..0be2656a0 100644
--- a/src/settings/kcm/kcmdolphinviewmodes.desktop
+++ b/src/settings/kcm/kcmdolphinviewmodes.desktop
@@ -1,6 +1,5 @@
Name=Dolphin View Modes
Name[ar]=أوضاع المنظور في دولفين
-Name[ast]=Moos de vista de Dolphin
Name[ca]=Modes de vista del Dolphin
Name[ca@valencia]=Modes de vista del Dolphin
Name[cs]=Režimy pohledů Dolphinu
@@ -43,7 +42,6 @@ Name[zh_CN]=Dolphin 视图模式
Name[zh_TW]=設定檔案管理員服務
Comment=This service allows configuration of the Dolphin view modes.
Comment[ar]=تسمح هذه الخدمة بضبط أوضاع المنظور في دولفين.
-Comment[ast]=Esti serviciu permite la configuración de los moos de vista de Dolphin.
Comment[ca]=Aquest servei permet la configuració dels modes de vista del Dolphin.
Comment[ca@valencia]=Este servei permet la configuració dels modes de vista del Dolphin.
Comment[cs]=Tato služba umožňuje nastavení režimů pohledu Dolphinu.
@@ -96,7 +94,6 @@ X-KDE-ParentApp=kcontrol
X-DocPath=dolphin/index.html#preferences-dialog-viewmodes
Name=View Modes
Name[ar]=أوضاع المنظور
-Name[ast]=Moos de vista
Name[ca]=Modes de vista
Name[ca@valencia]=Modes de vista
Name[cs]=Režimy pohledu
@@ -139,7 +136,6 @@ Name[zh_CN]=视图模式
Name[zh_TW]=檢視模式
Comment=Configure file manager view modes
Comment[ar]=اضبط أوضاع المنظور في مدير الملفّات
-Comment[ast]=Configura los moos de vista del xestor de ficheros
Comment[ca]=Configura els modes de vista del gestor de fitxers
Comment[ca@valencia]=Configura els modes de vista del gestor de fitxers
Comment[cs]=Nastavení režimů pohledu správce souborů
diff --git a/src/settings/startup/startupsettingspage.cpp b/src/settings/startup/startupsettingspage.cpp
index 6554493d8..f076f16c7 100644
--- a/src/settings/startup/startupsettingspage.cpp
+++ b/src/settings/startup/startupsettingspage.cpp
@@ -46,7 +46,8 @@ StartupSettingsPage::StartupSettingsPage(const QUrl& url, QWidget* parent) :
m_splitView(0),
m_editableUrl(0),
m_showFullPath(0),
- m_filterBar(0)
+ m_filterBar(0),
+ m_showFullPathInTitlebar(0)
{
QVBoxLayout* topLayout = new QVBoxLayout(this);
QWidget* vBox = new QWidget(this);
@@ -104,6 +105,8 @@ StartupSettingsPage::StartupSettingsPage(const QUrl& url, QWidget* parent) :
vBoxLayout->addWidget(m_showFullPath);
m_filterBar = new QCheckBox(i18nc("@option:check Startup Settings", "Show filter bar"), vBox);
vBoxLayout->addWidget(m_filterBar);
+ m_showFullPathInTitlebar = new QCheckBox(i18nc("@option:check Startup Settings", "Show full path in title bar"), vBox);
+ vBoxLayout->addWidget(m_showFullPathInTitlebar);
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
@@ -119,6 +122,7 @@ StartupSettingsPage::StartupSettingsPage(const QUrl& url, QWidget* parent) :
connect(m_editableUrl, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
connect(m_showFullPath, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
connect(m_filterBar, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
+ connect(m_showFullPathInTitlebar, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
}
StartupSettingsPage::~StartupSettingsPage()
@@ -141,6 +145,7 @@ void StartupSettingsPage::applySettings()
settings->setEditableUrl(m_editableUrl->isChecked());
settings->setShowFullPath(m_showFullPath->isChecked());
settings->setFilterBar(m_filterBar->isChecked());
+ settings->setShowFullPathInTitlebar(m_showFullPathInTitlebar->isChecked());
settings->save();
}
@@ -190,4 +195,5 @@ void StartupSettingsPage::loadSettings()
m_editableUrl->setChecked(GeneralSettings::editableUrl());
m_showFullPath->setChecked(GeneralSettings::showFullPath());
m_filterBar->setChecked(GeneralSettings::filterBar());
+ m_showFullPathInTitlebar->setChecked(GeneralSettings::showFullPathInTitlebar());
}
diff --git a/src/settings/startup/startupsettingspage.h b/src/settings/startup/startupsettingspage.h
index 9bcc31131..7a69cd3d6 100644
--- a/src/settings/startup/startupsettingspage.h
+++ b/src/settings/startup/startupsettingspage.h
@@ -62,6 +62,7 @@ private:
QCheckBox* m_editableUrl;
QCheckBox* m_showFullPath;
QCheckBox* m_filterBar;
+ QCheckBox* m_showFullPathInTitlebar;
};
#endif
diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp
index 7407042d7..c317ed052 100644
--- a/src/settings/viewpropertiesdialog.cpp
+++ b/src/settings/viewpropertiesdialog.cpp
@@ -303,7 +303,7 @@ void ViewPropertiesDialog::configureAdditionalInfo()
visibleRoles.clear();
visibleRoles.append("text");
visibleRoles.append("size");
- visibleRoles.append("date");
+ visibleRoles.append("modificationtime");
m_viewProps->setVisibleRoles(visibleRoles);
}
diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp
index 6c45e114b..59ff63069 100644
--- a/src/tests/kfileitemmodeltest.cpp
+++ b/src/tests/kfileitemmodeltest.cpp
@@ -154,9 +154,9 @@ void KFileItemModelTest::testDefaultSortRole()
QVERIFY(itemsInsertedSpy.wait());
QCOMPARE(m_model->count(), 3);
- QCOMPARE(m_model->data(0)["text"].toString(), QString("a.txt"));
- QCOMPARE(m_model->data(1)["text"].toString(), QString("b.txt"));
- QCOMPARE(m_model->data(2)["text"].toString(), QString("c.txt"));
+ QCOMPARE(m_model->data(0).value("text").toString(), QString("a.txt"));
+ QCOMPARE(m_model->data(1).value("text").toString(), QString("b.txt"));
+ QCOMPARE(m_model->data(2).value("text").toString(), QString("c.txt"));
}
void KFileItemModelTest::testDefaultGroupedSorting()
@@ -882,8 +882,8 @@ void KFileItemModelTest::testSorting()
// Sort by Date, descending
m_model->setSortDirectoriesFirst(true);
- m_model->setSortRole("date");
- QCOMPARE(m_model->sortRole(), QByteArray("date"));
+ m_model->setSortRole("modificationtime");
+ QCOMPARE(m_model->sortRole(), QByteArray("modificationtime"));
QCOMPARE(m_model->sortOrder(), Qt::DescendingOrder);
QCOMPARE(itemsInModel(), QStringList() << "c" << "c-2" << "c-3" << "c-1" << "b" << "d" << "a" << "e");
QCOMPARE(itemsMovedSpy.count(), 1);
@@ -892,7 +892,7 @@ void KFileItemModelTest::testSorting()
// Sort by Date, ascending
m_model->setSortOrder(Qt::AscendingOrder);
- QCOMPARE(m_model->sortRole(), QByteArray("date"));
+ QCOMPARE(m_model->sortRole(), QByteArray("modificationtime"));
QCOMPARE(m_model->sortOrder(), Qt::AscendingOrder);
QCOMPARE(itemsInModel(), QStringList() << "c" << "c-2" << "c-3" << "c-1" << "e" << "a" << "d" << "b");
QCOMPARE(itemsMovedSpy.count(), 1);
@@ -901,7 +901,7 @@ void KFileItemModelTest::testSorting()
// Sort by Date, ascending, 'Sort Folders First' disabled
m_model->setSortDirectoriesFirst(false);
- QCOMPARE(m_model->sortRole(), QByteArray("date"));
+ QCOMPARE(m_model->sortRole(), QByteArray("modificationtime"));
QCOMPARE(m_model->sortOrder(), Qt::AscendingOrder);
QVERIFY(!m_model->sortDirectoriesFirst());
QCOMPARE(itemsInModel(), QStringList() << "e" << "a" << "c" << "c-1" << "c-2" << "c-3" << "d" << "b");
diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp
index e170e7b5b..92d05c4d4 100644
--- a/src/tests/kitemlistcontrollertest.cpp
+++ b/src/tests/kitemlistcontrollertest.cpp
@@ -37,6 +37,7 @@
*/
class KItemListControllerTestStyle : public QProxyStyle
{
+ Q_OBJECT
public:
KItemListControllerTestStyle(QStyle* style) :
QProxyStyle(style),
diff --git a/src/tests/kitemlistselectionmanagertest.cpp b/src/tests/kitemlistselectionmanagertest.cpp
index b183de302..18a79bd3f 100644
--- a/src/tests/kitemlistselectionmanagertest.cpp
+++ b/src/tests/kitemlistselectionmanagertest.cpp
@@ -26,11 +26,12 @@
class DummyModel : public KItemModelBase
{
+ Q_OBJECT
public:
DummyModel();
void setCount(int count);
- virtual int count() const;
- virtual QHash<QByteArray, QVariant> data(int index) const;
+ int count() const Q_DECL_OVERRIDE;
+ QHash<QByteArray, QVariant> data(int index) const Q_DECL_OVERRIDE;
private:
int m_count;
diff --git a/src/tests/kitemsettest.cpp b/src/tests/kitemsettest.cpp
index 0d14e20fa..d31993947 100644
--- a/src/tests/kitemsettest.cpp
+++ b/src/tests/kitemsettest.cpp
@@ -22,7 +22,7 @@
#include <QTest>
#include <QVector>
-Q_DECLARE_METATYPE(KItemRangeList);
+Q_DECLARE_METATYPE(KItemRangeList)
/**
* Converts a KItemRangeList to a KItemSet.
@@ -72,14 +72,14 @@ QVector<int> KItemRangeList2QVector(const KItemRangeList& itemRanges)
static QSet<int> KItemSet2QSet(const KItemSet& itemSet)
{
QSet<int> result;
- foreach (int i, itemSet) {
+ for (int i : itemSet) {
result.insert(i);
}
// Check that the conversion was successful.
Q_ASSERT(itemSet.count() == result.count());
- foreach (int i, itemSet) {
+ for (int i : itemSet) {
Q_ASSERT(result.contains(i));
}
@@ -239,7 +239,7 @@ void KItemSetTest::testIterators()
QCOMPARE(testQVector, itemsQVector);
testQVector.clear();
- foreach (int i, itemSet) {
+ for (int i : itemSet) {
testQVector.append(i);
}
QCOMPARE(testQVector, itemsQVector);
diff --git a/src/tests/viewpropertiestest.cpp b/src/tests/viewpropertiestest.cpp
index 482e4127d..114afdc33 100644
--- a/src/tests/viewpropertiestest.cpp
+++ b/src/tests/viewpropertiestest.cpp
@@ -44,6 +44,7 @@ void ViewPropertiesTest::init()
{
m_globalViewProps = GeneralSettings::self()->globalViewProps();
GeneralSettings::self()->setGlobalViewProps(false);
+ GeneralSettings::self()->save();
// It is mandatory to create the test-directory inside the home-directory
// of the user: ViewProperties does not write inside directories
@@ -58,6 +59,7 @@ void ViewPropertiesTest::cleanup()
m_testDir = 0;
GeneralSettings::self()->setGlobalViewProps(m_globalViewProps);
+ GeneralSettings::self()->save();
}
/**
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 30298d2e1..9728e58c3 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -1023,7 +1023,7 @@ void DolphinView::slotItemHovered(int index)
const QPoint pos = m_container->mapToGlobal(itemRect.topLeft().toPoint());
itemRect.moveTo(pos);
- m_toolTipManager->showToolTip(item, itemRect);
+ m_toolTipManager->showToolTip(item, itemRect, nativeParentWidget()->windowHandle());
}
emit requestItemInfo(item);
@@ -1536,7 +1536,7 @@ void DolphinView::slotRoleEditingFinished(int index, const QByteArray& role, con
KIO::Job * job = KIO::moveAs(oldUrl, newUrl);
KJobWidgets::setWindow(job, this);
KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job);
- job->ui()->setAutoErrorHandlingEnabled(true);
+ job->uiDelegate()->setAutoErrorHandlingEnabled(true);
if (!newNameExistsAlready) {
// Only connect the result signal if there is no item with the new name
diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp
index cf8f6885d..df4827b3a 100644
--- a/src/views/renamedialog.cpp
+++ b/src/views/renamedialog.cpp
@@ -162,7 +162,7 @@ void RenameDialog::renameItem(const KFileItem &item, const QString& newName)
KIO::Job * job = KIO::moveAs(oldUrl, newUrl, KIO::HideProgressInfo);
KJobWidgets::setWindow(job, widget);
KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job);
- job->ui()->setAutoErrorHandlingEnabled(true);
+ job->uiDelegate()->setAutoErrorHandlingEnabled(true);
}
void RenameDialog::slotAccepted()
diff --git a/src/views/tooltips/filemetadatatooltip.cpp b/src/views/tooltips/filemetadatatooltip.cpp
index 0d58717d4..e466ff3ed 100644
--- a/src/views/tooltips/filemetadatatooltip.cpp
+++ b/src/views/tooltips/filemetadatatooltip.cpp
@@ -23,8 +23,6 @@
#include <KColorScheme>
#include <KSeparator>
-// For the blurred tooltip background
-#include <KWindowEffects>
#include <KStringHandler>
#include <QTextDocument>
@@ -47,9 +45,6 @@ FileMetaDataToolTip::FileMetaDataToolTip(QWidget* parent) :
m_name(0),
m_fileMetaDataWidget(0)
{
- setAttribute(Qt::WA_TranslucentBackground);
- setWindowFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint);
-
// Create widget for file preview
m_preview = new QLabel(this);
m_preview->setAlignment(Qt::AlignTop);
@@ -161,19 +156,3 @@ KFileItemList FileMetaDataToolTip::items() const
return m_fileMetaDataWidget->items();
}
-void FileMetaDataToolTip::paintEvent(QPaintEvent* event)
-{
- QStylePainter painter(this);
- QStyleOptionFrame option;
- option.init(this);
- painter.drawPrimitive(QStyle::PE_PanelTipLabel, option);
- painter.end();
-
- QWidget::paintEvent(event);
-}
-
-void FileMetaDataToolTip::showEvent(QShowEvent *)
-{
- KWindowEffects::enableBlurBehind(winId(), true, mask());
-}
-
diff --git a/src/views/tooltips/filemetadatatooltip.h b/src/views/tooltips/filemetadatatooltip.h
index 379b025c8..1738e386c 100644
--- a/src/views/tooltips/filemetadatatooltip.h
+++ b/src/views/tooltips/filemetadatatooltip.h
@@ -37,8 +37,8 @@ namespace Baloo {
#endif
/**
- * @brief Tooltip, that shows the meta information and a preview of one
- * or more files.
+ * @brief Widget that shows the meta information and a preview of one
+ * or more files inside a KToolTipWidget.
*/
class FileMetaDataToolTip : public QWidget
{
@@ -69,10 +69,6 @@ signals:
*/
void metaDataRequestFinished(const KFileItemList& items);
-protected:
- virtual void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE;
- virtual void showEvent(QShowEvent *) Q_DECL_OVERRIDE;
-
private:
QLabel* m_preview;
QLabel* m_name;
diff --git a/src/views/tooltips/tooltipmanager.cpp b/src/views/tooltips/tooltipmanager.cpp
index 0636df795..d19e98c81 100644
--- a/src/views/tooltips/tooltipmanager.cpp
+++ b/src/views/tooltips/tooltipmanager.cpp
@@ -24,18 +24,22 @@
#include <KIO/JobUiDelegate>
#include <KIO/PreviewJob>
#include <KJobWidgets>
+#include <KToolTipWidget>
#include <QApplication>
#include <QDesktopWidget>
#include <QLayout>
#include <QStyle>
#include <QTimer>
+#include <QWindow>
ToolTipManager::ToolTipManager(QWidget* parent) :
QObject(parent),
m_showToolTipTimer(0),
m_contentRetrievalTimer(0),
+ m_transientParent(0),
m_fileMetaDataToolTip(0),
+ m_tooltipWidget(new KToolTipWidget()),
m_toolTipRequested(false),
m_metaDataRequested(false),
m_appliedWaitCursor(false),
@@ -62,11 +66,9 @@ ToolTipManager::ToolTipManager(QWidget* parent) :
ToolTipManager::~ToolTipManager()
{
- delete m_fileMetaDataToolTip;
- m_fileMetaDataToolTip = 0;
}
-void ToolTipManager::showToolTip(const KFileItem& item, const QRectF& itemRect)
+void ToolTipManager::showToolTip(const KFileItem& item, const QRectF& itemRect, QWindow *transientParent)
{
hideToolTip();
@@ -75,10 +77,12 @@ void ToolTipManager::showToolTip(const KFileItem& item, const QRectF& itemRect)
m_itemRect.adjust(-m_margin, -m_margin, m_margin, m_margin);
m_item = item;
+ m_transientParent = transientParent;
+
// Only start the retrieving of the content, when the mouse has been over this
// item for 200 milliseconds. This prevents a lot of useless preview jobs and
// meta data retrieval, when passing rapidly over a lot of items.
- Q_ASSERT(!m_fileMetaDataToolTip);
+ delete m_fileMetaDataToolTip;
m_fileMetaDataToolTip = new FileMetaDataToolTip();
connect(m_fileMetaDataToolTip, &FileMetaDataToolTip::metaDataRequestFinished,
this, &ToolTipManager::slotMetaDataRequestFinished);
@@ -100,14 +104,7 @@ void ToolTipManager::hideToolTip()
m_metaDataRequested = false;
m_showToolTipTimer->stop();
m_contentRetrievalTimer->stop();
-
- if (m_fileMetaDataToolTip) {
- m_fileMetaDataToolTip->hide();
- // Do not delete the tool tip immediately to prevent crashes when
- // QCoreApplication tries to deliver an 'Enter' event to it, see bug 310579.
- m_fileMetaDataToolTip->deleteLater();
- m_fileMetaDataToolTip = 0;
- }
+ m_tooltipWidget->hideLater();
}
void ToolTipManager::startContentRetrieval()
@@ -130,7 +127,7 @@ void ToolTipManager::startContentRetrieval()
KIO::PreviewJob* job = new KIO::PreviewJob(KFileItemList() << m_item, QSize(256, 256));
job->setIgnoreMaximumSize(m_item.isLocalFile());
- if (job->ui()) {
+ if (job->uiDelegate()) {
KJobWidgets::setWindow(job, qApp->activeWindow());
}
@@ -200,68 +197,9 @@ void ToolTipManager::showToolTip()
return;
}
- const QRect screen = QApplication::desktop()->screenGeometry(QCursor::pos());
-
- // Restrict tooltip size to current screen size when needed.
- // Because layout controlling widget doesn't respect widget's maximumSize property
- // (correct me if I'm wrong), we need to let layout do its work, then manually change
- // geometry if resulting widget doesn't fit the screen.
-
- // Step #1 - make sizeHint return calculated tooltip size
- m_fileMetaDataToolTip->layout()->setSizeConstraint(QLayout::SetFixedSize);
+ // Adjust the size to get a proper sizeHint()
m_fileMetaDataToolTip->adjustSize();
- QSize size = m_fileMetaDataToolTip->sizeHint();
-
- // Step #2 - correct tooltip size when needed
- if (size.width() > screen.width()) {
- size.setWidth(screen.width());
- }
- if (size.height() > screen.height()) {
- size.setHeight(screen.height());
- }
-
- // m_itemRect defines the area of the item, where the tooltip should be
- // shown. Per default the tooltip is shown centered at the bottom.
- // It must be assured that:
- // - the content is fully visible
- // - the content is not drawn inside m_itemRect
- const bool hasRoomToLeft = (m_itemRect.left() - size.width() - m_margin >= screen.left());
- const bool hasRoomToRight = (m_itemRect.right() + size.width() + m_margin <= screen.right());
- const bool hasRoomAbove = (m_itemRect.top() - size.height() - m_margin >= screen.top());
- const bool hasRoomBelow = (m_itemRect.bottom() + size.height() + m_margin <= screen.bottom());
- if (!hasRoomAbove && !hasRoomBelow && !hasRoomToLeft && !hasRoomToRight) {
- return;
- }
-
- int x, y;
- if (hasRoomBelow || hasRoomAbove) {
- x = qMax(screen.left(), m_itemRect.center().x() - size.width() / 2);
- if (x + size.width() >= screen.right()) {
- x = screen.right() - size.width() + 1;
- }
- if (hasRoomBelow) {
- y = m_itemRect.bottom() + m_margin;
- } else {
- y = m_itemRect.top() - size.height() - m_margin;
- }
- } else {
- Q_ASSERT(hasRoomToLeft || hasRoomToRight);
- if (hasRoomToRight) {
- x = m_itemRect.right() + m_margin;
- } else {
- x = m_itemRect.left() - size.width() - m_margin;
- }
- // Put the tooltip at the bottom of the screen. The x-coordinate has already
- // been adjusted, so that no overlapping with m_itemRect occurs.
- y = screen.bottom() - size.height() + 1;
- }
-
- // Step #3 - Alter tooltip geometry
- m_fileMetaDataToolTip->setFixedSize(size);
- m_fileMetaDataToolTip->layout()->setSizeConstraint(QLayout::SetNoConstraint);
- m_fileMetaDataToolTip->move(QPoint(x, y));
- m_fileMetaDataToolTip->show();
-
+ m_tooltipWidget->showBelow(m_itemRect, m_fileMetaDataToolTip, m_transientParent);
m_toolTipRequested = false;
}
diff --git a/src/views/tooltips/tooltipmanager.h b/src/views/tooltips/tooltipmanager.h
index f6d8b8f26..58fe68763 100644
--- a/src/views/tooltips/tooltipmanager.h
+++ b/src/views/tooltips/tooltipmanager.h
@@ -26,7 +26,9 @@
#include <KFileItem>
class FileMetaDataToolTip;
+class KToolTipWidget;
class QTimer;
+class QWindow;
/**
* @brief Manages the tooltips for an item view.
@@ -47,9 +49,9 @@ public:
* Triggers the showing of the tooltip for the item \p item
* where the item has the maximum boundaries of \p itemRect.
* The tooltip manager takes care that the tooltip is shown
- * slightly delayed.
+ * slightly delayed and with a proper \p transientParent.
*/
- void showToolTip(const KFileItem& item, const QRectF& itemRect);
+ void showToolTip(const KFileItem& item, const QRectF& itemRect, QWindow *transientParent);
/**
* Hides the currently shown tooltip.
@@ -72,7 +74,11 @@ private:
/// the tooltip content like preview and meta data gets started.
QTimer* m_contentRetrievalTimer;
+ /// Transient parent of the tooltip, mandatory on Wayland.
+ QWindow* m_transientParent;
+
FileMetaDataToolTip* m_fileMetaDataToolTip;
+ QScopedPointer<KToolTipWidget> m_tooltipWidget;
bool m_toolTipRequested;
bool m_metaDataRequested;
diff --git a/src/views/versioncontrol/fileviewversioncontrolplugin.desktop b/src/views/versioncontrol/fileviewversioncontrolplugin.desktop
index cdec01b9d..889c1232a 100644
--- a/src/views/versioncontrol/fileviewversioncontrolplugin.desktop
+++ b/src/views/versioncontrol/fileviewversioncontrolplugin.desktop
@@ -2,7 +2,7 @@
Type=ServiceType
X-KDE-ServiceType=FileViewVersionControlPlugin
Comment=Version Control Plugin for File Views
-Comment[ast]=Complementu de control de versiones pa vistes de ficheros
+Comment[ar]=ملحقة تحكّم بالإصدارات لمناظير الملفّات
Comment[ca]=Connector de control de versions per a les vistes de fitxers
Comment[ca@valencia]=Connector de control de versions per a les vistes de fitxers
Comment[cs]=Modul pro správu verzí pro pohledy na soubory
diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp
index 597baa293..ca52be890 100644
--- a/src/views/viewproperties.cpp
+++ b/src/views/viewproperties.cpp
@@ -35,7 +35,8 @@
namespace {
const int AdditionalInfoViewPropertiesVersion = 1;
const int NameRolePropertiesVersion = 2;
- const int CurrentViewPropertiesVersion = 3;
+ const int DateRolePropertiesVersion = 4;
+ const int CurrentViewPropertiesVersion = 4;
// String representation to mark the additional properties of
// the details view as customized by the user. See
@@ -123,6 +124,11 @@ ViewProperties::ViewProperties(const QUrl& url) :
Q_ASSERT(m_node->version() == NameRolePropertiesVersion);
}
+ if (m_node->version() < DateRolePropertiesVersion) {
+ convertDateRoleToModificationTimeRole();
+ Q_ASSERT(m_node->version() == DateRolePropertiesVersion);
+ }
+
m_node->setVersion(CurrentViewPropertiesVersion);
}
}
@@ -309,7 +315,7 @@ QList<QByteArray> ViewProperties::visibleRoles() const
&& !visibleRoles.contains(CustomizedDetailsString);
if (useDefaultValues) {
roles.append("size");
- roles.append("date");
+ roles.append("modificationtime");
}
return roles;
@@ -448,6 +454,27 @@ void ViewProperties::convertNameRoleToTextRole()
update();
}
+void ViewProperties::convertDateRoleToModificationTimeRole()
+{
+ QStringList visibleRoles = m_node->visibleRoles();
+ for (int i = 0; i < visibleRoles.count(); ++i) {
+ if (visibleRoles[i].endsWith(QLatin1String("_date"))) {
+ const int leftLength = visibleRoles[i].length() - 5;
+ visibleRoles[i] = visibleRoles[i].left(leftLength) + "_modificationtime";
+ }
+ }
+
+ QString sortRole = m_node->sortRole();
+ if (sortRole == QLatin1String("date")) {
+ sortRole = QStringLiteral("modificationtime");
+ }
+
+ m_node->setVisibleRoles(visibleRoles);
+ m_node->setSortRole(sortRole);
+ m_node->setVersion(DateRolePropertiesVersion);
+ update();
+}
+
bool ViewProperties::isPartOfHome(const QString& filePath)
{
// For performance reasons cache the path in a static QString
diff --git a/src/views/viewproperties.h b/src/views/viewproperties.h
index dc118e2d7..05b80f455 100644
--- a/src/views/viewproperties.h
+++ b/src/views/viewproperties.h
@@ -154,6 +154,12 @@ private:
void convertNameRoleToTextRole();
/**
+ * Provides backward compatibility with .directory files created with
+ * Dolphin < 16.11.70: Converts the old name-role "date" to "modificationtime"
+ */
+
+ void convertDateRoleToModificationTimeRole();
+ /**
* Returns true, if \a filePath is part of the home-path (see QDir::homePath()).
*/
static bool isPartOfHome(const QString& filePath);