Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Showcase
  4. Qt daemon
QtWS25 Last Chance

Qt daemon

Scheduled Pinned Locked Moved Showcase
servicedaemon
7 Posts 5 Posters 10.2k 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.
  • kshegunovK Offline
    kshegunovK Offline
    kshegunov
    Moderators
    wrote on last edited by kshegunov
    #1

    Hello,
    It ain't exactly flashy, but here's an alternative to QtService if anyone would like to make use of it (Qt 5.5 compatible).

    (Copy from the readme)

    There are two exposed classes QDaemonApplication and QDaemonLog.

    QDaemonApplication is derived from QCoreApplication and provides the basic infrastructure for the daemon.
    QDaemonApplication exposes 5 signals:

    • daemonized() - emitted when the application is started as a daemon/service by the OS and notifies the user that initializations (like connecting signals/slots) can be done.
    • started() - emitted when the application is run as a controlling terminal, notifying the user that the daemon/servicehas started.
    • stopped() - emitted when the application is run as a controlling terminal, notifying the user that the daemon/service has stopped.
    • installed() - emitted when the application is run as a controlling terminal, notifying the user that the daemon/service has been installed.
    • uninstalled() - emitted when the application is run as a controlling terminal, notifying the user that the daemon/service been uninstalled.

    QDaemonLog is the logging component for the daemon. It's set up to output on stdout when the application is run as controlling terminal, and to a file (named after the application with .log extension) when the application is ran as daemon/service.
    The logging component can be used by the user through QDaemonLog & qDaemonLog(); coupled with QDaemonLog & << (const QString &) or void qDaemonLog(const QString &, QDaemonLog::EntrySeverity). Currently the format of the output messages is fixed.

    Enjoy!

    PS.
    If you decide to use and find any bugs, please report them in the repo.

    Read and abide by the Qt Code of Conduct

    1 Reply Last reply
    4
    • the_T Offline
      the_T Offline
      the_
      wrote on last edited by
      #2

      @kshegunov

      This sounds good. Thanks for sharing this code

      -- No support in PM --

      1 Reply Last reply
      0
      • kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by kshegunov
        #3

        It seems I'm replying to myself, but I just wanted to let you know that after some (internal) refactoring. The library now supports command line arguments to be passed to the daemon/service as well (specified on --install/--fake). However the library now requires Qt 5.6.

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply
        0
        • Hamed.MasafiH Offline
          Hamed.MasafiH Offline
          Hamed.Masafi
          wrote on last edited by
          #4

          Great. I went looking for something like this. Thanks for sharing.
          A Question. Is this library stable? If not, when stable version will be released?

          Remote object sharing (OO RPC)
          http://forum.qt.io/topic/60680/remote-object-sharing-oo-rpc-solved

          Advanced, Powerful and easy to use ORM for Qt5
          https://forum.qt.io/topic/67417/advanced-powerful-and-easy-to-use-orm-for-qt5

          kshegunovK 1 Reply Last reply
          0
          • Hamed.MasafiH Hamed.Masafi

            Great. I went looking for something like this. Thanks for sharing.
            A Question. Is this library stable? If not, when stable version will be released?

            kshegunovK Offline
            kshegunovK Offline
            kshegunov
            Moderators
            wrote on last edited by kshegunov
            #5

            @Hamed.Masafi

            Is this library stable? If not, when stable version will be released?

            It depends on what you mean by stable.

            If you mean the API, then probably you can safely say it's stable. I don't plan any (big) changes in the API. As for the binaries, it is binary compatible.

            If you mean performance, I suppose it's stable enough. I have a project deployed with it and hadn't had any problems yet. Also it was reported by @madababi that the library works fine on Raspberry PI (with proper cross-compiling of course). There's always the possibility of minor bugs, but it should be fully functional.

            Note There's currently no support for OSX.

            Kind regards.

            Read and abide by the Qt Code of Conduct

            1 Reply Last reply
            0
            • M Offline
              M Offline
              moretromain
              wrote on last edited by moretromain
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • Konstantin FominK Offline
                Konstantin FominK Offline
                Konstantin Fomin
                wrote on last edited by
                #7

                Konstantin!
                I am not very strong in English.
                I would like to talk about your library.
                Can we chat somewhere else?
                Facebook? or somewhere else?

                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