[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/parts/autoproject
From: Amilcar do Carmo Lucas <amilcar () ida ! ing ! tu-bs ! de>
Date: 2003-05-26 22:38:38
[Download RAW message or body]
CVS commit by aclu:
"Install with kdesu" command in "Build" menu can be useful.
Patch by:
Marcin Dec < ced -at- ciapek.uci.agh.edu.pl > aka "analena" on #kdevelop channel on irc.kde.org
M +14 -1 autoprojectpart.cpp 1.91
M +2 -1 autoprojectpart.h 1.31
M +1 -0 kdevautoproject.rc 1.11
--- kdevelop/parts/autoproject/autoprojectpart.cpp #1.90:1.91
@@ -111,4 +111,8 @@ AutoProjectPart::AutoProjectPart(QObject
actionCollection(), "build_install" );
+ action = new KAction( i18n("Install with kdesu"), 0,
+ this, SLOT(slotInstallWithKdesu()),
+ actionCollection(), "build_install_kdesu" );
+
action = new KAction( i18n("&Clean Project"), 0,
this, SLOT(slotClean()),
@@ -448,5 +452,5 @@ QString AutoProjectPart::constructMakeCo
-void AutoProjectPart::startMakeCommand(const QString &dir, const QString &target)
+void AutoProjectPart::startMakeCommand(const QString &dir, const QString &target, bool withKdesu)
{
partController()->saveAllFiles();
@@ -454,4 +458,7 @@ void AutoProjectPart::startMakeCommand(c
m_buildCommand = constructMakeCommandLine(dir, target);
+ if (withKdesu)
+ m_buildCommand = "kdesu -t -c '" + m_buildCommand + "'";
+
if (!m_buildCommand.isNull())
makeFrontend()->queueCommand(dir, m_buildCommand);
@@ -712,4 +719,10 @@ void AutoProjectPart::slotInstall()
{
startMakeCommand(buildDirectory(), QString::fromLatin1("install"));
+}
+
+
+void AutoProjectPart::slotInstallWithKdesu()
+{
+ startMakeCommand(buildDirectory(), QString::fromLatin1("install"), true);
}
--- kdevelop/parts/autoproject/autoprojectpart.h #1.30:1.31
@@ -66,5 +66,5 @@ public:
QString currentBuildConfig();
QString topsourceDirectory();
- void startMakeCommand(const QString &dir, const QString &target);
+ void startMakeCommand(const QString &dir, const QString &target, bool withKdesu = false);
void buildTarget(QString relpath, TargetItem* titem);
@@ -89,4 +89,5 @@ private slots:
void slotDistClean();
void slotInstall();
+ void slotInstallWithKdesu();
void slotMakefilecvs();
void slotMakeMessages();
--- kdevelop/parts/autoproject/kdevautoproject.rc #1.10:1.11
@@ -13,4 +13,5 @@
<Action name="build_makefilecvs" />
<Action name="build_install" />
+ <Action name="build_install_kdesu" />
<Separator/>
<Action name="build_clean" />
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic