From 674e79416fefe7b5acf2a8c18d3c91d8feddcc18 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 7 Jul 2013 10:12:24 -0700 Subject: Fix incomplete override of QIODevice::open in QProcess and QLocalSocket The rule for a new override is that it must still work if the old implementation is called. The catch is that any class that derives from QProcess and isn't recompiled will still have QIODevice::open in its virtual table. That is equivalent to overriding open() and calling QIODevice::open() (like the tests). In Qt 5.0, QProcess::start() called QIODevice::open directly, not the virtual open(), so there's no expectation that a user-overridden open() be called. With that in mind, simply fix QProcess::start to not call the virtual open at all. Similarly with QLocalSocket, the calls to open were always non-virtual. Task-number: QTBUG-32284 Change-Id: I88925f0ba08bc23c849658b54582744997e69a4c Reviewed-by: Giuseppe D'Angelo --- src/corelib/io/qprocess_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/io/qprocess_p.h') diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h index 2a2cc9fb84..e96cb42f94 100644 --- a/src/corelib/io/qprocess_p.h +++ b/src/corelib/io/qprocess_p.h @@ -346,6 +346,7 @@ public: QWinEventNotifier *processFinishedNotifier; #endif + void start(QIODevice::OpenMode mode); void startProcess(); #if defined(Q_OS_UNIX) && !defined(Q_OS_QNX) void execChild(const char *workingDirectory, char **path, char **argv, char **envp); -- cgit v1.2.3