forked from qt-creator/qt-creator
CodeStyle: Remove edit pop-up
Removed the Edit pop-up on the CodeStyle page. Now editing is available immediately after opening CodeStyle tab. I left a preview on the project CodeStyle page and added a link to global settings. ToDo: In project CodeStyle page replace preview with CodeStyleEditor. I'm not 100% sure that it is needed. If you have some thoughts please write a comment. Change-Id: I31032a97b9668b4f6b06fc6c5c704700fb44ee4f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -35,9 +35,8 @@
|
||||
|
||||
using namespace ClangFormat;
|
||||
|
||||
ClangFormatFile::ClangFormatFile(Utils::FilePath filePath, bool isReadOnly)
|
||||
ClangFormatFile::ClangFormatFile(Utils::FilePath filePath)
|
||||
: m_filePath(filePath)
|
||||
, m_isReadOnly(isReadOnly)
|
||||
{
|
||||
if (!m_filePath.exists()) {
|
||||
// create file and folder
|
||||
@@ -58,7 +57,7 @@ ClangFormatFile::ClangFormatFile(Utils::FilePath filePath, bool isReadOnly)
|
||||
}
|
||||
}
|
||||
|
||||
clang::format::FormatStyle ClangFormatFile::format() {
|
||||
clang::format::FormatStyle ClangFormatFile::style() {
|
||||
return m_style;
|
||||
}
|
||||
|
||||
@@ -78,6 +77,11 @@ bool ClangFormatFile::isReadOnly() const
|
||||
return m_isReadOnly;
|
||||
}
|
||||
|
||||
void ClangFormatFile::setIsReadOnly(bool isReadOnly)
|
||||
{
|
||||
m_isReadOnly = isReadOnly;
|
||||
}
|
||||
|
||||
void ClangFormatFile::resetStyleToQtC()
|
||||
{
|
||||
m_style = qtcStyle();
|
||||
|
||||
Reference in New Issue
Block a user