Re: [Interest] QTcpSocket on error Signal not emitted
Sorry forgot to mention because of this some times it gives me a warning QAbstractSocket::connectToHost() called when already looking up or connecting/connected and my ping stop working ! On Fri, May 3, 2013 at 5:22 PM, Thiago Macieira thiago.macie...@intel.comwrote: On sexta-feira, 3 de maio de 2013 10.25.57, Abhishek wrote: Hello, I am writing a Tcp client program, which ping server every 3 sec. the general behaviour is : 1) client connects to server 2) send a identification packet 3) server checks the packet and reply accordingly *4) server ends the connection. (not client) * so I get a error QAbstractSocket::error(QAbstractSocket::SocketError) = RemoteHostClosedError (I guess its because server ends the connection) but when I get this error the QAbstractSocket::disconnected() signal is emited but this is not emitted for other types of error which is confusing me. What other errors? -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest -- Abhishek http://thezeroth.net ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] error connecting signals
I moved the slot to PlayerBase and it compiles and runs now. I don’t really understand why. Hi I have a little problem connecting a signal to a slot. I’ve the following two classes: DisplayManager which extends QObjects and of course has the Q_OBJECT macro in it and VideoPlayer which extends PlayerBase, IControllable and IPlaceable. PlayerBase extends QObject and has the macro in it. When I try to connect the signal like this: connect(vp1, VideoPlayer::next, this, DisplayManager::nextVideo); I get this strange error: /usr/include/qt/QtCore/qobject.h:221: Fehler:request for member 'qt_check_for_QOBJECT_macro' is ambiguous /usr/include/qt/QtCore/qobject.h:239: Fehler:reference to 'QtPrivate::FunctionPointervoid (VideoPlayer::*)()::Object {aka VideoPlayer}::staticMetaObject' is ambiguous I don’t see any hint about where to look for a solution. Thanks in advance. Freundliche Grüsse / Best Regards / Meilleures salutations Adrian Stern Diese E-Mail und ihre Anhänge enthalten vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail inklusive Anhänge. Das unerlaubte Kopieren sowie die unbefugte Weitergabe der Inhalte dieser Mail ist nicht gestattet. This e-mail and any attachments may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail including the attachments. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Diese E-Mail und ihre Anhänge enthalten vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail inklusive Anhänge. Das unerlaubte Kopieren sowie die unbefugte Weitergabe der Inhalte dieser Mail ist nicht gestattet. This e-mail and any attachments may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail including the attachments. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] error connecting signals
Hi, please keep the discussion on the list. On 7 May 2013 14:08, Adrian Stern adrian.st...@screenfood.com wrote: It was in the VideoPlayer whil it wasn't working. Now that it is in PlayerBase it is working. Why? Because, as you said, VideoPlayer was lacking the Q_OBJECT macro. Rule of thumb: put Q_OBJECT in each and every QObject subclass. And why can I cast a VideoPlayer to a PlayerBase but not in the other direction? What do you mean? You can always cast for free to a base*, but you need an explicit cast to go towards a derived class. -- Giuseppe D'Angelo *unless you're inheriting from it multiple times and stuff like this ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Q_WS_WIN and Q_WS_MAC still appear
Using 5.0.2 open source Hi, I understood that the above defines have been replaced with Q_OS_xxx defines. However the SDK is full of the old ones (which are not defined anywhere), for example in \qtbase\src\widgets\util\qcolormap.h line 83. Were these overlooked or were left on purpose? Thanks, Gil. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] error connecting signals
Hey I don't understand exactly. But when i put the Q_Object macro in VideoPlayer, I ghet the errors: ...Debug/moc_videoplayer.cpp:70: Fehler:'QObject' is an ambiguous base of 'VideoPlayer' Shouldn't VideoPlayer inherit this macro from PlayerBase since it is a derived class? class VideoPlayer : public PlayerBase, public IControllable, public IPlaceable { Q_INTERFACES(PlayerBase IControllable IPlaceable) ... } class PlayerBase : public QObject { Q_OBJECT ... } Freundliche Grüsse / Best Regards / Meilleures salutations Adrian Stern __ -Original Message- From: Giuseppe D'Angelo [mailto:dange...@gmail.com] Sent: 07 May 2013 14:46 To: Adrian Stern; interest@qt-project.org Subject: Re: [Interest] error connecting signals Hi, please keep the discussion on the list. On 7 May 2013 14:08, Adrian Stern adrian.st...@screenfood.com wrote: It was in the VideoPlayer whil it wasn't working. Now that it is in PlayerBase it is working. Why? Because, as you said, VideoPlayer was lacking the Q_OBJECT macro. Rule of thumb: put Q_OBJECT in each and every QObject subclass. And why can I cast a VideoPlayer to a PlayerBase but not in the other direction? What do you mean? You can always cast for free to a base*, but you need an explicit cast to go towards a derived class. -- Giuseppe D'Angelo *unless you're inheriting from it multiple times and stuff like this Diese E-Mail und ihre Anhänge enthalten vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail inklusive Anhänge. Das unerlaubte Kopieren sowie die unbefugte Weitergabe der Inhalte dieser Mail ist nicht gestattet. This e-mail and any attachments may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail including the attachments. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Q_WS_WIN and Q_WS_MAC still appear
On 07/05/2013 14:49, Gil Moses wrote: Hi, I understood that the above defines have been replaced with Q_OS_xxx defines. However the SDK is full of the old ones (which are not defined anywhere), for example in \qtbase\src\widgets\util\qcolormap.h line 83. Were these overlooked or were left on purpose? Most of the Q_WS_* defines were left on purpose to gradually move the code in those defines to proper places. In the case of qcolormap.h though, it looks like an oversight. Cheers, Joerg -- Joerg Bornemann Senior Software Engineer - Digia, Qt http://qt.digia.com/ ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QSqlDatabase
On 5/6/2013 5:01 PM, Karl Ruetz wrote: Did you check QSqlDatabase::lastError()? Might give you a clue. I'd also check any logs generated by the DBMS to see if a table has become corrupted or some such thing. Karl On 2013-05-06 13:00, Duane wrote: Why would bool QSqlDatabase::transaction () return false? I have a system that has been running for years and recently, intermittently calls to this function have been failing. I haven't checked LastError but I did check the MySql log and there were no errors. I will add some debugging that dumps the last error. I don't think it's a corrupted table or anything because I would get errors for that and also, just restarting MySql service clears the problem for a couple weeks. One thing that I noticed, we have multiple apps and on this installation one set of apps is running using Qt4.5.1 and another set is using 4.7.1. They both use the plugins for MySql. I'm wondering if there could be some issue with that? ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QTcpSocket on error Signal not emitted
On terça-feira, 7 de maio de 2013 10.09.00, Abhishek wrote: Sorry forgot to mention because of this some times it gives me a warning QAbstractSocket::connectToHost() called when already looking up or connecting/connected and my ping stop working ! Sounds self-explanatory to me. It's still trying to connect from the last time. You must either abort() that attempt or let it finish. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center signature.asc Description: This is a digitally signed message part. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QSqlDatabase
On terça-feira, 7 de maio de 2013 09.10.36, Duane wrote: I haven't checked LastError but I did check the MySql log and there were no errors. I will add some debugging that dumps the last error. I don't think it's a corrupted table or anything because I would get errors for that and also, just restarting MySql service clears the problem for a couple weeks. If restarting the server clears the issue, it looks like a server issue. Have you tried upgrading your MySQL server to the latest MariaDB release? One thing that I noticed, we have multiple apps and on this installation one set of apps is running using Qt4.5.1 and another set is using 4.7.1. They both use the plugins for MySql. I'm wondering if there could be some issue with that? No, it shouldn't be. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center signature.asc Description: This is a digitally signed message part. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] error connecting signals
On terça-feira, 7 de maio de 2013 12.52.39, Adrian Stern wrote: I don't understand exactly. But when i put the Q_Object macro in VideoPlayer, I ghet the errors: ...Debug/moc_videoplayer.cpp:70: Fehler:'QObject' is an ambiguous base of 'VideoPlayer' Shouldn't VideoPlayer inherit this macro from PlayerBase since it is a derived class? class VideoPlayer : public PlayerBase, public IControllable, public IPlaceable It should. Check IControllable and IPlaceable. One or both of those classes also derives from QObject. You need to remove that inheritance. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center signature.asc Description: This is a digitally signed message part. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QSqlDatabase
On 5/7/2013 11:30 AM, Thiago Macieira wrote: On terça-feira, 7 de maio de 2013 09.10.36, Duane wrote: I haven't checked LastError but I did check the MySql log and there were no errors. I will add some debugging that dumps the last error. I don't think it's a corrupted table or anything because I would get errors for that and also, just restarting MySql service clears the problem for a couple weeks. If restarting the server clears the issue, it looks like a server issue. Have you tried upgrading your MySQL server to the latest MariaDB release? I can try to have the customer upgrade their server. But we have this same configuration in several locations. What's odd is that this has been running for years and just started having this issue a few weeks ago. This typically indicates a Windows update or something. I don't think this is a Qt error, nor an error in our apps as nothing has chanced in them. I'm assuming it something else affecting the server. We aren't the only application on this database. I need some way to find what is causing it. I am adding some debugging to report the database errors but the .err file from mysql shows no errors so I am not optimistic. One thing that I noticed, we have multiple apps and on this installation one set of apps is running using Qt4.5.1 and another set is using 4.7.1. They both use the plugins for MySql. I'm wondering if there could be some issue with that? No, it shouldn't be. I don't think so either. I have checked a couple of other installations that don't have this problem and they are set up similarly. I notice that the others ones have a higher number of max connections so I'm looking at that. I've increased the number and asked their IT guys to do show processlist if this happens again. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QSqlDatabase
Op 7-5-2013 18:06, Duane schreef: I don't think this is a Qt error, nor an error in our apps as nothing has chanced in them. I'm assuming it something else affecting the server. We aren't the only application on this database. I need some way to find what is causing it. I am adding some debugging to report the database errors but the .err file from mysql shows no errors so I am not optimistic. You might want to investigate the stability of your network connection between your server and your client. André One thing that I noticed, we have multiple apps and on this installation one set of apps is running using Qt4.5.1 and another set is using 4.7.1. They both use the plugins for MySql. I'm wondering if there could be some issue with that? No, it shouldn't be. I don't think so either. I have checked a couple of other installations that don't have this problem and they are set up similarly. I notice that the others ones have a higher number of max connections so I'm looking at that. I've increased the number and asked their IT guys to do show processlist if this happens again. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest