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
be3bb250
Commit
be3bb250
authored
Dec 01, 2010
by
con
Browse files
Only show save as button for files that allow it.
parent
964236c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/editormanager/editormanager.cpp
View file @
be3bb250
...
...
@@ -1411,7 +1411,7 @@ EditorManager::makeFileWritable(IFile *file)
IVersionControl
*
versionControl
=
m_d
->
m_core
->
vcsManager
()
->
findVersionControlForDirectory
(
directory
);
const
QString
&
fileName
=
file
->
fileName
();
switch
(
FileManager
::
promptReadOnlyFile
(
fileName
,
versionControl
,
m_d
->
m_core
->
mainWindow
(),
true
))
{
switch
(
FileManager
::
promptReadOnlyFile
(
fileName
,
versionControl
,
m_d
->
m_core
->
mainWindow
(),
file
->
isSaveAsAllowed
()
))
{
case
FileManager
::
RO_OpenVCS
:
if
(
!
versionControl
->
vcsOpen
(
fileName
))
{
QMessageBox
::
warning
(
m_d
->
m_core
->
mainWindow
(),
tr
(
"Failed!"
),
tr
(
"Could not open the file for editing with SCC."
));
...
...
@@ -1479,6 +1479,7 @@ bool EditorManager::saveFileAs(IFile *fileParam)
return
success
;
}
/* Adds the file name to the recent files if there is at least one non-temporary editor for it */
void
EditorManager
::
addFileToRecentFiles
(
IFile
*
file
)
{
bool
isTemporary
=
true
;
...
...
src/plugins/coreplugin/filemanager.cpp
View file @
be3bb250
...
...
@@ -840,7 +840,7 @@ FileManager::ReadOnlyAction
return
RO_OpenVCS
;
if
(
clickedButton
==
makeWritableButton
)
return
RO_MakeWriteable
;
if
(
clickedButton
==
saveAsButton
)
if
(
displaySaveAsButton
&&
clickedButton
==
saveAsButton
)
return
RO_SaveAs
;
return
RO_Cancel
;
}
...
...
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