Commit b7ce718d authored by Eike Ziller's avatar Eike Ziller

TextEditors: Make function static

Change-Id: I4297651458f6efb28a3bbeb83b4c038956d64305
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 90081329
......@@ -5726,7 +5726,7 @@ void BaseTextEditorWidget::collectToCircularClipboard()
if (!mimeData)
return;
CircularClipboard *circularClipBoard = CircularClipboard::instance();
circularClipBoard->collect(duplicateMimeData(mimeData));
circularClipBoard->collect(BaseTextEditorWidget::duplicateMimeData(mimeData));
// We want the latest copied content to be the first one to appear on circular paste.
circularClipBoard->toLastCollect();
}
......@@ -5742,7 +5742,7 @@ void BaseTextEditorWidget::circularPaste()
{
CircularClipboard *circularClipBoard = CircularClipboard::instance();
if (const QMimeData *clipboardData = QApplication::clipboard()->mimeData()) {
circularClipBoard->collect(duplicateMimeData(clipboardData));
circularClipBoard->collect(BaseTextEditorWidget::duplicateMimeData(clipboardData));
circularClipBoard->toLastCollect();
}
......@@ -5750,7 +5750,7 @@ void BaseTextEditorWidget::circularPaste()
return invokeAssist(QuickFix, d->m_clipboardAssistProvider.data());
if (const QMimeData *mimeData = circularClipBoard->next().data()) {
QApplication::clipboard()->setMimeData(duplicateMimeData(mimeData));
QApplication::clipboard()->setMimeData(BaseTextEditorWidget::duplicateMimeData(mimeData));
paste();
}
}
......@@ -5984,7 +5984,7 @@ void BaseTextEditorWidget::insertFromMimeData(const QMimeData *source)
setTextCursor(cursor);
}
QMimeData *BaseTextEditorWidget::duplicateMimeData(const QMimeData *source) const
QMimeData *BaseTextEditorWidget::duplicateMimeData(const QMimeData *source)
{
Q_ASSERT(source);
......
......@@ -228,7 +228,7 @@ public:
virtual IAssistInterface *createAssistInterface(AssistKind assistKind,
AssistReason assistReason) const;
QMimeData *duplicateMimeData(const QMimeData *source) const;
static QMimeData *duplicateMimeData(const QMimeData *source);
static QString msgTextTooLarge(quint64 size);
......
......@@ -73,7 +73,8 @@ public:
}
//Copy the selected item
QApplication::clipboard()->setMimeData(editwidget->duplicateMimeData(m_mimeData.data()));
QApplication::clipboard()->setMimeData(
BaseTextEditorWidget::duplicateMimeData(m_mimeData.data()));
//Paste
editwidget->paste();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment