From d3ba2d6f3f7cbdd8a4e41a7967874f53a2caaec3 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Thu, 3 Apr 2014 15:17:49 +0200 Subject: GStreamer: cleanup system includes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced some linux includes with to be more portable. Use qt_safe_open() and qt_safe_close() instead of ::open() and ::close(). Task-number: QTBUG-38061 Change-Id: Idb3f50d070ec1701cafba98e79e2e85824653a3a Reviewed-by: Lisandro Damián Nicanor Pérez Meyer Reviewed-by: Christian Stromme --- src/gsttools/gsttools.pro | 2 +- src/gsttools/qgstreamervideoinputdevicecontrol.cpp | 15 +++------------ 2 files changed, 4 insertions(+), 13 deletions(-) (limited to 'src/gsttools') diff --git a/src/gsttools/gsttools.pro b/src/gsttools/gsttools.pro index 46184965c..2a0933bb3 100644 --- a/src/gsttools/gsttools.pro +++ b/src/gsttools/gsttools.pro @@ -2,7 +2,7 @@ TEMPLATE = lib TARGET = qgsttools_p QPRO_PWD = $$PWD -QT = core multimedia-private gui-private +QT = core-private multimedia-private gui-private !static:DEFINES += QT_MAKEDLL diff --git a/src/gsttools/qgstreamervideoinputdevicecontrol.cpp b/src/gsttools/qgstreamervideoinputdevicecontrol.cpp index ad61aefad..e4e202caf 100644 --- a/src/gsttools/qgstreamervideoinputdevicecontrol.cpp +++ b/src/gsttools/qgstreamervideoinputdevicecontrol.cpp @@ -44,16 +44,7 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include QGstreamerVideoInputDeviceControl::QGstreamerVideoInputDeviceControl(QObject *parent) @@ -135,7 +126,7 @@ void QGstreamerVideoInputDeviceControl::update() foreach( const QFileInfo &entryInfo, entries ) { //qDebug() << "Try" << entryInfo.filePath(); - int fd = ::open(entryInfo.filePath().toLatin1().constData(), O_RDWR ); + int fd = qt_safe_open(entryInfo.filePath().toLatin1().constData(), O_RDWR ); if (fd == -1) continue; @@ -165,6 +156,6 @@ void QGstreamerVideoInputDeviceControl::update() m_names.append(entryInfo.filePath()); m_descriptions.append(name); } - ::close(fd); + qt_safe_close(fd); } } -- cgit v1.2.3