Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
mantidproject
mantid
Commits
eb492c95
Commit
eb492c95
authored
6 years ago
by
David Fairbrother
Browse files
Options
Downloads
Patches
Plain Diff
Re #22878 Rebase doxygen and unused param fixup
parent
c244f6a7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MantidPlot/src/ProjectRecovery.cpp
+55
-0
55 additions, 0 deletions
MantidPlot/src/ProjectRecovery.cpp
MantidPlot/src/ProjectRecovery.h
+2
-3
2 additions, 3 deletions
MantidPlot/src/ProjectRecovery.h
with
57 additions
and
3 deletions
MantidPlot/src/ProjectRecovery.cpp
+
55
−
0
View file @
eb492c95
...
@@ -333,6 +333,7 @@ void ProjectRecovery::stopProjectSaving() {
...
@@ -333,6 +333,7 @@ void ProjectRecovery::stopProjectSaving() {
}
}
}
}
<<<<<<<
HEAD
void
ProjectRecovery
::
loadRecoveryCheckpoint
(
const
Poco
::
Path
&
recoveryFolder
,
void
ProjectRecovery
::
loadRecoveryCheckpoint
(
const
Poco
::
Path
&
recoveryFolder
,
const
Poco
::
Path
&
historyDest
)
{
const
Poco
::
Path
&
historyDest
)
{
ScriptingWindow
*
scriptWindow
=
m_windowPtr
->
getScriptWindowHandle
();
ScriptingWindow
*
scriptWindow
=
m_windowPtr
->
getScriptWindowHandle
();
...
@@ -368,6 +369,60 @@ void ProjectRecovery::loadRecoveryCheckpoint(const Poco::Path &recoveryFolder,
...
@@ -368,6 +369,60 @@ void ProjectRecovery::loadRecoveryCheckpoint(const Poco::Path &recoveryFolder,
void
ProjectRecovery
::
openInEditor
(
const
Poco
::
Path
&
inputFolder
,
void
ProjectRecovery
::
openInEditor
(
const
Poco
::
Path
&
inputFolder
,
const
Poco
::
Path
&
historyDest
)
{
const
Poco
::
Path
&
historyDest
)
{
=======
/**
* Asynchronously loads a recovery checkpoint by opening
* a scripting window to the ordered workspace
* history file, then execute it. When this finishes the
* project loading mechanism is invoked in the main GUI thread
* to recreate all Qt objects / widgets
*
* @param recoveryFolder : The checkpoint folder
* @throws : If Qt binding fails to main GUI thread
*/
void
ProjectRecovery
::
loadRecoveryCheckpoint
(
const
Poco
::
Path
&
recoveryFolder
)
{
ScriptingWindow
*
scriptWindow
=
m_windowPtr
->
getScriptWindowHandle
();
if
(
!
scriptWindow
)
{
throw
std
::
runtime_error
(
"Could not get handle to scripting window"
);
}
// Ensure the window repaints so it doesn't appear frozen before exec
scriptWindow
->
executeCurrentTab
(
Script
::
ExecutionMode
::
Serialised
);
g_log
.
notice
(
"Re-opening GUIs"
);
auto
projectFile
=
Poco
::
Path
(
recoveryFolder
).
append
(
OUTPUT_PROJ_NAME
);
bool
loadCompleted
=
false
;
if
(
!
QMetaObject
::
invokeMethod
(
m_windowPtr
,
"loadProjectRecovery"
,
Qt
::
BlockingQueuedConnection
,
Q_RETURN_ARG
(
bool
,
loadCompleted
),
Q_ARG
(
const
std
::
string
,
projectFile
.
toString
())))
{
throw
std
::
runtime_error
(
"Project Recovery: Failed to load project windows - Qt binding failed"
);
}
if
(
!
loadCompleted
)
{
g_log
.
warning
(
"Loading failed to recovery everything completely"
);
return
;
}
g_log
.
notice
(
"Project Recovery finished"
);
// Restart project recovery when the async part finishes
clearAllCheckpoints
();
startProjectSaving
();
}
/**
* Compiles the project recovery script from a given checkpoint
* folder and opens this in the script editor
*
* @param inputFolder : The folder containing the checkpoint to recover
* @param historyDest : Where to save the ordered history
* @throws If a handle to the scripting window cannot be obtained
*/
void
ProjectRecovery
::
openInEditor
(
const
Poco
::
Path
&
inputFolder
,
const
Poco
::
Path
&
historyDest
)
{
>>>>>>>
Re
#
22878
Remove
unused
param
and
add
doxygen
compileRecoveryScript
(
inputFolder
,
historyDest
);
compileRecoveryScript
(
inputFolder
,
historyDest
);
// Force application window to create the script window first
// Force application window to create the script window first
...
...
This diff is collapsed.
Click to expand it.
MantidPlot/src/ProjectRecovery.h
+
2
−
3
View file @
eb492c95
...
@@ -81,9 +81,8 @@ private:
...
@@ -81,9 +81,8 @@ private:
/// Deletes oldest checkpoints beyond the maximum number to keep
/// Deletes oldest checkpoints beyond the maximum number to keep
void
deleteExistingCheckpoints
(
size_t
checkpointsToKeep
)
const
;
void
deleteExistingCheckpoints
(
size_t
checkpointsToKeep
)
const
;
/// Loads a recovery checkpoint in the given folder - TODO in future PR
/// Loads a recovery checkpoint in the given folder
void
loadRecoveryCheckpoint
(
const
Poco
::
Path
&
path
,
void
loadRecoveryCheckpoint
(
const
Poco
::
Path
&
path
);
const
Poco
::
Path
&
historyDest
);
/// Open a recovery checkpoint in the scripting window
/// Open a recovery checkpoint in the scripting window
void
openInEditor
(
const
Poco
::
Path
&
inputFolder
,
void
openInEditor
(
const
Poco
::
Path
&
inputFolder
,
...
...
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