qt:digia-qt.git
5 years agoAdded changes-4.7.5 file. 4.7.5 v4.7.5
Marko Valtanen [Mon, 16 Jan 2012 13:07:19 +0000 (15:07 +0200)]
Added changes-4.7.5 file.

5 years agoTest didn't work after fixed bug QTBUG-17873.
Olli Kauppila [Thu, 12 Jan 2012 13:16:50 +0000 (15:16 +0200)]
Test didn't work after fixed bug QTBUG-17873.

Error received from application didn't match with expected error from
baseline file. Fix removes lines "QPixmap: Cannot create a QPixmap
when no GUI is being used" from received error message.

5 years agofix tst_qscriptengine after merging MR-1149
Zeno Albisser [Thu, 28 Apr 2011 10:50:47 +0000 (12:50 +0200)]
fix tst_qscriptengine after merging MR-1149

Reviewed-by: Olivier Goffart
5 years agoFixed auto-test failures caused by a3a79fefe65ec12.
Samuel Rødal [Mon, 7 Mar 2011 09:01:51 +0000 (10:01 +0100)]
Fixed auto-test failures caused by a3a79fefe65ec12.

QPixmaps might be unintentionally created through QVariant streaming for
example, so to prevent breaking existing applications we should just use
a warning instead, when creating a QPixmap in a non-GUI application.

Task-number: QTBUG-17873
Reviewed-by: aavit
5 years agoFixed failure of tst_qxmlquery::evaluateToReceiver
Rohan McGovern [Thu, 26 May 2011 07:01:33 +0000 (17:01 +1000)]
Fixed failure of tst_qxmlquery::evaluateToReceiver

Commit 8f95a19d330480bd86650c3d2e4e147d3bca5789 fixed the "missing Z"
of QDateTime::toString for Qt::ISODate (see QTBUG-9698).  The testdata
for this test should have been updated at the same time, but it was
forgotten.

Reviewed-by: Jason McDonald
Change-Id: I9b03519805533665afac15e0c970ac1c9e5d9ab4

5 years agoRevert "Don't destroy Qt's internal pthread_key_t if it was not initialized"
Marko Valtanen [Tue, 10 Jan 2012 15:29:37 +0000 (17:29 +0200)]
Revert "Don't destroy Qt's internal pthread_key_t if it was not initialized"

This reverts commit 8c31c6529935cd9ee6f99bc38cfd182d5b3182e2 due to a
regression in the QThreadStorage autotest.

Fix the problem another way: call pthread_once() in the destructor function
to ensure that we always call pthread_key_delete() on a key we created.

5 years agoFix regression that caused waitForXXX(-1) to fail.
Thiago Macieira [Mon, 16 May 2011 11:20:25 +0000 (13:20 +0200)]
Fix regression that caused waitForXXX(-1) to fail.

Regression was introduced by 8d4cd52b6981a4e6deea7fdb77f56e40c4f3e6ba
when it failed to check when msecs == -1. This manifested visibly in KDE
failing to connect to any SSL site -- kioslaves are synchronous and use
waitForXXX(-1) (in this particular case, waitForEncrypted, which calls
waitForReadyRead).

Also, take the opportunity to convert these tests in QTcpSocket to use
port 80 (a defined service in the test server) instead of port 22.

Reviewed-by: Martin Petersson
5 years agoDon't get stuck in a loop while trying to close the active popup widget
Andy Shaw [Wed, 4 Jan 2012 16:58:36 +0000 (17:58 +0100)]
Don't get stuck in a loop while trying to close the active popup widget

When the application is deactivated then it will try to close down the
active popup widget.  However, the popup widget can prevent a close from
occuring and Qt should respect this without causing problems when the
application is reactivated later on.

Task-number: QTBUG-23448-fix

5 years agoDesigner example plugins build behaviour on debug and release
Samuli Piippo [Tue, 3 Jan 2012 07:11:05 +0000 (09:11 +0200)]
Designer example plugins build behaviour on debug and release

Change the building of designer example plugins so, that only
release version is build when trying to build both. Designer
itself is similarly build only as release version and
it won't load debug plugins.

5 years agoConcurrent example not included when QtConcurrent is not supported
Samuli Piippo [Mon, 14 Nov 2011 06:54:10 +0000 (08:54 +0200)]
Concurrent example not included when QtConcurrent is not supported

5 years agoEnsure that the type is not registered as a typedef
Andy Shaw [Thu, 29 Dec 2011 13:44:57 +0000 (14:44 +0100)]
Ensure that the type is not registered as a typedef

When qRegisterMetaType() is given a dummy parameter as 0 then it will
try to register it as a typedef and not a type.  Changing it to be -1
for the dummy parameter will ensure that it is not registered as a
typedef.

Task-number: QTBUG-18555
Reviewed-by: Martin Petersson
5 years agoFix set/paperSize(QPrinter::PaperSize) on Mac
Andy Shaw [Sun, 11 Sep 2011 10:03:58 +0000 (12:03 +0200)]
Fix set/paperSize(QPrinter::PaperSize) on Mac

This fixes the paper size setting on Mac as it would not return the
same paper size that was set with setPaperSize() when calling
paperSize().

Test is included.

Task-number: QTBUG-20882

5 years agoEnsure that QSqlDatabase::database() is still thread-safe
Andy Shaw [Thu, 10 Nov 2011 06:56:57 +0000 (07:56 +0100)]
Ensure that QSqlDatabase::database() is still thread-safe

QSqlDatabase::database() is documented to be thread-safe and when the
driver is queried for the numericalPrecisionPolicy set then it can
comprimise the thread-safety.

Since the driver itself (if one is set) will be queried for the
numericalPrecisionPolicy when numericalPrecisionPolicy() is called on
the QSqlDatabase then we can have it fallback to the default instead
rather than taking the driver's own setting.

Task-number: QTBUG-13423

5 years agolibpng config for WEC7
jaanttil [Mon, 3 Oct 2011 13:16:57 +0000 (16:16 +0300)]
libpng config for WEC7

WEC7 is missing some time conversion related functions ->
configured libpng for WinCE accordingly.

Task-number: QTBUG-22506

5 years agoHide png symbols in a namespace for -qt-libpng
Daniel Teske [Tue, 22 Nov 2011 17:59:31 +0000 (18:59 +0100)]
Hide png symbols in a namespace for -qt-libpng

If qt is compiled with -qt-libpng then the png symbols
prevent a loading of another libpng. With this patch
the png symbols are hidden and thus it is possible
to load another libpng.

Reviewed-by: hjk <qtc-committer@nokia.com>
5 years agoFixes: libpng symbols exported from QtGui.dll on Windows
aavit [Mon, 10 Oct 2011 12:22:17 +0000 (14:22 +0200)]
Fixes: libpng symbols exported from QtGui.dll on Windows

The upgrade of the bundled libpng to version 1.5 had the side effect
of causing the png functions to be exported from the QtGUi DLL
when built with the MS Visual C++ compiler.

Task-number: QTBUG-21455
Reviewed-by: Kim
5 years agoEnsure that using multiple GridViews with the same model source works
Andy Shaw [Tue, 1 Nov 2011 15:10:02 +0000 (16:10 +0100)]
Ensure that using multiple GridViews with the same model source works

When the same model source is used in multiple GridViews then it can
get into a state where items that have been inserted are removed from
a list which it then later tries to access to emit signals for.

This patch ensures that a list of the items that the signal is emitted
for is kept before any of the wrapper items are potentially deleted so
that the signals can be emitted as expected correctly.

Task-number: QTBUG-22271

5 years agoVarious qt documentation fixes (wk 44)
artoka [Tue, 13 Dec 2011 13:06:03 +0000 (15:06 +0200)]
Various qt documentation fixes (wk 44)

Fixes for bugs: QTBUG-13362, QTBUG-15738, QTBUG-15921,
QTBUG-18356, QTBUG-18417, QTBUG-18664, QTBUG-21562, QTBUG-22094,
and QTBUG-18741.

5 years agoVarious qt documentation fixes (wk 43)
artoka [Tue, 13 Dec 2011 12:20:30 +0000 (14:20 +0200)]
Various qt documentation fixes (wk 43)

Fixes for bugs: QTBUG-21073, QTBUG-8625, QTBUG-1231, QTBUG-19808,
QTBUG-8939, QTBUG-20399, QTBUG-20944, QTBUG-12096, QTBUG-12389,
QTBUG-6151, QTBUG-16667, QTBUG-7542, QTBUG-22095, QTBUG-11278 and
QTBUG-15653

5 years agoVarious qt documentation fixes (wk 42)
artoka [Tue, 13 Dec 2011 11:02:52 +0000 (13:02 +0200)]
Various qt documentation fixes (wk 42)

Fixes for bugs: QTBUG-8673, QTBUG-18101, QTBUG-14194, QTBUG-9109,
QTBUG-8331, QTBUG-8329, QTBUG-8786, QTBUG-8787, QTBUG-21295,
QTBUG-14554, QTBUG-19367, QTBUG-8323, QTBUG-9466, QTBUG-7924
and QTBUG-20355.

5 years agoVarious qt documentation fixes (wk 40&41)
artoka [Tue, 13 Dec 2011 10:06:14 +0000 (12:06 +0200)]
Various qt documentation fixes (wk 40&41)

Fixes for bugs: QTBUG-21067, QTBUG-17025, QTBUG-11489, QTBUG-20069,
QTBUG-3563, QTBUG-20089, QTBUG-13983, QTBUG-11820, QTBUG-14732,
QTBUG-14521, QTBUG-9675, QTBUG-18313, QTBUG-18313, QTBUG-11312,
QTBUG-17739, QTBUG-7678, QTBUG-14759, QTBUG-14756, QTBUG-14677,
QTBUG-16164, QTBUG-20721, QTBUG-15562, QTBUG-17029 and QTBUG-18544.

5 years agoFix QProgressBar causing timer event spam
Tero Ahola [Thu, 10 Nov 2011 15:24:14 +0000 (16:24 +0100)]
Fix QProgressBar causing timer event spam

On Windows you will get a lot of timer events if you use QProgressBar
widget. This is because QWindowsStyle uses a timer to animate a
progress bar with unknown state (min and max values both zero). The
issue was fixed by starting the timer only if needed.

Task-number: QTBUG-10501

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
5 years agoFixed resource leak when setting QProgressBar style sheet
Tero Ahola [Mon, 10 Oct 2011 15:02:33 +0000 (17:02 +0200)]
Fixed resource leak when setting QProgressBar style sheet

Task-number: QTBUG-19110

Merge-request: 2687
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
5 years agoPrevent stroking zero length lines in qstroker.cpp
Samuel Rødal [Fri, 25 Feb 2011 15:11:21 +0000 (16:11 +0100)]
Prevent stroking zero length lines in qstroker.cpp

If several consecutive points are the same, we should just skip until we
get a unique point. This prevents stroking artifacts in the miter join
for example.

