[Development] Implementing of a DNS feature under Windows [QTBUG-30166]

2013-09-26 Thread Mandeep Sandhu
Hi All, I'm working on adding support for a custom DNS server in QDnsLookup. The *nix implementation is complete, however I needed some pointers on doing it under Windows. The process of specifying a specific DNS server is sort of 'undocumented'. I've looked at the current implementation of DNS

[Development] Novice question for first-time contributions

2013-09-26 Thread Mandeep Sandhu
Hi All, Couple of days back I had fixed 2 bugs: one was a low priority one [ QTBUG-33439 https://bugreports.qt-project.org/browse/QTBUG-33439] and another was not evaluated yet [QTBUG-32911https://bugreports.qt-project.org/browse/QTBUG-32911], though a similar bug

Re: [Development] Novice question for first-time contributions

2013-09-26 Thread Mandeep Sandhu
On Thu, Sep 26, 2013 at 10:06 PM, Thiago Macieira thiago.macie...@intel.com wrote: On quinta-feira, 26 de setembro de 2013 17:12:09, Mandeep Sandhu wrote: Hi All, Couple of days back I had fixed 2 bugs: one was a low priority one [ QTBUG-33439 https://bugreports.qt-project.org/browse

[Development] Tips needed on doing cross-platform building/testing

2013-09-27 Thread Mandeep Sandhu
Hi All, I'm a Linux (Ubuntu) user. I've recently made some changes for a bug report and wanted to test them on Windows as well. For that I've installed Windows (I've installed 7, do I need to test on other versions as well?) inside VirtualBox. Now I was thinking what was the easiest way to get

Re: [Development] Implementing of a DNS feature under Windows [QTBUG-30166]

2013-09-28 Thread Mandeep Sandhu
On Fri, Sep 27, 2013 at 9:19 PM, Jan Kundrát j...@flaska.net wrote: On Thursday, 26 September 2013 10:33:49 CEST, Mandeep Sandhu wrote: . I'll be using the PIP4_ARRAY struct for specifying the nameserver How would you handle a situation where the user provides an IPv6 address

Re: [Development] Tips needed on doing cross-platform building/testing

2013-09-29 Thread Mandeep Sandhu
Thank you all for your valuable suggestions. I think shadow-build is going to be a life-saver! :) One more question, for testing on Windows, is mandatory to test builds with MinGW (32 and 64 bit) and Visual Studio? Thanks, -mandeep On Fri, Sep 27, 2013 at 9:33 PM, Thiago Macieira

Re: [Development] Implementing of a DNS feature under Windows [QTBUG-30166]

2013-09-30 Thread Mandeep Sandhu
Hi Sahne, Thanks for the heads. Some comments inline... Hi Mandeep, DnsQueryEx unfortunately requires Windows 8. The MSDN doc link doesn't mention any specific OS version: http://msdn.microsoft.com/en-us/library/windows/desktop/hh447188(v=vs.85).aspx But I could be missing something

Re: [Development] Implementing of a DNS feature under Windows [QTBUG-30166]

2013-09-30 Thread Mandeep Sandhu
On Tue, Oct 1, 2013 at 10:10 AM, Chris W chrisw.qtde...@psychogeeks.comwrote: On 01/10/13 14:24, Mandeep Sandhu wrote: The MSDN doc link doesn't mention any specific OS version: http://msdn.microsoft.com/en-us/library/windows/desktop/hh447188(v=vs.85).aspx http://msdn.microsoft.com/en

Re: [Development] Disabling exception support in QtCore?

2013-10-03 Thread Mandeep Sandhu
On Fri, Oct 4, 2013 at 7:08 AM, Thiago Macieira thiago.macie...@intel.comwrote: On quinta-feira, 3 de outubro de 2013 17:11:54, Alex Malyushytskyy wrote: Assuming exceptions are enabled for signal/slots what is going to happen with Qt::QueuedConnection? As far as I understand at this

Re: [Development] DNS resolver docs for Linux/OSX

2013-10-15 Thread Mandeep Sandhu
However, I wanted to know more about the main struct __res_state used in these functions. Google hasn't thrown up much. Basically, I wanted to know the usage of 2 of the fields used in this struct - nssocks[MAXNS] and nsmap[MAXNS]. What values are these supposed to hold? Answering my own

Re: [Development] DNS resolver docs for Linux/OSX

