Skip to content

Commit 193af3d

Browse files
upgraded to KDevelop5
1 parent 61660b7 commit 193af3d

File tree

8 files changed

+222
-295
lines changed

8 files changed

+222
-295
lines changed

CMakeLists.txt

Lines changed: 41 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,49 @@
1-
project(movesplitview)
2-
3-
# set(KDE_MIN_VERSION "4.5.0")
4-
# find_package(KDE4 4.5.0 REQUIRED)
5-
find_package(KDE4 REQUIRED)
6-
7-
include (KDE4Defaults)
8-
include (MacroLibrary)
9-
include (MacroOptionalAddSubdirectory)
10-
11-
# Make sure that we're having RPATH on our installed libs, else using kdevelop
12-
# from prefixes like $HOME/kdevelop breaks
13-
# Code taken from FindKDE4Internal.cmake from KDE 4.5
14-
# list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}"
15-
# _isSystemLibDir)
16-
# if("${_isSystemLibDir}" STREQUAL "-1")
17-
# set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
18-
# endif("${_isSystemLibDir}" STREQUAL "-1")
19-
# set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
20-
21-
# find_package(KDevPlatform 1.2.0 REQUIRED)
22-
find_package(KDevPlatform REQUIRED)
23-
24-
include_directories(${KDEVPLATFORM_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${KDE4_INCLUDES})
25-
26-
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DHAVE_CONFIG_H=1)
27-
add_definitions(-std=c++11)
1+
project(kdevmovesplitview)
2+
3+
cmake_minimum_required(VERSION 2.8.12)
4+
# apt install cmake-extras
5+
find_package (ECM 0.0.9 REQUIRED NO_MODULE)
6+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
7+
8+
include(KDECompilerSettings NO_POLICY_SCOPE)
9+
#include(ECMAddTests)
10+
include(KDEInstallDirs)
11+
include(KDECMakeSettings)
12+
13+
set(QT_MIN_VERSION "5.4.0")
14+
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Widgets)
15+
#find_package(Qt5 REQUIRED Core Widgets Test)
16+
17+
set(KF5_DEP_VERSION "5.15.0") # pifometrie...
18+
find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS
19+
I18n
20+
Service
21+
XmlGui
22+
)
2823

29-
########### install target ###############
24+
find_package(KDevPlatform ${KDEVPLATFORM_VERSION} REQUIRED)
3025

31-
set(kdevmovesplitview_PART_SRCS movesplitviewplugin.cpp)
26+
set(CMAKE_CXX_STANDARD 14)
3227

33-
kde4_add_plugin(kdevmovesplitview ${kdevmovesplitview_PART_SRCS})
28+
set(kdevmovesplitview_PART_SRCS
29+
movesplitviewplugin.cpp
30+
)
3431

32+
qt5_add_resources(kdevmovesplitview_PART_SRCS kdevmovesplitview.qrc)
33+
kdevplatform_add_plugin(
34+
kdevmovesplitview
35+
JSON kdevmovesplitview.json
36+
SOURCES ${kdevmovesplitview_PART_SRCS}
37+
)
3538
target_link_libraries(kdevmovesplitview
36-
${KDE4_KDECORE_LIBS}
37-
${KDE4_KDEUI_LIBS}
38-
${KDE4_KPARTS_LIBS}
39-
${KDE4_KTEXTEDITOR_LIBS}
40-
${KDEVPLATFORM_INTERFACES_LIBRARIES}
41-
${KDEVPLATFORM_SUBLIME_LIBRARIES}
42-
# ${KDEVPLATFORM_PROJECT_LIBRARIES}
43-
# ${KDEVPLATFORM_UTIL_LIBRARIES}
44-
# ${KDEVPLATFORM_LANGUAGE_LIBRARIES}
39+
KDev::Interfaces
40+
KDev::Shell
4541
)
4642

43+
# install(
44+
# TARGETS kdevmovesplitview
45+
# DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION}
46+
# PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
47+
# )
4748