Task-number: QTBUG-5331
Reviewed-by: Kim
5 years agoFixes the double spinbox not updating geometry when suffix is changed
Thierry Bastian [Wed, 7 Jul 2010 15:11:39 +0000 (17:11 +0200)]
Fixes the double spinbox not updating geometry when suffix is changed

patch was found in the task and looks good.

Task-number: QTBUG-9530

5 years agoAdd an app icon.
Thiago Macieira [Thu, 22 Apr 2010 08:19:23 +0000 (10:19 +0200)]
Add an app icon.

Thanks to Mario Carrion for the patch.

Task-number: QTBUG-10099
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
5 years agoDesigner/QFormBuilder::save(): Fix traversal of QGridLayout/QFormLayout
Friedemann Kleint [Thu, 23 Sep 2010 11:36:50 +0000 (13:36 +0200)]
Designer/QFormBuilder::save(): Fix traversal of QGridLayout/QFormLayout

Remove redundant code in qdesigner_resource ass well.

Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Task-number: QTBUG-13683

5 years agoHTTP internals: send password even if no username is set
Robert Hogan [Mon, 15 Aug 2011 08:43:43 +0000 (10:43 +0200)]
HTTP internals: send password even if no username is set

Setting only a password (no username) for HTTP requests does not
result in the password being sent.
Only cancel authentication if neither a username nor a password is set.
Requiring a username was preventing user-less logins.

Merge-request: 1250
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Task-number: QTBUG-15566

5 years agoAssistant: Get rid of bogus warning.
Christian Kandeler [Wed, 22 Dec 2010 13:30:59 +0000 (14:30 +0100)]
Assistant: Get rid of bogus warning.

Task-number: QTBUG-16096

5 years agoDesigner: Set dirty correctly in case resource paths were changed.
Friedemann Kleint [Mon, 7 Mar 2011 08:56:58 +0000 (09:56 +0100)]
Designer: Set dirty correctly in case resource paths were changed.

Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Task-number: QTBUG-17918

5 years agoDesigner: Do not translate page object names of QMdiArea.
Friedemann Kleint [Mon, 21 Mar 2011 08:35:19 +0000 (09:35 +0100)]
Designer: Do not translate page object names of QMdiArea.

and page-based containers.

Task-number: QTBUG-18244

5 years agoDesigner: Allow promoted QWidget's to be buddies.
Friedemann Kleint [Fri, 8 Apr 2011 15:14:22 +0000 (17:14 +0200)]
Designer: Allow promoted QWidget's to be buddies.

Extend check for focusPolicy by promoted check.

Task-number: QTBUG-18631

5 years agoDesigner: Specify 'notr' attribute for buttongroup name.
Friedemann Kleint [Fri, 8 Apr 2011 15:03:43 +0000 (17:03 +0200)]
Designer: Specify 'notr' attribute for buttongroup name.

Such that the name does not show up in lupdate.

5 years agoDesigner: Check for 0-spacing when loading grid settings.
Friedemann Kleint [Mon, 21 Feb 2011 08:17:28 +0000 (09:17 +0100)]
Designer: Check for 0-spacing when loading grid settings.

Task-number: QTBUG-17542

5 years agoAdd version attributes as per ODF specification
Tomas Straupis [Tue, 29 Mar 2011 15:08:03 +0000 (10:08 -0500)]
Add version attributes as per ODF specification

Merge-request: 1120
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
5 years agoFixed the combobox just adjusting their size without relayouting
Thierry Bastian [Thu, 1 Jul 2010 10:48:00 +0000 (12:48 +0200)]
Fixed the combobox just adjusting their size without relayouting

When adjustSize() is called, we nned to call updateGeometry to notify
the layout in which the combobox is to redo the layout.

Task-number: QTBUG-2559

5 years agoFix a bug with menu overflowing from a lower resolution second screen.
Pierre Rossi [Mon, 10 Jan 2011 17:46:19 +0000 (18:46 +0100)]
Fix a bug with menu overflowing from a lower resolution second screen.

The menu needs to take into account the screen geometry of the screen
it's about to be shown on (not the last screen it was shown on) when
updating its actions rects

Task-number: QTBUG-2748
Reviewed-by: Thierry
5 years agoSmall fix in iteviews for sizeHintForColumn/Row
Thierry Bastian [Fri, 9 Jul 2010 09:28:26 +0000 (11:28 +0200)]
Small fix in iteviews for sizeHintForColumn/Row

We were trying to check the column/row count but always from the root of
the model insteal of the root that can be defined in the view.

Task-number: QTBUG-5773

5 years agoadd auto test for SSL certificates containing utf8 characters
Pierre Rossi [Mon, 21 Mar 2011 17:15:01 +0000 (18:15 +0100)]
add auto test for SSL certificates containing utf8 characters

Task-number: QTBUG-7912
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
5 years agofix coding style for merge request re. utf8 characters in SSL certs
Pierre Rossi [Tue, 1 Feb 2011 10:29:13 +0000 (11:29 +0100)]
fix coding style for merge request re. utf8 characters in SSL certs

fixes minor coding issues for
"Use OpenSSL X509_NAME_ENTRY API to parse UTF8 subjectName/issuerName"

Task-number: QTBUG-7912
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
5 years agoUse OpenSSL X509_NAME_ENTRY API to parse UTF8 subjectName/issuerName
Raul Metsma [Wed, 4 May 2011 15:40:15 +0000 (17:40 +0200)]
Use OpenSSL X509_NAME_ENTRY API to parse UTF8 subjectName/issuerName

... to be able to display non-ASCII names from subject and issuerInfo.

Task-number: QTBUG-7912
Merge-request: 922
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
5 years agoDon't destroy Qt's internal pthread_key_t if it was not initialized
Bradley T. Hughes [Thu, 18 Nov 2010 07:38:34 +0000 (08:38 +0100)]
Don't destroy Qt's internal pthread_key_t if it was not initialized

The destructor function destroy_current_thread_data_key() was always
called on library unload, even if the pthread_key_t was not initialized.
This can cause us to destroy a key that doesn't belong to us, as pointed
out in the task below.

Fix this by creating a function static instance of a class whose
destructor will destroy the key.

Task-number: QTBUG-10861
Reviewed-by: Morten Sørvig
5 years agoFixed a problem with toolbars not relayouting
Thierry Bastian [Wed, 1 Dec 2010 15:53:59 +0000 (16:53 +0100)]
Fixed a problem with toolbars not relayouting

This could happen when dragging an extended toolbar from a mainwindow
PAtch was provided on IRC by ravek (#dev)

Task-number: QTBUG-10920
Reviewed-by: Trust-Me
5 years agoFixed the itemviews so that the editor is not considered opaque any more
Thierry Bastian [Tue, 29 Jun 2010 08:19:30 +0000 (10:19 +0200)]
Fixed the itemviews so that the editor is not considered opaque any more

The editor was always considered opaque and clipping was set on the
painter. This assumption can't be verified.

Task-number: QTBUG-11367

5 years agoUse packagesExist() macro to bail if a nonexistant package is requested.
Robin Burchell [Mon, 17 Jan 2011 12:31:45 +0000 (13:31 +0100)]
Use packagesExist() macro to bail if a nonexistant package is requested.

This will solve problematic cases with large projects, lots of required
packages, and no configure scripts failing to build partway through. Previously,
PKGCONFIG processing would error to stdout, but continue the compilation.

This should not affect existing code overly much, apart from projects who added
nonexistent packages they didn't use to PKGCONFIG (but let's face it, that's a
bit of a stupid thing to do.)

Task-number: QTBUG-11418

Merge-request: 1022
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
5 years agoQListView: speedup QListView::setRowHidden()
Olivier Goffart [Wed, 16 Jun 2010 09:00:15 +0000 (11:00 +0200)]
QListView: speedup QListView::setRowHidden()

Basically the same optimisation that had been made long ago in the tree view:
Use the right data structure for QListViewPrivate::hiddenRows
 (QSet instead of QVector)

Task-number: QTBUG-11438
Reviewed-by: Gabriel
5 years agoFixed partial update on QLineEdit
Thierry Bastian [Wed, 18 Aug 2010 12:15:14 +0000 (14:15 +0200)]
Fixed partial update on QLineEdit

QLineControl passes a QRect to tell when a partial update is needed.
We used to connect this slot to update. This made the whole lineedit
update when the cursor blinked.

Task-number: QTBUG-12709
Reviewed-by: gabi
5 years agoQGroupBox: Fix the focus rect of the title when using stylesheet
Martin Pejcoch [Thu, 19 Aug 2010 12:21:56 +0000 (14:21 +0200)]
QGroupBox: Fix the focus rect of the title when using stylesheet

Task-number: QTBUG-13015
Reviewed-by: Olivier Goffart
5 years agoTake Xft.hintstyle by default to match the behavior of GTK+
Jiang Jiang [Thu, 25 Nov 2010 16:30:32 +0000 (17:30 +0100)]
Take Xft.hintstyle by default to match the behavior of GTK+

For Qt apps running in GNOME, we use the GTK+ settings by
default (instead of fontconfig settings).

Task-number: QTBUG-13800
Reviewed-by: Samuel
5 years agoFix fontconfig pattern merging
Jiang Jiang [Wed, 13 Oct 2010 16:43:23 +0000 (18:43 +0200)]
Fix fontconfig pattern merging

When merging fontconfig patterns, we need to clean up existing object
first, otherwise the added object will be appended instead of replacing
the existing object. When multiple font engines are using shaping, if
fontconfig patterns are not correctly merged, it will result using the
old font. For instance, in "<b>Fake Bold</b> Normal", "Normal" text will
continue using the font for "Fake Bold" (that only happen with fallback
fonts).

Task-number: QTBUG-14455
Reviewed-by: Eskil
5 years agoDraw focusrect through style proxy
Jens Bache-Wiig [Fri, 17 Dec 2010 14:12:30 +0000 (15:12 +0100)]
Draw focusrect through style proxy

This function call was simply not converted to use the new proxy
style, hence preventing people from overriding it properly.

Reviewed-by: Andy Shaw
Task-number: QTBUG-16127

5 years agoSet no brush when the brush is a solid patern transparent color.
Pierre Rossi [Wed, 29 Dec 2010 17:12:30 +0000 (18:12 +0100)]
Set no brush when the brush is a solid patern transparent color.

Fix a bug in pdf print engine that was noticeable when printing
a webpage: the missing image graphic didn't appear in the pdf.

Task-number: QTBUG-16435
Reviewed-by: sroedal
5 years agoFixed hslHue / hslHueF returning the wrong value for achromatic QColors.
Samuel Rødal [Wed, 26 Jan 2011 12:37:45 +0000 (13:37 +0100)]
Fixed hslHue / hslHueF returning the wrong value for achromatic QColors.

Made toHsl() work the same way as toHsv(), ensuring the hue gets set to
USHRT_MAX and not 0.

Task-number: QTBUG-16530
Reviewed-by: Eskil Abrahamsen Blomfeldt
5 years agoFixed QPainterPath::pointAtPercent(t) for one-element paths.
Samuel Rødal [Tue, 25 Jan 2011 10:02:16 +0000 (11:02 +0100)]
Fixed QPainterPath::pointAtPercent(t) for one-element paths.