2013-10-15 Thread Mandeep Sandhu
On Tue, Oct 15, 2013 at 9:14 PM, Thiago Macieira thiago.macie...@intel.com wrote: On terça-feira, 15 de outubro de 2013 14:08:38, Mandeep Sandhu wrote: I'm not sure why he's saying so as I've tested programatically setting a IPv6 nameserver and it's working. Hopefully that won't bite us back

Re: [Development] DNS resolver docs for Linux/OSX

2013-10-15 Thread Mandeep Sandhu
On Wed, Oct 16, 2013 at 9:39 AM, Thiago Macieira thiago.macie...@intel.com wrote: On quarta-feira, 16 de outubro de 2013 09:28:10, Mandeep Sandhu wrote: My friend told me you can't walk with a basket ball, but I tried and it worked just fine Well, if the friend told me that you can't walk

[Development] Recover from a bad rebase (incorrect squash)

2013-10-21 Thread Mandeep Sandhu
Hi All, Is there a safe to recover from a bad rebase ? I've squashed commits incorrectly. Situation before rebase was: (oldest) A - B - C - D (newest) I wanted to squash B D together so during interactive rebase, I chose 'squash' options for B D (wrongly assuming that these 2 would get

Re: [Development] Recover from a bad rebase (incorrect squash)

2013-10-21 Thread Mandeep Sandhu
Hi All, Is there a safe to recover from a bad rebase ? I've squashed commits incorrectly. Use 'git reflog' to get the HEAD of the commit before the squash, and use git reset to restore it. Thanks Kai! That fixed it! -mandeep Regards Kai

[Development] Question on Gerrit workflow

2013-10-21 Thread Mandeep Sandhu
Hi All, I have a newbie question on our Gerrit workflow. Suppose a change I'm working on is split across 3 commits. Each commit implements a part of the functionality of the change. Once I get approval for a particular changeset, should I merge it to staging immediately or wait for approval for

[Development] Need help in verifying OSX build/testing of a feature

2013-10-30 Thread Mandeep Sandhu
Hi All, I'm was working on small feature for specifying custom DNS server to QDnsLookup (QTBUG-30166). I wanted to test out the feature on OSX, but I don't have a machine handy. Can someone with a working OSX setup test the following patches for build failures?

Re: [Development] Order of macro expansion in compiler error messages

2013-12-16 Thread Mandeep Sandhu
On Sun, Dec 8, 2013 at 1:54 AM, Thiago Macieira thiago.macie...@intel.com wrote: On sábado, 7 de dezembro de 2013 15:03:26, Chris Colbert wrote: Is there a line missing from Option A, just after the line for stdin? This specific compiler did not output anything for this case. That case was a

[Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-23 Thread Mandeep Sandhu
Hi All, Few days back I stumbled upon this task: https://bugreports.qt-project.org/browse/QTBUG-8232 QNetworkAccessManager should support redirection I think this is a useful feature that can be added to QNAM as it makes the life of a developer easy. I went through all the comments in the task

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-24 Thread Mandeep Sandhu
2. New redirected(QUrl) signal to be emitted in case auto-redirects are enabled and a redirection occurs. This interface wouldn't be enough to let you distinguish between the different types of redirect, though tbh I'm not sure that matters. By different types, I guess you mean the different

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-24 Thread Mandeep Sandhu
3. QNetworkReply stores both, the original as well as the final url. What about the intermediate ones in a chain of redirects? Another question that springs to mind is what should the QNetworkReply object returned to the user reflect while the redirects are going on? Eg: What should the

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-26 Thread Mandeep Sandhu
Your thoughts? The download progress signal will have to be emitted for the intermediate requests. Things like operation() and url() are stored in the request object which can't be changed by the QNAM at all. If people want all the details then they must implement their own redirection

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-26 Thread Mandeep Sandhu
There is no downloadProgress for any intermediate requests. We know that we're redirecting before we get the first byte of data out of the server. At that point, we can abandon the QHttpNetworkReply and move on to the next already. The downloadProgress signal gives info about the received

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-26 Thread Mandeep Sandhu
On Thu, Dec 26, 2013 at 8:12 PM, Richard Moore r...@kde.org wrote: On 26 December 2013 13:11, Thiago Macieira thiago.macie...@intel.com wrote: On quinta-feira, 26 de dezembro de 2013 18:15:56, Mandeep Sandhu wrote: We could emit download progress for each intermediate request, but won't

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-27 Thread Mandeep Sandhu
On Thu, Dec 26, 2013 at 11:06 PM, Richard Moore r...@kde.org wrote: On 26 December 2013 17:10, Mandeep Sandhu mandeepsandhu@gmail.com wrote: On Thu, Dec 26, 2013 at 8:12 PM, Richard Moore r...@kde.org wrote: On 26 December 2013 13:11, Thiago Macieira thiago.macie...@intel.com wrote

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-29 Thread Mandeep Sandhu
Maybe rare for URL shorteners. Internal redirects inside a web site or group of sites are a different matter: call me an old-grumpy-Mosaic-user if you like, but I usually add a body of the if you are not redirected automatically click here -type when I program redirects, I usually even

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-29 Thread Mandeep Sandhu
No, it doesn't. It includes only data. The HTTP headers are metadata, so they don't count. Even so, the body content might still be of different sizes, so the total bytes will have to change across redirects. This to me doesn't look very consistent. -mandeep

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-30 Thread Mandeep Sandhu
So I guess having body in the 3xx response will not be all that unusual. It will be. Actually, it's extremely common - here's a default apache 301 for example: monster:/home/rich/src/wireshark # telnet xmelegance.org 80 Trying 80.68.89.8... Connected to xmelegance.org. Escape character

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-30 Thread Mandeep Sandhu
Since we know immediately that we're being redirected we can simply wait until we get a non-redirecting response before we start emitting the progress signals. We just need to (internally) ensure that we've read the body from the redirect response, the user of QNAM doesn't need to care.

Re: [Development] git submodules

2013-12-30 Thread Mandeep Sandhu
On Tue, Dec 31, 2013 at 9:19 AM, Jiergir Ogoerg f35f22...@gmail.com wrote: Hi, the Qt tutorials that explain how to use git don't mention git submodules. There are quite a few tutorials on the web on git submodules. In a nutshell, a submodule is an independent git repository that can reside/be

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2013-12-30 Thread Mandeep Sandhu
Even so, the body content might still be of different sizes, so the total bytes will have to change across redirects. This to me doesn't look very consistent. I say once again: the downloadProgress includes *only* the body, not a single byte of header or of overhead. Also, downloadProgress()

Re: [Development] Add locale cache for Linux

2014-01-01 Thread Mandeep Sandhu
On Thu, Jan 2, 2014 at 10:36 AM, Jiergir Ogoerg f35f22...@gmail.com wrote: Found, thanks. I submitted Patch Set 3 with corrections from their comments, do the reviewers get notified of the new patch submission or do I have to poke them? Gerrit will inform them! :) Any updates to the review

Re: [Development] Proposal for allowing handling of HTTP redirects in QNAM

2014-01-07 Thread Mandeep Sandhu
On Tue, Jan 7, 2014 at 2:13 PM, Peter Hartmann phartm...@blackberry.com wrote: On 12/31/2013 06:35 AM, Mandeep Sandhu wrote: Okay. I think Richard also suggested the same approach, i.e as long as we are being redirected, we don't emit the downloadProgress (and other signals indicating

[Development] Dev branch build failing due to missing header mtdev.h

2014-01-24 Thread Mandeep Sandhu
Hi All, Before starting work, I though of updating my dev branch as I was away for a while. The build fails with the following error: ... /home/mandeep/work/qt5/qtbase/src/platformsupport/input/evdevtouch/qevdevtouch.cpp:54:19: fatal error: mtdev.h: No such file or directory #include mtdev.h

[Development] Need suggestion for a new API

2014-01-31 Thread Mandeep Sandhu
Hi All, I needed a suggestion on an API I'm adding to QNetworkAccessManager and co. I'm adding a HTTP redirect feature to QNAM. It can be enabled at a global (QNAM) level, or can be enabled/disabled on a per request (QNetworkRequest) basis. The per-request setting, if set, overrides the global

Re: [Development] Need suggestion for a new API

2014-01-31 Thread Mandeep Sandhu
you mean 2 separate tickets/tasks or just 2 git commits but under the same task? Thanks again. -mandeep On Fri, Jan 31, 2014 at 10:33 PM, Andre Somers an...@familiesomers.nlwrote: Mandeep Sandhu schreef op 31-1-2014 13:47: Hi All, I needed a suggestion on an API I'm adding

Re: [Development] CI broken again?

2014-02-05 Thread Mandeep Sandhu
Something similar happened to me too on the dev branch. Tried merging a change. First a test case failed (tst_QDnsLookup) even though it runs fine on my local setup. I tried re-staging the change but now I got some merge errors. Local update of dev and rebase worked. -mandeep On Wed, Feb 5,

