Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGuiApplication::commitDataRequest not received with local Qt but received with system Qt

QGuiApplication::commitDataRequest not received with local Qt but received with system Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
session manager
5 Posts 3 Posters 424 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vlanquepin
    wrote on last edited by
    #1

    Hi,
    I need to prevent Fedora 36 user session from closing, so I tried to connect to QGuiApplication::commitDataRequest signal and call cancel on the QSessionManager object.

    This do the trick :

    
    Helper::Helper(QObject *parent)
        : QObject(parent)
    {
        connect(qApp, &QGuiApplication::commitDataRequest,
                this, &Helper::commitData);
    }
    
    
    void Helper::commitData(QSessionManager& manager)
    {
        manager.cancel();
    }
    
    

    But only if my code is compiled with the Qt installed on my system (Qt 5.15.10 - /usr/lib64/qt5/) and not with the Qt installed locally (Qt 5.15.2 - /home/<user>/Qt/...).
    If I execute this code compiled with the Qt installed into my home, the commitDataRequest signal is never received.

    Any idea?

    SGaistS 1 Reply Last reply
    0
    • V vlanquepin

      Hi,
      I need to prevent Fedora 36 user session from closing, so I tried to connect to QGuiApplication::commitDataRequest signal and call cancel on the QSessionManager object.

      This do the trick :

      
      Helper::Helper(QObject *parent)
          : QObject(parent)
      {
          connect(qApp, &QGuiApplication::commitDataRequest,
                  this, &Helper::commitData);
      }
      
      
      void Helper::commitData(QSessionManager& manager)
      {
          manager.cancel();
      }
      
      

      But only if my code is compiled with the Qt installed on my system (Qt 5.15.10 - /usr/lib64/qt5/) and not with the Qt installed locally (Qt 5.15.2 - /home/<user>/Qt/...).
      If I execute this code compiled with the Qt installed into my home, the commitDataRequest signal is never received.

      Any idea?

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Does it also happen if you use Qt 6 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      V 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Does it also happen if you use Qt 6 ?

        V Offline
        V Offline
        vlanquepin
        wrote on last edited by
        #3

        Thanks @SGaist!

        I installed Qt6 this morning (system and local) and yes I have the same behavior.

        I receive QGuiApplication::commitDataRequest with system Qt6 but not with local Qt6...

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vlanquepin
          wrote on last edited by
          #4

          Still blocked. Anyone knows how commitDataRequest works in the low-level code? I would like to understand why my system Qt and my local Qt have not the same behavior on the same code...

          Christian EhrlicherC 1 Reply Last reply
          0
          • V vlanquepin

            Still blocked. Anyone knows how commitDataRequest works in the low-level code? I would like to understand why my system Qt and my local Qt have not the same behavior on the same code...

            Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @vlanquepin said in QGuiApplication::commitDataRequest not received with local Qt but received with system Qt:

            Anyone knows how commitDataRequest works in the low-level code?

            Qt is open-source.

            I would guess it's coming from the platform integration plugin so it's either not built correctly in your local Qt or can not connect to your WM/DM.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved