KProcess overhaul [PATCH]

Thiago Macieira thiago at kde.org
Tue May 16 10:56:49 BST 2006


Ralf Habacker wrote:
>While trying to port some of the above mentioned locations to QProcess I
>encountered a Qt issue using the QProcess pid() method, which is
>implemented different on win32 systems
>
>#if defined(Q_OS_WIN32)
>typedef struct _PROCESS_INFORMATION* Q_PID;
>#else
>typedef qint64 Q_PID;
>#endif
>...
>Q_PID pid() const;
>
>
>This requires to wrap every reference to pid() depending on the platform
>which is very annoying.
>
>#ifdef Q_WS_WIN
>if (process->pid())
>    pid = process->pid()->dwProcessId;
>#else
>    pid = process->pid();
>#endif

Why do you need access to the process ID anyways?

-- 
Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
  thiago.macieira (AT) trolltech.com     Trolltech AS
    GPG: 0x6EF45358                   |  Sandakerveien 116,
    E067 918B B660 DBD1 105C          |  NO-0402
    966C 33F5 F005 6EF4 5358          |  Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060516/47153b96/attachment.sig>


More information about the kde-core-devel mailing list