Re: [Development] CI broken again?

2014-02-06 Thread Mandeep Sandhu
CI continues to fail during build AND tests at seemingly random places. Any idea whats going on or when it'll be fixed? -mandeep On Wed, Feb 5, 2014 at 3:17 PM, Mandeep Sandhu mandeepsandhu@gmail.comwrote: Something similar happened to me too on the dev branch. Tried merging a change

Re: [Development] CI broken again?

2014-02-06 Thread Mandeep Sandhu
In your case, the QDnsLookup failure is caused by your code. It happened 100% of the time that the QDnsLookup test was executed and it did not happen when your change wasn't present. It can't be related to my change as the same tests pass 100% of the time on my local setup (Ubuntu 13.10)

Re: [Development] CI broken again?

2014-02-06 Thread Mandeep Sandhu
On Thu, Feb 6, 2014 at 10:10 PM, Thiago Macieira thiago.macie...@intel.comwrote: Em qui 06 fev 2014, às 16:01:05, Mandeep Sandhu escreveu: It can't be related to my change as the same tests pass 100% of the time on my local setup (Ubuntu 13.10) and moreover my changes do not kick

Re: [Development] CI broken again?

2014-02-07 Thread Mandeep Sandhu
The latest test failures seemed to be due to timeout rather than anything else. The 'waitForDone()' function is exiting with a failure due to DNS lookup timeout. The current timeout is set to 10 secs. This is quite large, but still, could there be a network issue with the CI setup? Yes,

[Development] Cross compiling Qt for windows using ming32 on Linux

2014-02-07 Thread Mandeep Sandhu
Is it possible to cross-compile a Windows build from within Linux using the mingw32 toolchain. I configure it as follows: ../../qt5/qtbase/configure -v -developer-build -opensource -confirm-license -release -xplatform win32-g++ -device-option CROSS_COMPILE=i586-mingw32msvc- -no-gui It fails

Re: [Development] Cross compiling Qt for windows using ming32 on Linux

2014-02-08 Thread Mandeep Sandhu
Thanks Mark. I'll check it out. -mandeep On Sun, Feb 9, 2014 at 5:35 AM, Mark Brand mabr...@mabrand.nl wrote: On 02/07/2014 01:28 PM, Mandeep Sandhu wrote: Is it possible to cross-compile a Windows build from within Linux using the mingw32 toolchain. I configure it as follows

[Development] Best practice for defining an integer constant

2014-02-14 Thread Mandeep Sandhu
I have a need for defining an integer constant that'll be used for initializing a member variable of a private class. The Qt coding conventions (http://qt-project.org/wiki/Coding-Conventions) recommend using an enum over 'const int'. The rationale given there is that an enum will be replaced at

Re: [Development] Best practice for defining an integer constant

2014-02-14 Thread Mandeep Sandhu
-project.org[development-bounces+alexander.blasche= digia@qt-project.org] on behalf of Mandeep Sandhu [ mandeepsandhu@gmail.com] *Sent:* Friday, February 14, 2014 11:29 *To:* development@qt-project.org *Subject:* [Development] Best practice for defining an integer constant I have a need

Re: [Development] Best practice for defining an integer constant

2014-02-15 Thread Mandeep Sandhu
On Fri, Feb 14, 2014 at 10:33 PM, Thiago Macieira thiago.macie...@intel.com wrote: Em sex 14 fev 2014, às 15:59:28, Mandeep Sandhu escreveu: I have a need for defining an integer constant that'll be used for initializing a member variable of a private class. The Qt coding conventions

Re: [Development] performance of signal slots across threads

2014-03-03 Thread Mandeep Sandhu
On Thu, Feb 27, 2014 at 4:47 PM, Nguyen Huu Minh huuminh.ngu...@vandewiele.com wrote: Hi, Thank you for your reply. I will try to make a benchmark, in the meanwhile I will try to explain my situation more clearly. My first object basically handles TCP communication to a (simulated)

Re: [Development] CI broken again?