Return the MoveTo element instead of QPointF(0, 0).

Task-number: QTBUG-16788
Reviewed-by: Eskil Abrahamsen Blomfeldt
5 years agoFixes: missing export of gzungetc() from internal zlib
aavit [Fri, 18 Feb 2011 14:27:21 +0000 (15:27 +0100)]
Fixes: missing export of gzungetc() from internal zlib

Task-number: QTBUG-17278
Reviewed-by: jiang
5 years agoFail in a nicer way when QPixmap is used in a non-GUI application.
Samuel Rødal [Fri, 4 Mar 2011 09:29:46 +0000 (10:29 +0100)]
Fail in a nicer way when QPixmap is used in a non-GUI application.

Show same fatal message as when trying to instantiate a QWidget.

Task-number: QTBUG-17873
Reviewed-by: Gunnar Sletta
5 years agofix QLocalSocket::isValid() on Windows
Joerg Bornemann [Fri, 1 Apr 2011 16:35:28 +0000 (18:35 +0200)]
fix QLocalSocket::isValid() on Windows

This function always returned false, even if the socket was connected.

Task-number: QTBUG-18204
Reviewed-by: Martin Petersson
5 years agoQAccessibleTextEdit: Using x coordinate for calculate character width
José Millán Soto [Sun, 20 Mar 2011 18:19:32 +0000 (19:19 +0100)]
QAccessibleTextEdit: Using x coordinate for calculate character width

Merge-request: 1148
Task-number: QTBUG-18233
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
5 years agoFix errors when compiling Qt with STLport
Cédric OCHS [Mon, 28 Mar 2011 11:28:00 +0000 (13:28 +0200)]
Fix errors when compiling Qt with STLport

Task-number: QTBUG-18374
Reviewed-by: Olivier Goffart
Merge-request: 1157

5 years agoCompile fix on solaris
Thierry Bastian [Fri, 26 Nov 2010 16:24:51 +0000 (17:24 +0100)]
Compile fix on solaris

Task-number: QTBUG-15323
Reviewed-by: TrustMe
5 years agoqRound: do not do operation with double when qreal is float
Olivier Goffart [Mon, 17 Jan 2011 09:42:47 +0000 (10:42 +0100)]
qRound: do not do operation with double when qreal is float

0.5 is double a literal, and they force computation on double
while it would be more optimized on qreal if qreal is a float

Task-number: QTBUG-16673
Reviewed-by: Thierry
5 years agoQSslConfiguration: fix equals operator
Peter Hartmann [Fri, 15 Apr 2011 08:19:55 +0000 (10:19 +0200)]
QSslConfiguration: fix equals operator

5 years agoFix cursor position of one digit after RTL text
Jiang Jiang [Tue, 2 Nov 2010 11:36:27 +0000 (12:36 +0100)]
Fix cursor position of one digit after RTL text

A single digit after RTL text will be considered as RTL because it
was treated as Other Neutral (DirON), it can be solved by changing
it to DirAN.

Task-number: QTBUG-2795
Reviewed-by: Lars Knoll
5 years agofix project name duplicates in generated projects.sln
Joerg Bornemann [Tue, 21 Sep 2010 08:30:48 +0000 (10:30 +0200)]
fix project name duplicates in generated projects.sln

Using QMAKE_PROJECT_NAME to rename certain projects.

Task-number: QTBUG-6887
Reviewed-by: owolff
5 years agoqmake: introduction of QMAKE_PROJECT_NAME
Joerg Bornemann [Mon, 20 Sep 2010 15:48:45 +0000 (17:48 +0200)]
qmake: introduction of QMAKE_PROJECT_NAME

With this variable one can set the project name for IDE project files.
Currently only used for Visual Studio

Task-number: QTBUG-3206
Reviewed-by: ossi
5 years agoSend the hoverLeave not properly sent on the widget inside QGPW.
Alexis Menard [Mon, 18 Oct 2010 14:26:12 +0000 (16:26 +0200)]
Send the hoverLeave not properly sent on the widget inside QGPW.

We need to send the hover leave event on the proper receiver in case
the widget we embed in a complex hierarchy not the widget itself.

Task-number:QTBUG-6986
Reviewed-by:bnilsen

5 years agoSupport exception handling in QtConcurrent::run()
Morten Johan Sørvig [Thu, 11 Nov 2010 08:59:53 +0000 (09:59 +0100)]
Support exception handling in QtConcurrent::run()

Use QFutureInterface::reportException() in the
same way that we do in QtConcurrent::map().

5 years agoMake QtUiTools use the lib-infix passed to configure.
Friedemann Kleint [Fri, 25 Mar 2011 14:43:21 +0000 (15:43 +0100)]
Make QtUiTools use the lib-infix passed to configure.

Patch contributed by OpenEmbedded project.

Reviewed-by: hjk
Task-number: QTBUG-7169

5 years agoThere is no predefined qmake x11 scope for x11 builds.
Robert Griebl [Thu, 28 Oct 2010 15:18:24 +0000 (17:18 +0200)]
There is no predefined qmake x11 scope for x11 builds.

All the autotests that are using a x11{} scope to add QMAKE_LIBS_X11 to LIBS
are actually not adding anything at all, but just happen to build correctly
because the standard GNU ld resolves symbols in shared libraries
recursively (and libQtGui depends on all those X libs already).

Building those tests with GNU gold will lead to undefined X* symbols, since
gold doesn't use implicitly dependant libs to resolve symbols.

