[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/parts/autoproject
From: Caleb Tennis <caleb () aei-tech ! com>
Date: 2003-03-20 17:36:52
[Download RAW message or body]
CVS commit by ctennis:
Add Build Active Target support - by Amilcar
M +27 -0 autoprojectpart.cpp 1.70
M +1 -0 autoprojectpart.h 1.28
M +1 -0 kdevautoproject.rc 1.10
--- kdevelop/parts/autoproject/autoprojectpart.cpp #1.69:1.70
@@ -16,4 +16,5 @@
#include "autoprojectpart.h"
+#include "autolistviewitems.h"
#include "configureoptionswidget.h"
#include "addtranslationdlg.h"
@@ -87,4 +88,8 @@ AutoProjectPart::AutoProjectPart(QObject
actionCollection(), "build_build" );
+ action = new KAction( i18n("Build &Active Target"), "make_kdevelop", Key_F7,
+ this, SLOT(slotBuildActiveTarget()),
+ actionCollection(), "build_buildactivetarget" );
+
action = new KAction( i18n("Compile &File"), "make_kdevelop",
this, SLOT(slotCompileFile()),
@@ -437,4 +442,26 @@ void AutoProjectPart::slotBuild()
mainWindow()->raiseView(makeFrontend()->widget());
startMakeCommand(buildDirectory(), QString::fromLatin1(""));
+}
+
+
+void AutoProjectPart::slotBuildActiveTarget()
+{
+ kdDebug( 9020 ) << "Starting to execute build Active Target" << endl;
+ TargetItem* titem = m_widget->activeTarget();
+
+ if ( !titem )
+ return;
+
+ QString name = titem->name;
+ kdDebug( 9020 ) << "Active Target.name :" << name << endl;
+ if ( titem->primary == "LIBRARIES" )
+ name + ".a";
+ else if ( titem->primary == "LTLIBRARIES" )
+ name + ".la";
+ else if ( titem->primary == "KDEDOCS" )
+ name = "index.cache.bz2";
+
+ QString relpath = m_widget->selectedSubproject()->path.mid( projectDirectory().length() );
+ startMakeCommand( buildDirectory() + relpath, titem->name );
}
--- kdevelop/parts/autoproject/autoprojectpart.h #1.27:1.28
@@ -81,4 +81,5 @@ private slots:
void slotAddTranslation();
void slotBuild();
+ void slotBuildActiveTarget();
void slotCompileFile();
void slotClean();
--- kdevelop/parts/autoproject/kdevautoproject.rc #1.9:1.10
@@ -8,4 +8,5 @@
<Menu name="build" >
<Action name="build_build" />
+ <Action name="build_buildactivetarget" />
<Action name="build_compilefile" />
<Action name="build_configure" />
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic