[Development] Common base class for all socket types

Alfonso Chartier alfonso.chartier at gmail.com
Tue Nov 6 20:49:40 CET 2012


Someone below asked what the motivation is behind having a common abstract
socket base class for all concrete socket types. The reason for this is it
can significantly clean up client code. Currently if I want to handle
different sockets generically (e.g., TCP vs. local), I have to jump through
several hurdles: create my own wrapper class abstraction, maintain separate
lists of objects, etc. A single, common base class would allow client code
to use polymorphism to manage and use socket objects very easily. For
instance, I could then have client code that defines a
QList<QAbstractSocket*> and is able to connect, disconnect, write, read,
etc. from the socket without having to know the concrete class type.

I hope this helps explain why it would be very useful to have a common base
socket class.

Best,

Alfonso


On Tue, Nov 6, 2012 at 10:23 AM, <development-request at qt-project.org> wrote:

> Send Development mailing list submissions to
>         development at qt-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.qt-project.org/mailman/listinfo/development
> or, via email, send a message with subject or body 'help' to
>         development-request at qt-project.org
>
> You can reach the person managing the list at
>         development-owner at qt-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Development digest..."
>
>
> Today's Topics:
>
>    1. Re: Qt5-Beta build from Git on Windows --> Failed to load
>       platform plugin "windows" (Friedemann Kleint)
>    2. CI status update (Anttila Janne)
>    3. Re: Common base class for all socket types (Joseph Crowell)
>    4. Proposal: New list of Qt 5 reference / Tier 1     platforms
>       (Koehne Kai)
>    5. QT.module.rpath is not used properly (Thomas Senyk)
>    6. Re: Qt5 Beta/Qt Quick 2.0 and Antialiasing (Thomas Senyk)
>    7. Re: Proposal: New list of Qt 5 reference / Tier 1 platforms
>       (Charley Bay)
>    8. Re: QT.module.rpath is not used properly (Romain Pokrzywka)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 6 Nov 2012 12:01:40 +0100
> From: Friedemann Kleint <Friedemann.Kleint at digia.com>
> Subject: Re: [Development] Qt5-Beta build from Git on Windows -->
>         Failed to load platform plugin "windows"
> To: <development at qt-project.org>
> Message-ID: <5098EE14.6070705 at digia.com>
> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
>
> Hi,
>
> on Windows XP, the load error is most likely caused by
> https://bugreports.qt-project.org/browse/QTBUG-27741  ,  for which the
> fix https://codereview.qt-project.org/#change,38566 is pending.
>
> Regards,
> Friedemann
>
> --
> Friedemann Kleint
> Digia, Qt
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 6 Nov 2012 13:09:02 +0000
> From: Anttila Janne <Janne.Anttila at digia.com>
> Subject: [Development] CI status update
> To: "development at qt-project.org" <development at qt-project.org>
> Cc: F?lt Simo <Simo.Falt at digia.com>,    Piippo Samuli
>         <Samuli.Piippo at digia.com>
> Message-ID:
>         <4FFE12DBF801B047A01A1673B57F24F03E9B2299 at IT-EXMB01-HKI.it.local>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I thought it might be good idea to summarize what has been happening on CI
> lately.
> So here is summary about CI system changes and some status info from weeks
> 44-45:
>
> 1. OpenSSL installed to Windows CI testers
>     -> Auto-detection for configure time check is now true
>     -> SSL related auto test are build & executed during CI round
>
> 2. ICU4C is installed to Windows CI testers
>     -> WebKit is built on those CI jobs which have webkit dependency
>         (QtTools, QtQuick1 and QtWebkit demos&examples)
>     -> Increases webkit testing and reduces problems in release process
>
> 3. WebKit mirror taken into use for CI init-repository step
>     -> Should increase reliability of WebKit fetching
>
> 4. Angle based Windows CI stage added for all CI projects
>     -> Angle based configuration is now being tested, but all projects
>          have forcesuccess & qt.tests.insignicant enabled for now
>
> 5. Temporarily with qt.tests.insiginifant marked 4.8 CI jobs made enforcing
>     -> Temporary workaround due to Nokia -> Digia migration removed
>     -> Still work needed to fix individual insignificant test cases:
>          https://bugreports.qt-project.org/browse/QTQAINFRA-574
>
> 6. Test Scheduler taken into use for Qt 4.8 CI
>     -> 4.8 CI failures reported to Gerrit should be formatted better
>     -> It is possible to start adding parallel_test attribute for 4.x
> autotests
>     -> Possibility to speed-up 4.8 CI round
>
> 7. Marked some more CI jobs enforcing
>     -> QtGraphicalEffects, QtScript and QtWebKit Examples&Demos
>     -> Autotests were passing, ensure they stay that way
>
> 8. SysAdmin repo clean-ups
>     -> Clean-up for some Nokia specific stuff in puppet configurations
>
> 9. Improved rebooting hook taken into use in Jenkins
>     -> Some CI failures were suspected to be caused by failing reboot
> between CI jobs
>     -> To be followed if this reduces CI failures
>
> 10. Possibly jom related errors being studied
>     -> Made jom installation on Windows machines controlled by Puppet to
> ease
>          changing used jom version
>     -> Jom was only used in
> QtBase_master_Integration/win32-msvc2010_Windows_7,
>          Jom disabled also on that job until stability problems are solved
>     -> Tested different jom version on CI development machines, definitely
> working
>          jom version still not found
>
> 11. Jenkins server memory configuration updated
>     -> There were some CI jobs failing due to Jenkins JVM was running OOM
>     -> Fixed by changing JVM memory configs to "-Xmx1024m
> -XX:MaxPermSize=256m"
>     -> In addition more memory added for Virtual Machine running Jenkins
>
> 12. CI GIT mirror configuration updated
>     -> There have been some GIT fetching related CI failures, updated GIT
>        daemon configs on CI mirror should reduce possibility of those
> failures
>
> 13. Simo F?lt (CC) joined CI team
>     -> Simo is currently working to enable Webkit CI in Qt-Project CI
> system
>     -> Target: WebKit dependency can be removed from QtTools and QtQuick1
> CI
>     -> RevDep testing for QtTools and QtQuick1 to be performed only when
> webkit
>        is updated
>
> 14. xUnit Jenkins plugin installation and usage being studied on
> development CI
>     -> Possibly provides better and more visual overview to autotest
> results
>
> 15. More OSX capacity being installed to Digia hosted CI system
>     -> Macs have been the biggest bottleneck on HW side, with extended
> capacity
>        we prepare for taking the repository branching in use after Qt5
> Beta 2
>
> 16. QtLocation and QtConnectivity CI is broken due to the fact that their
>     dependencies were removed from Qt5.git
>     -> CI uses init-repository script to fetch dependencies listed in
> sync.profile
>     -> Because Qt5.git does not contain necessary dependencies anymore CI
>        fails. Solution under investigation
>
> Let's see if the CI status update will be something that we will sent out
> regularly,
> if not them we will try to keep you updated at least about all big changes
> in CI.
>
> Br,
> --
> Janne Anttila
> Senior Architect - Digia, Qt
> Visit us on: http://qt.digia.com
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 07 Nov 2012 01:18:20 +1000
> From: Joseph Crowell <joseph.w.crowell at gmail.com>
> Subject: Re: [Development] Common base class for all socket types
> To: development at qt-project.org
> Message-ID: <50992A3C.2020704 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 11/6/2012 7:52 PM, d3fault wrote:
> > You want to obey a randomly declared 'feature-freeze'
> It wasn't randomly declared. :D It has been set in stone since around
> May and is standard practice for open source projects near time for a
> stable release usually starting at the first beta release. Otherwise, a
> stable release would never get done. Don't tell me you don't understand
> why.
>
> > and decline a
> > SUPERIOR re-design that can only take place during BC breakages? It's
> > not like it'd be that hard to implement. Sure, we're in a feature
> > freeze.... but that's nothing compared to a 'BC promise' that 5 will
> > set in stone.
> >
> > <*insert holy war argument here*>
> >
> > d3fault
> > _______________________________________________
> > Development mailing list
> > Development at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
>
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 6 Nov 2012 16:08:06 +0000
> From: Koehne Kai <Kai.Koehne at digia.com>
> Subject: [Development] Proposal: New list of Qt 5 reference / Tier 1
>         platforms
> To: "development at qt-project.org" <development at qt-project.org>
> Message-ID:
>         <5B2736A3C8B75B4BB66BC58DC5E889B0815F34 at IT-EXMB01-HKI.it.local>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> The list of reference & Tier 1 platforms at
> http://qt-project.org/wiki/Qt-5#Platforms is somewhat out of date ...
> Here is a new proposal
>
> Reference Platforms:
>
> We have the following platform configurations as reference platforms for
> Qt 5.0:
>
> PLATFORM                      CONFIGURATION
> COMPILER
> linux-x86-32-gcc-x11          Ubuntu Linux 11.10 ?86 32 bit, X11        as
> provided
> linux-x86-64-gcc-x11          Ubuntu Linux 11.10 ?86 64 bit, X11        as
> provided
> windows-7-32-msvc2010-angle   Microsoft Windows 7 32 bit, ANGLE
> MSVC2010-SP1 32-bit
> osx-10.7-64                   Apple Mac OS X 10.7 "Lion" Cocoa 64 bit   as
> provided
>
>
> Tier 1 platforms:
>
> In addition to the reference platform configurations, we support the
> following configurations on Tier 1 level.
>
> PLATFORM                      CONFIGURATION
> COMPILER
> windows-7-64-msvc2010-angle   Microsoft Windows 7 64 bit, ANGLE
> MSVC2010-SP1 64-bit
> windows-7-32-msvc2010-opengl  Microsoft Windows 7 32 bit, OpenGL
>  MSVC2010-SP1 32-bit
> windows-7-64-msvc2010-opengl  Microsoft Windows 7 64 bit, OpenGL
>  MSVC2010-SP1 64-bit
> windows-7-32-mingw-builds     Microsoft Windows XP Windows 7 32 bit
> gcc 4.7 (MinGW-builds)
> windows-xp-32-msvc2008        Microsoft Windows XP SP3 32 bit
> MSVC 2008 32-bit
> osx-10.6-64                   Apple Mac OS X 10.6 Cocoa 64 bit          as
> provided
>
>
>
>
> Remarks:
>
> Before you shoot, check
> http://qt-project.org/groups/qt-contributors-summit-2011/wiki/Qt5ProductDefinition#4582cf86974b397c8f3a2ed2fd502f8cto see what we agreed upon back then what the requirements of a 'reference
> platform' and 'Tier 1 platform' are, specifically  that they are in tested
> by the CI system, and are available as alpha, beta, final packages.
>
> windows-7-64-msvc2010, windows-7-64-msvc2010-angle,
> windows-7-32-mingw-builds aren't checked in the CI system right now. Still
> I think they are important enough to deserve an exception, and remain in
> Tier 1.
>
> I understood that whether we can keep osx-10.6-64 bit as Tier 1 platform
> for qtwebkit is yet unclear.
>
> Finally, I don't know what to do  with the *wayland, *mips, *icc platforms
> in the current version of the page.
>
>
> Regards
>
> Kai
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 06 Nov 2012 18:17:04 +0100
> From: Thomas Senyk <thomas.senyk at pelagicore.com>
> Subject: [Development] QT.module.rpath is not used properly
> To: "development at qt-project.org" <development at qt-project.org>
> Message-ID: <6119981.d6fI2CGlsb at rudolf>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi Folks,
>
> I got a self-written mkspec for the rasp-pi and everything is working as
> expected.
>
> With one exception, for external applications he is not adding the proper
>  -Wl,-rpath,<prefix>
>
>
> The problem is that:
> cat /usr/local/Trolltech/Qt5-rasp-pi-2/mkspecs/modules/qt_lib_* |grep rpath
>
> returns nothing.
>
>  --> the installed module pri files do not contain the rpath and rpath-link
> variables anymore.
>
> The ones in the qt-build-directory do.
> e.g.: qt_lib_core.pri contains:
> QT.core.rpath = /usr/local/Trolltech/Qt5-rasp-pi-2/lib
>
>
>
> Any though how/why they vanished?
>
>
>
> FYI:
> If you add a module to "QT" in your project file, qt_functions.prf:93 will
> add:
>  -Wl,-rpath,<SYSROOT!!>/<prefix>
>
> ...which is totally wrong... but maybe expected if QT.module.rpath is
> empty?
>
> Greets
> Thomas
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 06 Nov 2012 18:47:43 +0100
> From: Thomas Senyk <thomas.senyk at pelagicore.com>
> Subject: Re: [Development] Qt5 Beta/Qt Quick 2.0 and Antialiasing
> To: development at qt-project.org
> Message-ID: <1490562.lJUZGjmAkB at rudolf>
> Content-Type: text/plain; charset="us-ascii"
>
> On Tue, October 30, 2012 11:14:46 AM Labs, Torsten wrote:
> > Hello,
> >
> > we created some prototype with Qt Quick 2 on a ARM board. Its running
> verry
> > well except antialiasing. As i can see in the Qt5 Documentation there is
> a
> > new flag for antialiasing *
> > antialiasing<
> http://qt-project.org/doc/qt-5.0/qml-qtquick2-item.html#antial
> > iasing-prop> : bool
> >
> > but this makes no difference. Is there still a bug?
> >
> > Thx
> >
> > Torsten
>
> In general it's the duty of the platform plugin (I assume eglfs or
> minimalegl?) to provide a native-surface which has multisampling.
>
>
> The application-level API to request a multisample surface is:
> http://doc-snapshot.qt-project.org/5.0/qsurfaceformat.html#setSamples
>
> Then set the changed surfaceformat with:
> http://doc-snapshot.qt-project.org/5.0/qwindow.html#setFormat
>
>
> If it's still not working, you need to check what's going in the platform-
> plugin
>  - Is their a native egl/opengl-surface which has multisampling aviable?
>  - Is the platform-plugin using it? why not?
>
>
> Greets
> Thomas
>
> >
> >
> >
> > With best regards,
> > Torsten Labs
> >
> > Siemens AG
> > Industry Sector
> > Industry Automation Division
> > Industrial Automation Systems
> > Factory Automation
> > I IA AS FA WF FTH 2
> > Siemensstr. 2-4
> > 90766 Fuerth, Germany
> > Tel.: +49 911 978-3682
> > mailto:torsten.labs at siemens.com
> >
> > Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard
> > Cromme; Managing Board: Peter Loescher, Chairman, President and Chief
> > Executive Officer; Roland Busch, Brigitte Ederer, Klaus Helmrich, Joe
> > Kaeser, Barbara Kux, Hermann Requardt, Siegfried Russwurm, Peter Y.
> > Solmssen, Michael Suess; Registered offices: Berlin and Munich, Germany;
> > Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB
> 6684;
> > WEEE-Reg.-No. DE 23691322
>
>
> ------------------------------
>
> Message: 7
> Date: Tue, 6 Nov 2012 10:59:03 -0700
> From: Charley Bay <charleyb123 at gmail.com>
> Subject: Re: [Development] Proposal: New list of Qt 5 reference / Tier
>         1       platforms
> To: Koehne Kai <Kai.Koehne at digia.com>
> Cc: "development at qt-project.org" <development at qt-project.org>
> Message-ID:
>         <
> CAOqNE30xUWcgc5Dpxn61nh8Msg0GxkdiNWX0ifpB3GcifymDmA at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Kai spaketh:
> > The list of reference & Tier 1 platforms at
> http://qt-project.org/wiki/Qt-5#Platforms
> > is somewhat out of date ... Here is a new proposal <snip>,
>
> Seems fine to me.
>
> An aside -- serious suggestion:
>
> We are successfully using the, "MSVS2010, SP1" compiler within the
> "MSVS2008 IDE" using the steps found here:
>
> <
> http://www.codeproject.com/Tips/105011/Using-Visual-Studio-2008-IDE-with-Visual-C-2010-co
> >
>
> IMHO, the MSVS2010 IDE is, "badly-broken" and quite unusable for our needs.
>
> REQUEST:  For the Tier-1 "MSVS2010, SP1, Win7-32bit" release, IT WOULD
> BE NICE if "QMake" would still have the OPTION to generate "MSVS2008
> *.vcproj" instances.  Please.  Pretty Please.  And then, I will send
> you home-made cookies.  Every month.
>
> --charley
>
>
> ------------------------------
>
> Message: 8
> Date: Tue, 6 Nov 2012 10:23:05 -0800
> From: Romain Pokrzywka <romain.pokrzywka at gmail.com>
> Subject: Re: [Development] QT.module.rpath is not used properly
> To: Thomas Senyk <thomas.senyk at pelagicore.com>
> Cc: "development at qt-project.org" <development at qt-project.org>
> Message-ID:
>         <
> CAKNafds0heWtdD44LZHWrA6r7my4pp+Dc0FZ6mwmoyk8-ZQc9Q at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I have a fix for this issue in Gerrit which has been waiting for weeks:
>
> https://codereview.qt-project.org/35394
>
> But it hasn't been approved yet because apparently ossi thinks the commit
> log isn't clear enough. Maybe you can explain it to him in better words
> than I do.
>
> Romain
> On Nov 6, 2012 9:27 AM, "Thomas Senyk" <thomas.senyk at pelagicore.com>
> wrote:
>
> > Hi Folks,
> >
> > I got a self-written mkspec for the rasp-pi and everything is working as
> > expected.
> >
> > With one exception, for external applications he is not adding the proper
> >  -Wl,-rpath,<prefix>
> >
> >
> > The problem is that:
> > cat /usr/local/Trolltech/Qt5-rasp-pi-2/mkspecs/modules/qt_lib_* |grep
> rpath
> >
> > returns nothing.
> >
> >  --> the installed module pri files do not contain the rpath and
> rpath-link
> > variables anymore.
> >
> > The ones in the qt-build-directory do.
> > e.g.: qt_lib_core.pri contains:
> > QT.core.rpath = /usr/local/Trolltech/Qt5-rasp-pi-2/lib
> >
> >
> >
> > Any though how/why they vanished?
> >
> >
> >
> > FYI:
> > If you add a module to "QT" in your project file, qt_functions.prf:93
> will
> > add:
> >  -Wl,-rpath,<SYSROOT!!>/<prefix>
> >
> > ...which is totally wrong... but maybe expected if QT.module.rpath is
> > empty?
> >
> > Greets
> > Thomas
> > _______________________________________________
> > Development mailing list
> > Development at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.qt-project.org/pipermail/development/attachments/20121106/ffd37e58/attachment.html
>
> ------------------------------
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
>
> End of Development Digest, Vol 14, Issue 18
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121106/d32e424a/attachment.html>


More information about the Development mailing list