2014-03-05 Thread Mandeep Sandhu
Well, I pushed again the submit button (after I said a little pray) and it fails in the same please (it seems God doesn't like me anymore). I really don't believe it has something to do with the heavy multi-tasking on the CI machines (or with God) ... to me it looks that the test is

Re: [Development] Google Chrome Aura overlaps with Qt abstractions?

2014-03-13 Thread Mandeep Sandhu
I'm confusedthe Aura page states: The goal is to produce a new desktop window manager and shell environment with modern capabilities. Are they making a KDE/GNOME equivalent or is this a new UI toolkit i.e a Qt/Gtk equivalent? I thought it was the laterbut the statement above sounds a

Re: [Development] Need DirectFB with QT example

2014-03-18 Thread Mandeep Sandhu
Why do you want to manually provide a DFB surface to Qt? Qt 4 and 5 can both work on top of DirectFB (Qt4 via QWS and Qt5 via QPA plugin). Which Qt version are you using? -mandeep On Mon, Mar 17, 2014 at 12:18 PM, Rupesh Sahu rup...@bydesignindia.net wrote: Hello Sir/Mam, I want to create a

Re: [Development] QT through DirectFB on Video playback

2014-03-20 Thread Mandeep Sandhu
An embedded video SoC based DFB setup will be something like this (might vary a little for your specific board): a) 1 background plane (typically lowest z order) b) 1 or more video planes c) 1 or more OSD planes b and c z-order might be interchangeable via DFB. Qt typically would run on either

Re: [Development] QT through DirectFB on Video playback

2014-03-23 Thread Mandeep Sandhu
as transparent. All this can be done in a single process. HTH, -mandeep Thanks and Regards, Poornima On Thu, Mar 20, 2014 at 11:17 PM, Mandeep Sandhu mandeepsandhu@gmail.com wrote: An embedded video SoC based DFB setup will be something like this (might vary a little for your specific board

Re: [Development] Historical question

2014-04-04 Thread Mandeep Sandhu
#include QLabel instead of #include qlabel.h It's the name of the class. Besides, C++98 standardised on having no suffixes back in 1997. Ohso that's why one includes iostream and not iostream.h in std C++ (I always wondered why they didn't just do it like how it is in C). Thanks for

Re: [Development] Spurious downloadProgress signal with incorrect bytesTotal when loading from cache

2014-04-22 Thread Mandeep Sandhu
On 04/11/2014 11:08 AM, Mandeep Sandhu wrote: Shouldn't these be having valid size values or is this expected behaviour for cached content? I guess the 1st signal (with incorrect size) being emitted is still a bug. I think if the response comes from the cache the response always reported

[Development] Adding new network tests

2014-05-30 Thread Mandeep Sandhu
Hi All, I was working on implementing HTTP redirection support in QNAM and friends. While looking at the test case of QNetworkReply, I found that for some testcases we use our own mini-http server while for others we're using an external webserver from the testbed. Is there a way to configure

Re: [Development] Adding new network tests

2014-06-12 Thread Mandeep Sandhu
Whenever possible, use the mini-http server, as it is less likely to cause network timeouts. Ok. Although since I'm testing out a lot of redirection scenario's, it might be better to use a real webserver for generating different types of redirect responses (permanent/temporary, redirect to

Re: [Development] Multimedia support.

2014-08-20 Thread Mandeep Sandhu
I don't think Phonon is a supported backend in Qt 5. You should probably look into new Qt Multimedia framework. On Linux, this framework relies on GStreamer (for other platforms, it has different dependencies). HTH, -mandeep On Wed, Aug 20, 2014 at 7:17 AM, Thorvaldur Jochumsson

[Development] Why is libxcb needed if GUI is disabled in build?

2014-08-28 Thread Mandeep Sandhu
All, I'm building the latest from dev branch using the following options (on 64-bit Ubuntu 12.04): -opensource -confirm-license -developer-build -release -no-gui -no-widgets -no-cups -no-dbus -no-xcb However the build fails with the following message: The test for linking against libxcb and

Re: [Development] Why is libxcb needed if GUI is disabled in build?

2014-08-28 Thread Mandeep Sandhu
assumptions which go largely unaddressed. Ideally everyone would scratch their own itch apropos the configure script, so if you remove this assumption and upstream it, maybe one day it will be a little less poxy. Cheerio, Donald On Thu, Aug 28, 2014 at 4:11 PM, Mandeep Sandhu mandeepsandhu

[Development] Build failure: GUI example being compiled even with -no-gui -no-widgets

2014-08-28 Thread Mandeep Sandhu
All, I'm getting a build failure when the hellowindow example is being compiled. Configure options: $ ../qt5/qtbase/configure -opensource -confirm-license -developer-build -release -no-gui -no-widgets -no-cups -no-dbus -no-xcb Build output: ... cd hellowindow/ ( test -e Makefile ||

Re: [Development] Build failure: GUI example being compiled even with -no-gui -no-widgets

2014-08-28 Thread Mandeep Sandhu
On Thu, Aug 28, 2014 at 5:10 PM, Thiago Macieira thiago.macie...@intel.com wrote: On Thursday 28 August 2014 17:02:33 Mandeep Sandhu wrote: $ ../qt5/qtbase/configure -opensource -confirm-license -developer-build -release -no-gui -no-widgets -no-cups -no-dbus -no-xcb -no-gui and -no-widgets

Re: [Development] Build failure: GUI example being compiled even with -no-gui -no-widgets

2014-08-28 Thread Mandeep Sandhu
You'll see that QtCore, QtGui, QtWidgets and QtNetwork are all in the same repository. They were not modularised from each other. Those four basic libraries are required, period. We may provide no-xxx options for those rare scenarios where you may want them, but please don't complain if we

Re: [Development] Build failure: GUI example being compiled even with -no-gui -no-widgets

2014-08-29 Thread Mandeep Sandhu
Yes, thats what I did. Enabled GUI, but kept widgets disabled. Now it compiles fine. Thanks, -mandeep On Fri, Aug 29, 2014 at 12:15 AM, Rutledge Shawn shawn.rutle...@digia.com wrote: On 29 Aug 2014, at 2:02 AM, Mandeep Sandhu wrote: All, I'm getting a build failure when the hellowindow

Re: [Development] New company name for Qt part of Digia and unified web site

2014-09-16 Thread Mandeep Sandhu
What was wrong with qt-project in that respect? And what is the status of that site (and project) now then? It sounds a bit like the xkcd standards comic [1]: adding a new domain to unite all the information from the existing ones... Lol. The elusive one-ring-to-rule-em-all! That xkcd is

Re: [Development] Is QMap Broken

2014-11-06 Thread Mandeep Sandhu
On Thu, Nov 6, 2014 at 6:24 AM, Robert Knight robertkni...@gmail.com wrote: Consider the following program, shouldn't the end() iterator place each key at the end of the newly created QMap. Instead, the keys and subsequent iterations are sorted (somehow). Yes, that's the whole point of a

[Development] Using SSL with MiniHttpServer (in tst_qnetworkreply)

2014-12-01 Thread Mandeep Sandhu
Hi All, I'm unable to get the MiniHttpServer in tst_qnetworkreply to work with SSL enabled. Here's the code that I'm using: snip // I've left the HTTP response out for brevity, but its supposed to return 200 OK MiniHttpServer server(, true); QUrl localhost = QUrl(https://localhost/;);

Re: [Development] Using SSL with MiniHttpServer (in tst_qnetworkreply)

2014-12-02 Thread Mandeep Sandhu
Any idea, why its not working for SSL? Figured it out. I had to call ignoreSslErrors() in the reply object. -mandeep ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development

Re: [Development] Using SSL with MiniHttpServer (in tst_qnetworkreply)

2014-12-02 Thread Mandeep Sandhu
Though you probably want to test the https-to-http redirect case (and not follow)... was that it? Yes, that was my motivation for using https. Although, ignoring SSL error did not fix the issue completely. Now I started seeing a RemoteHostClosedError on the client side. Debugging it I found

[Development] Requesting reviewers for a QtNetwork feature - Support HTTP redirection

2015-02-03 Thread Mandeep Sandhu
Hi All, Sometime back I implemented a feature in QtNetwork - QNetworkAccessManager: Support HTTP redirection. https://codereview.qt-project.org/#/c/83058/ This review request has been pending in review for quite some time. There was a partial review done, but no one has approved it yet. There

Re: [Development] Requesting reviewers for a QtNetwork feature - Support HTTP redirection

2015-02-05 Thread Mandeep Sandhu
Anyone? On Tue, Feb 3, 2015 at 2:32 PM, Mandeep Sandhu mandeepsandhu@gmail.com wrote: Hi All, Sometime back I implemented a feature in QtNetwork - QNetworkAccessManager: Support HTTP redirection. https://codereview.qt-project.org/#/c/83058/ This review request has been pending

Re: [Development] No Change-Id being generated for commit message

2015-03-26 Thread Mandeep Sandhu
On Wed, Mar 25, 2015 at 7:44 PM, Thiago Macieira thiago.macie...@intel.com wrote: On Wednesday 25 March 2015 18:53:18 Mandeep Sandhu wrote: I'm not sure, but is that a valid sed expression (with all the white-spaces in-between)? Yes. Hmmm..if I run this expression on the commandline

Re: [Development] No Change-Id being generated for commit message

2015-03-26 Thread Mandeep Sandhu
3) it removes any comment lines COMMIT_EDITMSG has _only_ comment lines (i.e lines starting with a #), so won't sed remove _all_ lines from it then? (this is exactly what I'm seeing when I run the commit-msg script on COMMIT_EDITMSG). ___ Development

Re: [Development] No Change-Id being generated for commit message

2015-03-26 Thread Mandeep Sandhu
On Thu, Mar 26, 2015 at 10:44 AM, Mandeep Sandhu mandeepsandhu@gmail.com wrote: 3) it removes any comment lines COMMIT_EDITMSG has _only_ comment lines (i.e lines starting with a #), so won't sed remove _all_ lines from it then? (this is exactly what I'm seeing when I run the commit-msg

Re: [Development] No Change-Id being generated for commit message

2015-03-25 Thread Mandeep Sandhu
Is git stripspace or grep malfuncitoning? 'git stripspace' seems to be working fine. $ cat COMMIT_EDITMSG | git stripspace produces contents of COMMIT_EDITMSG Although the commit-msg script seems to be exiting early in add_ChangeId()... snip MSG=$1 # Check for, and add if missing, a

[Development] No Change-Id being generated for commit message

2015-03-25 Thread Mandeep Sandhu
Hi All, I'm having trouble pushing a change. 'git push' failed stating that the commit message was missing the Change-Id field. I had this working until recently when I moved my setup toa different machine. So something likely got screwed-up. I have the commit-msg hook installed in my repo's

Re: [Development] No Change-Id being generated for commit message

2015-03-25 Thread Mandeep Sandhu
Hi Thiago, How are you committing? If you're using Qt Creator's integrated commit editor, I use the commandline. sure that the script works. To do that, check that your .git/COMMIT_EDITMSG I verified this. .git/COMMIT_EDITMSG does not have Change-Id string. file does not contain a

Re: [Development] No Change-Id being generated for commit message

2015-04-13 Thread Mandeep Sandhu
It's supposed to contain the text that the editor was last launched with. If you tried to make a commit and didn't save anything, that's what you'll see in that file. Hmm...probably thats what happened (I don't remember exactly how or when, but I might have tried to abort a commit by simply

Re: [Development] How does mktime() handle DST transitions ?

2015-11-16 Thread Mandeep Sandhu
Hey Eddy, Here's the response from my OSX 10.10.4 (Time Zone: Pacific Standard Time (PST) -0800 UTC UTC/GMT). $ ./mktime Studying DST transitions in system default time-zone Testing spring forward Initial: Sun Mar 8 02:30:00 2015 Accepted: 1425810600 Ignorant of DST (-> 1): Sun Mar 8

Re: [Development] How does mktime() handle DST transitions ?

2015-11-17 Thread Mandeep Sandhu
Awesome! Glad I could help. -mandeep On Tue, Nov 17, 2015 at 5:40 AM, Welbourne Edward wrote: > Hi again Mandeep, > > Thanks for that. > >> Accepted: 1446367200 >> Ignorant of DST (-> 1): Sun Nov 1 01:40:00 2015 >> Accepted: 1446370860 >> Ignorant of DST

Re: [Development] commas in ctor-init-lists

2016-06-02 Thread Mandeep Sandhu
> > Why would anyone bother to count votes before any (theoretically binding > or non-binding, doesn't seem to matter) result of voting gets ignored by > the next submitter anyway? I think the votes are meant for 'ratifying' the coding guidelines. And the hope that submitters _will_ follow the

Re: [Development] commas in ctor-init-lists

2016-06-01 Thread Mandeep Sandhu
The leading comma's are also helpful if we have some part of the initializer list protected by a preprocessor conditional (or might be needed in the future). QFoo::QFoo() : QBase() , m_f1() #ifdef XYZ , m_f2() #endif , m_f3() Although I'm not sure if we have many (of any at all) such

Re: [Development] Qt Coding Guidelines

2016-03-19 Thread Mandeep Sandhu
On Thu, Mar 17, 2016 at 3:24 AM, Mathias Hasselmann wrote: > > > Am 17.03.2016 um 10:01 schrieb Sorvig Morten: >> >> How about treating the coding guidelines as \internal documentation? >> We could then at some point build and publish it together with the >> rest of the

Re: [Development] What qtbase looks like with extensive use of auto

2016-03-21 Thread Mandeep Sandhu
On Sat, Mar 19, 2016 at 11:02 AM, Stephen Kelly wrote: > Hi, > > In case you missed it, I wrote an auto-modernizer > > https://steveire.wordpress.com/2016/03/19/aaargh Thanks for this blog post. It made me smile...and also auto aware! (yes!! I did it too!) :) -mandeep > >

Re: [Development] implicit sharing and iterators in qt containers

2017-07-31 Thread Mandeep Sandhu
> > > Maybe. I don't know how many would use it and whether it's worth spending > our > development time on it, though. > It might be useful to a lazy programmer though, who doesn't want to implement it on his/her own :) It's not really a fundamental container itself, but rather uses a QHash &

Re: [Development] implicit sharing and iterators in qt containers

2017-07-31 Thread Mandeep Sandhu
> > > Your OrderedMap should itself be implicitly shared and clone the linked > list > on detach. > Right now, I'm detaching the linked list during copy-construction (and assignment). Detaching here means re-populating the LL with same entries and then storing the new LL iterator's in the hash.

Re: [Development] implicit sharing and iterators in qt containers

2017-07-31 Thread Mandeep Sandhu
On Mon, Jul 31, 2017 at 11:23 AM, Thiago Macieira wrote: > On segunda-feira, 31 de julho de 2017 11:20:43 PDT Matthew Woehlke wrote: > > (p.s. This thread should probably be on inter...@qt-project.org...) > > Unless you're planning to submit this code to Qt itself, in

Re: [Development] implicit sharing and iterators in qt containers

2017-07-31 Thread Mandeep Sandhu
> > > So... right now your copy ctor is O(N) and remove is O(1), correct? > Yes. > Implicit sharing makes your copy ctor O(1) and detach() O(N). IOW, > you've just deferred the copy cost until a non-const method is called. > That's basically what COW does... > Yes I understand that. And people

[Development] implicit sharing and iterators in qt containers

2017-07-30 Thread Mandeep Sandhu
Hi All, I recently stumbled upon an issue where using iterators of a QLinkedList, altered the "copy" of another QLinkedList. On reading the iterator docs, I came across this limitation of Qt containers with implicit sharing: http://doc.qt.io/qt-5/containers.html#implicit-sharing-iterator-problem

Re: [Development] implicit sharing and iterators in qt containers

2017-07-31 Thread Mandeep Sandhu
On Mon, Jul 31, 2017 at 2:57 PM, Thiago Macieira <thiago.macie...@intel.com> wrote: > On segunda-feira, 31 de julho de 2017 14:36:59 PDT Mandeep Sandhu wrote: > > > I'd expect to be able to use keys that do not define qHash or qLess. > > > > Why? > > My type

Re: [Development] implicit sharing and iterators in qt containers

2017-07-31 Thread Mandeep Sandhu
> > > I'd expect to be able to use keys that do not define qHash or qLess. > Why? > > Search would be O(n). So be it. > Well it wouldn't be much of a "map" then, would it? I see OrderedMap similar to a QMap, just with a different key ordering scheme. So in that way, constant time lookups would

Re: [Development] implicit sharing and iterators in qt containers

2017-07-31 Thread Mandeep Sandhu
> > > It's still a key-value store in which items are retrieved by key, which > is sort of the definition of a "map". It just has inefficient look-up. > Right. Since this (fast lookup) is so ubiquitous amongst map like containers, I thought this was expected from all associative containers. If

Re: [Development] QVector rvalue overloads for convenience functions?

2018-03-03 Thread Mandeep Sandhu
On Sat, Mar 3, 2018 at 11:46 AM, Christian Ehrlicher wrote: > Hi, > > recently rvalue overloads for QVector::append(T), push_back(T) and others > were added to QVector. But not for the convenience functions like > operator<<(T) or operator +=(T). Is this an oversight Why

Re: [Development] QVector rvalue overloads for convenience functions?

2018-03-03 Thread Mandeep Sandhu
> > > inline QVector +=(T &) > { append(std::move(t)); return *this; } > Ah, yes! This makes sense. inline QVector << (T &) > { append(std::move(t)); return *this; } > > Note they might be missing from qvarlengtharray too. > Thanks for the clarification. -mandeep > > 'Allan > > > > >