https://bugs.kde.org/show_bug.cgi?id=508069

            Bug ID: 508069
           Summary: KSystemClipboard on Gnome/Wayland
    Classification: Frameworks and Libraries
           Product: frameworks-kguiaddons
      Version First 6.17.0
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
Flameshot uses KSystemClipboard provided by KGuiAddons. After porting to Qt6
our clipboard functionality stopped working on gnome + wayland. This error is
reported:

```
kf.guiaddons: Could not init WaylandClipboard, falling back to QtClipboard.
```

I then wrote a very minimal working example to demonstrate this bug. If this
code is executed on Gnome + Wayland the same error is printed to the terminal.
Unfortunately falling back to QtClipboard does not work on gnome + wayland. Is
this user error on my part with how we are using the clipboard or is there an
underlying issues?

Note, this did not happen before our Qt6 port. 

```
#include <QApplication>
#include <KSystemClipboard>
#include <QDebug>
#include <QGuiApplication>

int main(int argc, char *argv[]) {
    QApplication app(argc, argv);

    auto clipboard = KSystemClipboard::instance();
    if (!clipboard) {
        qDebug() << "Failed to get KSystemClipboard instance";
        return 1;
    }

    qDebug() << "KSystemClipboard initialized successfully";
    return 0;
}
```

STEPS TO REPRODUCE
1. Compile minimal example shown above
2. See that the error is printed when run on gnome + wayland

OBSERVED RESULT
Error is reported and Qtclipboard is used as a fallback. 

EXPECTED RESULT
No error is reported and clipboard

SOFTWARE/OS VERSIONS
Arch linux, Gnome, wayland

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to