set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
set(QT_MIN_VERSION "5.4.0")
-set(KF5_MIN_VERSION "5.19.0")
+set(KF5_MIN_VERSION "5.21.0")
set(ECM_MIN_VERSION "1.6.0")
# ECM setup
)
add_library(dolphinvcs ${dolphinvcs_LIB_SRCS})
-
-generate_export_header(dolphinvcs BASE_NAME dolphin)
+generate_export_header(dolphinvcs BASE_NAME dolphinvcs)
target_link_libraries(
dolphinvcs PUBLIC
install(TARGETS dolphinvcs EXPORT DolphinVcsTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES views/versioncontrol/fileviewversioncontrolplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR})
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dolphin_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT Devel)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dolphinvcs_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT Devel)
install(FILES ${dolphinvcs_LIB_HEADERS} DESTINATION "${KDE_INSTALL_INCLUDEDIR}/Dolphin" COMPONENT Devel)
########### next target ###############
)
add_library(dolphinprivate ${dolphinprivate_LIB_SRCS})
+generate_export_header(dolphinprivate BASE_NAME dolphin)
target_link_libraries(
dolphinprivate PUBLIC
)
install(TARGETS dolphinprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dolphin_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT Devel)
##########################################
#ifndef KITEMSET_H
#define KITEMSET_H
+#include "dolphin_export.h"
+
#include <kitemviews/kitemrange.h>
/**
* The complexity of most operations depends on the number of ranges.
*/
-class KItemSet
+class DOLPHIN_EXPORT KItemSet
{
public:
KItemSet();
KItemListWidget::hideEvent(event);
}
+bool KStandardItemListWidget::event(QEvent *event)
+{
+ if (event->type() == QEvent::WindowDeactivate || event->type() == QEvent::WindowActivate) {
+ m_dirtyContent = true;
+ }
+
+ return KItemListWidget::event(event);
+}
+
void KStandardItemListWidget::slotCutItemsChanged()
{
const QUrl itemUrl = data().value("url").toUrl();
iconName = QStringLiteral("unknown");
}
const QStringList overlays = values["iconOverlays"].toStringList();
- m_pixmap = pixmapForIcon(iconName, overlays, maxIconHeight);
+ m_pixmap = pixmapForIcon(iconName, overlays, maxIconHeight, isSelected() && isActiveWindow() ? QIcon::Selected : QIcon::Normal);
} else if (m_pixmap.width() / m_pixmap.devicePixelRatio() != maxIconWidth || m_pixmap.height() / m_pixmap.devicePixelRatio() != maxIconHeight) {
// A custom pixmap has been applied. Assure that the pixmap
m_roleEditor = 0;
}
-QPixmap KStandardItemListWidget::pixmapForIcon(const QString& name, const QStringList& overlays, int size)
+QPixmap KStandardItemListWidget::pixmapForIcon(const QString& name, const QStringList& overlays, int size, QIcon::Mode mode)
{
static const QIcon fallbackIcon = QIcon::fromTheme(QStringLiteral("unknown"));
size *= qApp->devicePixelRatio();
- const QString key = "KStandardItemListWidget:" % name % ":" % overlays.join(QStringLiteral(":")) % ":" % QString::number(size);
+ const QString key = "KStandardItemListWidget:" % name % ":" % overlays.join(QStringLiteral(":")) % ":" % QString::number(size) % ":" % QString::number(mode);
QPixmap pixmap;
if (!QPixmapCache::find(key, pixmap)) {
requestedSize = size;
}
- pixmap = icon.pixmap(requestedSize / qApp->devicePixelRatio(), requestedSize / qApp->devicePixelRatio());
+ pixmap = icon.pixmap(requestedSize / qApp->devicePixelRatio(), requestedSize / qApp->devicePixelRatio(), mode);
if (requestedSize != size) {
KPixmapModifier::scale(pixmap, QSize(size, size));
}
virtual void resizeEvent(QGraphicsSceneResizeEvent* event) Q_DECL_OVERRIDE;
virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
virtual void hideEvent(QHideEvent* event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) Q_DECL_OVERRIDE;
private slots:
void slotCutItemsChanged();
*/
void closeRoleEditor();
- static QPixmap pixmapForIcon(const QString& name, const QStringList& overlays, int size);
+ static QPixmap pixmapForIcon(const QString& name, const QStringList& overlays, int size, QIcon::Mode mode);
/**
* @return Preferred size of the rating-image based on the given
void KItemListSelectionToggle::updatePixmap()
{
- const QString icon = m_checked ? QStringLiteral("list-remove") : QStringLiteral("list-add");
+ const QString icon = m_checked ? QStringLiteral("emblem-remove") : QStringLiteral("emblem-added");
const KIconLoader::States state = m_hovered ? KIconLoader::ActiveState : KIconLoader::DisabledState;
m_pixmap = KIconLoader::global()->loadIcon(icon, KIconLoader::Desktop, iconSize(), state);
}
aboutData.setupCommandLine(&parser);
// command line options
- parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("select"), i18nc("@info:shell", "The files and directories passed as arguments "
+ parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("select"), i18nc("@info:shell", "The files and folders passed as arguments "
"will be selected.")));
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("split"), i18nc("@info:shell", "Dolphin will get started with a split view.")));
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("daemon"), i18nc("@info:shell", "Start Dolphin Daemon (only required for DBus Interface)")));
<default>false</default>
</entry>
<entry name="GlobalViewProps" type="Bool">
- <label>Should the view properties be used for all directories</label>
+ <label>Should the view properties be used for all folders</label>
<default>false</default>
</entry>
<entry name="BrowseThroughArchives" type="Bool">
Name[nb]=Dolphin visningsmåter
Name[nl]=Dolphin-weergavemodussen
Name[nn]=Dolphin-visingar
+Name[pa]=ਡਾਲਫਿਨ ਝਲਕ ਢੰਗ
Name[pl]=Tryby widoku Dolphina
Name[pt]=Modos de Visualização do Dolphin
Name[pt_BR]=Modos de exibição do Dolphin
# KItemSetTest
set(kitemsettest_SRCS
kitemsettest.cpp
- ../kitemviews/kitemset.cpp
)
add_executable(kitemsettest ${kitemsettest_SRCS})
# KItemListSelectionManagerTest
set(kitemlistselectionmanagertest_SRCS
kitemlistselectionmanagertest.cpp
- ../kitemviews/kitemlistselectionmanager.cpp
- ../kitemviews/kitemmodelbase.cpp
- ../kitemviews/kitemset.cpp
)
add_executable(kitemlistselectionmanagertest ${kitemlistselectionmanagertest_SRCS})
set(kitemlistcontrollertest_SRCS
kitemlistcontrollertest.cpp
testdir.cpp
- ../kitemviews/kfileitemmodel.cpp
- ../kitemviews/kfileitemlistview.cpp
- ../kitemviews/kfileitemlistwidget.cpp
- ../kitemviews/kitemmodelbase.cpp
- ../kitemviews/kitemlistview.cpp
- ../kitemviews/kitemlistcontainer.cpp
- ../kitemviews/kitemlistwidget.cpp
- ../kitemviews/kitemlistviewaccessible.cpp
- ../kitemviews/kitemset.cpp
- ../kitemviews/kstandarditemlistview.cpp
- ../kitemviews/kstandarditemlistwidget.cpp
../dolphindebug.cpp
)
set(kfileitemlistviewtest_SRCS
kfileitemlistviewtest.cpp
testdir.cpp
- ../kitemviews/kfileitemmodel.cpp
- ../kitemviews/kfileitemlistview.cpp
- ../kitemviews/kitemmodelbase.cpp
- ../kitemviews/kitemlistview.cpp
- ../kitemviews/kitemlistviewaccessible.cpp
- ../kitemviews/kitemlistcontainer.cpp
- ../kitemviews/kitemlistwidget.cpp
- ../kitemviews/kitemset.cpp
- ../kitemviews/kstandarditemlistview.cpp
- ../kitemviews/kstandarditemlistwidget.cpp
../dolphindebug.cpp
)
set(kfileitemmodeltest_SRCS
kfileitemmodeltest.cpp
testdir.cpp
- ../kitemviews/kfileitemmodel.cpp
- ../kitemviews/kitemmodelbase.cpp
- ../kitemviews/kitemset.cpp
../dolphindebug.cpp
)
set(kfileitemmodelbenchmark_SRCS
kfileitemmodelbenchmark.cpp
testdir.cpp
- ../kitemviews/kfileitemmodel.cpp
- ../kitemviews/kitemmodelbase.cpp
../dolphindebug.cpp
)
# KItemListKeyboardSearchManagerTest
set(kitemlistkeyboardsearchmanagertest_SRCS
kitemlistkeyboardsearchmanagertest.cpp
- ../kitemviews/private/kitemlistkeyboardsearchmanager.cpp
)
add_executable(kitemlistkeyboardsearchmanagertest ${kitemlistkeyboardsearchmanagertest_SRCS})
# KStandardItemModelTest
set(kstandarditemmodeltest_SRCS
kstandarditemmodeltest.cpp
- ../kitemviews/kstandarditem.cpp
- ../kitemviews/kstandarditemmodel.cpp
- ../kitemviews/kitemmodelbase.cpp
../dolphindebug.cpp
)
set(viewpropertiestest_SRCS
viewpropertiestest.cpp
testdir.cpp
- ../views/viewproperties.cpp
../dolphindebug.cpp
)
kconfig_add_kcfg_files(viewpropertiestest_SRCS GENERATE_MOC
#ifndef KVERSIONCONTROLPLUGIN_H
#define KVERSIONCONTROLPLUGIN_H
-#include <dolphin_export.h>
+#include <dolphinvcs_export.h>
#include <QObject>
#include <QAction>
*
* @since 4.8
*/
-class DOLPHIN_EXPORT KVersionControlPlugin : public QObject
+class DOLPHINVCS_EXPORT KVersionControlPlugin : public QObject
{
Q_OBJECT
/**
* Is invoked after the version control information has been
* received. It is assured that
- * KVersionControlPluginV2::beginInfoRetrieval() has been
+ * KVersionControlPlugin::beginRetrieval() has been
* invoked before.
*/
virtual void endRetrieval() = 0;
/**
* @return The version for the item \p item.
- * It is assured that KVersionControlPlugin::beginInfoRetrieval() has been
+ * It is assured that KVersionControlPlugin::beginRetrieval() has been
* invoked before and that the file is part of the directory specified
- * in beginInfoRetrieval().
+ * in beginRetrieval().
*/
virtual ItemVersion itemVersion(const KFileItem& item) const = 0;