Reviewed-by: Harald Fernengel
5 years agoavoid infinite recursion in canonicalized() if cwd is a symlink
Ritt Konstantin [Tue, 27 Apr 2010 02:12:47 +0000 (06:12 +0400)]
avoid infinite recursion in canonicalized() if cwd is a symlink

if current directory is a symlink to another directory
on the same drive (the simplest example; say, c:\current\dir
is a symlink to c:\target) then the first valid prefix for
"c:\target" in canonicalized() is "c:" (NOT "c:\") and would
be treated like "c:\current\dir" again...and again...
until stack overflow :)

Merge-Request: 494
Task-number: QTBUG-7610
Reviewed-by: Zeno Albisser
5 years agoFix memory leak in XSD component of XmlPatterns
Honglei Zhang [Wed, 27 Apr 2011 06:19:57 +0000 (09:19 +0300)]
Fix memory leak in XSD component of XmlPatterns

There are couple of memory leaks in XmlPatterns when parsing XSD
files. The reason is that the module over uses the shared data
pointer and generates many cyclic reference loop. Some part of
the code is refactored. Instead of using shared data pointer,
normal C++ pointer is used to break the ownership loop. This is
bug fix for QTBUG-8948.

Task-number: QTBUG-8948
Reviewed-by: Sami Merila and Laszlo Agocs
5 years agoQNAM: Do not cache network connections per username.
Robert Hogan [Mon, 1 Nov 2010 11:44:47 +0000 (12:44 +0100)]
QNAM: Do not cache network connections per username.

If user information is present in the Url, QNetworkAccessHttpBackend
will cache the connection with a key in the format of user@hostname.

This causes the following tests in QtWebKit to fail:

LayoutTests/http/tests/xmlhttprequest/re-login.html
LayoutTests/http/tests/xmlhttprequest/re-login-async.html

The tests call the same url with user1 credentials, no credentials,
user 2 credentials and no credentials. In the second and fourth calls
Qt should use the most recently stored credentials. For the fourth
call it currently uses user1's credentials instead of user2's. This
is because it retrieves the cached connection from the third call
and uses the user/pass in that connection's authenticator - which is
user1's.

In order to retrieve the connection with the most recently used
credentials userinfo should be removed when caching the connection
in QNetworkAccessCache. This will allow Qt to retrieve the connection
used in the third call, in fact the same cached connection for all
four calls.

Merge-request: 623
Reviewed-by: Markus Goetz <Markus.Goetz@nokia.com>
5 years agoFix painting of overlines in labels.
Gunnar Sletta [Wed, 23 Jun 2010 05:18:19 +0000 (07:18 +0200)]
Fix painting of overlines in labels.

If the size of the widget is an odd number, the layout rect
will be positioned at a 0.5 offset. The clipping set further
below will snap this to 1 and thus clip away the anything drawn
on the first row of pixels. Fix this by aligning the rectangle
we get by layout rect.

Reviewed-by: Eskil
Task: http://bugreports.qt.nokia.com/browse/QTBUG-9684

5 years agoAvoid repeatedly trying to load unloadable plugins, causing slowness
aavit [Wed, 23 Mar 2011 12:40:50 +0000 (13:40 +0100)]
Avoid repeatedly trying to load unloadable plugins, causing slowness

In certain uncommon situations, where different Qt versions are used
on the same system, the plugin caching optimization may identify a dll
as a valid plugin, even though it will later fail to load. This fix
will avoid that Qt repeatdly tries to reopen such dlls, something
which caused a significant performance hit in these cases. E.g. where
Qt would unsuccessfully try to load a number of KDE image format plugins
for every image loading operation.

Task-number: QTBUG-10066
Reviewed-by: thiago
Reviewed-by: janarve
5 years agoFix to allow upper- and lowercase .dll suffix on windows
Zeno Albisser [Thu, 29 Apr 2010 14:56:12 +0000 (16:56 +0200)]
Fix to allow upper- and lowercase .dll suffix on windows

This fix is needed since windows uses case insensitive filesystems.

Reviewed-by: Joao
Task-number: QTBUG-10305

5 years agoFix conversion between QVariant and QScriptValue.
Jedrzej Nowacki [Thu, 29 Apr 2010 14:25:20 +0000 (16:25 +0200)]
Fix conversion between QVariant and QScriptValue.

Function converting from QVariant to QScriptValue is smart and tries
to unwrap a value. So QVariant(1234) after conversion will be equal
to QScriptValue(1234). It is ok, but QVariant(QVariant(...)) should be
unpacked only once.

Reviewed-by: Kent Hansen
Task-number: QTBUG-10315

5 years agoQComboBox::modelColumn was not respected when selecting an item
Gabriel de Dietrich [Tue, 25 May 2010 18:09:00 +0000 (20:09 +0200)]
QComboBox::modelColumn was not respected when selecting an item

Auto-test included

Reviewed-by: Olivier
Task-number: QTBUG-10491

5 years agoUse WS_POPUP window style more often on windows.
Prasanth Ullattil [Tue, 16 Nov 2010 10:24:53 +0000 (11:24 +0100)]
Use WS_POPUP window style more often on windows.

We dont use the WS_POPUP style when one of the following window flags
are set (WindowSystemMenuHint, WindowTitleHint, WindowMinMaxButtonsHint
WindowCloseButtonHint, WindowContextHelpButtonHint). None of these flags
can conflict with this style, hence being removed.

Task-number: QTBUG-10589
Reviewed-by: Denis
5 years agoAuto expand of QTreeWidget does not work correctly if animated
Thierry Bastian [Thu, 1 Jul 2010 07:53:19 +0000 (09:53 +0200)]
Auto expand of QTreeWidget does not work correctly if animated

