TextEditor: Allow using CodecSelector with BaseTextDocuments

Task-number: QTCREATORBUG-23835
Change-Id: I56133dbf22fdae9f2fec37d0ffd2a35de5fb1ad5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2020-04-14 09:36:53 +02:00
parent d3ebd70ab2
commit d5e09223bf
2 changed files with 3 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ public:
} // namespace TextEditor } // namespace TextEditor
CodecSelector::CodecSelector(QWidget *parent, TextDocument *doc) CodecSelector::CodecSelector(QWidget *parent, Core::BaseTextDocument *doc)
: QDialog(parent) : QDialog(parent)
{ {
m_hasDecodingError = doc->hasDecodingError(); m_hasDecodingError = doc->hasDecodingError();

View File

@@ -31,11 +31,9 @@
#include <QListWidget> #include <QListWidget>
namespace Utils { class ListWidget; } namespace Utils { class ListWidget; }
namespace Core { class BaseTextDocument; }
namespace TextEditor { namespace TextEditor {
class TextDocument;
namespace Internal { namespace Internal {
class CodecSelector : public QDialog class CodecSelector : public QDialog
@@ -44,7 +42,7 @@ class CodecSelector : public QDialog
public: public:
CodecSelector(QWidget *parent, TextDocument *doc); CodecSelector(QWidget *parent, Core::BaseTextDocument *doc);
~CodecSelector() override; ~CodecSelector() override;
QTextCodec *selectedCodec() const; QTextCodec *selectedCodec() const;