Skip to content

Commit 78d98c5

Browse files
committed
update doc
1 parent 9cc380b commit 78d98c5

File tree

6 files changed

+20
-10
lines changed

6 files changed

+20
-10
lines changed

doc/service.dox

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ int MyService::doStuff(int p1, double p2) {
472472
*/
473473

474474
/*!
475-
@fn QtService::Service::verifyCommand
475+
@fn QtService::Service::verifyCommand2
476476

477477
@param arguments The terminal client arguments
478478
@returns `true` if the arguments are valid, `false` if not
@@ -481,10 +481,10 @@ This method is called on a Terminal client (i.e. *not* the service process, but
481481
process) before it tries to connect to the service. You can implement to provide an early validation
482482
of command line arguments which leads to a better experience when using terminals.
483483

484-
The arguments are pre-filtered, which means the application name as well as QtService-specific
485-
arguments do not appear here. So for example, the command
486-
`service.exe --terminal --backend windows hello world` can be retrieved from this property as
487-
`["hello", "world"]`
484+
The arguments are pre-filtered, which means that QtService-specific arguments do not appear here.
485+
So for example, the command `service.exe --terminal --backend windows hello world` can be retrieved
486+
from this property as
487+
`["service.exe", "hello", "world"]`
488488

489489
@sa Terminal, Service::terminalConnected, Terminal::command
490490
*/

doc/servicecontrol.dox

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Use setError() to set an error from the implementation
138138
*/
139139

140140
/*!
141-
@fn QtService::ServiceControl::create
141+
@fn QtService::ServiceControl::create(const QString &, QString, QObject *)
142142

143143
@param backend The backend to create a control from
144144
@param serviceId The id of the service to control
@@ -157,6 +157,12 @@ service, use ServiceControl::serviceExists
157157
ServiceControl::likelyBackend
158158
*/
159159

160+
/*!
161+
@fn QtService::ServiceControl::create(const QString &, QString, QString, QObject *)
162+
@param serviceNameOverride A custom service name to use instead the one that is derived from the serviceId
163+
@copydetails QtService::ServiceControl::create(const QString &, QString, QObject *)
164+
*/
165+
160166
/*!
161167
@fn QtService::ServiceControl::createFromName(const QString &, const QString &, QObject *)
162168

doc/terminal.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Terminal::requestLine, Terminal::awaitChar, Terminal::awaitChars, Terminal::awai
4949
*/
5050

5151
/*!
52-
@property QtService::Terminal::command
52+
@property QtService::Terminal::command2
5353

5454
@default{<i>Arguments passed to the terminal</i>}
5555

@@ -64,7 +64,7 @@ Service::verifyCommand to verify the passed arguments on the clients side before
6464
the service. After receiving, verify them again and then use them.
6565

6666
@accessors{
67-
@readAc{command()}
67+
@readAc{command2()}
6868
@constantAc
6969
}
7070

src/service/service.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ protected Q_SLOTS:
160160
//! Is called by the backend if a platform specific callback was triggered
161161
virtual QVariant onCallback(const QByteArray &kind, const QVariantList &args);
162162

163-
//! Is called from the terminal process to perform early CLI validation
163+
//! @deprecated Use Service::verifyCommand2 instead
164164
Q_DECL_DEPRECATED virtual bool verifyCommand(const QStringList &arguments);
165+
//! Is called from the terminal process to perform early CLI validation
165166
virtual bool verifyCommand2(const QStringList &arguments);
166167

167168
//! Adds a callback to be called by onCallback for the given kind

src/service/servicecontrol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class Q_SERVICE_EXPORT ServiceControl : public QObject
7575
static QString likelyBackend();
7676
//! Creates a new ServiceControl for the given service on the service manager defined by backend
7777
static ServiceControl *create(const QString &backend, QString serviceId, QObject *parent = nullptr);
78+
//! @copybrief ServiceControl::create(const QString &, QString, QObject *)
7879
static ServiceControl *create(const QString &backend, QString serviceId, QString serviceNameOverride, QObject *parent = nullptr);
7980
//! Creates a new ServiceControl by guessing the service id from the given name and this applications domain
8081
static ServiceControl *createFromName(const QString &backend, const QString &serviceName, QObject *parent = nullptr);

src/service/terminal.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ class Q_SERVICE_EXPORT Terminal : public QIODevice
1818

1919
//! The I/O-mode the terminal operates in
2020
Q_PROPERTY(QtService::Service::TerminalMode terminalMode READ terminalMode CONSTANT)
21-
//! The command line arguments that have been used to create this terminal
21+
//! @deprecated Use QtService::Terminal::command2 instead
2222
Q_PROPERTY(QStringList command READ command CONSTANT)
23+
//! The command line arguments that have been used to create this terminal
2324
Q_PROPERTY(QStringList command2 READ command2 CONSTANT REVISION 2)
2425
//! If true, the terminal will delete itself as soon as the connection has been closed
2526
Q_PROPERTY(bool autoDelete READ isAutoDelete WRITE setAutoDelete NOTIFY autoDeleteChanged)
@@ -79,6 +80,7 @@ class Q_SERVICE_EXPORT Terminal : public QIODevice
7980
Service::TerminalMode terminalMode() const;
8081
//! @readAcFn{Terminal::command}
8182
Q_DECL_DEPRECATED QStringList command() const;
83+
//! @readAcFn{Terminal::command2}
8284
QStringList command2() const;
8385
//! @readAcFn{Terminal::autoDelete}
8486
bool isAutoDelete() const;

0 commit comments

Comments
 (0)