The problem was that the internal state of the tree was not correctly
reset. Patch comes from the task.

Task-number: QTBUG-10850

5 years agoFix progressbar animation on Vista
Jens Bache-Wiig [Wed, 6 Apr 2011 12:35:36 +0000 (14:35 +0200)]
Fix progressbar animation on Vista

This fixes two issues.
- The indeterminate animation was sometimes incorrectly disabled
  when value was 0
- The progress animation was incorrectly stopped when progress
  bars were disabled

Task-number: QTBUG-10957
Reviewed-by: richard
5 years agoAdjust handling of library .bundle on Mac
Zeno Albisser [Fri, 11 Jun 2010 11:06:38 +0000 (13:06 +0200)]
Adjust handling of library .bundle on Mac

QLibrary::isLibrary() returns true for files with the sufix .bundle.
But we did not use to determine the proper library within the bundle
in that case.

Reviewed-by: Fabien Freling
Task-number: QTBUG-11217

5 years agoFix the blank areas during resize with the raster engine on Mac OS X.
Fabien Freling [Wed, 30 Jun 2010 16:53:55 +0000 (18:53 +0200)]
Fix the blank areas during resize with the raster engine on Mac OS X.

This is mainly done by reverting the commit
04e34fe3aecca482abeeabe2e31778e9102eeb08

Task-number: QTBUG-11518
Reviewed-by: Samuel
5 years agoSetting a timeSpec on QDateTimeEdit breaks the edit when only time is shown
Frederik Gladhorn [Thu, 29 Jul 2010 14:09:04 +0000 (16:09 +0200)]
Setting a timeSpec on QDateTimeEdit breaks the edit when only time is shown

Because of the time zone change we get an "overflow" in the min and max time.
For example min 00:00:00 becomes 01:00:00 and max 23:59:59 becomes 00:59:59
which is an invalid time span and the displayed time gets fixed to the newly
set min/max value.
Autotest included.

Task-number: QTBUG-12384
Reviewed-by: Gabriel
5 years agoCocoa: QShortcut(Qt::Key_Enter) does not show in the menu bar
Richard Moe Gustavsen [Tue, 4 May 2010 11:59:27 +0000 (13:59 +0200)]
Cocoa: QShortcut(Qt::Key_Enter) does not show in the menu bar

The reason is that cocoa expects the unicode control character for
"enter", rather than the glyph showing an arrow. So rather than
using the glyph-table from QKeySequence, we should use a table
containing a mapping from Qt::Key to Cocoa control key. Luckily,
such a table exists allready in qt_cocoa_helpers, but reversed (
cocoa key to Qt::Key). So this patch creates a function that
binds all this together.

Reviewed-by: cduclos
5 years agoShortcutOverride has no effect on some shortcuts on Mac OS X (Cocoa).
Prasanth Ullattil [Thu, 11 Nov 2010 11:29:44 +0000 (12:29 +0100)]
ShortcutOverride has no effect on some shortcuts on Mac OS X (Cocoa).

When generating the native key sequences for menu items, Qt prefers the
non private unicode characters. But the characters in the NSEvent for
keyboard events can contain characters form the unicode range reserved
for Apple.
For e.g. when user presses the "delete" key, the event contains
NSDeleteFunctionKey, where in Qt is expecting NSDeleteCharacter. For now
this is the only key identified for translation. If we find similar
translations, those can be added to qt_mac_removePrivateUnicode().

Task-number: QTBUG-12495
Reviewed-by: Denis
5 years agoDisable selection of Libraries on Windows 7 in getExistingDirectory().
Prasanth Ullattil [Wed, 13 Oct 2010 11:35:30 +0000 (13:35 +0200)]
Disable selection of Libraries on Windows 7 in getExistingDirectory().

The Libraries on Windows 7 are user-defined collection of folders, which
is only a logical representation. There are no file system entries
associated with it .
This patch makes sure that user cannot choose a library when using the
QFileDialog::getExistingDirectory(), in such cases it will show a
standard windows warning message.

Task-number: QTBUG-12655
Reviewed-by: Thierry Bastian
5 years agoQMetaType: add "signed char" as builtin.
Olivier Goffart [Mon, 16 Aug 2010 13:04:17 +0000 (15:04 +0200)]
QMetaType: add "signed char" as builtin.

According to the c++ specificaiton, 3.9.1 [basic.fundamentals]
Plain char, signed char, and unsigned char are three distinct types

