Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
adc7a720
Commit
adc7a720
authored
May 26, 2009
by
dt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the environment specified for the current build configuration to
rebuild the cbp file I think that makes sense, we'll see.
parent
14a79dad
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
17 deletions
+46
-17
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
+17
-7
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
+7
-3
src/plugins/cmakeprojectmanager/cmakeproject.cpp
src/plugins/cmakeprojectmanager/cmakeproject.cpp
+16
-5
src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
+2
-1
src/plugins/cmakeprojectmanager/cmakeprojectmanager.h
src/plugins/cmakeprojectmanager/cmakeprojectmanager.h
+4
-1
No files found.
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
View file @
adc7a720
...
...
@@ -55,10 +55,11 @@ using namespace CMakeProjectManager::Internal;
// |--> Already existing cbp file (and new enough) --> Page: Ready to load the project
// |--> Page: Ask for cmd options, run generator
CMakeOpenProjectWizard
::
CMakeOpenProjectWizard
(
CMakeManager
*
cmakeManager
,
const
QString
&
sourceDirectory
)
CMakeOpenProjectWizard
::
CMakeOpenProjectWizard
(
CMakeManager
*
cmakeManager
,
const
QString
&
sourceDirectory
,
const
ProjectExplorer
::
Environment
&
env
)
:
m_cmakeManager
(
cmakeManager
),
m_sourceDirectory
(
sourceDirectory
),
m_creatingCbpFiles
(
false
)
m_creatingCbpFiles
(
false
),
m_environment
(
env
)
{
int
startid
;
if
(
hasInSourceBuild
())
{
...
...
@@ -80,10 +81,12 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const
}
CMakeOpenProjectWizard
::
CMakeOpenProjectWizard
(
CMakeManager
*
cmakeManager
,
const
QString
&
sourceDirectory
,
const
QString
&
buildDirectory
,
CMakeOpenProjectWizard
::
Mode
mode
)
const
QString
&
buildDirectory
,
CMakeOpenProjectWizard
::
Mode
mode
,
const
ProjectExplorer
::
Environment
&
env
)
:
m_cmakeManager
(
cmakeManager
),
m_sourceDirectory
(
sourceDirectory
),
m_creatingCbpFiles
(
true
)
m_creatingCbpFiles
(
true
),
m_environment
(
env
)
{
if
(
mode
==
CMakeOpenProjectWizard
::
NeedToCreate
)
addPage
(
new
CMakeRunPage
(
this
,
CMakeRunPage
::
Recreate
,
buildDirectory
));
...
...
@@ -94,10 +97,12 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const
}
CMakeOpenProjectWizard
::
CMakeOpenProjectWizard
(
CMakeManager
*
cmakeManager
,
const
QString
&
sourceDirectory
,
const
QString
&
oldBuildDirectory
)
const
QString
&
oldBuildDirectory
,
const
ProjectExplorer
::
Environment
&
env
)
:
m_cmakeManager
(
cmakeManager
),
m_sourceDirectory
(
sourceDirectory
),
m_creatingCbpFiles
(
true
)
m_creatingCbpFiles
(
true
),
m_environment
(
env
)
{
m_buildDirectory
=
oldBuildDirectory
;
addPage
(
new
ShadowBuildPage
(
this
,
true
));
...
...
@@ -177,6 +182,11 @@ void CMakeOpenProjectWizard::setArguments(const QStringList &args)
m_arguments
=
args
;
}
ProjectExplorer
::
Environment
CMakeOpenProjectWizard
::
environment
()
const
{
return
m_environment
;
}
InSourceBuildPage
::
InSourceBuildPage
(
CMakeOpenProjectWizard
*
cmakeWizard
)
:
QWizardPage
(
cmakeWizard
),
m_cmakeWizard
(
cmakeWizard
)
...
...
@@ -304,7 +314,7 @@ void CMakeRunPage::runCMake()
m_argumentsLineEdit
->
setEnabled
(
false
);
QStringList
arguments
=
ProjectExplorer
::
Environment
::
parseCombinedArgString
(
m_argumentsLineEdit
->
text
());
CMakeManager
*
cmakeManager
=
m_cmakeWizard
->
cmakeManager
();
m_cmakeProcess
=
cmakeManager
->
createXmlFile
(
arguments
,
m_cmakeWizard
->
sourceDirectory
(),
m_buildDirectory
);
m_cmakeProcess
=
cmakeManager
->
createXmlFile
(
arguments
,
m_cmakeWizard
->
sourceDirectory
(),
m_buildDirectory
,
m_cmakeWizard
->
environment
()
);
connect
(
m_cmakeProcess
,
SIGNAL
(
readyRead
()),
this
,
SLOT
(
cmakeReadyRead
()));
connect
(
m_cmakeProcess
,
SIGNAL
(
finished
(
int
)),
this
,
SLOT
(
cmakeFinished
()));
}
...
...
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
View file @
adc7a720
...
...
@@ -30,6 +30,8 @@
#ifndef CMAKEOPENPROJECTWIZARD_H
#define CMAKEOPENPROJECTWIZARD_H
#include <projectexplorer/environment.h>
#include <QtCore/QProcess>
#include <QtGui/QPushButton>
#include <QtGui/QLineEdit>
...
...
@@ -66,11 +68,11 @@ public:
};
// used at importing a project without a .user file
CMakeOpenProjectWizard
(
CMakeManager
*
cmakeManager
,
const
QString
&
sourceDirectory
);
CMakeOpenProjectWizard
(
CMakeManager
*
cmakeManager
,
const
QString
&
sourceDirectory
,
const
ProjectExplorer
::
Environment
&
env
);
// used to update if we have already a .user file
CMakeOpenProjectWizard
(
CMakeManager
*
cmakeManager
,
const
QString
&
sourceDirectory
,
const
QString
&
buildDirectory
,
Mode
mode
);
CMakeOpenProjectWizard
(
CMakeManager
*
cmakeManager
,
const
QString
&
sourceDirectory
,
const
QString
&
buildDirectory
,
Mode
mode
,
const
ProjectExplorer
::
Environment
&
env
);
// used to change the build directory of one buildconfiguration
CMakeOpenProjectWizard
(
CMakeManager
*
cmakeManager
,
const
QString
&
sourceDirectory
,
const
QString
&
oldBuildDirectory
);
CMakeOpenProjectWizard
(
CMakeManager
*
cmakeManager
,
const
QString
&
sourceDirectory
,
const
QString
&
oldBuildDirectory
,
const
ProjectExplorer
::
Environment
&
env
);
virtual
int
nextId
()
const
;
QString
buildDirectory
()
const
;
...
...
@@ -79,6 +81,7 @@ public:
CMakeManager
*
cmakeManager
()
const
;
QStringList
arguments
()
const
;
void
setArguments
(
const
QStringList
&
args
);
ProjectExplorer
::
Environment
environment
()
const
;
private:
bool
existsUpToDateXmlFile
()
const
;
bool
hasInSourceBuild
()
const
;
...
...
@@ -87,6 +90,7 @@ private:
QString
m_sourceDirectory
;
QStringList
m_arguments
;
bool
m_creatingCbpFiles
;
ProjectExplorer
::
Environment
m_environment
;
};
class
InSourceBuildPage
:
public
QWizardPage
...
...
src/plugins/cmakeprojectmanager/cmakeproject.cpp
View file @
adc7a720
...
...
@@ -104,7 +104,11 @@ void CMakeProject::slotActiveBuildConfiguration()
mode
=
CMakeOpenProjectWizard
::
Nothing
;
if
(
mode
!=
CMakeOpenProjectWizard
::
Nothing
)
{
CMakeOpenProjectWizard
copw
(
m_manager
,
sourceFileInfo
.
absolutePath
(),
buildDirectory
(
activeBuildConfiguration
()),
mode
);
CMakeOpenProjectWizard
copw
(
m_manager
,
sourceFileInfo
.
absolutePath
(),
buildDirectory
(
activeBuildConfiguration
()),
mode
,
environment
(
activeBuildConfiguration
()));
copw
.
exec
();
}
// reparse
...
...
@@ -501,7 +505,7 @@ QList<ProjectExplorer::BuildStepConfigWidget*> CMakeProject::subConfigWidgets()
// Default to all
makeStep
()
->
setBuildTarget
(
buildConfiguration
,
"all"
,
true
);
CMakeOpenProjectWizard
copw
(
projectManager
(),
sourceDirectory
(),
buildDirectory
(
buildConfiguration
));
CMakeOpenProjectWizard
copw
(
projectManager
(),
sourceDirectory
(),
buildDirectory
(
buildConfiguration
)
,
environment
(
buildConfiguration
)
);
if
(
copw
.
exec
()
==
QDialog
::
Accepted
)
{
setValue
(
buildConfiguration
,
"buildDirectory"
,
copw
.
buildDirectory
());
parseCMakeLists
();
...
...
@@ -544,7 +548,7 @@ void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader
// Ask the user for where he wants to build it
// and the cmake command line
CMakeOpenProjectWizard
copw
(
m_manager
,
sourceDirectory
());
CMakeOpenProjectWizard
copw
(
m_manager
,
sourceDirectory
()
,
ProjectExplorer
::
Environment
::
systemEnvironment
()
);
copw
.
exec
();
// TODO handle cancel....
...
...
@@ -581,7 +585,11 @@ void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader
mode
=
CMakeOpenProjectWizard
::
NeedToUpdate
;
if
(
mode
!=
CMakeOpenProjectWizard
::
Nothing
)
{
CMakeOpenProjectWizard
copw
(
m_manager
,
sourceFileInfo
.
absolutePath
(),
buildDirectory
(
activeBuildConfiguration
()),
mode
);
CMakeOpenProjectWizard
copw
(
m_manager
,
sourceFileInfo
.
absolutePath
(),
buildDirectory
(
activeBuildConfiguration
()),
mode
,
environment
(
activeBuildConfiguration
()));
copw
.
exec
();
}
}
...
...
@@ -692,7 +700,10 @@ void CMakeBuildSettingsWidget::init(const QString &buildConfiguration)
void
CMakeBuildSettingsWidget
::
openChangeBuildDirectoryDialog
()
{
CMakeOpenProjectWizard
copw
(
m_project
->
projectManager
(),
m_project
->
sourceDirectory
(),
m_project
->
buildDirectory
(
m_buildConfiguration
));
CMakeOpenProjectWizard
copw
(
m_project
->
projectManager
(),
m_project
->
sourceDirectory
(),
m_project
->
buildDirectory
(
m_buildConfiguration
),
m_project
->
environment
(
m_buildConfiguration
));
if
(
copw
.
exec
()
==
QDialog
::
Accepted
)
{
m_project
->
changeBuildDirectory
(
m_buildConfiguration
,
copw
.
buildDirectory
());
m_pathLineEdit
->
setText
(
m_project
->
buildDirectory
(
m_buildConfiguration
));
...
...
src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
View file @
adc7a720
...
...
@@ -96,7 +96,7 @@ QString CMakeManager::cmakeExecutable() const
// we probably want the process instead of this function
// cmakeproject then could even run the cmake process in the background, adding the files afterwards
// sounds like a plan
QProcess
*
CMakeManager
::
createXmlFile
(
const
QStringList
&
arguments
,
const
QString
&
sourceDirectory
,
const
QDir
&
buildDirectory
)
QProcess
*
CMakeManager
::
createXmlFile
(
const
QStringList
&
arguments
,
const
QString
&
sourceDirectory
,
const
QDir
&
buildDirectory
,
const
ProjectExplorer
::
Environment
&
env
)
{
// We create a cbp file, only if we didn't find a cbp file in the base directory
// Yet that can still override cbp files in subdirectories
...
...
@@ -113,6 +113,7 @@ QProcess *CMakeManager::createXmlFile(const QStringList &arguments, const QStrin
QProcess
*
cmake
=
new
QProcess
;
cmake
->
setWorkingDirectory
(
buildDirectoryPath
);
cmake
->
setProcessChannelMode
(
QProcess
::
MergedChannels
);
cmake
->
setEnvironment
(
env
.
toStringList
());
#ifdef Q_OS_WIN
const
QString
generator
=
QLatin1String
(
"-GCodeBlocks - MinGW Makefiles"
);
...
...
src/plugins/cmakeprojectmanager/cmakeprojectmanager.h
View file @
adc7a720
...
...
@@ -59,7 +59,10 @@ public:
virtual
QString
mimeType
()
const
;
QString
cmakeExecutable
()
const
;
QProcess
*
createXmlFile
(
const
QStringList
&
arguments
,
const
QString
&
sourceDirectory
,
const
QDir
&
buildDirectory
);
QProcess
*
createXmlFile
(
const
QStringList
&
arguments
,
const
QString
&
sourceDirectory
,
const
QDir
&
buildDirectory
,
const
ProjectExplorer
::
Environment
&
env
);
static
QString
findCbpFile
(
const
QDir
&
);
static
QString
findDumperLibrary
(
const
ProjectExplorer
::
Environment
&
env
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment