From d5e09223bf431f787741a33747025c356a5b9560 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 14 Apr 2020 09:36:53 +0200 Subject: [PATCH] TextEditor: Allow using CodecSelector with BaseTextDocuments Task-number: QTCREATORBUG-23835 Change-Id: I56133dbf22fdae9f2fec37d0ffd2a35de5fb1ad5 Reviewed-by: Eike Ziller --- src/plugins/texteditor/codecselector.cpp | 2 +- src/plugins/texteditor/codecselector.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/texteditor/codecselector.cpp b/src/plugins/texteditor/codecselector.cpp index 0e90d3e00fb..1fe3a25da16 100644 --- a/src/plugins/texteditor/codecselector.cpp +++ b/src/plugins/texteditor/codecselector.cpp @@ -58,7 +58,7 @@ public: } // namespace TextEditor -CodecSelector::CodecSelector(QWidget *parent, TextDocument *doc) +CodecSelector::CodecSelector(QWidget *parent, Core::BaseTextDocument *doc) : QDialog(parent) { m_hasDecodingError = doc->hasDecodingError(); diff --git a/src/plugins/texteditor/codecselector.h b/src/plugins/texteditor/codecselector.h index 64081ca3490..eda3b91819f 100644 --- a/src/plugins/texteditor/codecselector.h +++ b/src/plugins/texteditor/codecselector.h @@ -31,11 +31,9 @@ #include namespace Utils { class ListWidget; } +namespace Core { class BaseTextDocument; } namespace TextEditor { - -class TextDocument; - namespace Internal { class CodecSelector : public QDialog @@ -44,7 +42,7 @@ class CodecSelector : public QDialog public: - CodecSelector(QWidget *parent, TextDocument *doc); + CodecSelector(QWidget *parent, Core::BaseTextDocument *doc); ~CodecSelector() override; QTextCodec *selectedCodec() const;