From 2f045c60109e0a5811f68bcce617236e3478e402 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Sun, 6 Apr 2014 03:32:55 +0200 Subject: Allow compiling Dolphin with KF5 This does not work properly yet, there are probably quite a few bad signal/ slot connections due to KUrl -> QUrl. However dolphin starts without crashing. Accessibility is not ported since that changed quite a lot from Qt4 -> Qt5 and I have no idea how it is supposed to be used. This is the first commit for review 117395 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b43d67e3..ee27a24c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,2 +1,2 @@ - +add_definitions(-Wno-deprecated-declarations) add_subdirectory(src) -- cgit v1.3.1 From 37492b227544bab6c2958c8be84a750d547890ac Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Sun, 29 Jun 2014 00:49:11 +0200 Subject: KF5ify Dolphin. --- CMakeLists.txt | 62 ++++++++++++++++++++++- src/CMakeLists.txt | 120 +++++++++++++++++++-------------------------- src/config-dolphin.h.cmake | 4 ++ src/dolphinviewcontainer.h | 6 +-- 4 files changed, 119 insertions(+), 73 deletions(-) create mode 100644 src/config-dolphin.h.cmake (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ee27a24c8..c6cf5df81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,2 +1,62 @@ -add_definitions(-Wno-deprecated-declarations) +cmake_minimum_required(VERSION 2.8.12) + +project(Dolphin) + +# ECM setup +find_package(ECM 0.0.14 CONFIG REQUIRED) +set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) + +set(DOLPHIN_VERSION "4.97.0") + +include(ECMSetupVersion) +include(GenerateExportHeader) +include(FeatureSummary) +include(KDEInstallDirs) +include(KDECMakeSettings) +include(KDEFrameworkCompilerSettings) + +ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE + SOVERSION 5 +) + +find_package(KF5 REQUIRED COMPONENTS Init KCMUtils KDELibs4Support NewStuff) +find_package(KF5 COMPONENTS Activities) + +find_package(Phonon4Qt5 CONFIG REQUIRED) + +if ("${CMAKE_SOURCE_DIR}" STREQUAL "${Dolphin_SOURCE_DIR}") + find_package(KF5Konq CONFIG REQUIRED) +else() + include_directories(${LibKonq_SOURCE_DIR}/src) +endif() + +find_package(KF5Baloo 4.97) +set_package_properties(KF5Baloo PROPERTIES DESCRIPTION "Baloo Core libraries" + URL "http://www.kde.org" + TYPE OPTIONAL + PURPOSE "For adding desktop-wide search and tagging support to dolphin" + ) + +find_package(KF5BalooWidgets 4.97) +set_package_properties(KF5BalooWidgets PROPERTIES DESCRIPTION "Baloos Widgets" + URL "http://www.kde.org" + TYPE OPTIONAL + ) + +find_package(KF5FileMetaData 4.97) +set_package_properties(KF5FileMetaData PROPERTIES + URL "https://projects.kde.org/kfilemetadata" + TYPE OPTIONAL + PURPOSE "For accessing file metadata labels" + ) + +if (KF5Baloo_FOUND AND KF5BalooWidgets_FOUND AND KF5FileMetaData_FOUND) + set(HAVE_BALOO TRUE) +endif() + add_subdirectory(src) + +# TODO Remove the if/endif lines if Dolphin is split. +if ("${CMAKE_SOURCE_DIR}" STREQUAL "${Dolphin_SOURCE_DIR}") + feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) +endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dbce551f3..b46182cd4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,49 +1,20 @@ -add_definitions(-DTRANSLATION_DOMAIN=\"dolphin\") - -ecm_setup_version(${KDE_BASEAPPS_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE - SOVERSION 5 -) - -find_package(KF5Baloo 4.97) -set_package_properties(KF5Baloo PROPERTIES DESCRIPTION "Baloo Core libraries" - URL "http://www.kde.org" - TYPE OPTIONAL - PURPOSE "For adding desktop-wide search and tagging support to dolphin" - ) - -find_package(KF5BalooWidgets 4.97) -set_package_properties(KF5BalooWidgets PROPERTIES DESCRIPTION "Baloos Widgets" - URL "http://www.kde.org" - TYPE OPTIONAL - ) - -find_package(KF5FileMetaData 4.97) -set_package_properties(KF5FileMetaData PROPERTIES - URL "https://projects.kde.org/kfilemetadata" - TYPE OPTIONAL - PURPOSE "For accessing file metadata labels" - ) - -if (KF5Baloo_FOUND AND KF5BalooWidgets_FOUND AND KF5FileMetaData_FOUND) - set(HAVE_BALOO TRUE) -endif() - -find_package(KF5NewStuff CONFIG REQUIRED) -find_package(KF5KCMUtils CONFIG REQUIRED) -find_package(Phonon4Qt5 CONFIG REQUIRED) -configure_file(config-baloo.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-baloo.h ) +configure_file(config-baloo.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-baloo.h) -macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) -configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h ) +configure_file(config-dolphin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-dolphin.h) -include_directories( ${KACTIVITIES_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ) +add_definitions(-DTRANSLATION_DOMAIN=\"dolphin\") +add_definitions(-Wno-deprecated-declarations) +remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_URL_CAST_FROM_STRING) -if(HAVE_BALOO) - include_directories(${BALOO_INCLUDE_DIR} ${BALOO_WIDGETS_INCLUDE_DIR} ${KFILEMETADATA_INCLUDE_DIR}) +if(X11_Xrender_FOUND) + set(HAVE_XRENDER TRUE) endif() -add_subdirectory(tests) +configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h) + +# TODO Reenable +#add_subdirectory(tests) ########### next target ############### @@ -114,7 +85,7 @@ if(HAVE_BALOO) ) endif() -kde4_add_kcfg_files(dolphinprivate_LIB_SRCS +kconfig_add_kcfg_files(dolphinprivate_LIB_SRCS settings/dolphin_compactmodesettings.kcfgc settings/dolphin_directoryviewpropertysettings.kcfgc settings/dolphin_detailsmodesettings.kcfgc @@ -123,13 +94,13 @@ kde4_add_kcfg_files(dolphinprivate_LIB_SRCS settings/dolphin_versioncontrolsettings.kcfgc ) -kde4_add_library(dolphinprivate SHARED ${dolphinprivate_LIB_SRCS}) +add_library(dolphinprivate ${dolphinprivate_LIB_SRCS}) target_link_libraries( dolphinprivate PUBLIC + KF5::KDELibs4Support KF5::Konq KF5::NewStuff - KF5::KDELibs4Support ) if(HAVE_BALOO) @@ -146,8 +117,12 @@ if(X11_Xrender_FOUND) target_link_libraries(dolphinprivate ${X11_Xrender_LIB}) endif(X11_Xrender_FOUND) -set_target_properties(dolphinprivate PROPERTIES VERSION ${DOLPHINPRIVATE_VERSION_STRING} SOVERSION ${DOLPHINPRIVATE_SOVERSION} ) -install(TARGETS dolphinprivate ${INSTALL_TARGETS_DEFAULT_ARGS}) +set_target_properties(dolphinprivate PROPERTIES + VERSION ${DOLPHINPRIVATE_VERSION_STRING} + SOVERSION ${DOLPHINPRIVATE_SOVERSION} +) + +install(TARGETS dolphinprivate ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) ########################################## @@ -156,14 +131,18 @@ set(dolphinpart_SRCS dolphinpart_ext.cpp ) -kde4_add_plugin(dolphinpart ${dolphinpart_SRCS}) +add_library(dolphinpart MODULE ${dolphinpart_SRCS}) -target_link_libraries(dolphinpart dolphinprivate KF5::Konq ${KDE4_KPARTS_LIBS} ${KDE4_KFILE_LIBS}) +target_link_libraries(dolphinpart + dolphinprivate + KF5::Konq + KF5::KDELibs4Support +) install(TARGETS dolphinpart DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES dolphinpart.rc DESTINATION ${DATA_INSTALL_DIR}/dolphinpart) -install(FILES dolphinpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install(FILES dolphinpart.desktop DESTINATION ${SERVICES_INSTALL_DIR}) install(FILES views/versioncontrol/fileviewversioncontrolplugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) ########################################## @@ -221,7 +200,7 @@ set(dolphin_SRCS views/zoomlevelinfo.cpp ) -kde4_add_kcfg_files(dolphin_SRCS +kconfig_add_kcfg_files(dolphin_SRCS panels/folders/dolphin_folderspanelsettings.kcfgc panels/information/dolphin_informationpanelsettings.kcfgc panels/places/dolphin_placespanelsettings.kcfgc @@ -235,11 +214,12 @@ kde4_add_kcfg_files(dolphin_SRCS if(NOT WIN32) set(dolphin_SRCS ${dolphin_SRCS} panels/terminal/terminalpanel.cpp) -endif(NOT WIN32) +endif() -kde4_add_app_icon(dolphin_SRCS "${KDE4_ICON_INSTALL_DIR}/oxygen/*/apps/system-file-manager.png") +# TODO Does anything replace kde4_add_app_icon ? +#kde4_add_app_icon(dolphin_SRCS "${KDE4_ICON_INSTALL_DIR}/oxygen/*/apps/system-file-manager.png") -kde4_add_kdeinit_executable(dolphin ${dolphin_SRCS}) +kf5_add_kdeinit_executable(dolphin ${dolphin_SRCS}) target_include_directories(kdeinit_dolphin PRIVATE ${PHONON_INCLUDES}) @@ -261,8 +241,8 @@ if (KF5Activities_FOUND) ) endif() -install(TARGETS kdeinit_dolphin ${INSTALL_TARGETS_DEFAULT_ARGS}) -install(TARGETS dolphin ${INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS kdeinit_dolphin ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS dolphin ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) ########################################## @@ -295,7 +275,7 @@ set(kcm_dolphingeneral_PART_SRCS settings/serviceitemdelegate.cpp settings/servicemodel.cpp) -kde4_add_kcfg_files(kcm_dolphinviewmodes_PART_SRCS +kconfig_add_kcfg_files(kcm_dolphinviewmodes_PART_SRCS settings/dolphin_compactmodesettings.kcfgc settings/dolphin_directoryviewpropertysettings.kcfgc settings/dolphin_detailsmodesettings.kcfgc @@ -304,25 +284,25 @@ kde4_add_kcfg_files(kcm_dolphinviewmodes_PART_SRCS settings/dolphin_versioncontrolsettings.kcfgc ) -kde4_add_kcfg_files(kcm_dolphinnavigation_PART_SRCS +kconfig_add_kcfg_files(kcm_dolphinnavigation_PART_SRCS settings/dolphin_generalsettings.kcfgc) -kde4_add_kcfg_files(kcm_dolphinservices_PART_SRCS +kconfig_add_kcfg_files(kcm_dolphinservices_PART_SRCS settings/dolphin_generalsettings.kcfgc settings/dolphin_versioncontrolsettings.kcfgc) -kde4_add_kcfg_files(kcm_dolphingeneral_PART_SRCS +kconfig_add_kcfg_files(kcm_dolphingeneral_PART_SRCS settings/dolphin_generalsettings.kcfgc) -kde4_add_plugin(kcm_dolphinviewmodes ${kcm_dolphinviewmodes_PART_SRCS}) -kde4_add_plugin(kcm_dolphinnavigation ${kcm_dolphinnavigation_PART_SRCS}) -kde4_add_plugin(kcm_dolphinservices ${kcm_dolphinservices_PART_SRCS}) -kde4_add_plugin(kcm_dolphingeneral ${kcm_dolphingeneral_PART_SRCS}) +add_library(kcm_dolphinviewmodes MODULE ${kcm_dolphinviewmodes_PART_SRCS}) +add_library(kcm_dolphinnavigation MODULE ${kcm_dolphinnavigation_PART_SRCS}) +add_library(kcm_dolphinservices MODULE ${kcm_dolphinservices_PART_SRCS}) +add_library(kcm_dolphingeneral MODULE ${kcm_dolphingeneral_PART_SRCS}) -target_link_libraries(kcm_dolphinviewmodes ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} dolphinprivate) -target_link_libraries(kcm_dolphinnavigation ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} dolphinprivate) -target_link_libraries(kcm_dolphinservices ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KNEWSTUFF3_LIBRARY} dolphinprivate) -target_link_libraries(kcm_dolphingeneral ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} dolphinprivate) +target_link_libraries(kcm_dolphinviewmodes KF5::KDELibs4Support dolphinprivate) +target_link_libraries(kcm_dolphinnavigation KF5::KDELibs4Support dolphinprivate) +target_link_libraries(kcm_dolphinservices KF5::KDELibs4Support dolphinprivate) +target_link_libraries(kcm_dolphingeneral KF5::KDELibs4Support dolphinprivate) install(TARGETS kcm_dolphinviewmodes DESTINATION ${PLUGIN_INSTALL_DIR} ) install(TARGETS kcm_dolphinnavigation DESTINATION ${PLUGIN_INSTALL_DIR} ) @@ -333,8 +313,11 @@ install(TARGETS kcm_dolphingeneral DESTINATION ${PLUGIN_INSTALL_DIR} ) set(kio_search_PART_SRCS search/filenamesearchprotocol.cpp) -kde4_add_plugin(kio_filenamesearch ${kio_search_PART_SRCS}) -target_link_libraries(kio_filenamesearch ${KDE4_KIO_LIBS}) + +add_library(kio_filenamesearch MODULE ${kio_search_PART_SRCS}) + +target_link_libraries(kio_filenamesearch KF5::KDELibs4Support) + install(TARGETS kio_filenamesearch DESTINATION ${PLUGIN_INSTALL_DIR}) ########### install files ############### @@ -357,4 +340,3 @@ install( FILES settings/kcm/kcmdolphingeneral.desktop DESTINATION ${SERVICES_INS install( FILES settings/services/servicemenu.knsrc DESTINATION ${CONFIG_INSTALL_DIR} ) install( PROGRAMS settings/services/servicemenuinstallation DESTINATION ${BIN_INSTALL_DIR} ) install( PROGRAMS settings/services/servicemenudeinstallation DESTINATION ${BIN_INSTALL_DIR} ) - diff --git a/src/config-dolphin.h.cmake b/src/config-dolphin.h.cmake new file mode 100644 index 000000000..45e7208e1 --- /dev/null +++ b/src/config-dolphin.h.cmake @@ -0,0 +1,4 @@ + +/* Define to 1 if you have the KActivities library. */ +#cmakedefine KF5Activities_FOUND 1 + diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h index a7a9969c3..4ca76961c 100644 --- a/src/dolphinviewcontainer.h +++ b/src/dolphinviewcontainer.h @@ -31,9 +31,9 @@ #include #include -#include +#include -#ifdef KActivities_FOUND +#ifdef KF5Activities_FOUND namespace KActivities { class ResourceInstance; } @@ -345,7 +345,7 @@ private: KUrl m_dropDestination; QScopedPointer m_dropEvent; -#ifdef KActivities_FOUND +#ifdef KF5Activities_FOUND private: KActivities::ResourceInstance * m_activityResourceInstance; #endif -- cgit v1.3.1 From 81d5335060dd640298c62e7fc4fd6a32a34c3e9d Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Sun, 29 Jun 2014 17:51:48 +0200 Subject: Move docs. --- CMakeLists.txt | 3 +- docs/CMakeLists.txt | 2 + docs/default-ui.png | Bin 0 -> 122647 bytes docs/grouping-view.png | Bin 0 -> 62720 bytes docs/index.docbook | 2134 +++++++++++++++++++++++++++++++++ docs/locationbar-breadcrumb.png | Bin 0 -> 18404 bytes docs/locationbar-context-menu.png | Bin 0 -> 16993 bytes docs/locationbar-editable.png | Bin 0 -> 2369 bytes docs/locationbar-kioslaves-menu.png | Bin 0 -> 9373 bytes docs/locationbar-places-icon.png | Bin 0 -> 17500 bytes docs/nepomuk-search-more-options.png | Bin 0 -> 21648 bytes docs/nepomuk-search.png | Bin 0 -> 8912 bytes docs/preferences-general-behavior.png | Bin 0 -> 60612 bytes docs/preferences-navigation.png | Bin 0 -> 37670 bytes docs/preferences-services.png | Bin 0 -> 52501 bytes docs/preferences-startup.png | Bin 0 -> 39430 bytes docs/preferences-trash.png | Bin 0 -> 36962 bytes docs/preferences-viewmodes-icons.png | Bin 0 -> 43780 bytes docs/toolbar-navigation.png | Bin 0 -> 1923 bytes docs/toolbar-view-appearance.png | Bin 0 -> 6447 bytes docs/toolbar.png | Bin 0 -> 8806 bytes docs/viewproperties-dialog.png | Bin 0 -> 33794 bytes 22 files changed, 2138 insertions(+), 1 deletion(-) create mode 100644 docs/CMakeLists.txt create mode 100644 docs/default-ui.png create mode 100644 docs/grouping-view.png create mode 100644 docs/index.docbook create mode 100644 docs/locationbar-breadcrumb.png create mode 100644 docs/locationbar-context-menu.png create mode 100644 docs/locationbar-editable.png create mode 100644 docs/locationbar-kioslaves-menu.png create mode 100644 docs/locationbar-places-icon.png create mode 100644 docs/nepomuk-search-more-options.png create mode 100644 docs/nepomuk-search.png create mode 100644 docs/preferences-general-behavior.png create mode 100644 docs/preferences-navigation.png create mode 100644 docs/preferences-services.png create mode 100644 docs/preferences-startup.png create mode 100644 docs/preferences-trash.png create mode 100644 docs/preferences-viewmodes-icons.png create mode 100644 docs/toolbar-navigation.png create mode 100644 docs/toolbar-view-appearance.png create mode 100644 docs/toolbar.png create mode 100644 docs/viewproperties-dialog.png (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c6cf5df81..859a65d20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE SOVERSION 5 ) -find_package(KF5 REQUIRED COMPONENTS Init KCMUtils KDELibs4Support NewStuff) +find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff) find_package(KF5 COMPONENTS Activities) find_package(Phonon4Qt5 CONFIG REQUIRED) @@ -55,6 +55,7 @@ if (KF5Baloo_FOUND AND KF5BalooWidgets_FOUND AND KF5FileMetaData_FOUND) endif() add_subdirectory(src) +add_subdirectory(docs) # TODO Remove the if/endif lines if Dolphin is split. if ("${CMAKE_SOURCE_DIR}" STREQUAL "${Dolphin_SOURCE_DIR}") diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100644 index 000000000..57e195bce --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1,2 @@ + +kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR dolphin) diff --git a/docs/default-ui.png b/docs/default-ui.png new file mode 100644 index 000000000..611b8bd26 Binary files /dev/null and b/docs/default-ui.png differ diff --git a/docs/grouping-view.png b/docs/grouping-view.png new file mode 100644 index 000000000..b0ac00cb9 Binary files /dev/null and b/docs/grouping-view.png differ diff --git a/docs/index.docbook b/docs/index.docbook new file mode 100644 index 000000000..5fe85f5d1 --- /dev/null +++ b/docs/index.docbook @@ -0,0 +1,2134 @@ + +Dolphin"> + + + + +]> + + + + +The &dolphin; Handbook + + + +Peter + +Penz + +
peter.penz@gmx.at
+
+
+ +Orville +Bennett + +
&Orville.Bennett.mail;
+
+
+ +Michael +Austin + +
tuxedup@users.sourceforge.net
+
+
+ +David +Edmundson + +
kde@davidedmundson.co.uk
+
+
+ +Alan +Blanchflower + + +Frank +Reininghaus + +
frank78ac@googlemail.com
+
+
+ + +
+ + +2006 +Peter Penz + + +2006 +&Orville.Bennett; +Michael Austin + + +2009 +Frank Reininghaus + + +&FDLNotice; + +2013-06-28 +2.3 (&kde; 4.11) + + + +&dolphin; is the default file manager for &kde;, designed with usability as a primary focus. + + + + +KDE +Dolphin +Filemanager +file +management + + +
+ + +Introduction + + +&dolphin; is &kde;'s default file manager. It aims to improve usability at the +user interface level. &dolphin; focuses only on being a file manager whereas +&konqueror;, which was &kde;'s default file manager in &kde; 3 and can still be +used for file management, is a universal viewer for many file types. + + + +This design approach allows the developers to concentrate on optimizing the user +interface for the specific task of file management. + + + +Please report any problems or feature requests to the &dolphin; author via the +bug report dialog. This is accessible either from the Control +button at the right of the toolbar in the default mode without +menubar; or from HelpReport Bug... +menu of the application, if the menubar is shown. + + + + + +Using &dolphin; + + +&dolphin; User Interface + + +The screenshot below shows &dolphin;'s default user interface: + + + +Screenshot of &dolphin;'s default user interface + + + + + +&dolphin;'s default user interface. + +&dolphin;'s default user interface. + + + + +The elements of the default user interface are: + + + + +The toolbar, which can be used for quick access to frequently used actions. The +toolbar can be customized by clicking it with the &RMB; and choosing +Configure Toolbars... +from the context menu, with Configure Toolbars... +from the Control button at the +right of the toolbar or via Settings +Configure Toolbars... +from the main menu. + + +Screenshot of &dolphin;'s toolbar + + + + + +The default toolbar. + + + +Toolbar items where the icon is sufficient for knowing the command do not have text +alongside the icons. This can be changed by a &RMB; click and selecting the item text +below Show Text. The Control +button at the right side of the toolbar is only displayed if the menubar is hidden. + + + + + + + +The location bar, which always displays the path to the current folder. It can +be switched between two different modes, see the +section on the location bar for details. + + + +The view, which shows all files +and folders in the current folder. + + + +The Places panel, which +provides quick access to bookmarked locations and disks or other media. + +If desktop search and file indexing are enabled in the Desktop Search +module in the &systemsettings; the panel provides Recently Accessed +items and allows you to search for Documents, Images, +Audio Files and Video. + + + +The status bar. It displays the name, size and type of the file which is +currently hovered over with the mouse, or the number and size of the files which are +selected. At the right, there is a zoom slider that allows you to adjust the size +of the icons in the view. + + + +The menubar (hidden by default), which provides access to all commands and configuration options. +See the Command Reference for a list of +all menu commands. The menubar can be toggled with +Show Menubar (&Ctrl;M) +from the Settings menu or the Control button. + +If the menubar is hidden, all its actions are available from the +Control button. + + + +The additional Information, Folders +and Terminal panels are hidden +by default, for more information see Panels. + + + + + + + + + +The &dolphin; View + + +Using the View + + +The view displays all files and folders in the current folder. These items +can be accessed or manipulated in different ways: + + + + +A file or folder can be opened by clicking it with the &LMB; (or +double-clicking, if Double-click to open files and folders +is enabled in the Navigation +section of the settings). + + + +Clicking any item or the white area around the items with the &RMB; opens a +context menu which provides access to many frequently used actions for the item +or the current folder, respectively. + + + +If the &LMB; is pressed on an item, but not immediately released, the item can +be dragged and dropped in another folder in the current view or in another +&dolphin; view (in another &dolphin; window or in the same window if the +view is split, see below) to move or copy it or to create a symbolic link. +Items can even be dropped in another application to open them in that application. + + + + +&dolphin; remembers the history of visited folders. To navigate backward or +forward in the history, the corresponding buttons in the toolbar can be used: + + + +Screenshot of &dolphin;'s toolbar + + + + + +The Back and Forward buttons in the toolbar. + + + +The Back and Forward buttons in +the toolbar can be used to navigate in the history. + + + + + + + + +&dolphin; View Appearance + + +The toolbar contains buttons to control the appearance of the view: + + + +Screenshot of &dolphin;'s toolbar + + + + + +The buttons in the toolbar which control the appearance of the view. + + +The buttons in the toolbar which control the appearance of the view. + + + + + +All the settings discussed below and other options concerning, ⪚ the +sorting of the files in the current folder, can also be modified in the +View menu and in the +View Properties dialog. By +default, these settings are remembered for each folder separately. This +behavior can be changed in the +General section of the settings. + + + +View Modes + + +The first three buttons in the above screenshot switch between &dolphin;'s +view modes. + + + + +In the Icons view, which is the default, files will be +represented by an icon that visualizes the file type, and a folder icon will be +shown for subfolders. The names of folders and files, and the items enabled in +ViewAdditional Information, +are displayed below the icons. + + + +The Compact view shows the folder contents as icons with +the name beside it and the items enabled in +ViewAdditional Information +below the name. The items are grouped in columns similar to the Short View +in the &kde; file dialog. + + + +In the Details view, the folder contents are displayed +as a detailed list which contains the name, size and last modification time of +each item. Additional columns can be added by clicking a column header with the +&RMB;. + +In the context menu of the header line you can choose between custom or automatic +column width. Automatic width adjusts the width of all columns once to display the longest +item in the column completely, except for the Name column where +the extension is replaced by ... + +The order of columns can be changed by drag and drop of column headers, except for +the Name header, which is always the first column in this view. + + +The details view allows you to view the current directory +in a tree-like fashion if +Expandable folders are enabled: +Each subfolder of the current folder can be +expanded or collapsed by clicking on the > +or v icon next to it. + + + + +Grouped View + + + + + +Grouped View + +All view modes support grouping by the sort type selected +in ViewSort by + + + + + + + +Information in the View + +In all view modes &kappname; shows at least an icon and a name for each item. +Using Additional Information in the View +menu or the context menu of the header in Details mode, you can select +more information for each item to be shown: + + + +Size, Date, +Type, Rating, +Tags or Comment. + + +Depending on the file type, additionally, sorting criteria can be selected: + + Document: Number of words and lines + Image: Size and orientation + Audio: Artist, album, duration and track + + + +The Other submenu allows you to select +Path, Link Destination, +Copied From, +Permissions, Owner or +User Group. + + + + + +Preview + + +If Preview is enabled, the icons are based on the actual +file or folder contents; ⪚ for images a scaled down preview of the image is +shown. + + + + + +Split + + +If Split is clicked, two views are shown which can +display the contents of different folders. This can be convenient for moving or +copying files. + + + + + + + +Selecting Items in the View + + +There are several ways to select items in the view. Once a group of items +is selected, all actions, such as +Cut, +Copy, +Move to Trash, +and drag and drop operations, affect all selected items. + + + +Selecting Items Using the Mouse + + + + +You can press the &LMB; somewhere in the view and draw a rectangle around +a group of items before releasing the button. This will select all items in the +rectangle and clear the previous selection. If the &Shift; key is pressed during +the selection process, the previous selection is kept. + + + +If the &Ctrl; key is pressed while an item is clicked with the &LMB;, the +selection state of this item is toggled. If the &Ctrl; key is pressed while a +rectangle is drawn around a group of items as described above, the selection +state of all items in the rectangle will be toggled. + + + +If the &Shift; key is pressed while an item is clicked with the &LMB;, all items +between the previous current item and the clicked item will be selected. + + + +If Show selection marker is enabled in the +Behavior +tab of the General section of the settings, a small ++ or - button appears in the top +left corner of the item which is currently hovered over with the mouse. Clicking +this sign selects or deselects the item, respectively. + + + + + + + +Selecting Items Using the Keyboard + + + + +If an arrow key, Page Up, Page Down, +Home, or End is pressed, the new current item +is selected, and the previous selection is cleared. + + + +If the &Ctrl; key is held while one of the above keys is pressed, the selection +remains unchanged. + + + +If the &Shift; key is held while one of the above keys is pressed, all items +between the previous current item and the new current item will be selected. + + + +If &Ctrl;Space is pressed, +the selection state of the current item is toggled. + + + +&Ctrl;A selects all items +in the view. + + + +&Ctrl;&Shift;A toggles the +selection state of all items in the view. + + + +Select a file or folder by typing the first few letters of its name and the +first matching item is selected. +To clear the selection and cancel the keyboard search press &Esc; or wait longer than +the timeout of 1 second. + + + + + + + + + + + + +Location Bar + + +The location bar, which can be found above &dolphin;'s view, displays +the path to the current folder. The location bar has two modes. + + + +Bread Crumb Mode + + +In the bread crumb mode, which is the default, each folder name in +the path to the current folder is a button which can be clicked to quickly open +that folder. Moreover, clicking the > sign to the right of a +folder opens a menu which allows you to quickly open a subfolder of that folder. + + + +Screenshot of the location bar in bread crumb mode + + + + + +Location bar in bread crumb mode. + +Location bar in bread crumb mode. + + + + + + +Editable Mode + + +When in bread crumb mode, clicking in the gray area to the right of the path +with the &LMB; switches the location bar to editable mode, +in which the path can be edited using the keyboard. To switch back to bread +crumb mode, click the check mark at the right of the location bar with the &LMB;. + + + +Screenshot of the location bar in editable mode + + + + + +Location bar in editable mode. + +Location bar in editable mode. + + + + +Using Kioslaves + +If the location bar is empty in editable mode, a drop down box appears in +front of the bar listing all available kioslaves on your system. Kioslaves are +programs built into &kde; which add support for many different protocols to +&dolphin; and other &kde; applications. + +For example with the fish kioslave &dolphin; can be +used to manage files and folders on a remote host that is accessible +via SSH. To do this you would type fish://username@remotehost +into the location bar. Similar remote file management can be done on +remote hosts accessible via the &FTP;, NFS, SFTP, SMB (CIFS) or webdav protocols. + +It is also possible to use the kioslaves drop down list to access +&systemsettings;, fonts, trash, other programs and devices attached to your computer. +See the drop down list for the full list of capabilities available from kioslaves on your system. + + +Screenshot of the list of kioslaves + + + + + +Location bar showing list of available kioslaves. + +List of available kioslaves. + + + + + + + +Places and Context + + +If the Places panel is hidden; in both modes an additional icon +in front of the path is displayed. This icon can be clicked with the &LMB; to open a +menu which offers quick access to places and storage media. See the +section about the Places Panel for details. + + + +Location bar with Places icon + + + + + +Location bar with Places icon + + + + +The context menu of the location bar offers actions to switch between the modes and +to copy and paste the path using the clipboard. Check the last option in this context menu to +display either the full path starting with the root folder of the file system or to display +the path starting with the current places entry. + + + +Location bar context menu + + + + + +Location bar context menu + + + + + + + + + +Panels + + +&dolphin; allows a number of panels to be placed next to the view. These can +be enabled in ViewPanels. +By unlocking the panels and clicking and dragging a panel title, the panel can be moved +to a different position, even outside the window. + + + +Places + + + +The Places panel is located at the left of the window by +default. The Places panel shows any locations you have +bookmarked. It also shows any disk or media attached to the computer, recently accessed items +and allows you to search for certain type of files. The order of these entries can be changed by drag and drop. + + + +The easiest way to add a folder to the Places panel is to +drag it and drop it in the panel. Moreover, you can click inside the panel with +the &RMB; and choose Add Entry... +from the context menu. The first procedure creates a system wide bookmark, the second +procedure can be used to add the current path of the location bar or any desired folder or device. +A dialog opens where label, location and icon can be edited and the usage of this entry +can be restricted to &dolphin;. + + +A &RMB; click opens the context menu to edit, add, hide or remove entries +and change the icon size to one of the predefined values or lock/unlock the panels. + +The context menu has an action to open the entry in a new tab. +Devices can be unmounted using the context menu. + + + + +Information + + +The Information panel shows extended information about the +selected items(s) or about the current folder or the file which is currently hovered +over with the mouse, including size, type, and date of last modification. It also +features a large preview of the selected item and allows you to assign a rating, +tags, and comments to it. + + + + + +Folders + + +The Folders panel shows a tree view structure of the file +system. It only shows folders. Clicking a folder with the &LMB; opens this folder +in the &dolphin; view. + + + + + + +Terminal + + +This panel contains a terminal. The terminal will open at the folder currently +shown in the &dolphin; view. Changing the folder in the active &dolphin; +view will update the working folder of the terminal. The terminal only +works with local media. Note: Changing folder in the terminal will not +affect the &dolphin; view. + + + + + + + +Quick Tips + + +The following are a number of tips to save time when using &dolphin;. + + + +Quick Bookmarking + + +To quickly create a bookmark in the Places panel for the +current folder, &RMB; click in the work space and click +Add to Places in the context menu. + + + + + +Finding Files and Searching in Files + + +&dolphin; is capable of searching for files and for content in files. If +&Ctrl;F is pressed or Edit +Find... is used, the Find +bar will open already set up to search for files within the current folder and any sub-folders. +Start to type into the find input box and the search starts immediately. + +Search files and for content in files + + + + + +Search files and for content in files + +&dolphin; searching files and for content in files. + + + +The search is case insensitive, and does not require surrounding wildcards +(*foo* and foo are equivalent), +but you can use wildcards inside the search term. * will match +zero or more characters, ? only one single character. +This feature can be used with running Nepomuk/Strigi services; without these services +a KIOSlave is launched to provide the search results. +The option from Everywhere with activated Nepomuk/Strigi +services searches in all indexed folders, without Nepomuk/Strigi this option +starts the search from the user's Home folder. + + +Search with More Options + + + + + +Search with More Options + +&dolphin; searching with More Options. + + + + +Use the More Options button to extend the Find +bar. This provides a very comfortable way for +the user to shrink the number of search results. +To start a search select one or more file types (Documents, +Audio, Video, Images), + a time period and rating + +Alternatively you can use these options in the Places panel +together with the Filter bar to find files using Nepomuk or limit +the search to files matching the filter expression. + + + + +Mounting Storage Media + + +A quick way to mount Storage Media is to click on the device in the +Places panel. This will mount and open the device in &dolphin;. + + + + + +Undo Actions + + +&dolphin; is capable of undoing changes you have made to files. For example if +you moved a file to the Trash, &dolphin; can undo this and move it back to its +original location. To undo an action, press &Ctrl;Z +or select Edit Undo: (action name) +in the menu, ⪚ Undo: Rename. + + + + + +Renaming A Batch Of Files + +&dolphin; is capable of renaming a number of files at the same time. Each file +will have the file name specified, including a number, ⪚, Image1.jpg, +Image2.jpg, Image3.jpg. This can be useful, ⪚, for pictures taken with a digital camera. + + + +If you wish to rename a batch of files, first select the files to be renamed. +This can be done by pressing the &LMB; and drawing a rectangle around the files +to be renamed before releasing it, or by holding &Ctrl; and clicking each file +to be renamed (see Selecting Items in the View +for more details on item selection). Then open the batch-rename dialog by pressing +F2 or via the File menu: + File Rename... + + + +Then enter the name you wish to give the files. The # character must be present +within the name. The files will then be renamed, where the # +character is replaced by a different consecutive number for each file. + + +If all file extensions in your selection are different, the name of all files +can be changed without using a # placeholder while preserving +the file extensions. This is ⪚ useful to rename a video file and all associated +subtitle files, which have the same filename, but different extensions. + + + + +Comparing A Selection Of Files or Folders + + +If the &kompare; application is installed, you can use it to see the differences +between two files or folders. + + + +First select the two files or folders to be compared. Then launch the &kompare; application +via the Tools menu: Tools Compare Files . +&kompare; will then open showing the differences between the files or folders. + + + + + +Filtering Files + + +&dolphin; is capable of filtering files, &ie; showing only those items in the +view whose name contains a given text. For example, if you wish to show +only the MP3 files within a folder, you could filter for .mp3. +This would then filter out all files whose name does not contain .mp3. + + + +To filter files, first enable the filter bar, either by pressing &Ctrl;I +or via the menu: Tools Show Filter Bar . +You can then enter the text to be filtered for in the filter bar. The filter bar can +be disabled either by pressing &Esc;, or with a &LMB; click on the +Hide Filter Bar icon. + + + + + + + + + +Configuring &dolphin; + + +&dolphin; distinguishes two different kinds of settings: + + + + +Settings which affect the general behavior of &dolphin;. These can be configured +using the Preferences Dialog. + + + +Settings which determine how the contents of a folder are displayed in &dolphin;. +These settings are called View Properties +and can be controlled with toolbar buttons, via the View menu, +and with the View Properties Dialog. +In the default configuration, the view properties are remembered for each folder, +but &dolphin; can also be configured to use common view properties for all folders +in the General +section of the settings. + + + + + + + +The &dolphin; Preferences Dialog + +The Preferences Dialog is opened via Settings +Configure &dolphin;... in the menu in +&dolphin;'s main window. The settings are divided into several groups which can +be accessed by clicking the corresponding icon on the left of the dialog. + + +All settings except for the Startup page and the Status Bar +tab on the General page are shared with &konqueror; in filemanager mode. + + + +Startup + + +This group contains settings which control the appearance of &dolphin; on startup. + + +Screenshot of the Startup settings in &dolphin;'s preferences dialog + + + + + +Startup Settings. + +Startup Settings in &dolphin;'s Preferences Dialog. + + + + + + +The Home Folder is the folder which is opened on startup. The +location of the folder can be entered directly or chosen in a dialog which can +be opened by clicking the button showing a folder icon. Moreover, +the current location or the default location (which is the user's home folder) +can be used as the Home Folder by clicking the corresponding button. + + + +Split View Mode controls if the +&dolphin; view is split on startup +or not. + + + +Editable location bar controls if the location bar is in +editable mode on startup. The bread crumb mode of the location bar is used +otherwise. See the section about the location bar +for details about the two modes. + + + +If Show full path inside location bar is enabled, the full +path of the current location is shown in the bread crumb mode of the location bar. +Otherwise, a shortened version of the path is shown if it begins with the path of +one of the places in the Places panel. + + + +Show filter bar controls if the filter bar is shown on +startup or not. See the section on the filter bar +for details. + + + + + + + + + +View Modes + + +This group contains settings which control the behavior of &dolphin;'s view +modes. The three view modes (Icons, Compact, and Details) are accessible via the +tab bar at the top. + + +Screenshot of the Icons View settings in &dolphin;'s preferences dialog + + + + + +View Modes Settings. + +View Modes Settings in &dolphin;'s Preferences Dialog. + + + + + + +Common settings for all view modes + + +All three view modes have some common settings: + + + + +Sliders which control the size of the icons. The Default or +Preview sizes are used if previews are disabled or enabled, +respectively. Note that the icon size can be changed easily with the zoom slider +in the status bar if the corresponding option is enabled in the +General +section of the settings. + + + +A setting for the font used in the view mode: either the system font or a +custom font can be chosen. + + + + +The other settings in the Text section which apply to only +one of the view modes are discussed below. + + + + + +Icons + + + +Width controls the minimum width that is reserved for +the text of a file item. + + + Maximum lines means maximum number of text lines below the icon. + + + + + + +Compact + + + +Maximum width controls the maximum width that is reserved for +the text of a file item. + + + + + + +Details + + + +Expandable folders determines whether any folders that have subfolders +are displayed in a tree view, where the sub items can be expanded by &LMB; clicking the +> icon and collapsed by clicking the v icon. + + + + + + + + +Navigation + + +This group contains settings which control how navigation in the folder +structure and in archives works. + + +Screenshot of the Navigation settings in &dolphin;'s preferences dialog + + + + + +Navigation Settings. + +Navigation Settings in &dolphin;'s Preferences Dialog. + + + + + + +&dolphin; can be configured to open items with a single mouse click +(Single-click to open files and folders) or a double mouse +click (Double-click to open files and folders). In the +latter case, a single mouse click will select the file or folder. + + +This is a system wide setting and can be changed in the &systemsettings; in the +Input Devices Mouse +module as well. + + + + +Archives will be opened inside &dolphin;, and not in an external application, if +Open Archives as folder is enabled. + + + +If Open folders during drag operations is enabled, dragging +an item with the mouse and hovering over a folder with it for a short time will open +that folder. This allows you to move or copy items quickly to folders which are +several levels deeper in the folder hierarchy. + + + + + + + + + +Services + + +This group offers a selection of services that can be shown in the +Actions submenu of &dolphin;'s context menu which +appears when clicking a file or folder with the &RMB;. + + + +Screenshot of the Services settings in &dolphin;'s preferences dialog + + + + + +Services Settings. + +Services Settings in &dolphin;'s Preferences Dialog. + + + + +Using the Download New Services you can fetch additional +services for the context menu. + + +If you have installed &dolphin;'s plugins for Bazaar, +Mercurial, Git or +Subversion from the kdesdk module these services are shown in the list. +If these plugins are enabled and you enter a folder which is under version control, +the version state (locally changed, up to date &etc;) is indicated by icons +and you have additional entries in the +context menu like commit, update, add, remove &etc; + + +In the service list you can also choose if the Delete, +Copy To, and Move To +commands are shown in the context menu. + + +&dolphin; has to be restarted to activate the changes for some of these settings. + + + + + + +Trash + + +This group contains settings which control the behavior of the trash. + + +Screenshot of the Trash settings in &dolphin;'s preferences dialog + + + + + +Trash Settings. + +Trash Settings in &dolphin;'s Preferences Dialog. + + + + + + +Files which are older than a configurable number of days can be deleted automatically. + + + +The size of the trash can be limited to a configurable percentage of the disk +size. If this limit is reached, a warning can be issued, or the oldest or +largest files can be deleted automatically. + + + + + + + + + +General + + +This group contains settings which control the general behavior of &dolphin;. +The group is divided further into four subgroups which can be accessed using the +tab bar at the top. + + +Screenshot of the General settings in &dolphin;'s preferences dialog + + + + + +General Settings. + +General Settings in &dolphin;'s Preferences Dialog. + + + + + + +Behavior Tab + + + + + + +In the View section, you can configure whether the + view properties are stored for each +folder or if common view properties are to be used for all folders. + + +When hovering over a file or folder with the mouse, a small window with relevant +information is shown if Show tooltips is enabled. + + + +Show selection marker shows a small + +or - button above an item's icon if the item is hovered over +with the mouse. These can be used to select or deselect the item. + + + +Natural sorting of items controls how items are sorted in +the view. If this option is enabled, the sort order of three example files +will be + +File1, +File2, +File10. + +If this option is disabled, the normal alphabetical sorting will be used, which +leads to the sort order + +File1, +File10, +File2. + + + + +Enable Rename inline to use this mode if only one item is currently selected. +If this option is disabled or several items are selected, a dialog will be displayed for renaming. + + + + + + + + + +Previews Tab + + +In this tab, you can configure for which file types previews are shown. +Moreover, the maximum size of remote files for which previews are generated can be chosen. + + +If previews are enabled for folders, previews of some files in the folder will +be shown inside a folder's icon. + + + + +Confirmations Tab + +In the ask for confirmation section, you can enable warning dialogs that +are shown before potentially harmful actions . + +The confirmation settings for Moving files or folders to trash and +Deleting files or folders affect file operations in &dolphin;, &konqueror;, +Gwenview and all &kde; applications using the default &kde; file dialog, +whereas Closing Dolphin windows + with multiple tabs is a &dolphin; specific setting. + + + +Status Bar Tab + + +In this tab, some additional items can be enabled for the status bar, provided +the status bar is wide enough: + + + + +A zoom slider which can be used to change the icon size quickly. + + + +A bar that shows how much space is free on the current drive. + + + + + + +Since &dolphin; 4.9 the Delete, +Copy To, and Move To +commands of the context menu have to be enabled on the Services page. + + + + + + + + + +Folder View Properties + + +The following settings control how the contents of a folder are displayed in the +&kappname; view, and are stored on a per-folder basis by default: + + + + +The view mode (Icons, Compact, Details) + + + +The sorting of items, which is determined by the sort order (ascending, +descending) and the attribute (such as name, size,...) that the items are +sorted by + + + +Sorting of folders and files – are folders shown first or not? + + + +Previews – are they shown instead of icons (based on the settings made in +Previews +tab of &kappname;'s General settings) or not? + + + +Are items shown in groups in the views? + + + +Are hidden files shown? + + + +What additional information (besides the name) is shown in the Icons or Details view? + + + + +The view properties can be configured in the +View menu, some (such as the view +mode) can also be changed using toolbar buttons. + + + +The View Properties Dialog + + + + +Screenshot of the View Properties dialog + + + + + +The View Properties dialog. + +The View Properties Dialog. + + + +The View Properties dialog can be used to quickly modify +several view properties at once. This is done for the current folder, for the +current folder including all subfolders, or even for all folders, depending on +the choice made in the Apply View Properties To section. + + + +If Use these view properties as default is enabled, the chosen view +properties will also be used for all folders which do not have customized view +properties yet. + + + + + + + + + +Command Reference +By default the menubar is not shown. All actions described here either can +be accessed with toolbar buttons or with items in the menu of the +Control toolbar button. + + +The Menubar in &dolphin;'s Main Window + + +The File Menu + + + + + +File +Create New + +Creates a new object (such as a folder or a text file) in the current +folder. +You will find an explanation of all available objects in &konqueror;'s handbook in the chapter +Create New. + + + + + + +&Ctrl;N + +File +New Window + +Opens a new &dolphin; window. + + + + + +&Ctrl;T + +File +New Tab + +Opens a new tab. + + + + + +&Ctrl;W + +File +Close Tab + +Closes the current tab. + + + + + +F2 + +File +Rename + +Renames one currently selected item inline. +Opens the batch rename dialog if several +items are selected. + + + + + +Del + +File +Move to Trash + +Moves the currently selected item(s) to the +trash. + + + + + +&Shift;Del + +File +Delete + +Permanently deletes the currently selected item(s). The items are not moved +to the trash and cannot be restored. + + + + + +&Alt;Return + +File +Properties + +Shows the properties dialog for the currently selected +item(s). + + + + + +&Ctrl;Q + +File +Quit + +Exits &dolphin;. + + + + + + + +The Edit Menu + + + + + + +&Ctrl;Z + +Edit +Undo + +Undoes the last action performed by &dolphin;. + + + + + +&Ctrl;X + +Edit +Cut + +Cuts the currently selected item(s). + + + + + +&Ctrl;C + +Edit +Copy + +Copies the currently selected item(s). + + + + + +&Ctrl;V + +Edit +Paste Clipboard Contents... + +Pastes the currently copied/cut items to the current +folder. If the clipboard does not contain files or folders, the clipboard +contents (such as text or image data) will be pasted into a new file. +The name of this file has to be entered in a dialog. + + + + + + +&Ctrl;F + +Edit +Find... + +Opens the find bar. Enter a search term into the edit box and select to search for filename +or in contents of files starting from the current folder or everywhere. + + + + + +&Ctrl;A + +Edit +Select All + +Selects all files and folders in the current +folder. + + + + + +&Ctrl;&Shift;A + +Edit +Invert Selection + + +Selects all unselected items and deselects all selected items in the current folder. + + + + + + + +The View Menu + + + + + + +&Ctrl;+ + +View +Zoom In + +Increases the size of icons in the view. + + + + + +&Ctrl;- + +View +Zoom Out + +Decreases the size of icons in the view. + + + + +View +View Mode + +Changes the view mode to Icons +(&Ctrl;1), Compact +(&Ctrl;2) or Details +(&Ctrl;3). + + + + +View +Sort By + +Changes whether items are sorted by Name +or other criteria described in Information in the View. +Descending reverses the sort order. +Folders First sorts folders before files. + + + + + +View +Additional Information + +Displays additional information +described in Information in the View. + + + + + +View +Preview + +Displays a symbolic preview of the file contents in the different +view modes. + + + + +View +Show in Groups + +Displays the content of the +current folder grouped by the option selected in Sort By. + + + + + + +&Alt;. + +View +Show Hidden Files + +Shows all the hidden files and sub-folders within the current +folder. + + + + + +F3 + +View +Split + +Enables and disables the split view mode. + + + + + +F5 + +View +Reload + +Reloads the current folder. + + + + +View +Stop + +Stops loading/reading the contents of the current +folder. + + + + +View +Panels + +Enables and disables the different panels: +Places (F9), Information +(F11), Folders (F7), +Terminal (F4). +With Lock Panels the panel header with caption and two buttons is +hidden to save space and the panels are immutable, with Unlock Panels +the header is visible and the panel can be moved to the right or left or even +outside the main window. + + + + + + + +F6 + +View +Location Bar +Editable Location + +Changes the location bar between the two modes; the +bread crumb mode and the +editable mode. + + + + + + +&Ctrl;L + +View +Location Bar +Replace Location + +Switches the location bar to editable mode, +if necessary, and selects the location such that it can be replaced quickly. + + + + + +View +Adjust View Properties... + +Opens the View Properties +Dialog. + + + + + + + +The Go Menu + + + + + + +&Alt;Up + +Go +Up + +Changes to the folder above the current folder. + + + + + +&Alt;Left + +Go +Back + +Changes to the previously viewed folder. + + + + + +&Alt;Right + +Go +Forward + +Undoes a Go Back action. + + + + + +&Alt;Home + +Go +Home + +Changes to the users home folder, ⪚ +/home/Peter/. + + + + +Go +Recently Closed Tabs + +Shows a list of recently closed tabs which can +be reopened. + + + + + + +The Tools Menu + + + + + + +&Ctrl;I + +Tools +Show Filter Bar + +Enables and disables the filter bar. + + + + + +&Shift;F4 + +Tools +Open Terminal + +Opens &konsole; within the current folder. + + + + +Tools +Compare Files + +Compare the currently selected files or folders with +&kompare;. This action is only enabled if two files or folders are selected. + + + + +Tools +Select Remote Charset + +Allows you to choose the charset used by a remote +connection manually. + + + + + + +The Settings and Help Menu + +&dolphin; has the common &kde; Settings and Help +menu items, for more information read the sections about the Settings Menu and Help Menu +of the &kde; Fundamentals. + + + + + + + +Miscellaneous Questions + + + + +Has &dolphin; replaced &konqueror;? + + + +&dolphin; is not intended to be a competitor to &konqueror;: &konqueror; acts as +a universal viewer being able to show &HTML; pages, text documents, folders and a +lot more, whereas &dolphin; focuses on being only a file manager. This approach +allows the optimization of the user interface for the task of file management. + + + + + + +How can I get involved with the development of &dolphin;? + + + +The easiest way to get involved with &dolphin; is to subscribe to the developer +mailing list kfm-devel +and drop an email to the developer mailing list. Email what you can do, how much time +you can devote &etc;, the developers will let you know what you can do in the +project. If you wish to contribute to the documentation please email the +&kde; Documentation Team list. + + + + + + +How can I submit bug reports? + + + +The official channel for submitting bug reports is via the &kde; bug tracking +system. The &kde; bug tracker can be found at +http://bugs.kde.org. + + + + + + +How can I submit feature requests? + + + +The official channel for submitting feature requests is via the &kde; bug +tracking system. The &kde; bug tracker can be found at +http://bugs.kde.org. + + + + + + + + + + +Credits and License + + +&dolphin; + + +Program copyright 2006–2013 Peter Penz peter.penz@gmx.at and +Frank Reininghaus frank78ac@googlemail.com + +Contributors: + +Cvetoslav Ludmiloff ludmiloff@gmail.com +Stefan Monov logixoul@gmail.com +Michael Austin tuxedup@users.sourceforge.net +&Orville.Bennett; &Orville.Bennett.mail; + + + + +Documentation copyright 2005 Peter Penz peter.penz@gmx.at + + +Documentation copyright 2006 &Orville.Bennett; &Orville.Bennett.mail; + + +Documentation copyright 2006 Michael Austin tuxedup@users.sourceforge.net + + +Documentation copyright 2009 Frank Reininghaus frank78ac@googlemail.com + + + + +&underFDL; +&underGPL; + + + + +How to get &dolphin; +&dolphin; is part of the &package; package which is an essential part of +&kde;. + +For instructions on acquiring &kde; please see http://www.kde.org or read the chapter +Installing &kde; +in the &kde; Fundamentals. + +For further information about &dolphin; you might want to visit +http://dolphin.kde.org or +http://userbase.kde.org/Dolphin. + + + +&documentation.index; +
+ + diff --git a/docs/locationbar-breadcrumb.png b/docs/locationbar-breadcrumb.png new file mode 100644 index 000000000..e6970bdb5 Binary files /dev/null and b/docs/locationbar-breadcrumb.png differ diff --git a/docs/locationbar-context-menu.png b/docs/locationbar-context-menu.png new file mode 100644 index 000000000..7635427fa Binary files /dev/null and b/docs/locationbar-context-menu.png differ diff --git a/docs/locationbar-editable.png b/docs/locationbar-editable.png new file mode 100644 index 000000000..8af9e6931 Binary files /dev/null and b/docs/locationbar-editable.png differ diff --git a/docs/locationbar-kioslaves-menu.png b/docs/locationbar-kioslaves-menu.png new file mode 100644 index 000000000..3bbd14eb2 Binary files /dev/null and b/docs/locationbar-kioslaves-menu.png differ diff --git a/docs/locationbar-places-icon.png b/docs/locationbar-places-icon.png new file mode 100644 index 000000000..37ec23505 Binary files /dev/null and b/docs/locationbar-places-icon.png differ diff --git a/docs/nepomuk-search-more-options.png b/docs/nepomuk-search-more-options.png new file mode 100644 index 000000000..9e80d37ed Binary files /dev/null and b/docs/nepomuk-search-more-options.png differ diff --git a/docs/nepomuk-search.png b/docs/nepomuk-search.png new file mode 100644 index 000000000..1554ad759 Binary files /dev/null and b/docs/nepomuk-search.png differ diff --git a/docs/preferences-general-behavior.png b/docs/preferences-general-behavior.png new file mode 100644 index 000000000..843ebac52 Binary files /dev/null and b/docs/preferences-general-behavior.png differ diff --git a/docs/preferences-navigation.png b/docs/preferences-navigation.png new file mode 100644 index 000000000..d7d3d93ec Binary files /dev/null and b/docs/preferences-navigation.png differ diff --git a/docs/preferences-services.png b/docs/preferences-services.png new file mode 100644 index 000000000..84dd9632d Binary files /dev/null and b/docs/preferences-services.png differ diff --git a/docs/preferences-startup.png b/docs/preferences-startup.png new file mode 100644 index 000000000..86bf27086 Binary files /dev/null and b/docs/preferences-startup.png differ diff --git a/docs/preferences-trash.png b/docs/preferences-trash.png new file mode 100644 index 000000000..0ea1ec24c Binary files /dev/null and b/docs/preferences-trash.png differ diff --git a/docs/preferences-viewmodes-icons.png b/docs/preferences-viewmodes-icons.png new file mode 100644 index 000000000..1b8b970dd Binary files /dev/null and b/docs/preferences-viewmodes-icons.png differ diff --git a/docs/toolbar-navigation.png b/docs/toolbar-navigation.png new file mode 100644 index 000000000..0fdfa74f8 Binary files /dev/null and b/docs/toolbar-navigation.png differ diff --git a/docs/toolbar-view-appearance.png b/docs/toolbar-view-appearance.png new file mode 100644 index 000000000..5606fcfc7 Binary files /dev/null and b/docs/toolbar-view-appearance.png differ diff --git a/docs/toolbar.png b/docs/toolbar.png new file mode 100644 index 000000000..7b8919c56 Binary files /dev/null and b/docs/toolbar.png differ diff --git a/docs/viewproperties-dialog.png b/docs/viewproperties-dialog.png new file mode 100644 index 000000000..99567cc50 Binary files /dev/null and b/docs/viewproperties-dialog.png differ -- cgit v1.3.1 From bfdc5a44d2d8415c2f9fbe2e536de564eba6d2e4 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Sun, 19 Oct 2014 15:07:34 +0200 Subject: Increase version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 859a65d20..43e380754 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12) project(Dolphin) # ECM setup -find_package(ECM 0.0.14 CONFIG REQUIRED) +find_package(ECM 1.2.0 CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) set(DOLPHIN_VERSION "4.97.0") -- cgit v1.3.1 From c7258487094c7e16258ad90e384c3a87605dfc95 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Wed, 4 Feb 2015 10:22:03 +0100 Subject: Port Dolphin away from KApplication, KCmdLineArgs and K4AboutData --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 3 +- src/dolphinapplication.cpp | 102 ------------------ src/dolphinapplication.h | 44 -------- src/dolphinmainwindow.cpp | 5 +- src/dolphinmainwindow.h | 12 +-- src/main.cpp | 184 +++++++++++++++++++++------------ src/settings/dolphinsettingsdialog.cpp | 1 - 8 files changed, 128 insertions(+), 225 deletions(-) delete mode 100644 src/dolphinapplication.cpp delete mode 100644 src/dolphinapplication.h (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 43e380754..e2e93b146 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE SOVERSION 5 ) -find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff) +find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff CoreAddons I18n) find_package(KF5 COMPONENTS Activities) find_package(Phonon4Qt5 CONFIG REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 748b09316..6ae11c833 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -147,7 +147,6 @@ install(FILES views/versioncontrol/fileviewversioncontrolplugin.desktop DESTINAT ########################################## set(dolphin_SRCS - dolphinapplication.cpp dolphindockwidget.cpp dolphinmainwindow.cpp dolphinviewcontainer.cpp @@ -236,6 +235,8 @@ target_link_libraries(kdeinit_dolphin KF5::Solid Phonon::phonon4qt5 KF5::KDELibs4Support + KF5::I18n + KF5::CoreAddons ) if (KF5Activities_FOUND) diff --git a/src/dolphinapplication.cpp b/src/dolphinapplication.cpp deleted file mode 100644 index da9358e37..000000000 --- a/src/dolphinapplication.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006-2011 by Peter Penz * - * Copyright (C) 2006 by Holger 'zecke' Freyther * - * * - * 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 "dolphinapplication.h" -#include "dolphinmainwindow.h" -#include "dolphin_generalsettings.h" - -#include -#include -#include - -DolphinApplication::DolphinApplication() : - m_mainWindow(0) -{ - m_mainWindow = new DolphinMainWindow(); - m_mainWindow->setAttribute(Qt::WA_DeleteOnClose); - - KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); - - const int argsCount = args->count(); - - QList urls; - for (int i = 0; i < argsCount; ++i) { - const QUrl url = args->url(i); - if (url.isValid()) { - urls.append(url); - } - } - - bool resetSplitSettings = false; - if (args->isSet("split") && !GeneralSettings::splitView()) { - // Dolphin should be opened with a split view although this is not - // set in the GeneralSettings. Temporary adjust the setting until - // all passed URLs have been opened. - GeneralSettings::setSplitView(true); - resetSplitSettings = true; - - // We need 2 URLs to open Dolphin in split view mode - if (urls.isEmpty()) { // No URL given - Open home URL in all two views - urls.append(GeneralSettings::homeUrl()); - urls.append(GeneralSettings::homeUrl()); - } else if (urls.length() == 1) { // Only 1 URL given - Open given URL in all two views - urls.append(urls.at(0)); - } - } - - if (!urls.isEmpty()) { - if (args->isSet("select")) { - m_mainWindow->openFiles(urls); - } else { - m_mainWindow->openDirectories(urls); - } - } else { - const QUrl homeUrl(QUrl::fromLocalFile(GeneralSettings::homeUrl())); - m_mainWindow->openNewActivatedTab(homeUrl); - } - - if (resetSplitSettings) { - GeneralSettings::setSplitView(false); - } - - args->clear(); - - m_mainWindow->show(); -} - -DolphinApplication::~DolphinApplication() -{ -} - -DolphinApplication* DolphinApplication::app() -{ - return qobject_cast(qApp); -} - -void DolphinApplication::restoreSession() -{ - const QString className = KXmlGuiWindow::classNameOfToplevel(1); - if (className == QLatin1String("DolphinMainWindow")) { - m_mainWindow->restore(1); - } else { - kWarning() << "Unknown class " << className << " in session saved data!"; - } -} - diff --git a/src/dolphinapplication.h b/src/dolphinapplication.h deleted file mode 100644 index 69d07c36e..000000000 --- a/src/dolphinapplication.h +++ /dev/null @@ -1,44 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006-2011 by Peter Penz * - * Copyright (C) 2006 by Holger 'zecke' Freyther * - * * - * 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 DOLPHIN_APPLICATION_H -#define DOLPHIN_APPLICATION_H - -#include - -class DolphinMainWindow; - -class DolphinApplication : public KApplication -{ - Q_OBJECT - -public: - DolphinApplication(); - virtual ~DolphinApplication(); - - static DolphinApplication* app(); - - void restoreSession(); - -private: - DolphinMainWindow* m_mainWindow; -}; - -#endif diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 218698bef..0ee6e5c2c 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -21,7 +21,6 @@ #include "dolphinmainwindow.h" -#include "dolphinapplication.h" #include "dolphindockwidget.h" #include "dolphincontextmenu.h" #include "dolphinnewfilemenu.h" @@ -69,6 +68,7 @@ #include #include +#include #include #include #include @@ -353,8 +353,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) // Find out if Dolphin is closed directly by the user or // by the session manager because the session is closed bool closedByUser = true; - DolphinApplication *application = qobject_cast(qApp); - if (application && application->sessionSaving()) { + if (qApp->isSessionRestored()) { closedByUser = false; } diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 8c8d42ee4..e3188aee5 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -36,7 +36,6 @@ typedef KIO::FileUndoManager::CommandType CommandType; class DolphinViewActionHandler; -class DolphinApplication; class DolphinSettingsDialog; class DolphinViewContainer; class DolphinRemoteEncoding; @@ -58,7 +57,6 @@ class DolphinMainWindow: public KXmlGuiWindow Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.kde.dolphin.MainWindow") Q_PROPERTY(int id READ getId SCRIPTABLE true) - friend class DolphinApplication; public: DolphinMainWindow(); @@ -121,6 +119,11 @@ public slots: /** Stores all settings and quits Dolphin. */ void quit(); + /** + * Opens a new tab showing the URL \a url and activates the tab. + */ + void openNewActivatedTab(const QUrl& url); + signals: /** * Is sent if the selection of the currently active view has @@ -335,11 +338,6 @@ private slots: */ void openNewTab(const QUrl& url); - /** - * Opens a new tab showing the URL \a url and activates the tab. - */ - void openNewActivatedTab(const QUrl& url); - /** * Opens the selected folder in a new tab. */ diff --git a/src/main.cpp b/src/main.cpp index bcd19d4d2..ed4cfff20 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,7 @@ /*************************************************************************** * Copyright (C) 2006 by Peter Penz * * Copyright (C) 2006 by Stefan Monov * + * Copyright (C) 2015 by Mathieu Tarral * * * * 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 * @@ -18,80 +19,131 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ -#include "dolphinapplication.h" - #include "dolphinmainwindow.h" +#include "dolphin_generalsettings.h" -#include -#include +#include +#include +#include +#include #include -#include -#include #include extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) { - K4AboutData about("dolphin", 0, - ki18nc("@title", "Dolphin"), - "4.60", - ki18nc("@title", "File Manager"), - K4AboutData::License_GPL, - ki18nc("@info:credit", "(C) 2006-2014 Peter Penz, Frank Reininghaus, and Emmanuel Pescosta")); - about.setHomepage("http://dolphin.kde.org"); - about.addAuthor(ki18nc("@info:credit", "Emmanuel Pescosta"), - ki18nc("@info:credit", "Maintainer (since 2014) and developer"), - "emmanuelpescosta099@gmail.com"); - about.addAuthor(ki18nc("@info:credit", "Frank Reininghaus"), - ki18nc("@info:credit", "Maintainer (2012-2014) and developer"), - "frank78ac@googlemail.com"); - about.addAuthor(ki18nc("@info:credit", "Peter Penz"), - ki18nc("@info:credit", "Maintainer and developer (2006-2012)"), - "peter.penz19@gmail.com"); - about.addAuthor(ki18nc("@info:credit", "Sebastian Trüg"), - ki18nc("@info:credit", "Developer"), - "trueg@kde.org"), - about.addAuthor(ki18nc("@info:credit", "David Faure"), - ki18nc("@info:credit", "Developer"), - "faure@kde.org"); - about.addAuthor(ki18nc("@info:credit", "Aaron J. Seigo"), - ki18nc("@info:credit", "Developer"), - "aseigo@kde.org"); - about.addAuthor(ki18nc("@info:credit", "Rafael Fernández López"), - ki18nc("@info:credit", "Developer"), - "ereslibre@kde.org"); - about.addAuthor(ki18nc("@info:credit", "Kevin Ottens"), - ki18nc("@info:credit", "Developer"), - "ervin@kde.org"); - about.addAuthor(ki18nc("@info:credit", "Holger Freyther"), - ki18nc("@info:credit", "Developer"), - "freyther@gmx.net"); - about.addAuthor(ki18nc("@info:credit", "Max Blazejak"), - ki18nc("@info:credit", "Developer"), - "m43ksrocks@gmail.com"); - about.addAuthor(ki18nc("@info:credit", "Michael Austin"), - ki18nc("@info:credit", "Documentation"), - "tuxedup@users.sourceforge.net"); - // the .desktop file is not taken into account when launching manually, so - // set the icon precautionally: - about.setProgramIconName("system-file-manager"); - - KCmdLineArgs::init(argc, argv, &about); - - KCmdLineOptions options; - - options.add("select", ki18nc("@info:shell", "The files and directories passed as arguments " - "will be selected.")); - options.add("split", ki18nc("@info:shell", "Dolphin will get started with a split view.")); - options.add("+[Url]", ki18nc("@info:shell", "Document to open")); - KCmdLineArgs::addCmdLineOptions(options); - - { - DolphinApplication app; - if (app.isSessionRestored()) { - app.restoreSession(); + QApplication app(argc, argv); + app.setWindowIcon(QIcon::fromTheme("system-file-manager")); + + KAboutData aboutData("dolphin", i18n("Dolphin"), "4.60", + i18nc("@title", "File Manager"), + KAboutLicense::GPL, + i18nc("@info:credit", "(C) 2006-2014 Peter Penz, Frank Reininghaus, and Emmanuel Pescosta")); + aboutData.setHomepage("http://dolphin.kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "Emmanuel Pescosta"), + i18nc("@info:credit", "Maintainer (since 2014) and developer"), + "emmanuelpescosta099@gmail.com"); + aboutData.addAuthor(i18nc("@info:credit", "Frank Reininghaus"), + i18nc("@info:credit", "Maintainer (2012-2014) and developer"), + "frank78ac@googlemail.com"); + aboutData.addAuthor(i18nc("@info:credit", "Peter Penz"), + i18nc("@info:credit", "Maintainer and developer (2006-2012)"), + "peter.penz19@gmail.com"); + aboutData.addAuthor(i18nc("@info:credit", "Sebastian Trüg"), + i18nc("@info:credit", "Developer"), + "trueg@kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "David Faure"), + i18nc("@info:credit", "Developer"), + "faure@kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "Aaron J. Seigo"), + i18nc("@info:credit", "Developer"), + "aseigo@kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "Rafael Fernández López"), + i18nc("@info:credit", "Developer"), + "ereslibre@kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "Kevin Ottens"), + i18nc("@info:credit", "Developer"), + "ervin@kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "Holger Freyther"), + i18nc("@info:credit", "Developer"), + "freyther@gmx.net"); + aboutData.addAuthor(i18nc("@info:credit", "Max Blazejak"), + i18nc("@info:credit", "Developer"), + "m43ksrocks@gmail.com"); + aboutData.addAuthor(i18nc("@info:credit", "Michael Austin"), + i18nc("@info:credit", "Documentation"), + "tuxedup@users.sourceforge.net"); + + KAboutData::setApplicationData(aboutData); + + QCommandLineParser parser; + parser.addVersionOption(); + parser.addHelpOption(); + aboutData.setupCommandLine(&parser); + + // command line options + parser.addOption(QCommandLineOption(QStringList() << QLatin1String("select"), i18nc("@info:shell", "The files and directories passed as arguments " + "will be selected."))); + parser.addOption(QCommandLineOption(QStringList() << QLatin1String("split"), i18nc("@info:shell", "Dolphin will get started with a split view."))); + parser.addPositionalArgument(QLatin1String("+[Url]"), i18nc("@info:shell", "Document to open")); + + parser.process(app); + aboutData.processCommandLine(&parser); + + + DolphinMainWindow* m_mainWindow = new DolphinMainWindow(); + m_mainWindow->setAttribute(Qt::WA_DeleteOnClose); + + QList urls; + const QStringList args = parser.positionalArguments(); + foreach (const QString& str, args) { + const QUrl url(str); + if (url.isValid()) { + urls.append(url); + } + } + + bool resetSplitSettings = false; + if (parser.isSet("split") && !GeneralSettings::splitView()) { + // Dolphin should be opened with a split view although this is not + // set in the GeneralSettings. Temporary adjust the setting until + // all passed URLs have been opened. + GeneralSettings::setSplitView(true); + resetSplitSettings = true; + + // We need 2 URLs to open Dolphin in split view mode + if (urls.isEmpty()) { // No URL given - Open home URL in all two views + urls.append(GeneralSettings::homeUrl()); + urls.append(GeneralSettings::homeUrl()); + } else if (urls.length() == 1) { // Only 1 URL given - Open given URL in all two views + urls.append(urls.at(0)); + } + } + + if (!urls.isEmpty()) { + if (parser.isSet("select")) { + m_mainWindow->openFiles(urls); + } else { + m_mainWindow->openDirectories(urls); + } + } else { + const QUrl homeUrl(QUrl::fromLocalFile(GeneralSettings::homeUrl())); + m_mainWindow->openNewActivatedTab(homeUrl); + } + + if (resetSplitSettings) { + GeneralSettings::setSplitView(false); + } + + m_mainWindow->show(); + + if (app.isSessionRestored()) { + const QString className = KXmlGuiWindow::classNameOfToplevel(1); + if (className == QLatin1String("DolphinMainWindow")) { + m_mainWindow->restore(1); + } else { + kWarning() << "Unknown class " << className << " in session saved data!"; } - app.exec(); // krazy:exclude=crashy } - return 0; + return app.exec(); // krazy:exclude=crash; } diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp index 3b72ed45c..820fc0e68 100644 --- a/src/settings/dolphinsettingsdialog.cpp +++ b/src/settings/dolphinsettingsdialog.cpp @@ -20,7 +20,6 @@ #include "dolphinsettingsdialog.h" -#include #include #include "dolphin_generalsettings.h" #include "general/generalsettingspage.h" -- cgit v1.3.1 From 1b3ea64abb0579e71ce1dfa490a0805b399be930 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Wed, 4 Feb 2015 10:29:33 +0100 Subject: Add dolphin dbus service --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 1 + src/main.cpp | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index e2e93b146..9899ed0de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE SOVERSION 5 ) -find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff CoreAddons I18n) +find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff CoreAddons I18n DBusAddons) find_package(KF5 COMPONENTS Activities) find_package(Phonon4Qt5 CONFIG REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6ae11c833..0c31ed936 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -237,6 +237,7 @@ target_link_libraries(kdeinit_dolphin KF5::KDELibs4Support KF5::I18n KF5::CoreAddons + KF5::DBusAddons ) if (KF5Activities_FOUND) diff --git a/src/main.cpp b/src/main.cpp index ed4cfff20..ed4c9f9d8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,6 +22,7 @@ #include "dolphinmainwindow.h" #include "dolphin_generalsettings.h" +#include #include #include #include @@ -75,6 +76,8 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) KAboutData::setApplicationData(aboutData); + KDBusService dolphinDBusService; + QCommandLineParser parser; parser.addVersionOption(); parser.addHelpOption(); -- cgit v1.3.1 From 3a390a0580d7e6cecdf082d39cc2bb512e292ded Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Wed, 4 Feb 2015 16:57:20 +0530 Subject: add debug message to check CI failure --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9899ed0de..570910497 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,7 @@ set_package_properties(KF5FileMetaData PROPERTIES ) if (KF5Baloo_FOUND AND KF5BalooWidgets_FOUND AND KF5FileMetaData_FOUND) + message(STATUS "Baloo packages are found") set(HAVE_BALOO TRUE) endif() -- cgit v1.3.1 From 25751088c33ce507096a3e25ee1eeaa7de38c76b Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Wed, 25 Feb 2015 12:12:55 +0100 Subject: Move the KVersionControlPlugin2 interface from konqlib to Dolphin and remove the deprecated KVersionControlPlugin interface from konqlib REVIEW: 122687 --- CMakeLists.txt | 42 +++- DolphinVcsConfig.cmake.in | 6 + src/CMakeLists.txt | 50 ++++- src/dolphinnewfilemenu.h | 4 +- src/dolphinremoveaction.h | 4 +- src/kitemviews/kfileitemlistview.h | 4 +- src/kitemviews/kfileitemlistwidget.h | 6 +- src/kitemviews/kfileitemmodel.h | 4 +- src/kitemviews/kfileitemmodelrolesupdater.cpp | 1 + src/kitemviews/kfileitemmodelrolesupdater.h | 4 +- src/kitemviews/kitemlistcontainer.h | 4 +- src/kitemviews/kitemlistcontroller.h | 4 +- src/kitemviews/kitemlistgroupheader.h | 4 +- src/kitemviews/kitemlistheader.h | 4 +- src/kitemviews/kitemlistselectionmanager.h | 4 +- src/kitemviews/kitemliststyleoption.h | 4 +- src/kitemviews/kitemlistview.h | 10 +- src/kitemviews/kitemlistviewaccessible.h | 8 +- src/kitemviews/kitemlistwidget.h | 6 +- src/kitemviews/kitemmodelbase.h | 4 +- src/kitemviews/kstandarditem.h | 4 +- src/kitemviews/kstandarditemlistgroupheader.h | 4 +- src/kitemviews/kstandarditemlistview.h | 4 +- src/kitemviews/kstandarditemlistwidget.h | 6 +- src/kitemviews/kstandarditemmodel.h | 4 +- src/kitemviews/private/kbaloorolesprovider.h | 4 +- src/kitemviews/private/kfileitemclipboard.h | 4 +- src/kitemviews/private/kfileitemmodeldirlister.h | 4 +- src/kitemviews/private/kfileitemmodelfilter.h | 4 +- src/kitemviews/private/kitemlistheaderwidget.h | 4 +- .../private/kitemlistkeyboardsearchmanager.h | 4 +- src/kitemviews/private/kitemlistroleeditor.h | 4 +- src/kitemviews/private/kitemlistrubberband.h | 4 +- src/kitemviews/private/kitemlistselectiontoggle.h | 4 +- src/kitemviews/private/kitemlistsizehintresolver.h | 4 +- src/kitemviews/private/kitemlistsmoothscroller.h | 4 +- src/kitemviews/private/kitemlistviewanimation.h | 4 +- src/kitemviews/private/kitemlistviewlayouter.h | 4 +- src/kitemviews/private/kpixmapmodifier.h | 4 +- src/settings/viewpropertiesdialog.h | 4 +- src/tests/CMakeLists.txt | 2 +- src/views/dolphinfileitemlistwidget.cpp | 29 ++- src/views/dolphinfileitemlistwidget.h | 8 +- src/views/dolphinitemlistview.h | 4 +- src/views/dolphinnewfilemenuobserver.h | 4 +- src/views/dolphinremoteencoding.h | 4 +- src/views/dolphinview.h | 4 +- src/views/dolphinviewactionhandler.h | 4 +- src/views/draganddrophelper.h | 4 +- src/views/renamedialog.h | 4 +- src/views/versioncontrol/kversioncontrolplugin.cpp | 29 +++ src/views/versioncontrol/kversioncontrolplugin.h | 223 +++++++++++++++++++++ .../versioncontrol/updateitemstatesthread.cpp | 20 +- src/views/versioncontrol/updateitemstatesthread.h | 6 +- .../versioncontrol/versioncontrolobserver.cpp | 41 +--- src/views/versioncontrol/versioncontrolobserver.h | 10 +- src/views/viewmodecontroller.h | 4 +- src/views/viewproperties.h | 4 +- 58 files changed, 469 insertions(+), 194 deletions(-) create mode 100644 DolphinVcsConfig.cmake.in create mode 100644 src/views/versioncontrol/kversioncontrolplugin.cpp create mode 100644 src/views/versioncontrol/kversioncontrolplugin.h (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 570910497..3a3ab6d4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,18 +3,25 @@ cmake_minimum_required(VERSION 2.8.12) project(Dolphin) # ECM setup -find_package(ECM 1.2.0 CONFIG REQUIRED) +find_package(ECM 1.6.0 CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) set(DOLPHIN_VERSION "4.97.0") include(ECMSetupVersion) +include(ECMGenerateHeaders) include(GenerateExportHeader) include(FeatureSummary) include(KDEInstallDirs) include(KDECMakeSettings) include(KDEFrameworkCompilerSettings) +ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINVCS + VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/dolphinvcs_version.h" + PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfigVersion.cmake" + SOVERSION 5 +) + ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE SOVERSION 5 ) @@ -24,12 +31,6 @@ find_package(KF5 COMPONENTS Activities) find_package(Phonon4Qt5 CONFIG REQUIRED) -if ("${CMAKE_SOURCE_DIR}" STREQUAL "${Dolphin_SOURCE_DIR}") - find_package(KF5Konq CONFIG REQUIRED) -else() - include_directories(${LibKonq_SOURCE_DIR}/src) -endif() - find_package(KF5Baloo 4.97) set_package_properties(KF5Baloo PROPERTIES DESCRIPTION "Baloo Core libraries" URL "http://www.kde.org" @@ -58,6 +59,33 @@ endif() add_subdirectory(src) add_subdirectory(docs) +# CMake files +set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Dolphin") + +ecm_configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/DolphinVcsConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfig.cmake" + INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} +) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfigVersion.cmake" + DESTINATION "${CMAKECONFIG_INSTALL_DIR}" + COMPONENT Devel +) + +install(EXPORT DolphinVcsTargets + DESTINATION "${CMAKECONFIG_INSTALL_DIR}" + FILE DolphinVcsTargets.cmake +) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/dolphinvcs_version.h" + DESTINATION "${KDE_INSTALL_INCLUDEDIR}/Dolphin" + COMPONENT Devel +) + # TODO Remove the if/endif lines if Dolphin is split. if ("${CMAKE_SOURCE_DIR}" STREQUAL "${Dolphin_SOURCE_DIR}") feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/DolphinVcsConfig.cmake.in b/DolphinVcsConfig.cmake.in new file mode 100644 index 000000000..7e7a2296f --- /dev/null +++ b/DolphinVcsConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ + +find_dependency(Qt5Widgets) +find_dependency(KF5KIO) + +include("${CMAKE_CURRENT_LIST_DIR}/DolphinVcsTargets.cmake") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ea21f1af2..2b65671da 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,6 +12,42 @@ endif() configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h) +########################################## + +set(dolphinvcs_LIB_SRCS + views/versioncontrol/kversioncontrolplugin.cpp +) + +add_library(dolphinvcs ${dolphinvcs_LIB_SRCS}) + +generate_export_header(dolphinvcs BASE_NAME dolphin) + +target_link_libraries( + dolphinvcs PUBLIC + Qt5::Widgets + KF5::KIOCore +) + +set_target_properties(dolphinvcs PROPERTIES + VERSION ${DOLPHINVCS_VERSION_STRING} + SOVERSION ${DOLPHINVCS_SOVERSION} + EXPORT_NAME DolphinVcs +) + +ecm_generate_headers(dolphinvcs_LIB_HEADERS + HEADER_NAMES + KVersionControlPlugin + + RELATIVE "views/versioncontrol" + REQUIRED_HEADERS dolphinvcs_LIB_HEADERS +) + +install(TARGETS dolphinvcs EXPORT DolphinVcsTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) + +install(FILES views/versioncontrol/fileviewversioncontrolplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dolphin_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT Devel) +install(FILES ${dolphinvcs_LIB_HEADERS} DESTINATION "${KDE_INSTALL_INCLUDEDIR}/Dolphin" COMPONENT Devel) + ########### next target ############### set(dolphinprivate_LIB_SRCS @@ -93,13 +129,10 @@ kconfig_add_kcfg_files(dolphinprivate_LIB_SRCS GENERATE_MOC add_library(dolphinprivate ${dolphinprivate_LIB_SRCS}) -generate_export_header(dolphinprivate BASE_NAME libdolphinprivate - EXPORT_FILE_NAME libdolphin_export.h) - target_link_libraries( dolphinprivate PUBLIC + dolphinvcs KF5::KDELibs4Support - KF5::Konq KF5::NewStuff ) @@ -122,7 +155,7 @@ set_target_properties(dolphinprivate PROPERTIES SOVERSION ${DOLPHINPRIVATE_SOVERSION} ) -install(TARGETS dolphinprivate ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS dolphinprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) ########################################## @@ -136,7 +169,6 @@ add_library(dolphinpart MODULE ${dolphinpart_SRCS}) target_link_libraries(dolphinpart dolphinprivate - KF5::Konq KF5::KDELibs4Support ) @@ -144,7 +176,6 @@ install(TARGETS dolphinpart DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES dolphinpart.rc DESTINATION ${CMAKE_INSTALL_KXMLGUI5DIR}/dolphinpart) install(FILES dolphinpart.desktop DESTINATION ${SERVICES_INSTALL_DIR}) -install(FILES views/versioncontrol/fileviewversioncontrolplugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) ########################################## @@ -230,7 +261,6 @@ kf5_add_kdeinit_executable(dolphin ${dolphin_SRCS}) target_include_directories(kdeinit_dolphin PRIVATE ${PHONON_INCLUDES}) target_link_libraries(kdeinit_dolphin - KF5::Konq dolphinprivate KF5::NewStuff KF5::Parts @@ -251,8 +281,8 @@ if (KF5Activities_FOUND) ) endif() -install(TARGETS kdeinit_dolphin ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) -install(TARGETS dolphin ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS kdeinit_dolphin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS dolphin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) ########################################## diff --git a/src/dolphinnewfilemenu.h b/src/dolphinnewfilemenu.h index 254571eb9..9f1cb5599 100644 --- a/src/dolphinnewfilemenu.h +++ b/src/dolphinnewfilemenu.h @@ -23,7 +23,7 @@ #include -#include "libdolphin_export.h" +#include "dolphin_export.h" class KJob; @@ -35,7 +35,7 @@ class KJob; * All errors are shown in the status bar of Dolphin * instead as modal error dialog with an OK button. */ -class LIBDOLPHINPRIVATE_EXPORT DolphinNewFileMenu : public KNewFileMenu +class DOLPHIN_EXPORT DolphinNewFileMenu : public KNewFileMenu { Q_OBJECT diff --git a/src/dolphinremoveaction.h b/src/dolphinremoveaction.h index 1a123ace5..85f404318 100644 --- a/src/dolphinremoveaction.h +++ b/src/dolphinremoveaction.h @@ -20,7 +20,7 @@ #ifndef DOLPHINREMOVEACTION_H #define DOLPHINREMOVEACTION_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -34,7 +34,7 @@ * This class expects the presence of both the "move_to_trash" and "delete" * actions in @ref collection. */ -class LIBDOLPHINPRIVATE_EXPORT DolphinRemoveAction : public QAction +class DOLPHIN_EXPORT DolphinRemoveAction : public QAction { Q_OBJECT public: diff --git a/src/kitemviews/kfileitemlistview.h b/src/kitemviews/kfileitemlistview.h index 72688893e..84aa17d89 100644 --- a/src/kitemviews/kfileitemlistview.h +++ b/src/kitemviews/kfileitemlistview.h @@ -20,7 +20,7 @@ #ifndef KFILEITEMLISTVIEW_H #define KFILEITEMLISTVIEW_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -36,7 +36,7 @@ class QTimer; * KItemListView::setWidgetCreator() and KItemListView::setGroupHeaderCreator() * to apply customized generators. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemListView : public KStandardItemListView +class DOLPHIN_EXPORT KFileItemListView : public KStandardItemListView { Q_OBJECT diff --git a/src/kitemviews/kfileitemlistwidget.h b/src/kitemviews/kfileitemlistwidget.h index 32959e4f6..07ca59b44 100644 --- a/src/kitemviews/kfileitemlistwidget.h +++ b/src/kitemviews/kfileitemlistwidget.h @@ -20,11 +20,11 @@ #ifndef KFILEITEMLISTWIDGET_H #define KFILEITEMLISTWIDGET_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include -class LIBDOLPHINPRIVATE_EXPORT KFileItemListWidgetInformant : public KStandardItemListWidgetInformant +class DOLPHIN_EXPORT KFileItemListWidgetInformant : public KStandardItemListWidgetInformant { public: KFileItemListWidgetInformant(); @@ -37,7 +37,7 @@ protected: virtual QFont customizedFontForLinks(const QFont& baseFont) const Q_DECL_OVERRIDE; }; -class LIBDOLPHINPRIVATE_EXPORT KFileItemListWidget : public KStandardItemListWidget +class DOLPHIN_EXPORT KFileItemListWidget : public KStandardItemListWidget { Q_OBJECT diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 8e36294e9..167f508cf 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -20,7 +20,7 @@ #ifndef KFILEITEMMODEL_H #define KFILEITEMMODEL_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include @@ -43,7 +43,7 @@ class QTimer; * Recursive expansion of sub-directories is supported by * KFileItemModel::setExpanded(). */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemModel : public KItemModelBase +class DOLPHIN_EXPORT KFileItemModel : public KItemModelBase { Q_OBJECT diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index f17a77e0a..c18d65892 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h index 6c82dbe4a..216b0a501 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.h +++ b/src/kitemviews/kfileitemmodelrolesupdater.h @@ -25,7 +25,7 @@ #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -87,7 +87,7 @@ namespace KIO { * 3. Finally, the entire process is repeated for any items that might have * changed in the mean time. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemModelRolesUpdater : public QObject +class DOLPHIN_EXPORT KFileItemModelRolesUpdater : public QObject { Q_OBJECT diff --git a/src/kitemviews/kitemlistcontainer.h b/src/kitemviews/kitemlistcontainer.h index 6f2851b3e..9fc3d4957 100644 --- a/src/kitemviews/kitemlistcontainer.h +++ b/src/kitemviews/kitemlistcontainer.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTCONTAINER_H #define KITEMLISTCONTAINER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -39,7 +39,7 @@ class KItemModelBase; * * @see KItemListController */ -class LIBDOLPHINPRIVATE_EXPORT KItemListContainer : public QAbstractScrollArea +class DOLPHIN_EXPORT KItemListContainer : public QAbstractScrollArea { Q_OBJECT diff --git a/src/kitemviews/kitemlistcontroller.h b/src/kitemviews/kitemlistcontroller.h index 2824a1fc9..b8a93edac 100644 --- a/src/kitemviews/kitemlistcontroller.h +++ b/src/kitemviews/kitemlistcontroller.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTCONTROLLER_H #define KITEMLISTCONTROLLER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include "kitemset.h" @@ -56,7 +56,7 @@ class QTransform; * @see KItemModelBase * @see KItemListSelectionManager */ -class LIBDOLPHINPRIVATE_EXPORT KItemListController : public QObject +class DOLPHIN_EXPORT KItemListController : public QObject { Q_OBJECT Q_ENUMS(SelectionBehavior) diff --git a/src/kitemviews/kitemlistgroupheader.h b/src/kitemviews/kitemlistgroupheader.h index c89da5027..4612bc4da 100644 --- a/src/kitemviews/kitemlistgroupheader.h +++ b/src/kitemviews/kitemlistgroupheader.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTGROUPHEADER_H #define KITEMLISTGROUPHEADER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -37,7 +37,7 @@ class KItemListView; * the method paint() and draw the role within the given roleBounds() with * the color roleColor(). */ -class LIBDOLPHINPRIVATE_EXPORT KItemListGroupHeader : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListGroupHeader : public QGraphicsWidget { Q_OBJECT diff --git a/src/kitemviews/kitemlistheader.h b/src/kitemviews/kitemlistheader.h index b361b912b..cc2b74793 100644 --- a/src/kitemviews/kitemlistheader.h +++ b/src/kitemviews/kitemlistheader.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTHEADER_H #define KITEMLISTHEADER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -33,7 +33,7 @@ class KItemListView; * Each column of the header represents a visible role * accessible by KItemListView::visibleRoles(). */ -class LIBDOLPHINPRIVATE_EXPORT KItemListHeader : public QObject +class DOLPHIN_EXPORT KItemListHeader : public QObject { Q_OBJECT diff --git a/src/kitemviews/kitemlistselectionmanager.h b/src/kitemviews/kitemlistselectionmanager.h index a8318388c..16761428b 100644 --- a/src/kitemviews/kitemlistselectionmanager.h +++ b/src/kitemviews/kitemlistselectionmanager.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTSELECTIONMANAGER_H #define KITEMLISTSELECTIONMANAGER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -35,7 +35,7 @@ class KItemModelBase; /** * @brief Allows to select and deselect items of a KItemListView. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListSelectionManager : public QObject +class DOLPHIN_EXPORT KItemListSelectionManager : public QObject { Q_OBJECT diff --git a/src/kitemviews/kitemliststyleoption.h b/src/kitemviews/kitemliststyleoption.h index 9290dc341..09b787c27 100644 --- a/src/kitemviews/kitemliststyleoption.h +++ b/src/kitemviews/kitemliststyleoption.h @@ -20,14 +20,14 @@ #ifndef KITEMLISTSTYLEOPTION_H #define KITEMLISTSTYLEOPTION_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include #include -class LIBDOLPHINPRIVATE_EXPORT KItemListStyleOption +class DOLPHIN_EXPORT KItemListStyleOption { public: KItemListStyleOption(); diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index 8130e45ed..f20180289 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTVIEW_H #define KITEMLISTVIEW_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -59,7 +59,7 @@ class QTimer; * @see KItemListWidget * @see KItemModelBase */ -class LIBDOLPHINPRIVATE_EXPORT KItemListView : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListView : public QGraphicsWidget { Q_OBJECT @@ -769,7 +769,7 @@ private: * KItemListWidgetCreatorBase and KItemListGroupHeaderCreatorBase. * @internal */ -class LIBDOLPHINPRIVATE_EXPORT KItemListCreatorBase +class DOLPHIN_EXPORT KItemListCreatorBase { public: virtual ~KItemListCreatorBase(); @@ -793,7 +793,7 @@ private: * expensive instantiations and deletions of KItemListWidgets by recycling existing widget * instances. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListWidgetCreatorBase : public KItemListCreatorBase +class DOLPHIN_EXPORT KItemListWidgetCreatorBase : public KItemListCreatorBase { public: virtual ~KItemListWidgetCreatorBase(); @@ -875,7 +875,7 @@ qreal KItemListWidgetCreator::preferredRoleColumnWidth(const QByteArray& role * The intention of the group-header creator is to prevent repetitive and expensive instantiations and * deletions of KItemListGroupHeaders by recycling existing header instances. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListGroupHeaderCreatorBase : public KItemListCreatorBase +class DOLPHIN_EXPORT KItemListGroupHeaderCreatorBase : public KItemListCreatorBase { public: virtual ~KItemListGroupHeaderCreatorBase(); diff --git a/src/kitemviews/kitemlistviewaccessible.h b/src/kitemviews/kitemlistviewaccessible.h index 28b0be4e6..afef2d5fe 100644 --- a/src/kitemviews/kitemlistviewaccessible.h +++ b/src/kitemviews/kitemlistviewaccessible.h @@ -22,7 +22,7 @@ #ifndef QT_NO_ACCESSIBILITY -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -32,7 +32,7 @@ class KItemListView; class KItemListContainer; -class LIBDOLPHINPRIVATE_EXPORT KItemListViewAccessible: public QAccessibleObject, public QAccessibleTableInterface +class DOLPHIN_EXPORT KItemListViewAccessible: public QAccessibleObject, public QAccessibleTableInterface { public: explicit KItemListViewAccessible(KItemListView* view); @@ -89,7 +89,7 @@ private: mutable QVector m_cells; }; -class LIBDOLPHINPRIVATE_EXPORT KItemListAccessibleCell: public QAccessibleInterface, public QAccessibleTableCellInterface +class DOLPHIN_EXPORT KItemListAccessibleCell: public QAccessibleInterface, public QAccessibleTableCellInterface { public: KItemListAccessibleCell(KItemListView* view, int m_index); @@ -128,7 +128,7 @@ private: int m_index; }; -class LIBDOLPHINPRIVATE_EXPORT KItemListContainerAccessible : public QAccessibleWidget +class DOLPHIN_EXPORT KItemListContainerAccessible : public QAccessibleWidget { public: explicit KItemListContainerAccessible(KItemListContainer* container); diff --git a/src/kitemviews/kitemlistwidget.h b/src/kitemviews/kitemlistwidget.h index 723847c43..ae99a1f29 100644 --- a/src/kitemviews/kitemlistwidget.h +++ b/src/kitemviews/kitemlistwidget.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTWIDGET_H #define KITEMLISTWIDGET_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -43,7 +43,7 @@ class QPropertyAnimation; * size for the invisible items must be accessible. KItemListWidgetInformant * provides this information. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListWidgetInformant +class DOLPHIN_EXPORT KItemListWidgetInformant { public: KItemListWidgetInformant(); @@ -63,7 +63,7 @@ public: * All properties are set by KItemListView, for each property there is a corresponding * virtual protected method that allows to react on property changes. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListWidget : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListWidget : public QGraphicsWidget { Q_OBJECT diff --git a/src/kitemviews/kitemmodelbase.h b/src/kitemviews/kitemmodelbase.h index e46d761fc..bd5ca1d65 100644 --- a/src/kitemviews/kitemmodelbase.h +++ b/src/kitemviews/kitemmodelbase.h @@ -23,7 +23,7 @@ #ifndef KITEMMODELBASE_H #define KITEMMODELBASE_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -49,7 +49,7 @@ class QMimeData; * Also optionally it is possible to provide a tree of items by implementing the methods * setExpanded(), isExpanded(), isExpandable() and expandedParentsCount(). */ -class LIBDOLPHINPRIVATE_EXPORT KItemModelBase : public QObject +class DOLPHIN_EXPORT KItemModelBase : public QObject { Q_OBJECT diff --git a/src/kitemviews/kstandarditem.h b/src/kitemviews/kstandarditem.h index b1d5edf2e..5bb2bb36f 100644 --- a/src/kitemviews/kstandarditem.h +++ b/src/kitemviews/kstandarditem.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEM_H #define KSTANDARDITEM_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -36,7 +36,7 @@ class KStandardItemModel; * used roles. It is possible to assign values for custom * roles by using setDataValue(). */ -class LIBDOLPHINPRIVATE_EXPORT KStandardItem +class DOLPHIN_EXPORT KStandardItem { public: diff --git a/src/kitemviews/kstandarditemlistgroupheader.h b/src/kitemviews/kstandarditemlistgroupheader.h index caf906ddf..f0eacfd49 100644 --- a/src/kitemviews/kstandarditemlistgroupheader.h +++ b/src/kitemviews/kstandarditemlistgroupheader.h @@ -20,14 +20,14 @@ #ifndef KSTANDARDITEMLISTGROUPHEADER_H #define KSTANDARDITEMLISTGROUPHEADER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include -class LIBDOLPHINPRIVATE_EXPORT KStandardItemListGroupHeader : public KItemListGroupHeader +class DOLPHIN_EXPORT KStandardItemListGroupHeader : public KItemListGroupHeader { Q_OBJECT diff --git a/src/kitemviews/kstandarditemlistview.h b/src/kitemviews/kstandarditemlistview.h index 9fc43a940..2e4c7a0a0 100644 --- a/src/kitemviews/kstandarditemlistview.h +++ b/src/kitemviews/kstandarditemlistview.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEMLISTVIEW_H #define KSTANDARDITEMLISTVIEW_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -40,7 +40,7 @@ * KItemListContainer* container = new KItemListContainer(controller, parentWidget); * */ -class LIBDOLPHINPRIVATE_EXPORT KStandardItemListView : public KItemListView +class DOLPHIN_EXPORT KStandardItemListView : public KItemListView { Q_OBJECT diff --git a/src/kitemviews/kstandarditemlistwidget.h b/src/kitemviews/kstandarditemlistwidget.h index 8e61d06b4..826452255 100644 --- a/src/kitemviews/kstandarditemlistwidget.h +++ b/src/kitemviews/kstandarditemlistwidget.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEMLISTWIDGET_H #define KSTANDARDITEMLISTWIDGET_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -32,7 +32,7 @@ class KItemListRoleEditor; class KItemListStyleOption; class KItemListView; -class LIBDOLPHINPRIVATE_EXPORT KStandardItemListWidgetInformant : public KItemListWidgetInformant +class DOLPHIN_EXPORT KStandardItemListWidgetInformant : public KItemListWidgetInformant { public: KStandardItemListWidgetInformant(); @@ -83,7 +83,7 @@ protected: /** * @brief Itemlist widget implementation for KStandardItemView and KStandardItemModel. */ -class LIBDOLPHINPRIVATE_EXPORT KStandardItemListWidget : public KItemListWidget +class DOLPHIN_EXPORT KStandardItemListWidget : public KItemListWidget { Q_OBJECT diff --git a/src/kitemviews/kstandarditemmodel.h b/src/kitemviews/kstandarditemmodel.h index 3b5f5bd39..58c5a5d88 100644 --- a/src/kitemviews/kstandarditemmodel.h +++ b/src/kitemviews/kstandarditemmodel.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEMMODEL_H #define KSTANDARDITEMMODEL_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include @@ -35,7 +35,7 @@ class KStandardItem; * * @see KStandardItem */ -class LIBDOLPHINPRIVATE_EXPORT KStandardItemModel : public KItemModelBase +class DOLPHIN_EXPORT KStandardItemModel : public KItemModelBase { Q_OBJECT diff --git a/src/kitemviews/private/kbaloorolesprovider.h b/src/kitemviews/private/kbaloorolesprovider.h index ef073a367..9673bff4f 100644 --- a/src/kitemviews/private/kbaloorolesprovider.h +++ b/src/kitemviews/private/kbaloorolesprovider.h @@ -21,7 +21,7 @@ #ifndef KBALOO_ROLESPROVIDER_H #define KBALOO_ROLESPROVIDER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -36,7 +36,7 @@ namespace Baloo { * Is a helper class for KFileItemModelRolesUpdater to retrieve roles that * are only accessible with Baloo. */ -class LIBDOLPHINPRIVATE_EXPORT KBalooRolesProvider +class DOLPHIN_EXPORT KBalooRolesProvider { public: static KBalooRolesProvider& instance(); diff --git a/src/kitemviews/private/kfileitemclipboard.h b/src/kitemviews/private/kfileitemclipboard.h index d02fc0d47..3ee50d661 100644 --- a/src/kitemviews/private/kfileitemclipboard.h +++ b/src/kitemviews/private/kfileitemclipboard.h @@ -25,13 +25,13 @@ #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" /** * @brief Wrapper for QClipboard to provide fast access for checking * whether a KFileItem has been clipped. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemClipboard : public QObject +class DOLPHIN_EXPORT KFileItemClipboard : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kfileitemmodeldirlister.h b/src/kitemviews/private/kfileitemmodeldirlister.h index a9c8c845a..c2c621aed 100644 --- a/src/kitemviews/private/kfileitemmodeldirlister.h +++ b/src/kitemviews/private/kfileitemmodeldirlister.h @@ -20,7 +20,7 @@ #ifndef KFILEITEMMODELDIRLISTER_H #define KFILEITEMMODELDIRLISTER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -29,7 +29,7 @@ * error occurred instead of showing an error dialog. * KDirLister::autoErrorHandlingEnabled() is set to false. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemModelDirLister : public KDirLister +class DOLPHIN_EXPORT KFileItemModelDirLister : public KDirLister { Q_OBJECT diff --git a/src/kitemviews/private/kfileitemmodelfilter.h b/src/kitemviews/private/kfileitemmodelfilter.h index b26e31a00..67c1c280c 100644 --- a/src/kitemviews/private/kfileitemmodelfilter.h +++ b/src/kitemviews/private/kfileitemmodelfilter.h @@ -21,7 +21,7 @@ #ifndef KFILEITEMMODELFILTER_H #define KFILEITEMMODELFILTER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include class KFileItem; @@ -35,7 +35,7 @@ class QRegExp; * property of the KFileItem, but this might get extended in * future. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemModelFilter +class DOLPHIN_EXPORT KFileItemModelFilter { public: diff --git a/src/kitemviews/private/kitemlistheaderwidget.h b/src/kitemviews/private/kitemlistheaderwidget.h index 74c9ac518..307def74d 100644 --- a/src/kitemviews/private/kitemlistheaderwidget.h +++ b/src/kitemviews/private/kitemlistheaderwidget.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTHEADERWIDGET_H #define KITEMLISTHEADERWIDGET_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include @@ -33,7 +33,7 @@ class KItemModelBase; * The widget is an internal API, the user of KItemListView may only access the * class KItemListHeader. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListHeaderWidget : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListHeaderWidget : public QGraphicsWidget { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistkeyboardsearchmanager.h b/src/kitemviews/private/kitemlistkeyboardsearchmanager.h index 1f315dabd..2a14ca470 100644 --- a/src/kitemviews/private/kitemlistkeyboardsearchmanager.h +++ b/src/kitemviews/private/kitemlistkeyboardsearchmanager.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTKEYBOARDSEARCHMANAGER_H #define KITEMLISTKEYBOARDSEARCHMANAGER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -35,7 +35,7 @@ * @see KItemListController * @see KItemModelBase */ -class LIBDOLPHINPRIVATE_EXPORT KItemListKeyboardSearchManager : public QObject +class DOLPHIN_EXPORT KItemListKeyboardSearchManager : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistroleeditor.h b/src/kitemviews/private/kitemlistroleeditor.h index 7c2b61e2d..3b8f96865 100644 --- a/src/kitemviews/private/kitemlistroleeditor.h +++ b/src/kitemviews/private/kitemlistroleeditor.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTROLEEDITOR_H #define KITEMLISTROLEEDITOR_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -33,7 +33,7 @@ * * The size automatically gets increased if the text does not fit. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListRoleEditor : public KTextEdit +class DOLPHIN_EXPORT KItemListRoleEditor : public KTextEdit { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistrubberband.h b/src/kitemviews/private/kitemlistrubberband.h index 39c7573ae..b47c30c1f 100644 --- a/src/kitemviews/private/kitemlistrubberband.h +++ b/src/kitemviews/private/kitemlistrubberband.h @@ -20,14 +20,14 @@ #ifndef KITEMLISTRUBBERBAND_H #define KITEMLISTRUBBERBAND_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include /** * @brief Manages the rubberband when selecting items. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListRubberBand : public QObject +class DOLPHIN_EXPORT KItemListRubberBand : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistselectiontoggle.h b/src/kitemviews/private/kitemlistselectiontoggle.h index bd64879af..d058ee988 100644 --- a/src/kitemviews/private/kitemlistselectiontoggle.h +++ b/src/kitemviews/private/kitemlistselectiontoggle.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTSELECTIONTOGGLE_H #define KITEMLISTSELECTIONTOGGLE_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -29,7 +29,7 @@ /** * @brief Allows to toggle between the selected and unselected state of an item. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListSelectionToggle : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListSelectionToggle : public QGraphicsWidget { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistsizehintresolver.h b/src/kitemviews/private/kitemlistsizehintresolver.h index 3bd2319dd..ff17f2de2 100644 --- a/src/kitemviews/private/kitemlistsizehintresolver.h +++ b/src/kitemviews/private/kitemlistsizehintresolver.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTSIZEHINTRESOLVER_H #define KITEMLISTSIZEHINTRESOLVER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -31,7 +31,7 @@ class KItemListView; /** * @brief Calculates and caches the sizehints of items in KItemListView. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListSizeHintResolver +class DOLPHIN_EXPORT KItemListSizeHintResolver { public: KItemListSizeHintResolver(const KItemListView* itemListView); diff --git a/src/kitemviews/private/kitemlistsmoothscroller.h b/src/kitemviews/private/kitemlistsmoothscroller.h index 963cf7b24..fca4b0c53 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.h +++ b/src/kitemviews/private/kitemlistsmoothscroller.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTSMOOTHSCROLLER_H #define KITEMLISTSMOOTHSCROLLER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -33,7 +33,7 @@ class QWheelEvent; * @brief Helper class for KItemListContainer to have a smooth * scrolling when adjusting the scrollbars. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListSmoothScroller : public QObject +class DOLPHIN_EXPORT KItemListSmoothScroller : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistviewanimation.h b/src/kitemviews/private/kitemlistviewanimation.h index ed4ec4902..06c81c9b8 100644 --- a/src/kitemviews/private/kitemlistviewanimation.h +++ b/src/kitemviews/private/kitemlistviewanimation.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTVIEWANIMATION_H #define KITEMLISTVIEWANIMATION_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -36,7 +36,7 @@ class QPropertyAnimation; * Supports item animations for moving, creating, deleting and resizing * an item. Several applications can be applied to one item in parallel. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListViewAnimation : public QObject +class DOLPHIN_EXPORT KItemListViewAnimation : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistviewlayouter.h b/src/kitemviews/private/kitemlistviewlayouter.h index fc82d6061..3f1cf68d4 100644 --- a/src/kitemviews/private/kitemlistviewlayouter.h +++ b/src/kitemviews/private/kitemlistviewlayouter.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTVIEWLAYOUTER_H #define KITEMLISTVIEWLAYOUTER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -45,7 +45,7 @@ class KItemListSizeHintResolver; * changing properties of the layouter is not expensive, only the * first read of a property can get expensive. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListViewLayouter : public QObject +class DOLPHIN_EXPORT KItemListViewLayouter : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kpixmapmodifier.h b/src/kitemviews/private/kpixmapmodifier.h index b5eec6542..e8ca11ac1 100644 --- a/src/kitemviews/private/kpixmapmodifier.h +++ b/src/kitemviews/private/kpixmapmodifier.h @@ -20,12 +20,12 @@ #ifndef KPIXMAPMODIFIER_H #define KPIXMAPMODIFIER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" class QPixmap; class QSize; -class LIBDOLPHINPRIVATE_EXPORT KPixmapModifier +class DOLPHIN_EXPORT KPixmapModifier { public: static void scale(QPixmap& pixmap, const QSize& scaledSize); diff --git a/src/settings/viewpropertiesdialog.h b/src/settings/viewpropertiesdialog.h index 63c534b30..5490be85b 100644 --- a/src/settings/viewpropertiesdialog.h +++ b/src/settings/viewpropertiesdialog.h @@ -21,7 +21,7 @@ #ifndef VIEWPROPERTIESDIALOG_H #define VIEWPROPERTIESDIALOG_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -39,7 +39,7 @@ class DolphinView; * and previews should be shown. The properties can be assigned to the current folder, * or recursively to all sub folders. */ -class LIBDOLPHINPRIVATE_EXPORT ViewPropertiesDialog : public QDialog +class DOLPHIN_EXPORT ViewPropertiesDialog : public QDialog { Q_OBJECT diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 1c6c5b40c..22a8b4849 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -4,7 +4,7 @@ find_package(Qt5Test CONFIG REQUIRED) include(ECMMarkAsTest) # needed on windows to correctly use the files from dolphinprivate -add_definitions(-DLIBDOLPHINPRIVATE_EXPORT=) +add_definitions(-DDOLPHIN_EXPORT=) # KItemSetTest set(kitemsettest_SRCS diff --git a/src/views/dolphinfileitemlistwidget.cpp b/src/views/dolphinfileitemlistwidget.cpp index e8345435e..f15230841 100644 --- a/src/views/dolphinfileitemlistwidget.cpp +++ b/src/views/dolphinfileitemlistwidget.cpp @@ -21,7 +21,6 @@ #include #include -#include #include #include "dolphindebug.h" @@ -43,7 +42,7 @@ void DolphinFileItemListWidget::refreshCache() if (values.contains("version")) { // The item is under version control. Apply the text color corresponding // to its version state. - const KVersionControlPlugin2::ItemVersion version = static_cast(values.value("version").toInt()); + const KVersionControlPlugin::ItemVersion version = static_cast(values.value("version").toInt()); const QColor textColor = styleOption().palette.text().color(); QColor tintColor = textColor; @@ -51,16 +50,16 @@ void DolphinFileItemListWidget::refreshCache() // as tint colors and are mixed with the current set text color. The tint colors // have been optimized for the base colors of the corresponding Oxygen emblems. switch (version) { - case KVersionControlPlugin2::UpdateRequiredVersion: tintColor = Qt::yellow; break; - case KVersionControlPlugin2::LocallyModifiedUnstagedVersion: tintColor = Qt::green; break; - case KVersionControlPlugin2::LocallyModifiedVersion: tintColor = Qt::green; break; - case KVersionControlPlugin2::AddedVersion: tintColor = Qt::green; break; - case KVersionControlPlugin2::RemovedVersion: tintColor = Qt::darkRed; break; - case KVersionControlPlugin2::ConflictingVersion: tintColor = Qt::red; break; - case KVersionControlPlugin2::IgnoredVersion: tintColor = Qt::white; break; - case KVersionControlPlugin2::MissingVersion: tintColor = Qt::red; break; - case KVersionControlPlugin2::NormalVersion: - case KVersionControlPlugin2::UnversionedVersion: + case KVersionControlPlugin::UpdateRequiredVersion: tintColor = Qt::yellow; break; + case KVersionControlPlugin::LocallyModifiedUnstagedVersion: tintColor = Qt::green; break; + case KVersionControlPlugin::LocallyModifiedVersion: tintColor = Qt::green; break; + case KVersionControlPlugin::AddedVersion: tintColor = Qt::green; break; + case KVersionControlPlugin::RemovedVersion: tintColor = Qt::darkRed; break; + case KVersionControlPlugin::ConflictingVersion: tintColor = Qt::red; break; + case KVersionControlPlugin::IgnoredVersion: tintColor = Qt::white; break; + case KVersionControlPlugin::MissingVersion: tintColor = Qt::red; break; + case KVersionControlPlugin::NormalVersion: + case KVersionControlPlugin::UnversionedVersion: default: break; } @@ -78,7 +77,7 @@ void DolphinFileItemListWidget::refreshCache() setTextColor(color); } -QPixmap DolphinFileItemListWidget::overlayForState(KVersionControlPlugin2::ItemVersion version, int size) +QPixmap DolphinFileItemListWidget::overlayForState(KVersionControlPlugin::ItemVersion version, int size) { int overlayHeight = KIconLoader::SizeSmall; if (size >= KIconLoader::SizeEnormous) { @@ -115,8 +114,8 @@ QPixmap DolphinFileItemListWidget::overlayForState(KVersionControlPlugin2::ItemV iconName = "vcs-conflicting"; break; case KVersionControlPlugin::UnversionedVersion: - case KVersionControlPlugin2::IgnoredVersion: - case KVersionControlPlugin2::MissingVersion: + case KVersionControlPlugin::IgnoredVersion: + case KVersionControlPlugin::MissingVersion: break; default: Q_ASSERT(false); diff --git a/src/views/dolphinfileitemlistwidget.h b/src/views/dolphinfileitemlistwidget.h index 5f9cc3a5a..af73ac937 100644 --- a/src/views/dolphinfileitemlistwidget.h +++ b/src/views/dolphinfileitemlistwidget.h @@ -20,10 +20,10 @@ #ifndef DOLPHINFILEITEMLISTWIDGET_H #define DOLPHINFILEITEMLISTWIDGET_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include -#include +#include "versioncontrol/kversioncontrolplugin.h" /** * @brief Extends KFileItemListWidget to handle the "version" role. @@ -31,7 +31,7 @@ * The "version" role is set if version-control-plugins have been enabled. * @see KVersionControlPlugin */ -class LIBDOLPHINPRIVATE_EXPORT DolphinFileItemListWidget : public KFileItemListWidget +class DOLPHIN_EXPORT DolphinFileItemListWidget : public KFileItemListWidget { Q_OBJECT @@ -43,7 +43,7 @@ protected: virtual void refreshCache() Q_DECL_OVERRIDE; private: - static QPixmap overlayForState(KVersionControlPlugin2::ItemVersion version, int size); + static QPixmap overlayForState(KVersionControlPlugin::ItemVersion version, int size); }; diff --git a/src/views/dolphinitemlistview.h b/src/views/dolphinitemlistview.h index 2b16825f4..7eec6f17a 100644 --- a/src/views/dolphinitemlistview.h +++ b/src/views/dolphinitemlistview.h @@ -23,7 +23,7 @@ #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" class KFileItemListView; @@ -34,7 +34,7 @@ class KFileItemListView; * the view-properties into the corresponding KItemListView * properties. */ -class LIBDOLPHINPRIVATE_EXPORT DolphinItemListView : public KFileItemListView +class DOLPHIN_EXPORT DolphinItemListView : public KFileItemListView { Q_OBJECT diff --git a/src/views/dolphinnewfilemenuobserver.h b/src/views/dolphinnewfilemenuobserver.h index b9b18e229..df4621f17 100644 --- a/src/views/dolphinnewfilemenuobserver.h +++ b/src/views/dolphinnewfilemenuobserver.h @@ -22,7 +22,7 @@ #include -#include "libdolphin_export.h" +#include "dolphin_export.h" class DolphinNewFileMenu; @@ -33,7 +33,7 @@ class DolphinNewFileMenu; * As soon as a DolphinNewFileMenu instance created a new item, * the observer will emit the signal itemCreated(). */ -class LIBDOLPHINPRIVATE_EXPORT DolphinNewFileMenuObserver : public QObject +class DOLPHIN_EXPORT DolphinNewFileMenuObserver : public QObject { Q_OBJECT diff --git a/src/views/dolphinremoteencoding.h b/src/views/dolphinremoteencoding.h index 0351abad7..28ff52cb3 100644 --- a/src/views/dolphinremoteencoding.h +++ b/src/views/dolphinremoteencoding.h @@ -23,7 +23,7 @@ #include #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" class KActionMenu; @@ -35,7 +35,7 @@ class DolphinViewActionHandler; * When browsing remote url, its possible to change encoding from Tools Menu. */ -class LIBDOLPHINPRIVATE_EXPORT DolphinRemoteEncoding: public QObject +class DOLPHIN_EXPORT DolphinRemoteEncoding: public QObject { Q_OBJECT public: diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index aa4492bc3..24b560f10 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -23,7 +23,7 @@ #include -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -57,7 +57,7 @@ class QRegExp; * - show previews * - enable grouping */ -class LIBDOLPHINPRIVATE_EXPORT DolphinView : public QWidget +class DOLPHIN_EXPORT DolphinView : public QWidget { Q_OBJECT diff --git a/src/views/dolphinviewactionhandler.h b/src/views/dolphinviewactionhandler.h index bf664f731..eb375b5c9 100644 --- a/src/views/dolphinviewactionhandler.h +++ b/src/views/dolphinviewactionhandler.h @@ -22,7 +22,7 @@ #ifndef DOLPHINVIEWACTIONHANDLER_H #define DOLPHINVIEWACTIONHANDLER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include "views/dolphinview.h" #include @@ -46,7 +46,7 @@ class KActionCollection; * @see DolphinMainWindow * @see DolphinPart */ -class LIBDOLPHINPRIVATE_EXPORT DolphinViewActionHandler : public QObject +class DOLPHIN_EXPORT DolphinViewActionHandler : public QObject { Q_OBJECT diff --git a/src/views/draganddrophelper.h b/src/views/draganddrophelper.h index 0fbe3a128..fe77b1e6e 100644 --- a/src/views/draganddrophelper.h +++ b/src/views/draganddrophelper.h @@ -21,7 +21,7 @@ #ifndef DRAGANDDROPHELPER_H #define DRAGANDDROPHELPER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" class QUrl; @@ -29,7 +29,7 @@ class QDropEvent; class QWidget; namespace KIO { class DropJob; } -class LIBDOLPHINPRIVATE_EXPORT DragAndDropHelper +class DOLPHIN_EXPORT DragAndDropHelper { public: /** diff --git a/src/views/renamedialog.h b/src/views/renamedialog.h index 7c02d1b87..a1953e8b3 100644 --- a/src/views/renamedialog.h +++ b/src/views/renamedialog.h @@ -20,7 +20,7 @@ #ifndef RENAMEDIALOG_H #define RENAMEDIALOG_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -33,7 +33,7 @@ class QPushButton; /** * @brief Dialog for renaming a variable number of files. */ -class LIBDOLPHINPRIVATE_EXPORT RenameDialog : public QDialog +class DOLPHIN_EXPORT RenameDialog : public QDialog { Q_OBJECT diff --git a/src/views/versioncontrol/kversioncontrolplugin.cpp b/src/views/versioncontrol/kversioncontrolplugin.cpp new file mode 100644 index 000000000..2c0632878 --- /dev/null +++ b/src/views/versioncontrol/kversioncontrolplugin.cpp @@ -0,0 +1,29 @@ +/***************************************************************************** + * Copyright (C) 2011 by Vishesh Yadav * + * Copyright (C) 2011 by Peter Penz * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License version 2 as published by the Free Software Foundation. * + * * + * This library 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 * + * Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public License * + * along with this library; see the file COPYING.LIB. If not, write to * + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301, USA. * + *****************************************************************************/ + +#include "kversioncontrolplugin.h" + +KVersionControlPlugin::KVersionControlPlugin(QObject* parent) : + QObject(parent) +{ +} + +KVersionControlPlugin::~KVersionControlPlugin() +{ +} diff --git a/src/views/versioncontrol/kversioncontrolplugin.h b/src/views/versioncontrol/kversioncontrolplugin.h new file mode 100644 index 000000000..e5a267848 --- /dev/null +++ b/src/views/versioncontrol/kversioncontrolplugin.h @@ -0,0 +1,223 @@ +/***************************************************************************** + * Copyright (C) 2011 by Vishesh Yadav * + * Copyright (C) 2011 by Peter Penz * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License version 2 as published by the Free Software Foundation. * + * * + * This library 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 * + * Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public License * + * along with this library; see the file COPYING.LIB. If not, write to * + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301, USA. * + *****************************************************************************/ + +#ifndef KVERSIONCONTROLPLUGIN_H +#define KVERSIONCONTROLPLUGIN_H + +#include + +#include +#include +#include + +/** + * @brief Base class for version control plugins. + * + * Enables the file manager to show the version state + * of a versioned file. To write a custom plugin, the following + * steps are required (in the example below it is assumed that a plugin for + * Subversion will be written): + * + * - Create a fileviewsvnplugin.desktop file with the following content: + * + * [Desktop Entry] + * Type=Service + * Name=Subversion + * X-KDE-ServiceTypes=FileViewVersionControlPlugin + * MimeType=text/plain; + * X-KDE-Library=fileviewsvnplugin + * + * + * - Create a class FileViewSvnPlugin derived from KVersionControlPlugin and + * implement all abstract interfaces (fileviewsvnplugin.h, fileviewsvnplugin.cpp). + * + * - Take care that the constructor has the following signature: + * + * FileViewSvnPlugin(QObject* parent, const QList& args); + * + * + * - Add the following lines at the top of fileviewsvnplugin.cpp: + * + * #include + * #include + * K_PLUGIN_FACTORY(FileViewSvnPluginFactory, registerPlugin();) + * K_EXPORT_PLUGIN(FileViewSvnPluginFactory("fileviewsvnplugin")) + * + * + * - Add the following lines to your CMakeLists.txt file: + * + * kde4_add_plugin(fileviewsvnplugin fileviewsvnplugin.cpp) + * target_link_libraries(fileviewsvnplugin konq) + * install(FILES fileviewsvnplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR}) + * + * + * General implementation notes: + * + * - The implementations of beginRetrieval(), endRetrieval() and versionState() + * can contain blocking operations, as Dolphin will execute + * those methods in a separate thread. It is assured that + * all other methods are invoked in a serialized way, so that it is not necessary for + * the plugin to use any mutex. + * + * - Dolphin keeps only one instance of the plugin, which is instantiated shortly after + * starting Dolphin. Take care that the constructor does no expensive and time + * consuming operations. + * + * @since 4.8 + */ +class DOLPHIN_EXPORT KVersionControlPlugin : public QObject +{ + Q_OBJECT + +public: + enum ItemVersion + { + /** The file is not under version control. */ + UnversionedVersion, + /** + * The file is under version control and represents + * the latest version. + */ + NormalVersion, + /** + * The file is under version control and a newer + * version exists on the main branch. + */ + UpdateRequiredVersion, + /** + * The file is under version control and has been + * modified locally. All modifications will be part + * of the next commit. + */ + LocallyModifiedVersion, + /** + * The file has not been under version control but + * has been marked to get added with the next commit. + */ + AddedVersion, + /** + * The file is under version control but has been marked + * for getting removed with the next commit. + */ + RemovedVersion, + /** + * The file is under version control and has been locally + * modified. A modification has also been done on the main + * branch. + */ + ConflictingVersion, + /** + * The file is under version control and has local + * modifications, which will not be part of the next + * commit (or are "unstaged" in git jargon). + * @since 4.6 + */ + LocallyModifiedUnstagedVersion, + /** + * The file is not under version control and is listed + * in the ignore list of the version control system. + * @since 4.8 + */ + IgnoredVersion, + /** + * The file is is tracked by the version control system, but + * is missing in the directory (e.g. by deleted without using + * a version control command). + * @since 4.8 + */ + MissingVersion + }; + + KVersionControlPlugin(QObject* parent = 0); + virtual ~KVersionControlPlugin(); + + /** + * Returns the name of the file which stores + * the version controls information. + * (e. g. .svn, .cvs, .git). + */ + virtual QString fileName() const = 0; + + /** + * Is invoked whenever the version control + * information will get retrieved for the directory + * \p directory. It is assured that the directory + * contains a trailing slash. + */ + virtual bool beginRetrieval(const QString& directory) = 0; + + /** + * Is invoked after the version control information has been + * received. It is assured that + * KVersionControlPluginV2::beginInfoRetrieval() has been + * invoked before. + */ + virtual void endRetrieval() = 0; + + /** + * @return The version for the item \p item. + * It is assured that KVersionControlPlugin::beginInfoRetrieval() has been + * invoked before and that the file is part of the directory specified + * in beginInfoRetrieval(). + */ + virtual ItemVersion itemVersion(const KFileItem& item) const = 0; + + /** + * @return List of actions that are available for the items \p items. + * It is recommended to keep the number of returned actions small + * in case if an item is an unversioned directory that is not + * inside the hierarchy tree of the version control system. This + * prevents having a cluttered context menu for directories + * outside the version control system. + */ + virtual QList actions(const KFileItemList& items) const = 0; + +Q_SIGNALS: + /** + * Should be emitted when the version state of items might have been changed + * after the last retrieval (e. g. by executing a context menu action + * of the version control plugin). The file manager will be triggered to + * update the version states of the directory \p directory by invoking + * KVersionControlPlugin::beginRetrieval(), + * KVersionControlPlugin::itemVersion() and + * KVersionControlPlugin::endRetrieval(). + */ + void itemVersionsChanged(); + + /** + * Is emitted if an information message with the content \a msg + * should be shown. + */ + void infoMessage(const QString& msg); + + /** + * Is emitted if an error message with the content \a msg + * should be shown. + */ + void errorMessage(const QString& msg); + + /** + * Is emitted if an "operation completed" message with the content \a msg + * should be shown. + */ + void operationCompletedMessage(const QString& msg); +}; + +#endif // KVERSIONCONTROLPLUGIN_H + diff --git a/src/views/versioncontrol/updateitemstatesthread.cpp b/src/views/versioncontrol/updateitemstatesthread.cpp index 4f0122e0f..e4413fabf 100644 --- a/src/views/versioncontrol/updateitemstatesthread.cpp +++ b/src/views/versioncontrol/updateitemstatesthread.cpp @@ -19,9 +19,7 @@ #include "updateitemstatesthread.h" -#include #include - #include UpdateItemStatesThread::UpdateItemStatesThread(KVersionControlPlugin* plugin, @@ -53,20 +51,10 @@ void UpdateItemStatesThread::run() if (m_plugin->beginRetrieval(it.key())) { QVector& items = it.value(); const int count = items.count(); - - KVersionControlPlugin2* pluginV2 = qobject_cast(m_plugin); - if (pluginV2) { - for (int i = 0; i < count; ++i) { - const KFileItem& item = items.at(i).first; - const KVersionControlPlugin2::ItemVersion version = pluginV2->itemVersion(item); - items[i].second = version; - } - } else { - for (int i = 0; i < count; ++i) { - const KFileItem& item = items.at(i).first; - const KVersionControlPlugin::VersionState state = m_plugin->versionState(item); - items[i].second = static_cast(state); - } + for (int i = 0; i < count; ++i) { + const KFileItem& item = items.at(i).first; + const KVersionControlPlugin::ItemVersion version = m_plugin->itemVersion(item); + items[i].second = version; } } diff --git a/src/views/versioncontrol/updateitemstatesthread.h b/src/views/versioncontrol/updateitemstatesthread.h index 92a9d59c9..3dc03fc75 100644 --- a/src/views/versioncontrol/updateitemstatesthread.h +++ b/src/views/versioncontrol/updateitemstatesthread.h @@ -20,20 +20,18 @@ #ifndef UPDATEITEMSTATESTHREAD_H #define UPDATEITEMSTATESTHREAD_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include -class KVersionControlPlugin; - /** * The performance of updating the version state of items depends * on the used plugin. To prevent that Dolphin gets blocked by a * slow plugin, the updating is delegated to a thread. */ -class LIBDOLPHINPRIVATE_EXPORT UpdateItemStatesThread : public QThread +class DOLPHIN_EXPORT UpdateItemStatesThread : public QThread { Q_OBJECT diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index 47e3da357..13481cc7a 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -26,7 +26,6 @@ #include "dolphindebug.h" #include #include -#include #include "updateitemstatesthread.h" @@ -89,8 +88,6 @@ KFileItemModel* VersionControlObserver::model() const QList VersionControlObserver::actions(const KFileItemList& items) const { - QList actions; - bool hasNullItems = false; foreach (const KFileItem& item, items) { if (item.isNull()) { @@ -101,30 +98,10 @@ QList VersionControlObserver::actions(const KFileItemList& items) cons } if (!m_model || hasNullItems) { - return actions; - } - - KVersionControlPlugin2* pluginV2 = qobject_cast(m_plugin); - if (pluginV2) { - // Use version 2 of the KVersionControlPlugin which allows providing actions - // also for non-versioned directories. - actions = pluginV2->actions(items); - } else if (isVersioned()) { - // Support deprecated interfaces from KVersionControlPlugin version 1. - // Context menu actions where only available for versioned directories. - QString directory; - if (items.count() == 1) { - const KFileItem rootItem = m_model->rootItem(); - if (!rootItem.isNull() && items.first().url() == rootItem.url()) { - directory = rootItem.url().path(); - } - } - - actions = directory.isEmpty() ? m_plugin->contextMenuActions(items) - : m_plugin->contextMenuActions(directory); + return {}; } - return actions; + return m_plugin->actions(items); } void VersionControlObserver::delayedDirectoryVerification() @@ -156,14 +133,8 @@ void VersionControlObserver::verifyDirectory() m_plugin = searchPlugin(rootItem.url()); if (m_plugin) { - KVersionControlPlugin2* pluginV2 = qobject_cast(m_plugin); - if (pluginV2) { - connect(pluginV2, &KVersionControlPlugin2::itemVersionsChanged, - this, &VersionControlObserver::silentDirectoryVerification); - } else { - connect(m_plugin, &KVersionControlPlugin::versionStatesChanged, - this, &VersionControlObserver::silentDirectoryVerification); - } + connect(m_plugin, &KVersionControlPlugin::itemVersionsChanged, + this, &VersionControlObserver::silentDirectoryVerification); connect(m_plugin, &KVersionControlPlugin::infoMessage, this, &VersionControlObserver::infoMessage); connect(m_plugin, &KVersionControlPlugin::errorMessage, @@ -205,7 +176,7 @@ void VersionControlObserver::slotThreadFinished() foreach (const ItemState& item, items) { const KFileItem& fileItem = item.first; - const KVersionControlPlugin2::ItemVersion version = item.second; + const KVersionControlPlugin::ItemVersion version = item.second; QHash values; values.insert("version", QVariant(version)); m_model->setData(m_model->index(fileItem), values); @@ -268,7 +239,7 @@ int VersionControlObserver::createItemStatesList(QMapfileItem(index); - itemState.second = KVersionControlPlugin2::UnversionedVersion; + itemState.second = KVersionControlPlugin::UnversionedVersion; items.append(itemState); } else if (expansionLevel > currentExpansionLevel) { diff --git a/src/views/versioncontrol/versioncontrolobserver.h b/src/views/versioncontrol/versioncontrolobserver.h index a43dc3415..c817c2187 100644 --- a/src/views/versioncontrol/versioncontrolobserver.h +++ b/src/views/versioncontrol/versioncontrolobserver.h @@ -20,11 +20,13 @@ #ifndef VERSIONCONTROLOBSERVER_H #define VERSIONCONTROLOBSERVER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" + +#include "kversioncontrolplugin.h" #include + #include -#include #include #include #include @@ -43,7 +45,7 @@ class UpdateItemStatesThread; * * @see VersionControlPlugin */ -class LIBDOLPHINPRIVATE_EXPORT VersionControlObserver : public QObject +class DOLPHIN_EXPORT VersionControlObserver : public QObject { Q_OBJECT @@ -100,7 +102,7 @@ private slots: void slotThreadFinished(); private: - typedef QPair ItemState; + typedef QPair ItemState; void updateItemStates(); diff --git a/src/views/viewmodecontroller.h b/src/views/viewmodecontroller.h index 89f1020b5..4b1ff2083 100644 --- a/src/views/viewmodecontroller.h +++ b/src/views/viewmodecontroller.h @@ -22,7 +22,7 @@ #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" #include /** @@ -33,7 +33,7 @@ * connect to signals of the ViewModeController to react on changes. The view * implementations get only read-access to the ViewModeController. */ -class LIBDOLPHINPRIVATE_EXPORT ViewModeController : public QObject +class DOLPHIN_EXPORT ViewModeController : public QObject { Q_OBJECT diff --git a/src/views/viewproperties.h b/src/views/viewproperties.h index b9c2fa546..dc118e2d7 100644 --- a/src/views/viewproperties.h +++ b/src/views/viewproperties.h @@ -23,7 +23,7 @@ #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" class ViewPropertySettings; /** @@ -47,7 +47,7 @@ class ViewPropertySettings; * (see GeneralSettings::globalViewMode()), the values from the global .directory file * are used for initialization. */ -class LIBDOLPHINPRIVATE_EXPORT ViewProperties +class DOLPHIN_EXPORT ViewProperties { public: explicit ViewProperties(const QUrl& url); -- cgit v1.3.1 From aca62bee91684f0b4b8ebd603bfd102dbefb814a Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 25 Feb 2015 21:40:24 +0100 Subject: Fix DolphinVcs cmake to be findable Reviewed-By: Emmanuel Pescosta --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a3ab6d4c..5a007f302 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ set(DOLPHIN_VERSION "4.97.0") include(ECMSetupVersion) include(ECMGenerateHeaders) +include(ECMPackageConfigHelpers) include(GenerateExportHeader) include(FeatureSummary) include(KDEInstallDirs) @@ -60,7 +61,7 @@ add_subdirectory(src) add_subdirectory(docs) # CMake files -set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Dolphin") +set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/DolphinVcs") ecm_configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/DolphinVcsConfig.cmake.in" -- cgit v1.3.1 From 8a7d9b6d2c308563397d13f5e9430334201620bb Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Wed, 25 Feb 2015 21:45:19 +0100 Subject: Bump the Qt version to 5.4 and the KF5 version to 5.7 Added all required components Reviewed-By: David Edmundson --- CMakeLists.txt | 38 +++++++++++++++++++++++++++++++++----- src/CMakeLists.txt | 2 +- src/main.cpp | 2 +- 3 files changed, 35 insertions(+), 7 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a007f302..f31def98e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,12 +2,16 @@ cmake_minimum_required(VERSION 2.8.12) project(Dolphin) +set(DOLPHIN_VERSION "14.12.95") + +set(QT_MIN_VERSION "5.4.0") +set(KF5_MIN_VERSION "5.7.0") +set(ECM_MIN_VERSION "1.6.0") + # ECM setup -find_package(ECM 1.6.0 CONFIG REQUIRED) +find_package(ECM ${ECM_MIN_VERSION} CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) -set(DOLPHIN_VERSION "4.97.0") - include(ECMSetupVersion) include(ECMGenerateHeaders) include(ECMPackageConfigHelpers) @@ -27,8 +31,32 @@ ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE SOVERSION 5 ) -find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff CoreAddons I18n DBusAddons) -find_package(KF5 COMPONENTS Activities) +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Widgets + Gui + DBus + Test +) + +find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS + DocTools + Init + KCMUtils + KDELibs4Support + NewStuff + CoreAddons + I18n + DBusAddons + Bookmarks + Config + KIO + Parts + Solid +) +find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS + Activities +) find_package(Phonon4Qt5 CONFIG REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2b65671da..94aa5a51c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,7 +3,7 @@ configure_file(config-baloo.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-baloo.h) configure_file(config-dolphin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-dolphin.h) -add_definitions(-DTRANSLATION_DOMAIN=\"dolphin\") +add_definitions(-DTRANSLATION_DOMAIN=\"dolphin\" -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_URL_CAST_FROM_STRING) if(X11_Xrender_FOUND) diff --git a/src/main.cpp b/src/main.cpp index b8eb9a556..e8d6c2d29 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -41,7 +41,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) app.setWindowIcon(QIcon::fromTheme("system-file-manager")); - KAboutData aboutData("dolphin", i18n("Dolphin"), "4.60", + KAboutData aboutData("dolphin", i18n("Dolphin"), "14.12.95", i18nc("@title", "File Manager"), KAboutLicense::GPL, i18nc("@info:credit", "(C) 2006-2014 Peter Penz, Frank Reininghaus, and Emmanuel Pescosta")); -- cgit v1.3.1 From 832e157ecd1a1640b82425358b20fff416a2f8b7 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Thu, 26 Feb 2015 17:40:06 +0100 Subject: Port away from KDELibs4Support (we only use KDELibs4Support when baloo isn't present, because KFileMetaDataWidget is in KDELibs4Support) Reviewed-By: Vishesh Handa --- CMakeLists.txt | 10 +++++- src/CMakeLists.txt | 47 ++++++++++++++++++------- src/dolphinmainwindow.cpp | 6 ++-- src/dolphinmainwindow.h | 4 +-- src/dolphinpart.cpp | 7 ++-- src/kitemviews/kitemlistcontroller.cpp | 7 ++-- src/panels/folders/folderspanel.cpp | 4 +-- src/panels/folders/treeviewcontextmenu.cpp | 3 +- src/panels/places/placesitemeditdialog.cpp | 1 - src/panels/places/placesitemmodel.cpp | 2 -- src/search/dolphinsearchbox.cpp | 18 ++++++---- src/settings/startup/startupsettingspage.cpp | 4 +-- src/settings/viewmodes/dolphinfontrequester.cpp | 10 +++--- src/settings/viewpropertiesdialog.cpp | 1 - src/tests/kfileitemlistviewtest.cpp | 2 +- src/tests/kfileitemmodelbenchmark.cpp | 10 +++--- src/tests/kfileitemmodeltest.cpp | 10 +++--- src/tests/kitemlistcontrollertest.cpp | 4 +-- src/views/dolphinview.cpp | 1 - src/views/renamedialog.cpp | 1 - 20 files changed, 96 insertions(+), 56 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f31def98e..9c2b109af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS DocTools Init KCMUtils - KDELibs4Support NewStuff CoreAddons I18n @@ -53,6 +52,11 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS KIO Parts Solid + IconThemes + Completion + TextEditor + WindowSystem + Notifications ) find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS Activities @@ -83,6 +87,10 @@ set_package_properties(KF5FileMetaData PROPERTIES if (KF5Baloo_FOUND AND KF5BalooWidgets_FOUND AND KF5FileMetaData_FOUND) message(STATUS "Baloo packages are found") set(HAVE_BALOO TRUE) +else() + find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS + KDELibs4Support # for KFileMetaDataWidget + ) endif() add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1b04a642b..9ea45e34b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,8 +3,18 @@ configure_file(config-baloo.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-baloo.h) configure_file(config-dolphin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-dolphin.h) -add_definitions(-DTRANSLATION_DOMAIN=\"dolphin\" -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) -remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_URL_CAST_FROM_STRING) +add_definitions( + -DTRANSLATION_DOMAIN=\"dolphin\" + -DQT_USE_FAST_CONCATENATION + -DQT_USE_FAST_OPERATOR_PLUS +) +remove_definitions( + -DQT_NO_CAST_FROM_BYTEARRAY + -DQT_NO_URL_CAST_FROM_STRING + -DQT_NO_SIGNALS_SLOTS_KEYWORDS + -DQT_NO_CAST_FROM_ASCII + -DQT_NO_CAST_TO_ASCII +) if(X11_Xrender_FOUND) set(HAVE_XRENDER TRUE) @@ -132,7 +142,16 @@ add_library(dolphinprivate ${dolphinprivate_LIB_SRCS}) target_link_libraries( dolphinprivate PUBLIC dolphinvcs - KF5::KDELibs4Support + Qt5::Gui + KF5::I18n + KF5::IconThemes + KF5::KIOCore + KF5::KIOWidgets + KF5::KIOFileWidgets + KF5::Completion + KF5::TextEditor + KF5::WindowSystem + KF5::ConfigCore KF5::NewStuff ) @@ -143,6 +162,11 @@ if(HAVE_BALOO) KF5::Baloo KF5::BalooWidgets ) +else() + target_link_libraries( + dolphinprivate PUBLIC + KF5::KDELibs4Support # for KFileMetaDataWidget + ) endif() if(X11_Xrender_FOUND) @@ -168,7 +192,6 @@ add_library(dolphinpart MODULE ${dolphinpart_SRCS}) target_link_libraries(dolphinpart dolphinprivate - KF5::KDELibs4Support ) install(TARGETS dolphinpart DESTINATION ${PLUGIN_INSTALL_DIR}) @@ -261,16 +284,14 @@ target_include_directories(kdeinit_dolphin PRIVATE ${PHONON_INCLUDES}) target_link_libraries(kdeinit_dolphin dolphinprivate - KF5::NewStuff KF5::Parts KF5::KCMUtils KF5::Solid - KF5::KIOFileWidgets - Phonon::phonon4qt5 - KF5::KDELibs4Support - KF5::I18n KF5::CoreAddons KF5::DBusAddons + KF5::Bookmarks + KF5::Notifications + Phonon::phonon4qt5 ) if (KF5Activities_FOUND) @@ -338,10 +359,10 @@ add_library(kcm_dolphinnavigation MODULE ${kcm_dolphinnavigation_PART_SRCS}) add_library(kcm_dolphinservices MODULE ${kcm_dolphinservices_PART_SRCS}) add_library(kcm_dolphingeneral MODULE ${kcm_dolphingeneral_PART_SRCS}) -target_link_libraries(kcm_dolphinviewmodes KF5::KDELibs4Support dolphinprivate) -target_link_libraries(kcm_dolphinnavigation KF5::KDELibs4Support dolphinprivate) -target_link_libraries(kcm_dolphinservices KF5::KDELibs4Support dolphinprivate) -target_link_libraries(kcm_dolphingeneral KF5::KDELibs4Support dolphinprivate) +target_link_libraries(kcm_dolphinviewmodes dolphinprivate) +target_link_libraries(kcm_dolphinnavigation dolphinprivate) +target_link_libraries(kcm_dolphinservices dolphinprivate) +target_link_libraries(kcm_dolphingeneral dolphinprivate) install(TARGETS kcm_dolphinviewmodes DESTINATION ${PLUGIN_INSTALL_DIR} ) install(TARGETS kcm_dolphinnavigation DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 0ee6e5c2c..1eda03e3c 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -687,7 +686,10 @@ void DolphinMainWindow::openTerminal() // If the given directory is not local, it can still be the URL of an // ioslave using UDS_LOCAL_PATH which to be converted first. - QUrl url = KIO::NetAccess::mostLocalUrl(m_activeViewContainer->url(), this); + KIO::StatJob* statJob = KIO::mostLocalUrl(m_activeViewContainer->url()); + KJobWidgets::setWindow(statJob, this); + statJob->exec(); + QUrl url = statJob->mostLocalUrl(); //If the URL is local after the above conversion, set the directory. if (url.isLocalFile()) { diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index e3188aee5..5066657ef 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -31,7 +31,7 @@ #include #include -#include +#include typedef KIO::FileUndoManager::CommandType CommandType; @@ -493,7 +493,7 @@ private: DolphinViewActionHandler* m_actionHandler; DolphinRemoteEncoding* m_remoteEncoding; - QWeakPointer m_settingsDialog; + QPointer m_settingsDialog; // Members for the toolbar menu that is shown when the menubar is hidden: QToolButton* m_controlButton; diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 35f328be5..ea0ffd92c 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include #include "dolphinpart_ext.h" #include "dolphinnewfilemenu.h" @@ -541,7 +541,10 @@ void DolphinPart::slotOpenTerminal() // If the given directory is not local, it can still be the URL of an // ioslave using UDS_LOCAL_PATH which to be converted first. - u = KIO::NetAccess::mostLocalUrl(u, widget()); + KIO::StatJob* statJob = KIO::mostLocalUrl(u); + KJobWidgets::setWindow(statJob, widget()); + statJob->exec(); + u = statJob->mostLocalUrl(); //If the URL is local after the above conversion, set the directory. if (u.isLocalFile()) { diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index 6c32e4b37..a9ebf97af 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -917,7 +917,8 @@ bool KItemListController::dropEvent(QGraphicsSceneDragDropEvent* event, const QT emit itemDropEvent(m_view->itemAt(pos), event); } - QAccessible::updateAccessibility(view(), 0, QAccessible::DragDropEnd); + QAccessibleEvent accessibilityEvent(view(), QAccessible::DragDropEnd); + QAccessible::updateAccessibility(&accessibilityEvent); return true; } @@ -1171,7 +1172,9 @@ void KItemListController::startDragging() drag->setHotSpot(hotSpot); drag->exec(Qt::MoveAction | Qt::CopyAction | Qt::LinkAction, Qt::CopyAction); - QAccessible::updateAccessibility(view(), 0, QAccessible::DragDropStart); + + QAccessibleEvent accessibilityEvent(view(), QAccessible::DragDropStart); + QAccessible::updateAccessibility(&accessibilityEvent); } KItemListWidget* KItemListController::hoveredWidget() const diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index e99c673bc..13df9019b 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -208,7 +208,7 @@ void FoldersPanel::slotItemContextMenuRequested(int index, const QPointF& pos) const KFileItem fileItem = m_model->fileItem(index); - QWeakPointer contextMenu = new TreeViewContextMenu(this, fileItem); + QPointer contextMenu = new TreeViewContextMenu(this, fileItem); contextMenu.data()->open(); if (contextMenu.data()) { delete contextMenu.data(); @@ -219,7 +219,7 @@ void FoldersPanel::slotViewContextMenuRequested(const QPointF& pos) { Q_UNUSED(pos); - QWeakPointer contextMenu = new TreeViewContextMenu(this, KFileItem()); + QPointer contextMenu = new TreeViewContextMenu(this, KFileItem()); contextMenu.data()->open(); if (contextMenu.data()) { delete contextMenu.data(); diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp index bbdf783cd..e45fcd67e 100644 --- a/src/panels/folders/treeviewcontextmenu.cpp +++ b/src/panels/folders/treeviewcontextmenu.cpp @@ -42,6 +42,7 @@ #include #include #include +#include TreeViewContextMenu::TreeViewContextMenu(FoldersPanel* parent, const KFileItem& fileInfo) : @@ -148,7 +149,7 @@ void TreeViewContextMenu::open() } } - QWeakPointer popupPtr = popup; + QPointer popupPtr = popup; popup->exec(QCursor::pos()); if (popupPtr.data()) { popupPtr.data()->deleteLater(); diff --git a/src/panels/places/placesitemeditdialog.cpp b/src/panels/places/placesitemeditdialog.cpp index d5ca4bf4f..d035b0403 100644 --- a/src/panels/places/placesitemeditdialog.cpp +++ b/src/panels/places/placesitemeditdialog.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index 354d4a43e..bc7c2b7d3 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -26,13 +26,11 @@ #include "dolphin_generalsettings.h" #include -#include #include #include "dolphindebug.h" #include #include #include -#include #include #include #include diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index d4ebba8c0..524c4462f 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #ifdef HAVE_BALOO @@ -130,9 +131,11 @@ QUrl DolphinSearchBox::urlForSearching() const url = balooUrlForSearching(); } else { url.setScheme("filenamesearch"); - url.addQueryItem("search", m_searchInput->text()); + + QUrlQuery query; + query.addQueryItem("search", m_searchInput->text()); if (m_contentButton->isChecked()) { - url.addQueryItem("checkContent", "yes"); + query.addQueryItem("checkContent", "yes"); } QString encodedUrl; @@ -144,7 +147,9 @@ QUrl DolphinSearchBox::urlForSearching() const } else { encodedUrl = m_searchPath.url(); } - url.addQueryItem("url", encodedUrl); + query.addQueryItem("url", encodedUrl); + + url.setQuery(query); } return url; @@ -155,9 +160,10 @@ void DolphinSearchBox::fromSearchUrl(const QUrl& url) if (url.scheme() == "baloosearch") { fromBalooSearchUrl(url); } else if (url.scheme() == "filenamesearch") { - setText(url.queryItemValue("search")); - setSearchPath(QUrl::fromUserInput(url.queryItemValue("url"), QString(), QUrl::AssumeLocalFile)); - m_contentButton->setChecked(url.queryItemValue("checkContent") == "yes"); + const QUrlQuery query(url); + setText(query.queryItemValue("search")); + setSearchPath(QUrl::fromUserInput(query.queryItemValue("url"), QString(), QUrl::AssumeLocalFile)); + m_contentButton->setChecked(query.queryItemValue("checkContent") == "yes"); } else { setText(QString()); setSearchPath(url); diff --git a/src/settings/startup/startupsettingspage.cpp b/src/settings/startup/startupsettingspage.cpp index baba7f8a1..21b213cd5 100644 --- a/src/settings/startup/startupsettingspage.cpp +++ b/src/settings/startup/startupsettingspage.cpp @@ -24,7 +24,6 @@ #include "dolphin_generalsettings.h" -#include #include #include #include @@ -36,6 +35,7 @@ #include #include #include +#include #include "views/dolphinview.h" @@ -165,7 +165,7 @@ void StartupSettingsPage::slotSettingsChanged() void StartupSettingsPage::selectHomeUrl() { const QString homeUrl = m_homeUrl->text(); - QUrl url = KFileDialog::getExistingDirectoryUrl(QUrl::fromLocalFile(homeUrl), this); + QUrl url = QFileDialog::getExistingDirectoryUrl(this, QString(), QUrl::fromLocalFile(homeUrl)); if (!url.isEmpty()) { m_homeUrl->setText(url.toDisplayString(QUrl::PreferLocalFile)); slotSettingsChanged(); diff --git a/src/settings/viewmodes/dolphinfontrequester.cpp b/src/settings/viewmodes/dolphinfontrequester.cpp index 4d8b4813c..b9c5d97cf 100644 --- a/src/settings/viewmodes/dolphinfontrequester.cpp +++ b/src/settings/viewmodes/dolphinfontrequester.cpp @@ -19,13 +19,13 @@ #include "dolphinfontrequester.h" -#include #include #include #include #include #include +#include DolphinFontRequester::DolphinFontRequester(QWidget* parent) : QWidget(parent), @@ -86,11 +86,9 @@ QFont DolphinFontRequester::customFont() const void DolphinFontRequester::openFontDialog() { - QFont font = m_customFont; - const int result = KFontDialog::getFont(font, - KFontChooser::NoDisplayFlags, - this); - if (result == KFontDialog::Accepted) { + bool ok = false; + const QFont font = QFontDialog::getFont(&ok, this); + if (ok) { m_customFont = font; m_modeCombo->setFont(m_customFont); emit changed(); diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index aa7e4b4a0..be7fe0d86 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/src/tests/kfileitemlistviewtest.cpp b/src/tests/kfileitemlistviewtest.cpp index 5c40abba3..cac4f7a58 100644 --- a/src/tests/kfileitemlistviewtest.cpp +++ b/src/tests/kfileitemlistviewtest.cpp @@ -56,7 +56,7 @@ void KFileItemListViewTest::init() m_graphicsView = new QGraphicsView(); m_graphicsView->show(); - QTest::qWaitForWindowShown(m_graphicsView); + QTest::qWaitForWindowExposed(m_graphicsView); } void KFileItemListViewTest::cleanup() diff --git a/src/tests/kfileitemmodelbenchmark.cpp b/src/tests/kfileitemmodelbenchmark.cpp index c970a7198..b73485efb 100644 --- a/src/tests/kfileitemmodelbenchmark.cpp +++ b/src/tests/kfileitemmodelbenchmark.cpp @@ -29,18 +29,20 @@ #include "testdir.h" -void myMessageOutput(QtMsgType type, const char* msg) +void myMessageOutput(QtMsgType type, const QMessageLogContext& context, const QString& msg) { + Q_UNUSED(context); + switch (type) { case QtDebugMsg: break; case QtWarningMsg: break; case QtCriticalMsg: - fprintf(stderr, "Critical: %s\n", msg); + fprintf(stderr, "Critical: %s\n", msg.toLocal8Bit().data()); break; case QtFatalMsg: - fprintf(stderr, "Fatal: %s\n", msg); + fprintf(stderr, "Fatal: %s\n", msg.toLocal8Bit().data()); abort(); default: break; @@ -317,7 +319,7 @@ void KFileItemModelBenchmark::insertManyChildItems() KFileItemList KFileItemModelBenchmark::createFileItemList(const QStringList& fileNames, const QString& prefix) { // Suppress 'file does not exist anymore' messages from KFileItemPrivate::init(). - qInstallMsgHandler(myMessageOutput); + qInstallMessageHandler(myMessageOutput); KFileItemList result; foreach (const QString& name, fileNames) { diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp index cf50db02a..eba32e1e1 100644 --- a/src/tests/kfileitemmodeltest.cpp +++ b/src/tests/kfileitemmodeltest.cpp @@ -29,18 +29,20 @@ #include "kitemviews/private/kfileitemmodeldirlister.h" #include "testdir.h" -void myMessageOutput(QtMsgType type, const char* msg) +void myMessageOutput(QtMsgType type, const QMessageLogContext& context, const QString& msg) { + Q_UNUSED(context); + switch (type) { case QtDebugMsg: break; case QtWarningMsg: break; case QtCriticalMsg: - fprintf(stderr, "Critical: %s\n", msg); + fprintf(stderr, "Critical: %s\n", msg.toLocal8Bit().data()); break; case QtFatalMsg: - fprintf(stderr, "Fatal: %s\n", msg); + fprintf(stderr, "Fatal: %s\n", msg.toLocal8Bit().data()); abort(); default: break; @@ -107,7 +109,7 @@ void KFileItemModelTest::init() { // The item-model tests result in a huge number of debugging // output from kdelibs. Only show critical and fatal messages. - qInstallMsgHandler(myMessageOutput); + qInstallMessageHandler(myMessageOutput); qRegisterMetaType("KItemRange"); qRegisterMetaType("KItemRangeList"); diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp index dafb9f854..e34731fa4 100644 --- a/src/tests/kitemlistcontrollertest.cpp +++ b/src/tests/kitemlistcontrollertest.cpp @@ -142,7 +142,7 @@ void KItemListControllerTest::initTestCase() QVERIFY(spyDirectoryLoadingCompleted.wait()); m_container->show(); - QTest::qWaitForWindowShown(m_container); + QTest::qWaitForWindowExposed(m_container); } void KItemListControllerTest::cleanupTestCase() @@ -460,7 +460,7 @@ void KItemListControllerTest::testKeyboardNavigation_data() selectionBehaviorNames[selectionBehavior] + ", " + groupingEnabledNames[groupingEnabled]; - const QByteArray testNameAscii = testName.toAscii(); + const QByteArray testNameAscii = testName.toLatin1(); QTest::newRow(testNameAscii.data()) << layout diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 4129cc217..191cd6511 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index 6d009ba9a..be9e34c4a 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -23,7 +23,6 @@ #include #include #include -#include //TODO port to QCollator #include #include -- cgit v1.3.1 From b701b7e4edefb628d6f8b14146b2e299bd0ce5fc Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Fri, 27 Feb 2015 08:16:15 +0100 Subject: Fixed TODO Remove the if/endif lines if Dolphin is split. --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c2b109af..05c6e9cbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,5 @@ install(FILES COMPONENT Devel ) -# TODO Remove the if/endif lines if Dolphin is split. -if ("${CMAKE_SOURCE_DIR}" STREQUAL "${Dolphin_SOURCE_DIR}") - feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) -endif() +feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) + -- cgit v1.3.1