summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * de-duplicate and comment EffectivePaths presence detectionOswald Buddenhagen2015-01-091-2/+3
| | | | | | | | | | Change-Id: Ibf9731c216df84c9e17ebd699d8349cc716ff3cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * remove nonsensical conditionalOswald Buddenhagen2015-01-091-2/+0
| | | | | | | | | | | | | | we are in an #else of #ifndef QT_BOOTSTRAPPED here already. Change-Id: I02c4ff2959490110c21ad1016c664b7ddcfea7c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QColorDialog: Don't loose focus while color pickingSérgio Martins2015-01-092-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows mouse grabbing doesn't work across processes, which means we're interacting with other windows when picking colors. Workaround that by having a transparent 1x1 window below the cursor at all times so we catch the mouse click. Clicking before the window is below the cursor won't happen because our timer interval is 30ms, so it's quite fast. It's hacky but it's what we can do for a feature which was very broken on Windows. Task-number: QTBUG-43663 Change-Id: I295378e033ddc6d9c2230335f0953a727c21e1dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Fix glyph runs painted badly with perspective transformAllan Sandfeld Jensen2015-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | A mismatch between requiresPretransformedGlyphPositions and shouldDrawCachedGlyphs in QRasterPaintEngine will cause the text position to be transformed twice when using drawGlyphRun on a QPainter with a perspective transform. Since this case falls back to drawing text as paths there is no reason to require any special treatment. Change-Id: Ib1c14aee4cc6774dd8feadc5748f0b0ee59633b9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * iOS: Prevent recursion when updating/syncing QIOSViewController propertiesTor Arne Vestbø2015-01-091-0/+12
| | | | | | | | | | | | Change-Id: I22f1eaa892cba23c498ae210a9a483e468268581 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: Fix QWindow::reportContentOrientationChange on iOS6+Tor Arne Vestbø2015-01-094-17/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | On iOS 6 and above, [UIViewController supportedInterfaceOrientations] needs to return 0 for [UIApplication setStatusBarOrientation] to work. This means once you report a content orientation other than the primary orientation, you'll disable auto-rotation. Reporting the orientation as Qt::PrimaryOrientation restores the auto-rotation behavior. Change-Id: I1b8c765c507728fdbc5b828e0b4215324014e221 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * docs: Explain the limitations of QWidget::grabMouse() on WindowsSérgio Martins2015-01-081-5/+4
| | | | | | | | | | | | Because carbon is dead, I merged both OSX and Windows in the same note. Change-Id: I5d43c5fce30e187f63a1e3e5af688c344eb80d28 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * iOS: Move implementation details of QIOSViewController to class extensionTor Arne Vestbø2015-01-082-6/+10
| | | | | | | | | | | | Change-Id: I602d8f1c9f20d3bfed4db3405460021146b546d8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * Fix physical DPI and size for rotated screens on X11Paul Olav Tvete2015-01-082-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rotated screens would use the unrotated physical geometry, causing the calculated physical DPI to be completely wrong. In RandR, the output does not rotate, so the physical size is always for the unrotated display. The transformation is done on the crtc. http://www.x.org/releases/X11R7.6/doc/randrproto/randrproto.txt Task-number: QTBUG-43688 Change-Id: Ifde192fcc99a37d0bfd6d57b4cdeac124a054ca3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
| * fix error when cross-compiling with --system-zlibAshish Kulkarni2015-01-082-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is broken since 1f461ac45bfa8887261510a95fb33a346d68eaba, where Z_PREFIX was defined to namespace the bundled zlib symbols. The bundled zlib is used by bootstrap.pro when cross-compiling which uses the namespaced symbols. This breaks linking of rcc when --system-zlib is used, as it will try to link to compress2 instead of z_compress2. To fix this, the aliases are pulled in via zconf.h and the bundled zlib is prepended to the INCLUDEPATH (i.e. before the system zlib). Change-Id: Iec76cbdead40f888e2ac6a887ec8f3b7bc7db501 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Fix compile error if openssl is built with no-ssl3-methodAndré Klitzing2015-01-162-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Since openssl 1.0.1k with enabled option no-ssl3-method we need to check for OPENSSL_NO_SSL3_METHOD to use following functions: - SSLv3_method - SSLv3_server_method - SSLv3_client_method Change-Id: Iee83a6f4bacbf5660baa6bdb89eb02ceb9f11614 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix regression with frameless dialogs on WindowsLaszlo Agocs2015-01-161-2/+6
| | | | | | | | | | | | Task-number: QTBUG-41162 Change-Id: I6d4e6d0e8a262fead30d642d632f6b4021cc20ab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Windows: Fix crash when focus window does not have a native window.Friedemann Kleint2015-01-151-1/+1
| | | | | | | | | | | | | | | | Check and warn in that case. Change-Id: Ic513334b5aa48e1c7e44685c30da3e9be52c3c52 Task-number: QTBUG-43833 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Windows: Add infrastructure to be able to a GL renderer based on GPU.Friedemann Kleint2015-01-156-42/+162
| | | | | | | | | | | | | | | | | | | | | | Introduce flags for the renderer type and move code to qwindowsopengltester. Introduce QWindowsOpenGLTester::supportedGlesRenderers() where type-dependent checking can be added. Change-Id: I4bbffaf861cb0fdbea0919e081e3626fb5a872de Task-number: QTBUG-43263 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Windows: Add GPU detection.Friedemann Kleint2015-01-155-11/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | Compile qwindowsopengltester on all platforms and add struct GpuDescription with detection method based on IDirect3D9 (dynamically loaded). Expose as a QVariantMap-property to QWindowsNativeInterface to be able to access it from qtdiag. Task-number: QTBUG-43263 Change-Id: I3c6cd0bbbe36465e0e05f7064ecfc943d6ea4101 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Bump copyright year to 2015Kai Koehne2015-01-158-17/+17
| | | | | | | | | | | | | | | | Bump copyright year in tool output and user visible strings to 2015. Change-Id: I9b29907fe3f555e78005cb296a49d92f601fb7ec Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Swallow wheel events while a popup widget is open.Friedemann Kleint2015-01-121-5/+3
| | | | | | | | | | | | | | | | | | | | | | Wheel events should not cause a popup widget parented on a scrollable widget to be closed or moved to correctly reflect the system behavior on OS X and Windows. Task-number: QTBUG-42731 Task-number: QTBUG-40656 Change-Id: I4ef75aa8331390309c251316ac76db2cf9ec51f7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | QMacPasteboardMimeFileUri: Use file paths instead of file referencesGabriel de Dietrich2015-01-121-1/+13
| | | | | | | | | | | | Change-Id: I732d94bc6add2814c8ebd2c7fe80592024dd1b9a Task-number: QTBUG-40449 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* | Resolve GLES3 functions from the shared libLaszlo Agocs2015-01-104-51/+124
|/ | | | | | | | | | | | | | Unfortunately the few functions that are part of the OpenGL ES 3.0 standard and are used by QtGui have to have special handling after all. Just directly calling the functions causes issues when building on a GLES3 capable system and deploying somewhere where only GLES2 is available. Using eglGetProcAddress and such is not an option because the ES spec does not guarantee that standard functions are resolvable via that mechanism. Task-number: QTBUG-43318 Change-Id: I72f985d75ca669835839016573cbb8e4a3fb41db Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Refactor networkmanager QtBearer backend to use QDBusAbstractInterface.Lorn Potter2015-01-083-510/+186
| | | | | | | | Using QDBusInterface causes introspection, which may not be permitted by some platforms. Change-Id: I953d27b9c0fc7c21d52fefeb8c7760a7235aed9d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix use-after-free bugGatis Paeglis2015-01-081-2/+2
| | | | | | | | | | xcb_image_destroy() calls free on m_xcb_image and then few lines down we access member of m_xcb_image. Swap order of these two actions. Change-Id: I01fb43a066459cce462df6af22161c35cef524eb Task-number: QTBUG-43623 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Remove extra ';' after QPrint namespace blockKai Pastor2015-01-081-1/+1
| | | | | | | The extra ';' causes a warning when gcc is used with -Wpedantic. Change-Id: I3d99aca6f160e46dbe2173106160474664e06b2c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QCoreTextFontDatabase: close memory leak in themeFontTim Blechmann2015-01-071-1/+5
| | | | | | | | if the CTFontDescriptorRef is already contained in m_systemFontDescriptors we leak a reference, unless we explicitly release it. Change-Id: I5b263aa52b4433e7e28cc01164098892cc9cd2ae Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* QCoreTextFontDatabase: release CTFontDescriptorRef references in dtorTim Blechmann2015-01-071-0/+2
| | | | | | | | | QCoreTextFontDatabase::m_systemFontDescriptors owns the references to the underlying CTFontDescriptorRef objects. in order to avoid a leak, we should release them Change-Id: I8fc6c158908e0173696cd91058ac34efb3de01d5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Raise window level instead of hiding statusbar during VKB scrollTor Arne Vestbø2015-01-072-8/+17
| | | | | | | | | | | | | | | | | | Hiding the statusbar using the normal iOS APIs result in QScreen reporting new availableGeometry, which is not what we want. The scroll of the screen is a purely visual effect, and shouldn't have any effect on observable Qt APIs besides the keyboard rect changing. Instead of actually hiding the statusbar, we achieve the same effect by raising the key window (and any other application windows, including the keyboard) to the level of the statusbar, effectively putting them above the statusbar. This still leaves popups and alert windows above the key window, as normal. Change-Id: Ib7694240ca86cfb9000de35bf0c49343ffb37e32 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Fix crash if PAC script retrieval returns a null CFData instanceDaniel Molkentin2015-01-071-1/+4
| | | | | | | | | | | | | The documentation for CFURLCreateDataAndPropertiesFromResource() does not make this clear but from looking at the CFNetwork implementation and a user stacktrace it appears that this function can return true but not set the data argument under certain circumstances. Change-Id: I48034a640d6f47a51cd5883bbafacad4bcbd0415 Task-number: QTBUG-36787 Patch-By: Robert Knight Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Fix possible crash when passing an invalid PAC URLDaniel Molkentin2015-01-071-0/+4
| | | | | | | | | | | | | | This commit checks whether CFURLCreateWithString() succeeded. It does not appear to be possible to enter an empty URL directly in the PAC configuration dialog but I can't rule out the possibility that it could find its way into the settings via some other means. Change-Id: I6c2053d385503bf0330f5ae9fb1ec36a473d425d Patch-By: Robert Knight Task-number: QTBUG-36787 Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Fix crash on Mac OS if PAC URL contains non-URL legal charsDaniel Molkentin2015-01-071-1/+5
| | | | | | | | | | | | | | | macQueryInternal() was retrieving the PAC URL string as-entered by the user in the 'Proxies' tab of the system network settings dialog and passing it to CFURLCreateWithString(). CFURLCreateWithString() returns null if the input string contains non-URL legal chars or is empty. Change-Id: I9166d0433a62c7b2274b5435a7dea0a16997d10e Patch-By: Robert Knight Task-number: QTBUG-36787 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Markus Goetz <markus@woboq.com>
* Remove redundant codeAndy Shaw2015-01-071-5/+0
| | | | | | | | The non client mouse events have the right information regarding the modifiers now so the old code covered with Q_WS_WIN can be removed. Change-Id: I3e4ebc0debdd66970b18233f189b5d9e880e40a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Prevent buffer overrun when getting the glyph imagesAndy Shaw2015-01-072-2/+16
| | | | | | | | | | The change 35bc3dc45aacaf36a8bdfccc7627136cc2e5b185 moved some padding out of QTextureGlyphCache into the font engines directly, however this was not done for the DirectWrite font engine so it caused a buffer overrun. Task-number: QTBUG-41782 Change-Id: I4e643159036f06c5edd8a742dc6694d517a47826 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Windows: Remove check for minimum/maximum size constraints.Friedemann Kleint2015-01-071-14/+0
| | | | | | | | | | The warning was triggered when increasing the fixed size of a window. If there is a real violation of the size constraints, the below warning will show. Task-number: QTBUG-43420 Change-Id: I85d7d0a91d040aa3ddeff8c3d105351efd5e14a9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows: Release mouse capture when window is blocked by modal window.Friedemann Kleint2015-01-071-0/+2
| | | | | | | | | The capture needs to be cleared when for example a modal dialog is opened from a timer slot or similar while moving the window. Task-number: QTBUG-43308 Change-Id: Id0c01080d67d1057004a7f85b037dce5e220de42 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows: Fix OS version determination for Windows >= 8Friedemann Kleint2015-01-071-10/+68
| | | | | | | | | | | | | First, try to determine the version of kernel32.dll by using the version API. If that fails, loop using the version macros, taking the major version into account. Hangs in the minor version loop have been observed, potentially related to the major version. Task-number: QTBUG-43413 Change-Id: I982e78873510e7598c7cf839177e59812acd86f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Make QtDBus unit tests compile with runtime dbus-1 tooThiago Macieira2015-01-061-0/+3
| | | | | | | | | | | | | There's a change in Qt 5.4.0 that makes Qt compile with its own set of D-Bus headers, which means QT_CFLAGS_DBUS may be empty. Thus, we can't compile or link if we're using the actual libdbus-1 API to build the test. This commit makes these unit tests use the same dynamic loading mechanism. Change-Id: I56b2a7320086ef88793f6552cb54ca6224010451 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Fixed date format doc bug in QDateTime/Qt namespaceOrgad Shaneh2015-01-062-13/+13
| | | | | | | | | | MM stands for month, SS is invalid mostly cherry picked from Qt4 commit 670f460fab6a386407c07281cf6417ccf6430970. Task-number: QTBUG-12236 Change-Id: I7af4be655d2d10f1befa1366abb48225c60d31dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix build error with Intel Compiler 15 on WindowsThiago Macieira2015-01-062-0/+4
| | | | | | | | | | | | | | | | | If the constructor is inline, the generated code needs access to the vtable, which gets emitted with the first virtual function (in QtGui), but somehow icl.exe can't find it in debug. Looking at the .obj files it generates and comparing to MSVC, it seems that: - both generate and export the inline constructor from Qt5Guid.dll - MSVC will call that constructor from qoffscreenintegration.obj - icl.exe will inline the constructor and requires a symbol not exported from Qt5Guid.dll I can't explain why (probably a compiler bug). Change-Id: I0ab9c078ae4fc794826025d68d364124c7247e80 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Give ICC-as-Clang a Q_CC_CLANG version number tooThiago Macieira2015-01-061-0/+4
| | | | | | | Give it version number 3.5 for current compatibility. Change-Id: Ia023d29b3b3946f8642a0550279ae63cbb803fc5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Remove QIOSKeyboardListener self-change assert/guardTor Arne Vestbø2015-01-061-2/+0
| | | | | | | | | We're fairly confident self won't change in that case, and the assert was causing warnings in release builds. Change-Id: I4a826579bb4cedef8423e8d43cb370e1f3b80407 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Make QDBusConnection and QDBusServer return an error on default objectsThiago Macieira2015-01-062-2/+2
| | | | | | | | | | The error of "Not connected". This incidentally solves a crash when QDBusServer().lastError() is called but libdbus-1 couldn't be found. Change-Id: Id93f447d00c0aa6660d4528c4bbce5998d9186a8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Re-enable constexpr for ICC 15Thiago Macieira2015-01-061-0/+1
| | | | | | | | | The bug noted in d88e4edcd548e5bb024e75016c5a3449d103bd8d appears to be resolved. Change-Id: Id20906ff83f74bd16267d44bf447626b81187e71 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix change-of-sign warnings with ICCThiago Macieira2015-01-061-3/+3
| | | | | | | | | | qlocale_p.h(427): error #68: integer conversion resulted in a change of sign We hadn't enabled Q_COMPILER_CONSTEXPR for ICC. Change-Id: Ie7e3070b9f8f2cf512d2745001312865e698596b Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* JPEG: Fix reading of EXIF orientation.Friedemann Kleint2015-01-061-3/+3
| | | | | | | | | | | The orientation is unsigned short, read it as such. In JPEG-files created by Ricoh/Pentax cameras, the data is saved in Motorola format. Reading the wrong data size will produce invalid values when converting the byte order. Change-Id: I8f7c5dc5bfc10c02e090d3654aaefa047229a962 Task-number: QTBUG-43563 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Windows: Fix QColorDialog's live updates while picking outside colorSérgio Martins2015-01-063-5/+48
| | | | | | | | | | | | Microsoft's SetCapture() doesn't work on windows owned by other processes, so instead we use a timer. This is the same approach as used by qttools/src/pixeltool. The mouse move approach however is more elegant and doesn't hammer the CPU with QCursor::pos() calls when idle. For this reason the workaround is Q_OS_WIN only. Task-number: QTBUG-34538 Change-Id: I40a6f7df5bf2a3a29ade8fe4a92f5b5c4ece7efb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Fix a memleak in QAssociativeIterable::value()Marc Mutz2015-01-042-16/+39
| | | | | | | | | | | | | | | | QtMetaTypePrivate::QAssociativeIterableImpl::{find,begin,end}() allocate a new _iterator, so when they're used outside of the ref-counted world of QAssociativeIterable::const_iterator, their lifetime needs to be manually managed. Instead of going to that length, which failed in previous iterations of this patch, implement value() in terms of (new) find() and let find() operate on const_iterator. Because of forwards compatibility between patch releases, use (unexported) friend functions for now with the intention to make them proper member functions come Qt 5.5. Task-number: QTBUG-41469 Change-Id: I43b21eae0c2fc4c182369e669a8b3b457be68885 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Link against QMAKE_LIBS_EXECINFO when using backtrace(3).Raphael Kubo da Costa2015-01-031-0/+3
| | | | | | | | | | | | | Add a new mkspec variable, QMAKE_LIBS_EXECINFO, for platforms where backtrace(3), backtrace_symbols(3) and others are not in libc, but rather in a separate library -- on the BSDs, this is libexecinfo. Use it in corelib/global/global.pri so that libqt5core links against it and has the proper dependency when necessary. Change-Id: I62ac36c9b3ba7ab0719420cb795087d43ec138a4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: fix the type listed for the functions in QAtomicIntegerThiago Macieira2015-01-022-91/+91
| | | | | | | The "int" was a left over when this was documentation for QAtomicInt. Change-Id: If7b7688982d27cbbd42f080eff7d08344b587f44 Reviewed-by: Richard J. Moore <rich@kde.org>
* [QDateTime] ISO Time zone designators can be [+-]HHIsrael Lins2014-12-301-5/+4
| | | | | | | | | Added support on QDateTime::fromString to read correctly dates on ISO format with Time zone designators at format [+-]HH Change-Id: Ied5c3b7950aee3d0879af0e05398081395c18df5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QODBC: fix converted string values empty SQLServer 2012Maximilian Hrabowski2014-12-301-1/+11
| | | | | | | | | | | | | | SQL Server 2012 Native Client (version 11.0.2100.60) or later introduced a change in the behavior of the SQLGetData method when converted string values are involved. In older version a (sometimes wrong) size was returned. Now always SQL_NO_TOTAL is returned which signals to read as much data as available. SQL_NO_TOTAL was handled like SQL_NULL_DATA in the code before which indicates a NULL value so the returned string was empty. See link for more info: http://msdn.microsoft.com/en-us/library/jj219209.aspx Change-Id: Ia0d2296caf593890b301ee1848d1bf3eb8d7b6fe Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Added timezone support for datetime fields in PSQLJulien Blanc2014-12-301-26/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds correct timezone support in PSQL plugin. Prior to this patch, no timezone support was provided, so only the following case worked : * using local time in both client application and postgresql server * datetime were using second precision This patch tries to take care that postgresql has two different datatypes for date time, respectively : * timestamp with time zone * timestamp without time zone Both are internally stored as UTC values, but are not parsed the same. * timestamp with time zone assumes that there is a time zone information and will parse date time accordingly, and then, convert into UTC before storing them * timestamp without time zone assumes that there is no time zone information and will silently ignore any, unless the datetime is explicitly specified as having a time zone, in case it will convert it into UTC before storing it Both are retrieved as local time values, with the following difference * timestamp with time zone includes the timezone information (2014-02-12 10:20:12+0100 for example) * timestamp without time zone does not include it The patch does the following : * parse the date retrieved by postgresql server using QDateTime functions, which work correctly * always convert the date to UTC before giving it to postgresql * force time zone so that timezone information is taken into account by postgresql * also adds the milliseconds when storing QDateTime values The following configurations are tested to work : * client and server using same timezone, timestamp with or without tz * client and server using different timezone, timestamp with tz The following configuration will *not* work : * client and server using different timezones, timestamp without tz Because data will be converted to local time by the postgresql server, so when returned it will be different from what had been serialized. Prior to this patch, it gave the illusion to work because since TZ information was lost, time was stored as local time from postgresql. Lots of inconsistencies occurred, though, in case client tz changes... I don't expect this to be an issue since having different TZ in server and client and *not* handling this is a broken setup anyway. Almost based on changes proposed by julien.blanc@nmc-company.fr [ChangeLog][QtSql] Added timezone support for datetime fields in PSQL Task-number: QTBUG-36211 Change-Id: I5650a5ef60cb3f14f0ab619825612831c7e90c12 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Report QHostAddress::Any explicitly in qDebug()Thiago Macieira2014-12-281-1/+4
| | | | | | | | With toString(), it was printing "0.0.0.0", which is the same as QHostAddress::AnyIPv4, making it difficult to tell the two apart. Change-Id: I4668ec3337c25ddfdc2fa3bbacc83b9d34316b1f Reviewed-by: Richard J. Moore <rich@kde.org>