Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
a96267ea
Commit
a96267ea
authored
14 years ago
by
con
Browse files
Options
Downloads
Patches
Plain Diff
Remove some stone old compat code + use methods for user resource path.
Reviewed-by: dt
parent
99a93dc2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/projectexplorer/session.cpp
+1
-30
1 addition, 30 deletions
src/plugins/projectexplorer/session.cpp
with
1 addition
and
30 deletions
src/plugins/projectexplorer/session.cpp
+
1
−
30
View file @
a96267ea
...
@@ -155,18 +155,6 @@ bool SessionFile::load(const QString &fileName)
...
@@ -155,18 +155,6 @@ bool SessionFile::load(const QString &fileName)
QStringList
fileList
=
QStringList
fileList
=
reader
.
restoreValue
(
QLatin1String
(
"ProjectList"
)).
toStringList
();
reader
.
restoreValue
(
QLatin1String
(
"ProjectList"
)).
toStringList
();
QString
configDir
=
QFileInfo
(
m_core
->
settings
()
->
fileName
()).
path
();
QMutableStringListIterator
it
(
fileList
);
while
(
it
.
hasNext
())
{
const
QString
&
file
=
it
.
next
();
if
(
QFileInfo
(
file
).
isRelative
())
{
// We used to write relative paths into the session file
// relative to the session files, and those were stored in the
// config dir
it
.
setValue
(
configDir
+
QLatin1Char
(
'/'
)
+
file
);
}
}
int
openEditorsCount
=
reader
.
restoreValue
(
QLatin1String
(
"OpenEditors"
)).
toInt
();
int
openEditorsCount
=
reader
.
restoreValue
(
QLatin1String
(
"OpenEditors"
)).
toInt
();
future
.
setProgressRange
(
0
,
fileList
.
count
()
+
openEditorsCount
+
2
);
future
.
setProgressRange
(
0
,
fileList
.
count
()
+
openEditorsCount
+
2
);
...
@@ -349,23 +337,6 @@ SessionManager::SessionManager(QObject *parent)
...
@@ -349,23 +337,6 @@ SessionManager::SessionManager(QObject *parent)
m_currentEditor
(
0
),
m_currentEditor
(
0
),
m_virginSession
(
true
)
m_virginSession
(
true
)
{
{
// Create qtcreator dir if it doesn't yet exist
QString
configDir
=
QFileInfo
(
m_core
->
settings
()
->
fileName
()).
path
();
QFileInfo
fi
(
configDir
+
"/qtcreator/"
);
if
(
!
fi
.
exists
())
{
QDir
dir
;
dir
.
mkpath
(
configDir
+
"/qtcreator"
);
// Move sessions to that directory
foreach
(
const
QString
&
session
,
sessions
())
{
QFile
file
(
configDir
+
QLatin1Char
(
'/'
)
+
session
+
QLatin1String
(
".qws"
));
if
(
file
.
exists
())
if
(
file
.
copy
(
configDir
+
QLatin1String
(
"/qtcreator/"
)
+
session
+
QLatin1String
(
".qws"
)))
file
.
remove
();
}
}
connect
(
m_core
->
modeManager
(),
SIGNAL
(
currentModeChanged
(
Core
::
IMode
*
)),
connect
(
m_core
->
modeManager
(),
SIGNAL
(
currentModeChanged
(
Core
::
IMode
*
)),
this
,
SLOT
(
saveActiveMode
(
Core
::
IMode
*
)));
this
,
SLOT
(
saveActiveMode
(
Core
::
IMode
*
)));
...
@@ -1023,7 +994,7 @@ QStringList SessionManager::sessions() const
...
@@ -1023,7 +994,7 @@ QStringList SessionManager::sessions() const
{
{
if
(
m_sessions
.
isEmpty
())
{
if
(
m_sessions
.
isEmpty
())
{
// We are not initialized yet, so do that now
// We are not initialized yet, so do that now
QDir
sessionDir
(
QFileInfo
(
m_core
->
settings
()
->
fileName
()).
path
()
+
"/qtcreator/"
);
QDir
sessionDir
(
Core
::
ICore
::
instance
()
->
userResourcePath
()
);
QList
<
QFileInfo
>
sessionFiles
=
sessionDir
.
entryInfoList
(
QStringList
()
<<
QLatin1String
(
"*.qws"
),
QDir
::
NoFilter
,
QDir
::
Time
);
QList
<
QFileInfo
>
sessionFiles
=
sessionDir
.
entryInfoList
(
QStringList
()
<<
QLatin1String
(
"*.qws"
),
QDir
::
NoFilter
,
QDir
::
Time
);
Q_FOREACH
(
const
QFileInfo
&
fileInfo
,
sessionFiles
)
{
Q_FOREACH
(
const
QFileInfo
&
fileInfo
,
sessionFiles
)
{
if
(
fileInfo
.
completeBaseName
()
!=
"default"
)
if
(
fileInfo
.
completeBaseName
()
!=
"default"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment