With modularized Qt, using QT_CONFIG is dangerous, because the behavior
changes depending on the order in which modules are qmake'd.
For example, an autotest doing:
contains(QT_CONFIG,svg):QT += svg
...will depend on libQtSvg if (and only if) the autotest is qmake'd
_after_ qtsvg is qmake'd.
This makes the tested functionality unpredictable.
Also, if the above example occurs within qtbase, it causes the test to
sometimes have a circular dependency: if qtsvg is qmake'd before the
test is qmake'd, the test in qtbase depends on qtsvg which depends on
qtbase.
Tests must avoid functionality tests via QT_CONFIG except where all the
tested modules are dependencies of the current module.
Usage of QT_CONFIG with qt3support was entirely removed since Qt5
will not retain qt3support.
Reviewed-by: Jason McDonald
Change-Id: I5a5013b3ec7e1f38fb78864763c9e7586c15e70b
Recursive QMAKE_EXTRA_TARGETS were omitting the `-f' option to make.
This would break in the case where the correct makefile was not named
`Makefile'. The included autotest demonstrates the problem.
Note that this was fixed for normal targets back in 2005
by faac7bd178654fd67a6f3f9cf4f6f2605071448d (p4 202370), but was not
fixed for extra targets.
Reviewed-by: ossi
(cherry picked from commit 96a3bf7a8bbc1e5361e16cbeeceb4be674b88c30)
(It did not really fix the issue.)
This reverts commit 33f525e636ef8fa64a15d3e66c56adaea0075bda.
Conflicts:
src/gui/graphicsview/qgraphicslinearlayout.cpp
tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
(cherry picked from commit fee052e3e37b3335fe563cb8a1881bf59f9e25d0)
* Do not call invalidate from activateRecursive().
This resulted in that a layout was invalidated as many times as there
were items in the layout.
* Several improvements. Do not call resize(size()) too often.
Calling resize() from the widgetEvent() is not very nice though...
* Remove commented out code
* make sure layout is activated even if the widget does not change size
* activate the layout if the resize is same as size()
* In order to not break existing apps, make this an opt-in feature
with QGraphicsLayout::setInstantInvalidatePropagation(true);
Reviewed-by: Frederik Gladhorn
Reviewed-by: John Tapsell
Make sure the resulting image / pixmap is valid if the source was valid.
Task-number: QTBUG-19157
Reviewed-by: Kim
Reviewed-by: Benjamin Poulain
(cherry picked from commit 1c5da7207a21cc44a4a08d291c290ffcd9b958fd)
Older commit history is in KDE svn:
http://websvn.kde.org/trunk/KDE/kdelibs/kdeui/itemviews/kidentityproxymodel.cpp?view=log
Ammended to update the license headers.
Merge-request: 900
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Conflicts:
doc/src/frameworks-technologies/model-view-programming.qdoc
tests/auto/headers/tst_headers.cpp
(cherry picked from b00089261eafbdf5f92ed94d7fb20b402bfcaeb2)
Widgets are left in a transitional (and incosistent) state while being
re-parented, which caused QWidget::effectiveWinId() to crash in certain
circumstances. See patch for more details.
Auto test included.
Reviewed-by: ogoffart
(cherry picked from commit 6db0153cd7e35e4a919a76ae2aadbf2d2510bfb7)
select code for open C file/socket descriptors was crashing in FD_SET
if a QSocketNotifier was created with an invalid descriptor.
Added two autotests to QSocketNotifier, one to check notifiers with
bogus socket descriptors don't crash, the other to check that notifiers
with posix socket descriptors do work. (symbian socket engine doesn't
use them so they are not implicitly tested)
Reviewed-by: mread
Task-Number: QTBUG-18138
(cherry picked from commit 8a9a6afcf02f089f932bc81431ab46a60af32134)
Ignore warning when the test intentionally sets an invalid socket descriptor.
Make sure to set content type on all http post tests in tst_qnetworkreply.
Run test with enough capabilities to avoid platsec errors when accessing
certificate store.
Reviewed-By: Markus Goetz
(cherry picked from commit 9632fdefa9012ca11cd1345d66bafd6f417de88e)
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Fix tst_QVariant::invalidColor
Move QTextCursor::MoveStyle to Qt namespace
Add some QRawFont related low level functions to avoid extra copying
Since a423ff5474b89028eeca95b254f5184311c8223b, the warning message is
no longer produced.
Reviewed-by: Samuel Rødal
(cherry picked from commit 8a5e82732be3aac37d14ef85c6974add46c6b65f)
We cannot use QTextCursor::MoveStyle enums in QTextLine because
QTextCursor is not a QObject, while referring to that enum in
Q_PROPERTY requires it to be. That's why we need to move the
enums in Qt namespace.
Reviewed-by: David Boddie
(cherry picked from commit 5eba82b752e85a5d6cb3a893214ed2646d75f362)
tst_lancelot did QT+=svg, but didn't actually use QtSvg.
qlocalsocket/lackey uses QtScript, which is not available when compiling
qtbase.
Change-Id: Ic3cc5a6f74a58ee8f2fdc48b9c852d9551b85f68
Any test which needs private headers from some Qt module must do:
QT += modulename-private
Reviewed-by: Jason McDonald
Change-Id: I6924a577a960e4990f4379b02bca4822d8248fb4
These autotests are all using private symbols, available only when Qt is
configured with -developer-build. So, gracefully disable them when
the private symbols are not available.
Reviewed-by: Jason McDonald
Change-Id: Iafd1c7af486feeee810110bc021e75984827f78a
Now the texts used for undo actions and for items in QUndoView can
be set separately. This introduces an extended format of text that
can be passed to QUndoCommand::setText or QUndoCommand constructor.
The action text can now contain two strings separated by a "\n". The
first string (that goes before "\n") is then returned by
QUndoCommand::text() and used as name of item in QUndoView.
The second string (that goes after "\n") is returned by
QUndoCommand::actionText() and used when the text properties of the
undo and redo actions are updated.
If the text passed to QUndoCommand does not contain "\n", everything
works as before, and both QUndoCommand::text() and
QUndoCommand::actionText() return the same string.
Even though action text in English usually does not need different forms
for undo actions and QUndoView item, translators can employ this new
command text format, for example to adjust the grammatical case used in
command text to match the context of "Undo %1"/"Redo %1".
Merge-request: 2610
Reviewed-by: ossi
(cherry picked from commit 9b784789c75d59b27530bbf1d12676cc44f64f46)
Functions QUndo{Group,Stack}::create{Undo,Redo}Action() now use action
text templates "Undo %1" and "Redo %1" if no custom prefix was provided.
This makes more flexible translations possible. The surrounding text
(like "Undo" and "Redo") can now be suffixed to the command name as
German and Korean languages require ("%1 rueckgaengig machen" for German).
Also, now the default action text (when no command can be undone) can be
translated differently from the prefix. For example, it can be
translated as "Undo action", not just "Undo".
When a non-empty prefix is passed to QUndo*****::create****Action(),
those functions work as before, and the features described above become
unavailable.
Task-number: QTBUG-14442
Merge-request: 1212
Reviewed-by: ossi
(cherry picked from commit 213c25ad24e4f3b0a44f82f23d34746cd294f8d6)
This case may be triggered in the (admittedly slightly abnormal) case where a
user wishes to embed the calendar widget in a layout or, for whatever reason, do
something else that will change its ownership.
We work around this by detecting when it is deleted and recreating the widget.
This will also have a positive side effect if setCalendarWidget() is called with
a widget which is then subsequently deleted, returning the default widget
instead of a pointer to (now deleted) memory.
Reviewed-by: Denis Dzyubenko
Merge-request: 2568
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
(cherry picked from commit 124ec3200f8453142717fcfe7a4aa0a55164aaa6)
while windows itself does not care which case the variable names are in,
they may be passed to unix tools which *do* care.
note that this uses true case folding for string comparisons while
windows uses uppercasing. this means that "ess" and "eß" will be
considered the same by us, while not by windows. this is not expected to
have real-world impact, particularly because non-ascii variable names
are not used much.
Task-number: QTCREATORBUG-3110
Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit f3db5603871928ebed43a085a496397e65952b39)
For some reason this test is sometimes giving false results
with intel compilers.
The child count is most likely style dependent.
For now ignore it in the test.
Reviewed-by: Thierry
(cherry picked from commit 0ddecd383c91afb18ce2776eed5608bb1a0c2129)
This reverts commits 0916a68056154ecb60e4ea2c79726ab2e49b1532 and
6f1384fcbeea993d5be47590c696de60215b7608.
This effectively reverts most of MR 694.
Reviewed-by: Olivier
(cherry picked from commit 06e104b9c305d3db0dd1848e6e633ee3888fd1de)
When using QtextCursor::insert() with a large text followed by setting
the vertical scrollbar to its maximum value (scroll to bottom),
QPlainTextEdit would not behave properly if a document size
change was triggered by the insertion due to line wrapping.
This was visible in Qt Creator.
Auto test included.
Reviewed-by: con
(cherry picked from commit 5d144faf3c524ab557b88f69c4b755e20237e846)
QWS defines GRADIENT_STOPTABLE_SIZE to be 256, which is not enough
resolution for this test to pass.
Reviewed-by: Eskil Abrahamsen Blomfeldt
(cherry picked from commit 0201d5f5a8c95bd4f6b94726ed0db2b83cd3efc7)
We need to loosen the requirements a bit when qreal is float... Just
skip the two failing test cases for now.
Reviewed-by: Eskil Abrahamsen Blomfeldt
(cherry picked from commit 3c659eb590aecbcdb40cb498901e757e780fa892)
Two stops is a fairly common case so we gain quite a bit by special
casing it. Improves performance by 10 % in parcycle benchmark, and
by 90 % in a synthetic benchmark.
Reviewed-by: Andreas Kling
(cherry picked from commit 5b74a70ac630073582be56f8a0539624a1080185)
Add support for QDir::NoDot and QDir::NoDotDot for setFilter in
QFileSystemModel.
Task-number: QTBUG-14760
Reviewed-by: Frederik
(cherry picked from commit b60d82fd56897b1a1d3cc730172f71c27a497ede)
navigate would not return the right index in the parent if the current
widget was not the visible one.
Reviewed-by: Jan-Arve
(cherry picked from commit fdeeaa9d61efea9cca783a1d4098ae505df24390)
Return Check/Uncheck for checkable buttons.
Partially revive the buttons unit test.
Reviewed-by: Jan-Arve
(cherry picked from commit 6040eeebfb1ab3be3906295c373033cd5b5d9dc3)
Return app name instead of window title for root accessibility object.
Return Window as accessible type for the main window.
Reviewed-by: Jan-Arve
(cherry picked from commit 9a5b0d7a579572cd7e7faf869ab1a6684800f592)
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Merge-request: 980
(cherry picked from commit e3cd651d92a9e550fe52360d1be6ae41d0f2ab85)
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Add internal documentation for QUnifiedToolbarSurface.
Fix the autotest condition.
Change the repaint() call to an update().
Fix the update() autotest for raster.
Change the repaint() to an update().
Set the default graphics system to raster.
Revert "Switch the default graphics system to raster on Mac."
Fix an race condition in the auto test.
Fix an race condition in the auto test.
Fix a race condition when the main window is being destructed.
Switch the default graphics system to raster on Mac.
The previous preprocessor directive was aimed to
exclude Mac OS X.
With the raster engine, the behavior is unified
and we don't need to have a separate path for
Mac OS X/Cocoa.
The new condition excludes only Mac OS X with a
graphics system other than raster or Carbon.
Reviewed-by: Jiang Jiang
(cherry picked from commit 2c6af885d959f90b801c74dc5d389a720dc9fd1d)
With the CoreGraphics engine, we expect the test
to fail with update(), but with the raster
engine the behavior is the same across platforms.
Hence we don't need a special case for Mac OS X
with the raster engine.
Reviewed-by: Samuel Rødal
(cherry picked from commit 75d2387fbf005b022437855ab6433790372639f8)
Deleting the page in the wizard without removing it
first leads to a crash when the wizard tries to
access a deleted page.
Reviewed-by: Samuel Rødal
(cherry picked from commit 4024a08239c3e69bb2e0ca045ccbdf3fc900f675)
Deleting the page in the wizard without removing it
first leads to a crash when the wizard tries to
access a deleted page.
Reviewed-by: jasplin
(cherry picked from commit 3bff1637cd49617d334c1be63c20e008fac93be1)
Fix a bug in QVector::append(), it should use the capacity for new size,
when it is implicit shared and capacity is bigger than the new size.
Autotest included.
Task-number: QTBUG-11763
Reviewed-by: joao
Reviewed-by: Olivier Goffart
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
Skip test on MacOS due to problems with corewlan plugin
Fix QNetworkConfigurationManager usage outside main thread first
Update QTBUG-17223 for Qt 4.8
fix tst_qnetworkreply::httpProxyCommands autotest
Send User-Agent from the network request in http proxy CONNECT command
Add autotests for configuration dependent network proxies
Fix QNetworkReplyImpl error handling
Enable per network configuration proxy settings in QNetworkAccessManager
Allow a network configuration to be included in a proxy query
Fix error handling in write for socks socket engine
QNetworkConfigurationManager creates the engines loaded from plugins
as objects in the main thread.
If a QNetworkConfigurationManager instance is created in a worker thread
without any instance previously existing in the main thread, then it
is uninitialised until the main thread has run.
This causes allConfigurations() to return an empty list if called
immediately after instantiation, for example.
This fix initialises the plugins using blocking queued connections,
which causes the worker thread to block until the initialisation function
has been called in the context of the main thread.
Deadlock is possible if the main thread is for some reason waiting on the
worker thread, but it will not deadlock on QNetworkConfigurationManager's
mutex.
If this is a problem for an application, it should use
QNetworkConfigurationManager from the main thread first to preload the
plugins.
Task-number: QTBUG-18795
Task-number: QTBUG-18799
Reviewed-by: Cristiano Di Flora
Due to architecture changes in Qt 4.8, clearing the proxy before the
request is complete causes the http connection to not use any proxy.
The issue is that the proxy isn't resolved until after the bearer has
been started (which is correct in the general case, as system proxy
is unknown until that time).
Also increased the test's timeout from 1 second to 15, as starting a
bearer can be slow.
Reviewed-by: Markus Goetz
Some proxies can discriminate based on the User-Agent when sent a
CONNECT command for establishing a HTTPS connection.
With this change, if the User-Agent header is set in the QNetworkRequest
then it will be passed to the http socket engine for use in the connect
command sent to the proxy.
As before, "Mozilla/5.0" will be used by default when no user agent
has been set.
Task-number: QTBUG-17223
Reviewed-by: Markus Goetz
1. test that systemProxyForQuery returns something for all configs
2. test that QNetworkAccessManager uses the settings for the
configuration it was started with.
Task-number: QTBUG-18618
Reviewed-by: Peter Hartmann
When refactoring the setPixelSize() code of QRawFont, it was broken
on Mac. To avoid making the same mistake again, I've added a simple
autotest to check that the pixel size is actually set.
Reviewed-by: Jiang Jiang
(cherry picked from commit 821b8b540af491ce60d35bd84d3c91399ecc0d16)
The comment was copy-pasted, spelling error and all, from the example
in the bug report, and really doesn't make any sense at all in this
context.
Reviewed-by: TrustMe
(cherry picked from commit 7ac511d8d906575dff1a02361e31251b244d3b3a)
The header field "Cache-Control: must-revalidate" is a strict
requirement for loading the resource from the server, and not reading it
from the cache without revalidating first. With this patch, PreferCache
will load such from the network instead of loading them from the cache,
and AlwaysCache will throw a ContentNotFound error.
Reviewed-by: Markus Goetz
Task-number: QTBUG-18983
We should follow
http://tools.ietf.org/html/draft-ietf-httpstate-cookie-23 , which says
parse the value until reaching the next ';' or the end of the line.
Other cookie implementations allow spaces in unquoted values as well.
Reviewed-by: Martin Petersson
Task-number: QTBUG-18876
When you copy-pasted rich text in which the font size had been set
using setPixelSize() the font size would be mysteriously forgotten.
The pixel size property in QTextCharFormat was added ad hoc, and not
integrated in the HTML exporter.
Task-number: QT-4792
Reviewed-by: Gunnar
(cherry picked from commit 5aa5c2e2935c1829cc6965198968699f17c24ec0)
The pixel size in the font engines is already a floating point value.
For maximum flexibility, we should expose this in the public API.
Task-number: QTBUG-18817
Reviewed-by: Jiang Jiang
(cherry picked from commit ac9e63b58533a3215106ed9da82cff3a3e3dda3a)
If the text is wrapped with LRE/LRO/RLE/RLO override/embed marks,
Core Text in Mac OS X 10.5 doesn't produce an empty glyph at the
beginning of the glyphs (while it does in Mac OS X 10.6), thus
we need to prepend an empty glyph here, otherwise cursor position
calculation will consider the first two characters as a ligature
of the same glyph.
Reviewed-by: Eskil
(cherry picked from commit a36ac6c34bafa801c2c30d76f59e4a3594efc4d5)
Bidi input can in some contexts be more intuitive if the cursor
works in visual way: pressing left arrow key always make cursor
move one character to the left regardless the language of text,
pressing right arrow key always make cursor move to the right.
It is also the behavior of Mac OS X. Based on the above reason
and requests from Symbian we implemented this support for visual
movement in BIDI text. 3 public properties are added to
QTextDocument, QTextLayout and QLineEdit respectively:
- QTextDocument::defaultCursorMoveStyle can be used to control
the cursor behavior in all widgets based on QTextDocument,
like QTextEdit, QPlainTextEdit, etc. When set to QTextCursor::
Visual, it will enable visual movement for all the cursors in
the corresponding text edit. Default is QTextCursor::Logical.
- QTextLayout::cursorMoveStyle is used for low-level cursor
manipulation. When set to Visual, it will enable visual movement
behavior for all the cursor related methods, including cursorToX,
xToCursor and drawCursor. Default is Logical.
- QLineEdit::cursorMoveStyle is used to control cursor movement
behavior in QLineEdit. Default is Logical.:
Task-number: QTBUG-13859
Reviewed-by: Eskil
(cherry picked from commit c480dd641f5d22d1ee72cb27bf39e24c6df65658)
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://qt.gitorious.org/qt/pages/GitIntroductionWithQt
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12