fix: Code typo (#1799)

This commit is contained in:
Ivan
2021-08-04 04:41:23 +03:00
committed by GitHub
parent b2ecb70e38
commit 04cfab4f4d
4 changed files with 5 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ DesktopInfo::DesktopInfo()
DESKTOP_SESSION = e.value(QStringLiteral("DESKTOP_SESSION"));
}
bool DesktopInfo::waylandDectected()
bool DesktopInfo::waylandDetected()
{
return XDG_SESSION_TYPE == QLatin1String("wayland") ||
WAYLAND_DISPLAY.contains(QLatin1String("wayland"),

View File

@@ -18,7 +18,7 @@ public:
SWAY
};
bool waylandDectected();
bool waylandDetected();
WM windowManager();
private:

View File

@@ -37,7 +37,7 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool& ok)
screenPixmap.setDevicePixelRatio(currentScreen->devicePixelRatio());
return screenPixmap;
#elif defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
if (m_info.waylandDectected()) {
if (m_info.waylandDetected()) {
QPixmap res;
// handle screenshot based on DE
switch (m_info.windowManager()) {
@@ -171,7 +171,7 @@ QPixmap ScreenGrabber::grabScreen(int screenNumber, bool& ok)
{
QPixmap p;
bool isVirtual = QApplication::desktop()->isVirtualDesktop();
if (isVirtual || m_info.waylandDectected()) {
if (isVirtual || m_info.waylandDetected()) {
p = grabEntireDesktop(ok);
if (ok) {
QPoint topLeft(0, 0);

View File

@@ -72,7 +72,7 @@ void ScreenshotSaver::saveToClipboard(const QPixmap& capture)
} else {
// Need to send message before copying to clipboard
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
if (DesktopInfo().waylandDectected()) {
if (DesktopInfo().waylandDetected()) {
saveToClipboardMime(capture, "png");
} else {
QApplication::clipboard()->setPixmap(capture);