48-
install(TARGETS kdevmovesplitview DESTINATION ${PLUGIN_INSTALL_DIR} )
49-
50-
51-
########### install files ###############
52-
53-
install( FILES kdevmovesplitview.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
54-
install( FILES kdevmovesplitview.rc DESTINATION ${DATA_INSTALL_DIR}/kdevmovesplitview )
49+
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

README.md

Lines changed: 17 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,36 @@
1-
kdevelop-plugin-view-switcher
2-
=============================
1+
# kdevelop-move-split-view
32

4-
Move and remove split views.
3+
Move and clean split views.
54

6-
Features
7-
--------
5+
## Features
86

9-
- Move the current file in the following split view
10-
- Move the current file in the previous split view
11-
- Delete the views already present in other split views
12-
- Delete the views found in other split views
13-
- Moving a file from one split view to the other. Split if it is not already.
7+
- Move the current file in the next/previous split view. Vertical split if only one view.
8+
- Remove duplicate files in the current split view or between split views.
149

15-
Dependencies
16-
------------
10+
## Dependencies
1711

18-
Debian and derived
19-
- kdelibs5-dev
12+
- cmake
13+
- cmake-extras
14+
- kdelibs5-dev or kdelibs5-devel
15+
<!-- - kdevplatform-dev -->
16+
- clang++ or g++ with c++14 support
2017

21-
Other distros
22-
- kdelibs5-devel
23-
24-
Install
25-
-------
26-
27-
### KdevPlatform 14 (Kdevelop 4.4)
28-
29-
```sh
30-
sed -i 's/X\-KDevelop\-Version=[0-9][0-9]/X-KDevelop-Version=14/' kdevswitchviewer.desktop
3118
```
32-
33-
### KdevPlatform 15 (Kdevelop 4.5)
34-
35-
```sh
36-
sed -i 's/X\-KDevelop\-Version=[0-9][0-9]/X-KDevelop-Version=15/' kdevswitchviewer.desktop
19+
sudo apt cmake cmake-extras kdevplatform-dev kdelibs5-dev
3720
```
3821

39-
### All versions
22+
## Install
4023

41-
As a user
24+
### KDevelop5
4225

43-
```sh
44-
mkdir build
45-
cd build
46-
cmake .. -DCMAKE_INSTALL_PREFIX=$(kde4-config --localprefix) -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4
47-
make
48-
make install
4926
```
50-
51-
or
52-
53-
As root user
54-
55-
```sh
5627
mkdir build
5728
cd build
58-
cmake .. -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4
29+
cmake -DPLUGIN_INSTALL_DIR=/usr/lib/x86_64-linux-gnu/qt5/plugins/ ..
5930
make
6031
sudo make install
6132
```
6233

63-
Old repository
64-
--------------
34+
### KDevelop4
6535

66-
https://code.google.com/p/kdevelop-plugin-view-switcher/source/browse/#svn%2Ftrunk%2Ftag-1%253Fstate%253Dclosed
36+
https://github.com/jonathanpoelen/kdevelop-plugin-move-split-view/releases/tag/kdev4-v0.7

kdevmovesplitview.desktop

Lines changed: 0 additions & 19 deletions
This file was deleted.

kdevmovesplitview.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"GenericName": "MoveSplitView",
3+
"GenericName[x-test]": "xxMoveSplitViewxx",
4+
"KPlugin": {
5+
"Authors": [
6+
{
7+
"Email": "[email protected]",
8+
"Name": "Jonathan Poelen",
9+
"Name[x-test]": "xxJonathan Poelenxx"
10+
}
11+
],
12+
"Category": "Core",
13+
"Description": "Move and clean split views",
14+
"Description[fr]": "Déplacer et nettoyer les vues scindées",
15+
"Description[x-test]": "xxMove and clean split viewxx",
16+
"Icon": "kdevelop",
17+
"Id": "kdevmovesplitview",
18+
"License": "GPL",
19+
"Name": "MoveSplitView",
20+
"ServiceTypes": [
21+
"KDevelop/Plugin"
22+
],
23+
"Version": "1.0"
24+
},
25+
"X-KDevelop-Category": "Global",
26+
"X-KDevelop-Mode": "GUI"
27+
}

kdevmovesplitview.qrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!DOCTYPE RCC>
2+
<RCC version="1.0">
3+
<qresource prefix="/kxmlgui5/kdevmovesplitview">
4+
<file>kdevmovesplitview.rc</file>
5+
</qresource>
6+
</RCC>

kdevmovesplitview.rc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
22
<kpartgui name="kdevmovesplitview" version="7">
33
<MenuBar>
4-
<Menu name="editor">
5-
<text context="@title:menu">Editor</text>
6-
<Menu name="view">
7-
<text context="@title:menu">View</text>
8-
<separator />
9-
<Action name="move_previous_split_view" />
10-
<Action name="move_next_split_view" />
11-
<Action name="copy_previous_split_view" />
12-
<Action name="copy_next_split_view" />
13-
<separator />
14-
<Action name="clean_split_view" />
15-
<Action name="clean_all_split_view" />
16-
<separator />
17-
</Menu>
18-
</Menu>
4+
<Menu name="view">
5+
<text context="@title:menu">View</text>
6+
<Menu name="view">
7+
<text context="@title:menu">Split View</text>
8+
<separator />
9+
<Action name="move_previous_split_view" />
10+
<Action name="move_next_split_view" />
11+
<Action name="copy_previous_split_view" />
12+
<Action name="copy_next_split_view" />
13+
<separator />
14+
<Action name="clean_split_view" />
15+
<Action name="clean_all_split_view" />
16+
<separator />
17+
</Menu>
18+
</Menu>
1919
</MenuBar>
2020
</kpartgui>

0 commit comments

Comments
 (0)