File indexing completed on 2024-12-22 04:16:41
0001 /* This file is part of the KDE project 0002 * 0003 * SPDX-FileCopyrightText: 2018 Mehmet Salih Çalışkan <msalihcaliskan@gmail.com> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #include "SvgRichTextCtrl.h" 0009 #include <QMimeData> 0010 0011 SvgRichTextCtrl::SvgRichTextCtrl(QWidget* parent /*= nullptr*/) 0012 : QTextEdit(parent) 0013 { 0014 } 0015 0016 void SvgRichTextCtrl::insertFromMimeData(const QMimeData *source) 0017 { 0018 if (!source->hasHtml() && source->hasText()) { 0019 QTextCursor cursor = textCursor(); 0020 cursor.insertText(source->text()); 0021 } else { 0022 QTextEdit::insertFromMimeData(source); 0023 } 0024 }