8#include <private/qdebug_p.h>
9#include "qplatformdefs.h"
14#include "private/qcore_unix_p.h"
15#include "private/qlocking_p.h"
18#include <private/qcore_mac_p.h>
21#include <private/qcoreapplication_p.h>
22#include <private/qthread_p.h>
32# include <sys/neutrino.h>
39#include <sys/resource.h>
42#if __has_include(<paths.h>)
45#if __has_include(<linux/close_range.h>)
47# include <linux/close_range.h>
58# define _PATH_DEV "/dev/"
61# define _PATH_TTY _PATH_DEV "tty"
73#if !defined(Q_OS_DARWIN)
96namespace QtVforkSafe {
117# define LIBC_PREFIX __libc_
118#elif defined(Q_OS_FREEBSD)
120# define LIBC_PREFIX _
124# define CONCAT(x, y) CONCAT2(x, y)
125# define CONCAT2(x, y) x ## y
126# define DECLARE_FUNCTIONS(NAME) \
127 extern decltype(::NAME) CONCAT(LIBC_PREFIX, NAME); \
128 static constexpr auto NAME = std::addressof(CONCAT(LIBC_PREFIX, NAME));
130# define DECLARE_FUNCTIONS(NAME) using ::NAME;
134DECLARE_FUNCTIONS(sigaction)
138#undef DECLARE_FUNCTIONS
141static void change_sigpipe(
decltype(SIG_DFL) new_handler)
144 sa.sa_handler = new_handler;
145 sigaction(SIGPIPE, &sa,
nullptr);
154 if (encodedName !=
"/" && !encodedName.
endsWith(
"/."))
162 int pipe[2] = { -1, -1 };
163 AutoPipe(
int flags = 0)
169 for (
int fd : pipe) {
175 explicit operator bool()
const {
return pipe[0] >= 0; }
176 int &operator[](
int idx) {
return pipe[idx]; }
177 int operator[](
int idx)
const {
return pipe[idx]; }
185static_assert(std::is_trivial_v<ChildError>);
187static_assert(PIPE_BUF >=
sizeof(ChildError));
192 QProcessPoller(
const QProcessPrivate &proc);
196 pollfd &stdinPipe() {
return pfds[0]; }
197 pollfd &stdoutPipe() {
return pfds[1]; }
198 pollfd &stderrPipe() {
return pfds[2]; }
199 pollfd &forkfd() {
return pfds[3]; }
205QProcessPoller::QProcessPoller(
const QProcessPrivate &proc)
207 for (
int i = 0;
i < n_pfds;
i++)
210 stdoutPipe().fd = proc.stdoutChannel.pipe[0];
211 stderrPipe().fd = proc.stderrChannel.pipe[0];
213 if (!proc.writeBuffer.isEmpty()) {
214 stdinPipe().fd = proc.stdinChannel.pipe[1];
215 stdinPipe().events = POLLOUT;
218 forkfd().fd = proc.forkfd;
229 struct CharPointerList
231 std::unique_ptr<char *[]> pointers;
235 operator char **()
const {
return pointers.get(); }
242 const QProcessPrivate *
d;
243 CharPointerList argv;
244 CharPointerList envp;
246 int workingDirectory = -2;
250 return workingDirectory != -1;
253 QChildProcess(QProcessPrivate *
d)
255 envp(
d->environmentPrivate())
257 if (!
d->workingDirectory.isEmpty()) {
259 if (workingDirectory < 0) {
260 d->setErrorAndEmit(QProcess::FailedToStart,
"chdir: "_L1 +
qt_error_string());
276 disableThreadCancellations();
278 ~QChildProcess() noexcept(
false)
280 if (workingDirectory >= 0)
281 close(workingDirectory);
283 restoreThreadCancellations();
287 void maybeBlockSignals() noexcept
294 sigfillset(&emptyset);
295 pthread_sigmask(SIG_SETMASK, &emptyset, &oldsigset);
299 void restoreSignalMask() const noexcept
302 pthread_sigmask(SIG_SETMASK, &oldsigset,
nullptr);
305 bool usingVfork() const noexcept;
307 template <typename Lambda>
int doFork(Lambda &&childLambda)
316 _exit(childLambda());
320 int startChild(pid_t *pid)
322 int ffdflags = FFD_CLOEXEC | (usingVfork() ? 0 : FFD_USE_FORK);
323 return ::vforkfd(ffdflags, pid, &QChildProcess::startProcess,
this);
331 Q_UNREACHABLE_RETURN(-1);
334#if defined(PTHREAD_CANCEL_DISABLE)
336 void disableThreadCancellations() noexcept
339 pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate);
341 void restoreThreadCancellations() noexcept(
false)
344 pthread_setcancelstate(oldstate,
nullptr);
347 void disableThreadCancellations() noexcept {}
348 void restoreThreadCancellations() {}
357 pointers.reset(
new char *[
count + 1]);
358 pointers[
count] =
nullptr;
362 pointers[0] =
reinterpret_cast<char *
>(0);
369 pointers[
i] =
reinterpret_cast<char *
>(
data.size());
374 updatePointers(
count);
384 pointers.reset(
new char *[
count + 1]);
385 pointers[
count] =
nullptr;
387 const auto end = env.
end();
392 pointers[
i] =
reinterpret_cast<char *
>(
data.size());
400 updatePointers(
count);
403void QChildProcess::CharPointerList::updatePointers(
qsizetype count)
405 char *
const base =
const_cast<char *
>(
data.constBegin());
411static bool qt_pollfd_check(
const pollfd &pfd,
short revents)
413 return pfd.fd >= 0 && (pfd.revents & (revents | POLLHUP | POLLERR | POLLNVAL)) != 0;
416static int qt_create_pipe(
int *pipe)
424 qErrnoWarning(
"QProcessPrivate::createPipe: Cannot create pipe %p", pipe);
429void QProcessPrivate::destroyPipe(
int *pipe)
441void QProcessPrivate::closeChannel(Channel *
channel)
449void QProcessPrivate::cleanup()
451 q_func()->setProcessState(QProcess::NotRunning);
454 delete stateNotifier;
455 stateNotifier =
nullptr;
456 destroyPipe(childStartedPipe);
467bool QProcessPrivate::openChannel(Channel &
channel)
471 if (
channel.type == Channel::Normal) {
473 if (qt_create_pipe(
channel.pipe) != 0)
477 if (threadData.loadRelaxed()->hasEventDispatcher()) {
478 if (&
channel == &stdinChannel) {
482 q,
SLOT(_q_canWrite()));
486 const char *receiver;
487 if (&
channel == &stdoutChannel)
488 receiver =
SLOT(_q_canReadStandardOutput());
490 receiver =
SLOT(_q_canReadStandardError());
497 }
else if (
channel.type == Channel::Redirect) {
501 if (&
channel == &stdinChannel) {
506 setErrorAndEmit(QProcess::FailedToStart,
507 QProcess::tr(
"Could not open input redirection for reading"));
509 int mode = O_WRONLY | O_CREAT;
519 setErrorAndEmit(QProcess::FailedToStart,
520 QProcess::tr(
"Could not open input redirection for reading"));
530 if (
channel.type == Channel::PipeSource) {
553 Q_PIPE pipe[2] = { -1, -1 };
554 if (qt_create_pipe(pipe) != 0)
556 sink->pipe[0] = pipe[0];
557 source->pipe[1] = pipe[1];
564void QProcessPrivate::commitChannels()
const
577 if (processChannelMode == QProcess::MergedChannels)
587 if (
program.endsWith(
".app"_L1) && fileInfo.isDir()) {
590 kCFURLPOSIXPathStyle,
true);
600 url = CFURLCopyAbsoluteURL(executableURL);
603 const QCFString str = CFURLCopyFileSystemPath(
url, kCFURLPOSIXPathStyle);
604 return QString::fromCFString(
str);
618inline bool globalUsingVfork() noexcept
620#if defined(__SANITIZE_ADDRESS__) || __has_feature(address_sanitizer)
624#if defined(Q_OS_LINUX) && !QT_CONFIG(forkfd_pidfd)
630#if defined(Q_OS_DARWIN)
639inline bool QChildProcess::usingVfork() const noexcept
641 if (!globalUsingVfork())
644 if (!
d->unixExtras || !
d->unixExtras->childProcessModifier)
649 auto flags =
d->unixExtras->processParameters.flags;
650 return flags.testFlag(QProcess::UnixProcessFlag::UseVFork);
653#ifdef QT_BUILD_INTERNAL
656 return globalUsingVfork();
660void QProcessPrivate::startProcess()
664#if defined (QPROCESS_DEBUG)
665 qDebug(
"QProcessPrivate::startProcess()");
669 if (!openChannels()) {
673 if (qt_create_pipe(childStartedPipe) != 0) {
674 setErrorAndEmit(QProcess::FailedToStart,
"pipe: "_L1 +
qt_error_string(errno));
679 if (threadData.loadRelaxed()->hasEventDispatcher()) {
686 q,
SLOT(_q_startupNotification()));
690 QChildProcess childProcess(
this);
691 if (!childProcess.ok()) {
692 Q_ASSERT(processError != QProcess::UnknownError);
697 q->setProcessState(QProcess::Starting);
698 forkfd = childProcess.startChild(&pid);
699 int lastForkErrno = errno;
703#if defined (QPROCESS_DEBUG)
706 q->setProcessState(QProcess::NotRunning);
707 setErrorAndEmit(QProcess::FailedToStart,
708 QProcess::tr(
"Resource error (fork failure): %1").
arg(
qt_error_string(lastForkErrno)));
718 childStartedPipe[1] = -1;
720 if (stdinChannel.pipe[0] != -1) {
722 stdinChannel.pipe[0] = -1;
725 if (stdinChannel.pipe[1] != -1)
726 ::fcntl(stdinChannel.pipe[1], F_SETFL, ::fcntl(stdinChannel.pipe[1], F_GETFL) | O_NONBLOCK);
728 if (stdoutChannel.pipe[1] != -1) {
730 stdoutChannel.pipe[1] = -1;
733 if (stdoutChannel.pipe[0] != -1)
734 ::fcntl(stdoutChannel.pipe[0], F_SETFL, ::fcntl(stdoutChannel.pipe[0], F_GETFL) | O_NONBLOCK);
736 if (stderrChannel.pipe[1] != -1) {
738 stderrChannel.pipe[1] = -1;
740 if (stderrChannel.pipe[0] != -1)
741 ::fcntl(stderrChannel.pipe[0], F_SETFL, ::fcntl(stderrChannel.pipe[0], F_GETFL) | O_NONBLOCK);
746static constexpr int FakeErrnoForThrow = std::numeric_limits<int>::max();
748static QString startFailureErrorMessage(ChildError &err, [[maybe_unused]] ssize_t bytesRead)
756 if (err.code == FakeErrnoForThrow)
757 return QProcess::tr(
"Child process modifier threw an exception: %1")
758 .arg(std::move(complement));
760 return QProcess::tr(
"Child process modifier reported error: %1")
761 .arg(std::move(complement));
763 return QProcess::tr(
"Child process modifier reported error: %1: %2")
765 return QProcess::tr(
"Child process set up failed: %1: %2")
770failChildProcess(
const QProcessPrivate *
d,
const char *description,
int code)
noexcept
772 ChildError
error = {};
779void QProcess::failChildProcessModifier(
const char *description,
int error)
noexcept
782 failChildProcess(d_func(), description, -
error);
786static const char *applyProcessParameters(
const QProcess::UnixProcessParameters &
params)
790 bool ignore_sigpipe =
params.flags.testFlag(QProcess::UnixProcessFlag::IgnoreSigPipe);
792 QtVforkSafe::change_sigpipe(SIG_IGN);
793 if (
params.flags.testFlag(QProcess::UnixProcessFlag::ResetSignalHandlers)) {
794 struct sigaction sa = {};
795 sa.sa_handler = SIG_DFL;
796 for (
int sig = 1; sig < NSIG; ++sig) {
797 if (!ignore_sigpipe || sig != SIGPIPE)
798 QtVforkSafe::sigaction(sig, &sa,
nullptr);
804 sigprocmask(SIG_SETMASK, &
set,
nullptr);
809 if (
params.flags.testFlag(QProcess::UnixProcessFlag::CloseFileDescriptors)) {
811 int fd =
qMax(STDERR_FILENO + 1,
params.lowestFileDescriptorToClose);
812#if QT_CONFIG(close_range)
815 r = close_range(
fd, INT_MAX, 0);
822 int max_fd = INT_MAX;
823 if (
struct rlimit
limit; getrlimit(RLIMIT_NOFILE, &
limit) == 0)
824 max_fd =
limit.rlim_cur;
825 for ( ;
fd < max_fd; ++
fd)
831 if (
params.flags.testFlag(QProcess::UnixProcessFlag::CreateNewSession)) {
838 if (
params.flags.testFlag(QProcess::UnixProcessFlag::DisconnectControllingTerminal)) {
841 int r = ioctl(
fd, TIOCNOTTY);
842 int savedErrno = errno;
854 if (
params.flags.testFlag(QProcess::UnixProcessFlag::ResetIds)) {
855 int r = setgid(getgid());
856 r = setuid(getuid());
864static void callChildProcessModifier(
const QProcessPrivate *
d)
noexcept
867 if (
d->unixExtras->childProcessModifier)
868 d->unixExtras->childProcessModifier();
870 failChildProcess(
d,
e.what(), FakeErrnoForThrow);
872 failChildProcess(
d,
"throw", FakeErrnoForThrow);
881void QChildProcess::startProcess() const noexcept
890 if (workingDirectory >= 0 && fchdir(workingDirectory) == -1)
891 failChildProcess(
d,
"fchdir", errno);
893 bool sigpipeHandled =
false;
894 bool sigmaskHandled =
false;
898 callChildProcessModifier(
d);
901 if (
const char *what = applyProcessParameters(
d->unixExtras->processParameters))
902 failChildProcess(
d, what, errno);
904 auto flags =
d->unixExtras->processParameters.flags;
905 using P = QProcess::UnixProcessFlag;
906 sigpipeHandled =
flags.testAnyFlags(P::ResetSignalHandlers | P::IgnoreSigPipe);
907 sigmaskHandled =
flags.testFlag(P::ResetSignalHandlers);
909 if (!sigpipeHandled) {
911 QtVforkSafe::change_sigpipe(SIG_DFL);
913 if (!sigmaskHandled) {
921 qt_safe_execv(argv[0], argv);
923 qt_safe_execve(argv[0], argv, envp);
924 failChildProcess(
d,
"execve", errno);
935 stateNotifier->setEnabled(
false);
936 stateNotifier->disconnect(
q);
939 childStartedPipe[0] = -1;
941#if defined (QPROCESS_DEBUG)
942 qDebug(
"QProcessPrivate::processStarted() == %s",
ret <= 0 ?
"true" :
"false");
948 q,
SLOT(_q_processDied()));
949 stateNotifier->setSocket(forkfd);
950 stateNotifier->setEnabled(
true);
952 if (stdoutChannel.notifier)
953 stdoutChannel.notifier->setEnabled(
true);
954 if (stderrChannel.notifier)
955 stderrChannel.notifier->setEnabled(
true);
967qint64 QProcessPrivate::bytesAvailableInChannel(
const Channel *
channel)
const
972 if (::ioctl(
channel->pipe[0], FIONREAD, (
char *) &nbytes) >= 0)
973 available = (
qint64) nbytes;
974#if defined (QPROCESS_DEBUG)
975 qDebug(
"QProcessPrivate::bytesAvailableInChannel(%d) == %lld",
int(
channel - &stdinChannel), available);
984#if defined QPROCESS_DEBUG
985 int save_errno = errno;
986 qDebug(
"QProcessPrivate::readFromChannel(%d, %p \"%s\", %lld) == %lld",
991 if (bytesRead == -1 && errno == EWOULDBLOCK)
1002 if (
d->stdinChannel.closed) {
1003#if defined QPROCESS_DEBUG
1004 qDebug(
"QProcess::writeData(%p \"%s\", %lld) == 0 (write channel closing)",
1011 if (
d->stdinChannel.notifier)
1012 d->stdinChannel.notifier->setEnabled(
true);
1014#if defined QPROCESS_DEBUG
1015 qDebug(
"QProcess::writeData(%p \"%s\", %lld) == %lld (written to buffer)",
1021bool QProcessPrivate::_q_canWrite()
1024 if (stdinChannel.notifier)
1025 stdinChannel.notifier->setEnabled(
false);
1026#if defined QPROCESS_DEBUG
1027 qDebug(
"QProcessPrivate::canWrite(), not writing anything (empty write buffer).");
1032 const bool writeSucceeded = writeToStdin();
1035 closeWriteChannel();
1036 else if (stdinChannel.notifier)
1037 stdinChannel.notifier->setEnabled(!
writeBuffer.isEmpty());
1039 return writeSucceeded;
1042bool QProcessPrivate::writeToStdin()
1048#if defined QPROCESS_DEBUG
1049 qDebug(
"QProcessPrivate::writeToStdin(), write(%p \"%s\", %lld) == %lld",
data,
1054 if (written == -1) {
1058 if (errno == EAGAIN)
1061 closeChannel(&stdinChannel);
1062 setErrorAndEmit(QProcess::WriteError);
1066 if (!emittedBytesWritten && written != 0) {
1067 emittedBytesWritten =
true;
1068 emit q_func()->bytesWritten(written);
1069 emittedBytesWritten =
false;
1074void QProcessPrivate::terminateProcess()
1076#if defined (QPROCESS_DEBUG)
1077 qDebug(
"QProcessPrivate::terminateProcess() pid=%jd", intmax_t(pid));
1080 ::kill(pid, SIGTERM);
1083void QProcessPrivate::killProcess()
1085#if defined (QPROCESS_DEBUG)
1086 qDebug(
"QProcessPrivate::killProcess() pid=%jd", intmax_t(pid));
1089 ::kill(pid, SIGKILL);
1095#if defined (QPROCESS_DEBUG)
1096 qDebug(
"QProcessPrivate::waitForStarted(%lld) waiting for child to start (fd = %d)",
1097 msecs, childStartedPipe[0]);
1104#if defined (QPROCESS_DEBUG)
1105 qDebug(
"QProcessPrivate::waitForStarted(%lld) == false (timed out)", msecs);
1110 bool startedEmitted = _q_startupNotification();
1111#if defined (QPROCESS_DEBUG)
1112 qDebug(
"QProcessPrivate::waitForStarted() == %s", startedEmitted ?
"true" :
"false");
1114 return startedEmitted;
1119#if defined (QPROCESS_DEBUG)
1124 QProcessPoller poller(*
this);
1138 bool readyReadEmitted =
false;
1139 if (qt_pollfd_check(poller.stdoutPipe(), POLLIN) && _q_canReadStandardOutput())
1140 readyReadEmitted =
true;
1141 if (qt_pollfd_check(poller.stderrPipe(), POLLIN) && _q_canReadStandardError())
1142 readyReadEmitted =
true;
1144 if (readyReadEmitted)
1147 if (qt_pollfd_check(poller.stdinPipe(), POLLOUT))
1151 if (processState == QProcess::NotRunning)
1156 if (qt_pollfd_check(poller.forkfd(), POLLIN)) {
1166#if defined (QPROCESS_DEBUG)
1171 QProcessPoller poller(*
this);
1184 if (qt_pollfd_check(poller.stdinPipe(), POLLOUT))
1185 return _q_canWrite();
1187 if (qt_pollfd_check(poller.stdoutPipe(), POLLIN))
1188 _q_canReadStandardOutput();
1190 if (qt_pollfd_check(poller.stderrPipe(), POLLIN))
1191 _q_canReadStandardError();
1194 if (processState == QProcess::NotRunning)
1197 if (qt_pollfd_check(poller.forkfd(), POLLIN)) {
1208#if defined (QPROCESS_DEBUG)
1213 QProcessPoller poller(*
this);
1225 if (qt_pollfd_check(poller.stdinPipe(), POLLOUT))
1228 if (qt_pollfd_check(poller.stdoutPipe(), POLLIN))
1229 _q_canReadStandardOutput();
1231 if (qt_pollfd_check(poller.stderrPipe(), POLLIN))
1232 _q_canReadStandardError();
1235 if (processState == QProcess::NotRunning)
1238 if (qt_pollfd_check(poller.forkfd(), POLLIN)) {
1246void QProcessPrivate::waitForDeadChild()
1255 exitCode =
info.status;
1256 exitStatus =
info.code == CLD_EXITED ? QProcess::NormalExit : QProcess::CrashExit;
1258 delete stateNotifier;
1259 stateNotifier =
nullptr;
1264#if defined QPROCESS_DEBUG
1265 qDebug() <<
"QProcessPrivate::waitForDeadChild() dead with exitCode"
1266 << exitCode <<
", crashed?" << (
info.code != CLD_EXITED);
1270bool QProcessPrivate::startDetached(
qint64 *pid)
1272 AutoPipe startedPipe, pidPipe;
1273 childStartedPipe[1] = startedPipe[1];
1274 if (!startedPipe || !pidPipe) {
1275 setErrorAndEmit(QProcess::FailedToStart,
"pipe: "_L1 +
qt_error_string(errno));
1279 if (!openChannelsForDetached()) {
1286 QChildProcess childProcess(
this);
1287 if (!childProcess.ok()) {
1288 Q_ASSERT(processError != QProcess::UnknownError);
1292 pid_t childPid = childProcess.doFork([&] {
1298 pid_t doubleForkPid;
1299 if (childProcess.startChild(&doubleForkPid) == -1)
1300 failChildProcess(
this,
"fork", errno);
1307 int savedErrno = errno;
1310 if (childPid == -1) {
1311 setErrorAndEmit(QProcess::FailedToStart,
"fork: "_L1 +
qt_error_string(savedErrno));
1318 pidPipe[1] = startedPipe[1] = -1;
1325 ChildError childStatus;
1326 ssize_t startResult =
qt_safe_read(startedPipe[0], &childStatus,
sizeof(childStatus));
1330 qt_safe_waitpid(childPid, &
result, 0);
1332 bool success = (startResult == 0);
1333 if (success && pid) {
1335 if (
qt_safe_read(pidPipe[0], &actualPid,
sizeof(pid_t)) !=
sizeof(pid_t))
1338 }
else if (!success) {
1341 setErrorAndEmit(QProcess::FailedToStart,
1342 startFailureErrorMessage(childStatus, startResult));
IOBluetoothL2CAPChannel * channel
bool endsWith(char c) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
qint64 remainingTime() const noexcept
Returns the remaining time in this QDeadlineTimer object in milliseconds.
\inmodule QtCore \reentrant
static QByteArray encodeName(const QString &fileName)
Converts fileName to an 8-bit encoding that you can use in native APIs.
qsizetype size() const noexcept
iterator insert(const Key &key, const T &value)
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
static QProcessEnvironment systemEnvironment()
static QString findExecutable(const QString &executableName, const QStringList &paths=QStringList())
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QSet< QString >::iterator it
QList< QVariant > arguments
void qErrnoWarning(const char *msg,...)
Combined button and popup list for selecting options.
Lock qt_scoped_lock(Mutex &mutex)
Q_CORE_EXPORT QByteArray toPrintable(const char *data, qint64 len, qsizetype maxSize)
Q_CORE_EXPORT char * qstrncpy(char *dst, const char *src, size_t len)
size_t qstrnlen(const char *str, size_t maxlen)
#define QT_IGNORE_DEPRECATIONS(statement)
static qint64 qt_safe_write(int fd, const void *data, qint64 len)
static int qt_safe_open(const char *pathname, int flags, mode_t mode=0777)
static qint64 qt_safe_read(int fd, void *data, qint64 maxlen)
static struct pollfd qt_make_pollfd(int fd, short events)
static int qt_safe_dup2(int oldfd, int newfd, int flags=FD_CLOEXEC)
static int qt_poll_msecs(struct pollfd *fds, nfds_t nfds, int timeout)
#define EINTR_LOOP(var, cmd)
static int qt_safe_close(int fd)
static qint64 qt_safe_write_nosignal(int fd, const void *data, qint64 len)
static int qt_safe_pipe(int pipefd[2], int flags=0)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Q_DECL_COLD_FUNCTION Q_CORE_EXPORT QString qt_error_string(int errorCode=-1)
constexpr const T & qMax(const T &a, const T &b)
GLenum GLenum GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei GLsizei GLchar * source
GLdouble GLdouble GLdouble GLdouble q
GLsizei GLenum GLboolean sink
static void setError(QJsonObject *response, const QString &msg)
#define Q_ASSERT_X(cond, x, msg)
#define qUtf16Printable(string)
#define Q_AUTOTEST_EXPORT
static QString errorMessage(QUrlPrivate::ErrorCode errorCode, const QString &errorSource, qsizetype errorPosition)
static bool equal(const QChar *a, int l, const char *b)
QFuture< QSet< QChar > > set
[10]
file open(QIODevice::ReadOnly)
QFileInfo info(fileName)
[8]
QUrl url("example.com")
[constructor-url-reference]
QDeadlineTimer deadline(30s)