From f17ba38d5380e458b50ae543b34c52b2a2df8e7e Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Fri, 26 Feb 2010 08:30:25 +1000 Subject: Fix file descriptor leak with generic engine on Linux. --- src/plugins/bearer/generic/qgenericengine.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp index a95b14b..ccf1057 100644 --- a/src/plugins/bearer/generic/qgenericengine.cpp +++ b/src/plugins/bearer/generic/qgenericengine.cpp @@ -125,14 +125,11 @@ static QString qGetInterfaceType(const QString &interface) ifreq request; strncpy(request.ifr_name, interface.toLocal8Bit().data(), sizeof(request.ifr_name)); - if (ioctl(sock, SIOCGIFHWADDR, &request) >= 0) { - switch (request.ifr_hwaddr.sa_family) { - case ARPHRD_ETHER: - return QLatin1String("Ethernet"); - } - } - + int result = ioctl(sock, SIOCGIFHWADDR, &request); close(sock); + + if (result >= 0 && request.ifr_hwaddr.sa_family == ARPHRD_ETHER) + return QLatin1String("Ethernet"); #else Q_UNUSED(interface); #endif -- cgit v0.12 From bd4ab4ae4074b4039617fd3afd224f894b9a65c7 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Fri, 26 Feb 2010 11:31:10 +1000 Subject: Fix Symbian build when building for WINSCW with abld. Fix include path to find private QtNetwork headers. --- src/plugins/bearer/symbian/symbian.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/bearer/symbian/symbian.pro b/src/plugins/bearer/symbian/symbian.pro index 9fd1a74..9613def 100644 --- a/src/plugins/bearer/symbian/symbian.pro +++ b/src/plugins/bearer/symbian/symbian.pro @@ -21,6 +21,7 @@ exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { } INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +symbian-abld:INCLUDEPATH += $$QT_BUILD_TREE/include/QtNetwork/private LIBS += -lcommdb \ -lapsettingshandlerui \ -- cgit v0.12 From 2931f07dbf824b7d11474bc040e08fcc8c01a166 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 26 Feb 2010 13:51:36 +1000 Subject: Speed up compilation of this test with MSVC. This test includes a source file which is almost half a megabyte in size. When compiling with -O2, MSVC2008 can take over 20 minutes to link this test! Turn off optimization, just for this test. --- tests/auto/qscriptvalue/qscriptvalue.pro | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/auto/qscriptvalue/qscriptvalue.pro b/tests/auto/qscriptvalue/qscriptvalue.pro index 1588cc5..191cd4a 100644 --- a/tests/auto/qscriptvalue/qscriptvalue.pro +++ b/tests/auto/qscriptvalue/qscriptvalue.pro @@ -5,3 +5,10 @@ HEADERS += tst_qscriptvalue.h # Generated by testgen SOURCES += tst_qscriptvalue_generated.cpp + + +win32-msvc* { + # With -O2, MSVC takes up to 24 minutes to compile this test! + QMAKE_CXXFLAGS_RELEASE -= -O1 -O2 + QMAKE_CXXFLAGS_RELEASE += -Od +} -- cgit v0.12