summaryrefslogtreecommitdiff
path: root/src/plugins/cppcheck/cppchecktextmark.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-07-14 15:44:58 +0200
committerhjk <hjk@qt.io>2022-07-15 07:06:25 +0000
commitd83eb0494a955f9a770f40e1d3ab812a0fea0158 (patch)
tree0a809440ae48708a3ae0ce2c60f78e6bb03faf52 /src/plugins/cppcheck/cppchecktextmark.cpp
parenta5cb967704187db594fdb20d79067b582d771c7f (diff)
downloadqt-creator-d83eb0494a955f9a770f40e1d3ab812a0fea0158.tar.gz
Use setClipboardAndSelection more broadly
Basically everywhere besides the EmacsKeys plugin. Change-Id: Iaf2a0a5d791b5b3dd6df2c05c1b862516630d3f8 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/cppcheck/cppchecktextmark.cpp')
-rw-r--r--src/plugins/cppcheck/cppchecktextmark.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/cppcheck/cppchecktextmark.cpp b/src/plugins/cppcheck/cppchecktextmark.cpp
index d3446a0610..d42c81388f 100644
--- a/src/plugins/cppcheck/cppchecktextmark.cpp
+++ b/src/plugins/cppcheck/cppchecktextmark.cpp
@@ -27,11 +27,10 @@
#include "cppcheckdiagnostic.h"
#include "cppchecktextmark.h"
+#include <utils/stringutils.h>
#include <utils/utilsicons.h>
#include <QAction>
-#include <QApplication>
-#include <QClipboard>
#include <QMap>
namespace Cppcheck {
@@ -90,7 +89,7 @@ CppcheckTextMark::CppcheckTextMark (const Diagnostic &diagnostic)
.arg(diagnostic.fileName.toUserOutput())
.arg(diagnostic.lineNumber)
.arg(diagnostic.message);
- QApplication::clipboard()->setText(text);
+ Utils::setClipboardAndSelection(text);
});
setActions({action});
}