Demonstrates that you can have mnemonic buttons which don't
conflict with the Ctrl-A and Ctrl-C shortcuts.
Task-number: QTBUG-6731
Change-Id: I41ce64e6f3bd0cf387af13c5c37894b721b5a3bb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The context menu all along has indicated that Ctrl-A selects all the
text, so now that is actually implemented.
Task-number: QTBUG-6731
Change-Id: I82dac3aea530e5a3fcd59217c4c0118025061c7d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
You can hit a key with no modifier to select a dialog button that has
the corresponding mnemonic, but it doesn't make sense to do that if
the Control or Meta key is being held. Now you can hit Ctrl-A, Ctrl-C
to select all the message detail text and copy it to the clipboard,
even if the dialog has buttons with mnemonics like &Continue and
Save &Again. But as before, Alt-C, plain C, Alt-A and plain A select
the mnemonic buttons on the dialog.
Change-Id: I40c052dbb7730bde444ac2de405724a3203d1472
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Use the UpdateLayeredWindow() functions only for windows with alpha.
Task-number: QTBUG-33025
Change-Id: I64b0c28ee0997cd3d09dc76babe105ed474c6835
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
In the latest libjpeg version, the "boolean" type is changed so that
true and false no longer can be used instead of TRUE and FALSE.
Also, purge some ancient code remains meant to support a now defunct
OS´s idea about the boolean type.
Task-number: QTBUG-33166
Change-Id: Iebbdf300cfdc22775954de65f985358424ed2b49
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
If two items are equal according to the current sorting criterion,
the sorting predicate uses the address of the items to break the tie.
The problem is that the items themselves are being moved during
the sort; therefore, this will break the Strict Weak Ordering
that std::sort requires.
For instance, suppose to be sorting case-insensitively the following array:
("b", "a", "A")
Simulating a swapped-based sorting can lead to:
Array before Evaluated predicate Array after
("b", "a", "A") "a" < "A" (1) ("b", "a", "A")
^ ^
("b", "a", "A") "b" < "A" (2) ("A", "a", "b")
^ ^
("A", "a", "b") "A" < "a" (3) (XXXXXXXXXXXXX)
^ ^
(1) True, because of the array ordering (they're equal otherwise)
(2) False: swap them
(3) True, because of the array ordering (they're equal otherwise)
(1) and (3) say that "a" < "A" and "A" < "a", SWO gets violated,
leading to undefined behavior.
This problem was causing QFileSystemModel autotests failures (cf. [1])
after switching to STL algorithms instead of using qSort.
The array to be ordered in that case is ("a", "c", "C"),
cf. tst_QFileSystemModel::caseSensitivity.
(STL algorithms are much smarter than good ol' quicksort in qSort;
if we're ordering on an array which fits in a cache line, they
turn to the much faster (~1 robe) insertion sort. Violating SWO with
a quick sort usually just gets to a non-sorted container; insertion
sort is implementable in ways that rely on SWO, otherwise they
will overflow the iterator; cf. Cormen/Leiserson/Rivest and the other
literature on the topic.)
This commit reverts commit fa5f3a44 (in Qt 4).
[1] http://testresults.qt-project.org/ci/QtBase_dev_Integration/build_01749/linux-g++_shadow-build_Ubuntu_11.10_x86/log.txt.gz
Change-Id: I5d8ac0d0907675c501717969abee2816b41eca18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
You are not supposed to call NSOpenGLContext -setView: for a view that
has not yet called drawRect. Doing this would result in a invalid
drawable error.
Similar to 4.8 commit cd2a51a66f
Change-Id: Ibb2300a8c6fe52f786f813987e93d4a3dc145366
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
qdoc-manual.qdoc is now an overview document
Each section is a separate qdoc file
Title modification in minimal qdocconf qdoc file
Task-number: QTBUG-31801
Change-Id: I9e50eb8c4f1f501e9c0bc768372d4393b73053ed
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
These macros were previously defined for QDoc manual.
This change adds them to global macros.qdocconf so
they can be used everywhere.
Change-Id: I4fdf5a103ecfb356719951a7d0c6fbd35c887744
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
When creating a fontengine in QFontconfigDatabase::fontEngine we
solely base the antialias setting on the QFont StyleStrategy and forget
to ask fontconfig it has an overriding definition for this font match.
This patch will now let fontconfig decide the antialias setting unless the
NoAntialias stylestrategy has been set.
Change-Id: I67981582a37cfd3c59aa1db929095585af554088
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
They are not needed anymore since 5971e091 and 184e27c0 have been
integrated.
Change-Id: Id611f1432a010f3c2af86951e1c79cb8fc73f9e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
In "very basic platform plugins", the platform window ID can be null,
which conflicts with QWidget's special treatment of 0 as a parented widget.
Such is the case with EGLFS, which can return a null native window handle
for winId on some EGL implementations.
Move the assertion winId!=0 into the widget framework, as this assert is
not relevant for non-widget applications. A large proportion of basic
platform plugin users will see relief from this unnecessary assertion.
Change-Id: I25c9d96550cd747c77c9516d773e9cdebf7440ab
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Do the same as in mousePressEvent.
Otherwise it is not possible to handle the event
in one of the graphics views parents.
Task-number: QTBUG-8061
Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
MSVC doesn't like operator->() returning a pointer to
non-aggregate. So we must make sure that the expanded code does not
try to call it by doing:
abegin->~T();
Instead, we make an implicit call to operator T*() with that
static_cast<T* >. If abegin is a non-strict iterator, it's already
a T*, so the static_cast is a no-op.
qvector.h(645) : error C2839: invalid return type 'int *' for overloaded 'operator ->'
Change-Id: I06f983bab7677cb60ef3913cdce349e26896bfb6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The cmake directory may not be $PREFIX/lib/cmake, but
instead $PREFIX/lib/<arch>/cmake. Getting the PATH of such a
directory will not lead us to $PREFIX/, but to $PREFIX/lib.
Use a relative calculation instead.
Task-number: QTBUG-33223
Change-Id: Ice4e0f859ab1df238bad4eb942f073e84dd86cc3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
it contains #ifdefs for that, no need to disable it completely.
Change-Id: I4a7d03e09fefded966e2c3fec58a470b4f1d3300
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Those should be in window coordinates (or rather, its content view)
not view coordinates.
Task-number: QTBUG-32826
Change-Id: I52dddeccf17b359163ad477ce4299b934633b4fa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Otherwise the view will miss its own frame change notifications.
And we must unregister from all the notifications during dealloc.
This would also reveal a bug where we would expose an NSView before
its super view is visible, leading to those "invalid drawable" warnings
when using QQuickViews. Therefore, we add this extra check in
QCocoaWindow::exposeWindow().
Task-number: QTBUG-32826
Change-Id: I69018cb6f199b242768d114b2aa34c7f2d243196
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Native widgets, which have a NSView but not a
NSWindow, must be created in the hidden state to
prevent Cocoa from selecting them for event delivery.
Change-Id: I741e52729047ad4e03959f2244abe5b14b5df46b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
If you click outside a popup window, it only closes the popup; any
other widget that was under the cursor at that time should not get
the event. The bug was about the popup list on a combobox, but this
patch assumes that this rule is universal; can't think of any
exceptions at this time. (E.g. a tooltip is not a popup) Clicking
on the application menubar still does not close the popup though.
Task-number: QTBUG-33241
Change-Id: I2444b7cfd40cf75ff7b70e3fecfeceb2fd4623bf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The fix was originally applied to Qt 4.8 (4c64464), but missed
Qt 5 which had already been branched at that point of time.
Task-number: QTBUG-33089
Task-number: QTBUG-21433
Change-Id: Ia3cd35d29dbdc70ba55b6f0840c4082e232c24ae
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
When the mouse moves while the sloppy menu timer is still running then it
would end up just creating a new one and the old one would continue to
run. If the action that it is relevant for is different then it should
restart the timer, otherwise it should just ignore the mouse move and let
the other timer continue.
Change-Id: Id03014fa05596bd6ede887fa917e21ca5a7690d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When building a project in VS then it would cause a rebuild
under certain situations even though a rebuild is not
actually required.
The root problem exists in VS in the following configuration:
1. A file has a custom build tool specified
2. The custom build tool has additional dependencies
3. The input file is specified in the additional dependencies
4. There are files in the additional dependency list
This is the situation with form files in Qt that have include hints
specified in Qt Designer. The include hints get specified in the
additional dependencies for the custom build tool.
What happens is that VS will process files in the additional
dependency list differently based on where they appear in the list
relative to the input file.
If a dependency appears before the input file, VS will require the
file as a build input. If you just specify a file name, VS looks in
the project directory (and only the project directory) for that file.
You have to specify the path (relative or absolute) to get VS to look
elsewhere. If VS does not find the dependency, VS thinks the project
is out of date (since the missing dependency is a required build
input) and will rebuild the input file.
If the dependency appears after the input file and the file doesn't
exist, VS does not include the dependency as a build input. Since the
file is not a build input, no rebuild is required.
Change-Id: I5af460d21ad049ed7819746fd60c98677b810692
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix compilation with e.g. mingw-builds 4.8.1-rev4 package. The Mingw-W64
headers define SHSTOCKICONINFO only for vista and newer.
Task-number: QTBUG-33225
Change-Id: I30a62c642ae017c7eafb99b1efb06578fd61a12e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The information is explaining implementation details rather than
on how to use it effectively. The size limit of QByteArray may
vary depending on available memory.
Task-number: QTBUG-33037
Change-Id: I361316422ade3624a0c2864d93f87caeb654f4d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since Qt5, the QMetaObject do not contains the string name of the
builtin types, but only the QMetaType id. QMetaMethod::typeName
convert back from the id to the string. But if the type is aliased,
the string of the main type is returned.
This was the case for example for qint64 which is transformed to
"qlonglong".
This causes a regression in QMetaType::invoke when trying to invoke a
method which return an aliased type, since the string comparison would
fail.
Fix the problem by also comparing the metatype id.
Changelog: QMetaMethod::invoke: Fix return of aliased meta type
Task-number: QTBUG-33222
Change-Id: Iec7b99dcbf7b23eb818de74f413e4451ce510ac4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
eeb31ad10a changed the behavior
and allowed the placeholder text to stay visible even if the lineedit
has focus.
Task-number: QTBUG-33237
Change-Id: I733331be1d3225eb28390b21eb9a7e4971bfdc31
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The test was re-using a main window and menu bars for all tests,
clearing and repopulating them. Rewrite the code to be able to
use menu bars and windows on the stack separately for each test.
Change-Id: I13ab31b26b70bc8537e8d8ab164051b3197cd68e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Qt Creator needs to parse the qmake.conf in order to get the
architecture for this Qt build when the Qt build is added.
At this point it does not know that it's reading an android
project, so it can't set the right environment variables. By
moving the error to the bottom, we let Creator parse the whole
file before getting an error, so that it can detect the options
it needs to define the Qt version.
Change-Id: I119523cb21e330dc5e957a6992476c4c3d4ab7b5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
If a MDI subwindow is focused and an ancestor has a QShortCut set
with the Qt::WidgetWithChildrenShortcut flag, it should trigger,
as MDI subwindows are not top-level widgets.
Task-number: QTBUG-32788
Change-Id: I7ec76d493b827ae6678209a56015ab6b432c1ed9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
as a side effect, this fixes the generators that were more bitrotted
(nmake and even more mingw).
Task-number: QTBUG-30644 #close
Change-Id: Iefa3f07125884412d091aa12b44935e5b1fb858a
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Try to stabilize doubleRepaint and others, try to get them away
from taskbar areas.
Change-Id: Icae8da575999afccb314edafd7deb16446e3d1c2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>