| 8 | #include <QMessageBox> |
| 9 | |
| 10 | FileEditor::FileEditor(bool highlighter, QWidget *parent) |
| 11 | : QFrame(parent) |
| 12 | , mFileEditor(new FileDiffEditor()) |
| 13 | { |
| 14 | if (highlighter) |
| 15 | mHighlighter = new Highlighter(mFileEditor->document()); |
| 16 | |
| 17 | const auto layout = new QVBoxLayout(this); |
| 18 | layout->setContentsMargins(QMargins()); |
| 19 | layout->setSpacing(0); |
| 20 | layout->addWidget(mFileEditor); |
| 21 | } |
| 22 | |
| 23 | void FileEditor::editFile(const QString &fileName) |
| 24 | { |