]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'Applications/16.04'
authorDavid Edmundson <kde@davidedmundson.co.uk>
Wed, 18 May 2016 09:13:16 +0000 (10:13 +0100)
committerDavid Edmundson <kde@davidedmundson.co.uk>
Wed, 18 May 2016 09:13:16 +0000 (10:13 +0100)
CMakeLists.txt
src/CMakeLists.txt
src/kitemviews/kitemset.h
src/kitemviews/kstandarditemlistwidget.cpp
src/kitemviews/kstandarditemlistwidget.h
src/kitemviews/private/kitemlistselectiontoggle.cpp
src/main.cpp
src/settings/dolphin_generalsettings.kcfg
src/settings/kcm/kcmdolphinviewmodes.desktop
src/tests/CMakeLists.txt
src/views/versioncontrol/kversioncontrolplugin.h

index 436c45429ba8f8304a489b5a6110e1e85095dcdf..7e6111307d4d56d43e9b991c6f7d5481dcc3a89a 100644 (file)
@@ -9,7 +9,7 @@ set (KDE_APPLICATIONS_VERSION_MICRO "1")
 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
index 48a7c1de6c978c03b52c8923303b80c4a4dd8d87..069096814d5e0ce88aac8ad405755a839c5c4d49 100644 (file)
@@ -23,8 +23,7 @@ set(dolphinvcs_LIB_SRCS
 )
 
 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
@@ -48,7 +47,7 @@ ecm_generate_headers(dolphinvcs_LIB_HEADERS
 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 ###############
@@ -131,6 +130,7 @@ kconfig_add_kcfg_files(dolphinprivate_LIB_SRCS GENERATE_MOC
 )
 
 add_library(dolphinprivate ${dolphinprivate_LIB_SRCS})
+generate_export_header(dolphinprivate BASE_NAME dolphin)
 
 target_link_libraries(
     dolphinprivate PUBLIC
@@ -170,6 +170,7 @@ set_target_properties(dolphinprivate PROPERTIES
 )
 
 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)
 
 ##########################################
 
index 31fe1d24950b8813dbe531aa2c3d5d8d4c012dee..5afe24df5db846ef7e46137ee7f0b0d3ec9a7cf2 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef KITEMSET_H
 #define KITEMSET_H
 
+#include "dolphin_export.h"
+
 #include <kitemviews/kitemrange.h>
 
 /**
@@ -40,7 +42,7 @@
  * The complexity of most operations depends on the number of ranges.
  */
 
-class KItemSet
+class DOLPHIN_EXPORT KItemSet
 {
 public:
     KItemSet();
index 51c5bc896a588f03a450cee07dd4e69d1a6a1918..8740cb73fd59c6b55ea856bd2c011e504e6183aa 100644 (file)
@@ -850,6 +850,15 @@ void KStandardItemListWidget::hideEvent(QHideEvent* event)
     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();
@@ -954,7 +963,7 @@ void KStandardItemListWidget::updatePixmapCache()
                 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
@@ -1438,11 +1447,11 @@ void KStandardItemListWidget::closeRoleEditor()
     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)) {
@@ -1467,7 +1476,7 @@ QPixmap KStandardItemListWidget::pixmapForIcon(const QString& name, const QStrin
             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));
         }
index 9ab5d4c8f776957323c540c2802bcbf47c852a91..e6ba4bb3f6d3d2098bdd4d86643be47d4a45251c 100644 (file)
@@ -183,6 +183,7 @@ protected:
     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();
@@ -212,7 +213,7 @@ private:
      */
     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
index 1429cb9ef9491217f2d66de90ac92de379d8f724..9031c870f8c6a8032b74b81b6420c25add5fa716 100644 (file)
@@ -89,7 +89,7 @@ void KItemListSelectionToggle::resizeEvent(QGraphicsSceneResizeEvent* event)
 
 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);
 }
index 0bbae97fc5a9d46bae73eb7fb0f00fbe4639a760..8987d351f058d5b02a67c982ca51c937edc89ecf 100644 (file)
@@ -100,7 +100,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
     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)")));
index de7390bbd26161296725de64f72d8d56249d6008..12f158541187bd8d8e1359c589c1c99be6ae07a8 100644 (file)
@@ -43,7 +43,7 @@
             <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">
index f421ae5c6faf5d090ebef14e544d449d288133f5..1a1f7e7bb23010da85236772ec34d58927a99b2f 100644 (file)
@@ -21,6 +21,7 @@ Name[lt]=Dolphin rodymo būdai
 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
index 22a8b48491fa7ac88ce1b29aecb20192837dd7ea..c7159bf1bcf11f830fd2de599aba6796e4b05617 100644 (file)
@@ -9,7 +9,6 @@ add_definitions(-DDOLPHIN_EXPORT=)
 # KItemSetTest
 set(kitemsettest_SRCS
     kitemsettest.cpp
-    ../kitemviews/kitemset.cpp
 )
 
 add_executable(kitemsettest ${kitemsettest_SRCS})
@@ -31,9 +30,6 @@ target_link_libraries(kitemrangetest dolphinprivate Qt5::Test)
 # KItemListSelectionManagerTest
 set(kitemlistselectionmanagertest_SRCS
     kitemlistselectionmanagertest.cpp
-    ../kitemviews/kitemlistselectionmanager.cpp
-    ../kitemviews/kitemmodelbase.cpp
-    ../kitemviews/kitemset.cpp
 )
 
 add_executable(kitemlistselectionmanagertest ${kitemlistselectionmanagertest_SRCS})
@@ -45,17 +41,6 @@ target_link_libraries(kitemlistselectionmanagertest dolphinprivate Qt5::Test)
 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
 )
 
@@ -72,16 +57,6 @@ target_link_libraries(kitemlistcontrollertest dolphinprivate Qt5::Test)
 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
 )
 
@@ -98,9 +73,6 @@ target_link_libraries(kfileitemlistviewtest dolphinprivate Qt5::Test)
 set(kfileitemmodeltest_SRCS
     kfileitemmodeltest.cpp
     testdir.cpp
-    ../kitemviews/kfileitemmodel.cpp
-    ../kitemviews/kitemmodelbase.cpp
-    ../kitemviews/kitemset.cpp
     ../dolphindebug.cpp
 )
 
@@ -117,8 +89,6 @@ target_link_libraries(kfileitemmodeltest dolphinprivate Qt5::Test)
 set(kfileitemmodelbenchmark_SRCS
     kfileitemmodelbenchmark.cpp
     testdir.cpp
-    ../kitemviews/kfileitemmodel.cpp
-    ../kitemviews/kitemmodelbase.cpp
     ../dolphindebug.cpp
 )
 
@@ -133,7 +103,6 @@ target_link_libraries(kfileitemmodelbenchmark dolphinprivate Qt5::Test)
 # KItemListKeyboardSearchManagerTest
 set(kitemlistkeyboardsearchmanagertest_SRCS
     kitemlistkeyboardsearchmanagertest.cpp
-    ../kitemviews/private/kitemlistkeyboardsearchmanager.cpp
 )
 
 add_executable(kitemlistkeyboardsearchmanagertest ${kitemlistkeyboardsearchmanagertest_SRCS})
@@ -161,9 +130,6 @@ endif()
 # KStandardItemModelTest
 set(kstandarditemmodeltest_SRCS
     kstandarditemmodeltest.cpp
-    ../kitemviews/kstandarditem.cpp
-    ../kitemviews/kstandarditemmodel.cpp
-    ../kitemviews/kitemmodelbase.cpp
     ../dolphindebug.cpp
 )
 
@@ -176,7 +142,6 @@ target_link_libraries(kstandarditemmodeltest dolphinprivate Qt5::Test)
 set(viewpropertiestest_SRCS
     viewpropertiestest.cpp
     testdir.cpp
-    ../views/viewproperties.cpp
     ../dolphindebug.cpp
 )
 kconfig_add_kcfg_files(viewpropertiestest_SRCS GENERATE_MOC
index 85835e06232d602438d3ae8953c6f581dd70c2bc..1696f975c76dfc378ba79035535bb33f72863e79 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef KVERSIONCONTROLPLUGIN_H
 #define KVERSIONCONTROLPLUGIN_H
 
-#include <dolphin_export.h>
+#include <dolphinvcs_export.h>
 
 #include <QObject>
 #include <QAction>
@@ -81,7 +81,7 @@ class KFileItem;
  *
  * @since 4.8
  */
-class DOLPHIN_EXPORT KVersionControlPlugin : public QObject
+class DOLPHINVCS_EXPORT KVersionControlPlugin : public QObject
 {
     Q_OBJECT
 
@@ -165,16 +165,16 @@ public:
     /**
      * 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;