Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
90e12652
Commit
90e12652
authored
Mar 12, 2009
by
Roberto Raggi
Browse files
Store the toolChain and includePaths in the .user file.
parent
3eafefd2
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/genericprojectmanager/genericproject.cpp
View file @
90e12652
...
...
@@ -262,13 +262,6 @@ QStringList GenericProject::files(FilesMode fileMode) const
return
_rootNode
->
files
();
}
void
GenericProject
::
saveSettingsImpl
(
ProjectExplorer
::
PersistentSettingsWriter
&
writer
)
{
qDebug
()
<<
Q_FUNC_INFO
;
Project
::
saveSettingsImpl
(
writer
);
}
QStringList
GenericProject
::
targets
()
const
{
QStringList
targets
;
...
...
@@ -308,6 +301,26 @@ void GenericProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsRead
const
QFileInfo
fileInfo
(
file
()
->
fileName
());
setValue
(
all
,
buildDirectory
,
fileInfo
.
absolutePath
());
}
QString
toolChainId
=
reader
.
restoreValue
(
QLatin1String
(
"toolChain"
)).
toString
();
if
(
toolChainId
.
isEmpty
())
toolChainId
=
QLatin1String
(
"gcc"
);
toolChainId
=
toolChainId
.
toLower
();
// ### move
_rootNode
->
setToolChainId
(
toolChainId
);
const
QStringList
includePaths
=
reader
.
restoreValue
(
QLatin1String
(
"includePaths"
)).
toStringList
();
_rootNode
->
setIncludePaths
(
includePaths
);
}
void
GenericProject
::
saveSettingsImpl
(
ProjectExplorer
::
PersistentSettingsWriter
&
writer
)
{
qDebug
()
<<
Q_FUNC_INFO
;
Project
::
saveSettingsImpl
(
writer
);
writer
.
saveValue
(
"toolChain"
,
_rootNode
->
toolChainId
());
writer
.
saveValue
(
"includePaths"
,
_rootNode
->
includePaths
());
}
////////////////////////////////////////////////////////////////////////////////////
...
...
src/plugins/genericprojectmanager/genericprojectnodes.cpp
View file @
90e12652
...
...
@@ -74,9 +74,7 @@ void GenericProjectNode::refresh()
_files
=
convertToAbsoluteFiles
(
projectPath
,
projectInfo
.
value
(
QLatin1String
(
"files"
)).
toStringList
());
_generated
=
convertToAbsoluteFiles
(
projectPath
,
projectInfo
.
value
(
QLatin1String
(
"generated"
)).
toStringList
());
_includePaths
=
convertToAbsoluteFiles
(
projectPath
,
projectInfo
.
value
(
QLatin1String
(
"includes"
)).
toStringList
());
_defines
=
projectInfo
.
value
(
QLatin1String
(
"defines"
)).
toStringList
();
_toolChainId
=
projectInfo
.
value
(
QLatin1String
(
"toolchain"
),
QLatin1String
(
"gcc"
)).
toString
().
toLower
();
FileNode
*
projectFileNode
=
new
FileNode
(
projectFilePath
(),
ProjectFileType
,
/* generated = */
false
);
...
...
@@ -230,12 +228,18 @@ QStringList GenericProjectNode::generated() const
QStringList
GenericProjectNode
::
includePaths
()
const
{
return
_includePaths
;
}
void
GenericProjectNode
::
setIncludePaths
(
const
QStringList
&
includePaths
)
{
_includePaths
=
convertToAbsoluteFiles
(
QDir
(
path
()),
includePaths
);
}
QStringList
GenericProjectNode
::
defines
()
const
{
return
_defines
;
}
QString
GenericProjectNode
::
toolChainId
()
const
{
return
_toolChainId
;
}
void
GenericProjectNode
::
setToolChainId
(
const
QString
&
toolChainId
)
{
_toolChainId
=
toolChainId
;
}
bool
GenericProjectNode
::
hasTargets
()
const
{
qDebug
()
<<
Q_FUNC_INFO
;
...
...
src/plugins/genericprojectmanager/genericprojectnodes.h
View file @
90e12652
...
...
@@ -69,11 +69,15 @@ public:
void
refresh
();
QString
toolChainId
()
const
;
void
setToolChainId
(
const
QString
&
toolChainId
);
QStringList
includePaths
()
const
;
void
setIncludePaths
(
const
QStringList
&
includePaths
);
QStringList
files
()
const
;
QStringList
generated
()
const
;
QStringList
includePaths
()
const
;
QStringList
defines
()
const
;
QString
toolChainId
()
const
;
private:
FolderNode
*
findOrCreateFolderByName
(
const
QString
&
filePath
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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