| Summary: | qmake project: binary not rebuild before execution (after changes in files) | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Daniel Franke <franke.daniel> |
| Component: | Build tools: QMake | Assignee: | KDevelop Developers <kdevelop-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 3.0.1 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Solaris | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | patch against CVS HEAD (2004/04/23) | ||
|
Description
Daniel Franke
2004-02-24 17:26:34 UTC
Created attachment 5758 [details]
patch against CVS HEAD (2004/04/23)
Could somebody have a look at this patch? Works fine so far, but it might not
be the best solution since I'm not involved in history of trollproject.
CVS commit by dymo:
Build the project (or subproject) before execution if source files were changed.
BUG: 76037
Thanks to Daniel Franke for the patch.
M +26 -6 trollprojectpart.cpp 1.81
M +2 -0 trollprojectpart.h 1.29
--- kdevelop/buildtools/qmake/trollprojectpart.cpp #1.80:1.81
@@ -112,5 +112,5 @@ TrollProjectPart::TrollProjectPart(QObje
action = new KAction( i18n("Execute Main Program"), "exec", SHIFT+Key_F9,
- m_widget, SLOT(slotExecuteProject()),
+ this, SLOT(slotBuildAndExecuteProject()),
actionCollection(), "build_execute_project" );
action->setToolTip(i18n("Execute main program"));
@@ -149,5 +149,5 @@ TrollProjectPart::TrollProjectPart(QObje
action = new KAction( i18n("Execute Subproject"), "exec", 0,
- m_widget, SLOT(slotExecuteTarget()),
+ this, SLOT(slotBuildAndExecuteTarget()),
actionCollection(), "build_execute_target" );
action->setToolTip(i18n("Execute subproject"));
@@ -276,4 +276,24 @@ DomUtil::PairList TrollProjectPart::runE
}
+void TrollProjectPart::slotBuildAndExecuteProject()
+{
+ partController()->saveAllFiles();
+ if (isDirty()) {
+ m_executeAfterBuild = true;
+ m_widget->slotBuildProject();
+ } else
+ m_widget->slotExecuteProject();
+}
+
+void TrollProjectPart::slotBuildAndExecuteTarget()
+{
+ partController()->saveAllFiles();
+ if (isDirty()) {
+ m_executeAfterBuild = true;
+ m_widget->slotBuildTarget();
+ } else
+ m_widget->slotExecuteTarget();
+}
+
/** Retuns the currently selected run directory
@@ -497,8 +517,8 @@ void TrollProjectPart::slotCommandFinish
Q_UNUSED( command );
- if( m_buildCommand != command )
- return;
-
- m_buildCommand = QString::null;
+// if( m_buildCommand != command )
+// return;
+//
+// m_buildCommand = QString::null;
m_timestamp.clear();
--- kdevelop/buildtools/qmake/trollprojectpart.h #1.28:1.29
@@ -66,4 +66,6 @@ private slots:
// void slotExecute();
void slotCommandFinished( const QString& command );
+ void slotBuildAndExecuteProject();
+ void slotBuildAndExecuteTarget();
private:
|