diff --git a/CMakeLists.txt.user.4.9-pre1 b/CMakeLists.txt.user.4.9-pre1 new file mode 100644 --- /dev/null +++ b/CMakeLists.txt.user.4.9-pre1 @@ -0,0 +1,3220 @@ + + + + + + EnvironmentId + {f98fbc34-9e00-4edc-b838-accbed4d61b8} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + {8af714cd-b300-4e5f-b346-2cfcc7624496} + 0 + 0 + 15 + + + CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ + CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc + CMAKE_INSTALL_PREFIX:PATH=/home/meven/kde/usr + CMAKE_PREFIX_PATH:INTERNAL=/home/meven/kde/qt5/5.12.2/gcc_64/ + + /home/meven/kde/build/dolphin + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Défaut + Défaut + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Debug + + /home/meven/kde/src/build-dolphin-Desktop-Debug + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Release + + /home/meven/kde/src/build-dolphin-Desktop-Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=RelWithDebInfo + + /home/meven/kde/src/build-dolphin-Desktop-Release with Debug Information + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release with Debug Information + Release with Debug Information + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=MinSizeRel + + /home/meven/kde/src/build-dolphin-Desktop-Minimum Size Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Minimum Size Release + Minimum Size Release + CMakeProjectManager.CMakeBuildConfiguration + + 5 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Configuration de déploiement + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + KDE_FORK_SLAVES=1 + QT_PLUGIN_PATH=/home/meven/kde/build/kio/bin + + dolphin + + CMakeProjectManager.CMakeRunConfiguration.dolphin + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + placesitemmodeltest + + CMakeProjectManager.CMakeRunConfiguration.placesitemmodeltest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + dolphinsearchboxtest + + CMakeProjectManager.CMakeRunConfiguration.dolphinsearchboxtest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + kfileitemlistviewtest + + CMakeProjectManager.CMakeRunConfiguration.kfileitemlistviewtest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + kstandarditemmodeltest + + CMakeProjectManager.CMakeRunConfiguration.kstandarditemmodeltest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + viewpropertiestest + + CMakeProjectManager.CMakeRunConfiguration.viewpropertiestest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + dolphinmainwindowtest + + CMakeProjectManager.CMakeRunConfiguration.dolphinmainwindowtest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + KDE_FORK_SLAVES=1 + QT_PLUGIN_PATH=/home/meven/kde/usr/lib/x86_64-linux-gnu/plugins/ + + dolphin + dolphin2 + CMakeProjectManager.CMakeRunConfiguration.dolphin +/home/meven/kde/src/dolphin/src/ + /media/meven/multimedia/avoir + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + placesitemmodeltest + placesitemmodeltest2 + CMakeProjectManager.CMakeRunConfiguration.placesitemmodeltest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kitemlistcontrollertest + kitemlistcontrollertest2 + CMakeProjectManager.CMakeRunConfiguration.kitemlistcontrollertest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kitemsettest + kitemsettest2 + CMakeProjectManager.CMakeRunConfiguration.kitemsettest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kitemlistselectionmanagertest + kitemlistselectionmanagertest2 + CMakeProjectManager.CMakeRunConfiguration.kitemlistselectionmanagertest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + kitemlistcontrollertest + + CMakeProjectManager.CMakeRunConfiguration.kitemlistcontrollertest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kitemrangetest + kitemrangetest2 + CMakeProjectManager.CMakeRunConfiguration.kitemrangetest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kitemlistkeyboardsearchmanagertest + kitemlistkeyboardsearchmanagertest2 + CMakeProjectManager.CMakeRunConfiguration.kitemlistkeyboardsearchmanagertest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kfileitemmodelbenchmark + kfileitemmodelbenchmark2 + CMakeProjectManager.CMakeRunConfiguration.kfileitemmodelbenchmark +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + draganddrophelpertest + draganddrophelpertest2 + CMakeProjectManager.CMakeRunConfiguration.draganddrophelpertest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kfileitemmodeltest + kfileitemmodeltest2 + CMakeProjectManager.CMakeRunConfiguration.kfileitemmodeltest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + dolphinsearchboxtest + dolphinsearchboxtest2 + CMakeProjectManager.CMakeRunConfiguration.dolphinsearchboxtest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kfileitemlistviewtest + kfileitemlistviewtest2 + CMakeProjectManager.CMakeRunConfiguration.kfileitemlistviewtest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + kstandarditemmodeltest + kstandarditemmodeltest2 + CMakeProjectManager.CMakeRunConfiguration.kstandarditemmodeltest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + viewpropertiestest + viewpropertiestest2 + CMakeProjectManager.CMakeRunConfiguration.viewpropertiestest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + dolphinmainwindowtest + dolphinmainwindowtest2 + CMakeProjectManager.CMakeRunConfiguration.dolphinmainwindowtest +/home/meven/kde/src/dolphin/src/tests/ + + 3768 + false + true + false + false + true + + /home/meven/kde/build/dolphin/bin + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + kitemsettest + + CMakeProjectManager.CMakeRunConfiguration.kitemsettest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + kitemlistselectionmanagertest + + CMakeProjectManager.CMakeRunConfiguration.kitemlistselectionmanagertest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + kitemrangetest + + CMakeProjectManager.CMakeRunConfiguration.kitemrangetest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + kitemlistkeyboardsearchmanagertest + + CMakeProjectManager.CMakeRunConfiguration.kitemlistkeyboardsearchmanagertest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + kfileitemmodelbenchmark + + CMakeProjectManager.CMakeRunConfiguration.kfileitemmodelbenchmark + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + draganddrophelpertest + + CMakeProjectManager.CMakeRunConfiguration.draganddrophelpertest + + 3768 + false + true + false + false + true + + + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + kfileitemmodeltest + + CMakeProjectManager.CMakeRunConfiguration.kfileitemmodeltest + + 3768 + false + true + false + false + true + + + + 30 + + + + ProjectExplorer.Project.Target.1 + + Qt 5.12.2 (gcc_64) + Qt 5.12.2 (gcc_64) + {68785932-3203-4b8c-9588-58d4d6642247} + 0 + 0 + -1 + + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_687859-Du00e9faut + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Défaut + Défaut + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Debug + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_687859-Debug + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Release + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_687859-Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=RelWithDebInfo + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_687859-Release with Debug Information + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release with Debug Information + Release with Debug Information + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=MinSizeRel + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_687859-Minimum Size Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Minimum Size Release + Minimum Size Release + CMakeProjectManager.CMakeBuildConfiguration + + 5 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy Configuration + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + 0 + + + + ProjectExplorer.Project.Target.2 + + Qt 5.12.2 (gcc_64) + Qt 5.12.2 (gcc_64) + {bbd0a7c8-766c-4891-95d3-91e0cefe88c2} + 0 + 0 + -1 + + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_bbd0a7-Du00e9faut + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Défaut + Défaut + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Debug + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_bbd0a7-Debug + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Release + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_bbd0a7-Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=RelWithDebInfo + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_bbd0a7-Release with Debug Information + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release with Debug Information + Release with Debug Information + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=MinSizeRel + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_bbd0a7-Minimum Size Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Minimum Size Release + Minimum Size Release + CMakeProjectManager.CMakeBuildConfiguration + + 5 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy Configuration + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + 0 + + + + ProjectExplorer.Project.Target.3 + + Qt 5.12.2 (gcc_64) + Qt 5.12.2 (gcc_64) + {5ee26e83-a7d2-4d2d-8ccd-1e2c85c2dfc9} + 0 + 0 + -1 + + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_5ee26e-Du00e9faut + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Défaut + Défaut + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Debug + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_5ee26e-Debug + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Release + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_5ee26e-Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=RelWithDebInfo + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_5ee26e-Release with Debug Information + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release with Debug Information + Release with Debug Information + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=MinSizeRel + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_5ee26e-Minimum Size Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Minimum Size Release + Minimum Size Release + CMakeProjectManager.CMakeBuildConfiguration + + 5 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy Configuration + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + 0 + + + + ProjectExplorer.Project.Target.4 + + Desktop Qt 5.12.2 GCC 64bit + Desktop Qt 5.12.2 GCC 64bit + qt.qt5.5122.gcc_64_kit + 0 + 0 + -1 + + + /home/meven/kde/src/build-dolphin-Desktop_Qt_5_12_2_GCC_64bit-Du00e9faut + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Défaut + Défaut + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Debug + + /home/meven/kde/src/build-dolphin-Desktop_Qt_5_12_2_GCC_64bit-Debug + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Release + + /home/meven/kde/src/build-dolphin-Desktop_Qt_5_12_2_GCC_64bit-Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=RelWithDebInfo + + /home/meven/kde/src/build-dolphin-Desktop_Qt_5_12_2_GCC_64bit-Release with Debug Information + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release with Debug Information + Release with Debug Information + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=MinSizeRel + + /home/meven/kde/src/build-dolphin-Desktop_Qt_5_12_2_GCC_64bit-Minimum Size Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Minimum Size Release + Minimum Size Release + CMakeProjectManager.CMakeBuildConfiguration + + 5 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy Configuration + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + 0 + + + + ProjectExplorer.Project.Target.5 + + Qt 5.12.2 (gcc_64) + Qt 5.12.2 (gcc_64) + {923c51fe-d547-4eb6-a581-059c8b8af65e} + 0 + 0 + -1 + + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_923c51-Du00e9faut + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Défaut + Défaut + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Debug + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_923c51-Debug + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=Release + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_923c51-Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=RelWithDebInfo + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_923c51-Release with Debug Information + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release with Debug Information + Release with Debug Information + CMakeProjectManager.CMakeBuildConfiguration + + + + CMAKE_BUILD_TYPE:STRING=MinSizeRel + + /home/meven/kde/src/build-dolphin-Qt_5_12_2_gcc_64_923c51-Minimum Size Release + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + + all + + true + CMake Build + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Minimum Size Release + Minimum Size Release + CMakeProjectManager.CMakeBuildConfiguration + + 5 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy Configuration + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + 0 + + + + ProjectExplorer.Project.TargetCount + 6 + + + ProjectExplorer.Project.Updater.FileVersion + 20 + + + Version + 20 + + diff --git a/git-blame b/git-blame new file mode 100644 --- /dev/null +++ b/git-blame @@ -0,0 +1,16 @@ +aldo.mateli@gmail.com +arichardson.kde@gmail.com +chinmoyrp65@gmail.com +craig@kde.org +cytadela88@gmail.com +elvis.angelaccio@kde.org +emmanuelpescosta099@gmail.com +ervin@kde.org +faure@kde.org +frank78ac@googlemail.com +infroma@gmail.com +kfunk@kde.org +mat69@gmx.net +mitchell@kde.org +montel@kde.org +peter.penz19@gmail.com diff --git a/git-blame2 b/git-blame2 new file mode 100644 --- /dev/null +++ b/git-blame2 @@ -0,0 +1,295 @@ +^5252c12db src/renamedialog.h 1 ( 2006-11-21 06:02:05 +0000 1) /*************************************************************************** +828ba8902c src/views/renamedialog.h 2 ( 2010-10-05 16:30:03 +0000 2) * Copyright (C) 2006-2010 by Peter Penz (peter.penz@gmx.at) * +^5252c12db src/renamedialog.h 4 ( 2006-11-21 06:02:05 +0000 3) * * +^5252c12db src/renamedialog.h 5 ( 2006-11-21 06:02:05 +0000 4) * This program is free software; you can redistribute it and/or modify * +^5252c12db src/renamedialog.h 6 ( 2006-11-21 06:02:05 +0000 5) * it under the terms of the GNU General Public License as published by * +^5252c12db src/renamedialog.h 7 ( 2006-11-21 06:02:05 +0000 6) * the Free Software Foundation; either version 2 of the License, or * +^5252c12db src/renamedialog.h 8 ( 2006-11-21 06:02:05 +0000 7) * (at your option) any later version. * +^5252c12db src/renamedialog.h 9 ( 2006-11-21 06:02:05 +0000 8) * * +^5252c12db src/renamedialog.h 10 ( 2006-11-21 06:02:05 +0000 9) * This program is distributed in the hope that it will be useful, * +^5252c12db src/renamedialog.h 11 ( 2006-11-21 06:02:05 +0000 10) * but WITHOUT ANY WARRANTY; without even the implied warranty of * +^5252c12db src/renamedialog.h 12 ( 2006-11-21 06:02:05 +0000 11) * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +^5252c12db src/renamedialog.h 13 ( 2006-11-21 06:02:05 +0000 12) * GNU General Public License for more details. * +^5252c12db src/renamedialog.h 14 ( 2006-11-21 06:02:05 +0000 13) * * +^5252c12db src/renamedialog.h 15 ( 2006-11-21 06:02:05 +0000 14) * You should have received a copy of the GNU General Public License * +^5252c12db src/renamedialog.h 16 ( 2006-11-21 06:02:05 +0000 15) * along with this program; if not, write to the * +^5252c12db src/renamedialog.h 17 ( 2006-11-21 06:02:05 +0000 16) * Free Software Foundation, Inc., * +d8ab89171d src/renamedialog.h 18 ( 2007-01-10 00:04:16 +0000 17) * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * +^5252c12db src/renamedialog.h 19 ( 2006-11-21 06:02:05 +0000 18) ***************************************************************************/ +828ba8902c src/views/renamedialog.h 19 ( 2010-10-05 16:30:03 +0000 19) +^5252c12db src/renamedialog.h 20 ( 2006-11-21 06:02:05 +0000 20) #ifndef RENAMEDIALOG_H +^5252c12db src/renamedialog.h 21 ( 2006-11-21 06:02:05 +0000 21) #define RENAMEDIALOG_H +^5252c12db src/renamedialog.h 22 ( 2006-11-21 06:02:05 +0000 22) +25751088c3 src/views/renamedialog.h 23 ( 2015-02-25 12:12:55 +0100 23) #include "dolphin_export.h" +3aa47b789b src/renamedialog.h 23 ( 2007-05-19 08:03:39 +0000 24) +8eb9b508ca src/views/renamedialog.h 26 ( 2011-02-04 15:43:21 +0100 25) #include +48b58f830a src/views/renamedialog.h 26 ( 2018-03-04 16:38:16 +0300 26) +48b58f830a src/views/renamedialog.h 27 ( 2018-03-04 16:38:16 +0300 27) #include +02c0835148 src/views/renamedialog.h 27 ( 2014-11-10 09:08:04 +0100 28) #include +d9ac44e08f src/renamedialog.h 24 ( 2007-03-13 17:31:54 +0000 29) +02c0835148 src/views/renamedialog.h 29 ( 2014-11-10 09:08:04 +0100 30) class QLineEdit; +424d20e435 src/views/renamedialog.h 30 ( 2014-11-10 09:12:33 +0100 31) class QSpinBox; +cd601a582d src/views/renamedialog.h 30 ( 2014-10-15 19:56:52 +0200 32) class QPushButton; +c5eb4e3116 src/views/renamedialog.h 32 ( 2018-01-27 17:19:39 +0530 33) class KJob; +^5252c12db src/renamedialog.h 29 ( 2006-11-21 06:02:05 +0000 34) /** +^5252c12db src/renamedialog.h 30 ( 2006-11-21 06:02:05 +0000 35) * @brief Dialog for renaming a variable number of files. +e308985de4 src/views/renamedialog.h 36 ( 2018-06-03 18:28:23 +0200 36) * +e308985de4 src/views/renamedialog.h 37 ( 2018-06-03 18:28:23 +0200 37) * The dialog deletes itself when accepted or rejected. +^5252c12db src/renamedialog.h 42 ( 2006-11-21 06:02:05 +0000 38) */ +25751088c3 src/views/renamedialog.h 36 ( 2015-02-25 12:12:55 +0100 39) class DOLPHIN_EXPORT RenameDialog : public QDialog +^5252c12db src/renamedialog.h 44 ( 2006-11-21 06:02:05 +0000 40) { +^5252c12db src/renamedialog.h 45 ( 2006-11-21 06:02:05 +0000 41) Q_OBJECT +^5252c12db src/renamedialog.h 46 ( 2006-11-21 06:02:05 +0000 42) +^5252c12db src/renamedialog.h 47 ( 2006-11-21 06:02:05 +0000 43) public: +ad74c99bbc src/renamedialog.h 56 ( 2007-11-08 13:29:44 +0000 44) explicit RenameDialog(QWidget* parent, const KFileItemList& items); +464b13f382 src/views/renamedialog.h 42 ( 2017-11-20 23:25:06 +0100 45) ~RenameDialog() override; +^5252c12db src/renamedialog.h 50 ( 2006-11-21 06:02:05 +0000 46) +478f404b8a src/views/renamedialog.h 44 ( 2017-09-17 11:07:44 +0200 47) signals: +478f404b8a src/views/renamedialog.h 45 ( 2017-09-17 11:07:44 +0200 48) void renamingFinished(const QList& urls); +478f404b8a src/views/renamedialog.h 46 ( 2017-09-17 11:07:44 +0200 49) +b51083c12b src/views/renamedialog.h 79 ( 2010-09-20 21:04:48 +0000 50) private slots: +cd601a582d src/views/renamedialog.h 45 ( 2014-10-15 19:56:52 +0200 51) void slotAccepted(); +b51083c12b src/views/renamedialog.h 80 ( 2010-09-20 21:04:48 +0000 52) void slotTextChanged(const QString& newName); +c5eb4e3116 src/views/renamedialog.h 50 ( 2018-01-27 17:19:39 +0530 53) void slotFileRenamed(const QUrl& oldUrl, const QUrl& newUrl); +c5eb4e3116 src/views/renamedialog.h 51 ( 2018-01-27 17:19:39 +0530 54) void slotResult(KJob* job); +b51083c12b src/views/renamedialog.h 81 ( 2010-09-20 21:04:48 +0000 55) +4143a69c05 src/views/renamedialog.h 48 ( 2015-09-06 16:34:41 +0200 56) protected: +4143a69c05 src/views/renamedialog.h 49 ( 2015-09-06 16:34:41 +0200 57) void showEvent(QShowEvent* event) override; +4143a69c05 src/views/renamedialog.h 50 ( 2015-09-06 16:34:41 +0200 58) +828ba8902c src/views/renamedialog.h 62 ( 2010-10-05 16:30:03 +0000 59) private: +828ba8902c src/views/renamedialog.h 63 ( 2010-10-05 16:30:03 +0000 60) bool m_renameOneItem; +478f404b8a src/views/renamedialog.h 69 ( 2017-09-17 11:07:44 +0200 61) QList m_renamedItems; +828ba8902c src/views/renamedialog.h 64 ( 2010-10-05 16:30:03 +0000 62) QString m_newName; +02c0835148 src/views/renamedialog.h 64 ( 2014-11-10 09:08:04 +0100 63) QLineEdit* m_lineEdit; +828ba8902c src/views/renamedialog.h 66 ( 2010-10-05 16:30:03 +0000 64) KFileItemList m_items; +e8c4d19b7c src/views/renamedialog.h 67 ( 2013-06-20 19:37:53 +0200 65) bool m_allExtensionsDifferent; +424d20e435 src/views/renamedialog.h 67 ( 2014-11-10 09:12:33 +0100 66) QSpinBox* m_spinBox; +cd601a582d src/views/renamedialog.h 68 ( 2014-10-15 19:56:52 +0200 67) QPushButton* m_okButton; +828ba8902c src/views/renamedialog.h 67 ( 2010-10-05 16:30:03 +0000 68) }; +c848b945d4 src/renamedialog.h 97 ( 2009-05-26 18:24:23 +0000 69) +^5252c12db src/renamedialog.h 67 ( 2006-11-21 06:02:05 +0000 70) #endif +^5252c12db src/renamedialog.cpp 1 ( 2006-11-21 06:02:05 +0000 1) /*************************************************************************** +828ba8902c src/views/renamedialog.cpp 2 ( 2010-10-05 16:30:03 +0000 2) * Copyright (C) 2006-2010 by Peter Penz (peter.penz@gmx.at) * +^5252c12db src/renamedialog.cpp 4 ( 2006-11-21 06:02:05 +0000 3) * * +^5252c12db src/renamedialog.cpp 5 ( 2006-11-21 06:02:05 +0000 4) * This program is free software; you can redistribute it and/or modify * +^5252c12db src/renamedialog.cpp 6 ( 2006-11-21 06:02:05 +0000 5) * it under the terms of the GNU General Public License as published by * +^5252c12db src/renamedialog.cpp 7 ( 2006-11-21 06:02:05 +0000 6) * the Free Software Foundation; either version 2 of the License, or * +^5252c12db src/renamedialog.cpp 8 ( 2006-11-21 06:02:05 +0000 7) * (at your option) any later version. * +^5252c12db src/renamedialog.cpp 9 ( 2006-11-21 06:02:05 +0000 8) * * +^5252c12db src/renamedialog.cpp 10 ( 2006-11-21 06:02:05 +0000 9) * This program is distributed in the hope that it will be useful, * +^5252c12db src/renamedialog.cpp 11 ( 2006-11-21 06:02:05 +0000 10) * but WITHOUT ANY WARRANTY; without even the implied warranty of * +^5252c12db src/renamedialog.cpp 12 ( 2006-11-21 06:02:05 +0000 11) * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +^5252c12db src/renamedialog.cpp 13 ( 2006-11-21 06:02:05 +0000 12) * GNU General Public License for more details. * +^5252c12db src/renamedialog.cpp 14 ( 2006-11-21 06:02:05 +0000 13) * * +^5252c12db src/renamedialog.cpp 15 ( 2006-11-21 06:02:05 +0000 14) * You should have received a copy of the GNU General Public License * +^5252c12db src/renamedialog.cpp 16 ( 2006-11-21 06:02:05 +0000 15) * along with this program; if not, write to the * +^5252c12db src/renamedialog.cpp 17 ( 2006-11-21 06:02:05 +0000 16) * Free Software Foundation, Inc., * +d8ab89171d src/renamedialog.cpp 18 ( 2007-01-10 00:04:16 +0000 17) * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * +^5252c12db src/renamedialog.cpp 19 ( 2006-11-21 06:02:05 +0000 18) ***************************************************************************/ +^5252c12db src/renamedialog.cpp 20 ( 2006-11-21 06:02:05 +0000 19) +^5252c12db src/renamedialog.cpp 21 ( 2006-11-21 06:02:05 +0000 20) #include "renamedialog.h" +d9ac44e08f src/renamedialog.cpp 21 ( 2007-03-13 17:31:54 +0000 21) +48b58f830a src/views/renamedialog.cpp 22 ( 2018-03-04 16:38:16 +0300 22) #include +48b58f830a src/views/renamedialog.cpp 23 ( 2018-03-04 16:38:16 +0300 23) #include +76ce61a05f src/views/renamedialog.cpp 26 ( 2014-09-04 18:09:27 +0200 24) #include +76ce61a05f src/views/renamedialog.cpp 27 ( 2014-09-04 18:09:27 +0200 25) #include +0a6257bce3 src/views/renamedialog.cpp 30 ( 2014-10-18 15:00:17 +0200 26) #include +48b58f830a src/views/renamedialog.cpp 27 ( 2018-03-04 16:38:16 +0300 27) #include +48b58f830a src/views/renamedialog.cpp 28 ( 2018-03-04 16:38:16 +0300 28) #include +d9ac44e08f src/renamedialog.cpp 24 ( 2007-03-13 17:31:54 +0000 29) +48b58f830a src/views/renamedialog.cpp 30 ( 2018-03-04 16:38:16 +0300 30) #include +1479e82315 src/views/renamedialog.cpp 28 ( 2011-08-15 20:34:28 +0200 31) #include +828ba8902c src/views/renamedialog.cpp 27 ( 2010-10-05 16:30:03 +0000 32) #include +48b58f830a src/views/renamedialog.cpp 33 ( 2018-03-04 16:38:16 +0300 33) #include +5c1420fec9 src/views/renamedialog.cpp 36 ( 2014-10-07 07:38:16 +0200 34) #include +cd601a582d src/views/renamedialog.cpp 39 ( 2014-10-15 19:56:52 +0200 35) #include +f67bdd0fb7 src/views/renamedialog.cpp 36 ( 2015-02-06 13:21:27 +0100 36) #include +828ba8902c src/views/renamedialog.cpp 29 ( 2010-10-05 16:30:03 +0000 37) +ad74c99bbc src/renamedialog.cpp 29 ( 2007-11-08 13:29:44 +0000 38) RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) : +cd601a582d src/views/renamedialog.cpp 43 ( 2014-10-15 19:56:52 +0200 39) QDialog(parent), +828ba8902c src/views/renamedialog.cpp 41 ( 2010-10-05 16:30:03 +0000 40) m_renameOneItem(false), +828ba8902c src/views/renamedialog.cpp 42 ( 2010-10-05 16:30:03 +0000 41) m_newName(), +a6db5029ac src/views/renamedialog.cpp 42 ( 2017-11-21 10:52:14 +0100 42) m_lineEdit(nullptr), +1479e82315 src/views/renamedialog.cpp 46 ( 2011-08-15 20:34:28 +0200 43) m_items(items), +e8c4d19b7c src/views/renamedialog.cpp 48 ( 2013-06-20 19:37:53 +0200 44) m_allExtensionsDifferent(true), +a6db5029ac src/views/renamedialog.cpp 45 ( 2017-11-21 10:52:14 +0100 45) m_spinBox(nullptr) +^5252c12db src/renamedialog.cpp 34 ( 2006-11-21 06:02:05 +0000 46) { +507984415a src/renamedialog.cpp 32 ( 2007-03-13 18:33:00 +0000 47) const QSize minSize = minimumSize(); +507984415a src/renamedialog.cpp 33 ( 2007-03-13 18:33:00 +0000 48) setMinimumSize(QSize(320, minSize.height())); +507984415a src/renamedialog.cpp 34 ( 2007-03-13 18:33:00 +0000 49) +7cd37f4747 src/renamedialog.cpp 36 ( 2007-08-16 13:22:18 +0000 50) const int itemCount = items.count(); +507984415a src/renamedialog.cpp 36 ( 2007-03-13 18:33:00 +0000 51) Q_ASSERT(itemCount >= 1); +507984415a src/renamedialog.cpp 37 ( 2007-03-13 18:33:00 +0000 52) m_renameOneItem = (itemCount == 1); +507984415a src/renamedialog.cpp 38 ( 2007-03-13 18:33:00 +0000 53) +cd601a582d src/views/renamedialog.cpp 58 ( 2014-10-15 19:56:52 +0200 54) setWindowTitle(m_renameOneItem ? +50d9e030e7 src/renamedialog.cpp 40 ( 2007-07-09 17:51:39 +0000 55) i18nc("@title:window", "Rename Item") : +50d9e030e7 src/renamedialog.cpp 41 ( 2007-07-09 17:51:39 +0000 56) i18nc("@title:window", "Rename Items")); +cd601a582d src/views/renamedialog.cpp 61 ( 2014-10-15 19:56:52 +0200 57) QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel); +cd601a582d src/views/renamedialog.cpp 62 ( 2014-10-15 19:56:52 +0200 58) QVBoxLayout *mainLayout = new QVBoxLayout; +cd601a582d src/views/renamedialog.cpp 63 ( 2014-10-15 19:56:52 +0200 59) setLayout(mainLayout); +cd601a582d src/views/renamedialog.cpp 64 ( 2014-10-15 19:56:52 +0200 60) m_okButton = buttonBox->button(QDialogButtonBox::Ok); +cd601a582d src/views/renamedialog.cpp 65 ( 2014-10-15 19:56:52 +0200 61) m_okButton->setDefault(true); +32bd8efc7f src/views/renamedialog.cpp 63 ( 2018-03-03 11:46:14 +0300 62) m_okButton->setShortcut(Qt::CTRL + Qt::Key_Return); +5593c252e8 src/views/renamedialog.cpp 63 ( 2016-03-16 22:17:37 +0100 63) connect(buttonBox, &QDialogButtonBox::accepted, this, &RenameDialog::slotAccepted); +5593c252e8 src/views/renamedialog.cpp 64 ( 2016-03-16 22:17:37 +0100 64) connect(buttonBox, &QDialogButtonBox::rejected, this, &RenameDialog::reject); +e308985de4 src/views/renamedialog.cpp 65 ( 2018-06-03 18:28:23 +0200 65) connect(buttonBox, &QDialogButtonBox::rejected, this, &QObject::deleteLater); +cd601a582d src/views/renamedialog.cpp 69 ( 2014-10-15 19:56:52 +0200 66) m_okButton->setDefault(true); +cd601a582d src/views/renamedialog.cpp 70 ( 2014-10-15 19:56:52 +0200 67) +5593c252e8 src/views/renamedialog.cpp 67 ( 2016-03-16 22:17:37 +0100 68) KGuiItem::assign(m_okButton, KGuiItem(i18nc("@action:button", "&Rename"), QStringLiteral("dialog-ok-apply"))); +9a5f54d83d src/renamedialog.cpp 39 ( 2006-11-22 11:34:19 +0000 69) +9a5f54d83d src/renamedialog.cpp 40 ( 2006-11-22 11:34:19 +0000 70) QWidget* page = new QWidget(this); +cd601a582d src/views/renamedialog.cpp 74 ( 2014-10-15 19:56:52 +0200 71) mainLayout->addWidget(page); +cd601a582d src/views/renamedialog.cpp 75 ( 2014-10-15 19:56:52 +0200 72) mainLayout->addWidget(buttonBox); +9a5f54d83d src/renamedialog.cpp 42 ( 2006-11-22 11:34:19 +0000 73) +d9ac44e08f src/renamedialog.cpp 40 ( 2007-03-13 17:31:54 +0000 74) QVBoxLayout* topLayout = new QVBoxLayout(page); +^5252c12db src/renamedialog.cpp 39 ( 2006-11-21 06:02:05 +0000 75) +a6db5029ac src/views/renamedialog.cpp 75 ( 2017-11-21 10:52:14 +0100 76) QLabel* editLabel = nullptr; +507984415a src/renamedialog.cpp 52 ( 2007-03-13 18:33:00 +0000 77) if (m_renameOneItem) { +f8fa4e8df1 src/renamedialog.cpp 56 ( 2007-08-14 16:46:06 +0000 78) m_newName = items.first().name(); +31230ccdb5 src/views/renamedialog.cpp 66 ( 2014-07-16 13:26:38 +0200 79) editLabel = new QLabel(xi18nc("@label:textbox", "Rename the item %1 to:", m_newName), +f23e9496f3 src/views/renamedialog.cpp 70 ( 2011-07-30 20:13:09 +0200 80) page); +f7216ca591 src/views/renamedialog.cpp 75 ( 2013-01-09 16:17:55 +0100 81) editLabel->setTextFormat(Qt::PlainText); +c8a4f1fd8d src/renamedialog.cpp 57 ( 2007-04-09 19:12:54 +0000 82) } else { +08fc0833aa src/renamedialog.cpp 58 ( 2007-06-30 19:40:15 +0000 83) m_newName = i18nc("@info:status", "New name #"); +7eef5ebec2 src/renamedialog.cpp 61 ( 2007-07-12 06:10:54 +0000 84) editLabel = new QLabel(i18ncp("@label:textbox", +7eef5ebec2 src/renamedialog.cpp 62 ( 2007-07-12 06:10:54 +0000 85) "Rename the %1 selected item to:", +9966f3789c src/renamedialog.cpp 60 ( 2007-06-13 20:41:06 +0000 86) "Rename the %1 selected items to:", itemCount), +507984415a src/renamedialog.cpp 59 ( 2007-03-13 18:33:00 +0000 87) page); +507984415a src/renamedialog.cpp 60 ( 2007-03-13 18:33:00 +0000 88) } +^5252c12db src/renamedialog.cpp 43 ( 2006-11-21 06:02:05 +0000 89) +02c0835148 src/views/renamedialog.cpp 91 ( 2014-11-10 09:08:04 +0100 90) m_lineEdit = new QLineEdit(page); +cd601a582d src/views/renamedialog.cpp 94 ( 2014-10-15 19:56:52 +0200 91) mainLayout->addWidget(m_lineEdit); +02c0835148 src/views/renamedialog.cpp 93 ( 2014-11-10 09:08:04 +0100 92) connect(m_lineEdit, &QLineEdit::textChanged, this, &RenameDialog::slotTextChanged); +f2e7c6d0d9 src/renamedialog.cpp 67 ( 2009-04-12 15:39:13 +0000 93) +507984415a src/renamedialog.cpp 80 ( 2007-03-13 18:33:00 +0000 94) int selectionLength = m_newName.length(); +3b4d05893b src/renamedialog.cpp 87 ( 2007-03-24 15:16:15 +0000 95) if (m_renameOneItem) { +2f045c6010 src/views/renamedialog.cpp 91 ( 2014-04-06 03:32:55 +0200 96) const QString fileName = items.first().url().toDisplayString(); +5c1420fec9 src/views/renamedialog.cpp 87 ( 2014-10-07 07:38:16 +0200 97) QMimeDatabase db; +5c1420fec9 src/views/renamedialog.cpp 88 ( 2014-10-07 07:38:16 +0200 98) const QString extension = db.suffixForFileName(fileName.toLower()); +149975a004 src/views/renamedialog.cpp 90 ( 2012-07-20 12:09:04 +0200 99) +149975a004 src/views/renamedialog.cpp 91 ( 2012-07-20 12:09:04 +0200 100) // If the current item is a directory, select the whole file name. +149975a004 src/views/renamedialog.cpp 92 ( 2012-07-20 12:09:04 +0200 101) if ((extension.length() > 0) && !items.first().isDir()) { +c4a3313ea9 src/views/renamedialog.cpp 90 ( 2011-09-01 18:56:53 +0200 102) // Don't select the extension +c4a3313ea9 src/views/renamedialog.cpp 91 ( 2011-09-01 18:56:53 +0200 103) selectionLength -= extension.length() + 1; +^5252c12db src/renamedialog.cpp 65 ( 2006-11-21 06:02:05 +0000 104) } +c4a3313ea9 src/views/renamedialog.cpp 93 ( 2011-09-01 18:56:53 +0200 105) } else { +c4a3313ea9 src/views/renamedialog.cpp 94 ( 2011-09-01 18:56:53 +0200 106) // Don't select the # character +c4a3313ea9 src/views/renamedialog.cpp 95 ( 2011-09-01 18:56:53 +0200 107) --selectionLength; +3b4d05893b src/renamedialog.cpp 93 ( 2007-03-24 15:16:15 +0000 108) } +3b4d05893b src/renamedialog.cpp 94 ( 2007-03-24 15:16:15 +0000 109) +^5252c12db src/renamedialog.cpp 66 ( 2006-11-21 06:02:05 +0000 110) m_lineEdit->setText(m_newName); +507984415a src/renamedialog.cpp 89 ( 2007-03-13 18:33:00 +0000 111) m_lineEdit->setSelection(0, selectionLength); +^5252c12db src/renamedialog.cpp 69 ( 2006-11-21 06:02:05 +0000 112) +^5252c12db src/renamedialog.cpp 72 ( 2006-11-21 06:02:05 +0000 113) topLayout->addWidget(editLabel); +^5252c12db src/renamedialog.cpp 73 ( 2006-11-21 06:02:05 +0000 114) topLayout->addWidget(m_lineEdit); +507984415a src/renamedialog.cpp 94 ( 2007-03-13 18:33:00 +0000 115) +507984415a src/renamedialog.cpp 95 ( 2007-03-13 18:33:00 +0000 116) if (!m_renameOneItem) { +e8c4d19b7c src/views/renamedialog.cpp 111 ( 2013-06-20 19:37:53 +0200 117) QSet extensions; +e8c4d19b7c src/views/renamedialog.cpp 112 ( 2013-06-20 19:37:53 +0200 118) foreach (const KFileItem& item, m_items) { +5c1420fec9 src/views/renamedialog.cpp 110 ( 2014-10-07 07:38:16 +0200 119) QMimeDatabase db; +5c1420fec9 src/views/renamedialog.cpp 111 ( 2014-10-07 07:38:16 +0200 120) const QString extension = db.suffixForFileName(item.url().toDisplayString().toLower()); +e8c4d19b7c src/views/renamedialog.cpp 114 ( 2013-06-20 19:37:53 +0200 121) +e8c4d19b7c src/views/renamedialog.cpp 115 ( 2013-06-20 19:37:53 +0200 122) if (extensions.contains(extension)) { +e8c4d19b7c src/views/renamedialog.cpp 116 ( 2013-06-20 19:37:53 +0200 123) m_allExtensionsDifferent = false; +e8c4d19b7c src/views/renamedialog.cpp 117 ( 2013-06-20 19:37:53 +0200 124) break; +e8c4d19b7c src/views/renamedialog.cpp 118 ( 2013-06-20 19:37:53 +0200 125) } +e8c4d19b7c src/views/renamedialog.cpp 119 ( 2013-06-20 19:37:53 +0200 126) +e8c4d19b7c src/views/renamedialog.cpp 120 ( 2013-06-20 19:37:53 +0200 127) extensions.insert(extension); +e8c4d19b7c src/views/renamedialog.cpp 121 ( 2013-06-20 19:37:53 +0200 128) } +e8c4d19b7c src/views/renamedialog.cpp 122 ( 2013-06-20 19:37:53 +0200 129) +1479e82315 src/views/renamedialog.cpp 124 ( 2011-08-15 20:34:28 +0200 130) QLabel* infoLabel = new QLabel(i18nc("@info", "# will be replaced by ascending numbers starting with:"), page); +cd601a582d src/views/renamedialog.cpp 135 ( 2014-10-15 19:56:52 +0200 131) mainLayout->addWidget(infoLabel); +424d20e435 src/views/renamedialog.cpp 134 ( 2014-11-10 09:12:33 +0100 132) m_spinBox = new QSpinBox(page); +424d20e435 src/views/renamedialog.cpp 135 ( 2014-11-10 09:12:33 +0100 133) m_spinBox->setMaximum(10000); +424d20e435 src/views/renamedialog.cpp 136 ( 2014-11-10 09:12:33 +0100 134) m_spinBox->setMinimum(0); +424d20e435 src/views/renamedialog.cpp 137 ( 2014-11-10 09:12:33 +0100 135) m_spinBox->setSingleStep(1); +424d20e435 src/views/renamedialog.cpp 138 ( 2014-11-10 09:12:33 +0100 136) m_spinBox->setValue(1); +424d20e435 src/views/renamedialog.cpp 139 ( 2014-11-10 09:12:33 +0100 137) m_spinBox->setDisplayIntegerBase(10); +1479e82315 src/views/renamedialog.cpp 126 ( 2011-08-15 20:34:28 +0200 138) +1479e82315 src/views/renamedialog.cpp 127 ( 2011-08-15 20:34:28 +0200 139) QHBoxLayout* horizontalLayout = new QHBoxLayout(page); +4315e5c938 src/views/renamedialog.cpp 140 ( 2019-02-27 08:59:18 +0100 140) horizontalLayout->setContentsMargins(0, 0, 0, 0); +1479e82315 src/views/renamedialog.cpp 129 ( 2011-08-15 20:34:28 +0200 141) horizontalLayout->addWidget(infoLabel); +1479e82315 src/views/renamedialog.cpp 130 ( 2011-08-15 20:34:28 +0200 142) horizontalLayout->addWidget(m_spinBox); +1479e82315 src/views/renamedialog.cpp 131 ( 2011-08-15 20:34:28 +0200 143) +1479e82315 src/views/renamedialog.cpp 132 ( 2011-08-15 20:34:28 +0200 144) topLayout->addLayout(horizontalLayout); +^5252c12db src/renamedialog.cpp 75 ( 2006-11-21 06:02:05 +0000 145) } +507984415a src/renamedialog.cpp 99 ( 2007-03-13 18:33:00 +0000 146) } +^5252c12db src/renamedialog.cpp 76 ( 2006-11-21 06:02:05 +0000 147) +^5252c12db src/renamedialog.cpp 77 ( 2006-11-21 06:02:05 +0000 148) RenameDialog::~RenameDialog() +8fd40e72aa src/renamedialog.cpp 111 ( 2008-06-10 17:22:24 +0000 149) { +8fd40e72aa src/renamedialog.cpp 112 ( 2008-06-10 17:22:24 +0000 150) } +^5252c12db src/renamedialog.cpp 80 ( 2006-11-21 06:02:05 +0000 151) +c5eb4e3116 src/views/renamedialog.cpp 152 ( 2018-01-27 17:19:39 +0530 152) void RenameDialog::slotAccepted() +^5252c12db src/renamedialog.cpp 82 ( 2006-11-21 06:02:05 +0000 153) { +0d6bf03598 src/views/renamedialog.cpp 150 ( 2013-06-22 09:19:27 +0200 154) QWidget* widget = parentWidget(); +0d6bf03598 src/views/renamedialog.cpp 151 ( 2013-06-22 09:19:27 +0200 155) if (!widget) { +0d6bf03598 src/views/renamedialog.cpp 152 ( 2013-06-22 09:19:27 +0200 156) widget = this; +0d6bf03598 src/views/renamedialog.cpp 153 ( 2013-06-22 09:19:27 +0200 157) } +0d6bf03598 src/views/renamedialog.cpp 154 ( 2013-06-22 09:19:27 +0200 158) +30349ef1bd src/views/renamedialog.cpp 158 ( 2018-04-05 22:33:34 +0200 159) const QList srcList = m_items.urlList(); +30349ef1bd src/views/renamedialog.cpp 159 ( 2018-04-05 22:33:34 +0200 160) const QString newName = m_lineEdit->text(); +c5eb4e3116 src/views/renamedialog.cpp 159 ( 2018-01-27 17:19:39 +0530 161) KIO::FileUndoManager::CommandType cmdType; +30349ef1bd src/views/renamedialog.cpp 161 ( 2018-04-05 22:33:34 +0200 162) KIO::Job *job = nullptr; +c5eb4e3116 src/views/renamedialog.cpp 160 ( 2018-01-27 17:19:39 +0530 163) if (m_renameOneItem) { +c5eb4e3116 src/views/renamedialog.cpp 161 ( 2018-01-27 17:19:39 +0530 164) Q_ASSERT(m_items.count() == 1); +c5eb4e3116 src/views/renamedialog.cpp 162 ( 2018-01-27 17:19:39 +0530 165) cmdType = KIO::FileUndoManager::Rename; +30349ef1bd src/views/renamedialog.cpp 165 ( 2018-04-05 22:33:34 +0200 166) const QUrl oldUrl = m_items.constFirst().url(); +30349ef1bd src/views/renamedialog.cpp 166 ( 2018-04-05 22:33:34 +0200 167) QUrl newUrl = oldUrl.adjusted(QUrl::RemoveFilename); +30349ef1bd src/views/renamedialog.cpp 167 ( 2018-04-05 22:33:34 +0200 168) newUrl.setPath(newUrl.path() + KIO::encodeFileName(newName)); +30349ef1bd src/views/renamedialog.cpp 168 ( 2018-04-05 22:33:34 +0200 169) m_renamedItems << newUrl; +30349ef1bd src/views/renamedialog.cpp 169 ( 2018-04-05 22:33:34 +0200 170) job = KIO::moveAs(oldUrl, newUrl, KIO::HideProgressInfo); +c5eb4e3116 src/views/renamedialog.cpp 163 ( 2018-01-27 17:19:39 +0530 171) } else { +c5eb4e3116 src/views/renamedialog.cpp 164 ( 2018-01-27 17:19:39 +0530 172) cmdType = KIO::FileUndoManager::BatchRename; +30349ef1bd src/views/renamedialog.cpp 172 ( 2018-04-05 22:33:34 +0200 173) job = KIO::batchRename(srcList, newName, m_spinBox->value(), QLatin1Char('#')); +30349ef1bd src/views/renamedialog.cpp 173 ( 2018-04-05 22:33:34 +0200 174) connect(qobject_cast(job), &KIO::BatchRenameJob::fileRenamed, this, &RenameDialog::slotFileRenamed); +c5eb4e3116 src/views/renamedialog.cpp 165 ( 2018-01-27 17:19:39 +0530 175) } +c5eb4e3116 src/views/renamedialog.cpp 166 ( 2018-01-27 17:19:39 +0530 176) +76ce61a05f src/views/renamedialog.cpp 146 ( 2014-09-04 18:09:27 +0200 177) KJobWidgets::setWindow(job, widget); +c5eb4e3116 src/views/renamedialog.cpp 170 ( 2018-01-27 17:19:39 +0530 178) const QUrl parentUrl = srcList.first().adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash); +c5eb4e3116 src/views/renamedialog.cpp 171 ( 2018-01-27 17:19:39 +0530 179) KIO::FileUndoManager::self()->recordJob(cmdType, srcList, parentUrl, job); +478f404b8a src/views/renamedialog.cpp 165 ( 2017-09-17 11:07:44 +0200 180) +30349ef1bd src/views/renamedialog.cpp 180 ( 2018-04-05 22:33:34 +0200 181) connect(job, &KJob::result, this, &RenameDialog::slotResult); +e308985de4 src/views/renamedialog.cpp 182 ( 2018-06-03 18:28:23 +0200 182) connect(job, &KJob::result, this, &QObject::deleteLater); +478f404b8a src/views/renamedialog.cpp 169 ( 2017-09-17 11:07:44 +0200 183) +1be2704214 src/views/renamedialog.cpp 165 ( 2017-01-18 23:45:39 +0100 184) job->uiDelegate()->setAutoErrorHandlingEnabled(true); +dacded2afd src/views/renamedialog.cpp 144 ( 2014-09-04 17:50:48 +0200 185) +cd601a582d src/views/renamedialog.cpp 178 ( 2014-10-15 19:56:52 +0200 186) accept(); +^5252c12db src/renamedialog.cpp 89 ( 2006-11-21 06:02:05 +0000 187) } +^5252c12db src/renamedialog.cpp 90 ( 2006-11-21 06:02:05 +0000 188) +b51083c12b src/views/renamedialog.cpp 133 ( 2010-09-20 21:04:48 +0000 189) void RenameDialog::slotTextChanged(const QString& newName) +b51083c12b src/views/renamedialog.cpp 134 ( 2010-09-20 21:04:48 +0000 190) { +af37efda77 src/views/renamedialog.cpp 151 ( 2011-05-31 23:42:46 +0200 191) bool enable = !newName.isEmpty() && (newName != QLatin1String("..")) && (newName != QLatin1String(".")); +d9222cd1ce src/views/renamedialog.cpp 144 ( 2011-12-15 16:39:51 +0100 192) if (enable && !m_renameOneItem) { +a70fd06124 src/views/renamedialog.cpp 150 ( 2013-05-02 19:23:19 +0200 193) const int count = newName.count(QLatin1Char('#')); +e8c4d19b7c src/views/renamedialog.cpp 163 ( 2013-06-20 19:37:53 +0200 194) if (count == 0) { +e8c4d19b7c src/views/renamedialog.cpp 164 ( 2013-06-20 19:37:53 +0200 195) // Renaming multiple files without '#' will only work if all extensions are different. +e8c4d19b7c src/views/renamedialog.cpp 165 ( 2013-06-20 19:37:53 +0200 196) enable = m_allExtensionsDifferent; +e8c4d19b7c src/views/renamedialog.cpp 166 ( 2013-06-20 19:37:53 +0200 197) } else { +e8c4d19b7c src/views/renamedialog.cpp 167 ( 2013-06-20 19:37:53 +0200 198) // Assure that the new name contains exactly one # (or a connected sequence of #'s) +a70fd06124 src/views/renamedialog.cpp 151 ( 2013-05-02 19:23:19 +0200 199) const int first = newName.indexOf(QLatin1Char('#')); +a70fd06124 src/views/renamedialog.cpp 152 ( 2013-05-02 19:23:19 +0200 200) const int last = newName.lastIndexOf(QLatin1Char('#')); +a70fd06124 src/views/renamedialog.cpp 153 ( 2013-05-02 19:23:19 +0200 201) enable = (last - first + 1 == count); +828ba8902c src/views/renamedialog.cpp 159 ( 2010-10-05 16:30:03 +0000 202) } +e8c4d19b7c src/views/renamedialog.cpp 172 ( 2013-06-20 19:37:53 +0200 203) } +cd601a582d src/views/renamedialog.cpp 196 ( 2014-10-15 19:56:52 +0200 204) m_okButton->setEnabled(enable); +b51083c12b src/views/renamedialog.cpp 138 ( 2010-09-20 21:04:48 +0000 205) } +b51083c12b src/views/renamedialog.cpp 139 ( 2010-09-20 21:04:48 +0000 206) +c5eb4e3116 src/views/renamedialog.cpp 199 ( 2018-01-27 17:19:39 +0530 207) void RenameDialog::slotFileRenamed(const QUrl &oldUrl, const QUrl &newUrl) +4143a69c05 src/views/renamedialog.cpp 200 ( 2015-09-06 16:34:41 +0200 208) { +c5eb4e3116 src/views/renamedialog.cpp 201 ( 2018-01-27 17:19:39 +0530 209) Q_UNUSED(oldUrl) +c5eb4e3116 src/views/renamedialog.cpp 202 ( 2018-01-27 17:19:39 +0530 210) m_renamedItems << newUrl; +4143a69c05 src/views/renamedialog.cpp 204 ( 2015-09-06 16:34:41 +0200 211) } +4143a69c05 src/views/renamedialog.cpp 205 ( 2015-09-06 16:34:41 +0200 212) +c5eb4e3116 src/views/renamedialog.cpp 205 ( 2018-01-27 17:19:39 +0530 213) void RenameDialog::slotResult(KJob *job) +828ba8902c src/views/renamedialog.cpp 165 ( 2010-10-05 16:30:03 +0000 214) { +c5eb4e3116 src/views/renamedialog.cpp 207 ( 2018-01-27 17:19:39 +0530 215) if (!job->error()) { +478f404b8a src/views/renamedialog.cpp 233 ( 2017-09-17 11:07:44 +0200 216) emit renamingFinished(m_renamedItems); +478f404b8a src/views/renamedialog.cpp 234 ( 2017-09-17 11:07:44 +0200 217) } +828ba8902c src/views/renamedialog.cpp 184 ( 2010-10-05 16:30:03 +0000 218) } +828ba8902c src/views/renamedialog.cpp 185 ( 2010-10-05 16:30:03 +0000 219) +c5eb4e3116 src/views/renamedialog.cpp 212 ( 2018-01-27 17:19:39 +0530 220) void RenameDialog::showEvent(QShowEvent* event) +828ba8902c src/views/renamedialog.cpp 187 ( 2010-10-05 16:30:03 +0000 221) { +c5eb4e3116 src/views/renamedialog.cpp 214 ( 2018-01-27 17:19:39 +0530 222) m_lineEdit->setFocus(); +828ba8902c src/views/renamedialog.cpp 201 ( 2010-10-05 16:30:03 +0000 223) +c5eb4e3116 src/views/renamedialog.cpp 216 ( 2018-01-27 17:19:39 +0530 224) QDialog::showEvent(event); +828ba8902c src/views/renamedialog.cpp 203 ( 2010-10-05 16:30:03 +0000 225) } diff --git a/renamefiledialog.h b/renamefiledialog.h new file mode 100644 --- /dev/null +++ b/renamefiledialog.h @@ -0,0 +1,80 @@ +/*************************************************************************** + * Copyright (C) 2006-2010 by Peter Penz (peter.penz@gmx.at) * + * Copyright (C) 2019 by Méven Car (meven.car@kdemail.net) * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef RENAMEFILEDIALOG_H +#define RENAMEFILEDIALOG_H + +#include + +#include "kiowidgets_export.h" + +#include +#include + +class QLineEdit; +class QSpinBox; +class QPushButton; +class KJob; + +namespace KIO +{ + +/** + * @class KIO::RenameFileDialog renamefiledialog.h + * + * @brief Dialog for renaming a variable number of files. + * + * The dialog deletes itself when accepted or rejected. + */ +class KIOWIDGETS_EXPORT RenameFileDialog : public QDialog +{ + Q_OBJECT + +public: + /** + * Contructs the Dialog to rename file(s) + * + * @param parent the parent QWidget + * @param items a non-empty list of items to rename + */ + explicit RenameFileDialog(QWidget* parent, const KFileItemList& items); + ~RenameFileDialog() override; + +Q_SIGNALS: + void renamingFinished(const QList& urls); + +private Q_SLOTS: + void slotAccepted(); + void slotTextChanged(const QString& newName); + void slotFileRenamed(const QUrl& oldUrl, const QUrl& newUrl); + void slotResult(KJob* job); + bool event(QEvent* ev) override; + +protected: + void showEvent(QShowEvent* event) override; + +private: + class RenameFileDialogPrivate; + RenameFileDialogPrivate *const d; +}; + +} // namespace KIO + +#endif diff --git a/renamefiledialog.cpp b/renamefiledialog.cpp new file mode 100644 --- /dev/null +++ b/renamefiledialog.cpp @@ -0,0 +1,257 @@ +/*************************************************************************** + * Copyright (C) 2006-2010 by Peter Penz (peter.penz@gmx.at) * + * Copyright (C) 2019 by Méven Car (meven.car@kdemail.net) * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#include "renamefiledialog.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace KIO +{ + +class Q_DECL_HIDDEN RenameFileDialog::RenameFileDialogPrivate +{ +public: + + RenameFileDialogPrivate() : + renameOneItem(false), + lineEdit(nullptr), + allExtensionsDifferent(true), + spinBox(nullptr) + { + + } + + bool renameOneItem; + QList renamedItems; + QLineEdit* lineEdit; + KFileItemList items; + bool allExtensionsDifferent; + QSpinBox* spinBox; + QPushButton* okButton; +}; + +RenameFileDialog::RenameFileDialog(QWidget *parent, const KFileItemList& items) : + QDialog(parent), + d(new RenameFileDialogPrivate()) +{ + const QSize minSize = minimumSize(); + setMinimumSize(QSize(320, minSize.height())); + + const int itemCount = items.count(); + Q_ASSERT(itemCount >= 1); + d->renameOneItem = (itemCount == 1); + + setWindowTitle(d->renameOneItem ? + i18nc("@title:window", "Rename Item") : + i18nc("@title:window", "Rename Items")); + QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + QVBoxLayout *mainLayout = new QVBoxLayout; + setLayout(mainLayout); + d->okButton = buttonBox->button(QDialogButtonBox::Ok); + d->okButton->setDefault(true); + d->okButton->setShortcut(Qt::CTRL + Qt::Key_Return); + connect(buttonBox, &QDialogButtonBox::accepted, this, &RenameFileDialog::slotAccepted); + connect(buttonBox, &QDialogButtonBox::rejected, this, &RenameFileDialog::reject); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QObject::deleteLater); + d->okButton->setDefault(true); + + KGuiItem::assign(d->okButton, KGuiItem(i18nc("@action:button", "&Rename"), QStringLiteral("dialog-ok-apply"))); + + QWidget* page = new QWidget(this); + mainLayout->addWidget(page); + mainLayout->addWidget(buttonBox); + + QVBoxLayout* topLayout = new QVBoxLayout(page); + + QLabel* editLabel = nullptr; + QString newName; + if (d->renameOneItem) { + newName = items.first().name(); + editLabel = new QLabel(xi18nc("@label:textbox", "Rename the item %1 to:", newName), + page); + editLabel->setTextFormat(Qt::PlainText); + } else { + newName = i18nc("This a template for new filenames, # is replaced by a number later, must be the end charater", "New name #"); + editLabel = new QLabel(i18ncp("@label:textbox", + "Rename the %1 selected item to:", + "Rename the %1 selected items to:", itemCount), + page); + } + + d->lineEdit = new QLineEdit(page); + mainLayout->addWidget(d->lineEdit); + connect(d->lineEdit, &QLineEdit::textChanged, this, &RenameFileDialog::slotTextChanged); + + int selectionLength = newName.length(); + if (d->renameOneItem) { + // If the current item is a directory, select the whole file name. + if (!items.first().isDir()) { + const QString fileName = items.first().url().toDisplayString(); + QMimeDatabase db; + const QString extension = db.suffixForFileName(fileName.toLower()); + + if (extension.length() > 0) { + // Don't select the extension + selectionLength -= extension.length() + 1; + } + } + } else { + // Don't select the # character + --selectionLength; + } + + d->lineEdit->setText(newName); + d->lineEdit->setSelection(0, selectionLength); + + topLayout->addWidget(editLabel); + topLayout->addWidget(d->lineEdit); + + if (!d->renameOneItem) { + QMimeDatabase db; + QSet extensions; + for (const KFileItem& item : qAsConst(d->items)) { + const QString extension = db.suffixForFileName(item.url().toDisplayString().toLower()); + + if (extensions.contains(extension)) { + d->allExtensionsDifferent = false; + break; + } + + extensions.insert(extension); + } + + QLabel* infoLabel = new QLabel(i18nc("@info", "# will be replaced by ascending numbers starting with:"), page); + mainLayout->addWidget(infoLabel); + d->spinBox = new QSpinBox(page); + d->spinBox->setMaximum(10000); + d->spinBox->setMinimum(0); + d->spinBox->setSingleStep(1); + d->spinBox->setValue(1); + d->spinBox->setDisplayIntegerBase(10); + + QHBoxLayout* horizontalLayout = new QHBoxLayout(page); + horizontalLayout->setMargin(0); + horizontalLayout->addWidget(infoLabel); + horizontalLayout->addWidget(d->spinBox); + + topLayout->addLayout(horizontalLayout); + } +} + +RenameFileDialog::~RenameFileDialog() +{ +} + +bool RenameFileDialog::event(QEvent* ev) +{ + return QDialog::event(ev); +} + +void RenameFileDialog::slotAccepted() +{ + QWidget* widget = parentWidget(); + if (!widget) { + widget = this; + } + + const QList srcList = d->items.urlList(); + const QString newName = d->lineEdit->text(); + KIO::FileUndoManager::CommandType cmdType; + KIO::Job *job = nullptr; + if (d->renameOneItem) { + Q_ASSERT(d->items.count() == 1); + cmdType = KIO::FileUndoManager::Rename; + const QUrl oldUrl = d->items.constFirst().url(); + QUrl newUrl = oldUrl.adjusted(QUrl::RemoveFilename); + newUrl.setPath(newUrl.path() + KIO::encodeFileName(newName)); + d->renamedItems << newUrl; + job = KIO::moveAs(oldUrl, newUrl, KIO::HideProgressInfo); + } else { + d->renamedItems.reserve(d->items.count()); + cmdType = KIO::FileUndoManager::BatchRename; + job = KIO::batchRename(srcList, newName, d->spinBox->value(), QLatin1Char('#')); + connect(qobject_cast(job), &KIO::BatchRenameJob::fileRenamed, this, &RenameFileDialog::slotFileRenamed); + } + + KJobWidgets::setWindow(job, widget); + const QUrl parentUrl = srcList.first().adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash); + KIO::FileUndoManager::self()->recordJob(cmdType, srcList, parentUrl, job); + + connect(job, &KJob::result, this, &RenameFileDialog::slotResult); + connect(job, &KJob::result, this, &QObject::deleteLater); + + job->uiDelegate()->setAutoErrorHandlingEnabled(true); + + accept(); +} + +void RenameFileDialog::slotTextChanged(const QString& newName) +{ + bool enable = !newName.isEmpty() && (newName != QLatin1String("..")) && (newName != QLatin1String(".")); + if (enable && !d->renameOneItem) { + const int count = newName.count(QLatin1Char('#')); + if (count == 0) { + // Renaming multiple files without '#' will only work if all extensions are different. + enable = d->allExtensionsDifferent; + } else { + // Assure that the new name contains exactly one # (or a connected sequence of #'s) + const int first = newName.indexOf(QLatin1Char('#')); + const int last = newName.lastIndexOf(QLatin1Char('#')); + enable = (last - first + 1 == count); + } + } + d->okButton->setEnabled(enable); +} + +void RenameFileDialog::slotFileRenamed(const QUrl &oldUrl, const QUrl &newUrl) +{ + Q_UNUSED(oldUrl) + d->renamedItems << newUrl; +} + +void RenameFileDialog::slotResult(KJob *job) +{ + if (!job->error()) { + emit renamingFinished(d->renamedItems); + } +} + +void RenameFileDialog::showEvent(QShowEvent* event) +{ + d->lineEdit->setFocus(); + + QDialog::showEvent(event); +} + +} // namespace KIO diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -61,6 +61,8 @@ this, &KItemListController::slotChangeCurrentItem); connect(m_selectionManager, &KItemListSelectionManager::currentChanged, m_keyboardManager, &KItemListKeyboardSearchManager::slotCurrentChanged); + connect(m_selectionManager, &KItemListSelectionManager::selectionChanged, + m_keyboardManager, &KItemListKeyboardSearchManager::slotSelectionChanged); m_autoActivationTimer = new QTimer(this); m_autoActivationTimer->setSingleShot(true); @@ -472,19 +474,18 @@ if (!m_model || m_model->count() == 0) { return; } - const int currentIndex = m_selectionManager->currentItem(); int index; if (searchFromNextItem) { + const int currentIndex = m_selectionManager->currentItem(); index = m_model->indexForKeyboardSearch(text, (currentIndex + 1) % m_model->count()); } else { - index = m_model->indexForKeyboardSearch(text, currentIndex); + index = m_model->indexForKeyboardSearch(text, 0); } if (index >= 0) { m_selectionManager->setCurrentItem(index); if (m_selectionBehavior != NoSelection) { - m_selectionManager->clearSelection(); - m_selectionManager->setSelected(index, 1); + m_selectionManager->replaceSelection(index); m_selectionManager->beginAnchoredSelection(index); } diff --git a/src/kitemviews/kitemlistselectionmanager.h b/src/kitemviews/kitemlistselectionmanager.h --- a/src/kitemviews/kitemlistselectionmanager.h +++ b/src/kitemviews/kitemlistselectionmanager.h @@ -62,6 +62,7 @@ bool hasSelection() const; void setSelected(int index, int count = 1, SelectionMode mode = Select); + void replaceSelection(int index, int count = 1); void clearSelection(); void beginAnchoredSelection(int anchor); diff --git a/src/kitemviews/kitemlistselectionmanager.cpp b/src/kitemviews/kitemlistselectionmanager.cpp --- a/src/kitemviews/kitemlistselectionmanager.cpp +++ b/src/kitemviews/kitemlistselectionmanager.cpp @@ -173,6 +173,20 @@ } } +void KItemListSelectionManager::replaceSelection(int index, int count) +{ + // Equivalent to: + // clearSelection(); + // setSelected(index, count); + // but emitting once only selectionChanged + const KItemSet previous = selectedItems(); + if (!previous.isEmpty()) { + m_selectedItems.clear(); + m_isAnchoredSelectionActive = false; + } + setSelected(index, count); +} + void KItemListSelectionManager::beginAnchoredSelection(int anchor) { if (anchor >= 0 && m_model && anchor < m_model->count()) { diff --git a/src/kitemviews/private/kitemlistkeyboardsearchmanager.h b/src/kitemviews/private/kitemlistkeyboardsearchmanager.h --- a/src/kitemviews/private/kitemlistkeyboardsearchmanager.h +++ b/src/kitemviews/private/kitemlistkeyboardsearchmanager.h @@ -24,6 +24,7 @@ #define KITEMLISTKEYBOARDSEARCHMANAGER_H #include "dolphin_export.h" +#include "kitemviews/kitemset.h" #include #include @@ -59,10 +60,12 @@ qint64 timeout() const; void cancelSearch(); + bool shouldClearSearchIfInputTimeReached(); public slots: void slotCurrentChanged(int current, int previous); + void slotSelectionChanged(const KItemSet& current, const KItemSet& previous); signals: /** @@ -78,6 +81,7 @@ private: QString m_searchedString; + bool m_isSearchRestarted; QElapsedTimer m_keyboardInputTime; qint64 m_timeout; }; diff --git a/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp b/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp --- a/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp +++ b/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp @@ -22,9 +22,9 @@ #include "kitemlistkeyboardsearchmanager.h" - KItemListKeyboardSearchManager::KItemListKeyboardSearchManager(QObject* parent) : QObject(parent), + m_isSearchRestarted(false), m_timeout(1000) { m_keyboardInputTime.invalidate(); @@ -34,11 +34,16 @@ { } -void KItemListKeyboardSearchManager::addKeys(const QString& keys) +bool KItemListKeyboardSearchManager::shouldClearSearchIfInputTimeReached() { const bool keyboardTimeWasValid = m_keyboardInputTime.isValid(); const qint64 keyboardInputTimeElapsed = m_keyboardInputTime.restart(); - if (keyboardInputTimeElapsed > m_timeout || !keyboardTimeWasValid) { + return (keyboardInputTimeElapsed > m_timeout) || !keyboardTimeWasValid; +} + +void KItemListKeyboardSearchManager::addKeys(const QString& keys) +{ + if (shouldClearSearchIfInputTimeReached()) { m_searchedString.clear(); } @@ -59,9 +64,13 @@ const bool sameKey = m_searchedString.length() > 1 && m_searchedString.count(firstKey) == m_searchedString.length(); // Searching for a matching item should start from the next item if either - // 1. a new search is started, or + // 1. a new search is started and a search has not been restarted or // 2. a 'repeated key' search is done. - const bool searchFromNextItem = newSearch || sameKey; + const bool searchFromNextItem = (!m_isSearchRestarted && newSearch) || sameKey; + + // to remember not to searchFromNextItem if selection was deselected + // loosing keyboard search context basically + m_isSearchRestarted = false; emit changeCurrentItem(sameKey ? firstKey : m_searchedString, searchFromNextItem); } @@ -80,6 +89,7 @@ void KItemListKeyboardSearchManager::cancelSearch() { + m_isSearchRestarted = true; m_searchedString.clear(); } @@ -92,3 +102,11 @@ cancelSearch(); } } + +void KItemListKeyboardSearchManager::slotSelectionChanged(const KItemSet& current, const KItemSet& previous) +{ + if (!previous.isEmpty() && current.isEmpty() && previous.count() > 0 && current.count() == 0) { + // The selection has been emptied. We should cancel the search. + cancelSearch(); + } +} diff --git a/src/panels/information/diff.txt b/src/panels/information/diff.txt new file mode 100644 --- /dev/null +++ b/src/panels/information/diff.txt @@ -0,0 +1,777 @@ +diff --git a/src/panels/information/dolphin_informationpanelsettings.kcfg b/src/panels/information/dolphin_informationpanelsettings.kcfg +index dbc1ab6d2..7a5d29728 100644 +--- a/src/panels/information/dolphin_informationpanelsettings.kcfg ++++ b/src/panels/information/dolphin_informationpanelsettings.kcfg +@@ -10,6 +10,10 @@ + + true + ++ ++ ++ false ++ + + + +diff --git a/src/panels/information/filemetadataconfigurationdialog.cpp b/src/panels/information/filemetadataconfigurationdialog.cpp +deleted file mode 100644 +index f3ca819b7..000000000 +--- a/src/panels/information/filemetadataconfigurationdialog.cpp ++++ /dev/null +@@ -1,102 +0,0 @@ +-/*************************************************************************** +- * Copyright (C) 2010 by Peter Penz * +- * * +- * This program is free software; you can redistribute it and/or modify * +- * it under the terms of the GNU General Public License as published by * +- * the Free Software Foundation; either version 2 of the License, or * +- * (at your option) any later version. * +- * * +- * This program is distributed in the hope that it will be useful, * +- * but WITHOUT ANY WARRANTY; without even the implied warranty of * +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +- * GNU General Public License for more details. * +- * * +- * You should have received a copy of the GNU General Public License * +- * along with this program; if not, write to the * +- * Free Software Foundation, Inc., * +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * +- ***************************************************************************/ +- +-#include "filemetadataconfigurationdialog.h" +- +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +-#include +- +-FileMetaDataConfigurationDialog::FileMetaDataConfigurationDialog(QWidget* parent) : +- QDialog(parent), +- m_descriptionLabel(nullptr), +- m_configWidget(nullptr) +- +-{ +- setWindowTitle(i18nc("@title:window", "Configure Shown Data")); +- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel); +- QVBoxLayout *mainLayout = new QVBoxLayout; +- setLayout(mainLayout); +- QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); +- okButton->setDefault(true); +- okButton->setShortcut(Qt::CTRL + Qt::Key_Return); +- connect(buttonBox, &QDialogButtonBox::accepted, this, &FileMetaDataConfigurationDialog::slotAccepted); +- connect(buttonBox, &QDialogButtonBox::rejected, this, &FileMetaDataConfigurationDialog::reject); +- buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); +- +- m_descriptionLabel = new QLabel(i18nc("@label::textbox", +- "Select which data should " +- "be shown:"), this); +- m_descriptionLabel->setWordWrap(true); +- +- m_configWidget = new Baloo::FileMetaDataConfigWidget(this); +- +- QWidget* mainWidget = new QWidget(this); +- QVBoxLayout* topLayout = new QVBoxLayout(mainWidget); +- topLayout->addWidget(m_descriptionLabel); +- topLayout->addWidget(m_configWidget); +- mainLayout->addWidget(mainWidget); +- mainLayout->addWidget(buttonBox); +- +- +- const KConfigGroup dialogConfig(KSharedConfig::openConfig(QStringLiteral("dolphinrc")), +- "FileMetaDataConfigurationDialog"); +- KWindowConfig::restoreWindowSize(windowHandle(), dialogConfig); +-} +- +-FileMetaDataConfigurationDialog::~FileMetaDataConfigurationDialog() +-{ +- KConfigGroup dialogConfig(KSharedConfig::openConfig(QStringLiteral("dolphinrc")), +- "FileMetaDataConfigurationDialog"); +- KWindowConfig::saveWindowSize(windowHandle(), dialogConfig); +-} +- +-void FileMetaDataConfigurationDialog::setItems(const KFileItemList& items) +-{ +- m_configWidget->setItems(items); +-} +- +-KFileItemList FileMetaDataConfigurationDialog::items() const +-{ +- return m_configWidget->items(); +-} +- +-void FileMetaDataConfigurationDialog::slotAccepted() +-{ +- m_configWidget->save(); +- accept(); +-} +- +-void FileMetaDataConfigurationDialog::setDescription(const QString& description) +-{ +- m_descriptionLabel->setText(description); +-} +- +-QString FileMetaDataConfigurationDialog::description() const +-{ +- return m_descriptionLabel->text(); +-} +- +diff --git a/src/panels/information/filemetadataconfigurationdialog.h b/src/panels/information/filemetadataconfigurationdialog.h +deleted file mode 100644 +index 04357783c..000000000 +--- a/src/panels/information/filemetadataconfigurationdialog.h ++++ /dev/null +@@ -1,76 +0,0 @@ +-/*************************************************************************** +- * Copyright (C) 2010 by Peter Penz * +- * * +- * This program is free software; you can redistribute it and/or modify * +- * it under the terms of the GNU General Public License as published by * +- * the Free Software Foundation; either version 2 of the License, or * +- * (at your option) any later version. * +- * * +- * This program is distributed in the hope that it will be useful, * +- * but WITHOUT ANY WARRANTY; without even the implied warranty of * +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +- * GNU General Public License for more details. * +- * * +- * You should have received a copy of the GNU General Public License * +- * along with this program; if not, write to the * +- * Free Software Foundation, Inc., * +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * +- ***************************************************************************/ +- +-#ifndef FILEMETADATACONFIGURATIONDIALOG_H +-#define FILEMETADATACONFIGURATIONDIALOG_H +- +-#include +- +-#include +-#include +-#ifndef HAVE_BALOO +-class KFileMetaDataConfigurationWidget; +-#else +-namespace Baloo { +- class FileMetaDataConfigWidget; +-} +-#endif +- +-class QLabel; +- +-/** +- * @brief Dialog which allows to configure which meta data should be shown +- * in the KFileMetaDataWidget. +- */ +-class FileMetaDataConfigurationDialog : public QDialog +-{ +- Q_OBJECT +- +-public: +- explicit FileMetaDataConfigurationDialog(QWidget* parent = nullptr); +- ~FileMetaDataConfigurationDialog() override; +- +- /** +- * Sets the items, for which the visibility of the meta data should +- * be configured. Note that the visibility of the meta data is not +- * bound to the items itself, the items are only used to determine +- * which meta data should be configurable. For example when a JPEG image +- * is set as item, it will be configurable which EXIF data should be +- * shown. If an audio file is set as item, it will be configurable +- * whether the artist, album name, ... should be shown. +- */ +- void setItems(const KFileItemList& items); +- KFileItemList items() const; +- +- /** +- * Sets the description that is shown above the list +- * of meta data. Per default the translated text for +- * "Select which data should be shown." is set. +- */ +- void setDescription(const QString& description); +- QString description() const; +- +-protected slots: +- void slotAccepted(); +-private: +- QLabel* m_descriptionLabel; +- Baloo::FileMetaDataConfigWidget* m_configWidget; +-}; +- +-#endif +diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp +index cd8b6b38d..e6c3bf32a 100644 +--- a/src/panels/information/informationpanel.cpp ++++ b/src/panels/information/informationpanel.cpp +@@ -36,7 +36,6 @@ + #include + + #include "dolphin_informationpanelsettings.h" +-#include "filemetadataconfigurationdialog.h" + + InformationPanel::InformationPanel(QWidget* parent) : + Panel(parent), +@@ -168,7 +167,8 @@ void InformationPanel::contextMenuEvent(QContextMenuEvent* event) + Panel::contextMenuEvent(event); + } + +-void InformationPanel::showContextMenu(const QPoint &pos) { ++void InformationPanel::showContextMenu(const QPoint &pos) ++{ + QMenu popup(this); + + QAction* previewAction = popup.addAction(i18nc("@action:inmenu", "Preview")); +@@ -176,8 +176,16 @@ void InformationPanel::showContextMenu(const QPoint &pos) { + previewAction->setCheckable(true); + previewAction->setChecked(InformationPanelSettings::previewsShown()); + ++ QAction* previewAutoPlayAction = popup.addAction(i18nc("@action:inmenu", "Auto-Play media files")); ++ previewAutoPlayAction->setIcon(QIcon::fromTheme(QStringLiteral("media-playback-start"))); ++ previewAutoPlayAction->setCheckable(true); ++ previewAutoPlayAction->setChecked(InformationPanelSettings::previewsAutoPlay()); ++ + QAction* configureAction = popup.addAction(i18nc("@action:inmenu", "Configure...")); + configureAction->setIcon(QIcon::fromTheme(QStringLiteral("configure"))); ++ if (m_inConfigurationMode) { ++ configureAction->setEnabled(false); ++ } + + QAction* dateformatAction = popup.addAction(i18nc("@action:inmenu", "Condensed Date")); + dateformatAction->setIcon(QIcon::fromTheme(QStringLiteral("change-date-symbolic"))); +@@ -185,7 +193,8 @@ void InformationPanel::showContextMenu(const QPoint &pos) { + dateformatAction->setChecked(InformationPanelSettings::dateFormat() == static_cast(Baloo::DateFormats::ShortFormat)); + + popup.addSeparator(); +- foreach (QAction* action, customContextMenuActions()) { ++ const auto actions = customContextMenuActions(); ++ for (QAction *action : actions) { + popup.addAction(action); + } + +@@ -201,19 +210,17 @@ void InformationPanel::showContextMenu(const QPoint &pos) { + InformationPanelSettings::setPreviewsShown(isChecked); + m_content->refreshPreview(); + } else if (action == configureAction) { +- FileMetaDataConfigurationDialog* dialog = new FileMetaDataConfigurationDialog(this); +- dialog->setDescription(i18nc("@label::textbox", +- "Select which data should be shown in the information panel:")); +- dialog->setItems(m_content->items()); +- dialog->setAttribute(Qt::WA_DeleteOnClose); +- dialog->show(); +- connect(dialog, &FileMetaDataConfigurationDialog::destroyed, m_content, &InformationPanelContent::refreshMetaData); ++ m_inConfigurationMode = true; ++ m_content->configureShownProperties(); + } + if (action == dateformatAction) { + int dateFormat = static_cast(isChecked ? Baloo::DateFormats::ShortFormat : Baloo::DateFormats::LongFormat); + + InformationPanelSettings::setDateFormat(dateFormat); + m_content->refreshMetaData(); ++ } else if (action == previewAutoPlayAction) { ++ InformationPanelSettings::setPreviewsAutoPlay(isChecked); ++ m_content->setPreviewAutoPlay(isChecked); + } + } + +@@ -311,7 +318,7 @@ void InformationPanel::slotFilesAdded(const QString& directory) + + void InformationPanel::slotFilesChanged(const QStringList& files) + { +- foreach (const QString& fileName, files) { ++ for (const QString& fileName : files) { + if (m_shownUrl == QUrl::fromLocalFile(fileName)) { + showItemInfo(); + break; +@@ -321,7 +328,7 @@ void InformationPanel::slotFilesChanged(const QStringList& files) + + void InformationPanel::slotFilesRemoved(const QStringList& files) + { +- foreach (const QString& fileName, files) { ++ for (const QString& fileName : files) { + if (m_shownUrl == QUrl::fromLocalFile(fileName)) { + // the currently shown item has been removed, show + // the parent directory as fallback +@@ -410,6 +417,7 @@ void InformationPanel::init() + + m_content = new InformationPanelContent(this); + connect(m_content, &InformationPanelContent::urlActivated, this, &InformationPanel::urlActivated); ++ connect(m_content, &InformationPanelContent::configurationFinished, this, [this]() { m_inConfigurationMode = false; }); + + QVBoxLayout* layout = new QVBoxLayout(this); + layout->setContentsMargins(0, 0, 0, 0); +diff --git a/src/panels/information/informationpanel.h b/src/panels/information/informationpanel.h +index f63af1e53..321827c5b 100644 +--- a/src/panels/information/informationpanel.h ++++ b/src/panels/information/informationpanel.h +@@ -161,6 +161,7 @@ private: + KIO::Job* m_folderStatJob; + + InformationPanelContent* m_content; ++ bool m_inConfigurationMode = false; + }; + + #endif // INFORMATIONPANEL_H +diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp +index 0eaa125f1..444261eff 100644 +--- a/src/panels/information/informationpanelcontent.cpp ++++ b/src/panels/information/informationpanelcontent.cpp +@@ -40,6 +40,7 @@ + #include + + #include ++#include + #include + #include + #include +@@ -85,6 +86,7 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : + m_phononWidget = new PhononWidget(parent); + m_phononWidget->hide(); + m_phononWidget->setMinimumWidth(minPreviewWidth); ++ m_phononWidget->setAutoPlay(InformationPanelSettings::previewsAutoPlay()); + connect(m_phononWidget, &PhononWidget::hasVideoChanged, + this, &InformationPanelContent::slotHasVideoChanged); + +@@ -107,18 +109,31 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : + m_metaDataWidget->setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont)); + m_metaDataWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); + +- // Encapsulate the MetaDataWidget inside a container that has a dummy widget +- // at the bottom. This prevents that the meta data widget gets vertically stretched +- // in the case where the height of m_metaDataArea > m_metaDataWidget. +- QWidget* metaDataWidgetContainer = new QWidget(parent); +- QVBoxLayout* containerLayout = new QVBoxLayout(metaDataWidgetContainer); +- containerLayout->setContentsMargins(0, 0, 0, 0); +- containerLayout->setSpacing(0); +- containerLayout->addWidget(m_metaDataWidget); +- containerLayout->addStretch(); ++ // Configuration ++ m_configureLabel = new QLabel(i18nc("@label::textbox", ++ "Select which data should be shown:"), this); ++ m_configureLabel->setWordWrap(true); ++ m_configureLabel->setVisible(false); ++ ++ m_configureButtons = new QDialogButtonBox(QDialogButtonBox::Save | QDialogButtonBox::Cancel); ++ m_configureButtons->setVisible(false); ++ connect(m_configureButtons, &QDialogButtonBox::accepted, this, [this]() { ++ m_metaDataWidget->setConfigurationMode(Baloo::ConfigurationMode::Accept); ++ m_configureButtons->setVisible(false); ++ m_configureLabel->setVisible(false); ++ emit configurationFinished(); ++ } ++ ); ++ connect(m_configureButtons, &QDialogButtonBox::rejected, this, [this]() { ++ m_metaDataWidget->setConfigurationMode(Baloo::ConfigurationMode::Cancel); ++ m_configureButtons->setVisible(false); ++ m_configureLabel->setVisible(false); ++ emit configurationFinished(); ++ } ++ ); + + m_metaDataArea = new QScrollArea(parent); +- m_metaDataArea->setWidget(metaDataWidgetContainer); ++ m_metaDataArea->setWidget(m_metaDataWidget); + m_metaDataArea->setWidgetResizable(true); + m_metaDataArea->setFrameShape(QFrame::NoFrame); + +@@ -129,7 +144,9 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : + layout->addWidget(m_phononWidget); + layout->addWidget(m_nameLabel); + layout->addWidget(new KSeparator()); ++ layout->addWidget(m_configureLabel); + layout->addWidget(m_metaDataArea); ++ layout->addWidget(m_configureButtons); + + m_placesItemModel = new PlacesItemModel(this); + } +@@ -141,13 +158,16 @@ InformationPanelContent::~InformationPanelContent() + + void InformationPanelContent::showItem(const KFileItem& item) + { +- m_item = item; ++ if (item != m_item) { ++ m_item = item; + +- refreshPreview(); +- refreshMetaData(); ++ refreshPreview(); ++ refreshMetaData(); ++ } + } + +-void InformationPanelContent::refreshPreview() { ++void InformationPanelContent::refreshPreview() ++{ + // If there is a preview job, kill it to prevent that we have jobs for + // multiple items running, and thus a race condition (bug 250787). + if (m_previewJob) { +@@ -156,11 +176,12 @@ void InformationPanelContent::refreshPreview() { + + setNameLabelText(m_item.text()); + if (InformationPanelSettings::previewsShown()) { +- m_preview->show(); + + const QUrl itemUrl = m_item.url(); + const bool isSearchUrl = itemUrl.scheme().contains(QStringLiteral("search")) && m_item.localPath().isEmpty(); + if (isSearchUrl) { ++ m_preview->show(); ++ + // in the case of a search-URL the URL is not readable for humans + // (at least not useful to show in the Information Panel) + m_preview->setPixmap( +@@ -194,13 +215,26 @@ void InformationPanelContent::refreshPreview() { + this, &InformationPanelContent::showIcon); + + const QString mimeType = m_item.mimetype(); +- const bool usePhonon = mimeType.startsWith(QLatin1String("audio/")) || mimeType.startsWith(QLatin1String("video/")); ++ const bool isVideo = mimeType.startsWith(QLatin1String("video/")); ++ const bool usePhonon = mimeType.startsWith(QLatin1String("audio/")) || isVideo; ++ + if (usePhonon) { ++ ++ if (InformationPanelSettings::previewsAutoPlay() && isVideo) { ++ // hides the preview now to avoid flickering when the autoplay video starts ++ m_preview->hide(); ++ } else { ++ // the video won't play before the preview is displayed ++ m_preview->show(); ++ } ++ + m_phononWidget->show(); +- m_phononWidget->setUrl(m_item.targetUrl()); ++ m_phononWidget->setUrl(m_item.targetUrl(), isVideo ? PhononWidget::MediaKind::Video : PhononWidget::MediaKind::Audio); + m_phononWidget->setVideoSize(m_preview->size()); + } else { ++ // When we don't need it, hide the phonon widget first to avoid flickering + m_phononWidget->hide(); ++ m_preview->show(); + } + } + } else { +@@ -209,12 +243,18 @@ void InformationPanelContent::refreshPreview() { + } + } + +-void InformationPanelContent::refreshMetaData() { +- if (m_metaDataWidget) { +- m_metaDataWidget->setDateFormat(static_cast(InformationPanelSettings::dateFormat())); +- m_metaDataWidget->show(); +- m_metaDataWidget->setItems(KFileItemList() << m_item); +- } ++void InformationPanelContent::configureShownProperties() ++{ ++ m_configureLabel->setVisible(true); ++ m_configureButtons->setVisible(true); ++ m_metaDataWidget->setConfigurationMode(Baloo::ConfigurationMode::ReStart); ++} ++ ++void InformationPanelContent::refreshMetaData() ++{ ++ m_metaDataWidget->setDateFormat(static_cast(InformationPanelSettings::dateFormat())); ++ m_metaDataWidget->show(); ++ m_metaDataWidget->setItems(KFileItemList() << m_item); + } + + void InformationPanelContent::showItems(const KFileItemList& items) +@@ -230,9 +270,7 @@ void InformationPanelContent::showItems(const KFileItemList& items) + ); + setNameLabelText(i18ncp("@label", "%1 item selected", "%1 items selected", items.count())); + +- if (m_metaDataWidget) { +- m_metaDataWidget->setItems(items); +- } ++ m_metaDataWidget->setItems(items); + + m_phononWidget->hide(); + +@@ -297,7 +335,8 @@ void InformationPanelContent::markOutdatedPreview() + m_preview->setPixmap(disabledPixmap); + } + +-KFileItemList InformationPanelContent::items() { ++KFileItemList InformationPanelContent::items() ++{ + return m_metaDataWidget->items(); + } + +@@ -306,6 +345,10 @@ void InformationPanelContent::slotHasVideoChanged(bool hasVideo) + m_preview->setVisible(InformationPanelSettings::previewsShown() && !hasVideo); + } + ++void InformationPanelContent::setPreviewAutoPlay(bool autoPlay) { ++ m_phononWidget->setAutoPlay(autoPlay); ++} ++ + void InformationPanelContent::setNameLabelText(const QString& text) + { + QTextOption textOption; +@@ -349,9 +392,7 @@ void InformationPanelContent::adjustWidgetSizes(int width) + + // The metadata widget also contains a text widget which may return + // a large preferred width. +- if (m_metaDataWidget) { +- m_metaDataWidget->setMaximumWidth(maxWidth); +- } ++ m_metaDataWidget->setMaximumWidth(maxWidth); + + // try to increase the preview as large as possible + m_preview->setSizeHint(QSize(maxWidth, maxWidth)); +diff --git a/src/panels/information/informationpanelcontent.h b/src/panels/information/informationpanelcontent.h +index 83fb3d80b..0d838b268 100644 +--- a/src/panels/information/informationpanelcontent.h ++++ b/src/panels/information/informationpanelcontent.h +@@ -32,6 +32,7 @@ class PhononWidget; + class PixmapViewer; + class PlacesItemModel; + class QPixmap; ++class QDialogButtonBox; + class QString; + class QLabel; + class QScrollArea; +@@ -40,13 +41,9 @@ namespace KIO { + class PreviewJob; + } + +-#ifndef HAVE_BALOO +-class KFileMetaDataWidget; +-#else + namespace Baloo { + class FileMetaDataWidget; + } +-#endif + + /** + * @brief Manages the widgets that display the meta information +@@ -79,8 +76,21 @@ public: + */ + void refreshPreview(); + ++ /** ++ * Switch the metadatawidget into configuration mode ++ */ ++ void configureShownProperties(); ++ ++ /* ++ * Set the auto play media mode for the file previewed ++ * Eventually starting media playback when turning it on ++ * But not stopping it when turning it off ++ */ ++ void setPreviewAutoPlay(bool autoPlay); ++ + signals: + void urlActivated( const QUrl& url ); ++ void configurationFinished(); + + public slots: + /** +@@ -138,12 +148,10 @@ private: + PixmapViewer* m_preview; + PhononWidget* m_phononWidget; + QLabel* m_nameLabel; +-#ifndef HAVE_BALOO +- KFileMetaDataWidget* m_metaDataWidget; +-#else + Baloo::FileMetaDataWidget* m_metaDataWidget; +-#endif + QScrollArea* m_metaDataArea; ++ QLabel* m_configureLabel; ++ QDialogButtonBox* m_configureButtons; + + PlacesItemModel* m_placesItemModel; + }; +diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp +index 77e066d37..4ea2e6666 100644 +--- a/src/panels/information/phononwidget.cpp ++++ b/src/panels/information/phononwidget.cpp +@@ -69,11 +69,24 @@ PhononWidget::PhononWidget(QWidget *parent) + { + } + +-void PhononWidget::setUrl(const QUrl &url) ++void PhononWidget::setUrl(const QUrl &url, MediaKind kind) + { + if (m_url != url) { +- stop(); // emits playingStopped() signal + m_url = url; ++ m_isVideo = kind == MediaKind::Video; ++ } ++ if (m_autoPlay) { ++ play(); ++ } else { ++ stop(); ++ } ++} ++ ++void PhononWidget::setAutoPlay(bool autoPlay) ++{ ++ m_autoPlay = autoPlay; ++ if (!m_url.isEmpty() && (m_media == nullptr || m_media->state() != Phonon::State::PlayingState) && m_autoPlay && isVisible()) { ++ play(); + } + } + +@@ -162,12 +175,6 @@ void PhononWidget::stateChanged(Phonon::State newstate) + m_stopButton->show(); + m_playButton->hide(); + break; +- case Phonon::StoppedState: +- if (m_videoPlayer) { +- m_videoPlayer->hide(); +- } +- emit hasVideoChanged(false); +- Q_FALLTHROUGH(); + default: + m_stopButton->hide(); + m_playButton->show(); +@@ -182,13 +189,14 @@ void PhononWidget::play() + m_media = new Phonon::MediaObject(this); + connect(m_media, &Phonon::MediaObject::stateChanged, + this, &PhononWidget::stateChanged); +- connect(m_media, &Phonon::MediaObject::hasVideoChanged, +- this, &PhononWidget::slotHasVideoChanged); ++ connect(m_media, &Phonon::MediaObject::finished, ++ this, &PhononWidget::finished); + m_seekSlider->setMediaObject(m_media); + } + + if (!m_videoPlayer) { + m_videoPlayer = new EmbeddedVideoPlayer(this); ++ m_videoPlayer->installEventFilter(this); + m_topLayout->insertWidget(0, m_videoPlayer); + Phonon::createPath(m_media, m_videoPlayer); + applyVideoSize(); +@@ -199,26 +207,32 @@ void PhononWidget::play() + Phonon::createPath(m_media, m_audioOutput); + } + +- emit hasVideoChanged(false); ++ if (m_isVideo) { ++ emit hasVideoChanged(true); ++ } + +- m_media->setCurrentSource(m_url); +- m_media->hasVideo(); ++ if (m_url != m_media->currentSource().url()) { ++ m_media->setCurrentSource(m_url); ++ } + m_media->play(); ++ ++ m_videoPlayer->setVisible(m_isVideo); + } + +-void PhononWidget::stop() ++void PhononWidget::finished() + { +- if (m_media) { +- m_media->stop(); ++ if (m_isVideo) { ++ m_videoPlayer->hide(); ++ emit hasVideoChanged(false); + } + } + +-void PhononWidget::slotHasVideoChanged(bool hasVideo) ++void PhononWidget::stop() + { +- emit hasVideoChanged(hasVideo); +- +- if (hasVideo) { +- m_videoPlayer->show(); ++ if (m_media) { ++ m_media->stop(); ++ m_videoPlayer->hide(); ++ emit hasVideoChanged(false); + } + } + +diff --git a/src/panels/information/phononwidget.h b/src/panels/information/phononwidget.h +index 971e8c731..b9e7d4f05 100644 +--- a/src/panels/information/phononwidget.h ++++ b/src/panels/information/phononwidget.h +@@ -43,14 +43,22 @@ class PhononWidget : public QWidget + { + Q_OBJECT + public: ++ ++ enum MediaKind { ++ Video, ++ Audio ++ }; ++ + explicit PhononWidget(QWidget *parent = nullptr); + +- void setUrl(const QUrl &url); ++ void setUrl(const QUrl &url, MediaKind kind); + QUrl url() const; + + void setVideoSize(const QSize& size); + QSize videoSize() const; + ++ void setAutoPlay(bool autoPlay); ++ + signals: + /** + * Is emitted whenever the video-state +@@ -62,15 +70,17 @@ class PhononWidget : public QWidget + */ + void hasVideoChanged(bool hasVideo); + ++ public slots: ++ void play(); ++ + protected: + void showEvent(QShowEvent *event) override; + void hideEvent(QHideEvent *event) override; + + private slots: +- void stateChanged(Phonon::State); +- void play(); ++ void stateChanged(Phonon::State newstate); + void stop(); +- void slotHasVideoChanged(bool); ++ void finished(); + + private: + void applyVideoSize(); +@@ -87,6 +97,8 @@ class PhononWidget : public QWidget + Phonon::SeekSlider *m_seekSlider; + Phonon::AudioOutput *m_audioOutput; + EmbeddedVideoPlayer *m_videoPlayer; ++ bool m_autoPlay; ++ bool m_isVideo; + }; + + #endif // PHONONWIDGET_H +diff --git a/src/panels/information/pixmapviewer.cpp b/src/panels/information/pixmapviewer.cpp +index 5828a37dd..311995ec2 100644 +--- a/src/panels/information/pixmapviewer.cpp ++++ b/src/panels/information/pixmapviewer.cpp +@@ -37,7 +37,7 @@ PixmapViewer::PixmapViewer(QWidget* parent, Transition transition) : + m_animation.setCurveShape(QTimeLine::LinearCurve); + + if (m_transition != NoTransition) { +- connect(&m_animation, &QTimeLine::valueChanged, this, static_cast(&PixmapViewer::update)); ++ connect(&m_animation, &QTimeLine::valueChanged, this, QOverload<>::of(&PixmapViewer::update)); + connect(&m_animation, &QTimeLine::finished, this, &PixmapViewer::checkPendingPixmaps); + } + } +@@ -97,14 +97,14 @@ void PixmapViewer::paintEvent(QPaintEvent* event) + const bool useOldPixmap = (m_transition == SizeTransition) && + (m_oldPixmap.width() > m_pixmap.width()); + const QPixmap& largePixmap = useOldPixmap ? m_oldPixmap : m_pixmap; +- if (!largePixmap.isNull()) { ++ if (!largePixmap.isNull()) { + const QPixmap scaledPixmap = largePixmap.scaled(scaledWidth, + scaledHeight, + Qt::IgnoreAspectRatio, + Qt::FastTransformation); + + style()->drawItemPixmap(&painter, rect(), Qt::AlignCenter, scaledPixmap); +- } ++ } + } else { + style()->drawItemPixmap(&painter, rect(), Qt::AlignCenter, m_pixmap); + } diff --git a/src/tests/columnview.h b/src/tests/columnview.h new file mode 100644 --- /dev/null +++ b/src/tests/columnview.h @@ -0,0 +1,29 @@ +#ifndef COLUMNVIEW_H +#define COLUMNVIEW_H + +#include +#include +#include +#include + +class KFileItemModel; +class KItemRangeList; + + +class ColumnView : public QWidget +{ + Q_OBJECT + +public: + ColumnView(QWidget* parent); + +public Q_SLOTS: + void slotDirectoryLoadingStarted(); + void slotDirectoryLoadingCompleted(); + void slotItemsInserted(const KItemRangeList& itemRanges); + +private: + KFileItemModel *m_model; +}; + +#endif // COLUMVIEW_H diff --git a/src/tests/columnview.cpp b/src/tests/columnview.cpp new file mode 100644 --- /dev/null +++ b/src/tests/columnview.cpp @@ -0,0 +1,53 @@ +#include "columnview.h" + +#include +#include +#include +#include +#include +#include +#include +#include "kitemviews/kfileitemlistview.h" +#include "kitemviews/kfileitemmodel.h" +#include "kitemviews/kitemrange.h" + +ColumnView::ColumnView(QWidget* parent) + : QWidget (parent) +{ + m_model = new KFileItemModel(this); + + connect(m_model, &KFileItemModel::directoryLoadingStarted, this, &ColumnView::slotDirectoryLoadingStarted); + connect(m_model, &KFileItemModel::directoryLoadingCompleted, this, &ColumnView::slotDirectoryLoadingCompleted); + connect(m_model, &KFileItemModel::itemsInserted, this, &ColumnView::slotItemsInserted); + + QUrl url("file://home/meven"); + m_model->loadDirectory(url); +} + +void ColumnView::slotDirectoryLoadingCompleted() +{ + qDebug() << "ColumnView::slotDirectoryLoadingCompleted" << m_model->count(); +} + +void ColumnView::slotDirectoryLoadingStarted() +{ + qDebug() << "ColumnView::slotDirectoryLoadingStarted"; +} + +void ColumnView::slotItemsInserted(const KItemRangeList& itemRanges) { + qDebug() << "ColumnView::slotItemsInserted"; + for (int i = 0; i < itemRanges.size(); ++i) { + qDebug() << itemRanges.at(i).count; + } +} + +int main(int argc, char **argv) +{ + QApplication::setApplicationName(QStringLiteral("columnView")); + QApplication app(argc, argv); + + ColumnView column(nullptr); + column.show(); + + return app.exec(); +} diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp --- a/src/tests/kitemlistcontrollertest.cpp +++ b/src/tests/kitemlistcontrollertest.cpp @@ -326,6 +326,12 @@ << qMakePair(KeyPress(Qt::Key_E), ViewState(13, KItemSet() << 13)) << qMakePair(KeyPress(Qt::Key_Space), ViewState(14, KItemSet() << 14)) << qMakePair(KeyPress(Qt::Key_3), ViewState(15, KItemSet() << 15)) + << qMakePair(KeyPress(Qt::Key_Escape), ViewState(15, KItemSet())) + << qMakePair(KeyPress(Qt::Key_E), ViewState(13, KItemSet() << 13)) + << qMakePair(KeyPress(Qt::Key_E), ViewState(14, KItemSet() << 14)) + << qMakePair(KeyPress(Qt::Key_E), ViewState(15, KItemSet() << 15)) + << qMakePair(KeyPress(Qt::Key_Escape), ViewState(15, KItemSet())) + << qMakePair(KeyPress(Qt::Key_E), ViewState(13, KItemSet() << 13)) << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, KItemSet() << 0)) << qMakePair(KeyPress(Qt::Key_Escape), ViewState(0, KItemSet())); diff --git a/src/tests/kitemlistkeyboardsearchmanagertest.cpp b/src/tests/kitemlistkeyboardsearchmanagertest.cpp --- a/src/tests/kitemlistkeyboardsearchmanagertest.cpp +++ b/src/tests/kitemlistkeyboardsearchmanagertest.cpp @@ -51,7 +51,7 @@ m_keyboardSearchManager.addKeys("f"); QCOMPARE(spy.count(), 1); - QCOMPARE(spy.takeFirst(), QList() << "f" << true); + QCOMPARE(spy.takeFirst(), QList() << "f" << false); m_keyboardSearchManager.addKeys("i"); QCOMPARE(spy.count(), 1); @@ -77,7 +77,7 @@ m_keyboardSearchManager.addKeys("f"); QCOMPARE(spy.count(), 1); - QCOMPARE(spy.takeFirst(), QList() << "f" << true); + QCOMPARE(spy.takeFirst(), QList() << "f" << false); m_keyboardSearchManager.addKeys("i"); QCOMPARE(spy.count(), 1); @@ -94,6 +94,13 @@ m_keyboardSearchManager.addKeys("e"); QCOMPARE(spy.count(), 1); QCOMPARE(spy.takeFirst(), QList() << "le" << false); + + // the selection was deselected, for instance with Esc or a click outside the selection + m_keyboardSearchManager.slotSelectionChanged(KItemSet(), KItemSet() << 1); + + m_keyboardSearchManager.addKeys("a"); + QCOMPARE(spy.count(), 1); + QCOMPARE(spy.takeFirst(), QList() << "a" << false); } void KItemListKeyboardSearchManagerTest::testRepeatedKeyPress() @@ -109,7 +116,7 @@ m_keyboardSearchManager.addKeys("p"); QCOMPARE(spy.count(), 1); - QCOMPARE(spy.takeFirst(), QList() << "p" << true); + QCOMPARE(spy.takeFirst(), QList() << "p" << false); m_keyboardSearchManager.addKeys("p"); QCOMPARE(spy.count(), 1); @@ -138,7 +145,7 @@ // Simulate that the user enters "a_b". m_keyboardSearchManager.addKeys("a"); QCOMPARE(spy.count(), 1); - QCOMPARE(spy.takeFirst(), QList() << "a" << true); + QCOMPARE(spy.takeFirst(), QList() << "a" << false); m_keyboardSearchManager.addKeys(""); QCOMPARE(spy.count(), 0); diff --git a/src/tests/phonontest.cpp b/src/tests/phonontest.cpp new file mode 100644 diff --git a/src/tests/phorontest.cpp b/src/tests/phorontest.cpp new file mode 100644 --- /dev/null +++ b/src/tests/phorontest.cpp @@ -0,0 +1,6 @@ +#include +int main () { + + QApplication app; + return app->exec(); +} diff --git a/src/tests/testphonon.cpp b/src/tests/testphonon.cpp new file mode 100644