In QMetaType, I decide that 'signed char' alias with 'char'
This allow qint8 to work nice (and which is already registered as
an alias to char (QMetaType::Char)

Reviewed-by: Joao
Task-number: QTBUG-12920

5 years agoMac Style: Compile Fix
Martin Petersson [Mon, 14 Mar 2011 13:20:22 +0000 (14:20 +0100)]
Mac Style: Compile Fix

Task-number: QTBUG-13055
Reviewed-by: Markus Goetz
5 years agoFix corner of scroll area so it is stylable on Mac.
Martin Petersson [Thu, 10 Mar 2011 13:15:09 +0000 (14:15 +0100)]
Fix corner of scroll area so it is stylable on Mac.

Task-number: QTBUG-13055
Reviewed-by: Olivier Goffart
5 years agoKeep other text format with QTextOption::SuppressColors tag on
Jiang Jiang [Wed, 22 Sep 2010 08:11:41 +0000 (10:11 +0200)]
Keep other text format with QTextOption::SuppressColors tag on

Setting the QTextOption::SuppressColors tag on a QTextDocument
breaks all text format, not just colors. This patch fix this by
selectively ignoring color properties in the format and keeping
other properties.

Task-number: QTBUG-13090
Reviewed-by: Eskil
5 years agolet generated flag control SQL generation
Mark Brand [Tue, 29 Mar 2011 15:27:17 +0000 (10:27 -0500)]
let generated flag control SQL generation

Previously, if QSqlField's QVariant value had type "invalid", this
caused the field to be omitted in data-changing SQL statements generated
from QSqlRecord edit buffers.

Complaints against this mechanism:
- It precludes initializing value type to field type, which would
  otherwise seem sensible and useful, such as when using model.data() in
  contexts where the field type is not readily available.
- QSqlField::clear() does initialize value type to match field type and
  so is incompatible with this mechanism.
- Problems such as described in QTBUG-13211.
- Unwanted distinction between "invalid" and "null" when mapping field
  values to SQL values.
- QSqlField's generated flag already provides a mechanism for
  controlling SQL generation.

These complaints are redressed here by replacing this mechanism with
reliance on QSqlField's generated flag. The flag is initialized to false
in new edit records and set to true when a value is set. Applications
can still manipulate generated flags directly to control SQL generation.

Generation of SELECT statements already used the generated flag and is
unaffected by this change.

Merge-request: 1114
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Michael Goddard
5 years agoQNAM HTTP: Do not set cache headers when already set by user
Robert Hogan [Mon, 1 Nov 2010 13:01:22 +0000 (14:01 +0100)]
QNAM HTTP: Do not set cache headers when already set by user

Qt clobbers the cache-control headers set by WebCore when
CacheLoadControlAttribute == QNetworkRequest::AlwaysNetwork.
This causes at least one QtWebKit layout test to fail:
http/tests/misc/refresh-headers.php
Qt needs to detect if the client has already made a cache-control
decision in the headers before overwriting them.
See https://bugs.webkit.org/show_bug.cgi?id=45598

Task-Number: QTBUG-13564
Merge-request: 2472
Reviewed-by: Markus Goetz <Markus.Goetz@nokia.com>
5 years agoMac: Center the Window title on Cocoa.
Martin Petersson [Thu, 10 Mar 2011 14:07:15 +0000 (15:07 +0100)]
Mac: Center the Window title on Cocoa.

Task-number: QTBUG-13593
Reviewed-by: Richard Moe Gustavsen
5 years agoFix several errors with shaping of Indic scripts
pravin.d.s [Mon, 11 Oct 2010 11:25:29 +0000 (13:25 +0200)]
Fix several errors with shaping of Indic scripts

1. The opentype init feature was applied to some characters
even when the character appeared inside a word.

2. Using the ZWJ to separate Ra and Halant Ya should connect
the two latter characters and form a Yaphala

3. Some Oriya chars were not correctly marked as below-base
form.

Task-number: QTBUG-13620, QTBUG-13616, QTBUG-13542

Merge-request: 2484
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
5 years agoMac: add support for closing dialogs using Cmd-D
Richard Moe Gustavsen [Mon, 21 Feb 2011 09:25:57 +0000 (10:25 +0100)]
Mac: add support for closing dialogs using Cmd-D

This is how dialogs work natively on Mac; you can choose the
"Don't Save" button by using the shortcut "Cmd-D"

Rev-By: jbache
5 years agoMove advances for control character in Indic syllable shaping
Jiang Jiang [Sun, 12 Dec 2010 16:33:12 +0000 (17:33 +0100)]
Move advances for control character in Indic syllable shaping

When handling control characters (ZWJ, ZWNJ) in Indic syllables,
we only moved glyphs and attributes of the item, advances should
also be moved forward, otherwise we will use the advance of ZWJ/
ZWNJ for the part of syllable, which is normally zero, it results
some positioning problems.

Task-number: QTBUG-14204
Reviewed-by: Lars Knoll
5 years agoMake application font family names locale sensitive in X11
Jiang Jiang [Wed, 5 Jan 2011 18:39:00 +0000 (19:39 +0100)]
Make application font family names locale sensitive in X11

So that they will match the family names returned by
QFontDatabase::families. Because the family names returned
by FcFreeTypeQueryFace are not sorted with locale as the
names returned by FcFontList, we have to find out the
family name matching the system language in the former case.

Task-number: QTBUG-14269
Reviewed-by: Eskil
5 years agoThe completer in an itemview would not be activated right away
Thierry Bastian [Mon, 11 Oct 2010 12:28:05 +0000 (14:28 +0200)]
The completer in an itemview would not be activated right away

If you have set the edit triggers to AnyKeyPressed and you press a key
the completer would not kick in because the key event would come before
the lineedit gets focus. The completer is only active when the lineedit
has focus.

Task-number: QTBUG14363
Reviewed-by: ogoffart
5 years agoFix regression in ListView
Jens Bache-Wiig [Thu, 13 Oct 2011 12:37:36 +0000 (14:37 +0200)]
Fix regression in ListView

This reverts commit d91a8f3a5dbcf3e4c4c0afb28463b25e192b00e4
and introduces a minimal fix for the original crash report.

Task-number: QTBUG-21433
Reviewed-by: gabriel
5 years agoFixed a possible crash when resizing QListView
Thierry Bastian [Wed, 13 Oct 2010 12:22:52 +0000 (14:22 +0200)]
Fixed a possible crash when resizing QListView

The problem is that the layout code was called recursively because
the visibility of the scroll bars was constently changed.

Task-Number: QTBUG-14412
Reviewed-By: ogoffart