aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/kristalltextbrowser.cpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2021-03-06 20:26:21 +0100
committerFelix (xq) Queißner <git@mq32.de>2021-03-06 20:29:50 +0100
commit0396fdb01d12e51bd2cc63478819b366c0453d29 (patch)
tree082fcd53b7b61c0dc2a0dc6b676729e155c07fd2 /src/widgets/kristalltextbrowser.cpp
parent21c821c49ef82d1e84b0b9c8c3d357dc559479d4 (diff)
downloadkristall-0396fdb01d12e51bd2cc63478819b366c0453d29.tar.gz
Moves all globals into a structure that can be deleted before the app exists. Fixes #193.
Diffstat (limited to 'src/widgets/kristalltextbrowser.cpp')
-rw-r--r--src/widgets/kristalltextbrowser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/kristalltextbrowser.cpp b/src/widgets/kristalltextbrowser.cpp
index 67e7976..5f34c10 100644
--- a/src/widgets/kristalltextbrowser.cpp
+++ b/src/widgets/kristalltextbrowser.cpp
@@ -7,6 +7,7 @@
#include <QTouchDevice>
#include <QRegularExpression>
#include <QLineEdit>
+#include <QApplication>
const Qt::CursorShape KristallTextBrowser::NORMAL_CURSOR = Qt::IBeamCursor;
@@ -133,7 +134,7 @@ void KristallTextBrowser::betterCopy()
if (text.contains(REGEX_ONLY_QUOTES))
{
// Copy the original text.
- kristall::clipboard->setText(text);
+ qApp->clipboard()->setText(text);
return;
}
@@ -151,5 +152,5 @@ void KristallTextBrowser::betterCopy()
text.replace(QChar(0x2029), "\n");
#endif
- kristall::clipboard->setText(text);
+ qApp->clipboard()->setText(text);
}