diff options
author | Eike Ziller <eike.ziller@qt.io> | 2017-04-24 16:01:14 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2017-04-26 07:34:29 +0000 |
commit | 73f2c0f4e825f5f393c3c2aea13dc770728deef9 (patch) | |
tree | a751784dd59c3addf46d75f28db0068d31075393 /src/libs/utils/uncommentselection.h | |
parent | 57b3f7debb2f84d425eec248842384cd61863f3b (diff) | |
download | qt-creator-73f2c0f4e825f5f393c3c2aea13dc770728deef9.tar.gz |
Allow giving TextEditorFactory custom CommentDefinition
It was not possible to set custom comment styles.
Also simplifies the code for the predefined styles.
Change-Id: Id7f345d65b747bfac5a15e3eb15cd2beb106b281
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/libs/utils/uncommentselection.h')
-rw-r--r-- | src/libs/utils/uncommentselection.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libs/utils/uncommentselection.h b/src/libs/utils/uncommentselection.h index 46efe8da97..dbc47bbc64 100644 --- a/src/libs/utils/uncommentselection.h +++ b/src/libs/utils/uncommentselection.h @@ -38,10 +38,12 @@ namespace Utils { class QTCREATOR_UTILS_EXPORT CommentDefinition { public: - CommentDefinition(); + static CommentDefinition CppStyle; + static CommentDefinition HashStyle; - enum Style { NoStyle, CppStyle, HashStyle }; - void setStyle(Style style); + CommentDefinition(); + CommentDefinition(const QString &single, + const QString &multiStart = QString(), const QString &multiEnd = QString()); bool isValid() const; bool hasSingleLineStyle() const; |