Fix warning about unused variable printer in auto-test and redirects
output to qInfo() as intended.
Amends change a26435d65c.
Change-Id: Ia72a93267a54b9c4f9ef37fa058b95ef586ecc75
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Change the main window to contain a QTabWidget and add a log widget
logging relevant events on the top level widgets for testing changes.
In the preview window, add new window flags of Qt 5 and output
geometry, margins and window state in addition.
Change-Id: Icec366223b6c163d58a69034687f3d9323a91533
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When a menu item's enabled state changes after
-[QCocoaMenuDelegate menuWillOpen:] is invoked, i.e.,
during or after QMenu::aboutToShow() is emitted, that
state change may not be taken into account. This is
because the automatic menu validation, upon which Qt
relies, is not made aware of any such change.
By calling -[NSMenu update] when syncing the QPA menu
item, we induce Cocoa to invoke -[QCocoaMenuDelegate
validateMenuItem:] and ensure that previously synced
items, whose state may have changed, will be properly
updated. This, however, has a small side effect, namely
that menu-holding items will also go through the automatic
menu enabling path and may appear disabled since, until
now, they were not properly configured. In order to solve
this, we set the action on those items as well, and make
sure that both of QCocoaMenuDelegate's relevant methods,
validateMenuItem: and itemFired:, properly process
menu-holding items.
Menurama manual test updated accordingly.
Change-Id: I62f955538b8be09b8494ea0ce87fca7910148d38
Task-number: QTBUG-56850
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The existing cursor logic had a couple of issues:
- It made the faulty assumption that we could not use
the NSWindow invalidateCursorRectsForView API for
child NSViews.
- It used NSWindow invalidateCursorRectsForView and
NSView resetCursorRects. This API has been replaced
by the more general NSTrackingArea API.
- It did not implement falling back to the parent
window cursor if the current window has no cursor
set.
Document that QWindow cursors work the same way as
QWidget cursors in that a QWindow with no set cursor
will fall back to the parent window cursor.
Change the cocoa platform code to use NSTrackingArea
exclusively and implement NSView cursorUpdate which
sets the cursor. Handle immediate change on QWindow::
setCursor() manually.
Add QWindow::effectiveWindowCursor() and
applyEffectiveWindowCursor() which finds the correct
window cursor.
Add a manual test for the child window, child widget,
and QWidget::createWindowChild cases.
Task-number: QTBUG-33479
Task-number: QTBUG-52023
Change-Id: I0370e11bbadb2da95e8632e61be6228ec2cd5e9d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix
Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code
that the code in question was a left-over from Qt4, when we used
Q_WS_ defines instead of Q_OS_ defines.
This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so
for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually
unconditionally included.
To make this even clearer, the defines have been replaced by checks for
1 or 0, with a comment describing how the code used to look in Qt4. The
use of constants in the check also makes it easier for editors to parse
the condition and show visually that the code is defined out.
Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This leaves a clearer separation between the foreign-window and non-foreign
window use-cases, where a single QCococaWindow can only be in one mode,
which is determined in the constructor and doesn't change after that.
There are no source or binary compatibility guarantees for the QPA classes,
meaning the helper function in QPlatformNativeInterface can be removed.
Change-Id: I3232aedca1d98c49a8f54e16750832187f9dc69a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Allows us to detect cases where the requested vsync combination was
not possible to fulfill.
Change-Id: Ie8f3665129f7a1ab7fcefb94b2298d54520b753a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The FPS is now calculated and output on the command line in a single
place. The animated fps counter has been replaced with a vertical line
which should make it easier to observe tearing issues when vsync is
disabled.
Change-Id: Id356fc1958c048d85aba48edfed59124454038d4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The animated FPS counter should be enough to observe smooth animations,
so we use the color of the window to visualize frame latency.
Change-Id: I1171a1c4bdc261ca8655771290c6735357821781
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
cf53aa21bf and 3aaa5d6b32
were reverted because of reconstruction in 5.7.
defineTest(qtConfTest_checkCompiler) in configure.pri is smart
enough to cover the case in a9474d1260.
DirectWrite: Fix advances being scaled to 0
Since 131eee5cd, the stretch of a font can be 0, meaning
"whatever the font provides". In combination with ec7fee96,
this would cause advances in the DirectWrite engine to be scaled to
0, causing the QRawFont test to fail.
Conflicts:
configure
mkspecs/features/uikit/device_destinations.sh
mkspecs/features/uikit/xcodebuild.mk
src/corelib/global/qglobal.cpp
src/corelib/global/qnamespace.qdoc
src/plugins/platforms/cocoa/qcocoamenuitem.h
src/plugins/platforms/windows/qwindowsservices.cpp
src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
src/widgets/kernel/qapplication.cpp
tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
Use the correct method of QMetaEnum to convert enum values to names.
QMetaEnum::valueToKey() should be used, because it takes an enum value
as an argument, while QMetaEnum::key() takes an index of the enum value.
Change-Id: Ie895fcc935e8835e3d9c416ca34be8bfe82fd74e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Changes the --extrawindows option to --numwindows with a default of 3,
and layouts all windows in rows and columns so that they are all
exposed at startup.
Change-Id: I5e8d63a14b778bcddc2fee3bf7e78d6664532b5b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Use the new qtConfig macro in all pro/pri files.
This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.
Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This manual test pretends to be a modest safeguard
against QMenu related regressions on macOS. It takes
a slightly different approach than the existing menus
manual test, tracking observed regressions instead of
providing extensive coverage (though this may change
in the future).
These regressions are listed as task numbers below,
most of them arising from the now infamous change,
09acf326db QCocoaMenu: Decouple NSMenuItem from NSMenu
So, from now on, please run this and the menus manual
tests and look for regressions every time you make a
change regarding QCocoaMenu and related. And, if you're
fixing a regression, add the regression example to the
Menurama manual test.
Task-number: QTBUG-52931
Task-number: QTBUG-53085
Task-number: QTBUG-53251
Task-number: QTBUG-54633
Task-number: QTBUG-54637
Task-number: QTBUG-54698
Task-number: QTBUG-55121
Change-Id: I276e916dcdf00f1a44faf64d87050bc3a037a3b5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Conflicts:
configure
5.7 now supports clang on android; but dev re-worked configure
src/gui/kernel/qevent.h
One side renamed a parameter of a constructor; the other added an
alternate constructor on the next line. Applied the rename to both
for consistency.
tests/auto/tools/moc/tst_moc.cpp
Each side added a new test at the end.
.qmake.conf
Ignored 5.7's change to MODULE_VERSION.
configure.json
No conflict noticed by git; but changes in 5.7 were needed for the
re-worked configure to accommodate 5.7's stricter handling of C++11.
Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
Change QOpenGLTextureBlitter to be a public API, as it was originally intended.
There are now significant external uses outside qtbase (C++ compositor examples
in QtWayland), and the API is considered proven enough.
[ChangeLog][QtGui] QOpenGLTextureBlitter, a utility class to draw textured quads,
has been made public.
Change-Id: If7a2c94e1494195e2aa375d214932fa7b4c78321
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Add a test for embedding Qt windows into foreign windows.
Complements the existing "foreignwindows" test (which embeds
foreign windows into Qt).
The test has a simple UI based on QRasterWindow allowing
for checking events and geometries.
Task-number: QTBUG-41186
Change-Id: Ie62a3e250ca666e2fa5c2e3ef37ef0654829397c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Conflicts:
src/corelib/io/qtemporarydir.cpp
One side encapsulated a repeated piece of #if-ery in a local define;
the other added to the #if-ery. Made its addition to the other's.
src/corelib/kernel/qeventdispatcher_unix_p.h
One side moved some members into a struct; this collided with a #undef
check that neither side now has. Discarded the #undef part.
src/gui/opengl/qopengltexturehelper_p.h
5.7 deleted a bunch of methods; not clear why merge got confused.
src/tools/moc/moc.cpp
One added a name to the copyright header; another changed its URL.
Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
Conflicts:
qmake/library/qmakebuiltins.cpp
qmake/library/qmakeevaluator.cpp
qmake/library/qmakeevaluator.h
qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
changed the survivor
src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.
src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.
src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.
tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.
There was no git-conflict in
src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them. Put FixedColumnMatrix<>::removeRow(int)
back for its new user.
Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
Add a class to display debug messages, providing convenience functions for
installing and formatting parameters like indentation. It prints a startup
message containing relevant information about Qt.
Change-Id: Id0a19adbb5953a6ded1a8e692f242b63748e7273
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Output the class hierarchy until a base class within QtWidgets is found.
Change-Id: I0ecee22e2ead1dea8b39cce8ca2f0739290aac22
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Now that the minimum deployment target (and thus SDK) is 10.9 for OS X
and 7.0 for iOS, all code paths affecting platform versions lower than
the aforementioned are removed.
Change-Id: Id985c7259c4ac069319d88f2c29c9559ae9e8641
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
In German layout, "Ctrl+]" is "Ctrl+AltGr+9".
Task-number: QTBUG-51848
Change-Id: I8c05c13a4d46c0818ce4f56ce476c5310a677af2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
So we know what we're looking at if there's a test failure. This is like
QNetworkInterface.
Change-Id: Id75834dab9ed466e94c7ffff1444bf51f615e944
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
the "generated by qt creator" header is not supposed to be checked in.
Change-Id: I7626c0bd16f83d81b3facd216a04e7d505942256
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Allow tmpfs filesystems to be reported, as they're often usable by the
user, mounted in /tmp and in /run (the fs for $XDG_RUNTIME_DIR).
But disallow anything whose device is not a pathname. This catches most
of everything else that wasn't specifically tested for before, like
virtual fuse filesystems, like GVFS.
Change-Id: I3e15a26e0e424169ac2bffff1417b7cee0f8ec97
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>