Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kdevelop 4 extra plugins
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Sun Mar 21, 2010 2:15 pm    Post subject: kdevelop 4 extra plugins Reply with quote

I've just started using kdevelop4 and I must admit I like the auto completion, the simplicity of CMake and the layout

If anyone's interested here's a couple of ebuilds for qtdesigner currently located in the extra-plugins
so far the only bug I've spotted is a crash on kdevelop when closing the window with a ui form open
but I think it seems to work
(you can create a new windowed project / ui file through the new Project Template wizard)

You should also be able to adapt these ebuilds quite easily to other plugins located within extra-plugins, by just changing the enabled="" to the plugin name. ESVN_REVISION is just the subversion revision that's checked out

EDIT
The ebuilds allow you to create some example GUI apps in kdevelop4 using the new project template wizard
but I've found your probably better off using the qt designer directly to edit the ui files directly
/usr/bin/designer which is part of x11-libs/qt-gui


A few links for interest
http://wiki.archlinux.org/index.php/KDevelop_4
http://apaku.wordpress.com/2008/12/15/howto-create-build-and-run-a-simple-kdevelop4-project/
http://websvn.kde.org/trunk/playground/devtools/kdevelop4-extra-plugins/

dev-util/kdevelop-explugins-qtdesigner-9999.ebuild
Code:

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

KMNAME="playground/devtools"
KMMODULE="kdevelop4-extra-plugins"
inherit kde4-base

DESCRIPTION="Various plugins for kdevelop (support for other langs)"
HOMEPAGE="http://www.kdevelop.org/"

LICENSE="GPL-2 LGPL-2"
SLOT="4"
KEYWORDS="~x86 ~amd64"
IUSE="debug +php"

DEPEND="
   dev-util/kdevelop
"
RDEPEND="${DEPEND}"

src_prepare() {
   local dir enabled
   #generate basic cmakelists.txt
   cat <<-EOF > "${S}/CMakeLists.txt"
find_package(KDE4 REQUIRED)
include(MacroOptionalAddSubdirectory)

EOF

# # # search based on path
#   find ./ -mindepth 1 -maxdepth 1 -type d -print |sed -e "s:./::g"| \
#   sort | while read dir; do

   #enabled="classbrowser php"
   enabled="qtdesigner"
   for dir in ${enabled}; do
      echo "macro_optional_add_subdirectory(${dir}) " >> "${S}/CMakeLists.txt"
   done
}

src_configure() {
   mycmakeargs=(
      $(cmake-utils_use_build php)
   )

   kde4-base_src_configure
}


dev-util/kdevelop-explugins-qtdesigner-9999.1105817.ebuild
Code:

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

KMNAME="playground/devtools"
KMMODULE="kdevelop4-extra-plugins"
inherit kde4-base

#ESVN_REVISION="${PV}"
ESVN_REVISION="1105817"

DESCRIPTION="Various plugins for kdevelop (support for other langs)"
HOMEPAGE="http://www.kdevelop.org/"

LICENSE="GPL-2 LGPL-2"
SLOT="4"
KEYWORDS="~x86 ~amd64"
IUSE="debug +php"

DEPEND="
   dev-util/kdevelop
"
RDEPEND="${DEPEND}"

src_prepare() {
   local dir enabled
   #generate basic cmakelists.txt
   cat <<-EOF > "${S}/CMakeLists.txt"
find_package(KDE4 REQUIRED)
include(MacroOptionalAddSubdirectory)

EOF

# # # search based on path
#   find ./ -mindepth 1 -maxdepth 1 -type d -print |sed -e "s:./::g"| \
#   sort | while read dir; do

   #enabled="classbrowser php"
   enabled="qtdesigner"
   for dir in ${enabled}; do
      echo "macro_optional_add_subdirectory(${dir}) " >> "${S}/CMakeLists.txt"
   done
}

src_configure() {
   mycmakeargs=(
      $(cmake-utils_use_build php)
   )

   kde4-base_src_configure
}


Last edited by garlicbread on Sun Mar 28, 2010 2:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Sun Mar 21, 2010 2:36 pm    Post subject: Reply with quote

I'm currently using kdevelop version 3.9.99 at the moment
I just thought I'd mention a couple of things I'd spotted while trying to debug code, if you've never used kdevelop 4 before

First if you create a new project
Project Menu → New from Template
Select C++ → Qt (cmake) → Qt4 CMake Core application
(just prints hello world to the console)

in order to step through the code you need to enable Debug for CMake, but before you can do this you first need to do an initial build of the project so that you can get access to the Project / CMake build options
(under the Code Tab at the top right, select the Projects tab on the left, right click the project and select Build)

It should then be possible to select the Project Build options via the Project Menu -> Open Configuration
For the option "CMAKE_BUILD_TYPE" just set the value to "Debug"

Then it's just a case of creating a Run configuration by selecting
Run Menu -> Configure Launches, Select the project, hit the green cross to add a launch config
Select "Executable" option, then just browse to the built binary which should be somewhere under
<Project Dir>/build/ or <Project Dir>/build/src/

it should then just be a case of adding in breakpoints, using Run -> Debug Launch to run to the breakpoint

For some reason the default F11 on my machine conflicted with another shortcut within KDE
but you can re-assign shortcuts, just by opening up the top menu, right clicking on the menu entry and selecting Configure shortcut
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum